-
1. Re: Error While creating table
jbrosenberg May 30, 2003 11:04 AM (in response to qinding)I get a similar problem, I am using a Oracle db...
I get this error:
10:58:03,260 INFO [AddressEJB] Created table 'ADDRESS' successfully.
10:58:03,601 ERROR [EntityContainer] Starting failed
org.jboss.deployment.DeploymentException: Error while creating table; - nested throwable: (java.sql.SQLException: ORA-00904: invalid column
name
)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.createTable(JDBCStartCommand.java:178)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:87)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:499)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:410)
at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:170)
at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:339)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
at $Proxy11.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:392)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324) -
2. Re: Error While creating table
jbrosenberg May 30, 2003 11:43 AM (in response to qinding)Ok, I got rid of the ivalid column name, by changing
in jbosscmp_jdbc.xml, the NUMBER field in
the PHONE table to THE_NUMBER, apparently
NUMBER is a reserved word in Oracle...
Then, I had to do the same for the CREDITCARD table.
This is not explicitly mentioned in the jbosscmp-jdbc.xml, it was using defaults from the ejb-jar.xml file...So I had to add it to the jbosscmp-jdbc.xml file, and also change the name of the NUMBER column there to THE_NUMBER....
Now it deploys...
Jason -
3. Re: Error While creating table
2000 Jul 1, 2003 10:50 AM (in response to qinding)I get the same error with hypersonic on JBOSS 3.2.. Here it is :
Error while creating table PRODUCTS; - nested throwable: (java.sql.SQLException: Unexpected token: ) in statement [CREATE TABLE PRODUCTS (productid VARCHAR(256), name VARCHAR(256), description VARCHAR(256), baserPrice DOUBLE NOT NULL, CONSTRAINT PK_PRODUCTS PRIMARY KEY ())])]
in order to go round the problem i set up my jbosscmp-jdbc.xml defaults with <create-table>false</create-table> and I create it manually on hypersonic (without the last CONSTRAINT ... bit).
However I would appreciate if someone could give me a hint on why this does not work. thanks ! -
4. Re: Error While creating table
kjensendk Sep 18, 2003 6:47 AM (in response to qinding)Had the same problem... BUT.....
My ejb-jar.xml file had UPPERCASE letters in the
<cmp-field><field-name>Fieldname</field-name></cmp-field>
Changed it to begin with lowercase and then it worked just fine