- This topic has 1 reply, 2 voices, and was last updated 21 years, 6 months ago by Scott Anderson.
-
AuthorPosts
-
Tim CareyMemberI’m getting used to the new GA version with XDOCLET support for building
beans (in this case EntityBeans). Anyway, I created a simple bean and used the XDOCLET standard EJB configuration to generate the associated classes and ejb-jar file.
The problem is when I deploy the bean in JBOSS, I get the following:org.jboss.deployment.DeploymentException: Error while creating table; – nested throwable: (java.sql.SQLException: Wrong data type: CONSTRAINT in statement [CREATE TABLE TESTEJBBEAN (, CONSTRAINT PK_TESTEJBBEAN PRIMARY KEY ())])
I noticed in my ejb-jar file I’m missing the cmp-field and primkey-field
<!– Entity Beans –>
<entity >
<description><![CDATA[TestEJBBean EJB]]></description>
<display-name>TestEJBBean</display-name><ejb-name>TestEJBBean</ejb-name>
<home>testEJBPackage.TestEJBBeanHome</home>
<remote>testEJBPackage.TestEJBBeanRemote</remote>
<local-home>testEJBPackage.TestEJBBeanLocalHome</local-home>
<local>testEJBPackage.TestEJBBeanLocal</local><ejb-class>testEJBPackage.TestEJBBeanCMP</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>testEJBPackage.TestEJBBeanPK</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>TestEJBBean</abstract-schema-name><!– Write a file named ejb-finders-TestEJBBean.xml if you want to define extra finders. –>
</entity>Any thoughts?
Thanks,
Tim
Scott AndersonParticipantTim,
You need to be sure you added the appropriate XDoclet tags to your CMP ejb class that specify the primary key class and be sure that the ejbdoclet has been configured to generate the cmp stuff. Also, you need to add the jboss task to the ejbdoclet and configure any Jboss-specific settings.
Detailed information on all the settings are in the XDoclet reference that is in the help system at Help > MyEclipse User Guide > Reference > XDoclet. Also, there is an XDoclet overview section also that goes through how to configure XDoclet for project use.
–Scott
MyEclipse Support -
AuthorPosts