Jackson databind : Cannot construct instance of `java.time.OffsetDateTime` - jackson

I am moving my project from dropwizard to mirconuat and I am getting below exception while consuming webservice response. i tried upgrading jackson version but it failed with warning and below cause.
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `java.time.OffsetDateTime` (no Creators, like default constructor, exist): no String-argument constructor/factory method to deserialize from String value ('2020-06-25T05:56:44.044423+08:00')
at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 206] (through reference chain: com.Port["_ModifiedAt"])
at com.fasterxml.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:67)
at com.fasterxml.jackson.databind.DeserializationContext.reportBadDefinition(DeserializationContext.java:1615)
at com.fasterxml.jackson.databind.DatabindContext.reportBadDefinition(DatabindContext.java:400)
at com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1077)
at com.fasterxml.jackson.databind.deser.ValueInstantiator._createFromStringFallbacks(ValueInstantiator.java:371)
at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromString(StdValueInstantiator.java:323)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromString(BeanDeserializerBase.java:1408)
at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:176)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:166)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:371)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeWithObjectId(BeanDeserializerBase.java:1288)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:162)
at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:2020)
at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1179)
at com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:810)
at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:256)
at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:235)
at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:155)
at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1085)
at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:874)
... 157 more
warning:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.fasterxml.jackson.databind.util.ClassUtil (file:/C://.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.11.1/jackson-databind-2.11.1.jar) to field java.time.OffsetDateTime.offset
WARNING: Please consider reporting this to the maintainers of com.fasterxml.jackson.databind.util.ClassUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
pom.xml
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.11.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr353</artifactId>
<version>2.11.1</version>
</dependency>

if you use jackson-datatype-jsr310 artifact and ObjectMapper for deserialization it is enough to register module for your ObjectMapper.
ObjectMapper mapper = new ObjectMapper()
.registerModule(new JavaTimeModule());

Related

Javafx Web 11 - Error initializing QuantumRenderer: no suitable pipeline found

My application uses Java Fx Web to display html pages, the problem is that this error appears only when I run the .jar directly because when I run it from my ide (eclipse) it runs without problems. Does anyone have any idea what this is about?
I am using AdoptOpenJdk11. I have also tested it on my colleague's computer and it also doesn't work.
Graphics Device initialization failed for : d3d, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:244)
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:261)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at javafx.embed.swing.JFXPanel.initFx(JFXPanel.java:241)
at javafx.embed.swing.JFXPanel.<init>(JFXPanel.java:257)
at com.rubicon.game.client.window.main.menu.GameMenuPanel.<init>(GameMenuPanel.java:62)
at com.rubicon.game.client.network.states.LobbyConnectionState.enable(LobbyConnectionState.java:12)
at com.rubicon.game.client.ClientApplication.loadComponents(ClientApplication.java:115)
at com.rubicon.game.client.ClientApplication.lambda$initializate$0(ClientApplication.java:98)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073)
at com.rubicon.game.client.network.NetworkConnection.lambda$login$0(NetworkConnection.java:124)
at com.rubicon.game.core.network.packets.PacketResponse.lambda$whenComplete$0(PacketResponse.java:30)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073)
at com.rubicon.game.core.network.packets.PacketResponse.complete(PacketResponse.java:24)
at com.rubicon.game.core.network.packets.request.PacketRequestLogin.onClientReceive(PacketRequestLogin.java:43)
at com.rubicon.game.client.network.callback.PacketCallbackRequester.onReceive(PacketCallbackRequester.java:33)
at com.rubicon.game.client.network.NetworkConnection.execute(NetworkConnection.java:94)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
... 1 more
Width -Dprism.verbose=true:
Prism pipeline init order: d3d sw
Using Double Precision Marlin Rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.d3d.D3DPipeline
GraphicsPipeline.createPipeline failed for com.sun.prism.d3d.D3DPipeline
java.lang.ClassNotFoundException: com.sun.prism.d3d.D3DPipeline
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
*** Fallback to Prism SW pipeline
Prism pipeline name = com.sun.prism.sw.SWPipeline
GraphicsPipeline.createPipeline failed for com.sun.prism.sw.SWPipeline
java.lang.ClassNotFoundException: com.sun.prism.sw.SWPipeline
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
Graphics Device initialization failed for : d3d, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:244)
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:261)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at javafx.embed.swing.JFXPanel.initFx(JFXPanel.java:241)
at javafx.embed.swing.JFXPanel.<init>(JFXPanel.java:257)
at com.rubicon.game.client.window.main.menu.GameMenuPanel.<init>(GameMenuPanel.java:62)
at com.rubicon.game.client.network.states.LobbyConnectionState.enable(LobbyConnectionState.java:12)
at com.rubicon.game.client.ClientApplication.loadComponents(ClientApplication.java:115)
at com.rubicon.game.client.ClientApplication.lambda$initializate$0(ClientApplication.java:98)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073)
at com.rubicon.game.client.network.NetworkConnection.lambda$login$0(NetworkConnection.java:124)
at com.rubicon.game.core.network.packets.PacketResponse.lambda$whenComplete$0(PacketResponse.java:30)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073)
at com.rubicon.game.core.network.packets.PacketResponse.complete(PacketResponse.java:24)
at com.rubicon.game.core.network.packets.request.PacketRequestLogin.onClientReceive(PacketRequestLogin.java:43)
at com.rubicon.game.client.network.callback.PacketCallbackRequester.onReceive(PacketCallbackRequester.java:33)
at com.rubicon.game.client.network.NetworkConnection.execute(NetworkConnection.java:94)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
... 1 more
And in the line 62 im only creating a JFXPanel Object....
JFXPanel Object Creation Image
Maven Dependencies? (Maybe need more? Maybe need another version?)
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-web</artifactId>
<version>15</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-swing</artifactId>
<version>15</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>15</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>15</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
<version>15</version>
</dependency>
Any additional necessary information just ask!
Solved! (MinimizeZar problem in maven)
If someone comes here to get help about this error, add this line to your pom
<classifier>mac</classifier>
depending on your target platform : mac , linux, win
So the block becomes like
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>17</version>
<classifier>mac</classifier>
</dependency>

