Recently we have upgraded axis2 library in our project. We have upgraded it to 1.7.9 from 1.6.2
and since then we are facing below issue.
java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl
at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:122)
at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:91)
at javax.ws.rs.core.UriBuilder.newInstance(UriBuilder.java:69)
at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:80)
at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:99)
at org.glassfish.jersey.client.JerseyWebTarget.<init>(JerseyWebTarget.java:71)
at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:290)
at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:76)
at com.xyz.MyClass.method1(MyClass.java:55)
As you can see our MyClass.method1() method call JerseyClient.target() which is in jersey-client library (Version 2.23.1) which internally
calls methods of javax.ws.rs-api library ((Version 2.0.1).
RuntimeDelegate class of that library is trying to load RuntimeDelegateImpl at runtime
which is jersey-bundle. But I dont know how its related to Axis2 library. Could you please help me out finding the root cause of this issue ?
I have found similar issue in SO but actual root cause is not mentioned there.
Link : Error when updating Axis2 web services from version 1.5.6 to 1.6.3
Thanks
For maven project, addding below dependency fixed issue for me in the pom.xml file under dependencies.
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.12</version>
</dependency>
After updating to Java 11 we get the following message:
[4/3/20, 11:47:09:184 CEST] 0000002d com.ibm.ws.classloading.internal.util.FeatureSuggestion I CWWKL0084W: The javax.transaction.TransactionManager class could not be loaded. Try enabling the jdbc-4.0 feature or a newer version of the feature in the server.xml file.
We are already using jdbc-4.3 (had the same message on 4.2 as well). The application itself does not give any errors that I can see. The application is made with maven that has the compile plugin configured with 11.
There are no problems when compiling and running tests for the application on java 11, and this only appears when deployed to liberty. Should we explicitly include a dependency for this in the war, or is this an issue that should be fixed in liberty?
From later releases on, Java EE is not included any more. The transaction classes are in the javax.transaction package.
Adding the following dependency should solve it:
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
(Not sure if it helps with your deployment, but it works with Spring Boot 2)
I have built application on Spring Framework, build it with maven, package it as an EAR and deploy it to Weblogic 11g, and everything works fine.
However, when I try to deploy the same package to Weblogic 12c, I get the following exception.
java.lang.ClassNotFoundException: org.springframework.security.oauth2.client.token.AccessTokenRequest
Why does the Weblogic version upgrade introduces the dependency to this class? The dependency isn't even packaged in the EAR.
I think it has something to do with this dependency, which is used for token based authentication
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>2.2.0</version>
</dependency>
What is the problem, and what is generally the best workflow to diagnose these sort of problems systematically?
Getting java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured, while using gRPC(google pub/sub) to publish/consumes messages from Kafka.
Try adding a runtime dependency on netty-tcnative-boringssl-static. See gRPC's SECURITY.md. Note that the version of netty-tcnative necessary changes over time; you should look at the version of the document for a particular release (e.g., this is for 1.2.0).
Finally, went back to boot class class path approach. Prefixed the jetty-alpn.jar to boot class path and it starts working fine in cloud foundry now.
Adding the ALPN client JAR which matches my JDK version fixed this issue for me. In eclipse, you need to set up the jar as a bootstrap entry for the tomcat server.
You can find more info about it here : https://medium.com/#Parithi/jetty-alpn-npn-has-not-been-properly-configured-solution-418417ee6502
As suggested by google, use jetty container instead of tomcat, this solution works, but in our production, applications deployed on tomcat container, but of course I need it to work on tomcat in production.
On debugging the gRPC code, found that guava version causing the issue, updated the guava version 18.0, (where in some classes missed in previous versions), solved the problem , but failed while deploying in CF
Customized emebed-tomcat-core, and it works fine consistently, but again, team say no to custom tomcat container.
Java –jar apm-asset-xxxx.jar – works fine locally, but need to provide a custom command to CF start, didn’t have luxury to change the CF start process.
Finally, trick, the class loader to use tcnative-boring-ssl, library instead of tomcat-core library at runtime, by providing the following dependency in pom.xml. For the past 3 days, this solution is working CF.
org.springframework.boot
spring-boot-starter-web
org.hibernate
*
org.apache.tomcat.embed
tomcat-embed-core
org.apache.tomcat.embed
tomcat-embed-core
provided
Maven manifest plugin to promote the tc-native library to the top in the classloader.
In POM, try to place the gRPC dependency before the spring boot dependency (the order of dependencies matters). I did that and the issue was solved. For example:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-language</artifactId>
<version>0.13.0-beta</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
I was using Jython standalone version 2.5.3 in my REST application. It was working fine. When I upgraded to Jython 2.7.0, I am getting the following exception,
javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: javax.xml.transform.TransformerFactoryConfigurationError: Provider org.python.apache.xalan.processor.TransformerFactoryImpl not found
Java xml classes were packaged and distributed with version 2.7.0. But if I understand it correctly Java SE comes with these classes. This issue is raised as a bug here. In order to avoid this exception add the xalan processor dependency in your pom.xml
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.1</version>
</dependency>
Another solution would be to upgrade to the latest version of the jython-standalone jar. This issue is fixed in the latest release 2.7.1