[GLASSFISH-21401] Jboss-logging bundled with glassfish does not see the slf4j jar file in endorsed directory Created: 03/Aug/15  Updated: 03/Aug/15

Status: Open
Project: glassfish
Component/s: classloader
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: bgurung Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7, Java 8, Glassfish 4.1



 Description   

Downloaded the glassfish 4.1 zip file, unzipped it.
Added the following JMV prop to the domain.xml file -
<jvm-options>-Dorg.jboss.logging.provider=slf4j</jvm-options>
Added the slf4j-api-1.7.5.jar file to the following location -
E:\glassfish-4.1\glassfish\lib\endorsed
Started the server with the following command line -
asadmin.bat start-domain -v
And the start-up fails with the following error -
[2015-08-03T15:00:30.593-0500] [] [INFO] [NCLS-GFLAUNCHER-00005] [javax.enterprise.launcher] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1438632030593] [levelValue: 800] [[
JVM invocation command line:
E:\Java\jdk1.8.0_25\bin\java.exe
-cp
E:/glassfish-4.1/glassfish4/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:NewRatio=2
-XX:MaxPermSize=192m
-Xmx512m
-javaagent:E:/glassfish-4.1/glassfish4/glassfish/lib/monitor/flashlight-agent.jar
-client
-Djavax.xml.accessExternalSchema=all
-Djavax.net.ssl.trustStore=E:\glassfish-4.1\glassfish4\glassfish\domains\domain1/config/cacerts.jks
-Djdk.corba.allowOutputStreamSubclass=true
-Dfelix.fileinstall.dir=E:\glassfish-4.1\glassfish4\glassfish/modules/autostart/
-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall
-Dcom.sun.aas.installRoot=E:\glassfish-4.1\glassfish4\glassfish
-Dfelix.fileinstall.poll=5000
-Djava.endorsed.dirs=E:\glassfish-4.1\glassfish4\glassfish/modules/endorsed;E:\glassfish-4.1\glassfish4\glassfish/lib/endorsed
-Djava.security.policy=E:\glassfish-4.1\glassfish4\glassfish\domains\domain1/config/server.policy
-Dosgi.shell.telnet.maxconn=1
-Dfelix.fileinstall.bundles.startTransient=true
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dfelix.fileinstall.log.level=2
-Dorg.jboss.logging.provider=slf4j
-Djavax.net.ssl.keyStore=E:\glassfish-4.1\glassfish4\glassfish\domains\domain1/config/keystore.jks
-Djava.security.auth.login.config=E:\glassfish-4.1\glassfish4\glassfish\domains\domain1/config/login.conf
-Dfelix.fileinstall.disableConfigSave=false
-Dfelix.fileinstall.bundles.new.start=true
-Dcom.sun.aas.instanceRoot=E:\glassfish-4.1\glassfish4\glassfish\domains\domain1
-Dosgi.shell.telnet.port=6666
Dgosh.args=-nointeractive
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Dosgi.shell.telnet.ip=127.0.0.1
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Djava.awt.headless=true
-Dcom.ctc.wstx.returnNullForDefaultNamespace=true
-Djava.ext.dirs=E:\Java\jdk1.8.0_25/lib/ext;E:\Java\jdk1.8.0_25/jre/lib/ext;E:\glassfish-4.1\glassfish4\glassfish\domains\domain1/lib/ext
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Djava.library.path=E:/glassfish-4.1/glassfish4/glassfish/lib;E:/Java/jdk1.8.0_25/bin;C:/Windows/Sun/Java/bin;C:/Windows/System32;C:/Windows;C:/ProgramData/Oracle/Java/javapath;C:/Program Files/Common Files/Microsoft Shared/Windows Live;C:/Program Files (x86)/Common Files/microsoft shared/Windows Live;C:/Program Files (x86)/Intel/iCLS Client;C:/Program Files/Intel/iCLS Client;C:/Program Files (x86)/AMD APP/bin/x86_64;C:/Program Files (x86)/AMD APP/bin/x86;C:/Windows/System32/wbem;C:/Windows/System32/WindowsPowerShell/v1.0;C:/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static;C:/Program Files/Intel/Intel(R) Management Engine Components/DAL;C:/Program Files/Intel/Intel(R) Management Engine Components/IPT;C:/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL;C:/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT;C:/Program Files/Dell/Dell Data Protection/Access/Advanced/Wave/Gemalto/Access Client/v5;C:/Program Files (x86)/Security Innovation/SI TSS/bin;C:/Program Files (x86)/Windows Live/Shared;C:/Program Files (x86)/Attachmate/EXTRA!;E:/_2ls/apache-maven-3.0.5/bin;E:/Program Files/IBM/SQLLIB/BIN;E:/Program Files/IBM/SQLLIB/FUNCTION;E:/Program Files/IBM/SQLLIB/samples/repl;C:/Program Files (x86)/IBM/RationalSDLC/ClearCase/bin;C:/Program Files (x86)/IBM/RationalSDLC/common;E:/Program Files/putty;E:/_ant_viz/graphviz-2.38/bin;E:/Program Files/TortoiseSVN/bin;E:/ANT_1.9.4/bin;E:/Program Files (x86)/Git/cmd;E:/Program Files/nodejs;E:/Program Files (x86)/Heroku/bin;C:/Program Files (x86)/git/cmd;E:/db-derby-10.11.1.1-bin/bin;E:/Python34;E:/Python34/Scripts;E:/Ruby22-x64/bin;C:/Users/bgurung/AppData/Roaming/npm;E:/gradle-2.2.1/bin;C:/Users/bgurung/AppData/Local/Apps/cURL/bin;E:/glassfish-4.1/glassfish4/glassfish/bin
com.sun.enterprise.glassfish.bootstrap.ASMain
-upgrade
false
-domaindir
E:/glassfish-4.1/glassfish4/glassfish/domains/domain1
-read-stdin
true
-asadmin-args
-host,,,localhost,,,port,,,4848,,,secure=false,,,terse=false,,,echo=false,,,interactive=true,,,start-domain,,,verbose=true,,,watchdog=false,,,debug=false,,,-domaindir,,,E:\glassfish-4.1\glassfish4\glassfish\domains,,,domain1
-domainname
domain1
-instancename
server
-type
DAS
-verbose
true
-asadmin-classpath
E:/glassfish-4.1/glassfish4/glassfish/lib/client/appserver-cli.jar
-debug
false
-asadmin-classname
com.sun.enterprise.admin.cli.AdminMain]]

[2015-08-03T15:00:37.312-0500] [glassfish 4.1] [INFO] [NCLS-LOGGING-00009] [javax.enterprise.logging] [tid: _ThreadID=19 _ThreadName=RunLevelControllerThread-1438632037242] [timeMillis: 1438632037312] [levelValue: 800] [[
Running GlassFish Version: GlassFish Server Open Source Edition 4.1 (build 13)]]

[2015-08-03T15:00:37.322-0500] [glassfish 4.1] [INFO] [NCLS-LOGGING-00010] [javax.enterprise.logging] [tid: _ThreadID=19 _ThreadName=RunLevelControllerThread-1438632037242] [timeMillis: 1438632037322] [levelValue: 800] [[
Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter]]

[2015-08-03T15:00:37.422-0500] [glassfish 4.1] [INFO] [NCLS-SECURITY-01115] [javax.enterprise.system.core.security] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1438632037242] [timeMillis: 1438632037422] [levelValue: 800] [[
Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.]]

[2015-08-03T15:00:37.432-0500] [glassfish 4.1] [INFO] [NCLS-SECURITY-01115] [javax.enterprise.system.core.security] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1438632037242] [timeMillis: 1438632037432] [levelValue: 800] [[
Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.]]

[2015-08-03T15:00:37.432-0500] [glassfish 4.1] [INFO] [NCLS-SECURITY-01115] [javax.enterprise.system.core.security] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1438632037242] [timeMillis: 1438632037432] [levelValue: 800] [[
Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.]]

[2015-08-03T15:00:37.572-0500] [glassfish 4.1] [INFO] [SEC-SVCS-00100] [javax.enterprise.security.services] [tid: _ThreadID=21 _ThreadName=RunLevelControllerThread-1438632037242] [timeMillis: 1438632037572] [levelValue: 800] [[
Authorization Service has successfully initialized.]]

[2015-08-03T15:00:37.582-0500] [glassfish 4.1] [INFO] [NCLS-CORE-00015] [javax.enterprise.system.core] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1438632037232] [timeMillis: 1438632037582] [levelValue: 800] [[
Shutdown requested
MultiException stack 1 of 3
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.jboss.logging.Slf4jLoggerProvider.getLogger(Slf4jLoggerProvider.java:33)
at org.jboss.logging.LoggerProviders.find(LoggerProviders.java:37)
at org.jboss.logging.LoggerProviders.<clinit>(LoggerProviders.java:32)
at org.jboss.logging.Logger.getLogger(Logger.java:2163)
at org.jboss.logging.Logger.getMessageLogger(Logger.java:2259)
at org.jboss.logging.Logger.getMessageLogger(Logger.java:2214)
at org.hibernate.validator.internal.util.logging.LoggerFactory.make(LoggerFactory.java:29)
at org.hibernate.validator.internal.util.Version.<clinit>(Version.java:27)
at org.hibernate.validator.internal.engine.ConfigurationImpl.<clinit>(ConfigurationImpl.java:65)
at org.hibernate.validator.HibernateValidator.createGenericConfiguration(HibernateValidator.java:41)
at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:276)
at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:110)
at org.jvnet.hk2.config.WriteableView.<clinit>(WriteableView.java:97)
at org.jvnet.hk2.config.ConfigSupport.getWriteableView(ConfigSupport.java:213)
at org.jvnet.hk2.config.ConfigSupport.getWriteableView(ConfigSupport.java:236)
at org.jvnet.hk2.config.ConfigSupport._apply(ConfigSupport.java:159)
at org.jvnet.hk2.config.ConfigSupport.apply(ConfigSupport.java:135)
at org.jvnet.hk2.config.ConfigSupport.apply(ConfigSupport.java:114)
at com.sun.enterprise.config.modularity.parser.ModuleConfigurationLoader.createConfigBeanForType(ModuleConfigurationLoader.java:100)
at com.sun.enterprise.config.modularity.ExtensionPatternInvocationImpl.handleExtension(ExtensionPatternInvocationImpl.java:96)
at org.jvnet.hk2.config.Dom.invokeConfigExtensionMethod(Dom.java:1130)
at org.jvnet.hk2.config.Dom.invoke(Dom.java:1071)
at org.glassfish.config.support.TranslatedConfigView.invoke(TranslatedConfigView.java:131)
at com.sun.proxy.$Proxy36.getExtensionByType(Unknown Source)
at com.sun.enterprise.config.modularity.ConfigModularityJustInTimeInjectionResolver.justInTimeResolution(ConfigModularityJustInTimeInjectionResolver.java:100)
at org.jvnet.hk2.internal.ServiceLocatorImpl.secondChanceResolve(ServiceLocatorImpl.java:466)
at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetInjecteeDescriptor(ServiceLocatorImpl.java:534)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getInjecteeDescriptor(ServiceLocatorImpl.java:546)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:69)
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:214)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:237)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:360)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory not found by org.glassfish.hk2.external.bean-validator [23]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 43 more
MultiException stack 2 of 3
java.lang.IllegalArgumentException: While attempting to resolve the dependencies of org.glassfish.batch.spi.impl.BatchRuntimeHelper errors were found
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:249)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:360)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
MultiException stack 3 of 3
java.lang.IllegalStateException: Unable to perform operation: resolve on org.glassfish.batch.spi.impl.BatchRuntimeHelper
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:389)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
]]

[2015-08-03T15:00:37.582-0500] [glassfish 4.1] [SEVERE] [NCLS-CORE-00016] [javax.enterprise.system.core] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1438632037232] [timeMillis: 1438632037582] [levelValue: 1000] [[
Startup service failed to start
MultiException stack 1 of 3
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.jboss.logging.Slf4jLoggerProvider.getLogger(Slf4jLoggerProvider.java:33)
at org.jboss.logging.LoggerProviders.find(LoggerProviders.java:37)
at org.jboss.logging.LoggerProviders.<clinit>(LoggerProviders.java:32)
at org.jboss.logging.Logger.getLogger(Logger.java:2163)
at org.jboss.logging.Logger.getMessageLogger(Logger.java:2259)
at org.jboss.logging.Logger.getMessageLogger(Logger.java:2214)
at org.hibernate.validator.internal.util.logging.LoggerFactory.make(LoggerFactory.java:29)
at org.hibernate.validator.internal.util.Version.<clinit>(Version.java:27)
at org.hibernate.validator.internal.engine.ConfigurationImpl.<clinit>(ConfigurationImpl.java:65)
at org.hibernate.validator.HibernateValidator.createGenericConfiguration(HibernateValidator.java:41)
at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:276)
at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:110)
at org.jvnet.hk2.config.WriteableView.<clinit>(WriteableView.java:97)
at org.jvnet.hk2.config.ConfigSupport.getWriteableView(ConfigSupport.java:213)
at org.jvnet.hk2.config.ConfigSupport.getWriteableView(ConfigSupport.java:236)
at org.jvnet.hk2.config.ConfigSupport._apply(ConfigSupport.java:159)
at org.jvnet.hk2.config.ConfigSupport.apply(ConfigSupport.java:135)
at org.jvnet.hk2.config.ConfigSupport.apply(ConfigSupport.java:114)
at com.sun.enterprise.config.modularity.parser.ModuleConfigurationLoader.createConfigBeanForType(ModuleConfigurationLoader.java:100)
at com.sun.enterprise.config.modularity.ExtensionPatternInvocationImpl.handleExtension(ExtensionPatternInvocationImpl.java:96)
at org.jvnet.hk2.config.Dom.invokeConfigExtensionMethod(Dom.java:1130)
at org.jvnet.hk2.config.Dom.invoke(Dom.java:1071)
at org.glassfish.config.support.TranslatedConfigView.invoke(TranslatedConfigView.java:131)
at com.sun.proxy.$Proxy36.getExtensionByType(Unknown Source)
at com.sun.enterprise.config.modularity.ConfigModularityJustInTimeInjectionResolver.justInTimeResolution(ConfigModularityJustInTimeInjectionResolver.java:100)
at org.jvnet.hk2.internal.ServiceLocatorImpl.secondChanceResolve(ServiceLocatorImpl.java:466)
at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetInjecteeDescriptor(ServiceLocatorImpl.java:534)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getInjecteeDescriptor(ServiceLocatorImpl.java:546)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:69)
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:214)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:237)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:360)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory not found by org.glassfish.hk2.external.bean-validator [23]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 43 more
MultiException stack 2 of 3
java.lang.IllegalArgumentException: While attempting to resolve the dependencies of org.glassfish.batch.spi.impl.BatchRuntimeHelper errors were found
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:249)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:360)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
MultiException stack 3 of 3
java.lang.IllegalStateException: Unable to perform operation: resolve on org.glassfish.batch.spi.impl.BatchRuntimeHelper
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:389)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
]]

[2015-08-03T15:00:37.692-0500] [glassfish 4.1] [INFO] [NCLS-CORE-00015] [javax.enterprise.system.core] [tid: _ThreadID=21 _ThreadName=RunLevelControllerThread-1438632037242] [timeMillis: 1438632037692] [levelValue: 800] [[
Shutdown requested
MultiException stack 1 of 2
java.lang.NoClassDefFoundError: Could not initialize class org.jvnet.hk2.config.WriteableView
at org.jvnet.hk2.config.ConfigSupport.getWriteableView(ConfigSupport.java:213)
at org.jvnet.hk2.config.ConfigSupport.getWriteableView(ConfigSupport.java:236)
at org.jvnet.hk2.config.ConfigSupport._apply(ConfigSupport.java:159)
at org.jvnet.hk2.config.ConfigSupport.apply(ConfigSupport.java:135)
at org.jvnet.hk2.config.ConfigSupport.apply(ConfigSupport.java:114)
at com.sun.enterprise.config.modularity.parser.ModuleConfigurationLoader.createConfigBeanForType(ModuleConfigurationLoader.java:100)
at com.sun.enterprise.config.modularity.ExtensionPatternInvocationImpl.handleExtension(ExtensionPatternInvocationImpl.java:96)
at org.jvnet.hk2.config.Dom.invokeConfigExtensionMethod(Dom.java:1130)
at org.jvnet.hk2.config.Dom.invoke(Dom.java:1071)
at org.glassfish.config.support.TranslatedConfigView.invoke(TranslatedConfigView.java:131)
at com.sun.proxy.$Proxy55.getExtensionByType(Unknown Source)
at com.sun.enterprise.v3.admin.JobCleanUpService.postConstruct(JobCleanUpService.java:98)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
MultiException stack 2 of 2
java.lang.IllegalStateException: Unable to perform operation: post construct on com.sun.enterprise.v3.admin.JobCleanUpService
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:395)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
]]

