1 Reply Latest reply on Feb 23, 2006 2:44 PM by yantriki

    JBoss 4.0.4RC1 : Tables not found in database

      When I deploy my application I get the following message. However when I check the database I don't see the tables in the database.

      The first time I tried to deploy the application there were a few tables created, but after that on subsequent deployment I am not getting any tables created in database.

      I am using MSDE as database. Appreciate any insight into the problem.

      14:31:59,625 INFO [EARDeployer] Init J2EE application: file:/F:/java/jboss/jboss-4.0.4RC1/server/default/deploy/corview.ear
      14:32:01,703 INFO [Ejb3AnnotationHandler] found EJB3: ejbName=SecurityManagerBean, class=org.vss.ejb3.sb.SecurityManagerBean, type=STATELESS
      14:32:01,796 INFO [Ejb3Deployment] EJB3 deployment time took: 484
      14:32:01,906 FATAL [PersistenceXmlLoader] ccor JTA
      14:32:01,921 INFO [Ejb3Deployment] EJB3 deployment time took: 93
      14:32:02,078 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:service=EJB3,ear=corview.ear,jar=corview.ejb3,name=SecurityManagerBean with dependencies:
      14:32:02,078 INFO [JmxKernelAbstraction] persistence.units:ear=corview.ear.ear,unitName=ccor
      14:32:02,093 INFO [EJB3Deployer] Deployed: file:/F:/java/jboss/jboss-4.0.4RC1/server/default/tmp/deploy/tmp1134corview.ear-contents/corview.ejb3
      14:32:02,093 INFO [JmxKernelAbstraction] installing MBean: persistence.units:ear=corview.ear.ear,unitName=ccor with dependencies:
      14:32:02,093 INFO [JmxKernelAbstraction] jboss.jca:name=corviewDS,service=ManagedConnectionFactory
      14:32:02,250 INFO [Environment] Hibernate 3.1.2
      14:32:02,265 INFO [Environment] hibernate.properties not found
      14:32:02,281 INFO [Environment] using CGLIB reflection optimizer
      14:32:02,281 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
      14:32:02,578 INFO [Ejb3Configuration] found EJB3 Entity bean: org.vss.ejb3.eb.Audit
      14:32:02,593 INFO [Ejb3Configuration] found EJB3 Entity bean: org.vss.ejb3.eb.ConnectionPort
      14:32:02,593 INFO [Ejb3Configuration] found EJB3 Entity bean: org.vss.ejb3.eb.ElementType
      14:32:02,593 INFO [Ejb3Configuration] found EJB3 Entity bean: org.vss.ejb3.eb.Module
      14:32:02,593 INFO [Ejb3Configuration] found EJB3 Entity bean: org.vss.ejb3.eb.ModuleType
      14:32:02,609 INFO [Ejb3Configuration] found EJB3 Entity bean: org.vss.ejb3.eb.NetworkElement
      14:32:02,609 INFO [Ejb3Configuration] found EJB3 Entity bean: org.vss.ejb3.eb.Role
      14:32:02,609 INFO [Ejb3Configuration] found EJB3 Entity bean: org.vss.ejb3.eb.Service
      14:32:02,609 INFO [Ejb3Configuration] found EJB3 Entity bean: org.vss.ejb3.eb.Trap
      14:32:02,609 INFO [Ejb3Configuration] found EJB3 Entity bean: org.vss.ejb3.eb.TrapsDetail
      14:32:02,609 INFO [Ejb3Configuration] found EJB3 @Embeddable: org.vss.ejb3.eb.TrapsDetailPK
      14:32:02,625 INFO [Ejb3Configuration] found EJB3 Entity bean: org.vss.ejb3.eb.User
      14:32:02,812 INFO [AnnotationBinder] Binding entity from annotated class: org.vss.ejb3.eb.ElementType
      14:32:02,968 INFO [EntityBinder] Bind entity org.vss.ejb3.eb.ElementType on table ElementType
      14:32:03,140 INFO [AnnotationBinder] Binding entity from annotated class: org.vss.ejb3.eb.ModuleType
      14:32:03,140 INFO [EntityBinder] Bind entity org.vss.ejb3.eb.ModuleType on table ModuleType
      14:32:03,281 INFO [AnnotationBinder] Binding entity from annotated class: org.vss.ejb3.eb.NetworkElement
      14:32:03,281 INFO [EntityBinder] Bind entity org.vss.ejb3.eb.NetworkElement on table NetworkElement
      14:32:03,281 INFO [AnnotationBinder] Binding entity from annotated class: org.vss.ejb3.eb.Module
      14:32:03,281 INFO [EntityBinder] Bind entity org.vss.ejb3.eb.Module on table Module
      14:32:03,312 INFO [AnnotationBinder] Binding entity from annotated class: org.vss.ejb3.eb.ConnectionPort
      14:32:03,312 INFO [EntityBinder] Bind entity org.vss.ejb3.eb.ConnectionPort on table ConnectionPort
      14:32:03,343 INFO [AnnotationBinder] Binding entity from annotated class: org.vss.ejb3.eb.Service
      14:32:03,343 INFO [EntityBinder] Bind entity org.vss.ejb3.eb.Service on table Service
      14:32:03,359 INFO [AnnotationBinder] Binding entity from annotated class: org.vss.ejb3.eb.Trap
      14:32:03,359 INFO [EntityBinder] Bind entity org.vss.ejb3.eb.Trap on table Trap
      14:32:03,359 INFO [AnnotationBinder] Binding entity from annotated class: org.vss.ejb3.eb.TrapsDetail
      14:32:03,359 WARN [AnnotationBinder] Root entity should not hold an PrimaryKeyJoinColum(s), will be ignored
      14:32:03,359 INFO [EntityBinder] Bind entity org.vss.ejb3.eb.TrapsDetail on table TrapsDetail
      14:32:03,390 INFO [AnnotationBinder] Binding entity from annotated class: org.vss.ejb3.eb.Role
      14:32:03,406 INFO [QueryBinder] Binding Named query: getRole => select Object(r) from Role r where roleID = :roleID
      14:32:03,406 INFO [EntityBinder] Bind entity org.vss.ejb3.eb.Role on table Roles
      14:32:03,406 INFO [AnnotationBinder] Binding entity from annotated class: org.vss.ejb3.eb.User
      14:32:03,406 INFO [QueryBinder] Binding Named query: loginQuery => select Object(u) from User u where loginID = :loginID
      14:32:03,406 INFO [EntityBinder] Bind entity org.vss.ejb3.eb.User on table Users
      14:32:03,421 INFO [AnnotationBinder] Binding entity from annotated class: org.vss.ejb3.eb.Audit
      14:32:03,421 INFO [EntityBinder] Bind entity org.vss.ejb3.eb.Audit on table Audit
      14:32:03,671 INFO [CollectionBinder] Mapping collection: org.vss.ejb3.eb.ModuleType.modules_of_type -> Module
      14:32:03,671 INFO [CollectionBinder] Mapping collection: org.vss.ejb3.eb.NetworkElement.modules -> Module
      14:32:03,671 INFO [CollectionBinder] Mapping collection: org.vss.ejb3.eb.NetworkElement.audit -> Audit
      14:32:03,671 INFO [CollectionBinder] Mapping collection: org.vss.ejb3.eb.Module.ports -> ConnectionPort
      14:32:04,328 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
      14:32:04,343 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
      14:32:04,906 INFO [SettingsFactory] RDBMS: Microsoft SQL Server, version: Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
       Dec 17 2002 14:22:05
       Copyright (c) 1988-2003 Microsoft Corporation
       Desktop Engine on Windows NT 5.1 (Build 2600: Service Pack 2)
      
      14:32:04,906 INFO [SettingsFactory] JDBC driver: SQLServer, version: 2.2.0022
      14:32:04,984 INFO [Dialect] Using dialect: org.hibernate.dialect.SQLServerDialect
      14:32:05,015 INFO [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
      14:32:05,015 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
      14:32:05,031 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
      14:32:05,031 INFO [SettingsFactory] Automatic flush during beforeCompletion(): enabled
      14:32:05,031 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
      14:32:05,031 INFO [SettingsFactory] Scrollable result sets: enabled
      14:32:05,031 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
      14:32:05,031 INFO [SettingsFactory] Connection release mode: after_statement
      14:32:05,031 INFO [SettingsFactory] Default batch fetch size: 1
      14:32:05,031 INFO [SettingsFactory] Generate SQL with comments: disabled
      14:32:05,031 INFO [SettingsFactory] Order SQL updates by primary key: disabled
      14:32:05,046 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
      14:32:05,046 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
      14:32:05,046 INFO [SettingsFactory] Query language substitutions: {}
      14:32:05,046 INFO [SettingsFactory] Second-level cache: enabled
      14:32:05,046 INFO [SettingsFactory] Query cache: disabled
      14:32:05,046 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
      14:32:05,062 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
      14:32:05,062 INFO [SettingsFactory] Structured second-level cache entries: disabled
      14:32:05,078 INFO [SettingsFactory] Statistics: disabled
      14:32:05,078 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
      14:32:05,078 INFO [SettingsFactory] Default entity-mode: pojo
      14:32:05,515 INFO [SessionFactoryImpl] building session factory
      14:32:06,625 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
      14:32:06,625 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      14:32:08,265 INFO [EJB3Deployer] Deployed: file:/F:/java/jboss/jboss-4.0.4RC1/server/default/tmp/deploy/tmp1134corview.ear-contents/corview.par
      14:32:08,296 INFO [TomcatDeployer] deploy, ctxPath=/corview, warUrl=.../tmp/deploy/tmp1134corview.ear-contents/corview-exp.war/
      14:32:08,781 INFO [SecurityContextFilter] The Login module is set to: corview-client
      14:32:08,781 INFO [LoggedInFilter] Context Root of the application is: /corview
      14:32:09,968 INFO [TilesPlugin] Tiles definition factory loaded for module ''.
      14:32:09,968 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validator-rules.xml'
      14:32:09,984 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validation.xml'
      14:32:10,921 INFO [JBossCacheManager] init(): replicationGranularity_ is 0 and invaldateSessionPolicy is 2
      14:32:10,953 ERROR [JBossCacheService] jboss.cache:service=TomcatClusteringCache service to Tomcat clustering not found
      14:32:10,953 ERROR [JBossCacheManager] JBossCacheService to Tomcat clustering not found
      14:32:10,953 ERROR [TomcatDeployer] Failed to setup clustering, clustering disabled
      14:32:11,046 INFO [EARDeployer] Started J2EE application: file:/F:/java/jboss/jboss-4.0.4RC1/server/default/deploy/corview.ear
      


      My META-INF/persistence.xml file looks like this:
      <persistence>
       <persistence-unit name="ccor">
       <jta-data-source>java:/corviewDS</jta-data-source>
       <class>org.vss.ejb3.eb.ElementType</class>
       <class>org.vss.ejb3.eb.ModuleType</class>
       <class>org.vss.ejb3.eb.NetworkElement</class>
       <class>org.vss.ejb3.eb.Module</class>
       <class>org.vss.ejb3.eb.ConnectionPort</class>
       <class>org.vss.ejb3.eb.PORT_TYPE</class>
       <class>org.vss.ejb3.eb.Service</class>
      
       <class>org.vss.ejb3.eb.Trap</class>
       <class>org.vss.ejb3.eb.TrapsDetail</class>
      
       <class>org.vss.ejb3.eb.Role</class>
       <class>org.vss.ejb3.eb.User</class>
      
       <class>org.vss.ejb3.eb.Audit</class>
       </persistence-unit>
      </persistence>
      


        • 1. Re: JBoss 4.0.4RC1 : Tables not found in database

          When I use hypersonic default database with the following persistence.xml, I see all the table created in the database:

          <persistence>
           <persistence-unit name="ccor">
           <jta-data-source>java:/DefaultDS</jta-data-source>
           <class>org.vss.ejb3.eb.ElementType</class>
           <class>org.vss.ejb3.eb.ModuleType</class>
           <class>org.vss.ejb3.eb.NetworkElement</class>
           <class>org.vss.ejb3.eb.Module</class>
           <class>org.vss.ejb3.eb.ConnectionPort</class>
           <class>org.vss.ejb3.eb.PORT_TYPE</class>
           <class>org.vss.ejb3.eb.Service</class>
          
           <class>org.vss.ejb3.eb.Trap</class>
           <class>org.vss.ejb3.eb.TrapsDetail</class>
          
           <class>org.vss.ejb3.eb.Role</class>
           <class>org.vss.ejb3.eb.User</class>
          
           <class>org.vss.ejb3.eb.Audit</class>
           <properties>
           <property name="hibernate.dialect"
           value="org.hibernate.dialect.HSQLDialect"/>
           <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
           </properties>
           </persistence-unit>
          </persistence>