How to fix Guice error, "An illegal reflective access operation has occurred"

I've a Kotlin project which uses Guice for DI and has recently been updated from JDK 8 -> 11. It now emits the following error at runtime:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/Users/matt/.gradle/caches/modules-2/files-2.1/com.google.inject/guice/4.2.2/6dacbe18e5eaa7f6c9c36db33b42e7985e94ce77/guice-4.2.2.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
How should this warning be addressed?
The issue is due to how Guice internally accesses Java objects, which is unsafe under the new (Java 9+) Java Module System.
Also, starting with Java 16, this warning becomes an error, and the execution flag --illegal-access=permit must be specified manually to reproduce the behaviour of Java 9-15.
There is not much you can do to fix it; the best option is to upgrade to Guice 5.0.1, which has been patched to avoid illegal accesses. Your warning will disappear, and your application will work on Java 16+ with the default JVM behaviour.
As mentioned, it's better you just upgrade to Guice 5 where this is updated.
BUT ... just in case you are stuck with Guice 4 until you can make the upgrade, just start java with these extra parameters:
java --illegal-access=permit --add-opens java.base/java.lang=ALL-UNNAMED ...
and you are good to go !!

Apache Ignite IllegalAccessException from GridUnsafe when using Ignite object

This is all I have in my code. It's just the typical way of using Ignite:
Ignite ignite = Ignition.ignite();
The error message I saw is:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.ignite.internal.util.GridUnsafe$2 (file:/C:/Users/.../.m2/repository/org/apache/ignite/ignite-core/2.7.0/ignite-core-2.7.0.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of org.apache.ignite.internal.util.GridUnsafe$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.ignite.internal.util.IgniteUtils.<clinit>(IgniteUtils.java:795)
at org.apache.ignite.internal.IgnitionEx.<clinit>(IgnitionEx.java:209)
at org.apache.ignite.Ignition.ignite(Ignition.java:489)
at distributedjobexecutor.App.<init>(App.java:19)
at distributedjobexecutor.App.main(App.java:39)
Caused by: java.lang.RuntimeException: jdk.internal.misc.JavaNioAccess class is unavailable.
at org.apache.ignite.internal.util.GridUnsafe.javaNioAccessObject(GridUnsafe.java:1453)
at org.apache.ignite.internal.util.GridUnsafe.<clinit>(GridUnsafe.java:112)
... 5 more
Caused by: java.lang.IllegalAccessException: class org.apache.ignite.internal.util.GridUnsafe cannot access class jdk.internal.misc.SharedSecrets (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module #2ac273d3
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:360)
at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:589)
at java.base/java.lang.reflect.Method.invoke(Method.java:556)
at org.apache.ignite.internal.util.GridUnsafe.javaNioAccessObject(GridUnsafe.java:1450)
... 6 more
Why am I getting this message, and how can I fix this? I am using Java jdk-10.0.1.
This problem comes from the module access control system, introduced in Java 9.
To workaround it, use the following JVM parameters:
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED
Add the following arguments to the VM of module
Refer this Running-apache-ignite-on-openjdk-15,-16-and-17
--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
--add-opens=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED
--add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED
--add-opens=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/java.nio=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.lang=ALL-UNNAMED
This answer is intended as an addendum to Denis' excellent answer.
In short, when you see this warning for any Java software (not just Apache Ignite):
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.ignite.internal.util.GridUnsafe$2 (file:/C:/Users/.../.m2/repository/org/apache/ignite/ignite-core/2.7.0/ignite-core-2.7.0.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of org.apache.ignite.internal.util.GridUnsafe$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Add JVM arg: --illegal-access=warn
Restart the JVM and watch for illegal access warnings.
For each specific warning about a class, e.g., java.nio.Buffer, find the Java module, e.g., java.base, then add a JVM arg for the module & package: --add-opens=java.base/java.nio=ALL-UNNAMED
Rinse and repeat and until all warnings are removed.
Optionally, remove JVM arg --illegal-access=warn
For Java libraries that make extensive use of "unsafe" Java code (off-heap tricks), you might need to add more than 10 of these JVM args!

Deploy throw error on openshift wildfly application

I attempting to host and deploy a application on Wildfly 9 in OpenShift enviroment, but i'm stuck, in my machine, works fine, but in OpenShift,
with Wildlfy version 9 too, the error below is thrown, i tried to comment de jacksons and resteasy dependencies, for check if is some
problem with it, but the error still happend, any know what means this error?
the error:
2015-10-01 12:48:29,601 WARN [org.jboss.as.weld] (ServerService Thread Pool -- 72) WFLYWELD0052: Using deployment classloader to load proxy classes for module org.jbos
s.resteasy.resteasy-jackson2-provider:main. Package-private access will not work. To fix this the module should declare dependencies on [org.jboss.weld.core, org.jboss.
weld.spi]
2015-10-01 12:48:29,797 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 72) MSC000001: Failed to start service jboss.undertow.deployment.default-server
.default-host./sellAppWeb: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./sellAppWeb: com.google.common.util.con
current.ExecutionError: java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.jboss.resteasy.plugins.providers.jackson.ResteasyJack
son2Provider$Proxy$_$$_WeldClientProxy.setDefaultReadView(Ljava/lang/Class;)Lcom/fasterxml/jackson/jaxrs/base/ProviderBase;" the class loader (instance of org/jboss/mod
ules/ModuleClassLoader) of the current class, org/jboss/resteasy/plugins/providers/jackson/ResteasyJackson2Provider$Proxy$_$$_WeldClientProxy, and its superclass loader
(instance of org/jboss/modules/ModuleClassLoader), have different Class objects for the type vider$Proxy$_$$_WeldClientProxy used in the signature
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: com.google.common.util.concurrent.ExecutionError: java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.jboss.resteasy.p
lugins.providers.jackson.ResteasyJackson2Provider$Proxy$_$$_WeldClientProxy.setDefaultReadView(Ljava/lang/Class;)Lcom/fasterxml/jackson/jaxrs/base/ProviderBase;" the cl
ass loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, org/jboss/resteasy/plugins/providers/jackson/ResteasyJackson2Provider$Proxy$_$$_WeldC
lientProxy, and its superclass loader (instance of org/jboss/modules/ModuleClassLoader), have different Class objects for the type vider$Proxy$_$$_WeldClientProxy used
in the signature
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCacheValue(LoadingCacheUtils.java:49)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCastCacheValue(LoadingCacheUtils.java:74)
at org.jboss.weld.bean.proxy.ClientProxyProvider.getClientProxy(ClientProxyProvider.java:222)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:755)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:784)
at org.jboss.weld.util.ForwardingBeanManager.getReference(ForwardingBeanManager.java:61)
at org.jboss.weld.bean.builtin.BeanManagerProxy.getReference(BeanManagerProxy.java:85)
at org.jboss.resteasy.cdi.CdiConstructorInjector.construct(CdiConstructorInjector.java:64)
at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2211)
at org.jboss.resteasy.spi.ResteasyProviderFactory.addMessageBodyReader(ResteasyProviderFactory.java:784)
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1402)
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1346)
at org.jboss.resteasy.plugins.providers.RegisterBuiltin.registerProviders(RegisterBuiltin.java:70)
at org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuiltin.java:31)
at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:221)
at org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap.contextInitialized(ResteasyBootstrap.java:28)
at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:195)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
... 6 more
the dependencies with i tried to comment, without success:
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson2-provider</artifactId>
<version>3.0.5.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.0.10.Final</version>
<scope>provided</scope>
</dependency>
this question is about wildfly 8:
Wildfly and Jackson: LinkageError
Using wildfly 9 only update resteasy.* to 3.0.12.Final worked form me.