[2015-08-03T15:00:37.692-0500] [glassfish 4.1] [SEVERE] [NCLS-CORE-00016] [javax.enterprise.system.core] [tid: _ThreadID=21 _ThreadName=RunLevelControllerThread-1438632037242] [timeMillis: 1438632037692] [levelValue: 1000] [[
Startup service failed to start
MultiException stack 1 of 2
java.lang.NoClassDefFoundError: Could not initialize class org.jvnet.hk2.config.WriteableView
at org.jvnet.hk2.config.ConfigSupport.getWriteableView(ConfigSupport.java:213)
at org.jvnet.hk2.config.ConfigSupport.getWriteableView(ConfigSupport.java:236)
at org.jvnet.hk2.config.ConfigSupport._apply(ConfigSupport.java:159)
at org.jvnet.hk2.config.ConfigSupport.apply(ConfigSupport.java:135)
at org.jvnet.hk2.config.ConfigSupport.apply(ConfigSupport.java:114)
at com.sun.enterprise.config.modularity.parser.ModuleConfigurationLoader.createConfigBeanForType(ModuleConfigurationLoader.java:100)
at com.sun.enterprise.config.modularity.ExtensionPatternInvocationImpl.handleExtension(ExtensionPatternInvocationImpl.java:96)
at org.jvnet.hk2.config.Dom.invokeConfigExtensionMethod(Dom.java:1130)
at org.jvnet.hk2.config.Dom.invoke(Dom.java:1071)
at org.glassfish.config.support.TranslatedConfigView.invoke(TranslatedConfigView.java:131)
at com.sun.proxy.$Proxy55.getExtensionByType(Unknown Source)
at com.sun.enterprise.v3.admin.JobCleanUpService.postConstruct(JobCleanUpService.java:98)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
MultiException stack 2 of 2
java.lang.IllegalStateException: Unable to perform operation: post construct on com.sun.enterprise.v3.admin.JobCleanUpService
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:395)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
]]

[2015-08-03T15:00:38.026-0500] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1438632037242] [timeMillis: 1438632038026] [levelValue: 800] [[
Grizzly Framework 2.3.15 started in: 70ms - bound to [/0.0.0.0:8181]]]

[2015-08-03T15:00:38.036-0500] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1438632037242] [timeMillis: 1438632038036] [levelValue: 800] [[
Grizzly Framework 2.3.15 started in: 10ms - bound to [/0.0.0.0:4848]]]

[2015-08-03T15:00:38.086-0500] [glassfish 4.1] [SEVERE] [NCLS-CORE-00014] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1438632038086] [levelValue: 1000] [[
Shutdown required
MultiException stack 1 of 2
MultiException stack 1 of 3
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.jboss.logging.Slf4jLoggerProvider.getLogger(Slf4jLoggerProvider.java:33)
at org.jboss.logging.LoggerProviders.find(LoggerProviders.java:37)
at org.jboss.logging.LoggerProviders.<clinit>(LoggerProviders.java:32)
at org.jboss.logging.Logger.getLogger(Logger.java:2163)
at org.jboss.logging.Logger.getMessageLogger(Logger.java:2259)
at org.jboss.logging.Logger.getMessageLogger(Logger.java:2214)
at org.hibernate.validator.internal.util.logging.LoggerFactory.make(LoggerFactory.java:29)
at org.hibernate.validator.internal.util.Version.<clinit>(Version.java:27)
at org.hibernate.validator.internal.engine.ConfigurationImpl.<clinit>(ConfigurationImpl.java:65)
at org.hibernate.validator.HibernateValidator.createGenericConfiguration(HibernateValidator.java:41)
at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:276)
at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:110)
at org.jvnet.hk2.config.WriteableView.<clinit>(WriteableView.java:97)
at org.jvnet.hk2.config.ConfigSupport.getWriteableView(ConfigSupport.java:213)
at org.jvnet.hk2.config.ConfigSupport.getWriteableView(ConfigSupport.java:236)
at org.jvnet.hk2.config.ConfigSupport._apply(ConfigSupport.java:159)
at org.jvnet.hk2.config.ConfigSupport.apply(ConfigSupport.java:135)
at org.jvnet.hk2.config.ConfigSupport.apply(ConfigSupport.java:114)
at com.sun.enterprise.config.modularity.parser.ModuleConfigurationLoader.createConfigBeanForType(ModuleConfigurationLoader.java:100)
at com.sun.enterprise.config.modularity.ExtensionPatternInvocationImpl.handleExtension(ExtensionPatternInvocationImpl.java:96)
at org.jvnet.hk2.config.Dom.invokeConfigExtensionMethod(Dom.java:1130)
at org.jvnet.hk2.config.Dom.invoke(Dom.java:1071)
at org.glassfish.config.support.TranslatedConfigView.invoke(TranslatedConfigView.java:131)
at com.sun.proxy.$Proxy36.getExtensionByType(Unknown Source)
at com.sun.enterprise.config.modularity.ConfigModularityJustInTimeInjectionResolver.justInTimeResolution(ConfigModularityJustInTimeInjectionResolver.java:100)
at org.jvnet.hk2.internal.ServiceLocatorImpl.secondChanceResolve(ServiceLocatorImpl.java:466)
at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetInjecteeDescriptor(ServiceLocatorImpl.java:534)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getInjecteeDescriptor(ServiceLocatorImpl.java:546)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:69)
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:214)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:237)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:360)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory not found by org.glassfish.hk2.external.bean-validator [23]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 43 more
MultiException stack 2 of 3
java.lang.IllegalArgumentException: While attempting to resolve the dependencies of org.glassfish.batch.spi.impl.BatchRuntimeHelper errors were found
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:249)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:360)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
MultiException stack 3 of 3
java.lang.IllegalStateException: Unable to perform operation: resolve on org.glassfish.batch.spi.impl.BatchRuntimeHelper
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:389)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
MultiException stack 2 of 2
MultiException stack 1 of 2
java.lang.NoClassDefFoundError: Could not initialize class org.jvnet.hk2.config.WriteableView
at org.jvnet.hk2.config.ConfigSupport.getWriteableView(ConfigSupport.java:213)
at org.jvnet.hk2.config.ConfigSupport.getWriteableView(ConfigSupport.java:236)
at org.jvnet.hk2.config.ConfigSupport._apply(ConfigSupport.java:159)
at org.jvnet.hk2.config.ConfigSupport.apply(ConfigSupport.java:135)
at org.jvnet.hk2.config.ConfigSupport.apply(ConfigSupport.java:114)
at com.sun.enterprise.config.modularity.parser.ModuleConfigurationLoader.createConfigBeanForType(ModuleConfigurationLoader.java:100)
at com.sun.enterprise.config.modularity.ExtensionPatternInvocationImpl.handleExtension(ExtensionPatternInvocationImpl.java:96)
at org.jvnet.hk2.config.Dom.invokeConfigExtensionMethod(Dom.java:1130)
at org.jvnet.hk2.config.Dom.invoke(Dom.java:1071)
at org.glassfish.config.support.TranslatedConfigView.invoke(TranslatedConfigView.java:131)
at com.sun.proxy.$Proxy55.getExtensionByType(Unknown Source)
at com.sun.enterprise.v3.admin.JobCleanUpService.postConstruct(JobCleanUpService.java:98)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
MultiException stack 2 of 2
java.lang.IllegalStateException: Unable to perform operation: post construct on com.sun.enterprise.v3.admin.JobCleanUpService
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:395)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
]]

[2015-08-03T15:00:38.086-0500] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=1 _ThreadName=Thread-9] [timeMillis: 1438632038086] [levelValue: 1000] [[
Exception in thread "main"]]






[GLASSFISH-19554] EJB module is visible to every module Created: 18/Jan/13  Updated: 08/Feb/13

Status: Open
Project: glassfish
Component/s: classloader, deployment
Affects Version/s: None
Fix Version/s: future release

Type: Improvement Priority: Critical
Reporter: Sanjeeb Sahoo Assignee: Hong Zhang
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

My ear has following structure:
app.ear
ejb.jar (Contains ejb1/FooEjb.class)
web.war (Contains WEB-INF/classes/web1/FooServlet.class)

There is a Servlet in web.war which is able to load FooEjb.class using thread context class loader.

I believe this is because of the following lines of code in EarHandler.java:

if (md.getModuleType().equals(DOLUtils.ejbType())) {
// for ejb module, we just add the ejb urls
// to EarClassLoader and use that to load
// ejb module
URL[] moduleURLs =
((URLClassLoader)subCl).getURLs();
for (URL moduleURL : moduleURLs)

{ cl.addURL(moduleURL); }

 Comments   
Comment by Hong Zhang [ 08/Feb/13 ]

Have talked with Sahoo briefly about this, this is the expected behavior with the current implenmentation (the current behavior does not violate the EE spec, though does not implement the recommended behavior by the EE spec). There were previous efforts put in trying to follow the spec recommendation but it was discovered fairly hard to achieve with the current code base. Sahoo and I plan to revisit it and discuss in more details to see if it's possible to implement the spec's recommendation in a future release.





[GLASSFISH-12276] Allow users to override system supplied META-INF/services files Created: 17/Jun/10  Updated: 06/Mar/12

Status: Open
Project: glassfish
Component/s: classloader
Affects Version/s: 3.1
Fix Version/s: not determined

Type: Improvement Priority: Major
Reporter: Sanjeeb Sahoo Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 12,276

 Description   

Invert delegation while searching for META-INF/services file to will allow users
to override system supplied META-INF/services files.



 Comments   
Comment by sandoz [ 17/Jun/10 ]

And ensure that this works with GlassFish embedded?

I recently found out that my temporary hack i implemented for Jersey does work
with GF embedded

Comment by sandoz [ 17/Jun/10 ]

I meant to say:

"I recently found out that my temporary hack i implemented for Jersey does
not work with GF embedded "

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.





[GLASSFISH-9165] Application bundling Jersey 1.0 is forced to use GF's copy of Jersey Created: 18/Aug/09  Updated: 07/Jan/13

Status: Open
Project: glassfish
Component/s: classloader
Affects Version/s: V3
Fix Version/s: not determined

Type: Improvement Priority: Major
Reporter: Alexis MP Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Text File artifactory-delegate-false.txt     Text File artifactory-delegate-true.txt     Zip Archive mavenproject5.zip    
Issuezilla Id: 9,165

 Description   

Dropping the artifactory.war [1] in v3's autodeploy directory triggers the following scan error documented at http://forums.java.net/jive/thread.jspa?
messageID=360993.

This is a case of an application being forced to use Jersey 1.1 bundled in GlassFish v3 instead of the 1.0 library that it ships with.
Even with class loader delegation set to false Jersey 1.0 will look in META-INF/services of jersey installed in GF.

Of course it would be nice to have Jersey 1.0 apps run unmodified on 1.1 but only strict adherence to the JAX-RS specification offers compatibility
between 1.0 and 1.1 releases.

Removing jersey from the GFv3 distro sounds like a bad solution (glassfish-management depends on it).

An application should be able to ship and use its own set of libraries with some sort of "ignore system/GlassFish libraries" isolation at deploy time.

[1]: http://downloads.sourceforge.net/project/artifactory/artifactory/2.0/artifactory-2.0.7.war



 Comments   
Comment by Alexis MP [ 18/Aug/09 ]

adding Sahoo to CC list

Comment by Sanjeeb Sahoo [ 19/Aug/09 ]

Alexis,

It is kind of strange that jersey 1.1 is not compatible with 1.0. Anyway, that's
a separate issue altogether. But, it is a bit too much to expect that a
traditional Java EE application can override a server implementation module by
just including it in itself. Given all the spec requirements and implementation
challenge, it is quite impossible to support this.

On the other hand, these are the kind of things I expect an OSGi enabled
application [1] to be able to solve. Skip the step of downloading an extra jar
and copying it to autodeploy-bundles directory, as osgi-web-container.jar is now
part of modules/. So, I gave try like this:
$ start GlassFish
$ telnet localhost 6666
-> install webbundle:file:///tmp/artifactory-2.0.7.war
-> start 205 (where 205 is the bundle id reported by install command)

I am seeing an exception like this:
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name
'org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor#0'
defined in class path resource [META-INF/spring/applicationContext.xml]: Cannot
resolve reference to bean 'txInterceptor' while setting bean property
'transactionInterceptor'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'txInterceptor' defined in class path resource
[META-INF/spring/applicationContext.xml]: Cannot resolve reference to bean
'transactionManager' while setting bean property 'transactionManager'; nested
exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No
bean named 'transactionManager' is defined

I don't know enough about Spring to debug further. When does this error occur?
Can the submitter try it out and explain what's going wrong.

May be we need a simpler test case that just bundles jersey-1.0 jar and first
see if it can be handled or not.

Sahoo

[1] http://weblogs.java.net/blog/ss141213/archive/2009/06/osgi_enabled_we.html

Comment by sandoz [ 19/Aug/09 ]

Jersey's implementation of JAX-RS 1.1 is backwards compatible with 1.0. So if
you just depend on JAX-RS 1.0 features the same app should work with JAX-RS 1.1
(a long as you do not have both 1.0 and 1.1 JAX-RS implementations in the class
path!). I do agree that the version naming is confusing because we currently
include the JAX-RS version as the major/minor Jersey version.

I suspect the Spring-related error is due to class loading restrictions.

I agree with you about OSGi. Note that we do plan to make jersey fully
OSGi-enabled, i am not sure if that will help or not in this case.

A simpler test case would be most useful to verify it is works, we could use the
following sample:

http://download.java.net/maven/2/com/sun/jersey/samples/helloworld-webapp/1.0.3.1/helloworld-webapp-1.0.3.1-project.zip

when built there will be a war with the Jersey 1.0.3.1 jars present in WEB-INF/lib.

Comment by Sanjeeb Sahoo [ 19/Aug/09 ]

sandoz:
If jersey 1.1 is both a jersey 1.0 and 1.1 implementation, then why does things
not work if you just deploy a web app even if it bundles jersey-1.0.jar inside
it. After all, jersey-1.1.jar, which is provided by the server, should shadow
the bundled version and there is no need to even switch of classloader
delegation. I guess, I am missing something. What it is.

alexismp:
Do you know anything about the Spring framework error that I observed?

sandoz:
I tried using the simple test case you pointed to. I got the following error:
java.lang.NoSuchMethodError:
com.sun.jersey.server.impl.container.servlet.JSPTemplateProcessor.<init>(Lcom/sun/jersey/api/core/ResourceConfig;Ljava/lang/ThreadLocal;Ljava/lang/ThreadLocal;)V
at
com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:414)
at
com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:235)
at
com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:448)
at
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:169)
at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:281)
at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:442)
at javax.servlet.GenericServlet.init(GenericServlet.java:242)
...

What does this mean? I don't have the time to debug it, so I am asking you. May
be you know if this bundle is seeing some class incorrectly. May be we need to
adjust the OSGi metadata of the bundle as opposed to relying on the metadata
generated by the server. So, try adding OSGi metadata to the war file depending
on what this bundle imports/exports and see how it goes.

Sahoo

Comment by Alexis MP [ 19/Aug/09 ]

Sorry, my Spring knowledge is too limited. Class-loader visibility seems like the most likely cause.
Maybe repackaging the application to use Spring DM (the OSGi version of the Spring framework) would
help but that's beyond what would be a reasonable solution to the problem.

Comment by sandoz [ 19/Aug/09 ]

Jersey 1.1.x supports JAX-RS 1.0 and 1.1. Jersey currently does guarantee to
support two different versions of Jersey in the same VM unless they are fully
isolated by some external mechanism.

The main problem is that Jersey loads components declared in META-INF/service
files. Those files will be present in multiple jersey jars/modules of the same
version.

When two versions of Jersey, 1.0 and 1.1.0 say, are present, the version of
Jersey that gets initiated, say 1.0, will also attempt to load components
declared by 1.1.0 jars because of the way Classloader.getResources works.

Re the Spring exception: can you attach the full exception log, if any more, to
know what caused the NoSuchBeanDefinitionException.

Re the NoSuchMethodError: the error indicates that the JSPTemplateProcessor
class is being loaded from the Jersey version distributed with GF and not Jersey
version distributed in the war.

The relevant code in 1.0.3.1 is:

rc.getSingletons().add(new JSPTemplateProcessor(
resourceConfig,
requestInvoker.getThreadLocal(),
responseInvoker.getThreadLocal()));

