0 Replies Latest reply on Mar 9, 2011 10:22 PM by null null

    openjpa under jboss6

    null null Newbie

      hi all

           i want to use openjpa in jboss6, i download openjpa 2.1.0 and copy jar into jboss6 server/lib.

       

      my persistence.xml

       

      <?xml version="1.0" encoding="UTF-8"?>

      <persistence xmlns="http://java.sun.com/xml/ns/persistence"

                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"

                   version="1.0">

          <persistence-unit name="em" transaction-type="JTA">

              <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>

              <jta-data-source>java:/DefaultDS</jta-data-source>

              <jar-file>../zjfwsys.jar</jar-file>

              <jar-file>../zjfwEJB.jar</jar-file>

              <properties>

                  <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>

                  <property name="openjpa.RuntimeUnenhancedClasses" value="supported"/>

                  <property name="openjpa.Log" value="DefaultLevel=TRACE, Tool=TRACE"/>

              </properties>

          </persistence-unit>

      </persistence>

       

      when start jboss

       

      11:17:41,924 INFO  [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=zjfw.ear/lib/zjbase.jar#em

      11:17:42,133 ERROR [STDERR] 5  em  TRACE  [Thread-2] openjpa.Runtime - Setting the following properties from "?" into configuration: {hibernate.ejb.resource_scanner=org.jboss.as.jpa.scanner.HackTLScanner, hibernate.cache.region_prefix=persistence.unit:unitName=zjfw.ear/lib/zjbase.jar#em, hibernate.bytecode.use_reflection_optimizer=false, openjpa.RuntimeUnenhancedClasses=supported, javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl, hibernate.jacc.ctx.id=zjbase.jar, openjpa.Log=DefaultLevel=TRACE, Tool=TRACE, hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup, openjpa.Id=em, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.session_factory_name=persistence.unit:unitName=zjfw.ear/lib/zjbase.jar#em, openjpa.ConnectionFactoryMode=managed, openjpa.ConnectionFactory=org.jboss.resource.adapter.jdbc.WrapperDataSource@66447828, openjpa.jdbc.SynchronizeMappings=buildSchema(ForeignKeys=true), hibernate.jndi.java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces, hibernate.bytecode.provider=javassist, openjpa.TransactionMode=managed, openjpa.MetaDataFactory=jpa(URLs=vfs:/D:/jboss-6.0.0.Final/server/default/deploy/zjfw.ear/lib/zjbase.jar/;vfs:/D:/jboss-6.0.0.Final/server/default/deploy/zjfw.ear/zjfwEJB.jar/;vfs:/D:/jboss-6.0.0.Final/server/default/deploy/zjfw.ear/zjfwsys.jar/), openjpa.ClassResolver=org.apache.openjpa.persistence.PersistenceUnitInfoImpl$ClassResolverImpl@4292b9bc, hibernate.jndi.java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory}

       

      11:17:42,141 ERROR [STDERR] 13  em  TRACE  [Thread-2] openjpa.Runtime - No cache marshaller found for id org.apache.openjpa.conf.MetaDataCacheMaintenance.

       

      11:17:42,234 ERROR [STDERR] 106  em  TRACE  [Thread-2] openjpa.MetaData - Scanning URL "vfs:/D:/jboss-6.0.0.Final/server/default/deploy/zjfw.ear/lib/zjbase.jar/" for persistent types.

       

      11:17:42,242 ERROR [STDERR] 114  em  TRACE  [Thread-2] openjpa.MetaData - Scan of "vfs:/D:/jboss-6.0.0.Final/server/default/deploy/zjfw.ear/lib/zjbase.jar/" found persistent types [].

       

      11:17:42,242 ERROR [STDERR] 114  em  TRACE  [Thread-2] openjpa.MetaData - Skipping persistent type location association for location "vfs:/D:/jboss-6.0.0.Final/server/default/deploy/zjfw.ear/lib/zjbase.jar/" since it is a directory.

       

      11:17:42,242 ERROR [STDERR] 114  em  TRACE  [Thread-2] openjpa.MetaData - Scanning URL "vfs:/D:/jboss-6.0.0.Final/server/default/deploy/zjfw.ear/zjfwsys.jar/" for persistent types.

       

      11:17:42,243 ERROR [STDERR] 115  em  TRACE  [Thread-2] openjpa.MetaData - Scan of "vfs:/D:/jboss-6.0.0.Final/server/default/deploy/zjfw.ear/zjfwsys.jar/" found persistent types [].

       

      11:17:42,243 ERROR [STDERR] 115  em  TRACE  [Thread-2] openjpa.MetaData - Skipping persistent type location association for location "vfs:/D:/jboss-6.0.0.Final/server/default/deploy/zjfw.ear/zjfwsys.jar/" since it is a directory.

       

      11:17:42,243 ERROR [STDERR] 115  em  TRACE  [Thread-2] openjpa.MetaData - Scanning URL "vfs:/D:/jboss-6.0.0.Final/server/default/deploy/zjfw.ear/zjfwEJB.jar/" for persistent types.

       

      11:17:42,244 ERROR [STDERR] 116  em  TRACE  [Thread-2] openjpa.MetaData - Scan of "vfs:/D:/jboss-6.0.0.Final/server/default/deploy/zjfw.ear/zjfwEJB.jar/" found persistent types [].

       

      11:17:42,244 ERROR [STDERR] 116  em  TRACE  [Thread-2] openjpa.MetaData - Skipping persistent type location association for location "vfs:/D:/jboss-6.0.0.Final/server/default/deploy/zjfw.ear/zjfwEJB.jar/" since it is a directory.

       

      11:17:42,244 ERROR [STDERR] 116  em  TRACE  [Thread-2] openjpa.MetaData - Scanning resource "META-INF/orm.xml" for persistent types.

       

      11:17:42,251 ERROR [STDERR] 122  em  TRACE  [Thread-2] openjpa.MetaData - The persistent unit root url is "null"

       

      11:17:42,251 ERROR [STDERR] 123  em  TRACE  [Thread-2] openjpa.MetaData - parsePersistentTypeNames() found [].

       

      11:17:42,251 ERROR [STDERR] 123  em  TRACE  [Thread-2] openjpa.MetaData - Found 0 classes with metadata in 24 milliseconds.

       

      11:17:42,256 ERROR [STDERR] 128  em  INFO   [Thread-2] openjpa.Enhance - You have enabled runtime enhancement, but have not specified the set of persistent classes.  OpenJPA must look for metadata for every loaded class, which might increase class load times significantly.

       

      11:17:42,311 ERROR [STDERR] 0  em  TRACE  [Thread-2] openjpa.Runtime - Setting the following properties from "?" into configuration: {hibernate.ejb.resource_scanner=org.jboss.as.jpa.scanner.HackTLScanner, openjpa.BrokerFactory=jdbc, hibernate.cache.region_prefix=persistence.unit:unitName=zjfw.ear/lib/zjbase.jar#em, hibernate.bytecode.use_reflection_optimizer=false, openjpa.RuntimeUnenhancedClasses=supported, javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl, hibernate.jacc.ctx.id=zjbase.jar, openjpa.Log=DefaultLevel=TRACE, Tool=TRACE, hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup, openjpa.Id=em, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.session_factory_name=persistence.unit:unitName=zjfw.ear/lib/zjbase.jar#em, openjpa.ConnectionFactoryMode=managed, openjpa.ConnectionFactory=org.jboss.resource.adapter.jdbc.WrapperDataSource@66447828, openjpa.jdbc.SynchronizeMappings=buildSchema(ForeignKeys=true), hibernate.jndi.java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces, hibernate.bytecode.provider=javassist, openjpa.TransactionMode=managed, openjpa.BrokerImpl=non-finalizing, openjpa.MetaDataFactory=jpa(URLs=vfs:/D:/jboss-6.0.0.Final/server/default/deploy/zjfw.ear/lib/zjbase.jar/;vfs:/D:/jboss-6.0.0.Final/server/default/deploy/zjfw.ear/zjfwEJB.jar/;vfs:/D:/jboss-6.0.0.Final/server/default/deploy/zjfw.ear/zjfwsys.jar/), openjpa.ClassResolver=org.apache.openjpa.persistence.PersistenceUnitInfoImpl$ClassResolverImpl@4292b9bc, hibernate.jndi.java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory}

       

      11:17:42,379 ERROR [STDERR] 68  em  TRACE  [Thread-2] openjpa.Runtime - Trying to load javax.validation APIs based on the ValidationMode=AUTO

       

      11:17:42,399 INFO  [DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.

      11:17:42,401 ERROR [STDERR] 90  em  INFO   [Thread-2] openjpa.Runtime - OpenJPA dynamically loaded a validation provider.

       

      11:17:42,435 ERROR [STDERR] 124  em  TRACE  [Thread-2] openjpa.Runtime - org.apache.openjpa.persistence.PersistenceProviderImpl@371e88fb creating container org.apache.openjpa.persistence.EntityManagerFactoryImpl@35b33302 for PU em.

       

       

      after jboss started, i can't found table in db, can someone help me ?

      thanks very much !