Axis2 generated Client to web service call - Unable to access unsupported property javax.xml.stream.supportDTD

I am getting the following exception when I access the web service from my Axis2 generated stub client.
Can anyone put some light one it?
Thanks.
Caused by: org.apache.axis2.AxisFault: Unable to access unsupported property javax.xml.stream.supportDTD
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:123)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:354)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at amdocs.cl.utils.CollectionsServiceStub.GetEquipmentInfo(CollectionsServiceStub.java:267)
at amdocs.cl.utils.DDPCollectionConnectorUtils.getEquipmentInfo(DDPCollectionConnectorUtils.java:162)
... 7 more
Caused by: java.lang.IllegalArgumentException: Unable to access unsupported property javax.xml.stream.supportDTD
at weblogic.xml.stax.ConfigurationContextBase.check(ConfigurationContextBase.java:60)
at weblogic.xml.stax.ConfigurationContextBase.setProperty(ConfigurationContextBase.java:54)
at weblogic.xml.stax.XMLStreamInputFactory.setProperty(XMLStreamInputFactory.java:280)
at org.apache.axiom.util.stax.dialect.StAXDialectUtils.disallowDoctypeDecl(StAXDialectUtils.java:40)
at org.apache.axiom.util.stax.dialect.UnknownStAXDialect.disallowDoctypeDecl(UnknownStAXDialect.java:39)
at org.apache.axiom.om.util.StAXParserConfiguration$4.configure(StAXParserConfiguration.java:116)
at org.apache.axiom.om.util.StAXUtils$7.run(StAXUtils.java:520)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axiom.om.util.StAXUtils.newXMLInputFactory(StAXUtils.java:495)
at org.apache.axiom.om.util.StAXUtils.getXMLInputFactory_perClassLoader(StAXUtils.java:566)
at org.apache.axiom.om.util.StAXUtils.getXMLInputFactory(StAXUtils.java:172)
at org.apache.axiom.om.util.StAXUtils.getXMLInputFactory(StAXUtils.java:137)
at org.apache.axiom.om.util.StAXUtils.createXMLStreamReader(StAXUtils.java:196)
at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:64)
at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:197)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:145)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:108)
I too had the same issue and finally found that the problem is with incorrect context config.
Axis2 configuration context is being created with weblogic.jar file instead of axis2 jar, so change the build class path order. First point all the axis2 jars and atlast point the weblogic.jar in class path.
I resolved this by adding jax-rt jar in my classPath.
Or Add below dependency in your pom
<depepdency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.2.10</version>
</dependency>