public class JSPTemplateProcessor implements TemplateProcessor {
@Context HttpContext hc;

@Context ServletContext servletContext;

@Context UriInfo ui;

private final ThreadLocal<HttpServletRequest> requestInvoker;

private final ThreadLocal<HttpServletResponse> responseInvoker;

private final String basePath;

public JSPTemplateProcessor(
ResourceConfig resourceConfig,
ThreadLocal<HttpServletRequest> requestInvoker,
ThreadLocal<HttpServletResponse> responseInvoker) {

The JSPTemplateProcessor in Jersey 1.1.x is:

public class JSPTemplateProcessor implements TemplateProcessor {
private @Context HttpContext hc;

private @Context ServletContext servletContext;

private @Context ThreadLocal<HttpServletRequest> requestInvoker;

private @Context ThreadLocal<HttpServletResponse> responseInvoker;

private final String basePath;

public JSPTemplateProcessor(
@Context ResourceConfig resourceConfig) {

Note that the sample i pointed you to is not an OSGi-based sample, it will just
create a vanilla war file with jersey 1.0.3.1 jars included in the WEB-INF/lib.

My OSGi knowledge is very limited and Jakub (our resident Jersey expert is on
holiday this week) so i really do not know where to start.

Comment by Sanjeeb Sahoo [ 19/Aug/09 ]

sandoz:
In the case of traditional war, jersey-1.1 is higher up in the classloader
hierarchy, so why does jersey-1.0 get initiated in the first place?

Yes, later on when I looked at jersey-gf-bundle.jar, I realized that
JSPTemplateProcessor was getting picked up from jersey-1.1 implementation. That
leads me to think this class is exported by jersey-gf-bundle. Why? Is it not an
implementation artifact?

I think we should wait for Jakub to be back and then may be he needs to look at
two things:
1. OSGi metadata of Jersey bundle.
2. OSGi metadata of the test bundle to be able to use a bundled jersey
implementation.

Sahoo

Comment by sandoz [ 19/Aug/09 ]

The example i presented would apply for <class-loader delegate="false"/>.

However, the problem would still occur for <class-loader delegate="true"/> would
it not when the following applies?

When two versions of Jersey, 1.0 and 1.1.0 say, are present, the version of
Jersey that gets initiated, say 1.1.0, will also attempt to load components
declared by 1.0 jars because of the way Classloader.getResources works.

Comment by Sanjeeb Sahoo [ 19/Aug/09 ]

OK, I understand why things won't work when delegate=false.

When delegate=true, what is the problem with ClassLoader.getResources. It would
return META-INF/services found in both 1.1 and 1.0 jar, but 1.1 ones would be
ahead of 1.0 ones in the enumeration. How do you select a particular one?
Actually, does the code call getResources or getResource? getResource should
only return 1.1 resource.

Sahoo

Comment by sandoz [ 19/Aug/09 ]

For certain services Jersey selects all classes registered. It then tries to
instantiate them and ignore ones it cannot, reporting the instantiation errors,
and continues processing (a "keep on trucking" strategy).

Alexis said that for class loader <class-loader delegate="false"/> other errors
occurred but i do not know what they were. Alexis?
It is likely that Jersey 1.0 may not be as robust in ignoring certain errors
when attempting to instantiate components. Perhaps a move to Jersey 1.0.3.1 may
help?

Note that a META-INF/services file in say Jersey 1.0 may refer to a class that
still exists in say Jersey 1.1.x but that class is now abstract and is not
referred to in the META-INF/services file of Jersey 1.1.x. And, if course,
similar occurrences are possible if Jersey 1.1.x is loaded before Jersey 1.0.
Errors will be reported and processing will continue but it confuses the heck
out of developers because the situation i described has actually occurred
between 1.1.0 and 1.1.1 and we got some bemused questions.

The issue with including successfully instantiated components from different
versions is that there could be some subtle errors introduced. JAX-RS/Jersey
attempts to ensure that components registered before other components that
intersect in terms of "functionality" have priority. But, i cannot say for sure
whether some really subtle issues may result in the future e.g. an old component
get registered and instantiated successfully that is no longer relevant but yet
causes functional change.

All in all META-INF/services is a PITA! and is not suitable for a version-based
runtime module system where two or more versions of may co-exist in the same VM.

Perhaps we need a way to say in the sun-web.xml "please do include modules X, Y
and Z" in the classpath or a way to declare OSGi dependencies in the sun-web.xml
or at deployment (so the war does not require modification).

Comment by Alexis MP [ 19/Aug/09 ]

sandoz said:
> Alexis said that for class loader <class-loader delegate="false"/> other errors occurred but i do not know what they were. Alexis?

Let me attach files to this case with the full logs for both cases (class-loader delegate set to true or false).
With <class-loader delegate="false"/>, here's the stacktrace :

com.sun.jersey.spi.service.ServiceConfigurationError: com.sun.jersey.spi.HeaderDelegateProvider: The class
com.sun.jersey.core.impl.provider.header.LocaleProvider implementing provider interface com.sun.jersey.spi.HeaderDelegateProvider could not
be instantiated: null
at com.sun.jersey.spi.service.ServiceFinder.fail(ServiceFinder.java:413)
at com.sun.jersey.spi.service.ServiceFinder.access$600(ServiceFinder.java:146)
at com.sun.jersey.spi.service.ServiceFinder$LazyObjectIterator.hasNext(ServiceFinder.java:707)
at com.sun.jersey.impl.provider.RuntimeDelegateImpl.<init>(RuntimeDelegateImpl.java:79)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:65)
at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:117)
at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:105)
at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:91)
at javax.ws.rs.core.EntityTag.<clinit>(EntityTag.java:35)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at $Proxy156.<clinit>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:588)
at com.sun.jersey.impl.application.WebApplicationImpl.createProxy(WebApplicationImpl.java:953)
at com.sun.jersey.impl.application.WebApplicationImpl.<init>(WebApplicationImpl.java:199)
at com.sun.jersey.impl.container.WebApplicationProviderImpl.createWebApplication(WebApplicationProviderImpl.java:52)
at com.sun.jersey.spi.container.WebApplicationFactory.createWebApplication(WebApplicationFactory.java:63)
at com.sun.jersey.spi.container.servlet.ServletContainer.create(ServletContainer.java:548)
at com.sun.jersey.spi.container.servlet.ServletContainer.load(ServletContainer.java:536)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:197)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1410)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1213)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4941)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5296)
at com.sun.enterprise.web.WebModule.start(WebModule.java:509)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:928)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:694)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1796)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1485)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:93)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:223)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:193)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:295)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:175)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:270)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$4.execute(CommandRunnerImpl.java:427)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:437)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:524)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:157)
at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:121)
at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:529)
at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:415)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:347)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:332)
at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:200)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.ClassCastException
at java.lang.Class.cast(Class.java:2990)
at com.sun.jersey.spi.service.ServiceFinder$LazyObjectIterator.hasNext(ServiceFinder.java:665)
... 56 more

Comment by sandoz [ 19/Aug/09 ]

I have just tried deploying 1.0 and 1.0.3.1 helloworld web app samples on GF v3
build 59:

http://download.java.net/maven/2/com/sun/jersey/samples/helloworld-webapp/1.0/helloworld-webapp-1.0-project.zip

http://download.java.net/maven/2/com/sun/jersey/samples/helloworld-webapp/1.0.3.1/helloworld-webapp-1.0.3.1-project.zip

I do not get the same error from within initiation of the JAX-RS RuntimeDelegate.

For 1.0.3.1 i get the following error:

java.lang.ClassCastException
at java.lang.Class.cast(Class.java:2990)
at
com.sun.jersey.core.spi.component.ProviderServices.getProvidersAndServices(ProviderServices.java:122)
at
com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderFactory.init(StringReaderFactory.java:57)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:597)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:414)
at
com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:377)
at
com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:242)
at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:449)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:169)
at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:281)
at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:442)
at javax.servlet.GenericServlet.init(GenericServlet.java:242)

The error is occuring when Jersey 1.0.3.1 is finding and instantiating instances
of StringReaderProvider implementatons registered in
META-INF/services/com.sun.jersey.spi.StringReaderProvider.

The following classes are registered in 1.0.3.1:

com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$TypeValueOf
com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$StringConstructor
com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$DateProvider
com.sun.jersey.server.impl.model.parameter.multivalued.JAXBStringReaderProviders$RootElementProvider

The following classes are registered in 1.1.1-ea:

com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$TypeFromStringEnum
com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$TypeValueOf
com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$TypeFromString
com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$StringConstructor
com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$DateProvider
com.sun.jersey.server.impl.model.parameter.multivalued.JAXBStringReaderProviders$RootElementProvider

I think i can explain this behaviour as follows;

1) When 1.0.3.1 loads a class from a META-INF/services file that is present in
1.0.3.1 it uses class loader, A say.

2) When 1.0.3.1 loads a class from a META-INF/services file that is only
present in 1.1.1-ea it uses class loader, B say.

Class loader A and B will load two different Class instances of
StringReaderProvider, hence the class cast exception: a sub-class of
StringReaderProvider loaded by class loader B cannot be cast to the class of
StringReaderProvder loaded by class loader A.

I think this just re-enforces the requirement to correctly isolate the web app
using an appropriate feature of GF.

Comment by sandoz [ 19/Aug/09 ]

I forgot to state i deployed the samples using <class-loader delegate="false"/>.

Comment by Alexis MP [ 19/Aug/09 ]

Created an attachment (id=3108)
Log for artifactory deployment with class-loader delegate set to "true"

Comment by Alexis MP [ 19/Aug/09 ]

Created an attachment (id=3109)
Log for artifactory deployment with class-loader delegate set to "false"

Comment by sandoz [ 20/Aug/09 ]

1.0 META-INF/services/com.sun.jersey.spi.HeaderDelegateProvider

com.sun.jersey.impl.provider.header.LocaleProvider
com.sun.jersey.impl.provider.header.EntityTagProvider
com.sun.jersey.impl.provider.header.MediaTypeProvider
com.sun.jersey.impl.provider.header.CacheControlProvider
com.sun.jersey.impl.provider.header.NewCookieProvider
com.sun.jersey.impl.provider.header.CookieProvider
com.sun.jersey.impl.provider.header.URIProvider
com.sun.jersey.impl.provider.header.DateProvider
com.sun.jersey.impl.provider.header.StringProvider

1.1.1-ea META-INF/services/com.sun.jersey.spi.HeaderDelegateProvider

com.sun.jersey.core.impl.provider.header.LocaleProvider
com.sun.jersey.core.impl.provider.header.EntityTagProvider
com.sun.jersey.core.impl.provider.header.MediaTypeProvider
com.sun.jersey.core.impl.provider.header.CacheControlProvider
com.sun.jersey.core.impl.provider.header.NewCookieProvider
com.sun.jersey.core.impl.provider.header.CookieProvider
com.sun.jersey.core.impl.provider.header.URIProvider
com.sun.jersey.core.impl.provider.header.DateProvider
com.sun.jersey.core.impl.provider.header.StringProvider

Note that Jersey 1.0 is attempting to instantiate an instance of
"com.sun.jersey.core.impl.provider.header.LocaleProvider" that is declared in
Jersey 1.1.1-ea.

It is the same error that i described previously with StringReaderProvider. In
this case two different Class instances of HeaderDelegateProvider are created by
two different class loaders.

Comment by Jakub Podlesak [ 02/Sep/09 ]

Sahoo: could you please explain a bit, what
install webbundle:file:///tmp/artifactory-2.0.7.war
should do. The jersey jars bundled in the war do not contain any OSGi headers,
and also the jersey (OSGified) jars installed into GlassFish are missing any
version information. How is this supposed to work?

Comment by Sanjeeb Sahoo [ 02/Sep/09 ]

japod:
When you run
install webbundle:file:///tmp/artifactory-2.0.7.war
there is a built in URL handler in the server which will try to add some OSGi
metadata to the war file and the modified war file is installed in the OSGi
framework. You can configure the OSGi metadata by use of URL query parameters.
To see the default OSGi metadata that's generated, perform the above step and
see the OSGi metadata using "headers [bundle-id]" command.

To all:
I think it will help to have a conference call to understand why things don't
work wih the original war file with classloader delegation=true. I am still not
clear despite all the explanations provided by Paul.

Comment by sandoz [ 03/Sep/09 ]

Created an attachment (id=3165)
Simple web-based project reproducing the issues

Comment by sandoz [ 03/Sep/09 ]

I have attached a simple project that shows the cause of the problem and
hopefully that will help in understanding what is going on.

It loads service classes from

META-INF/services/com.sun.jersey.spi.HeaderDelegateProvider

and prints information from each entry like this, when a class is loaded from
the service file present in the war:

Class com.sun.jersey.impl.provider.header.LocaleProvider is assignable to
interface com.sun.jersey.spi.HeaderDelegateProvider
FIND: com.sun.jersey.spi.HeaderDelegateProvider
com/sun/jersey/spi/HeaderDelegateProvider.class
Class loader of class

jar:file:/Users/paulsandoz/Applications/GlassFish/glassfish-v3-preview-b61/glassfishv3/glassfish/domains/domain1/applications/mavenproject5/WEB-INF/lib/jersey-core-1.0.jar!/com/sun/jersey/spi/HeaderDelegateProvider.class
Context class loader

jar:file:/Users/paulsandoz/Applications/GlassFish/glassfish-v3-preview-b61/glassfishv3/glassfish/domains/domain1/applications/mavenproject5/WEB-INF/lib/jersey-core-1.0.jar!/com/sun/jersey/spi/Header

and:

Class com.sun.jersey.core.impl.provider.header.LocaleProvider is NOT assignable
to interface com.sun.jersey.spi.HeaderDelegateProvider
FIND: com.sun.jersey.spi.HeaderDelegateProvider
com/sun/jersey/spi/HeaderDelegateProvider.class
Class loader of class
bundle://6.0:1/com/sun/jersey/spi/HeaderDelegateProvider.class
Context class loader

jar:file:/Users/paulsandoz/Applications/GlassFish/glassfish-v3-preview-b61/glassfishv3/glassfish/domains/domain1/applications/mavenproject5/WEB-INF/lib/jersey-core-1.0.jar!/com/sun/jersey/spi/HeaderDelegateProvider.class

Notice that this shows that two HeaderDelegateProvider classes have been loaded,
one from the jar in the war, and one from GF.

Comment by sandoz [ 03/Sep/09 ]

Note that i forgot to add that i could fix for future releases by performing
isAssignable checks at appropriate places in Jersey's ServiceFinder. This, of
course, is not something that is immediately obvious to do unless one has some
hindsight

However, this may just result in pushing errors somewhere else. What we really
require is a way to isolate the web applications from certain modules
distributed with GF.

Comment by Sanjeeb Sahoo [ 03/Sep/09 ]

OK, I looked at your simplified test case. What you are seeing is a direct
result of switching of classloader delegation by setting delagation=false in
sun-web.xml. I have said this before, I understand why things won't work as
expected when delegation is switched off. Switching off delegation must be a
developer's last resort, as it can lead to all kinds of class constraint
violations.

Run your simple test case with delegation=true (this is the default value) and
tell me what you see. Do you see two versions of
com.sun.jersey.spi.HeaderDelegateProvider.class?

Comment by sandoz [ 03/Sep/09 ]

Class loader delegation set to true works, but... I feel we may be going around
in circles

The war depends Jersey 1.0 APIs in Jersey 1.0 jars to function correctly,
which is why class loader delegation was set to false, so that the Jersey 1.0
jars take precedence.

The war depends on the Jersey Spring integration. Which is why when class loader
delegation is set to true for the war the following exception is thrown:

SEVERE: WebModule[/artifactory]StandardWrapper.Throwable
java.lang.NoSuchMethodError:
com.sun.jersey.spi.container.WebApplication.initiate(Lcom/sun/jersey/api/core/ResourceConfig;Lcom/sun/jersey/spi/service/ComponentProvider;)V
at
org.artifactory.rest.servlet.ArtifactoryRestServlet.initiate(ArtifactoryRestServlet.java:51)
at
com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:242)
at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:455)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:178)
at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:281)
at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:442)
at javax.servlet.GenericServlet.init(GenericServlet.java:242)

(See the attachment that Alexis added).

The ArtifactoryRestServlet is extending the Jersey 1.0 ServletContainer, but in
Jersey 1.1.x the ServletContainer class has changed.

The only way this war will work on GF is if:

1) Jersey in GF is removed; or

2) They developers upgrade their app to the same version as in GF.

I fear are going to run into this issue again and again when GF is released
and potentialy in the future as well, if refactoring of service impl classes
occurs in later versions.

Unfortunately this the Java equivalent of DLL hell. Again, we need a way of
cleanly isolating web app deployments.

Comment by dochez [ 25/Sep/09 ]

providing a complete application isolation is not a supported feature of V3, public libraries should not
break public APIs during a .dot release. We should provide a solution for this problem in the next release.

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.

Comment by Tom Mueller [ 07/Jan/13 ]

Assigning to the classloader component for evaluation.





[GLASSFISH-11611] ejb-jar shared by different applications Created: 25/Feb/10  Updated: 06/Mar/12

Status: Open
Project: glassfish
Component/s: classloader
Affects Version/s: 3.1
Fix Version/s: not determined

Type: New Feature Priority: Major
Reporter: felipegaucho Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 10
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 11,611

 Description   

— Scenario:

  • an ejb-jar containning the code related to a JPA persistence layer.
  • two (or more) web-applications that depends on the above ejb-jar.

— Today solution:

None, people need to invent alternative solutions like to deploy the ejb-jar in
the Glassfish lib folder or to re-pack the ejb-jar in each of the differente
applications. The former solution open a security breach and the latter forces a
complicated synchronization between the deployment artifacts every time the
persistence layer is modified.

People also reported problems using Hibernate with the ejb-jar shared through
the Glassfish lib folder. Since a Stateless session bean is already loaded in
one classloader, Glassfish throws exceptions if a second application tries to
load the same EJB.

— Proposed feature:

Glassfish should support the deployment of ejb-jar as "sharable resource",
including security management on what application can access the resource and
managing the classloader issues related to such feature.



 Comments   
Comment by rodgarcialima [ 25/Feb/10 ]
      • Issue 11611 has been confirmed by votes. ***
Comment by vladperl [ 25/Feb/10 ]

There are plenty cases when the deployment of ejb-jar as "sharable resource" make
perfect sense.

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.





[GLASSFISH-21393] NoClassDefFoundError: com/sun/xml/xwss/SecurityConfigurationFactory on glassfish 3.1.2.2 Created: 27/Jul/15  Updated: 28/Jul/15

Status: Open
Project: glassfish
Component/s: classloader
Affects Version/s: 3.1.2.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: wietli Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows, GF 3.1.2.2, Netbeans 8.0.2



 Description   

I'm trying to get a project with Webservices running on Glassfish 3.1.2.2 (Metro-stack).

The problematic code-sequence is as follows:

XWSSecurityConfiguration config = SecurityConfigurationFactory.newXWSSecurityConfiguration(USER_PASS_AUTHENTICATE_STREAM);

