This content has been marked as final.
Show 3 replies
-
1. Re: Help on DATE format error
wdfink Nov 8, 2004 4:26 AM (in response to fly2moon2)Hi,
looks like an Configuration/Mapping or Programmers fail.
I'm not working with MySQL.
But it seems that the DB has a incompatible datatype.
For more you must post the mapping (if you change) the JBoss version and a pice of your DeployDesc and code... -
2. Re: Help on DATE format error
fly2moon2 Nov 8, 2004 8:54 AM (in response to fly2moon2)Hi,
Thanks for your reply.
I simply follow the Duke bank's example and didn't change anything.
But I was compiling/packaging the programs from a Windows XP workstation and then copy the EAR file to JBoss on a Linux server. Would this make a difference (causing the problem)?
thanks,
jackling -
3. Re: Help on DATE format error
wdfink Nov 8, 2004 9:48 AM (in response to fly2moon2)Sorry,
I'm not familiar with the SUN 'Duke Bankaccount' example.
But the result of you deployment for EJB must have an ejb-jar.xml, jboss.xml and jaws.xml in the META-INF of the EJB.jar file
ejb-jar.xml:<entity><ejb-name>EntityBean</eib-name> .... <cmp-field><field-name>xxxDate</field-name></cmp-field>
jaws.xml:<entity> <ejb-name>EntityBean</ejb-name> <cmp-field> <field-name>xxxDate</field-name> <column-name>yyyDate</column-name> </cmp-field>
In the .java code of AccountEJB an attribute like java.sql.Timestamp and the Table a coresponding column, see XML-files.
Have a short look into jboss.../server/default/conf/standardjaws.xml, here you will find the mapping:<type-mapping-definition> <name>mySQL</name> <mapping> <java-type>java.util.Date</java-type> <jdbc-type>DATE</jdbc-type> <sql-type>DATETIME</sql-type> </mapping>
I think this can be your problem ...