Hello:
Any help will be highly appreciated. I have an EAR application using Hibernate 4.3.5 on MySQL that runs on GlassFish 4.1 (JDK 8u40) perfectly well.
When I update to any Hibernate version after 4.3.6. it shows the following error after loading the EAR:
Code:
Warning: ASURLClassLoader EarLibClassLoader :
doneCalled = true
doneSnapshot = ASURLClassLoader.done() called ON EarLibClassLoader :
urlSet = [URLEntry : file:/M:/Data/src/doblosys/doblosys-ear/target/gfdeploy/doblosys-ear/lib/mysql-connector-java-5.1.35.jar]
doneCalled = false
Parent -> org.glassfish.internal.api.DelegatingClassLoader@69f91b46
AT Mon Apr 20 20:54:29 EDT 2015
BY :[java.lang.Thread.getStackTrace(Thread.java:1552), 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:114), org.glassfish.deployment.common.DeploymentContextImpl.getClassLoader(DeploymentContextImpl.java:266), org.glassfish.deployment.common.DeploymentContextImpl.getClassLoader(DeploymentContextImpl.java:216), com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:485), 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:539), com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535), java.security.AccessController.doPrivileged(Native Method), javax.security.auth.Subject.doAs(Subject.java:360), com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534), com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565), com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557), java.security.AccessController.doPrivileged(Native Method), javax.security.auth.Subject.doAs(Subject.java:360), com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556), com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464), com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109), com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846), com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722), 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.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189), com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459), com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167), org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201), org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175), org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235), org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119), org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284), org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201), org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133), org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112), org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77), org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561), org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112), org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117), org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56), org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137), org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565), org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545), java.lang.Thread.run(Thread.java:745)] Parent -> org.glassfish.internal.api.DelegatingClassLoader@69f91b46
was requested to find class com.mysql.jdbc.ProfilerEventHandlerFactory after done was invoked from the following stack trace
java.lang.Throwable
at com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:825)
at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:742)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4301)
at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1515)
at com.sun.gjc.spi.ManagedConnectionImpl.destroy(ManagedConnectionImpl.java:408)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.testConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:444)
at com.sun.enterprise.connectors.ConnectorRuntime.pingConnectionPool(ConnectorRuntime.java:1162)
at org.glassfish.connectors.admin.cli.PingConnectionPool.execute(PingConnectionPool.java:143)
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 com.sun.appserv.connectors.internal.ConnectorResourceManagerLifecycleListener$ConfigChangeHandler.pingConnectionPool(ConnectorResourceManagerLifecycleListener.java:279)
at com.sun.appserv.connectors.internal.ConnectorResourceManagerLifecycleListener$ConfigChangeHandler.handleAddEvent(ConnectorResourceManagerLifecycleListener.java:248)
at com.sun.appserv.connectors.internal.ConnectorResourceManagerLifecycleListener$ConfigChangeHandler.changed(ConnectorResourceManagerLifecycleListener.java:233)
at org.jvnet.hk2.config.ConfigSupport.sortAndDispatch(ConfigSupport.java:289)
at com.sun.appserv.connectors.internal.ConnectorResourceManagerLifecycleListener.changed(ConnectorResourceManagerLifecycleListener.java:204)
at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:400)
at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:390)
at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:280)
at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:278)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
After, the application breaks with the following java.lang.NoClassDefFoundError:
Code:
java.lang.NoClassDefFoundError: com/mysql/jdbc/EscapeProcessor
at com.mysql.jdbc.ConnectionImpl.nativeSQL(ConnectionImpl.java:3920) ~[mysql-connector-java-5.1.35.jar:na]
at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4119) ~[mysql-connector-java-5.1.35.jar:na]
at com.sun.gjc.spi.base.ConnectionHolder.prepareStatement(ConnectionHolder.java:586) ~[__ds_jdbc_ra.jar:na]
at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareCachedStatement(ConnectionWrapper40.java:255) ~[__ds_jdbc_ra.jar:na]
at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareCachedStatement(ConnectionWrapper40.java:52) ~[__ds_jdbc_ra.jar:na]
at com.sun.gjc.spi.ManagedConnectionImpl.prepareCachedStatement(ManagedConnectionImpl.java:992) ~[__ds_jdbc_ra.jar:na]
at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareStatement(ConnectionWrapper40.java:173) ~[__ds_jdbc_ra.jar:na]
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:162) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:186) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:160) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1885) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1862) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1839) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.loader.Loader.doQuery(Loader.java:910) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:355) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.loader.Loader.doList(Loader.java:2554) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.loader.Loader.doList(Loader.java:2540) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2370) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.loader.Loader.list(Loader.java:2365) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:497) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:387) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:236) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1300) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.internal.QueryImpl.list(QueryImpl.java:103) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:573) ~[hibernate-entitymanager-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:449) ~[hibernate-entitymanager-4.3.9.Final.jar:4.3.9.Final]
at com.doblones.dbutils.DataManagement.sendQueuedEmails(DataManagement.java:3911) ~[DataManagement.class:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_40]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_40]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_40]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_40]
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081) [ejb-container.jar:na]
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153) [ejb-container.jar:na]
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786) [ejb-container.jar:na]
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656) [ejb-container.jar:na]
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822) [ejb-container.jar:na]
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608) [ejb-container.jar:na]
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46) [weld-osgi-bundle.jar:2014-06-18 10:59]
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52) [weld-osgi-bundle.jar:2014-06-18 10:59]
at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_40]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_40]
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883) [ejb-container.jar:na]
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822) [ejb-container.jar:na]
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608) [ejb-container.jar:na]
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163) [ejb-container.jar:na]
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140) [ejb-container.jar:na]
at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_40]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_40]
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883) [ejb-container.jar:na]
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822) [ejb-container.jar:na]
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369) [ejb-container.jar:na]
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758) [ejb-container.jar:na]
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746) [ejb-container.jar:na]
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212) [ejb-container.jar:na]
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88) [ejb-container.jar:na]
at com.sun.proxy.$Proxy281.sendQueuedEmails(Unknown Source) [na:na]
at com.doblones.dbutils.__EJB31_Generated__DataManagement__Intf____Bean__.sendQueuedEmails(Unknown Source) [DataManagement.class:na]
at com.doblones.workers.ParallelWorker.sendEmails(ParallelWorker.java:189) [ParallelWorker.class:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_40]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_40]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_40]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_40]
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081) [ejb-container.jar:na]
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153) [ejb-container.jar:na]
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786) [ejb-container.jar:na]
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656) [ejb-container.jar:na]
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822) [ejb-container.jar:na]
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608) [ejb-container.jar:na]
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:55) [weld-osgi-bundle.jar:2014-06-18 10:59]
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52) [weld-osgi-bundle.jar:2014-06-18 10:59]
at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_40]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_40]
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883) [ejb-container.jar:na]
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822) [ejb-container.jar:na]
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608) [ejb-container.jar:na]
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163) [ejb-container.jar:na]
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundTimeout(SystemInterceptorProxy.java:145) [ejb-container.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_40]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_40]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_40]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_40]
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883) [ejb-container.jar:na]
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822) [ejb-container.jar:na]
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369) [ejb-container.jar:na]
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758) [ejb-container.jar:na]
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746) [ejb-container.jar:na]
at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:4051) [ejb-container.jar:na]
at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1199) [ejb-container.jar:na]
at com.sun.ejb.containers.EJBTimerService.access$000(EJBTimerService.java:89) [ejb-container.jar:na]
at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:1919) [ejb-container.jar:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_40]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_40]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_40]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_40]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40]
I have researched over the internet everywhere and found others that have had similar problems (but no apparent solution):
Code:
http://stackoverflow.com/questions/26659915/hibernate-4-3-6-glassfish-4-1-jpa-2-1
What are we doing wrong that is unacceptable to 4.3.6+ ? am I to be stuck to 4.3.5?
Thanks,
Juan