MYSQL binding problem

hi there,

trying now for days to bind some mysql databases to a component but i wont work and iam getting desperate.

my problem is similar to this one here

http://forum.sun.com/jive/thread.jspa?forumID=123&threadID=47125

i can get the connection just fine, i can view the data when i click on the table in the server window as well. but when i bind it to a component the "bind to data" window does not show any columns in the value or display field (<none>).

i get the blinking error symbol with tool tip:

com.mysql.jdbc.NotImplemented Feature not implemented

exception trace further down.

it works fine with derby databases but mysql escapes me somehow. i tried it with about a dozen databases but none worked for me.

tried both drivers,

com.mysql.jdbc.Driver

org.gjt.mm.mysql.Driver

iam using mysql server 5.0

mysqlconnector 3.1.13

java studio creator 2 update 1

exception:

java.lang.RuntimeException: com.mysql.jdbc.NotImplemented: Feature not implemented

at com.sun.data.provider.impl.CachedRowSetDataProvider.getMetaData(CachedRowSetDat aProvider.java:1319)

at com.sun.data.provider.impl.CachedRowSetDataProvider.getFieldKeys(CachedRowSetDa taProvider.java:489)

at com.sun.rave.web.ui.design.AbstractDesignInfo.linkDataProviderToListSelector(Ab stractDesignInfo.java:525)

at com.sun.rave.web.ui.design.AbstractDesignInfo.linkBeans(AbstractDesignInfo.java :459)

at com.sun.rave.insync.models.FacesModel.linkBeans(FacesModel.java:1042)

at com.sun.rave.designer.DndHandler.processLinks(DndHandler.java:2126)

at com.sun.rave.designer.DndHandler.importBean(DndHandler.java:880)

at com.sun.rave.designer.DndHandler.importItem(DndHandler.java:702)

at com.sun.rave.designer.DndHandler.importDataDelayed(DndHandler.java:376)

at com.sun.rave.designer.DndHandler.access$000(DndHandler.java:114)

at com.sun.rave.designer.DndHandler$1.run(DndHandler.java:298)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java: 242)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:16 3)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Caused by: com.mysql.jdbc.NotImplemented: Feature not implemented

at com.mysql.jdbc.PreparedStatement.getMetaData(PreparedStatement.java:663)

at com.sun.sql.rowset.CachedRowSetXImpl.getMetaData(CachedRowSetXImpl.java:2336)

at com.sun.data.provider.impl.CachedRowSetDataProvider.getMetaData(CachedRowSetDat aProvider.java:1317)

[catch] ... 17 more

[2963 byte] By [henningCV] at [2007-11-26 8:58:55]
# 1

Hi There,

I have been having a simillar problem with my app. The MySql data source is fine when it is running on the Sun server with C2 but when deployed to Tomcat 5.5 there seems to be an issue with accessing data providers. The stack trace for my error is shown below.

===== Monday, 24 July 2006 12:13:32 Europe/London =====

Jul 24, 2006 11:13:41 AM org.apache.catalina.core.ApplicationContext log

SEVERE: Error Logging in

java.lang.RuntimeException: com.mysql.jdbc.NotImplemented: Feature not implemented

at com.sun.data.provider.impl.CachedRowSetDataProvider.getMetaData(CachedRowSetDat aProvider.java:1319)

at com.sun.data.provider.impl.CachedRowSetDataProvider.getFieldKeys(CachedRowSetDa taProvider.java:489)

at com.sun.data.provider.impl.CachedRowSetDataProvider.getFieldKeyInternal(CachedR owSetDataProvider.java:467)

at com.sun.data.provider.impl.CachedRowSetDataProvider.getFieldKey(CachedRowSetDat aProvider.java:439)

at com.sun.data.provider.impl.AbstractTableDataProvider.findFirst(AbstractTableDat aProvider.java:136)

at focalpointfront.navigationFragment.loginButton_action(navigationFragment.java:4 79)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)

at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.j ava:72)

will post back with solution if I find one.

Regards

Jim

jimmykelso at 2007-7-6 23:01:29 > top of Java-index,Development Tools,Java Tools...
# 2
tried it with several connector drivers but none worked.3.0.173.0.93.1.135.0.2 beta
henningCV at 2007-7-6 23:01:30 > top of Java-index,Development Tools,Java Tools...
# 3

seems to be no driver problem.

tried this simple code fragment as button action and it sucessful returned the content of the database.

Class.forName("com.mysql.jdbc.Driver" );

Connection con = DriverManager.getConnection( "jdbc:mysql://localhost/eq_item_db", user, password );

Statement stmt = con.createStatement();

String query = "SELECT * from test";

ResultSet rs = stmt.executeQuery( query );

rs.next();

System.out.println(rs.getString("string"));

info(rs.getString("string"));

must be a bug in creator2 i think.

is there a way to manually replace the creator auto generated code for filling components with my own code?

Message was edited by:

henningCV

henningCV at 2007-7-6 23:01:30 > top of Java-index,Development Tools,Java Tools...
# 4

ok, solved the problem.

dont know if this really caused that problem but anyway here is what i tried last.

creator2 is copying the mysql connector jars into the windows xp userdirectory.

~/.creator/2_1/jdbc-drivers

after deleting every connector jar but 3.1.13 from this directory, i can now bind the data to components. the first connector jar ive used was 3.0.9 but according to the database tutorial you need at least 3.1.11.

i guess creator2 migration from 3.0.9 to 3.1.11 failed at some point and deleting every other forcing him to do this correctly.

*shrug*

Message was edited by:

henningCV

henningCV at 2007-7-6 23:01:30 > top of Java-index,Development Tools,Java Tools...
# 5
Hi Henning,I had a simillar problem and solved it here http://forum.sun.com/jive/thread.jspa?messageID=353164RegardsJim
jimmykelso at 2007-7-6 23:01:30 > top of Java-index,Development Tools,Java Tools...