The project works fine on GF 2.X but on GF 3.1.2.2 I get the following Exception:

Warnung: StandardWrapperValve[Control]: PWC1406: Servlet.service() for servlet Control threw exception javax.ejb.EJBException at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5215) at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5113) at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4901) at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2045) at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1994) at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:222) at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:89) at com.sun.proxy.$Proxy186.connectJmsListener(Unknown Source) at ch.medidata.mp.ebpp.postfinance.ui.web.Control.startup(Control.java:327) at ch.medidata.mp.ebpp.postfinance.ui.web.Control.processRequest(Control.java:241) at ch.medidata.mp.ebpp.postfinance.ui.web.Control.doGet(Control.java:711) at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NoClassDefFoundError: com/sun/xml/xwss/SecurityConfigurationFactory at ch.xx.WebAccess.(PostfinanceWebAccess.java:159) at ch.xx.WebAccessBean.init(PostfinanceWebAccessBean.java:707) at ch.xx.WebAccessBean.connectJmsListener(PostfinanceWebAccessBean.java:619) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052) at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124) at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388) at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619) at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800) at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571) at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162) at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861) at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800) at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370) at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360) at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348) at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214) ... 31 more Caused by: java.lang.ClassNotFoundException: com.sun.xml.xwss.SecurityConfigurationFactory at com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:808) at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:696) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 56 more

I can find the class SecurityConfigurationFactory in webservices-osgi.jar in glassfish-3.1.2.2\glassfish\modules among other classes needed (example 'XWSSecurityConfiguration').

When I copy webservices-osgi.jar to domains lib folder, I get a class-cast-Exception.

Has anyone experienced this problem before? Does anyone know what I'm doing wrong?

Thanks in advance!



 Comments   
Comment by wietli [ 28/Jul/15 ]

Is anyone watching this bug?





[GLASSFISH-21224] Jenkins does not start after update from GlassFish 4.0 to 4.1 Created: 08/Oct/14  Updated: 07/Mar/16

Status: Open
Project: glassfish
Component/s: classloader
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: kazssym Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS: Debian GNU/Linux 7.6 (i386)
JDK: openjdk-7-* packages from Debian

OpenJDK Runtime Environment (IcedTea 2.5.1) (7u65-2.5.1-5~deb7u1)
OpenJDK Client VM (build 24.65-b04, mixed mode, sharing)



 Description   

Today I updated my installation of GlassFish 4.0 to 4.1 with the Update Tool. After that Jenkins (I redeployed the latest version 1.583) has not been starting at all. The GlassFish server.log contains the following error:

[2014-10-08T15:44:03.852+0900] [glassfish 4.1] [SEVERE] [] [hudson.util.BootFailure] [tid: _ThreadID=223 _ThreadName=Jenkins initialization thread] [timeMillis: 1412750643852] [levelValue: 1000] [[
Failed to initialize Jenkins
hudson.util.HudsonFailedToLoad: java.lang.NullPointerException
at hudson.WebAppMain$3.run(WebAppMain.java:234)
Caused by: java.lang.NullPointerException
at org.glassfish.web.loader.WebappClassLoader.findResourceInternalFromJars(WebappClassLoader.java:2976)
at org.glassfish.web.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2846)
at org.glassfish.web.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2736)
at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1194)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1750)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1633)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2570)
at java.lang.Class.getDeclaredMethods(Class.java:1855)
at org.jvnet.hudson.annotation_indexer.Index$2$1.fetch(Index.java:102)
at org.jvnet.hudson.annotation_indexer.Index$2$1.hasNext(Index.java:72)
at org.jenkinsci.bytecode.TransformationSpec.loadRule(TransformationSpec.java:63)
at org.jenkinsci.bytecode.Transformer.loadRules(Transformer.java:40)
at org.jenkinsci.bytecode.Transformer.loadRules(Transformer.java:24)
at hudson.PluginManager.<init>(PluginManager.java:190)
at hudson.LocalPluginManager.<init>(LocalPluginManager.java:47)
at jenkins.model.Jenkins.<init>(Jenkins.java:787)
at hudson.model.Hudson.<init>(Hudson.java:82)
at hudson.model.Hudson.<init>(Hudson.java:78)
at hudson.WebAppMain$3.run(WebAppMain.java:222)
]]

It could be an indication of a potential bug in Jenkins but the NPE happens in org.glassfish.web.loader.WebappClassLoader.findResourceInternalFromJa
rs and it has not been a problem with GlassFish 4.0, it may be possibly a regression bug in GlassFish 4.1.



 Comments   
Comment by kazssym [ 13/Oct/14 ]

To reproduce the problem, I downloaded glassfish-4.1.jar and made a fresh instance on another machine. On that machine, I could deploy jenkins.jar and the Jenkins appears to run correctly. So this problem may be due to my upgraded environment.

I will recheck my deployed instance again.

Comment by kazssym [ 13/Oct/14 ]

I tried in a simpler installation with Jenkins as the only application in the admin server. I had no problem using the exactly same ~/.jenkins workspace. I cannot still resolve the issue yet, but I found this in the server.log:

[2014-10-13T16:06:49.439+0900] [glassfish 4.1] [SEVERE] [] [hudson.util.BootFail
ure] [tid: _ThreadID=123 _ThreadName=Jenkins initialization thread] [timeMillis:
 1413184009439] [levelValue: 1000] [[
  Failed to initialize Jenkins
hudson.util.HudsonFailedToLoad: java.lang.IllegalStateException: second instance
        at hudson.WebAppMain$3.run(WebAppMain.java:234)
Caused by: java.lang.IllegalStateException: second instance
        at jenkins.model.Jenkins.<init>(Jenkins.java:741)
        at hudson.model.Hudson.<init>(Hudson.java:82)
        at hudson.model.Hudson.<init>(Hudson.java:78)
        at hudson.WebAppMain$3.run(WebAppMain.java:222)
]]

This may indicates Jenkins' initialization was run multiple times.

Comment by kazssym [ 13/Oct/14 ]

I finally found that Jenkins fails to start on a cluster instance. I could start it on a standalone instance if I enabled Jenkins on that instance only.

Comment by petrjanata [ 07/Mar/16 ]

Hi, I have also experienced NPE from WebappClassLoader.findResourceInternalFromJars.
It is hard to provide a reproducible test case, because it is triggered by race condition.
I presume that the problem is caused by incorrect synchronization around instance variable JarFile[] jarFiles of WebappClassLoader.

I have seen during debugging that this array initially contains all jar files from the application WAR.

[ jar1, jar2, jar3 ]

When the NPE happens, the array has the same length, but from some index all elements are null.

[ jar1, null, null ]

Method closeJARs synchronizes on jarFiles but does not make a defensive copy of the reference. Other methods replace instance variable jarFiles with a new array. The closeJARs than happily nullifies the new array from some index.
Even worse, the reference to this array is leaked to other classes (WebDirContext) that do not use any synchronization at all.

There are probably some other problems too. I will try to provide patch with proper synchronization next week.





[GLASSFISH-20811] Classpath issues with embedded Glassfish 4.0 and Guava 15.0 (Google Collection library) Created: 16/Sep/13  Updated: 03/Oct/13

Status: Open
Project: glassfish
Component/s: classloader, embedded, packaging
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: truemmer666 Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 9
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Maven 3.0.5, glassfish-embedded-all 4.0, arquillian 1.1.1.FINAL, arquillian-glassfish-embedded-3.1 1.0.0.CR4, Guava 15.0


Tags: classpath, embedded, guava

 Description   

We're unable to run Unit Tests with Arquillian and embedded Glassfish 4.0 if an application under test is using Guava 15.0.
The tests work with older versions of Guava (for example 13.01). The problem seems to originate in Glassfish using its own version of the Googles Collection library, which is subject to change and has been moved into the Guava project.

Can you guys suggest a solution to this problem, or do you know any good workarounds?

This is mentioned on the Guava-Homepage:

Guava contains a strictly compatible superset of the old, deprecated Google Collections Library. You should not use that library anymore.

This is the stack trace which occurs during deployment:

Sep 16, 2013 10:37:50 AM com.sun.enterprise.v3.server.ApplicationLifecycle deploy
SEVERE: Exception during lifecycle processing
java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class org.jboss.weld.logging.WeldMessageConveyor
	at org.jboss.weld.logging.WeldMessageConveyor.<init>(WeldMessageConveyor.java:61)
	at org.jboss.weld.logging.WeldMessageConveyerFactory.getDefaultMessageConveyer(WeldMessageConveyerFactory.java:27)
	at org.jboss.weld.logging.LoggerFactory.<init>(LoggerFactory.java:37)
	at org.jboss.weld.logging.LoggerFactory.loggerFactory(LoggerFactory.java:53)
	at org.jboss.weld.bootstrap.WeldBootstrap.<clinit>(WeldBootstrap.java:164)
	at org.glassfish.weld.WeldDeployer.load(WeldDeployer.java:441)
	at org.glassfish.weld.WeldDeployer.load(WeldDeployer.java:100)
	at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
	at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
	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.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:133)
	at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:109)
	at org.jboss.arquillian.container.glassfish.embedded_3_1.GlassFishContainer.deploy(GlassFishContainer.java:227)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
	at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
	at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
	at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
	at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
	at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
	at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
	at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
	at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
	at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)
	at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:182)
	at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
	at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
	at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)


 Comments   
Comment by Yser [ 16/Sep/13 ]

I had the same problem with testing a EJB-Archive with the embedded EJBContainer.
As a workaround I just removed the beans.xml from the archive and it worked for me, maybe that helps you.

Comment by obfischer [ 17/Sep/13 ]

The problem is that embedded Glassfish is a uberjar therefore we are not able to take influence on the dependencies provided by it. I had similar issues with embedded Glassfish and created GLASSFISH-20806 as RFE.

Comment by truemmer666 [ 17/Sep/13 ]

The problem is that MapMaker is deprecated and methods have been removed or moved to CacheBuilder.

makeComputingMap(Function<? super K,? extends V> computingFunction)

Deprecated.
Caching functionality in MapMaker is being moved to CacheBuilder, with makeComputingMap(com.google.common.base.Function<? super K, ? extends V>) being replaced by CacheBuilder.build(com.google.common.cache.CacheLoader<? super K1, V1>). See the MapMaker Migration Guide for more details. This method is scheduled for deletion in February 2013.

Comment by javaneze [ 03/Oct/13 ]

We have the same issue with Emb. GlassFish 3.1.2 and Guava 1.5 (it hit us just after I updated the version). It would be nice for GlassFish to remove this
restriction and make sure is using Guava as a proper dependency.

Thanks!





[GLASSFISH-20907] Admin Console stops working when an application bundled with jersey-1.x.jar and classloader set to delegate false Created: 21/Nov/13  Updated: 20/Dec/16

Status: Open
Project: glassfish
Component/s: admin_gui, classloader
Affects Version/s: 4.0_dev
Fix Version/s: future release

Type: Bug Priority: Major
Reporter: iesen Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: admin-gui

 Description   

A web application bundled with its own Jersey implementation (which is 1.x) crashes admin console after server restart. The application has glassfish-web.xml config file for classloading settings (delegate=false).

Exception is :
java.lang.AbstractMethodError: javax.ws.rs.core.UriBuilder.uri(Ljava/lang/String;)Ljavax/ws/rs/core/UriBuilder;

Looking at the verbose classloading output (-verbose:classes), admin console application grab Jersey 1.x classes from deployed application in applications folder. Manually deleting jersey 1.x jar from application's folder solves the exception and admin console starts. But is it not possible to deploy a Jersey 1.x application to Glassfish4?



 Comments   
Comment by Anissa Lam [ 21/Nov/13 ]

Assign to Sahoo for initial evaluation regarding class loading. Not sure console can do much on this.





[GLASSFISH-20850] classloader favors modules/guava.jar over guava library in the ear Created: 11/Oct/13  Updated: 01/May/16

Status: Open
Project: glassfish
Component/s: cdi, classloader
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Thomas Andres Assignee: Romain Grécourt
Resolution: Unresolved Votes: 19
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to JERSEY-1884 Jersey 2.0 Maven artiifact depends on... Closed

 Description   

I tried to upgrad the guava library in our application to version 15-0. When I deploy the application on glassfish 4.0, I see the following Exception:

Caused by: java.lang.NoSuchMethodError: com.google.common.base.Stopwatch.createStarted()Lcom/google/common/base/Stopwatch;
at MyClient.buildClient(MyClient.java:159)
at MyClient.initClient(MyClient.java:143)
at MyClient.<init>(MyClient.java:74)
at MyClient.<init>(MyClient.java:62)
at MyClientFactory.createClient(MyClientFactory.java:12)
at MyClientProducer.createClient(MyClientProducer.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93)

