File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes javax.ejb.CreateException: Error checking if entity exists Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "javax.ejb.CreateException: Error checking if entity exists" Watch "javax.ejb.CreateException: Error checking if entity exists" New topic
Author

javax.ejb.CreateException: Error checking if entity exists

alec stewart stewart
Ranch Hand

Joined: Dec 23, 2003
Posts: 71
hi all
i have a table in mssql server2000 with an identity column
i am using cmp and my server is jboss 3.2.3
now when i am trying to crrate a record it gives me the following error
javax.ejb.CreateException: Error checking if entity exists:com.jnetdirect.jsql.x: Line 1: Incorrect syntax near 'WHERE'.

my ejb-jar.xml file is thus
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC
"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
"http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<description>Teste and Story</description>
<display-name>Teste and Story</display-name>
<enterprise-beans>
<entity>
<display-name>Department Entity CMP Bean</display-name>
<ejb-name>Department</ejb-name>
<unknown-pk>
<unknown-pk-class>java.lang.Integer</unknown-pk-class>
<column-name>depId</column-name>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
<auto-increment/>
</unknown-pk>

<home>masters.department.DepartmentHome</home>
<remote>masters.department.Department</remote>
<ejb-class>masters.department.DepartmentBean</ejb-class>
<reentrant>True</reentrant>
<persistence-type>Container</persistence-type>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>department</abstract-schema-name>
<prim-key-class>java.lang.Integer</prim-key-class>
<cmp-field><field-name>DepName</field-name></cmp-field>


</entity>

<resource-ref> <description>Default Database Connection</description><res-ref-name>jdbc/TestDS</res-ref-name><res-type>javax.sql.DataSource</res-type><res-auth>Container</res-auth> </resource-ref>
</enterprise-beans>



<assembly-descriptor >
<container-transaction>
<method>
<ejb-name>Story</ejb-name>
<method-name>*</method-name>
</method>

<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor >


</ejb-jar>



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javax.ejb.CreateException: Error checking if entity exists