I have just updated java on my archlinux server and now it mess up my tomcat projects.
I want to downgrade java from 11.0.17.u1 to 11.0.13.u8
I looked at my var/cache/pacman/pkg folder and it seems like my old package are still there
jre11-openjdk-11.0.13.u8-1-x86_64.pkg.tar.zst
jre11-openjdk-headless-11.0.13.u8-1-x86_64.pkg.tar.zst
I am trying to run this command to force the installation of this java version :
sudo pacman -U jre11-openjdk-11.0.13.u8-1-x86_64.pkg.tar.zst
But it does not let me and I get this message :
loading packages...
warning: downgrading package jre11-openjdk (11.0.17.u1-1 => 11.0.13.u8-1)
resolving dependencies...
warning: cannot resolve "jre11-openjdk-headless=11.0.13.u8-1", a dependency of "jre11-openjdk"
:: The following package cannot be upgraded due to unresolvable dependencies:
jre11-openjdk
What can I do to force the downgrade?
Further infos:
This is the error I am getting since I updated the JVM
09-Jan-2023 15:46:44.910 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches Failed to clear soft references from ObjectStreamClass$Caches for web application [docs]
java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap')
The tomcat servers I have not restarted yet (which are still running under the old jvm are doing just fine.
I found this topic here :
ClassCastException when stopping Tomcat 10 inside Eclipse
The solution that is brought is to upgrade the tomcat version. I am in an emergency situation where I don't have the time to update all my tomcat servers right now.
Related
I'm using log4j 2.11.1 in my project and created some custom appenders and configuration factories using the #Plugin annotation.
This compiles just fine without errors both in Eclipse 4.9 and with IntelliJ. However, running the Eclipse batch compiler the same code fails with a IllegalArgumentException:
Processing annotations
java.lang.IllegalArgumentException: Unknown location : CLASS_OUTPUT
at org.eclipse.jdt.internal.compiler.apt.util.EclipseFileManager.getFileForOutput(EclipseFileManager.java:436)
at org.eclipse.jdt.internal.compiler.apt.dispatch.BatchFilerImpl.createResource(BatchFilerImpl.java:89)
at org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor.writeCacheFile(PluginProcessor.java:117)
at org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor.process(PluginProcessor.java:78)
at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:142)
at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:124)
at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:162)
at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:940)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:450)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:426)
at org.eclipse.jdt.internal.compiler.batch.Main.performCompilation(Main.java:4693)
at org.eclipse.jdt.internal.compiler.batch.Main.compile(Main.java:1781)
at org.eclipse.jdt.internal.compiler.batch.Main.main(Main.java:1485)
Processing annotations
No elements to process
1. ERROR: Unknown location : CLASS_OUTPUT
1 problem (1 error)
In this repo I made a minimal project to reproduce this issue. I tried using versions 4.7 and 4.9 of ECJ and tried with Java 8 OpenJDK and Oracle, all of it in a Ubuntu 18.04 machine.
Any clue of what could be happening here?
Edit:
Tried using Java10 on a OSX machine and the same error appears.
I am getting the below error while trying to publish the application EAR in the server.
Deployment from com.ibm.etools.ejbdeploy.EJBDeployer had errors:
RMIC Command returns RC = MyApplicationEJB. The problems which stopped RMIC are displayed, and have also been recorded in the .log file in error: An error has occurred in the compiler; please file a bug report (http://java.sun.com/cgi-bin/bugreport.cgi).
java.lang.ClassFormatError: JVMCFRE074 no Code attribute specified; class=javax/ejb/RemoveException, method=<init>()V, pc=0
at java.lang.ClassLoader.defineClass(ClassLoader.java:275)
at java.lang.ClassLoader.defineClass(ClassLoader.java:212)
at com.ibm.tools.rmic.iiop.DirectoryLoader.loadClass(DirectoryLoader.java:149)
at com.ibm.tools.rmic.iiop.CompoundType.loadClass(CompoundType.java:354)
at com.ibm.tools.rmic.iiop.Type.initClass(Type.java:1008)
at com.ibm.tools.rmic.iiop.Type.setRepositoryID(Type.java:1025)
at com.ibm.tools.rmic.iiop.CompoundType.initialize(CompoundType.java:762)
at com.ibm.tools.rmic.iiop.ValueType.initialize(ValueType.java:323)
at com.ibm.tools.rmic.iiop.ValueType.forValue(ValueType.java:131)
at com.ibm.tools.rmic.iiop.CompoundType.getMethodExceptions(CompoundType.java:1678)
at com.ibm.tools.rmic.iiop.CompoundType$Method.<init>(CompoundType.java:2457)
at com.ibm.tools.rmic.iiop.CompoundType.addAllMethods(CompoundType.java:1308)
at com.ibm.tools.rmic.iiop.RemoteType.isConformingRemoteInterface(RemoteType.java:222)
at com.ibm.tools.rmic.iiop.RemoteType.initialize(RemoteType.java:171)
at com.ibm.tools.rmic.iiop.RemoteType.forRemote(RemoteType.java:90)
at com.ibm.tools.rmic.iiop.CompoundType.makeType(CompoundType.java:852)
at com.ibm.tools.rmic.iiop.CompoundType$Method.<init>(CompoundType.java:2408)
at com.ibm.tools.rmic.iiop.CompoundType.addAllMethods(CompoundType.java:1308)
at com.ibm.tools.rmic.iiop.RemoteType.isConformingRemoteInterface(RemoteType.java:222)
at com.ibm.tools.rmic.iiop.RemoteType.initialize(RemoteType.java:171)
at com.ibm.tools.rmic.iiop.RemoteType.forRemote(RemoteType.java:90)
at com.ibm.tools.rmic.iiop.CompoundType.addRemoteInterfaces(CompoundType.java:1455)
at com.ibm.tools.rmic.iiop.ImplementationType.initialize(ImplementationType.java:166)
at com.ibm.tools.rmic.iiop.ImplementationType.forImplementation(ImplementationType.java:92)
at com.ibm.tools.rmic.iiop.CompoundType.makeType(CompoundType.java:892)
at com.ibm.tools.rmic.iiop.ClassType.initParents(ClassType.java:197)
at com.ibm.tools.rmic.iiop.ImplementationType.initialize(ImplementationType.java:156)
at com.ibm.tools.rmic.iiop.ImplementationType.forImplementation(ImplementationType.java:92)
at com.ibm.tools.rmic.iiop.StubGenerator.getTopType(StubGenerator.java:151)
at com.ibm.tools.rmic.iiop.Generator.generate(Generator.java:285)
at sun.rmi.rmic.Main.doCompile(Main.java:547)
at sun.rmi.rmic.Main.compile(Main.java:148)
at sun.rmi.rmic.Main.main(Main.java:786)
1 error
Can anybody please help me out in this.
I am using - Websphere 9.1 and jdk 1.6. Interesting thing is my colleagues who have a lower version of Websphere - 8.0, do not get this error.
UPDATE: My Websphere's Runtime Environment is - WebSphere Application Server v7.0
In general a ClassFormatError means that the class with the error was compiled at a java level that is greater than the java level being used at runtime.
In the case of WebSphere v9.0 (which only support Java 8+), the javax/ejb/RemoveException class is compiled at the Java 7 level, so running WAS on Java 6 with a class compiled at the Java 7 or higher level will result in a ClassFormatError.
Update:
You have mentioned in the comments that you are using WAS v7.0 and not WAS v9. The overall explanation is the same regardless of what version of WAS you are using, namely, you can't run on a lower java level than what the classes were compiled with.
I recommend checking what java version the javax/ejb/RemoveException class in your WAS install was compiled at, and compare it to the java level you are running on.
When I run my project, I don't have errors.
But After login, when I try to enter in a form page the application give me the follow error:
GRAVE: Servlet.service() for servlet jsp threw exception
java.util.NoSuchElementException
at java.util.ArrayList$Itr.next(Unknown Source)
at org.apache.jasper.compiler.Validator$ValidateVisitor.getJspAttribute(Validator.java:1381)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:772)
at org.apache.jasper.compiler.Node$UninterpretedTag.accept(Node.java:1251)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2375)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:779)
at org.apache.jasper.compiler.Node$UninterpretedTag.accept(Node.java:1251)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2375)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:895)
...
I think the problem is in the configuration of tomcat but I don't understand where.
I have tomcat7.0.52, use java version 1.7.0_60, idem for jdk.
At my colleague work all without problems, we have the same tomcat version, the only difference is that I have STS 3.6 RELEASE, and He have the 3.5.
EDIT:
I try to delete server, and recreate it, but the problem don't change.
I think that the problem is on wrong configuration server because any project I run give me the same error.
This is my catalina arguments:
-Dcatalina.base="/home/paola/Documenti/sts-bundle/vfabric-tc-server-developer-2.9.6.RELEASE/base-instance"
-Dcatalina.home="/home/paola/Documenti/sts-bundle/vfabric-tc-server-developer-2.9.6.RELEASE/tomcat-7.0.53.B.RELEASE"
-Dwtp.deploy="/home/paola/Documenti/sts-bundle/vfabric-tc-server-developer-2.9.6.RELEASE/base-instance/wtpwebapps"
-Djava.endorsed.dirs="/home/paola/Documenti/sts-bundle/vfabric-tc-server-developer-2.9.6.RELEASE/tomcat-7.0.53.B.RELEASE/endorsed" -Xmx768m -Xss256k -XX:MaxPermSize=256m
-Dinsight.enabled=false -Dspring.profiles.active=dev
Any ideas?
Thank
It looks like the problem is with the version of Tomcat that tcServer is derived from.
This bug which is fixed in Tomcat 7.0.55 is looks like the cause.
I've done some testing and found that the bug is not present in Tomcat 7.0.50, which is used by tcServer Dev Edition 2.9.5.SR1.
So it's either 7.0.51 or 7.0.52 (as you discovered) which introduced the bug.
I have a web application that is deployed on WebSphere and that use one java library to generate files in excel format but I am getting the following error in WebSphere, but it will work fine with the TOMCAT server.
What can the problem be?
ERROR IS :-
Error 500: java.lang.LinkageError: LinkageError while defining class:
jxl.format.CellFormat Could not be defined due to: (jxl/format/CellFormat) bad major version at offset=6 This is often caused by having a class defined at multiple locations within the classloader hierarchy. Other potential causes include compiling against an older or newer version of the class that has an incompatible method signature. Dumping the current context classloader hierarchy: ==> indicates defining classloader ==>[0] com.ibm.ws.classloader.CompoundClassLoader#50c450c4 Local ClassPath: C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\classes;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\activation-1.1.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\axis.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\cglib-nodep-2.2.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\commons-discovery-0.2.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\commons-logging.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\commons-net-2.0.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\commons-net-ftp-2.0.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\dom4j-1.6.1.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\iText-5.0.6.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\jaxrpc.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\jdom-1.1.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\jettison-1.0.1.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\joda-time-1.6.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\json-rpc-1.0.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\jxl.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\mail-1.4.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\ojdbc14.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\quartz-all-1.5.2.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\saaj.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\scheduler-plugin-example.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\scheduler-plugin.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\servlet-api.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\sqljdbc.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\stax-1.2.0.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\stax-api-1.0.1.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\wsdl4j.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\wstx-asl-3.2.7.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\xml-writer-0.2.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\xom-1.1.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\xpp3_min-1.1.4c.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\xstream-1.3.1.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\xstream-benchmark-1.3.1.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war Delegation Mode: PARENT_FIRST [1] com.ibm.ws.classloader.JarClassLoader#738995212 Local Classpath: Delegation mode: PARENT_FIRST [2] com.ibm.ws.classloader.ProtectionClassLoader#60e060e0 [3] com.ibm.ws.bootstrap.ExtClassLoader#70567056 [4] org.eclipse.osgi.framework.adaptor.core.CDSBundleClassLoader#4e024e02 [5] sun.misc.Launcher$AppClassLoader#6b806b80 [6] sun.misc.Launcher$ExtClassLoader#3fe03fe ---Original exception--- java.lang.UnsupportedClassVersionError: (jxl/format/CellFormat) bad major version at offset=6 at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:222) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:526) at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:477) at .............
This is the problem:
Could not be defined due to: (jxl/format/CellFormat) bad major version at offset=6
You're using a JExcel library compiled for a version of Java that your application server does not support. You'll either need to recompile the library or move to a newer version of WebSphere Application Server.
(The product printed the same "defined at multiple locations" error with class loader dump for all LinkageError, regardless of whether that text is actually relevant, until around 6.1.0.21.)
Looks like you've got Andy Khan's JExcel library in the CLASSPATH twice. See if WebSphere ships with it. If it does, remove yours from the application WEB-INF/lib and see if that helps.
I have a web application running on tomcat. I want to deploy it on a weblogic server but i get some problems.
Error(s) found in module 'BatchMonitoring'. Publish was cancelled. See "Problems" view for details.
Target runtime SpringSource dm Server (Runtime) v1.0 is not defined. at BatchMonitoring
Java compiler level does not match the version of the installed Java project facet. at BatchMonitoring
java.lang.IllegalArgumentException: Cannot find state with id 'displayError' in flow 'admin_main' -- Known state ids are 'array<String>['queryAll', 'mainForm', 'register']'
at org.springframework.webflow.engine.Flow.getStateInstance(Flow.java:348)
at org.springframework.webflow.engine.support.DefaultTargetStateResolver.resolveTargetState(DefaultTargetStateResolver.java:60)
at org.springframework.webflow.engine.Transition.execute(Transition.java:217)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:391)
at org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)
at org.springframework.webflow.engine.support.TransitionExecutingFlowExecutionExceptionHandler.handle(TransitionExecutingFlowExecutionExceptionHandler.java:110)
at org.springframework.webflow.engine.FlowExecutionExceptionHandlerSet.handleException
Seems like you had problems with Java versions of what Tomcat is using(points to JAVA_HOME) at environmental variable and JDK of Weblogic. Also it would be good if you send some logs and exception messages.