I am trying to implement liquibase in my JEE8 application using liquibase-cdi.
Liquibase starts up, runs all migrations successfully, but then throws the following exception, which causes the deploy to fail.
Payara 5.182.RC5 Exception:
16:05:10.263 [main] DEBUG liquibase.executor.jvm.JdbcExecutor - Release Database Lock
16:05:10.265 [main] DEBUG liquibase.executor.jvm.JdbcExecutor - UPDATE PUBLIC.DATABASECHANGELOGLOCK SET LOCKED = FALSE, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1
16:05:10.266 [main] INFO liquibase.lockservice.StandardLockService - Successfully released change log lock
2018-06-12T16:05:10.286+0200] [] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1528812310286] [levelValue: 1000] [[
Exception during lifecycle processing
org.glassfish.deployment.common.DeploymentException: CDI deployment failure:WELD-000049: Unable to invoke public void liquibase.integration.cdi.CDILiquibase.onStartup() on liquibase.integration.cdi.CDILiquibase#5f0b2fe1 -- WELD-000049: Unable to invoke public void liquibase.integration.cdi.CDILiquibase.onStartup() on liquibase.integration.cdi.CDILiquibase#5f0b2fe1
at org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:38)
at org.jboss.weld.bootstrap.events.AfterDeploymentValidationImpl.fire(AfterDeploymentValidationImpl.java:28)
at org.jboss.weld.bootstrap.WeldStartup.validateBeans(WeldStartup.java:499)
at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:93)
at org.glassfish.weld.WeldDeployer.processApplicationLoaded(WeldDeployer.java:511)
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:422)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:333)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepare(ApplicationLifecycle.java:496)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:540)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:549)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:545)
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:544)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:575)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:567)
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:566)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1475)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:111)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1857)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1733)
at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:133)
at fish.payara.micro.impl.PayaraMicroImpl.deployAll(PayaraMicroImpl.java:1553)
at fish.payara.micro.impl.PayaraMicroImpl.bootStrap(PayaraMicroImpl.java:1036)
at fish.payara.micro.impl.PayaraMicroImpl.main(PayaraMicroImpl.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at fish.payara.micro.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at fish.payara.micro.boot.loader.Launcher.launch(Launcher.java:107)
at fish.payara.micro.boot.loader.Launcher.launch(Launcher.java:70)
at fish.payara.micro.boot.PayaraMicroLauncher.main(PayaraMicroLauncher.java:79)
at fish.payara.micro.PayaraMicro.main(PayaraMicro.java:397)
]]
[2018-06-12T16:05:10.287+0200] [] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1528812310287] [levelValue: 1000] Exception while loading the app
[2018-06-12T16:05:10.293+0200] [] [SEVERE] [AS-WEB-GLUE-00192] [javax.enterprise.web] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1528812310293] [levelValue: 1000] Undeployment failed for context
My CDI class:
#Dependent
public class LiquibaseCdiIntegration {
#Resource
private DataSource myDataSource;
#Produces
#LiquibaseType
public CDILiquibaseConfig createConfig() {
CDILiquibaseConfig config = new CDILiquibaseConfig();
config.setChangeLog("liquibase/changelog.xml");
return config;
}
#Produces
#LiquibaseType
public DataSource createDataSource() throws SQLException {
return myDataSource;
}
#Produces
#LiquibaseType
public ResourceAccessor create() {
return new ClassLoaderResourceAccessor(getClass().getClassLoader());
}
}
From my pom.xml:
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>3.6.1</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-cdi</artifactId>
<version>3.6.1</version>
</dependency>
Since my changelog.xml runs successfully, I won't paste it here.
EDIT: (Might be relevant)
When trying to deploy to Payara Micro 5.181 the following error happens:
[2018-06-12T16:20:16.355+0200] [] [WARN] [] [org.jboss.weld.Validator] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1528813216355] [levelValue: 900] WELD-001473: javax.enterprise.inject.spi.Bean implementation liquibase.integration.cdi.CDIBootstrap$1#1798c749 declared a normal scope but does not implement javax.enterprise.inject.spi.PassivationCapable. It won't be possible to inject this bean into a bean with a passivating scope (#SessionScoped, #ConversationScoped). This can be fixed by assigning the Bean implementation a unique id by implementing the PassivationCapable interface.
No valid EE environment for injection of liquibase.integration.cdi.CDILiquibase
No valid EE environment for injection of de.ccsys.sns.monitoring.config.LiquibaseCdiIntegration
No valid EE environment for injection of de.ccsys.sns.monitoring.config.LiquibaseCdiIntegration
No valid EE environment for injection of de.ccsys.sns.monitoring.config.LiquibaseCdiIntegration
16:20:16.615 [main] INFO liquibase.integration.cdi.CDILiquibase - Booting Liquibase 3.6.1
[2018-06-12T16:20:16.736+0200] [] [WARNING] [NCLS-CORE-00069] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1528813216736] [levelValue: 900] [[
Exception while dispatching an event
org.glassfish.api.invocation.InvocationException
at org.glassfish.api.invocation.InvocationManagerImpl.postInvoke(InvocationManagerImpl.java:178)
at org.glassfish.weld.WeldDeployer.processApplicationLoaded(WeldDeployer.java:522)
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:426)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:333)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepare(ApplicationLifecycle.java:493)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:512)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:549)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:545)
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:544)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:575)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:567)
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:566)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1475)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:111)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1857)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1733)
at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:134)
at fish.payara.micro.impl.PayaraMicroImpl.deployAll(PayaraMicroImpl.java:1531)
at fish.payara.micro.impl.PayaraMicroImpl.bootStrap(PayaraMicroImpl.java:1019)
at fish.payara.micro.impl.PayaraMicroImpl.main(PayaraMicroImpl.java:201)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at fish.payara.micro.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at fish.payara.micro.boot.loader.Launcher.launch(Launcher.java:107)
at fish.payara.micro.boot.loader.Launcher.launch(Launcher.java:70)
at fish.payara.micro.boot.PayaraMicroLauncher.main(PayaraMicroLauncher.java:79)
at fish.payara.micro.PayaraMicro.main(PayaraMicro.java:383)
]]
Can someone point me in the right direction here?
I also had to deal with this issue. Similar configuration Java EE8, Payara 5.183, and using Liquibase 3.6.1.
The issue is related to how WELD (CDI) is wrapping the exception thrown by Liquibase during the execution of the database scripts. The explicit message for the error cause is not been printed in the logs, but it is usually related to an error on the instructions of the liquibase changeset.
In my case, I was adding a primary key but I had forgotten to put the constraint name. Once I fixed that, it started working.
If any one is getting the same error, please start by checking the instructions in the changeset.
The above answer is based on Liquibase-CDI fails to deploy after successful run, reported by owner of this question (who already mentioned his problem is fixed). But it's worthy to detail the cause and possible aproaches to fix it, for other people with the same problem.
Related
I'm trying to configure a global serializer for Hazelcast 3.12 (My application runs on payara 5 which comes bundled with this version of Hazelcast so I cannot update to 4.x)
According to the manual (https://docs.hazelcast.org/docs/3.12/manual/html-single/index.html#global-serializer) implementing and configuring a global serializer should be simple, here is my Serializer:
public class MyGlobalStreamSerializer implements StreamSerializer<Object> {
private static FSTConfiguration conf = FSTConfiguration.createDefaultConfiguration();
#Override
public int getTypeId() {
return 123;
}
#Override
public void destroy() {
}
#Override
public void write(ObjectDataOutput objectDataOutput, Object o) throws IOException {
objectDataOutput.write(conf.asByteArray(o));
}
#Override
public Object read(ObjectDataInput objectDataInput) throws IOException {
return conf.asObject(objectDataInput.readByteArray());
}
}
I'm using fast-serialization for the actual serialization implementation:
<dependency>
<groupId>de.ruedigermoeller</groupId>
<artifactId>fst</artifactId>
<version>2.57</version>
</dependency>
And the serialization configuration in my hazelcast-config.xml
<serialization>
<portable-version>0</portable-version>
<serializers>
<global-serializer override-java-serialization="true" >de.mycompany.myapp.domain.MyGlobalStreamSerializer</global-serializer>
</serializers>
</serialization>
however at application startup I get a NullPointerException when the configuration is built:
[2020-10-20T12:37:14.348+0200] [Payara 5.2020] [SEVERE] [NCLS-CORE-00014] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1603190234348] [levelValue: 1000] [[
Shutdown required
MultiException stack 1 of 1
MultiException stack 1 of 4
java.lang.NullPointerException
at fish.payara.nucleus.hazelcast.HazelcastCore.buildConfiguration(HazelcastCore.java:333)
at fish.payara.nucleus.hazelcast.HazelcastCore.bootstrapHazelcast(HazelcastCore.java:480)
at fish.payara.nucleus.hazelcast.HazelcastCore.getInstance(HazelcastCore.java:234)
at fish.payara.nucleus.config.ClusteredConfig.postConstruct(ClusteredConfig.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.glassfish.hk2.utilities.reflection.ReflectionHelper.invoke(ReflectionHelper.java:1268)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:309)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:351)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:463)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:281)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:65)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2102)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:679)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:54)
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:188)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:211)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:334)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:463)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:281)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:65)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2102)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:67)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:821)
MultiException stack 2 of 4
java.lang.IllegalStateException: Unable to perform operation: post construct on fish.payara.nucleus.config.ClusteredConfig
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:369)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:463)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:281)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:65)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2102)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:679)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:54)
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:188)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:211)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:334)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:463)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:281)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:65)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2102)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:67)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:821)
MultiException stack 3 of 4
java.lang.IllegalArgumentException: While attempting to resolve the dependencies of fish.payara.nucleus.requesttracing.RequestTracingService errors were found
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:224)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:334)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:463)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:281)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:65)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2102)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:67)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:821)
MultiException stack 4 of 4
java.lang.IllegalStateException: Unable to perform operation: resolve on fish.payara.nucleus.requesttracing.RequestTracingService
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:363)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:463)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:281)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:65)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2102)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:67)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:821)
]]
Omitting the package / using just the class name as value for global-serializer in the configuration as seen in the manual didn't work either, my last attempt was with the full path because that's how it's done in the hazelcast-full-example.xml that comes with the release.
I also saw another post here where someone was trying to implement a global serializer using Kryo as implementation for the actual serialization, the code and config looked pretty much the same but he didn't seem to have my problem (Hazelcast with global serializer (Kryo) - There is no suitable de-serializer for type)
Can anyone tell me what I'm doing wrong? Thanks in advance!
Payara Server uses its own serializer which can't be disabled, see the docs: https://docs.payara.fish/community/docs/5.2020.5/documentation/payara-server/hazelcast/configuration.html. The Payara serializer delegates to a Hazelcast global serializer which is specified in the Hazelcast config. This serialized should be in the Payara Server's classpath, it's not enough to add it to your application.
Try adding a JAR file with MyGlobalStreamSerializer and all its dependencies (e.g. the fst JAR and its dependencies) to the lib directory in your domain directory, this will add it to the server's classpath. Here's the docs on the asadmin add-library command, which you can use: https://docs.payara.fish/community/docs/5.2020.5/documentation/payara-server/asadmin-commands/misc-commands.html#add-library-command.
In your case, it seems that the exception is thrown when Payara Server wants to log a message that your global serializer is not a subclass of StreamSesrializer which the Payara serializer expects: https://github.com/payara/Payara/blob/master/nucleus/payara-modules/hazelcast-bootstrap/src/main/java/fish/payara/nucleus/hazelcast/HazelcastCore.java#L333
That code hasn't changed in any version of Payara Server 5.2020.x and the only way it can throw a NullPointerException is if the global serializer is null. I expect this happens because Hazelcast can't find the class of your serializer and returns null for the serializer.
I am not able to re-deploy my ADF application in glassfish. I am getting the exception "This web container has not yet been started". I have removed the old application. Also. I have restarted the domain. But the error still persists.
I have tried almost everything. Also checked related queries inside the stack overflow. If suspect the issue is of EntityManagerFactor. But not sure.
I am deploying Oracle ADF application and I am using Oracle Database. Also, Sample application was already deployed in the server. But after some changes in the coding. I am not able to do so.
[2019-01-27T12:18:15.439+0300] [glassfish 4.1] [SEVERE] [AS-NAMING-00006] [org.glassfish.naming] [tid: _ThreadID=2414 _ThreadName=DefaultQuartzScheduler_Worker-7] [timeMillis: 1548580695439] [levelValue: 1000] [[
Exception in NamingManagerImpl copyMutableObject(): {0}
java.lang.IllegalStateException: This web container has not yet been started
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1674)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1633)
at org.glassfish.common.util.ObjectInputStreamWithLoader.resolveClass(ObjectInputStreamWithLoader.java:131)
at org.glassfish.common.util.OSGiObjectInputOutputStreamFactoryImpl$OSGiObjectInputStream.resolveClass(OSGiObjectInputOutputStreamFactoryImpl.java:161)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1521)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1781)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
at com.sun.enterprise.naming.util.NamingUtilsImpl$1.run(NamingUtilsImpl.java:125)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.naming.util.NamingUtilsImpl.makeCopyOfObject(NamingUtilsImpl.java:123)
at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:147)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:478)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at ei.util.ConnectionManager.getConnection(ConnectionManager.java:38)
at ei.integration.generic.ap.APLoadDataScheduler.executeAPLoadScheduler(APLoadDataScheduler.java:55)
at ei.integration.generic.ap.APLoadDataScheduler.execute(APLoadDataScheduler.java:40)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
]]
[2019-01-27T12:18:15.440+0300] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=2414 _ThreadName=Thread-9] [timeMillis: 1548580695440] [levelValue: 1000] [[
javax.naming.CommunicationException: Communication exception for SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is java.lang.RuntimeException: Cant copy Serializable object:]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:513)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at ei.util.ConnectionManager.getConnection(ConnectionManager.java:38)
at ei.integration.generic.ap.APLoadDataScheduler.executeAPLoadScheduler(APLoadDataScheduler.java:55)
at ei.integration.generic.ap.APLoadDataScheduler.execute(APLoadDataScheduler.java:40)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
Caused by: java.lang.RuntimeException: Cant copy Serializable object:
at com.sun.enterprise.naming.util.NamingUtilsImpl.makeCopyOfObject(NamingUtilsImpl.java:131)
at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:147)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:478)
... 8 more
Caused by: java.lang.IllegalStateException: This web container has not yet been started
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1674)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1633)
at org.glassfish.common.util.ObjectInputStreamWithLoader.resolveClass(ObjectInputStreamWithLoader.java:131)
at org.glassfish.common.util.OSGiObjectInputOutputStreamFactoryImpl$OSGiObjectInputStream.resolveClass(OSGiObjectInputOutputStreamFactoryImpl.java:161)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1521)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1781)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
at com.sun.enterprise.naming.util.NamingUtilsImpl$1.run(NamingUtilsImpl.java:125)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.naming.util.NamingUtilsImpl.makeCopyOfObject(NamingUtilsImpl.java:123)
... 10 more]]
[2019-01-27T12:18:15.440+0300] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=2414 _ThreadName=Thread-9] [timeMillis: 1548580695440] [levelValue: 1000] [[
java.lang.NullPointerException]]
[2019-01-27T12:18:15.440+0300] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=2414 _ThreadName=Thread-9] [timeMillis: 1548580695440] [levelValue: 1000] [[
java.lang.NullPointerException]]
[2019-01-27T12:18:15.440+0300] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=2414 _ThreadName=Thread-9] [timeMillis: 1548580695440] [levelValue: 1000] [[
java.lang.NullPointerException]]
[2019-01-27T12:18:21.003+0300] [glassfish 4.1] [SEVERE] [AS-NAMING-00006] [org.glassfish.naming] [tid: _ThreadID=2408 _ThreadName=DefaultQuartzScheduler_Worker-1] [timeMillis: 1548580701003] [levelValue: 1000] [[
Exception in NamingManagerImpl copyMutableObject(): {0}
java.lang.IllegalStateException: This web container has not yet been started
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1674)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1633)
at org.glassfish.common.util.ObjectInputStreamWithLoader.resolveClass(ObjectInputStreamWithLoader.java:131)
at org.glassfish.common.util.OSGiObjectInputOutputStreamFactoryImpl$OSGiObjectInputStream.resolveClass(OSGiObjectInputOutputStreamFactoryImpl.java:161)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1521)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1781)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
at com.sun.enterprise.naming.util.NamingUtilsImpl$1.run(NamingUtilsImpl.java:125)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.naming.util.NamingUtilsImpl.makeCopyOfObject(NamingUtilsImpl.java:123)
at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:147)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:478)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at ei.util.ConnectionManager.getConnection(ConnectionManager.java:38)
at ei.integration.generic.scheduler.PartyLoadDataScheduler.executePartyLoadScheduler(PartyLoadDataScheduler.java:52)
at ei.integration.generic.scheduler.PartyLoadDataScheduler.execute(PartyLoadDataScheduler.java:40)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
]]
[2019-01-27T12:18:21.005+0300] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=2408 _ThreadName=Thread-9] [timeMillis: 1548580701005] [levelValue: 1000] [[
javax.naming.CommunicationException: Communication exception for SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is java.lang.RuntimeException: Cant copy Serializable object:]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:513)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at ei.util.ConnectionManager.getConnection(ConnectionManager.java:38)
at ei.integration.generic.scheduler.PartyLoadDataScheduler.executePartyLoadScheduler(PartyLoadDataScheduler.java:52)
at ei.integration.generic.scheduler.PartyLoadDataScheduler.execute(PartyLoadDataScheduler.java:40)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
Caused by: java.lang.RuntimeException: Cant copy Serializable object:
at com.sun.enterprise.naming.util.NamingUtilsImpl.makeCopyOfObject(NamingUtilsImpl.java:131)
at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:147)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:478)
... 8 more
Caused by: java.lang.IllegalStateException: This web container has not yet been started
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1674)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1633)
at org.glassfish.common.util.ObjectInputStreamWithLoader.resolveClass(ObjectInputStreamWithLoader.java:131)
at org.glassfish.common.util.OSGiObjectInputOutputStreamFactoryImpl$OSGiObjectInputStream.resolveClass(OSGiObjectInputOutputStreamFactoryImpl.java:161)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1521)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1781)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
at com.sun.enterprise.naming.util.NamingUtilsImpl$1.run(NamingUtilsImpl.java:125)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.naming.util.NamingUtilsImpl.makeCopyOfObject(NamingUtilsImpl.java:123)
I still don't know what was the issue. But I have stoped the server then manually deleted the folder of my application insde the "..glassfish\domains\domain1\applications" folder. And started the server. And tried to deploy my application. And it was deployed successfully this time.
Currently working on a module with gRPC/gNMI + Kotlin with Ktor HTTP.
Stucked with the secured dependency library tc-native netty-tcnative-boringssl-static 2.0.19-Final
Ktor is in 1.0.0-beta3
// ktor
implementation "io.ktor:ktor-server-core:${ktor_version}"
implementation "io.ktor:ktor-server-netty:${ktor_version}"
implementation "io.ktor:ktor-html-builder:${ktor_version}"
implementation "io.ktor:ktor-gson:${ktor_version}"
implementation "io.ktor:ktor-metrics:${ktor_version}"
implementation "io.ktor:ktor-locations:${ktor_version}"
implementation "ch.qos.logback:logback-classic:${logback_version}"
// tpl
implementation "io.ktor:ktor-freemarker:${ktor_version}"
implementation "org.freemarker:freemarker:${freemarker_version}"
// Security
//implementation "io.netty:netty-tcnative:${netty_tcnative_version}"
implementation "io.netty:netty-tcnative-boringssl-static:${netty_tcnative_version}".
When using gRPC request
fun Route.routeFilesystem() {
get("/test") {
call.respondHtml {
head {
title { +"gRPC/gNMI" }
}
body {
p {
+"[ Capabilities Test ] "
TLSConnection("xxx.xxx.xxx.xxx",8448).capabilities()
}
}
}
}
it gives the following error (stacktrace):
[DEBUG] 2018-11-09 16:50:36.789 [nettyCallPool-4-4] DEBUG i.n.u.internal.NativeLibraryLoader - netty_tcnative_linux_x86_64 cannot be loaded from java.libary.path, now trying export to -Dio.netty.native.workdir: /tmp
java.lang.UnsatisfiedLinkError: no netty_tcnative_linux_x86_64 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:243)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:124)
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:85)
at io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:440)
at io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:97)
at io.grpc.netty.GrpcSslContexts.defaultSslProvider(GrpcSslContexts.java:244)
at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:171)
at io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:120)
at sdn.client.cli.console.TLSConnection.<init>(TLSConnection.kt:38)
at sdn.client.ui.ApplicationKt$routeFilesystem$1$1$2$1.invoke(Application.kt:125)
at sdn.client.ui.ApplicationKt$routeFilesystem$1$1$2$1.invoke(Application.kt)
at kotlinx.html.ApiKt.visit(api.kt:80)
at kotlinx.html.Gen_tag_groupsKt.p(gen-tag-groups.kt:125)
at kotlinx.html.Gen_tag_groupsKt.p$default(gen-tag-groups.kt:125)
at .sdn.client.ui.ApplicationKt$routeFilesystem$1$1$2.invoke(Application.kt:123)
at .sdn.client.ui.ApplicationKt$routeFilesystem$1$1$2.invoke(Application.kt)
at kotlinx.html.ApiKt.visit(api.kt:80)
at kotlinx.html.Gen_tags_hKt.body(gen-tags-h.kt:164)
at kotlinx.html.Gen_tags_hKt.body$default(gen-tags-h.kt:164)
at .sdn.client.ui.ApplicationKt$routeFilesystem$1$1.invoke(Application.kt:122)
at sdn.client.ui.ApplicationKt$routeFilesystem$1$1.invoke(Application.kt)
at kotlinx.html.ApiKt.visit(api.kt:80)
at kotlinx.html.ApiKt.visitAndFinalize(api.kt:93)
at kotlinx.html.Gen_consumer_tagsKt.html(gen-consumer-tags.kt:317)
at kotlinx.html.Gen_consumer_tagsKt.html$default(gen-consumer-tags.kt:317)
at io.ktor.html.HtmlContent.writeTo(RespondHtml.kt:32)
at io.ktor.server.engine.BaseApplicationResponse$respondWriteChannelContent$2.invokeSuspend(BaseApplicationResponse.kt:155)
at io.ktor.server.engine.BaseApplicationResponse$respondWriteChannelContent$2.invoke(BaseApplicationResponse.kt)
at io.ktor.util.cio.ReadersKt.use(Readers.kt:33)
at io.ktor.server.engine.BaseApplicationResponse.respondWriteChannelContent$suspendImpl(BaseApplicationResponse.kt:149)
at io.ktor.server.engine.BaseApplicationResponse.respondWriteChannelContent(BaseApplicationResponse.kt)
at io.ktor.server.engine.BaseApplicationResponse.respondOutgoingContent$suspendImpl(BaseApplicationResponse.kt:119)
at io.ktor.server.engine.BaseApplicationResponse.respondOutgoingContent(BaseApplicationResponse.kt)
at io.ktor.server.netty.NettyApplicationResponse.respondOutgoingContent$suspendImpl(NettyApplicationResponse.kt:37)
at io.ktor.server.netty.NettyApplicationResponse.respondOutgoingContent(NettyApplicationResponse.kt)
at io.ktor.server.engine.BaseApplicationResponse$$special$$inlined$apply$lambda$1.invokeSuspend(BaseApplicationResponse.kt:36)
at io.ktor.server.engine.BaseApplicationResponse$$special$$inlined$apply$lambda$1.invoke(BaseApplicationResponse.kt)
at io.ktor.util.pipeline.PipelineContext.proceed(PipelineContext.kt:53)
at io.ktor.util.pipeline.PipelineContext.proceedWith(PipelineContext.kt:39)
at io.ktor.server.engine.DefaultTransformKt$installDefaultTransformations$1.invokeSuspend(DefaultTransform.kt:26)
at io.ktor.server.engine.DefaultTransformKt$installDefaultTransformations$1.invoke(DefaultTransform.kt)
at io.ktor.util.pipeline.PipelineContext.proceed(PipelineContext.kt:53)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:24)
at io.ktor.html.RespondHtmlKt.respondHtml(RespondHtml.kt:37)
at io.ktor.html.RespondHtmlKt.respondHtml$default(RespondHtml.kt:15)
at sdn.client.ui.ApplicationKt$routeFilesystem$1.invokeSuspend(Application.kt:116)
at .sdn.client.ui.ApplicationKt$routeFilesystem$1.invoke(Application.kt)
at io.ktor.util.pipeline.PipelineContext.proceed(PipelineContext.kt:53)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:24)
at io.ktor.routing.Routing.executeResult(Routing.kt:110)
at io.ktor.routing.Routing.interceptor(Routing.kt:29)
at io.ktor.routing.Routing$Feature$install$1.invokeSuspend(Routing.kt:75)
at io.ktor.routing.Routing$Feature$install$1.invoke(Routing.kt)
at io.ktor.util.pipeline.PipelineContext.proceed(PipelineContext.kt:53)
at io.ktor.features.ContentNegotiation$Feature$install$1.invokeSuspend(ContentNegotiation.kt:60)
at io.ktor.features.ContentNegotiation$Feature$install$1.invoke(ContentNegotiation.kt)
at io.ktor.util.pipeline.PipelineContext.proceed(PipelineContext.kt:53)
at io.ktor.features.StatusPages$intercept$3.invokeSuspend(StatusPages.kt:88)
at io.ktor.features.StatusPages$intercept$3.invoke(StatusPages.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:82)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:162)
at io.ktor.features.StatusPages.intercept(StatusPages.kt:87)
at io.ktor.features.StatusPages$Feature$install$1.invokeSuspend(StatusPages.kt:121)
at io.ktor.features.StatusPages$Feature$install$1.invoke(StatusPages.kt)
at io.ktor.util.pipeline.PipelineContext.proceed(PipelineContext.kt:53)
at io.ktor.features.CallLogging$Feature$install$2.invokeSuspend(CallLogging.kt:124)
at io.ktor.features.CallLogging$Feature$install$2.invoke(CallLogging.kt)
at io.ktor.util.pipeline.PipelineContext.proceed(PipelineContext.kt:53)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:24)
at io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$2.invokeSuspend(DefaultEnginePipeline.kt:80)
at io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$2.invoke(DefaultEnginePipeline.kt)
at io.ktor.util.pipeline.PipelineContext.proceed(PipelineContext.kt:53)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:24)
at io.ktor.server.netty.NettyApplicationCallHandler$handleRequest$1.invokeSuspend(NettyApplicationCallHandler.kt:31)
at io.ktor.server.netty.NettyApplicationCallHandler$handleRequest$1.invoke(NettyApplicationCallHandler.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:54)
at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:111)
at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:160)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:54)
at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
at io.ktor.server.netty.NettyApplicationCallHandler.handleRequest(NettyApplicationCallHandler.kt:22)
at io.ktor.server.netty.NettyApplicationCallHandler.channelRead(NettyApplicationCallHandler.kt:16)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:38)
at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:353)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:464)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
Suppressed: java.lang.UnsatisfiedLinkError: no netty_tcnative_linux_x86_64 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:263)
at java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:255)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:233)
... 90 common frames omitted
Please any idea to solve the problem ?
Thanks
See https://github.com/netty/netty-tcnative/issues/331
It's a DEBUG level print, which indicates it may not be an actual error, just something netty tried and failed to load. Loading the boringssl .so possibly succeeded later on.
Jboss 7.1.1 server is throwing hornetq reconnect errors on one of the queue I configured. I have removed messages from the queue using CLI and deleted the data folder as well, but this error is not going away. Appreciate any help.
CLI command
[standalone#localhost:9999 /] /subsystem=messaging/hornetq-server=default/jms-queue=myQueueC:remove-messages
{
"outcome" => "success",
"result" => 0
}
Exception stack trace from the server log
10:53:47,505 INFO [org.hornetq.ra.inflow.HornetQActivation] (default-short-running-threads-threads - 1) Attempting to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter#20ebddc6 destination=java:/queue/C destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15)
10:53:47,518 ERROR [org.hornetq.ra.inflow.HornetQActivation] (default-short-running-threads-threads - 1) Unable to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter#20ebddc6 destination=java:/queue/C destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15): java.lang.IllegalArgumentException: interface javax.resource.spi.endpoint.MessageEndpoint is not visible from class loader
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:616) [rt.jar:1.7.0_67]
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:592) [rt.jar:1.7.0_67]
at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:244) [rt.jar:1.7.0_67]
at java.lang.reflect.WeakCache.get(WeakCache.java:141) [rt.jar:1.7.0_67]
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:455) [rt.jar:1.7.0_67]
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:738) [rt.jar:1.7.0_67]
at org.jboss.as.ejb3.inflow.JBossMessageEndpointFactory.createEndpoint(JBossMessageEndpointFactory.java:56)
at org.jboss.as.ejb3.inflow.JBossMessageEndpointFactory.createEndpoint(JBossMessageEndpointFactory.java:49)
at org.hornetq.ra.inflow.HornetQMessageHandler.setup(HornetQMessageHandler.java:185) [hornetq-ra-2.2.13.Final.jar:]
at org.hornetq.ra.inflow.HornetQActivation.setup(HornetQActivation.java:296) [hornetq-ra-2.2.13.Final.jar:]
at org.hornetq.ra.inflow.HornetQActivation.handleFailure(HornetQActivation.java:566) [hornetq-ra-2.2.13.Final.jar:]
at org.hornetq.ra.inflow.HornetQActivation$SetupActivation.run(HornetQActivation.java:609) [hornetq-ra-2.2.13.Final.jar:]
at org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:212)
at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:801)
at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:821)
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
If you are using custom JBoss module, make sure that your module has dependency to javax.resource.api.
<module>
<dependencies>
<module name="javax.resource.api" />
</dependencies>
</module>
Another solution is: Add Dependencies: javax.resource.api line to your MyApp.jar/META-INF/MANIFEST.MF file.
I am in the process of migrate from OC4J to glassfish and struggles to deploy MDBs with durable subscriptions on Glassfish4
The class MyObserver implements MessageDrivenBean and MessageListener and is registered with a topic
Created topic:
asadmin create-jms-resource --restype=javax.jms.Topic --description="Topic for EventObjectMessage(s)" --property Name=PhysicalTopic jms/EventObjectMessageTopic
created topic factory:
asadmin create-jms-resource --restype=javax.jms.TopicConnectionFactory --description="Topic factory" --property ClientId=EventObjectMessageTopicConnectionFactoryID EventObjectMessageTopicConnectionFactory
created physical destination:
asadmin create-jmsdest --desttype topic EventObjectMessageTopic
in ejb-jar.xml:
<message-driven>
<ejb-name>MyObserver </ejb-name>
<ejb-class>com.firm.MyObserver </ejb-class>
<transaction-type>Container</transaction-type>
<message-selector>qualifiedName = 'com.firm.EventObjectMessage' AND objectsClassName = 'com.firm.SomeObject'</message-selector>
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Topic</destination-type>
<subscription-durability>Durable</subscription-durability>
</message-driven-destination>
... a lot of refs
</message-driven>
and glassfish-ejb-jar.xml
<ejb>
<ejb-name>MyObserver </ejb-name>
<jndi-name>jms/EventObjectMessageTopic</jndi-name>
<mdb-resource-adapter>
<activation-config>
<activation-config-property>
<activation-config-property-name>clientId</activation-config-property-name>
<activation-config-property-value>EventObjectMessageTopicConnectionFactoryID</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>subscriptionName</activation-config-property-name>
<activation-config-property-value>ASubscriptionName</activation-config-property-value>
</activation-config-property>
</activation-config>
</mdb-resource-adapter>
</ejb>
This is part of the stacktrace:
[2014-01-07T08:44:44.308+0100] [glassfish 4.0] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=46 _ThreadName=admin-listener(3)] [timeMillis: 1389080684308] [levelValue: 1000] [[
Exception during lifecycle processing
java.lang.RuntimeException: EJB Container initialization error
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:234)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
...
Caused by: java.lang.Exception
at com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:216)
at org.glassfish.ejb.mdb.MessageBeanContainer.<init>(MessageBeanContainer.java:252)
at org.glassfish.ejb.mdb.MessageBeanContainerFactory.createContainer(MessageBeanContainerFactory.java:63)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
... 68 more
Caused by: javax.resource.NotSupportedException: MQRA:EC:Error creating Direct Message Consumer:
createConsumer on JMSService:jmsdirect failed for connectionId:8664718337762585088 and sessionId:8664718337762587904 due to [B4135]: Cannot add durable consumer MyObserver. No ClientID was set on connection.
at com.sun.messaging.jms.ra.EndpointConsumer.createDirectMessageConsumer(EndpointConsumer.java:890)
at com.sun.messaging.jms.ra.EndpointConsumer._init(EndpointConsumer.java:345)
I am not sure if clientId should only be set on the connectionfactory and as a mdb-resource-adapter as I did.
Does anyone have a tip or could point out what i miss.
Best regards Geir