To verify where the class is loaded from, I added:
URL resource = this.getClass().getClassLoader()
.getResource(Stopwatch.class.getName().replaceAll("
.", "/") + ".class");
LOGGER.info("URL for Stopwatch:" + resource.toString());
which gives me
URL for Stopwatch:bundle://108.0:1/com/google/common/base/Stopwatch.class

MyClient, MyClientFactory and MyClientProducer are all inside an ejb jar file.
guava-15.0.jar is in a lib folder next to the ejb jar (with lib/guava-15.0.jar in the ear META-INF/MANIFEST.MF Class-Path)

All other libraries there can be found. It just seems, that the weld classloader favors the guava.jar bundled with glassfish 4 over the one I provide for the application. I would expect the classloader to give stuff deployed with the ear a higher priority.



 Comments   
Comment by Thomas Andres [ 11/Oct/13 ]

BTW: Deploying the same ear on glassfish 3.1.2.2 works. The guava class is loaded correctly from the jar inside my ear.

(with a patched beans.xml, but that's another story...)

Comment by Joe Di Pol [ 11/Oct/13 ]

When we have had similar problems in the past the issue was that an OSGi module was exporting packages without any mechanism to prevent them from being found by the application's hierarchy of class loaders.

The solution was to add mandatory OSGi attributes to the exported packages that must be declared by any other module that wanted to import the packages. This prevents the API/Packages from leaking into the application space. I looked at guava.jar and it does not appear to do this – so maybe this is the problem.

For some additional information on this issue see the following:

https://java.net/jira/browse/GLASSFISH-5385
https://java.net/jira/browse/GLASSFISH-18176

Comment by simon.schlachter [ 31/Oct/13 ]

Exactly the same problem here.

Comment by simon.schlachter [ 01/Nov/13 ]

We were able to workaround the problem, by "patching" the manifests (MANIFEST.MF) of the included guava.jar file and its dependencies.

in guava we added ;mandatory:=password;password="GlassFish to all export-statements.

In the dependent modules we added ;password="GlassFish" to all import statements concerning com.google.common.*

The list of modules we had to patch is

  • jersey-bean-validation.jar
  • jersey-client.jar
  • jersey-common.jar
  • jersey-container-servlet-core.jar
  • jersey-container-servlet.jar
  • jersey-gf-cdi.jar
  • jersey-media-moxy.jar
  • jersey-mvc-jsp.jar
  • jersey-mvc.jar
  • jersey-server.jar

The effect of this change is that guava.jar-classes do no longer leak into the class path of our deployed application. This solves the guava-version-problem for us. The root problem, however, is not solved: Glassfish still favors its own classpath instead of that of the deployed application.

(The Idea for this workaround is originally from GLASSFISH-5385)

Comment by hsaqallah [ 14/Feb/14 ]

Patching GF4's files is error-prone and very impractical for a sane development/test/stage/prod environment. There should have been an easier fix. Too bad. Time to switch to Tomcat 7.

Comment by gcruscoe [ 21/Jul/14 ]

#fishcat

Testing glassfish 4.0.1 b08. I am having this issue with the moduels/guava.jar being used over the guava I have in my .ear project. It is preventing migration from 3.1.2.2 to 4.0.1. This seems like a critical issue that should be fixed for b09. It makes it impossible to even test the rest of the system if your app is using a different / incompatible version of guava.

Also this links a bug that says Jersey is going to fix theirs and when it is incorporated it will fix this. I think that version of Jersey has been incorporated but this issue is still there.

Comment by cristim1979 [ 20/Aug/14 ]

We also encountered the same defect with our application which uses Guava 17.0, and which used to work well on Glassfish 3.1.2.2.
But on Glassfish 4.0 it crashed at deploy; to fix it, we came in the end to same workaround like described by simon.schlachter above - patch 11 of the jars in \modules\ folder. But this is very impractical for a clean/official upgrade to 4.0.

Comment by Thomas Andres [ 22/Aug/14 ]

I just did a quick test with our application on glassfish 4.1 (currently on glassfish 4.0)
Most work out of the box without any changes. Compliments on that!

However I noticed this issue got a bit worse, since v4.1 now has guava v13 bundled which is a downgrade from v14 in GF4.0. (WTF??? what's the reason for this?)
I hope you can fix this for 4.1 release.

Comment by Romain Grécourt [ 22/Aug/14 ]

guava is a dependency for both weld and jersey.
Jersey now shadows what it needs, what remains is weld's dependency.

It's too late to be included in 4.1 release (it will go in the next one).
The workaround is the same, but only involves guava + weld jars.

Comment by Thomas Andres [ 22/Aug/14 ]

But what's the reason to downgrade the guava libray? This will cause additional problem to people who now use guvava v14 to avoid this problem.

Comment by Romain Grécourt [ 22/Aug/14 ]

In v4, guava was provided twice: guava.jar (for jersey) and weld-osgi-bundle.jar: both are using different versions.
In v4.1 Jersey has removed its guava dependency (it's now shadowed).

As of weld 2.1.0.Beta2 guava is not part of weld-osgi-bundle.jar, but just an OSGi dependency.
GlassFish 4.1 bundles weld 2.2.2.Final, that's why we are providing a different guava version than what was in 4.0.

Comment by Thomas Andres [ 22/Aug/14 ]

Thanks for the explanation. Looks strange when you look just at the jar, but makes sense like this.
I just tried replacing guava.jar with the version provided with v4 and that works fine so far. You might wanna consider doing that if you can't fix this issue, since that makes at least the transition from v4 to v4.1 a bit smoother.

Comment by lprimak [ 26/Aug/14 ]

I just put guava-17.jar into Glassfish modules/ directory ant it worked.
Had to delete osgi-cache/* from the domain (but only once after the patch)

Is this not simpler than the other patch in the comments above?

Comment by Romain Grécourt [ 26/Aug/14 ]

This is a server wide workaround (you may want to test a few CDI things though).
The one described above (password=GlassFish) applies for applications (i.e WEB-INF/lib).

Comment by vps [ 24/Feb/15 ]

Still same in 4.1.b13.

I ended up using a custom class loader to work around this.
The code is below, if anyone's interested; obviously it's only meant to solve my particular problem, but can be easily changed to prevent delegation for more classes.
When I started, I tried to prevent delegation of everything, but quickly run into problems with the fact that I package (for some reason) too much API classes (JTA was the first that hit me). Even passing java* packages didn't help, as there was some problem with JSF classes, exacerbated by the fact that I had JSF that was older than what's in GF. It was quicker for me to just limit the delegation to the package prefix that I care about, then to clean up my EAR libraries (I'm sure most of the stuff that I package is my fault, and shouldn't be done that way)

I think the glassfish-application.xml should have a section that describes what should and should not be delegated, based on list of RegEx of class names. Then the EAR library classloader should use that list to determine what to delegate and what to not - this will give flexibility to solve virtually any use cases. I recall WebLogic has something that does that. In all cases, it's reasonable to expect that both GF will need to carry some libraries, and the application carry the same, and they may be in severe conflict, and that may be by design.

EarLibClassLoader.java
/*
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 *
 * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
 *
 * The contents of this file are subject to the terms of either the GNU
 * General Public License Version 2 only ("GPL") or the Common Development
 * and Distribution License("CDDL") (collectively, the "License").  You
 * may not use this file except in compliance with the License.  You can
 * obtain a copy of the License at
 * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
 * or packager/legal/LICENSE.txt.  See the License for the specific
 * language governing permissions and limitations under the License.
 *
 * When distributing the software, include this License Header Notice in each
 * file and include the License file at packager/legal/LICENSE.txt.
 *
 * GPL Classpath Exception:
 * Oracle designates this particular file as subject to the "Classpath"
 * exception as provided by Oracle in the GPL Version 2 section of the License
 * file that accompanied this code.
 *
 * Modifications:
 * If applicable, add the following below the License Header, with the fields
 * enclosed by brackets [] replaced by your own identifying information:
 * "Portions Copyright [year] [name of copyright owner]"
 *
 * Contributor(s):
 * If you wish your version of this file to be governed by only the CDDL or
 * only the GPL Version 2, indicate your decision by adding "[Contributor]
 * elects to include this software in this distribution under the [CDDL or GPL
 * Version 2] license."  If you don't indicate a single choice of license, a
 * recipient has the option to distribute your version of this file under
 * either the CDDL, the GPL Version 2 or to extend the choice of license to
 * its licensees as provided above.  However, if you add GPL Version 2 code
 * and therefore, elected the GPL Version 2 license, then the option applies
 * only if the new code is made subject to such option by the copyright
 * holder.
 */

package org.glassfish.javaee.full.deployment;

import java.net.URL;
import com.sun.enterprise.loader.ASURLClassLoader;
//import com.sun.enterprise.util.CULoggerInfo;
import java.util.logging.Logger;
import java.util.logging.LogManager;
import java.util.logging.Level;
import java.util.regex.*;
import java.util.*;

/**
 * Classloader that is responsible to load the ear libraries (lib/*.jar etc)
 *
 */
public class EarLibClassLoader extends ASURLClassLoader
{

    // private static final Logger _logger=CULoggerInfo.getLogger();
    // private static final Logger _logger=LogManager.getLogManager().getLogger("earcl");
    private static final Logger _logger=Logger.getLogger("earcl");

    private static final Collection<Pattern> preventDelegate =
        new ArrayList<Pattern>();

    static {
        preventDelegate.add(Pattern.compile("^com\\.google\\..*$"));
    }

    public EarLibClassLoader(URL[] urls, ClassLoader classLoader) {
        super(classLoader); 

        for (URL url : urls) {
            addURL(url);
        }
    }

    @Override
    protected String getClassLoaderName() {
        return "EarLibClassLoader";
    }

    @Override
    protected Class<?> findClass(String name) throws ClassNotFoundException {
        try {
            Class<?> c = super.findClass(name);
            // _logger.log(Level.INFO, "findClass() called for "+name + "->found");
            return c;
        } catch (ClassNotFoundException e) {
            // _logger.log(Level.INFO, "findClass() called for "+name + "->NOT FOUND");
            throw e;
        }
    }


    @Override
    protected Class<?> loadClass(String name, boolean r) throws ClassNotFoundException {

        // let's make it non-delegating!

        // logger.log(Level.INFO, "EAR loading "+name+", resolve:"+r);

        boolean matched = false;
        for (Pattern p : preventDelegate) {
            Matcher m = p.matcher(name);
            if (m.matches()) {
                matched = true;
                break;
            }
        }

        if (!matched) {
            try {
                Class<?> c = super.loadClass(name,r);
                // logger.log(Level.INFO, "not matched "+name+", delegating -> found");
                return c;
            } catch (ClassNotFoundException e) {
                // logger.log(Level.INFO, "not matched "+name+", delegating -> NOT FOUND");
                throw e;
            }
        }
    
        synchronized (getClassLoadingLock(name)) {

            ClassNotFoundException toThrow = null;

            Class<?> c = findLoadedClass(name);
            if (c == null) {
            
                try {
                    c = findClass(name);
                    // logger.log(Level.INFO, "-> self found class"+name+", will return.");
                } catch (ClassNotFoundException ne) {
                    toThrow = ne;
                    // _logger.log(Level.INFO, "-> self could not find class "+name);
                }
            
            }

            if (c == null) {
                ClassLoader parent = getParent();
                if (parent == null) {
                    // _logger.log(Level.INFO, "-> no parent, throwing CNF for "+name);
                    throw toThrow;
                }
                try {
                    c = parent.loadClass(name);
                    // _logger.log(Level.INFO, "-> parent loaded class "+name);
                } catch (ClassNotFoundException ignored) {
                    // _logger.log(Level.INFO, "-> parent could not load class, throwing CNF for "+name);
                    throw toThrow;
                }
            } else {
                // _logger.log(Level.INFO, "-> self class "+name+" is already loaded");
            }

            if (r) {
                // _logger.log(Level.INFO, "-> resolving class");
                resolveClass(c);
            }

            return c;

        }
    
    }

}

Applying this to GF:

# make sure JDK 1.8 is used
# note that the output is written to /tmp/bout
mkdir -p /tmp/bout
/opt/java/jdk1.8/bin/javac -d /tmp/bout/ -cp ~/soft/glassfish4/glassfish/lib/appserv-rt.jar: EarLibClassLoader.java
# now, we need to update the .jar file that contains that class
# it's expected that GlassFish distribution is unzipped somewhere
# change to glassfish home directory before running the next lines
cd glassfish/modules
# let's unzip existing .jar that needs to be updated
mkdir -p _z
cd _z
unzip ../deployment-javaee-full.jar
# copy the modified .class
# note that current directory is _z where we unpacked the existing .jar
cp /tmp/bout/org/glassfish/javaee/full/deployment/EarLibClassLoader.class org/glassfish/javaee/full/deployment/EarLibClassLoader.class
# let's update the .jar file. Note that the jar command is crazy, but we must preserve the manifest!
/opt/java/jdk1.8/bin/jar uvfmM  ../deployment-javaee-full.jar META-INF/MANIFEST.MF .
# now, if necessary, we can update the distribution
# change to the directory that contains the glassfish4 directory as was extracted from .zip file
cd /opt/soft
zip -u glassfish-4.1.zip glassfish4/glassfish/modules/deployment-javaee-full.jar
Comment by lprimak [ 24/Feb/15 ]

How do I apply the above code in my Glassfish installation?

Comment by lprimak [ 25/Feb/15 ]

Ah, this is unfortunate. It requires patching the server itself.
This needs to be fixed by GlassFish team IMHO.

Comment by kithouna [ 02/Jun/15 ]

Simple workaround: I added <class-loader delegate="false"/> to glassfish-web.xml, now Guava is loaded from the WAR.

Comment by lprimak [ 02/Jun/15 ]

Does this work for ear files?

Comment by gabor.varga [ 04/Jun/15 ]

If you set <class-loader delegate="false"/>, JNDI lookups (e.g. with InitialContext.lookup() will fail.

Comment by lprimak [ 07/Sep/15 ]

Just to recap the current status of this issue:
JARs in GF modules/ directory erroneously take precedence of JARs in user specified applications
Examples:

  • guava.jar
  • jackson-*.jar
  • Others?

Here are the current observations:

  •  <class-loader delegate="false"/> 

    works correctly for, but only for WAR files that have guava.jar and other JARs in it's lib/ directory

  • does NOT work correctly if updated JARs are in domain/lib directory
  • vps's patch above works correctly, but only for skinny WARs or EJB-JARs inside EAR files
  • simon.schlachter's patch above was not tested due to it's implementation complexity
Comment by lprimak [ 17/Apr/16 ]

Payara team is actively working to fix this issue

Comment by Thomas Andres [ 18/Apr/16 ]

Thanks for the information. Is there a payara issue to track for news regarding this issue?

Comment by lprimak [ 18/Apr/16 ]

Yes, Thomas,

https://github.com/payara/Payara/issues/419
https://github.com/payara/Payara/issues/431

Comment by lprimak [ 01/May/16 ]

This issue is now fixed in Payara, should be out with the next release (.162)
The functionality is enabled globally with system property:

fish.payara.classloading.delegate=false

similar to configuration in glassfish-web.xml

Also, the functionality can be enabled in individual EAR files with the entry:

<classloading-delegate>false</classloading-delegate>

in glassfish-application.xml





[GLASSFISH-20035] Revise ASURLClassLoader and WebappClassLoader to allow pass in of permissions through the class constructor Created: 25/Mar/13  Updated: 27/Mar/13

Status: Open
Project: glassfish
Component/s: classloader, deployment
Affects Version/s: None
Fix Version/s: future release

Type: Improvement Priority: Major
Reporter: spei Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

ASURLClassLoader and WebappClassLoader have methods addDeclaredPermmissions and addEEPermissions(). Currently code based permission check are used to protect these two methods, so application code can not directly call them.

As discussed with Ron, a better/clean approach would be to refactor the ASURLClassLoader (and its derived classes) and WebappClassLoader constructors to allow the pass in of permissions.

Also, Module Handler.getClassLoader() needs a new overloaded version to allow pass permissions to the classloader.

The permissions to be passed in include two PermissionCollection sets. Maybe, just include com.sun.enterprise.security.integration.PermsHolder in the constructor, and in the getClassloader method.

After this bug is fixed, then I can refactor the addDeclaredPermmissions and addEEPermissions methods.



 Comments   
Comment by Sanjeeb Sahoo [ 27/Mar/13 ]

Too late to fix in 4.0





[GLASSFISH-19806] usage of internal proprietary API in appserver/common/glassfish-ee-api Created: 08/Mar/13  Updated: 20/Dec/16

Status: Open
Project: glassfish
Component/s: classloader
Affects Version/s: 4.0_dev
Fix Version/s: future release

Type: Improvement Priority: Major
Reporter: Romain Grécourt Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
blocks GLASSFISH-19812 Prevent usage of proprietary API" war... Open
Tags: build, common, maven, proprietary-api, warning

 Description   
{nofomat}
[WARNING] appserver/common/glassfish-ee-api/src/main/java/com/sun/appserv/ClassLoaderUtil.java:[54,15] URLClassPath is internal proprietary API and may be removed in a future release
[WARNING] appserver/common/glassfish-ee-api/src/main/java/com/sun/appserv/ClassLoaderUtil.java:[114,32] URLClassPath is internal proprietary API and may be removed in a future release
[WARNING] appserver/common/glassfish-ee-api/src/main/java/com/sun/appserv/ClassLoaderUtil.java:[115,29] URLClassPath is internal proprietary API and may be removed in a future release
[WARNING] appserver/common/glassfish-ee-api/src/main/java/com/sun/appserv/ClassLoaderUtil.java:[116,29] URLClassPath is internal proprietary API and may be removed in a future release
[WARNING] appserver/common/glassfish-ee-api/src/main/java/com/sun/appserv/ClassLoaderUtil.java:[118,44] URLClassPath is internal proprietary API and may be removed in a future release
[WARNING] appserver/common/glassfish-ee-api/src/main/java/com/sun/appserv/ClassLoaderUtil.java:[200,12] URLClassPath is internal proprietary API and may be removed in a future release
[WARNING] appserver/common/glassfish-ee-api/src/main/java/com/sun/appserv/ClassLoaderUtil.java:[200,32] URLClassPath is internal proprietary API and may be removed in a future release{nofomat}

 Comments   
Comment by Romain Grécourt [ 08/Mar/13 ]

Tom, I was not able to find a component for this.
Can you please forward this to the right person ?

Thanks.

Comment by Tom Mueller [ 08/Mar/13 ]

Guessing at the category (since ClassLoader is in the name of the class).





[GLASSFISH-18886] Glassfish exposes the internal modules/osgi bundles for the deployed applications Created: 11/Jul/12  Updated: 21/Sep/15

Status: Open
Project: glassfish
Component/s: classloader, OSGi
Affects Version/s: 3.1
Fix Version/s: 4.1.1

Type: Bug Priority: Major
Reporter: Ervin88 Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GNU/Linux 2.6.18-238.el5 x86_64


Tags: eclipse, modules, moxy, osgi

 Description   

A Java EE compliant application server should not expose its internal modules to the applications.

We are using the Eclipse Moxy 2.3.2 in our application that is deployed to a Glassfish 3.1 instance. Moxy 2.3.2 depends on the org.eclipse.persistence.core 2.3.2 artifact. Furthermore, GF 3.1 also contains an org.eclipse.persistence.core(with version 2.2.0) artifact as an osgi bundle in the as-install/glassfish/modules directory. The problem is that the Glassfish/osgi framework exposes the classes to our application from the osgi bundle in the glassfish's modules dir.






[GLASSFISH-19017] ClassNotFoundException while deploying EAR with multiple WARs on Glassfish v3.1.2. Created: 17/Aug/12  Updated: 01/Jul/13

Status: Open
Project: glassfish
Component/s: classloader
Affects Version/s: 3.1.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: TaranSingh Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7/ Java 7/ Glassfish 3.1.2



 Description   

We are migrating from GF v2.1.1 to GF 3.1.2.
We have quite big EAR project that has got multiple WARs and and EJB jar project. While deploying the EAR I get ClassNotFoundException. The issue is with one of the WAR module. I can see the classes sitting inside the WEB-INF/lib of this WAR module say test.war, however GF doesn't seem to look it. Now prior to that there was similar issue with another WAR say xyz.war where we were using some of the old JAXB libraries. I had managed to get this xyz WAR deployed by setting delegation=false. I tried the same approach of having another sun-web.xml with delegation=false in this test WAR project as well but with no luck. I'm confused what is happening here. Any help is appreciated. Thanks

stack trace
-------------------

[#|2012-08-17T11:00:24.017+0100|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=116;_ThreadName=Thread-2;|WEB0671: Loading application matm#test.war at [/test]|#]

[#|2012-08-17T11:00:26.203+0100|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.org.glassfish.web.loader|_ThreadID=116;_ThreadName=Thread-2;|WEB9052: Unable to load class org.apache.cxf.jaxrs.provider.AtomEntryProvider, reason: java.lang.ClassNotFoundException: org.apache.cxf.jaxrs.provider.AtomEntryProvider|#]

[#|2012-08-17T11:00:26.206+0100|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.org.glassfish.web.loader|_ThreadID=116;_ThreadName=Thread-2;|WEB9052: Unable to load class org.apache.cxf.jaxrs.provider.XPathProvider, reason: java.lang.ClassNotFoundException: org.apache.cxf.jaxrs.provider.XPathProvider|#]

[#|2012-08-17T11:00:26.209+0100|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.org.glassfish.web.loader|_ThreadID=116;_ThreadName=Thread-2;|WEB9052: Unable to load class org.apache.cxf.jaxrs.provider.JSONProvider, reason: java.lang.ClassNotFoundException: org.apache.cxf.jaxrs.provider.JSONProvider|#]

[#|2012-08-17T11:00:26.211+0100|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.org.glassfish.web.loader|_ThreadID=116;_ThreadName=Thread-2;|WEB9052: Unable to load class org.apache.cxf.jaxrs.provider.FormEncodingProvider, reason: java.lang.ClassNotFoundException: org.apache.cxf.jaxrs.provider.FormEncodingProvider|#]



 Comments   
Comment by TaranSingh [ 20/Aug/12 ]

It looks to be that the EAR loader is complaining about the libraries as they are sitting inside the WEB-INF/lib directory of WAR. The libraries are in fact available at runtime and the application module is available. Please confirm is my understanding is correct and point to any relevant article if possible which explains how ear with multiple war is loaded and what takes preference. You may close the bug too. Thanks.

Comment by ymajoros [ 01/Jul/13 ]

Looks like https://java.net/jira/browse/JAVASERVERFACES-1995 and https://java.net/jira/browse/GLASSFISH-16249





[GLASSFISH-21590] Can't create Connector Connection Pool for inbound RA deployed on a cluster Created: 16/Nov/16  Updated: 11/Jan/17

Status: Open
Project: glassfish
Component/s: admin, classloader
Affects Version/s: 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: gregn123 Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If an Inbound Resource Adapter (RA) is deployed on a cluster, then subsequent creation of a Connector Connection Pool for that RA will fail, due to a ClassNotFoundException for the ActivationSpec class.
If fhe RA is instead deployed on server (instead of a cluster), then the creation of the Connector Connection Pool succeeds.

To reproduce the problem:

1) Download Oracle's "Generic Resource Adapter for JMS" from here:

http://genericjmsra.java.net/docs/Releases.html

2) Create a cluster with single instance c1_1, and start the cluster:

asadmin create-cluster cluster1
asadmin create-instance --node localhost-domain1 --cluster cluster1 c1_1
asadmin start-cluster cluster1

3) Deploy the RA on the cluster:

asadmin deploy --target cluster1 genericra.rar

4) Attempt to create Connector Connection Pool for the RA:

asadmin create-connector-connection-pool --raname genericra --connectiondefinition javax.jms.QueueConnectionFactory genericra_pool
remote failure: Connector connection pool genericra_pool creation failed. Unable to load class [ com.sun.genericra.inbound.ActivationSpec ]
Unable to load class [ com.sun.genericra.inbound.ActivationSpec ]
Command create-connector-connection-pool failed.

The "server.log" file shows the following stacktrace:

[2016-11-16T16:17:08.492+1100] [glassfish 5.0] [WARNING] [] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.deployment.util] [tid: _ThreadID=74 _ThreadName=admin-listener(5)] [timeMillis: 1479273428492] [levelValue: 900] [[
  Unable to load class [ com.sun.genericra.inbound.ActivationSpec ]
java.lang.ClassNotFoundException: com.sun.genericra.inbound.ActivationSpec
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at com.sun.enterprise.connectors.deployment.util.ConnectorValidator.getClass(ConnectorValidator.java:239)
	at com.sun.enterprise.connectors.deployment.util.ConnectorValidator.validateActivationSpec(ConnectorValidator.java:155)
	at com.sun.enterprise.connectors.deployment.util.ConnectorValidator.accept(ConnectorValidator.java:79)
	at com.sun.enterprise.connectors.deployment.util.ConnectorValidator.accept(ConnectorValidator.java:72)
	at com.sun.enterprise.deployment.BundleDescriptor.visit(BundleDescriptor.java:625)
	at com.sun.enterprise.connectors.deployment.util.ConnectorArchivist.postOpen(ConnectorArchivist.java:173)
	at com.sun.enterprise.connectors.deployment.util.ConnectorArchivist.postOpen(ConnectorArchivist.java:72)
	at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:273)
	at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
	at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
	at com.sun.enterprise.connectors.util.ConnectorDDTransformUtils.getConnectorDescriptor(ConnectorDDTransformUtils.java:236)

It appears that, within Glassfish, there is common code that is executed during deployment and Connector Connection Pool creation, which accesses and validates the ActivationSpec class that is stored in the RA's JAR file (within the RAR file), but the calling thread's ContextClassLoader is not setup correctly in the later case for accessing classes within the JAR file, so it fails.






[GLASSFISH-21521] InvocationTargetException when deploying a web application Created: 02/Mar/16  Updated: 19/Jan/17

Status: In Progress
Project: glassfish
Component/s: classloader, deployment
Affects Version/s: 4.1, 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: Vinay Vishal
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File glassfish-21521.war     Text File server.log     Text File server.log    

 Description   

When I deployed a web application, InvocationTargetException is thrown by WebappClassLoader.

[2016-02-21T08:22:29.848+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=107 _ThreadName=admin-listener(1)] [timeMillis: 1456010549848] [levelValue: 800] [[
  visiting unvisited references]]

[2016-02-21T08:22:29.887+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=107 _ThreadName=admin-listener(1)] [timeMillis: 1456010549887] [levelValue: 800] [[
  visiting unvisited references]]

[2016-02-21T08:22:29.981+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=107 _ThreadName=admin-listener(1)] [timeMillis: 1456010549981] [levelValue: 800] [[
  visiting unvisited references]]

[2016-02-21T08:22:30.085+0900] [glassfish 4.1] [WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=107 _ThreadName=admin-listener(1)] [timeMillis: 1456010550085] [levelValue: 900] [[
  Failed to check for ThreadLocal references for web application [unknown]
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor200.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.glassfish.web.loader.WebappClassLoader.checkThreadLocalsForLeaks(WebappClassLoader.java:2313)
	at org.glassfish.web.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:2059)
	at org.glassfish.web.loader.WebappClassLoader.stop(WebappClassLoader.java:1960)
	at org.glassfish.web.loader.WebappClassLoader.preDestroy(WebappClassLoader.java:1929)
	at org.glassfish.deployment.common.DeploymentContextImpl.getClassLoader(DeploymentContextImpl.java:266)
	at org.glassfish.deployment.common.DeploymentContextImpl.getClassLoader(DeploymentContextImpl.java:216)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:485)
	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:539)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:360)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:360)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
	at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:404)
	at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
	at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171)
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103)
	at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028)
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:365)
	at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:173)
	at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
	at java.lang.ThreadLocal$ThreadLocalMap.expungeStaleEntry(ThreadLocal.java:594)
	at java.lang.ThreadLocal$ThreadLocalMap.expungeStaleEntries(ThreadLocal.java:718)
	... 84 more
]]


 Comments   
