aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Problems with Cmp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Problems with Cmp" Watch "Problems with Cmp" New topic
Author

Problems with Cmp

Sergej Barabera
Greenhorn

Joined: May 09, 2011
Posts: 6
Hello i m trieng to fetch some data from a Table called hardwareformbean but i get this Error message.


14:29:42,596 ERROR [HardwareFormBean#findAllByTabellenID] Find failed
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM hardwareformbean t0_hii WHERE (t0_hii.TabellenId = 'Rechner_Modell_1')' at line 1


<entity>
<display-name></display-name>
<ejb-name>HardwareFormBean</ejb-name>
<home>de..HardwareFormHome</home>
<remote>de..Hardware.HardwareForm</remote>
<ejb-class>de..HardwareFormBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>de.HardwareDataPK</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>HardwareFormBean</abstract-schema-name>
<cmp-field>
<field-name>idHardwareForm</field-name>
</cmp-field>
<cmp-field>
<field-name>TabellenId</field-name>
</cmp-field>
<cmp-field>
<field-name>Value</field-name>
</cmp-field>
<query>
<query-method>
<method-name>findAllByTabellenID</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>SELECT OBJECT (hii) FROM HardwareFormBean AS hii WHERE hii.TabellenId = ?1 </ejb-ql>
</query>
</entity>


My Xml looks ok. Any hint ?

Sergej Barabera
Greenhorn

Joined: May 09, 2011
Posts: 6
Any Idea ?
Sergej Barabera
Greenhorn

Joined: May 09, 2011
Posts: 6
I have debugged in the Mysql connector and found that my sql statement was not resolved.

com.mysql.jdbc.JDBC4PreparedStatement@205703: SELECT FROM hardwareformbean t0_hii WHERE (t0_hii.tabellenId = 'Rechner_Modell_1')

Any Idea ??
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problems with Cmp