hi all,
 
I am trying to using postgreSQL 7.3.2 with JBoss 3.0.6 on Win2K JDK1.4.1 b2 but I run into some problems:
 
1. create table failed. I have tried the code with the default Database setting and it works fine, when I switch to PostgreSQL, the problem pop up.
 
2003-04-02 12:30:58,796 WARN  [org.jboss.system.ServiceController] Problem starting service jboss.j2ee:jndiName=Artist,service=EJB
org.jboss.deployment.DeploymentException: Error while creating table; - nested throwable: (java.sql.SQLException: ERROR:  CREATE TABLE: attribute "artist_id" duplicated
)
 at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.createTable(JDBCStartCommand.java:175)
 at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:84)
 at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:457)
 at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:369)
 at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:198)
 at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376)
 at org.jboss.ejb.Container.invoke(Container.java:756)
 at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
 at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)
 at $Proxy4.start(Unknown Source)
 at org.jboss.system.ServiceController.start(ServiceController.java:413)
 at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
............
 
Following is my configrations:
 
//standardjbosscmp-jdbc.xml
<jbosscmp-jdbc>
   <defaults>
      <datasource>java:/DefaultDS</datasource>
     <datasource-mapping>PostgreSQL</datasource-mapping>
....
===========================================================
 
//postgres-services.xml
 <attribute name="SecurityDomainJndiName">PostgresDbRealm</attribute>
    <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->
      <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=PostgresDS">
<!-- ========== Set the JndiName ======================= -->
        <attribute name="JndiName">DefaultDS</attribute>
        <attribute name="ManagedConnectionFactoryProperties">
 
2. How can I see the jboss generated sql statements ?
 
I have studied some tutorials and have add the following lines to the log4j.xml but I still can't get detail informaion from the log or the console, anyone got any idea ?
 
  <!--
     | An example of enabling the custom TRACE level priority that is used
     | by the JBoss internals to diagnose low level details. This example
     | turns on TRACE level msgs for the org.jboss.ejb.plugins package and its
     | subpackages. This will produce A LOT of logging output.
       If you use replace the log4j 1.2 jar with a 1.1.3 jar you will need to
       change this from XLevel to XPriority.
  -->
  <category name="org.jboss.system">
    <priority value="TRACE" class="org.jboss.logging.XLevel"/>
  </category>
 <category name="org.jboss.ejb.plugins">
    <priority value="TRACE" class="org.jboss.logging.XLevel"/>
  </category>
 
 
regards
 

Reply via email to