Comment by Vinay Vishal [ 28/Dec/16 ]

Do you have the sample application which on deploying throws this exception?

Comment by yama0428 [ 28/Dec/16 ]

This is a reproducible batch.
sample.war includes index.html and a simple servlet class.

@echo on
:loop

echo %time%
call d:\glassfish4\glassfish\bin\asadmin start-cluster cluster
echo %time%
call d:\glassfish4\glassfish\bin\asadmin deploy --target cluster H:\workspace\javaee7\Application\sample.war
echo %time%
call d:\glassfish4\glassfish\bin\asadmin undeploy --target cluster sample
echo %time%
call d:\glassfish4\glassfish\bin\asadmin stop-cluster cluster
timeout 5
goto :loop
package test.servlet;

import java.io.IOException;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet(name="SleepTest", urlPatterns="/sleep")
public class SleepTest extends HttpServlet {
    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException {
        String timeParam = req.getParameter("time");
        int sleep = 0;
        try {
            sleep = Integer.parseInt(timeParam);
        } catch (Exception e) {
            
        }
        
        try {
            Thread.sleep(sleep*1000L);
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        
        res.getWriter().println(sleep+" seconds sleeeped.");
    }

}
Comment by Vinay Vishal [ 30/Dec/16 ]

This issue couldn't be reproduced with 4.1. Sample application and server.log attached. Please attach the sample application with which you are encountering this exception in case I am missing out something.

Comment by yama0428 [ 30/Dec/16 ]

I don't know how to attach files to jira.

Comment by Vinay Vishal [ 30/Dec/16 ]

when you click on "More" button on top, you can find option to attach the file. You can also refer to this link

Comment by yama0428 [ 30/Dec/16 ]

Unfortunately, "More" button includes only "Stop Watching", "Create Sub Task", and "Clone".

Comment by Vinay Vishal [ 30/Dec/16 ]

Oh, not sure then how to proceed further. May be you can try out the attached war and update the results here. The war also have the source code, so you can validate if there is any thing different.

Comment by yama0428 [ 30/Dec/16 ]

https://www.dropbox.com/sh/jad3jh7h0swrhah/AAB-uTMFf195ian3Nbk2xqaBa?dl=0

I uploaded to dropbox.

Comment by Vinay Vishal [ 02/Jan/17 ]

The issue couldn't be reproduced with the sample application provided.

Output of wsdeploy2.bat

17:06:30.55

C:\Users\vivishal\Downloads>call d:\glassfish4\glassfish\bin\asadmin start-clust
er c1
Command start-cluster executed successfully.
17:06:31.62
Application deployed with name sample.
Command deploy executed successfully.
17:06:33.29
Command undeploy executed successfully.
17:06:34.67
Command stop-cluster executed successfully.

Waiting for 0 seconds, press a key to continue ...
17:06:48.20
Command start-cluster executed successfully.
17:07:08.10
Application deployed with name sample.
Command deploy executed successfully.
17:07:16.47
Command undeploy executed successfully.
17:07:18.27
Command stop-cluster executed successfully.

Waiting for 0 seconds, press a key to continue ...
17:07:29.15
Command start-cluster executed successfully.
17:07:59.07
Application deployed with name sample.
Command deploy executed successfully.
17:08:11.53
Command undeploy executed successfully.
17:08:13.65
Command stop-cluster executed successfully.

Waiting for 4 seconds, press a key to continue ...
17:08:23.05
Command start-cluster executed successfully.
17:08:43.36
Application deployed with name sample.
Command deploy executed successfully.
17:08:53.60
Command undeploy executed successfully.
17:08:56.21
Command stop-cluster executed successfully.

Waiting for 3^CTerminate batch job (Y/N)? ^CYe ...

server.log too is attached.

Comment by yama0428 [ 05/Jan/17 ]

Message is logged to server.log of DAS, and is not always logged.
So please try running wsdeploy2.bat for hours.
In my environment, this message is logged 4 times for 3 hours.

[2017-01-05T15:17:15.610+0900] [glassfish 4.1] [WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=49 _ThreadName=admin-listener(1)] [timeMillis: 1483597035610] [levelValue: 900] [[
  Failed to check for ThreadLocal references for web application [unknown]
java.lang.reflect.InvocationTargetException

[2017-01-05T15:28:58.062+0900] [glassfish 4.1] [WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=52 _ThreadName=admin-listener(4)] [timeMillis: 1483597738062] [levelValue: 900] [[
  Failed to check for ThreadLocal references for web application [unknown]
java.lang.reflect.InvocationTargetException

[2017-01-05T15:44:07.002+0900] [glassfish 4.1] [WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=50 _ThreadName=admin-listener(2)] [timeMillis: 1483598647002] [levelValue: 900] [[
  Failed to check for ThreadLocal references for web application [unknown]
java.lang.reflect.InvocationTargetException

[2017-01-05T15:44:53.109+0900] [glassfish 4.1] [WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1483598693109] [levelValue: 900] [[
  Failed to check for ThreadLocal references for web application [unknown]
java.lang.reflect.InvocationTargetException
Comment by Vinay Vishal [ 18/Jan/17 ]

Even after running for more than 4 hrs, the issue didn't get reproduced. Can you share build number of glassfish you are running?

you can get the same by running

asadmin.bat version
Comment by yama0428 [ 18/Jan/17 ]
D:\glassfish4\glassfish\bin>asadmin version
Version = GlassFish Server Open Source Edition  4.1.1  (build 1)
Command version executed successfully.

D:\glassfish4\glassfish\bin>java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b18, mixed mode)

OS: Windows 7 Professional Service Pack 1 (64bit)
CPU: Intel(R) Core(TM) i7-2640M CPU @ 2.80 GHz
Memory: 8GB

In the environment,
I download gf4.1.1 from https://glassfish.java.net/download.html and unzip.

The message is logged to server.log of das by executing following commands.

D:\glassfish4\glassfish\bin>asadmin start-domain
Waiting for domain1 to start ..............
Successfully started the domain : domain1
domain  Location: D:\glassfish4\glassfish\domains\domain1
Log File: D:\glassfish4\glassfish\domains\domain1\logs\server.log
Admin Port: 4848
Command start-domain executed successfully.

D:\glassfish4\glassfish\bin>asadmin version
Authentication failed with password from login store: C:\Users\ts\.gfclient
\pass
Enter admin password for user "admin">
Version = GlassFish Server Open Source Edition  4.1.1  (build 1)
Command version executed successfully.

D:\glassfish4\glassfish\bin>asadmin login
Enter admin user name [Enter to accept default]>
Admin login information for host [localhost] and port [4848] is being overwritte
n with credentials provided. This is because the --savelogin option was used dur
ing create-domain command.
Login information relevant to admin user name [admin] for host [localhost] and a
dmin port [4848] stored at [C:\Users\ts\.gfclient\pass] successfully.
Make sure that this file remains protected. Information stored in this file will
 be used by administration commands to manage associated domain.
Command login executed successfully.

D:\glassfish4\glassfish\bin>asadmin stop-domain
Waiting for the domain to stop
Command stop-domain executed successfully.

D:\glassfish4\glassfish\bin>asadmin start-domain
Waiting for domain1 to start ...............
Successfully started the domain : domain1
domain  Location: D:\glassfish4\glassfish\domains\domain1
Log File: D:\glassfish4\glassfish\domains\domain1\logs\server.log
Admin Port: 4848
Command start-domain executed successfully.

D:\glassfish4\glassfish\bin>asadmin create-cluster cluster
Command create-cluster executed successfully.

D:\glassfish4\glassfish\bin>asadmin create-local-instance --cluster cluster inst
ance
Rendezvoused with DAS on localhost:4848.
Port Assignments for server instance instance:
OSGI_SHELL_TELNET_PORT=26666
JAVA_DEBUGGER_PORT=29009
JMS_PROVIDER_PORT=27676
HTTP_LISTENER_PORT=28080
IIOP_SSL_LISTENER_PORT=23820
ASADMIN_LISTENER_PORT=24848
IIOP_SSL_MUTUALAUTH_PORT=23920
JMX_SYSTEM_CONNECTOR_PORT=28686
HTTP_SSL_LISTENER_PORT=28181
IIOP_LISTENER_PORT=23700
Command create-local-instance executed successfully.

D:\glassfish4\glassfish\bin>d:\tmp\wsdeploy2.bat
Command start-cluster executed successfully.
23:06:55.14
Application deployed with name sample.
Command deploy executed successfully.
23:07:10.32
Command undeploy executed successfully.
23:07:13.10
Command stop-cluster executed successfully.
.....
 0:10:30.14
Command start-cluster executed successfully.
 0:10:41.78
Application deployed with name sample.
Command deploy executed successfully.
 0:10:46.86
Command undeploy executed successfully.
 0:10:47.84
Command stop-cluster executed successfully.

[2017-01-19T00:10:43.404+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=53 _ThreadName=admin-listener(3)] [timeMillis: 1484752243404] [levelValue: 800] [[
  visiting unvisited references]]

[2017-01-19T00:10:43.418+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=53 _ThreadName=admin-listener(3)] [timeMillis: 1484752243418] [levelValue: 800] [[
  visiting unvisited references]]

[2017-01-19T00:10:43.423+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=53 _ThreadName=admin-listener(3)] [timeMillis: 1484752243423] [levelValue: 800] [[
  visiting unvisited references]]

[2017-01-19T00:10:43.446+0900] [glassfish 4.1] [WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=53 _ThreadName=admin-listener(3)] [timeMillis: 1484752243446] [levelValue: 900] [[
  Failed to check for ThreadLocal references for web application [unknown]
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.glassfish.web.loader.WebappClassLoader.checkThreadLocalsForLeaks(WebappClassLoader.java:2313)
	at org.glassfish.web.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:2059)
	at org.glassfish.web.loader.WebappClassLoader.stop(WebappClassLoader.java:1960)
	at org.glassfish.web.loader.WebappClassLoader.preDestroy(WebappClassLoader.java:1929)
	at org.glassfish.deployment.common.DeploymentContextImpl.getClassLoader(DeploymentContextImpl.java:266)
	at org.glassfish.deployment.common.DeploymentContextImpl.getClassLoader(DeploymentContextImpl.java:216)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:485)
	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:539)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Unknown Source)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Unknown Source)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
	at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:404)
	at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
	at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
	at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:309)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:292)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1139)
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:375)
	at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:173)
	at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
	at java.lang.ThreadLocal$ThreadLocalMap.expungeStaleEntry(Unknown Source)
	at java.lang.ThreadLocal$ThreadLocalMap.expungeStaleEntries(Unknown Source)
	... 70 more
]]

[2017-01-19T00:10:43.461+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=53 _ThreadName=admin-listener(3)] [timeMillis: 1484752243461] [levelValue: 800] [[
  sample was successfully deployed in 80 milliseconds.]]





[GLASSFISH-21628] when Server is starting, Deadlock will occurs sometimes Found one Java-level deadlock Created: 30/Nov/16  Updated: 30/Jan/17

Status: In Progress
Project: glassfish
Component/s: classloader
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: liuj-fnst Assignee: sameerpandit
Resolution: Unresolved Votes: 0
Labels: waiting_on_filer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

when Server is starting, Deadlock will occurs sometimes
Found one Java-level deadlock:
=============================
"Timer-21":
waiting to lock monitor 0x31ceb894 (object 0x247b1028, a java.lang.Class),
which is held by "pool-1-thread-11"
"pool-1-thread-11":
waiting to lock monitor 0x31efa42c (object 0x0f1f3d00, a com.sun.enterprise.util.ConnectorClassLoader),
which is held by "pool-1-thread-6"
"pool-1-thread-6":
waiting to lock monitor 0x31c0994c (object 0x0efa0458, a com.sun.appserv.server.util.ASURLClassLoader),
which is held by "pool-1-thread-11"

