users@glassfish.java.net

Exception while invoking class org.glassfish.persistence.jpa.JPADeployer pr

From: <glassfish_at_javadesktop.org>
Date: Mon, 22 Jun 2009 14:32:28 PDT

Hi,

Version : GlassFish v3.0-Preview (build 47.4)

I am getting following error at the time of deploying war file. As it described in message, I have used force=true option to deploy. now I am getting same error at the time of starting server. Could you please advice root cause and fix ASAP. I am using JPA annotations..

persistence.xml :

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" 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">
  <persistence-unit name="DealPU" transaction-type="RESOURCE_LOCAL">
    <non-jta-data-source>jdbc/MySQLDS</non-jta-data-source>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
      <property name="eclipselink.logging.logger" value="JavaLogger"/>
      <property name="eclipselink.logging.level" value="FINE"/>
      <property name="eclipselink.cache.type.default" value="Weak"/>
    </properties>
  </persistence-unit>
</persistence>

Exception stance trace

[#|2009-06-22T19:43:22.673+0100|SEVERE|glassfish|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=11;_ThreadName=Thread-1;|Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
java.lang.RuntimeException: More than one deployer is trying to access the final class loader during prepare phase, use --force=true to force deployment
        at org.glassfish.deployment.common.DeploymentContextImpl.getFinalClassLoader(DeploymentContextImpl.java:137)
        at org.glassfish.persistence.jpa.JPADeployer$ProviderContainerContractInfoImpl.<init>(JPADeployer.java:165)
        at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:121)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:579)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:244)
        at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:296)
        at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:144)
        at com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:170)
        at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:90)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:87)
        at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)
        at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
        at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
        at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
        at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:218)
        at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:115)
        at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:433)
        at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:377)
        at org.jvnet.hk2.osgiadapter.HK2Main.start(HK2Main.java:120)
        at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1458)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:779)
        at org.jvnet.hk2.osgimain.Main.start(Main.java:104)
        at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1458)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:984)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:263)
        at java.lang.Thread.run(Thread.java:619)
|#]

[#|2009-06-22T19:43:22.674+0100|SEVERE|glassfish|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=11;_ThreadName=Thread-1;|Exception while preparing the app|#]

[#|2009-06-22T19:43:22.675+0100|SEVERE|glassfish|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=11;_ThreadName=Thread-1;|Exception while preparing the app|#]

[#|2009-06-22T19:43:22.677+0100|INFO|glassfish|org.jvnet.hk2.osgiadapter|_ThreadID=11;_ThreadName=Thread-1;org.glassfish.web.cli [129];|Started bundle org.glassfish.web.cli [129]|#]
[Message sent by forum member 'sk11' (sk11)]

http://forums.java.net/jive/thread.jspa?messageID=352413