Cannot Cast CascadingClassLoadHelper to Quartz ClassLoadHelper - java

I'm getting the following exception while trying to deploy my camel-quartz application in fuse:
Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=test-quartz-impl, config=osgibundle:/META-INF/spring/*.xml))
org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route371: Route(route371)[[From[quartz://test/testQuartzJob?c... because of Failed to resolve endpoint: quartz://test/testQuartzJob?cron=0+0%2F15+*+1%2F1+*+%3F due to: Cannot auto create component: quartz
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1619)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:123)[210:org.apache.camel.camel-spring:2.15.1.redhat-621117]
at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:332)[210:org.apache.camel.camel-spring:2.15.1.redhat-621117]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)[174:org.apache.servicemix.bundles.spring-context:3.2.12.RELEASE_2]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)[174:org.apache.servicemix.bundles.spring-context:3.2.12.RELEASE_2]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:950)[174:org.apache.servicemix.bundles.spring-context:3.2.12.RELEASE_2]
at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)[178:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)[178:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[178:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[178:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[179:org.springframework.osgi.extender:1.2.1]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_121]
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route371: Route(route371)[[From[quartz://test/testQuartzJob?c... because of Failed to resolve endpoint: quartz://test/testQuartzJob?cron=0+0%2F15+*+1%2F1+*+%3F due to: Cannot auto create component: quartz
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:190)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:838)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:2897)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2620)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:167)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2469)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2465)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2488)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2465)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2434)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:255)[210:org.apache.camel.camel-spring:2.15.1.redhat-621117]
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:121)[210:org.apache.camel.camel-spring:2.15.1.redhat-621117]
... 10 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: quartz://test/testQuartzJob?cron=0+0%2F15+*+1%2F1+*+%3F due to: Cannot auto create component: quartz
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:575)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:79)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:200)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:107)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:70)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:89)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1008)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:185)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
... 22 more
Caused by: org.apache.camel.RuntimeCamelException: Cannot auto create component: quartz
at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:397)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:373)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:545)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
... 30 more
Caused by: org.quartz.SchedulerConfigException: Unable to instantiate class load helper class: org.quartz.simpl.CascadingClassLoadHelper cannot be cast to org.quartz.spi.ClassLoadHelper [See nested exception: java.lang.ClassCastException: org.quartz.simpl.CascadingClassLoadHelper cannot be cast to org.quartz.spi.ClassLoadHelper]
at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:692)[662:org.apache.servicemix.bundles.quartz:1.8.6.1]
at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1509)[662:org.apache.servicemix.bundles.quartz:1.8.6.1]
at org.apache.camel.component.quartz.QuartzComponent.createScheduler(QuartzComponent.java:555)[664:org.apache.camel.camel-quartz:2.15.1.redhat-621117]
at org.apache.camel.component.quartz.QuartzComponent.getScheduler(QuartzComponent.java:407)[664:org.apache.camel.camel-quartz:2.15.1.redhat-621117]
at org.apache.camel.component.quartz.QuartzComponent.doStart(QuartzComponent.java:228)[664:org.apache.camel.camel-quartz:2.15.1.redhat-621117]
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:2871)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:392)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
... 32 more
Caused by: java.lang.ClassCastException: org.quartz.simpl.CascadingClassLoadHelper cannot be cast to org.quartz.spi.ClassLoadHelper
at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:689)[662:org.apache.servicemix.bundles.quartz:1.8.6.1]
... 39 more
I am using camel-quartz (Quartz1 of camel).
I've seen this JBoss and Quartz but it is specific to JBoss server.

The camel-quartz dependency didn't have any scope.
After checking here http://camel.apache.org/how-to-use-extra-camel-componets-in-servicemix-camel.html, I've added provided and it started working.
Thank You #nmagerko and #ledniov.

Related

Caused by: java.lang.IllegalArgumentException: class ConfigClientRetryBootstrapper is not assignable to interface BootstrapRegistryInitializer

I just upgraded spring boot version to : 2.7.0 & spring cloud to: 2021.0.3 and because it is a legacy system and got an error I added the dependency mentioned in :No spring.config.import property has been defined and got the following error
Caused by: java.lang.IllegalArgumentException: Cannot instantiate interface org.springframework.boot.BootstrapRegistryInitializer : org.springframework.cloud.config.client.ConfigClientRetryBootstrapper
at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:449)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:431)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:424)
at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:266)
at org.springframework.boot.builder.SpringApplicationBuilder.createSpringApplication(SpringApplicationBuilder.java:129)
at org.springframework.boot.builder.SpringApplicationBuilder.<init>(SpringApplicationBuilder.java:102)
at org.springframework.boot.builder.SpringApplicationBuilder.<init>(SpringApplicationBuilder.java:98)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createSpringApplicationBuilder(SpringBootServletInitializer.java:166)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:130)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:97)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:174)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5221)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 44 more
Caused by: java.lang.IllegalArgumentException: class org.springframework.cloud.config.client.ConfigClientRetryBootstrapper is not assignable to interface org.springframework.boot.BootstrapRegistryInitializer
at org.springframework.util.Assert.assignableCheckFailed(Assert.java:720)
at org.springframework.util.Assert.isAssignable(Assert.java:651)
at org.springframework.util.Assert.isAssignable(Assert.java:682)
at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:443)
... 56 more
Can someone help please ?
Thanks

Apache ignite failed to deserialize object

Environment :
Tomcat8
Ignite 2.11.1
JDK 11 (corretto)
After some time on tomcat8 the web application user Ignite to handle http session do that kind of error. Always on the same type. But it works at the begining.
SequenceEditableList class inherite of Arraylist<>
Caused by: org.apache.ignite.IgniteCheckedException: Failed to deserialize object with given class loader: [clsLdr=ParallelWebappClassLoader
context: xxxxxx
delegate: false
----------> Parent Classloader:
java.net.URLClassLoader#4277127c
, err=Failed to deserialize object [typeName=com.xxxx.web.common.list.SequenceEditableList]]
at org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller.unmarshal0(OptimizedMarshaller.java:261)
at org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller.unmarshal0(OptimizedMarshaller.java:225)
at org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:92)
at org.apache.ignite.internal.binary.BinaryUtils.doReadOptimized(BinaryUtils.java:1816)
... 137 common frames omitted
Caused by: java.io.IOException: Failed to deserialize object [typeName=com.xxxx.web.common.list.SequenceEditableList]
at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObject0(OptimizedObjectInputStream.java:357)
at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObjectOverride(OptimizedObjectInputStream.java:205)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:484)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:451)
at org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller.unmarshal0(OptimizedMarshaller.java:251)
... 140 common frames omitted
Caused by: java.io.IOException: java.lang.reflect.InvocationTargetException
at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readSerializable(OptimizedObjectInputStream.java:611)
at org.apache.ignite.internal.marshaller.optimized.OptimizedClassDescriptor.read(OptimizedClassDescriptor.java:985)
at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObject0(OptimizedObjectInputStream.java:353)
... 144 common frames omitted
Caused by: java.lang.reflect.InvocationTargetException: null
at java.base/jdk.internal.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readSerializable(OptimizedObjectInputStream.java:608)
... 146 common frames omitted
Caused by: java.io.InvalidClassException: filter status: REJECTED
at java.base/java.io.ObjectInputStream.filterCheck(ObjectInputStream.java:1356)
at java.base/java.io.ObjectInputStream.checkArray(ObjectInputStream.java:1386)
at java.base/java.util.ArrayList.readObject(ArrayList.java:924)
... 150 common frames omitted
What happens is that your class loader rejects the class SequenceEditableList.
The class is rejected because of serialization filtering. This mechanism is there to protect from many serialization vulnerabilities that caused problems in Java since the dawn of time.
The fix would be to find if your application already sets jdk.serialFilter system property anywhere. Ignite doesn't do that but maybe the application code or Tomcat do. Judging from the error, there must be this property somewhere.
When you've found where the property is defined, add your class to the allowed patterns. Like:
-Djdk.serialFilter=...;com.xxxx.web.common.list.SequenceEditableList
There aren't many details in the question, so it's hard to tell why it works in the beginning but fails after some time. Most likely it's because the classes are being deserialized in a different route (by a different class loader), or there just isn't an instance of SequenceEditableList that you need to deserialize. You could analyze.

Infinispan 13.0.6 - Error putting custom java classes (POJO) in cache via WildFly 26.0.1.Final

I'm using WildFly26.0.1.Final to connect to Infinispan 13.0.6 and when I try to put an POJO object in a Infinispan cache I got this error:
Caused by: org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=15 returned server error (status=0x85): org.infinispan.commons.CacheException: ISPN000936: Class 'pt.pe.sipe.storefrontmanager.api.artigo.SampleDTO' blocked by deserialization allow list. Adjust the configuration serialization allow list regular expression to include this class."}}
My configuration is:
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.addServer().host("server")
.port(11222)
.security()
.authentication()
.username("admin")
.password("password")
.addJavaSerialWhiteList("pt.pe.sipe.*") //you can set the class name or use regex
.marshaller(JavaSerializationMarshaller.class);
RemoteCacheManager rim = new RemoteCacheManager(builder.build());
cache = rim.getCache("teste15Fev22");
SampleDTO fd = new SampleDTO();
fd.setDescTipo("Franqueira");
System.out.println("A adicionar à cache A");
cache.put("A", fd);
System.out.println("Em cache: "+cache.get("A").getClass());
The full stack trace is:
2022-02-16 17:41:51,825 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 215) MSC000001: Failed to start service jboss.deployment.subunit."emporium-ear.ear"."emporium-ejb.jar".component.CacheManager.START: org.jboss.msc.service.StartException in service jboss.deployment.subunit."emporium-ear.ear"."emporium-ejb.jar".component.CacheManager.START: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
at org.jboss.as.ee#26.0.1.Final//org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:57)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:833)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
at org.jboss.as.ee#26.0.1.Final//org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:170)
at org.jboss.as.ee#26.0.1.Final//org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:141)
at org.jboss.as.ee#26.0.1.Final//org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:88)
at org.jboss.as.ejb3#26.0.1.Final//org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:127)
at org.jboss.as.ejb3#26.0.1.Final//org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:141)
at org.jboss.as.ee#26.0.1.Final//org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54)
... 8 more
Caused by: javax.ejb.EJBException: org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=15 returned server error (status=0x85): org.infinispan.commons.CacheException: ISPN000936: Class 'pt.pe.sipe.storefrontmanager.api.artigo.SampleDTO' blocked by deserialization allow list. Adjust the configuration serialization allow list regular expression to include this class.
at org.jboss.as.ejb3#26.0.1.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInNoTx(CMTTxInterceptor.java:239)
at org.jboss.as.ejb3#26.0.1.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.supports(CMTTxInterceptor.java:446)
at org.jboss.as.ejb3#26.0.1.Final//org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:70)
at org.jboss.invocation#1.7.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.weld#26.0.1.Final//org.jboss.as.weld.injection.WeldInjectionContextInterceptor.processInvocation(WeldInjectionContextInterceptor.java:43)
at org.jboss.invocation#1.7.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.ejb3#26.0.1.Final//org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
at org.jboss.invocation#1.7.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.ee#26.0.1.Final//org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
at org.jboss.invocation#1.7.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.invocation#1.7.0.Final//org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
at org.jboss.invocation#1.7.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.ejb3#26.0.1.Final//org.jboss.as.ejb3.component.singleton.StartupCountDownInterceptor.processInvocation(StartupCountDownInterceptor.java:25)
at org.jboss.invocation#1.7.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.invocation#1.7.0.Final//org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
at org.jboss.as.ee#26.0.1.Final//org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:168)
... 13 more
Caused by: org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=15 returned server error (status=0x85): org.infinispan.commons.CacheException: ISPN000936: Class 'pt.pe.sipe.storefrontmanager.api.artigo.SampleDTO' blocked by deserialization allow list. Adjust the configuration serialization allow list regular expression to include this class.
at deployment.emporium-ear.ear.org.infinispan-infinispan-client-hotrod-13.0.6.Final.jar//org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:323)
at deployment.emporium-ear.ear.org.infinispan-infinispan-client-hotrod-13.0.6.Final.jar//org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:168)
at deployment.emporium-ear.ear.org.infinispan-infinispan-client-hotrod-13.0.6.Final.jar//org.infinispan.client.hotrod.impl.transport.netty.HeaderDecoder.decode(HeaderDecoder.java:139)
at deployment.emporium-ear.ear.org.infinispan-infinispan-client-hotrod-13.0.6.Final.jar//org.infinispan.client.hotrod.impl.transport.netty.HintedReplayingDecoder.callDecode(HintedReplayingDecoder.java:94)
at deployment.emporium-ear.ear.io.netty-netty-codec-4.1.72.Final.jar//io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
at deployment.emporium-ear.ear.io.netty-netty-transport-4.1.72.Final.jar//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at deployment.emporium-ear.ear.io.netty-netty-transport-4.1.72.Final.jar//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at deployment.emporium-ear.ear.io.netty-netty-transport-4.1.72.Final.jar//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at deployment.emporium-ear.ear.io.netty-netty-handler-4.1.72.Final.jar//io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
at deployment.emporium-ear.ear.io.netty-netty-transport-4.1.72.Final.jar//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at deployment.emporium-ear.ear.io.netty-netty-transport-4.1.72.Final.jar//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at deployment.emporium-ear.ear.io.netty-netty-transport-4.1.72.Final.jar//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at deployment.emporium-ear.ear.io.netty-netty-transport-4.1.72.Final.jar//io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at deployment.emporium-ear.ear.io.netty-netty-transport-4.1.72.Final.jar//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at deployment.emporium-ear.ear.io.netty-netty-transport-4.1.72.Final.jar//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at deployment.emporium-ear.ear.io.netty-netty-transport-4.1.72.Final.jar//io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at deployment.emporium-ear.ear.io.netty-netty-transport-4.1.72.Final.jar//io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at deployment.emporium-ear.ear.io.netty-netty-transport-4.1.72.Final.jar//io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)
at deployment.emporium-ear.ear.io.netty-netty-transport-4.1.72.Final.jar//io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
at deployment.emporium-ear.ear.io.netty-netty-transport-4.1.72.Final.jar//io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
at deployment.emporium-ear.ear.io.netty-netty-transport-4.1.72.Final.jar//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
at deployment.emporium-ear.ear.io.netty-netty-common-4.1.72.Final.jar//io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
at deployment.emporium-ear.ear.io.netty-netty-common-4.1.72.Final.jar//io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
2022-02-16 17:41:51,826 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.subunit."emporium-ear.ear"."emporium-ejb.jar".component.CacheManager.START" => "java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
Caused by: javax.ejb.EJBException: org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=15 returned server error (status=0x85): org.infinispan.commons.CacheException: ISPN000936: Class 'pt.pe.sipe.storefrontmanager.api.artigo.SampleDTO' blocked by deserialization allow list. Adjust the configuration serialization allow list regular expression to include this class.
Caused by: org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=15 returned server error (status=0x85): org.infinispan.commons.CacheException: ISPN000936: Class 'pt.pe.sipe.storefrontmanager.api.artigo.SampleDTO' blocked by deserialization allow list. Adjust the configuration serialization allow list regular expression to include this class."}}
2022-02-16 17:41:51,826 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.subunit."emporium-ear.ear"."emporium-ejb.jar".component.CacheManager.START" => "java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
Caused by: javax.ejb.EJBException: org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=15 returned server error (status=0x85): org.infinispan.commons.CacheException: ISPN000936: Class 'pt.pe.sipe.storefrontmanager.api.artigo.SampleDTO' blocked by deserialization allow list. Adjust the configuration serialization allow list regular expression to include this class.
Caused by: org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=15 returned server error (status=0x85): org.infinispan.commons.CacheException: ISPN000936: Class 'pt.pe.sipe.storefrontmanager.api.artigo.SampleDTO' blocked by deserialization allow list. Adjust the configuration serialization allow list regular expression to include this class."}}
Thanks, Manuel
The answer is in the cache configuration. In earlier versions of Infinispan we need to define/create a cache. In older versions I use default cache and have no problem.
My working cache configuration:
{
"distributed-cache": {
"mode": "SYNC",
"statistics": true,
"encoding": {
"key": {
"media-type": "application/x-java-serialized-object"
},
"value": {
"media-type": "application/x-java-serialized-object"
}
}
}
}
Permissions problem I had in past (blocked by deserialization allow list. Adjust the configuration serialization allow list regular expression to include this class.) accessing classes manifested itself when I had the following configuration media-type "application/x-java-object". This configuration does not work!
Thanks for your help!

Playframework [2.6.6] to [2.7.0] causes CreationException

I try to migrate my play 2.6.6 application to 2.7.0. I am using Hibernate 4.2.3-Final. Does anybody know the cause of those Exceptions?
GeneralDao.java:71 is:
#Inject
public GeneralDao(JPAApi jpaApi) {}
OnStartup.java:66 is similar to above.
CreationException: Unable to create injector, see the following errors
1) Error injecting constructor, javax.persistence.PersistenceException: Unable to configure EntityManagerFactory
at play.db.jpa.DefaultJPAApi$JPAApiProvider.<init>(DefaultJPAApi.java:59)
at play.db.jpa.DefaultJPAApi$JPAApiProvider.class(DefaultJPAApi.java:50)
while locating play.db.jpa.JPAApi
for the 1st parameter of dao.GeneralDao.<init>(GeneralDao.java:71)
for the 2nd parameter of modules.OnStartup.<init>(OnStartup.java:66)
at modules.OnStartupModule.configure(OnStartupModule.java:10) (via modules: com.google.inject.util.Modules$OverrideModule -> modules.OnStartupModule)
while locating modules.OnStartup
Caused by: javax.persistence.PersistenceException: Unable to configure EntityManagerFactory
[cut]
Caused by: java.lang.RuntimeException: Error while reading file:/R:/appDir/target/scala-2.12/classes/
at org.hibernate.ejb.packaging.NativeScanner.getClassesInJar(NativeScanner.java:131)
[cut]
Caused by: java.io.IOException: invalid constant type: 18
[cut]
Full Stacktrace: https://pastebin.com/nEt1iavu
Updating to Hibernate 4.2.8-Final resolved the errors.
Thank you Stephen C for the hint.

spring annotation server loading time it showing class not found exception

server loading time it showing this error:
Caused by: org.springframework.beans.TypeMismatchException: Failed to
convert property value of type 'java.lang.String' to required type
'java.lang.Class[]' for property 'annotatedClasses'; nested exception
is java.lang.IllegalArgumentException: Cannot find class
[com.vcs.model.Student] Caused by: java.lang.ClassNotFoundException:
com.vcs.model.Student

Categories