Java stack information for the threads listed above:
===================================================
"Timer-21":
at java.util.logging.Logger.getLogger(Logger.java:321)

  • waiting to lock <0x247b1028> (a java.lang.Class for java.util.logging.Logger)
    at com.sun.jmx.trace.TraceManager.getLogger(TraceManager.java:176)
    at com.sun.jmx.trace.TraceManager.isSelected(TraceManager.java:197)
    at com.sun.jmx.trace.Trace.isSelected(Trace.java:89)
    at javax.management.timer.Timer.isTraceOn(Timer.java:116)
    at javax.management.timer.Timer.sendNotification(Timer.java:1222)
    at javax.management.timer.Timer.notifyAlarmClock(Timer.java:1206)
    at javax.management.timer.TimerAlarmClock.run(Timer.java:1289)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)
    "pool-1-thread-11":
    at com.sun.enterprise.util.ConnectorClassLoader.loadClass(ConnectorClassLoader.java:182)
  • waiting to lock <0x0f1f3d00> (a com.sun.enterprise.util.ConnectorClassLoader)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1482)
    at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2289)
    at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1364)
    at java.util.ResourceBundle.findBundle(ResourceBundle.java:1328)
    at java.util.ResourceBundle.findBundle(ResourceBundle.java:1282)
    at java.util.ResourceBundle.findBundle(ResourceBundle.java:1282)
    at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1224)
    at java.util.ResourceBundle.getBundle(ResourceBundle.java:952)
    at java.util.logging.Logger.findResourceBundle(Logger.java:1332)
  • locked <0x05080888> (a java.util.logging.Logger)
    at java.util.logging.Logger.setupResourceInfo(Logger.java:1386)
  • locked <0x05080888> (a java.util.logging.Logger)
    at java.util.logging.Logger.getLogger(Logger.java:367)
  • locked <0x247b1028> (a java.lang.Class for java.util.logging.Logger)
    at com.sun.enterprise.server.logging.BaseLogManager.doInitializeLogger(BaseLogManager.java:125)
    at com.sun.enterprise.server.logging.BaseLogManager.addLogger(BaseLogManager.java:196)
  • locked <0x0efa05b8> (a java.util.ArrayList)
    at java.util.logging.LogManager.demandLogger(LogManager.java:381)
    at java.util.logging.Logger.demandLogger(Logger.java:290)
    at java.util.logging.Logger.getLogger(Logger.java:321)
  • locked <0x247b1028> (a java.lang.Class for java.util.logging.Logger)
    at java.util.jar.Attributes.read(Attributes.java:405)
    at java.util.jar.Manifest.read(Manifest.java:232)
    at java.util.jar.Manifest.<init>(Manifest.java:50)
    at java.util.jar.JarFile.getManifestFromReference(JarFile.java:163)
    at java.util.jar.JarFile.getManifest(JarFile.java:149)
    at sun.misc.URLClassPath$JarLoader$2.getManifest(URLClassPath.java:696)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:228)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
  • locked <0x0efa0458> (a com.sun.appserv.server.util.ASURLClassLoader)
    at com.sun.appserv.server.util.ASURLClassLoader.loadClass(ASURLClassLoader.java:144)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at my.servlet1.init(servlet1.java:31)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1100)
  • locked <0x0fff7dd8> (a org.apache.catalina.core.StandardWrapper)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1023)
  • locked <0x0fff7dd8> (a org.apache.catalina.core.StandardWrapper)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4969)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5376)
  • locked <0x0fe3b7d0> (a com.sun.enterprise.web.WebModule)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:345)
  • locked <0x0fe3b7d0> (a com.sun.enterprise.web.WebModule)
    at com.sun.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:58)
    at com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:304)
    at com.sun.appserv.management.util.misc.RunnableBase.run(RunnableBase.java:341)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662)
    "pool-1-thread-6":
    at java.lang.ClassLoader.loadClass(ClassLoader.java:291)
  • waiting to lock <0x0efa0458> (a com.sun.appserv.server.util.ASURLClassLoader)
    at com.sun.appserv.server.util.ASURLClassLoader.loadClass(ASURLClassLoader.java:144)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
  • locked <0x0f1f3158> (a java.net.URLClassLoader)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at com.sun.enterprise.util.ConnectorClassLoader.loadClass(ConnectorClassLoader.java:187)
  • locked <0x0f1f3d00> (a com.sun.enterprise.util.ConnectorClassLoader)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1482)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:251)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:385)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:119)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4521)
  • locked <0x0fe4bc80> (a java.util.HashMap)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5369)
  • locked <0x0fe3bbd0> (a com.sun.enterprise.web.WebModule)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:345)
  • locked <0x0fe3bbd0> (a com.sun.enterprise.web.WebModule)
    at com.sun.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:58)
    at com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:304)
    at com.sun.appserv.management.util.misc.RunnableBase.run(RunnableBase.java:341)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662)

Found 1 deadlock.

In the following cases,

1) deploy many WEB apllications(A,B),and
2)WEB application(A) defined servlet that executed in starting time.eg init method,load-on-startup),and
3)the filter is defined in the WEB application(B),and
4)the Jar that includes the servlet class is defined in Cluster's classpath suffix in WEB application(A),and
5)the filter class puts in WEB—INF in in WEB application(B), and
6)another Jar’s(Y)class is referenced by WEB application(A) also defineds in Server's classpath suffix
7)when the servlet of WEB application(A) is initialized,In the processing of the JDK will output log.※1
※1 this is due to the referenced Jar‘s(Y)MANIFEST.MF that definition is error(Repeat definition) results in outting the ’warning log'.

reason:

1)In the WEB application (A)’s servletini processing, it began to load the Jar (Y) class from ASURLClassLoade,
at this point, the ASURLClassLoader is locked.
2)In the WEB application (B)’s filter processing, due to the delegation mechanism,
it retrievals class from ConnectorClassLoader through WebappClassLoader. At this point, the ConnectorClassLoader is locked.
3)The MANIFEST. MF’s definition in the Web application (A)’s the Jar (Y) is wrong,
lead to the JDK output warning messages, it began to retrieval class from ConnectorClassLoader through WebappClassLoader,making use of the current.
4)In the WEB application (B)’s filter processing, due to the delegation mechanism,
it retrievals class from ASURLClassLoader through ConnectorClassLoader .

so,ASURLClassLoader and ConnectorClassLoader are LOCKED by different threads,then,the deadlock occurs.



 Comments   
Comment by liuj-fnst [ 19/Jan/17 ]

Excuse me,I wanna know the process of this case,please.

Comment by sameerpandit [ 30/Jan/17 ]

Please provide clear bug reproducing scenario, the above description is vague. I have the below doubts.
1. For [1] in issue desc. "Deploy MANY " or two. (A,B) . Please clarify?
2. For [4] in issue desc. why you need to add the (A) jar specifically to cluster instance classpath. Just deploying to cluster would be sufficient ?
3. For [6] in issue desc. another JAR. Which another jar ? I Did not get the point [7] at all.

It would help if you provided web app A,B and some dummy Jar(Y).





[GLASSFISH-21462] adminGUI does not load the classpath from manifest.mf to the precompilejsp in Application Deploy module Created: 05/Nov/15  Updated: 14/Feb/17

Status: Open
Project: glassfish
Component/s: admin_gui, classloader, deployment, ejb_container
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: ccagf Assignee: sumasri
Resolution: Unresolved Votes: 0
Labels: jspc, precompilejsp, waiting_on_filer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: PWC6112, admin-gui, admingui, deploy, java.lang.ClassNotFoundException:, jspc, precompilejsp

 Description   

in adminGUI ==> Applications ==> Deploy Applications or Modules ==> Precompile JSPs:

if You choose the Option - Precomplier works with JARs included in the LIB
But Fails when 3rd Party Jars are refeneced in the manifest.mf file - as the Glassfish Precomplier is not reading the class path from manifest.mf.

In Glassfish Version 2.1.1 It Works - Stopped working since Glassfish v3.
Does Not work on Glassfish 4.1.1

Sugested BUG Fix - adminGUI (when precompilejsp is checked) also needs to Read the Manifest.MF's Class-Path and pass it on to the jspc compiler.

Error: PWC6112
java.lang.ClassNotFoundException:

Just FYI - When I pass the class-path part of jspc and copmile it works - so the bug surely is on the adminGUI console



 Comments   
Comment by sumasri [ 14/Feb/17 ]

I created a web application and referred third party jar in manifest.mf file and created war file for deploying.
Deployed that app and is working as expected. I do not see any issue as specified in the issue.
If you still see the issue, please provide me the app and exact steps to reproduce the issue.





[GLASSFISH-21695] ClassLoader Issue - REST API vs Server Restart Created: 03/Mar/17  Updated: 03/Mar/17

Status: Open
Project: glassfish
Component/s: classloader, deployment, web_services, web_services_mgmt
Affects Version/s: 4.1, 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: chrisohiou57 Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

We have a Jenkins build that deploys a WAR via the REST API. We were not able to restart the Glassfish server when the app was already deployed (exploded in domain's applications directory). We determined that this was caused by a ClassLoader issue, so, we added the following to glassfish-web.xml.

<class-loader delegate="false"></class-loader>

Prior to making these changes I had to delete the app from the domain's applications directory, bounce the server, and redeploy from Jenkins.

The glassfish-web.xml change resolved our issue for restarting the server when the app is already deployed. However, now we are no longer able to redeploy the application from Jenkins. If I delete the application from the domain's applications directory and bounce the server I am able to deploy the WAR from Jenkins.

When I back out my changes to glassfish-web.xml I am always able to redeploy from Jenkins, but then I can't restart the server.

This is what we are using to deploy from Jenkins:
curl -k -u admin:password -X POST \
-H 'X-Requested-By: loadr' \
-H 'Accept: application/json' \
-F "id=@$

{WORKSPACE}

/erf.war" \
-F force=true https://

{host:port}

management/domain/applications/application/






[GLASSFISH-16077] GlassFish should hide hk2 jars /classloader from deployed applications Created: 21/Dec/10  Updated: 22/Feb/11

Status: Open
Project: glassfish
Component/s: classloader
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: jeff_trent Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The concern is over wls and glassfish applications written with code that internally is using a different/conflicting version of hk2 from that of the server for whatever reason (this will be a real case we presume for glassfish calling wls via client jars remotely).






[GLASSFISH-20979] Problem loading/unloading class - using mysql Created: 10/Feb/14  Updated: 08/Oct/14

Status: Open
Project: glassfish
Component/s: classloader
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: jfarjona Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Jdk 1.7 64-bit - using EAR application
MySQL Connector 5.1.29 - Hibernate 4.3.1



 Description   

An Exception is thrown during the server operation, showing up on the logs.

Not sure if this a Glassfish, MySQL or Hibernate issue, please see the stack trace below.
(Same bug has been reported in Hibernate - bug https://hibernate.atlassian.net/browse/HHH-8953)

WARNING: ASURLClassLoader EarClassLoader :
doneCalled = true
doneSnapshot = ASURLClassLoader.done() called ON EarClassLoader :
urlSet = [URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/commons-discovery-0.5.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/asm-tree-3.3.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/commons-logging-1.1.1-api.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/asm-3.3.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/ognl-3.0.6.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/spring-test-2.5.6.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/ta-lib-0.9.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/commons-math3-3.2.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/struts2-tiles-plugin-2.3.15.1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/ehcache-core-2.4.3.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/tiles-extras-2.2.2.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/servlet-api-2.5-20081211.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/commons-pool-1.6.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/itext-2.1.5.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/iText-toolbox.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/iText-toolbox-2.1.5.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/bcmail-jdk14-138.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/bcprov-jdk14-138.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/ant-launcher-1.7.0.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/stax-api-1.0.1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/google-oauth-client-jetty-1.11.0-beta.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/google-oauth-client-java6-1.11.0-beta.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/google-oauth-client-1.11.0-beta.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/google-http-client-1.11.0-beta.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/commons-logging-1.1.1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/jsr305-1.3.9.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/guava-11.0.1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/httpclient-4.0.3.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/httpcore-4.0.1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/xpp3-1.1.4c.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/jetty-6.1.26.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/jetty-util-6.1.26.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/validation-api-1.1.0.Final.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/tiles-core-2.2.2.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/spring-context-2.5.6.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/tiles-jsp-2.2.2.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/velocity-1.6.2.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/commons-beanutils-1.8.3.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/hibernate-entitymanager-4.3.1.Final.jar, URLEntry : file:/C:/java/glassfish4/glassfish/domains/domain1/generated/ejb/doblosys-ear/doblosys-web-2.0_war/, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/activation-1.1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/tiles-compat-2.2.2.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/jna-3.4.0.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/javaee-api-7.0.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/guava-13.0.1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/xmlbeans-2.6.0.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/freemarker-2.3.19.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/commons-dbcp-1.4.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/tiles-servlet-wildcard-2.2.2.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/jboss-logging-annotations-1.2.0.Beta1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/tiles-freemarker-2.2.2.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/mchange-commons-java-0.2.3.4.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/c3p0-0.9.2.1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/commons-codec-1.5.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/bcel-5.1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/tiles-mvel-2.2.2.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/jsr305-1.3.7.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/commons-math-2.2.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/commons-lang-2.6.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/tiles-el-2.2.2.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/antlr-2.7.7.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/core-1.47.1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/jboss-logging-3.1.3.GA.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/junit-4.11.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/spring-web-2.5.6.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/mail-1.4.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/activation.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/jcl-over-slf4j-1.7.5.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/struts2-core-2.3.15.1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/aopalliance-1.0.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/slf4j-api-1.7.5.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/AbsoluteLayout-RELEASE73.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/jcommon-1.0.17.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/asm-commons-3.3.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/hibernate-commons-annotations-4.0.4.Final.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/spring-core-2.5.6.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/ant-1.7.0.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/jcifs-1.3.14-kohsuke-1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/velocity-tools-2.0.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/mvel2-2.0.11.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/poi-3.9.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/ameritrade-2.0.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/commons-io-2.4.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/standards-2.3.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/httpclient-4.3.1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/hibernate-core-4.3.1.Final.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/classes/, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/struts2-dojo-plugin-2.3.15.1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/httpcore-4.3.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/bcprov-jdk15on-1.50.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/javassist-3.11.0.GA.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/spring-beans-2.5.6.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/poi-ooxml-3.9.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/xml-apis-1.3.04.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/hibernate-ehcache-4.3.1.Final.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/tiles-ognl-2.2.2.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/regexp-1.2.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/tiles-servlet-2.2.2.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/joda-time-2.3.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/tiles-velocity-2.2.2.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/dom4j-1.6.1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/hamcrest-core-1.3.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/oro-2.0.8.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/logback-core-1.0.9.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/poi-ooxml-schemas-3.9.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/commons-collections-3.2.1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/jandex-1.1.0.Final.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/commons-fileupload-1.3.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/akuma-1.9.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/logback-classic-1.0.9.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/tiles-api-2.2.2.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/jasypt-1.9.1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/javax.mail-1.5.0.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/jtidy-r938.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/jfreechart-1.0.15.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/tiles-template-2.2.2.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/xwork-core-2.3.15.1.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/bcpg-jdk15on-1.50.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/javaee-web-api-6.0.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/commons-digester-2.0.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/hibernate-c3p0-4.3.1.Final.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/javassist-3.18.1-GA.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/commons-validator-1.4.0.jar, URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/doblosys-web-2.0_war/WEB-INF/lib/commons-lang3-3.1.jar]
doneCalled = false
Parent -> org.glassfish.internal.api.DelegatingClassLoader@667bcad3
AT Mon Feb 10 10:18:09 CST 2014
BY :[java.lang.Thread.getStackTrace(Thread.java:1588), com.sun.enterprise.loader.ASURLClassLoader.done(ASURLClassLoader.java:216), com.sun.enterprise.loader.ASURLClassLoader.preDestroy(ASURLClassLoader.java:184), org.glassfish.javaee.full.deployment.EarClassLoader.preDestroy(EarClassLoader.java:100), org.glassfish.deployment.common.DeploymentContextImpl.getClassLoader(DeploymentContextImpl.java:260), org.glassfish.deployment.common.DeploymentContextImpl.getClassLoader(DeploymentContextImpl.java:210), com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:482), com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219), org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491), com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527), com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523), java.security.AccessController.doPrivileged(Native Method), javax.security.auth.Subject.doAs(Subject.java:356), com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522), com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546), com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423), com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108), com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762), com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674), com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534), com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224), org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297), com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246), org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191), org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168), org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189), org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119), org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288), org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206), org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136), org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114), org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77), org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838), org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113), org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115), org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55), org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135), org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564), org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544), java.lang.Thread.run(Thread.java:744)] Parent -> org.glassfish.internal.api.DelegatingClassLoader@667bcad3
was requested to find class Symbol after done was invoked from the following stack trace
java.lang.Throwable
at com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:827)
at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:744)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.findClass(ClassLoaderServiceImpl.java:224)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:242)
at org.hibernate.internal.SessionFactoryImpl.getImportedClassName(SessionFactoryImpl.java:1286)
at org.hibernate.hql.internal.ast.util.SessionFactoryHelper.findQueryableUsingImports(SessionFactoryHelper.java:136)
at org.hibernate.hql.internal.ast.util.SessionFactoryHelper.findQueryableUsingImports(SessionFactoryHelper.java:123)
at org.hibernate.hql.internal.ast.util.LiteralProcessor.processConstant(LiteralProcessor.java:100)
at org.hibernate.hql.internal.ast.tree.IdentNode.resolve(IdentNode.java:143)
at org.hibernate.hql.internal.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:126)
at org.hibernate.hql.internal.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:121)
at org.hibernate.hql.internal.ast.HqlSqlWalker.resolve(HqlSqlWalker.java:945)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1264)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4639)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:4111)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:2096)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:2024)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:794)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:595)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:299)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:247)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:278)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:206)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:158)
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:126)
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:88)
at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:190)
at org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:301)
at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:236)
at org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1796)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:328)
at com.sun.enterprise.container.common.impl.EntityManagerWrapper.createQuery(EntityManagerWrapper.java:456)
at com.doblones.dbutils.DataManagement.getSummaryFromDB(DataManagement.java:2020)
at com.doblones.dbutils.DataManagement.getPointsInDB(DataManagement.java:1149)
at com.doblones.dbutils.DataManagement.checkLongProcess(DataManagement.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4695)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:630)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4667)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4655)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy251.checkLongProcess(Unknown Source)
at com.doblones.dbutils._EJB31_GeneratedDataManagementIntf__Bean_.checkLongProcess(Unknown Source)
at com.doblones.actions.GraphAction.createGraph(GraphAction.java:478)
at com.doblones.actions.GraphAction.drawGraph(GraphAction.java:545)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4695)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:630)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4667)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4655)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy247.drawGraph(Unknown Source)
at com.doblones.actions._EJB31_GeneratedGraphActionIntf__Bean_.drawGraph(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:289)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:252)
at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:239)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:239)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:252)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:161)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.doblones.actions.Security.intercept(Security.java:144)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.ejb3plugin.InjectEJBInterceptor.intercept(InjectEJBInterceptor.java:206)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:563)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
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:744)

