JBoss 5 + Seam 2.1.1.GA + EAR doesn't always start properly
oberiko.oberiko.gmail.com Apr 25, 2009 10:26 PMHello.
Quite frequently (roughly 1/2 the time) when I start JBoss 5 with a deployed Seam 2.1.1.GA EAR project, the project seems to continue deploying after JBoss is finished starting. This causes all sorts of weirdness, like my EntityManager with a SFSB not be instantiated properly.
The only solution I have found for this is to shutdown JBoss AS, and then restart it (sometime several times). Is there anything I can do to ensure it starts up correctly? I'm using all project defaults.
An example of the output of a failed startup shown below.
** JBOSS CONSOLE **
// Regular stuff
...
16:12:52,210 INFO [ServerImpl] JBoss (Microcontainer) [5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902231221)] Started in 1m:4s:953ms
16:12:54,742 INFO [SessionSpecContainer] Stopping jboss.j2ee:ear=outageManagement-ear.ear,jar=outageManagement-ejb.jar,name=EditOutageBean,service=EJB3
16:12:54,773 INFO [EJBContainer] STOPPED EJB: org.domain.outagemanagement.session.EditOutageBean ejbName: EditOutageBean
16:12:54,820 INFO [PersistenceUnitDeployment] Stopping persistence unit persistence.unit:unitName=outageManagement-ear.ear/outageManagement-ejb.jar#outageManagement
16:12:54,820 INFO [SessionFactoryImpl] closing
16:12:54,820 INFO [SessionFactoryObjectFactory] Unbinding factory from JNDI name: persistence.unit:unitName=outageManagement-ear.ear/outageManagement-ejb.jar#outageManagement
16:12:54,820 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
16:12:54,820 INFO [SessionFactoryObjectFactory] Unbound factory from JNDI name: persistence.unit:unitName=outageManagement-ear.ear/outageManagement-ejb.jar#outageManagement
16:12:54,820 INFO [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=outageManagementDatasource' from JNDI name 'java:outageManagementDatasource'
16:12:54,929 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=outageManagementDatasource' to JNDI name 'java:outageManagementDatasource'
16:12:54,929 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=outageManagement-ear.ear/outageManagement-ejb.jar#outageManagement
16:12:54,945 WARN [Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
16:12:54,945 INFO [AnnotationBinder] Binding entity from annotated class: org.domain.outagemanagement.entity.Equipment
16:12:54,945 INFO [EntityBinder] Bind entity org.domain.outagemanagement.entity.Equipment on table Equipment
16:12:54,945 INFO [AnnotationBinder] Binding entity from annotated class: org.domain.outagemanagement.entity.Outage
16:12:54,945 INFO [EntityBinder] Bind entity org.domain.outagemanagement.entity.Outage on table Outage
16:12:54,945 INFO [AnnotationBinder] Binding entity from annotated class: org.domain.outagemanagement.entity.EquipmentConditionPlan
16:12:54,945 INFO [EntityBinder] Bind entity org.domain.outagemanagement.entity.EquipmentConditionPlan on table EquipmentConditionPlan
16:12:54,945 INFO [CollectionBinder] Mapping collection: org.domain.outagemanagement.entity.Equipment.equipmentConditionPlans -> EquipmentConditionPlan
16:12:54,945 INFO [CollectionBinder] Mapping collection: org.domain.outagemanagement.entity.Outage.equipmentConditionPlans -> EquipmentConditionPlan
16:12:54,960 INFO [HibernateSearchEventListenerRegister] Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
16:12:54,960 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
16:12:54,960 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
16:12:54,976 INFO [SettingsFactory] RDBMS: HSQL Database Engine, version: 1.8.0
16:12:54,976 INFO [SettingsFactory] JDBC driver: HSQL Database Engine Driver, version: 1.8.0
16:12:54,976 INFO [Dialect] Using dialect: org.hibernate.dialect.HSQLDialect
16:12:54,976 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
16:12:54,976 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
16:12:54,976 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
16:12:54,976 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
16:12:54,976 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
16:12:54,976 INFO [SettingsFactory] JDBC batch size: 15
16:12:54,976 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
16:12:54,976 INFO [SettingsFactory] Scrollable result sets: enabled
16:12:54,976 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
16:12:54,976 INFO [SettingsFactory] Connection release mode: auto
16:12:54,976 INFO [SettingsFactory] Default batch fetch size: 1
16:12:54,976 INFO [SettingsFactory] Generate SQL with comments: disabled
16:12:54,976 INFO [SettingsFactory] Order SQL updates by primary key: disabled
16:12:54,976 INFO [SettingsFactory] Order SQL inserts for batching: disabled
16:12:54,976 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
16:12:54,976 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
16:12:54,976 INFO [SettingsFactory] Query language substitutions: {}
16:12:54,976 INFO [SettingsFactory] JPA-QL strict compliance: enabled
16:12:54,976 INFO [SettingsFactory] Second-level cache: enabled
16:12:54,976 INFO [SettingsFactory] Query cache: disabled
16:12:54,976 INFO [SettingsFactory] Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
16:12:54,976 INFO [RegionFactoryCacheProviderBridge] Cache provider: org.hibernate.cache.HashtableCacheProvider
16:12:54,976 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
16:12:54,976 INFO [SettingsFactory] Cache region prefix: persistence.unit:unitName=outageManagement-ear.ear/outageManagement-ejb.jar#outageManagement
16:12:54,976 INFO [SettingsFactory] Structured second-level cache entries: disabled
16:12:54,976 INFO [SettingsFactory] Echoing all SQL to stdout
16:12:54,976 INFO [SettingsFactory] Statistics: disabled
16:12:54,976 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
16:12:54,976 INFO [SettingsFactory] Default entity-mode: pojo
16:12:54,976 INFO [SettingsFactory] Named query checking : enabled
16:12:54,976 INFO [SessionFactoryImpl] building session factory
16:12:54,992 INFO [SessionFactoryObjectFactory] Factory name: persistence.unit:unitName=outageManagement-ear.ear/outageManagement-ejb.jar#outageManagement
16:12:54,992 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
16:12:54,992 INFO [SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.unit:unitName=outageManagement-ear.ear/outageManagement-ejb.jar#outageManagement
16:12:54,992 WARN [SessionFactoryObjectFactory] InitialContext did not implement EventContext
16:12:54,992 INFO [SchemaUpdate] Running hbm2ddl schema update
16:12:54,992 INFO [SchemaUpdate] fetching database metadata
16:12:54,992 INFO [SchemaUpdate] updating schema
16:12:55,007 INFO [TableMetadata] table found: PUBLIC.EQUIPMENT
16:12:55,007 INFO [TableMetadata] columns: [station, type, name, id, version]
16:12:55,007 INFO [TableMetadata] foreign keys: []
16:12:55,007 INFO [TableMetadata] indexes: [sys_idx_46]
16:12:55,007 INFO [TableMetadata] table found: PUBLIC.EQUIPMENTCONDITIONPLAN
16:12:55,007 INFO [TableMetadata] columns: [deratedtomw, outage_id, name, equipment_id, id, version]
16:12:55,007 INFO [TableMetadata] foreign keys: [fkd64f5416d84a4d0b, fkd64f541615ede069]
16:12:55,007 INFO [TableMetadata] indexes: [sys_idx_48, sys_idx_50, sys_idx_54]
16:12:55,007 INFO [TableMetadata] table found: PUBLIC.OUTAGE
16:12:55,007 INFO [TableMetadata] columns: [startdate, code, enddate, name, id, version]
16:12:55,007 INFO [TableMetadata] foreign keys: []
16:12:55,007 INFO [TableMetadata] indexes: [sys_idx_52]
16:12:55,007 INFO [SchemaUpdate] schema update complete
16:12:55,007 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
16:12:55,070 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=outageManagement-ear.ear,jar=outageManagement-ejb.jar,name=EditOutageBean,service=EJB3
16:12:55,085 INFO [EJBContainer] STARTED EJB: org.domain.outagemanagement.session.EditOutageBean ejbName: EditOutageBean
16:12:55,101 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
outageManagement-ear/EditOutageBean/local - EJB3.x Default Local Business Interface
outageManagement-ear/EditOutageBean/local-org.domain.outagemanagement.session.EditOutage - EJB3.x Local Business Interface
Quite frequently (roughly 1/2 the time) when I start JBoss 5 with a deployed Seam 2.1.1.GA EAR project, the project seems to continue deploying after JBoss is finished starting. This causes all sorts of weirdness, like my EntityManager with a SFSB not be instantiated properly.
The only solution I have found for this is to shutdown JBoss AS, and then restart it (sometime several times). Is there anything I can do to ensure it starts up correctly? I'm using all project defaults.
An example of the output of a failed startup shown below.
** JBOSS CONSOLE **
// Regular stuff
...
16:12:52,210 INFO [ServerImpl] JBoss (Microcontainer) [5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902231221)] Started in 1m:4s:953ms
16:12:54,742 INFO [SessionSpecContainer] Stopping jboss.j2ee:ear=outageManagement-ear.ear,jar=outageManagement-ejb.jar,name=EditOutageBean,service=EJB3
16:12:54,773 INFO [EJBContainer] STOPPED EJB: org.domain.outagemanagement.session.EditOutageBean ejbName: EditOutageBean
16:12:54,820 INFO [PersistenceUnitDeployment] Stopping persistence unit persistence.unit:unitName=outageManagement-ear.ear/outageManagement-ejb.jar#outageManagement
16:12:54,820 INFO [SessionFactoryImpl] closing
16:12:54,820 INFO [SessionFactoryObjectFactory] Unbinding factory from JNDI name: persistence.unit:unitName=outageManagement-ear.ear/outageManagement-ejb.jar#outageManagement
16:12:54,820 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
16:12:54,820 INFO [SessionFactoryObjectFactory] Unbound factory from JNDI name: persistence.unit:unitName=outageManagement-ear.ear/outageManagement-ejb.jar#outageManagement
16:12:54,820 INFO [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=outageManagementDatasource' from JNDI name 'java:outageManagementDatasource'
16:12:54,929 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=outageManagementDatasource' to JNDI name 'java:outageManagementDatasource'
16:12:54,929 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=outageManagement-ear.ear/outageManagement-ejb.jar#outageManagement
16:12:54,945 WARN [Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
16:12:54,945 INFO [AnnotationBinder] Binding entity from annotated class: org.domain.outagemanagement.entity.Equipment
16:12:54,945 INFO [EntityBinder] Bind entity org.domain.outagemanagement.entity.Equipment on table Equipment
16:12:54,945 INFO [AnnotationBinder] Binding entity from annotated class: org.domain.outagemanagement.entity.Outage
16:12:54,945 INFO [EntityBinder] Bind entity org.domain.outagemanagement.entity.Outage on table Outage
16:12:54,945 INFO [AnnotationBinder] Binding entity from annotated class: org.domain.outagemanagement.entity.EquipmentConditionPlan
16:12:54,945 INFO [EntityBinder] Bind entity org.domain.outagemanagement.entity.EquipmentConditionPlan on table EquipmentConditionPlan
16:12:54,945 INFO [CollectionBinder] Mapping collection: org.domain.outagemanagement.entity.Equipment.equipmentConditionPlans -> EquipmentConditionPlan
16:12:54,945 INFO [CollectionBinder] Mapping collection: org.domain.outagemanagement.entity.Outage.equipmentConditionPlans -> EquipmentConditionPlan
16:12:54,960 INFO [HibernateSearchEventListenerRegister] Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
16:12:54,960 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
16:12:54,960 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
16:12:54,976 INFO [SettingsFactory] RDBMS: HSQL Database Engine, version: 1.8.0
16:12:54,976 INFO [SettingsFactory] JDBC driver: HSQL Database Engine Driver, version: 1.8.0
16:12:54,976 INFO [Dialect] Using dialect: org.hibernate.dialect.HSQLDialect
16:12:54,976 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
16:12:54,976 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
16:12:54,976 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
16:12:54,976 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
16:12:54,976 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
16:12:54,976 INFO [SettingsFactory] JDBC batch size: 15
16:12:54,976 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
16:12:54,976 INFO [SettingsFactory] Scrollable result sets: enabled
16:12:54,976 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
16:12:54,976 INFO [SettingsFactory] Connection release mode: auto
16:12:54,976 INFO [SettingsFactory] Default batch fetch size: 1
16:12:54,976 INFO [SettingsFactory] Generate SQL with comments: disabled
16:12:54,976 INFO [SettingsFactory] Order SQL updates by primary key: disabled
16:12:54,976 INFO [SettingsFactory] Order SQL inserts for batching: disabled
16:12:54,976 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
16:12:54,976 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
16:12:54,976 INFO [SettingsFactory] Query language substitutions: {}
16:12:54,976 INFO [SettingsFactory] JPA-QL strict compliance: enabled
16:12:54,976 INFO [SettingsFactory] Second-level cache: enabled
16:12:54,976 INFO [SettingsFactory] Query cache: disabled
16:12:54,976 INFO [SettingsFactory] Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
16:12:54,976 INFO [RegionFactoryCacheProviderBridge] Cache provider: org.hibernate.cache.HashtableCacheProvider
16:12:54,976 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
16:12:54,976 INFO [SettingsFactory] Cache region prefix: persistence.unit:unitName=outageManagement-ear.ear/outageManagement-ejb.jar#outageManagement
16:12:54,976 INFO [SettingsFactory] Structured second-level cache entries: disabled
16:12:54,976 INFO [SettingsFactory] Echoing all SQL to stdout
16:12:54,976 INFO [SettingsFactory] Statistics: disabled
16:12:54,976 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
16:12:54,976 INFO [SettingsFactory] Default entity-mode: pojo
16:12:54,976 INFO [SettingsFactory] Named query checking : enabled
16:12:54,976 INFO [SessionFactoryImpl] building session factory
16:12:54,992 INFO [SessionFactoryObjectFactory] Factory name: persistence.unit:unitName=outageManagement-ear.ear/outageManagement-ejb.jar#outageManagement
16:12:54,992 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
16:12:54,992 INFO [SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.unit:unitName=outageManagement-ear.ear/outageManagement-ejb.jar#outageManagement
16:12:54,992 WARN [SessionFactoryObjectFactory] InitialContext did not implement EventContext
16:12:54,992 INFO [SchemaUpdate] Running hbm2ddl schema update
16:12:54,992 INFO [SchemaUpdate] fetching database metadata
16:12:54,992 INFO [SchemaUpdate] updating schema
16:12:55,007 INFO [TableMetadata] table found: PUBLIC.EQUIPMENT
16:12:55,007 INFO [TableMetadata] columns: [station, type, name, id, version]
16:12:55,007 INFO [TableMetadata] foreign keys: []
16:12:55,007 INFO [TableMetadata] indexes: [sys_idx_46]
16:12:55,007 INFO [TableMetadata] table found: PUBLIC.EQUIPMENTCONDITIONPLAN
16:12:55,007 INFO [TableMetadata] columns: [deratedtomw, outage_id, name, equipment_id, id, version]
16:12:55,007 INFO [TableMetadata] foreign keys: [fkd64f5416d84a4d0b, fkd64f541615ede069]
16:12:55,007 INFO [TableMetadata] indexes: [sys_idx_48, sys_idx_50, sys_idx_54]
16:12:55,007 INFO [TableMetadata] table found: PUBLIC.OUTAGE
16:12:55,007 INFO [TableMetadata] columns: [startdate, code, enddate, name, id, version]
16:12:55,007 INFO [TableMetadata] foreign keys: []
16:12:55,007 INFO [TableMetadata] indexes: [sys_idx_52]
16:12:55,007 INFO [SchemaUpdate] schema update complete
16:12:55,007 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
16:12:55,070 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=outageManagement-ear.ear,jar=outageManagement-ejb.jar,name=EditOutageBean,service=EJB3
16:12:55,085 INFO [EJBContainer] STARTED EJB: org.domain.outagemanagement.session.EditOutageBean ejbName: EditOutageBean
16:12:55,101 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
outageManagement-ear/EditOutageBean/local - EJB3.x Default Local Business Interface
outageManagement-ear/EditOutageBean/local-org.domain.outagemanagement.session.EditOutage - EJB3.x Local Business Interface