Closed glassfishrobot closed 13 years ago
@glassfishrobot Commented @honghzzhang said: Yes, this message does not help much (except we know NPE happened at somewhere of the deployment process). As it's related to hibernate, I am going to reassign to Mitesh to see if he has some good suggestions to debug this
@glassfishrobot Commented @tjquinno said: Can you share your application with us, either publicly by attaching it to this issue or privately by sending it to us through e-mail?
It will be far easier for us to help if we have a way of duplicating the problem.
@glassfishrobot Commented corneil.duplessis said: Unfortunately I can't share the application at this time.
First thing that would help is logging.properties settings that will provide more info.
I did have the application deployed and working fine for a while and then I added an EJB module with an MDB and Session Bean. I do believe they are configured properly and I can share some info regarding the deployment descriptors etc. I do not use @PersistenceContext but I use Spring @Autowire for EntityManagerFactor and EntityManager
**ejb-jar.xml**<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
version="3.1">
<display-name>XXXX-events</display-name>
<enterprise-beans>
<message-driven>
<display-name>External Event Listener</display-name>
<ejb-name>externalEventListener</ejb-name>
<ejb-class>com.XXXXX.el.mdb.ExternalEventsListener</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>XXXXX.EVENTS.QUEUE</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>externalEventListener</ejb-name>
<method-name>onMessage</method-name>
<method-params>
<method-param>javax.jms.Message</method-param>
</method-params>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
**glassfish-ejb-jar.xml**<!DOCTYPE glassfish-ejb-jar PUBLIC "-//GlassFish.org//
DTD GlassFish Application Server 3.1 EJB 3.1//EN"
"http://glassfish.org/dtds/glassfish-ejb-jar_3_1-1.dtd">
<glassfish-ejb-jar>
<enterprise-beans>
<ejb>
<ejb-name>externalEventListener</ejb-name>
<jndi-name>ExternalEvents</jndi-name>
<mdb-connection-factory>
<jndi-name>EventReadQF</jndi-name>
</mdb-connection-factory>
<mdb-resource-adapter>
<resource-adapter-mid>activemq-rar</resource-adapter-mid>
<activation-config>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>XXXXX.EVENTS.QUEUE</activation-config-property-value>
</activation-config-property>
</activation-config>
</mdb-resource-adapter>
</ejb>
</enterprise-beans>
</glassfish-ejb-jar>
**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_2_0.xsd"
version="2.0">
<persistence-unit name="XXXX" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>jdbc/XXXXdb</jta-data-source>
<mapping-file>META-INF/orm.xml</mapping-file>
<properties>
<property name="hibernate.default_schema" value="MIMACS" />
<property name="hibernate.ejb.naming_strategy" value="com.XXXXX.dl.hibernate.UpperCaseNamingStrategy" /> <!-- ensure UPPER_CASE from upperCase -->
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.SunONETransactionManagerLookup" />
<property name="hibernate.hbm2ddl.auto" value="validate" />
</properties>
</persistence-unit>
</persistence>
**spring-data-jpa.xml**<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
<!-- context:load-time-weaver / -->
<!-- db.properties should be included in global property placeholder -->
<jee:jndi-lookup id="dataSource" jndi-name="jdbc/XXXXXdb" cache="true" resource-ref="true" lookup-on-startup="false" proxy-interface="javax.sql.DataSource" />
<bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" id="entityManagerFactory">
<property name="dataSource" ref="dataSource" />
<property name="persistenceUnitName" value="XXXXX" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="${jpa.showsql}" />
<property name="generateDdl" value="false" />
<property name="database" value="${jpa.database}" />
<property name="databasePlatform" value="${jpa.platform}" />
</bean>
</property>
<property name="jpaProperties">
<props>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.max_fetch_depth">4</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.region.factory_class">net.sf.ehcache.hibernate.EhCacheRegionFactory</prop>
<prop key="hibernate.cache.provider_configuration_file_resource_path">${jpa.ehcache.xml}</prop>
</props>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="nestedTransactionAllowed" value="true" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager" />
<context:annotation-config />
</beans>
@glassfishrobot Commented corneil.duplessis said: There has to be some weird problem that was fixed in ogs-3.1.1-ml.zip Today I did the following:
@glassfishrobot Commented mm110999 said: Closing this as "Cannot Reproduce" based on your comment above. Please reopen with more details if you get the issue again
@glassfishrobot Commented corneil.duplessis said: Are you saying the code in ogs-3.1.1-ml.zip and glassfish 3.1.1 opensource edition is the same?
@glassfishrobot Commented mm110999 said: Yes.
@glassfishrobot Commented Was assigned to mm110999
@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-17214
@glassfishrobot Commented Reported by corneil.duplessis
@glassfishrobot Commented Marked as cannot reproduce on Monday, August 22nd 2011, 1:54:31 pm
I am struggling to deploy an application on GF 3.1.1, I also tried GF 3.1 and experience the same error. As part of deployment it was busy detecting annotations for validation. The application uses Spring 3.0.5, Hibernate 3.6.7, Spring Data JPA 1.0, JPA 2.0
All code has been extensively unit tested.
We use maven to build and have taken a lot of care to make sure packages that might be provided by container (like validation-aip and persistence-api) is not part of the ear.
I have no way of know what the problem might be and would like some advice on which loglevel to increase of how to debug the deployment in order to track down the problem.
Environment
GF 3.1.1 Ubuntu 11.04 *Oracle Java 1.6.0_26
Affected Versions
[3.1.1_dev]