I have successfully deployed a jar file with several
CMP Entity beans using this jbosscmp-jdbc.xml which
references the HyperSonicSQL default data source. 
After deployment inspecting the data source with HSQL
Database Manager shows the tables have all been
created.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD
JBOSSCMP-JDBC 3.0//EN"
"http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_0.dtd";>

<jbosscmp-jdbc>
   <defaults>
     <datasource>java:/DefaultDS</datasource>
     <datasource-mapping>Hypersonic
SQL</datasource-mapping>
   </defaults>
</jbosscmp-jdbc>


After undeploying the jar file I changed the
jbosscmp-jdbc.xml to use a PostgreSQL data source that
has been deployed.  


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD
JBOSSCMP-JDBC 3.0//EN"
"http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_0.dtd";>

<jbosscmp-jdbc>
   <defaults>
     <datasource>java:/PostgresDS</datasource>
    
<datasource-mapping>PostgreSQL</datasource-mapping>
   </defaults>
</jbosscmp-jdbc>


During deployment an entity bean appears to have an
error in the SQL statement it uses create its table. 
A couple other entity beans do successfully create
their tables before this error occurs.  This is the
error:


org.jboss.deployment.DeploymentException: Could not
deploy
file:/D:/projects/jboss-all/build/output/jboss-3.0.0beta2/server/default/deploy/virtualbeans.jar;
- nested throwable is:
org.jboss.deployment.DeploymentException: Error while
creating table;
- nested throwable is: java.sql.SQLException: ERROR: 
CREATE TABLE: attribute
"mailuser_forwardingemailslocal_" duplicated

org.jboss.deployment.DeploymentException: Error while
creating table; - nested throwable is:
java.sql.SQLException: ERROR:  CREATE TABLE: attribute
"mailuser_forwardingemailslocal_" duplicated

java.sql.SQLException: ERROR:  CREATE TABLE: attribute
"mailuser_forwardingemailslocal_" duplicated

This is using SUN JDK 1.3 and April 1st JBoss build.

Is it possible that I need to implement the optional
elements of jbosscmp-jdbc.xml when not using the
default datasource?  Any other ideas on what might be
wrong?

Thanks,
Leon

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to