Issue Details (XML | Word | Printable)

Key: GLASSFISH-20804
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Mitesh Meswani
Reporter: Duser
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
glassfish

Persistance Manager Crashes during app deployment

Created: 09/Sep/13 01:33 PM   Updated: 27/Feb/14 12:15 PM
Component/s: entity-persistence
Affects Version/s: 4.0_b89_RC5
Fix Version/s: None

Time Tracking:
Not Specified

Environment:

Operating system is Ubuntu 12.04.03 LTS x86, local server installation for development. IDE is IntelliJ IDEA 12


Tags: persistence deployment
Participants: dobromyslov, Duser and Mitesh Meswani


 Description  « Hide

On Irregular intervals and without apparent pattern the application deployment fails. The workaround is to restart the server so far...

This is the application's persistence.xml

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">

<persistence-unit name="GTWunit" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/gtwcust</jta-data-source>

<class>net.metarex.ga.jpa.LocationCode</class>
<class>net.metarex.ga.jpa.Shipment</class>
<properties>
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost/gtwcustreport"/>
<property name="javax.persistence.jdbc.user" value="xxxx"/>
<property name="javax.persistence.jdbc.password" value="xxxx"/>
</properties>
</persistence-unit>
</persistence>

Here are the log Entries:

Exception while deploying the app [gtwcustreporter_war_exploded] : Exception [EclipseLink-23004] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.TransactionException Exception Description: Error obtaining the Transaction Manager Internal Exception: Exception [EclipseLink-23001] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.TransactionException Exception Description: Error looking up external Transaction resource under JNDI name [java:appserver/TransactionManager] Internal Exception: javax.naming.NameNotFoundException: remaining name: /appserver/TransactionManager

--------------

Exception during lifecycle processing org.glassfish.deployment.common.DeploymentException: Exception [EclipseLink-23004] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.TransactionException Exception Description: Error obtaining the Transaction Manager Internal Exception: Exception [EclipseLink-23001] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.TransactionException Exception Description: Error looking up external Transaction resource under JNDI name [java:appserver/TransactionManager] Internal Exception: javax.naming.NameNotFoundException: remaining name: /appserver/TransactionManager at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:762) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:204) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:304) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:336) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:302) at org.glassfish.persistence.jpa.JPADeployer$2.visitPUD(JPADeployer.java:451) at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510) at org.glassfish.persistence.jpa.JPADeployer.iterateInitializedPUsAtApplicationPrepare(JPADeployer.java:492) at org.glassfish.persistence.jpa.JPADeployer.event(JPADeployer.java:398) at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:484) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:356) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534) at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224) at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246) at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544) at java.lang.Thread.run(Thread.java:724)



Duser added a comment - 18/Sep/13 10:11 PM

The issue also occurs not only during deployment but also post deployment.


dobromyslov added a comment - 27/Feb/14 11:58 AM

Same issue with Hibernate 4.3 and JPA unit.


dobromyslov added a comment - 27/Feb/14 12:15 PM

Solution is here: https://community.jboss.org/thread/177282
and here: http://kyryloholodnov.wordpress.com/2013/08/19/hibernate-4-2-4-and-jpa-2-1/comment-page-1/

I just added:
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.SunOneJtaPlatform"/>

into my persistence.xml