I'm not sure where to start looking for the source of this problem, although I have searched the archive for "unexpected token".
In a schema with one or more tables having defined primary keys, I am seeing an error associated with creation of the last table when generating CMP entity beans:
MBeans waiting for other MBeans:
[ObjectName: jboss.j2ee:jndiName=CategoryEntity,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.deployment.DeploymentException: Error while creating table; - nested throwable: (java.sql.SQLException: Unexpected token: ) in statement [CREATE TABLE CATEGORYENTITY (catId DECIMAL, name VARCHAR(256), parent DECIMAL, CONSTRAINT PK_CATEGORYENTITY PRIMARY KEY ())])]
15:34:40,013 INFO [URLDeploymentScanner] Started
15:34:40,125 INFO [MainDeployer] Deployed package: file:/usr/jboss/jboss-3.2.0/server/default/conf/jboss-service.xml
Where might the extra token be coming from, or is this an indication of a configurtion error? TIA.
Jim
check your primary key declaration for the category entity, the SQL clause shows the PK constraint as empty (should be 'catId' ?)