I am getting NoSuchMethodError: com.oracle.bmc.ClientConfiguration.getRetryConfiguration with weblogic server - weblogic12c

I am using
implementation (group: 'com.oracle.oci.sdk', name: 'oci-java-sdk-dataflow', version: '1.12.5') to use create an application in OCI dataflow. But it's not working and getting below error:
"Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: com.oracle.bmc.ClientConfiguration.getRetryConfiguration()Lcom/oracle/bmc/retrier/RetryConfiguration;",
"com.oracle.bmc.ClientConfiguration.getRetryConfiguration()Lcom/oracle/bmc/retrier/RetryConfiguration;",
"[org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1053), org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942), org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005), org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908),
I can see 3 jars related to OCI in \WEB-INF\lib path

run mvn dependency:tree -Dverbose and see what version you have
Make sure the versions are all consistent. In this case, I suspect that oci-java-sdk-dataflow is using an older version of oci-java-sdk-common than it expects.
If older version of oci-java-sdk-common is getting added in the class path from a dependent module exclude it to get this issue resolved.
duplicate jar would be my next guess

Related

Error occurred during initialization of boot layer java.lang.module.FindException executing Selenium tests using TestNG and Java 12 through Eclipse

ErrorOccuredDuringInitializationofbootlayer I keep getting this error when I run
my test:
Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for
C:\Users\Bonfire.eclipse\org.eclipse.platform_4.12.0_867647348_win32_win32_x86_64\plugins\com.beust.jcommander_1.72.0.jar
Caused by: java.lang.IllegalArgumentException:
com.beust.jcommander.1.72.0: Invalid module name: '1' is not a Java
identifier
How can I fix it?
Add TestNG Library to classpath in buildpath ( not to module path). It will work fine.
To avoid this error, do not add TestNG library in the project or src folder. Try adding it into the package. To do so , follow the below mentioned procedure.
Right click on the package, click Build Path->Configure Build Path, go to Libraries tab, select Classpath and click on Add Library to select TestNG.
This error message...
Error occurred during initialization of boot layer java.lang.module.FindException:
Unable to derive module descriptor for C:\Users\Bonfire.eclipse\org.eclipse.platform_4.12.0_867647348_win32_win32_x86_64\plugins\com.beust.jcommander_1.72.0.jar
Caused by: java.lang.IllegalArgumentException: com.beust.jcommander.1.72.0: Invalid module name: '1' is not a Java identifier
...implies that there was an issue with the java classpath.
As per the discussion Launch with java 11 fails: Error: Could not find or load main class with Caused by: java.lang.ClassNotFoundException: with there are some issues with some particular classpaths for java-11 and the launch fails if:
The classpath contains a folder with spaces
The classpath length is larger than 32767 characters.
Where as java-8 works fine.
Reference
Unable to import org.openqa.selenium.WebDriver using Selenium and Java 11
Outro
Eclipse plugin: TestNG testcase does not run with Jdk11
Need to add 1.8 version library
Remove TestNG from build path library and add again
Recheck - the issue should be resolved.
I got same issue and I solved it. When creating the project, don't create module-info.java. When the project was already created with the module-info.java, deleting this file didn't help me.
I just created new project without module-info.java, and all works good now.
Best option to resolve this:
Find all file and folder starting with . e.g. — .metadata / .setting and delete them.
Add all the JARS.
Add testNG Libraries.
Execute it.
Done.

Failed to execute goal org.apache.uima:ruta-maven-plugin:2.6.1 generate

Can no longer build my application due to an issue with a dependent class of ruta-maven-plugin:2.6.1. I've tried to use multiple version of ASM including 5.0.2 and 6.2. These version are dependencies of Apache Tika 1.17/18/19.
Here is the full build failure message:
Failed to execute goal org.apache.uima:ruta-maven-plugin:2.6.1:generate (default) on project DAnE-Pipeline: Execution default of goal org.apache.uima:ruta-maven-plugin:2.6.1:generate failed: Failed to read candidate component class: URL [jar:file:/home/fm/.m2/repository/org/apache/uima/ruta-core/2.6.1/ruta-core-2.6.1.jar!/org/apache/uima/ruta/resource/TrieXMLEventHandler.class]; nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: class path resource [org/xml/sax/helpers/DefaultHandler.class]; nested exception is java.lang.IllegalArgumentException -> [Help 1]
I feel like I've tried everything. Any help will be appreciated!
I re-read Peter's suggestion above. I was adding a newer Spring dependency in my project, but not in the "scope of the plugin". Once I created the Spring dependencies there, it worked! Thanks, Peter.

The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory is not working from eclipse

I am trying to deploy a gradle web project using tomcat in eclipse and when I am trying to access the application it throws me an exception as follows:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [36] in the generated java file: [......plugins\org.eclipse.wst.server.core\tmp0\work\Catalina...\org\apache\jsp\error_jsp.java]
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
The same application I am able to deploy manually in the tomcat server with out using eclipse then it is working perfectly.
Please provide me a solution.
While deploying the application into server using eclipse it is adding some dependencies which are conflicted to dependencies added using gradle, after removing the conflicted jars the solved the issue.
the generated war only have the jars which are configured in the gradle so that is working when we deploy it manually on the server.

Error in Eclipse about type indirectly referenced from required .class file

I'm having this exception with some stubs generateds by Axis2:
"The type org.apache.axiom.om.OMElement cannot be resolved. It is
indirectly referenced from required .class files"
I've been reading many posts, and trying to find a solution. What I've found so far is to add the apache tomcat 5.5 library to the build path. It removed the error in the java file, but then, when I to execute any java program inside the project, I got this error:
'Launching myApp' has encountered a problem Exception occurred
executing command line. Cannot run program "C:\Program
Files\Java\jdk1.5.0_22\bin\javaw.exe" (in directory
"D:\Digicel\workspace\Digicel\myClassSample"): CreateProcess error=87,
The parameter is incorrect
then if I remove the apache tomcat library from the build path, I can run the other java programs, but not the one mentioned initially.
Any thoughts about it?
Okay, I've found the cause of the problem with the help of a friend :)
The thing is that Eclipse is aware that one of my dependencies, depends of another library, and Eclipse is checking for it when it tries to build the code.
So, what I've done is try to check which jar file contains this library: " org.apache.axiom.om.OMElement".
I've googled it and found that it is "axiom-api-1.2.10.jar" and finally my file compiled with 0 errors.
He also explained to me that my original solution of adding the apache tomcat server library is adding all the jars that cames with apache tomcat (which is a big list), and probably there may have been a version conflict with my current list of added jars.
So, the fix was to find the appropriate jar and add it to the project.
This error can also occur when a indirect dependency has a corrupt jar file. This may be caused by problems at the public maven repository.
If this is the case removing the local maven repository to download fresh jar files will fix your problem:
rm -Rf ~/.m2/repository/{enter/path/to/broken/stuff}
Goto Maven >Update Maven project>checkmark the Force update >Then Run
..That error Will gone....

java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()

I am getting this error java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()
at the runtime in eclipse. However, eclipse shows the method on doing intelligence search, but at runtime it fails to identify it.
I am using the latest log4j1.2.16 jar and it is added in the classpath.
Any suggestions?