Thanks.



 Comments   
Comment by bhicks01 [ 08/Oct/14 ]

I, too, have this issue, but only when using Hibernate 4.3.6. With eclipselink, this issue does not happen.

I have an EAR with several JARs and stateless session beans. I get this warning for each bean in the EAR the first time the bean is executed. Also, the class it's trying to find is actually a part of my where clause (always prints "c.columnB" not found):

select c Config c where c.columnA = :columnA or c.columnB = :columnB order by c.columnA desc, c.columnB desc

It appears the query is executing successfully, and I only get the warning the first time through.





[GLASSFISH-20779] GlassFish 4.0 classloader does not observe package information in WAR /META-INF/MANIFEST.MF Created: 24/Aug/13  Updated: 24/Aug/13

Status: Open
Project: glassfish
Component/s: classloader
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: S.A.M. Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GlassFish 4.0, Oracle JDK 7u25, Fedora 19


Tags: classloader, maven

 Description   

I have my application package information set inside a web application archive /META-INF/MANIFEST.MF as generated by maven-war-plugin, using:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>

This produces the correct information inside the WAR in /META-INF/MANIFEST.MF:

Manifest-Version: 1.0
Implementation-Vendor: Sakari A. Maaranen
Implementation-Title: Some Project
Implementation-Version: 0.0.0-SNAPSHOT
Implementation-Vendor-Id: somegroup
Built-By: sam
Build-Jdk: 1.7.0_25
Specification-Vendor: Sakari A. Maaranen
Specification-Title: Some Project
Created-By: Apache Maven 3.0.5
Specification-Version: 0.0.0-SNAPSHOT
Archiver-Version: Plexus Archiver

However, in the web application source code that is directly in the WAR under /WEB-INF/classes/... the following will return null:

TITLE = getClass().getPackage().getImplementationTitle();
VERSION = getClass().getPackage().getImplementationVersion();
...

If GlassFish classloader could correctly observe this information it would greatly help my testing and deployment processes.






[GLASSFISH-18865] getImplementationVersion() returns null for application classes within EJB container Created: 04/Jul/12  Updated: 20/Dec/16

Status: Open
Project: glassfish
Component/s: classloader
Affects Version/s: 3.1.1_dev
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: mkarg Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Win7 Pro SP1 64 Bit JDK1.6.0_26



 Description   

My ejb-jar contains the following entry in the MANIFEST.MF (among others):

Implementation-Version: 4.34.1-SNAPSHOT

Inside of this jar is a SLSB (CallerNameSessionBean) which does the following code:

public String getVersion()

{ return CallerNameSessionBean.class.getPackage().getImplementationVersion(); }

When a client is calling this method, it always returns null.

It seems this Java SE API is not working in GF3.1.1's EJB container?

I am using the same solution pattern within GF3.1.1's ACC container, and there it is correctly returning "4.34.1-SNAPSHOT"!



 Comments   
Comment by marina vatkina [ 07/Jul/12 ]

Does it work in 3.1.2 or trunk?

Comment by mkarg [ 09/Jul/12 ]

Cannot tell you whether it works on 3.1.2 due to this issue: http://java.net/jira/browse/GLASSFISH-18877

Comment by mkarg [ 09/Jul/12 ]

Cannot tell you whether it works on trunk due to this test faults:

ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test (default-test) on project common-util: There are test failures.

Tests in error:
com.sun.enterprise.universal.xml.MiniXmlParserTest

Comment by mkarg [ 10/Jul/12 ]

Since http://java.net/jira/browse/GLASSFISH-18877 is fixed (thanks to Hong Zhang), I was able to reproduce the problem in GFv3.1.2. The result is the same as on GFv.3.1.1: Works in ACC, but fails (i. e. returns null) in EJB container.

Comment by mkarg [ 06/May/13 ]

Sad to see that there is no further comment for over half a year.

Comment by mkarg [ 08/May/13 ]

I noticed the following, maybe it is of interest for fixing this bug:

When doing CallerNameSessionBean.class.getResourceAsStream("/META-INF/MANIFEST.MF") and parsing it using Java.util.jar.Manifest class, it has a completely DIFFERENT set of attributes than the MANIFEST.MF file of the JAR. Hence, getResourceAsStream does not return the original file of the JAR!

Comment by mkarg [ 08/May/13 ]

Identified a functional workaround (for those who suffer from the same pain):

        final InputStream pomPropertiesStream = CallerNameSessionBean.class
                .getResourceAsStream("/META-INF/maven/de.quipsy.server/quipsy-ejb-module/pom.properties");
        try {
            final Properties pomProperties = new Properties();
            pomProperties.load(pomPropertiesStream);
            return pomProperties.getProperty("version");
        } catch (final IOException ignored) {
            LOGGER.fine(ignored.getMessage());
            return null;
        } finally {
            try {
                pomPropertiesStream.close();
            } catch (final IOException ignored) {
                ignored.printStackTrace();
            }
        }




[GLASSFISH-19607] ClassCastException when load JPA Entity at start up time Created: 30/Jan/13  Updated: 15/Jun/15

Status: Open
Project: glassfish
Component/s: classloader
Affects Version/s: 3.1.2
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: jasonzhang2002gmailcom Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GlassFish 3.1.2, EclipseLink 2.4.1



 Description   

I have a war file using JPA(EclipseLink). Inside the war file, there is one Message-driven bean and no other EJBs.
If I reload the web application repeatedly by touch .reload file, I will get ClassCastException.

 java.lang.ClassCastException: com.flexdms.flexims.db.BlobData cannot be cast to com.flexdms.flexims.db.BlobData
	at com.flexdms.flexims.Types.reLoadTypes(Types.java:190)
	at com.flexdms.flexims.607341762$Proxy$_$$_WeldSubclass.reLoadTypes(607341762$Proxy$_$$_WeldSubclass.java)
	at com.flexdms.flexims.Types.init(Types.java:157)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

This piece of code is invoked as ServletContextListener to initialize the application. The Class is a JPA Entity Class.

Others also noticed this issue:http://mcqueeney.com/blog/two-reasons-to-prefer-hibernate-jpa-over-eclipselink-on-glassfish/

A complete server restart always solves the issue. I suspect the the JPA Entity Class somehow gets into server class loader such as EclipseLink class. A reload creates a new copy of the class and the new copy will conflict with the old copy in server.

But running two copies of the same application under the same instance has no problem.
Whether use "delegate" class loading or not has no effect on problem.

I will see whether I can create a simple application to reproduce this or not.



 Comments   
Comment by jasonzhang2002gmailcom [ 31/Jan/13 ]

I added class loader debug. Here is more information.

Initial class loading for problematic class. Please note that Entity Class is loaded twice.

[Loaded com.flexdms.flexims.db.BlobData from file:/opt/glassfish3/glassfish/domains/domain1/applications/flexims_20130131/WEB-INF/classes/com/flexdms/flexims/db/BlobData.class]
[Loaded com.flexdms.flexims.db.BlobData from file:/opt/glassfish3/glassfish/domains/domain1/applications/flexims_20130131/WEB-INF/classes/com/flexdms/flexims/db/BlobData.class]
[Loaded com.flexdms.flexims.db.BlobDataPK from file:/opt/glassfish3/glassfish/domains/domain1/applications/flexims_20130131/WEB-INF/classes/com/flexdms/flexims/db/BlobDataPK.class]

Class loading after touching .reload file. BlobData is loaded twice again. But the order is different from previous loading. I will have ClassCastException this time.

[Loaded com.flexdms.flexims.db.BlobData from file:/opt/glassfish3/glassfish/domains/domain1/applications/flexims_20130131/WEB-INF/classes/com/flexdms/flexims/db/BlobData.class]
[Loaded com.flexdms.flexims.db.BlobDataPK from file:/opt/glassfish3/glassfish/domains/domain1/applications/flexims_20130131/WEB-INF/classes/com/flexdms/flexims/db/BlobDataPK.class]
[Loaded com.flexdms.flexims.db.BlobData from file:/opt/glassfish3/glassfish/domains/domain1/applications/flexims_20130131/WEB-INF/classes/com/flexdms/flexims/db/BlobData.class]

By Searching the class loading log file, I notice One loading is clustered together with Entity Class. So it should be from JPA. The other should be from CDI(weld) or other mechanism.

Moving the initialization code from ServletContextListener to Servlet(Using Load On Startup) does not help.

Comment by jasonzhang2002gmailcom [ 31/Jan/13 ]

I add some static initialization code to problematic class to track class loading.

static {
		System.out.println("load BlobData");
	}

The class seems only loaded once by JPADeployer although there are two lines in class loading log.
"reload" seems to be a shortcut to a full unload and load again.

Here is initial loading sequence

CONFIG: The target entity (reference) class for the many to one mapping element [method getTypeACL] is being defaulted to: class com.flexdms.flexims.accesscontrol.TypeACL.
CONFIG: The target entity (reference) class for the one to many mapping element [method getPermissions] is being defaulted to: class com.flexdms.flexims.accesscontrol.Permission.
CONFIG: The alias name for the entity class [class com.flexdms.flexims.accesscontrol.PropertyPermission] is being defaulted to: PropertyPermission.
CONFIG: The alias name for the entity class [class com.flexdms.flexims.accesscontrol.Permission] is being defaulted to: Permission.
CONFIG: The column name for element [getId] is being defaulted to: ID.
CONFIG: The column name for element [getDecision] is being defaulted to: DECISION.
CONFIG: The column name for element [getPropid] is being defaulted to: PROPID.
CONFIG: The alias name for the entity class [class com.flexdms.flexims.accesscontrol.RolePermission] is being defaulted to: RolePermission.
CONFIG: The column name for element [getRoleid] is being defaulted to: ROLEID.
CONFIG: The alias name for the entity class [class com.flexdms.flexims.db.BlobData] is being defaulted to: BlobData.
CONFIG: The column name for element [name] is being defaulted to: NAME.
CONFIG: The alias name for the entity class [class com.flexdms.flexims.accesscontrol.TypeACL] is being defaulted to: TypeACL.
CONFIG: The column name for element [getPTypes] is being defaulted to: PTYPES.
CONFIG: The column name for element [getTypeid] is being defaulted to: TYPEID.
CONFIG: The alias name for the entity class [class com.flexdms.flexims.accesscontrol.InstanceACE] is being defaulted to: InstanceACE.
CONFIG: The column name for element [id] is being defaulted to: ID.
CONFIG: The column name for element [typeid] is being defaulted to: TYPEID.
CONFIG: The column name for element [getRoleid] is being defaulted to: ROLEID.
CONFIG: The column name for element [getDecision] is being defaulted to: DECISION.
CONFIG: The column name for element [instanceid] is being defaulted to: INSTANCEID.
CONFIG: The primary key column name for the mapping element [method getTypeACL] is being defaulted to: TYPEID.

CONFIG: Class com.flexdms.flexims.accesscontrol.TypeACL could not be weaved for change tracking as it is not supported by its mappings.
INFO: load BlobData
INFO: EclipseLink, version: Eclipse Persistence Services - 2.4.1.v20121003-ad44345
CONFIG: connecting(DatabaseLogin(
	platform=>DerbyPlatform
	user name=> ""
	connector=>JNDIConnector datasource name=>null
))

CONFIG: Connected: jdbc:derby:/opt/glassfish3/javadb/flexims/flexims
	User: flexims
	Database: Apache Derby  Version: 10.8.1.2 - (1095077)
	Driver: Apache Derby Embedded JDBC Driver  Version: 10.8.1.2 - (1095077)
CONFIG: connecting(DatabaseLogin(
	platform=>DerbyPlatform
	user name=> ""
	connector=>JNDIConnector datasource name=>null
))
CONFIG: Connected: jdbc:derby:/opt/glassfish3/javadb/flexims/flexims
	User: flexims
	Database: Apache Derby  Version: 10.8.1.2 - (1095077)
	Driver: Apache Derby Embedded JDBC Driver  Version: 10.8.1.2 - (1095077)

INFO: file:/opt/glassfish3/glassfish/domains/domain1/eclipseApps/flexims/WEB-INF/classes/_flexims login successful
WARNING: Multiple [2] JMX MBeanServer instances exist, we will use the server at index [0] : [com.sun.enterprise.v3.admin.DynamicInterceptor@148ba3d].
WARNING: JMX MBeanServer in use: [com.sun.enterprise.v3.admin.DynamicInterceptor@148ba3d] from index [0] 
WARNING: JMX MBeanServer in use: [com.sun.jmx.mbeanserver.JmxMBeanServer@f77965] from index [1] 

INFO: JTS5014: Recoverable JTS instance, serverId = [3700]

INFO: JMS013: end point determine destionation name, Res name: javax.jms.Queue, JNDI name: BackgroundRunner descriptor name : {3}

INFO: WELD-000900 1.1.4 (Final)

WARNING: DPL8007: Unsupported deployment descriptors element message-destination value null

INFO: Registering the Jersey servlet application, named com.flexdms.flexims.json.RsActivator, at the servlet mapping, /json/*, with the Application class of the same name
INFO: Initializing Mojarra 2.2.0-m06 (-SNAPSHOT 20121109-2001 https://svn.java.net/svn/mojarra~svn/tags/2.2.0-m06@10994) for context '/flexims'

INFO: Monitoring jndi:/server/flexims/WEB-INF/faces-config.xml for modifications
INFO: Running on PrimeFaces 3.4.2
INFO: acl is constructed
INFO: PWC1412: WebModule[null] ServletContext.log():com.flexdms.flexims.InitServlet: initialization is called in InitServlet

The loading sequence is JPA weaving (EclipseLink), DB Resource creation, JSF(mojarra, maybe from FaceServlet), my initialization code.

Here is the loading sequence from reloading


INFO: Registering the Jersey servlet application, named com.flexdms.flexims.json.RsActivator, at the servlet mapping, /json/*, with the Application class of the same name
INFO: Initializing Mojarra 2.2.0-m06 (-SNAPSHOT 20121109-2001 https://svn.java.net/svn/mojarra~svn/tags/2.2.0-m06@10994) for context '/flexims'

INFO: Monitoring jndi:/server/flexims/WEB-INF/faces-config.xml for modifications
INFO: Running on PrimeFaces 3.4.2
INFO: acl is constructed
INFO: PWC1412: WebModule[null] ServletContext.log():com.flexdms.flexims.InitServlet: initialization is called in InitServlet
INFO: fileUploadDir =/opt/glassfish3/glassfish/domains/domain1/fleximsFiles/flexims
FINE: SELECT NAME, datatype, data FROM BLOBDATA WHERE (datatype = ?)
	bind => [type]
SEVERE: WebModule[/flexims]StandardWrapper.Throwable
java.lang.RuntimeException: java.lang.ClassCastException: com.flexdms.flexims.db.BlobData cannot be cast to com.flexdms.flexims.db.BlobData

The JPA and DB Resource creation are skipped. Does it mean JPA will keep old class reference?

Comment by jasonzhang2002gmailcom [ 31/Jan/13 ]

Here is a workaround.
Copy all org.eclipse.persistence jar from glassfish3/glassfish/modules to WEB-INF/lib.
change glassfish-web, set class delegate=false.

The web application can be reloaded repeatedly. The reload sequence will be the same as initial loading sequence.

Comment by jasonzhang2002gmailcom [ 31/Jan/13 ]

If I use EclipseLink inside of my war, I eventually have

Caused by: java.lang.OutOfMemoryError: PermGen space
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

after several iteration

Comment by ceyhun [ 15/Jun/15 ]

I have same exception. Maybe works for you, I clean and build project and , stop-start glassfish server and deploy again.





Generated at Thu Mar 23 21:55:50 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.