would like some guidance decrypting tomcat errors - java

I have these errors for tomcat 7. I am uploading to a server with JDK 1.6 and running Tomcat 7.02X
I keep getting these errors whatever i Do. what does this mean?
error1
INFO: Deploying web application archive user2.war
Jun 8, 2012 2:51:30 AM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[yuppie.com].StandardContext[/user2]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:932)
Also it goes to this error
Caused by: java.lang.UnsupportedClassVersionError: com/yuppie/Populator : Unsupported major.minor version 51.0 (unable to load class com.yuppie.Populator)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2824)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1150)
I apologize for listing out errors. I know its quite hated in this community, but I have no clue on these errors thats why. Thank you
One last error
SEVERE: Error deploying web application archive user2.war
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[credify.me].StandardContext[/user2]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:816)

Caused by: java.lang.UnsupportedClassVersionError: com/yuppie/Populator :
Unsupported major.minor version 51.0 (unable to load class com.yuppie.Populator) at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2824)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1150)
Reason for this is because your java file is compiled with a later version of the JDK (eg.Java 7) while your JRE is an earlier version (eg. Java 6).
Mayb you can fix this problem first to see if you have new errors.
If you are using external libraries, then it is likely that the external library was compiled with a more recent version of the Java Compiler, as compared to the JRE you are using. I would recommend you upgrade your JRE to the latest version.

LifecycleException indicates most probably you have a life cycle problem.
UnsupportedClassVersionError is thrown when the class file's version numbers are not supported.
IllegalStateException is as the name says, the state of the Java Application isn't legal or appropriate to handle the current request.
Porbable Fixes:
UnsupportedClassVersionError : https://stackoverflow.com/a/2467356/828625
LifecycleException : https://stackoverflow.com/a/8512930/828625
IllegalStateException : https://issues.apache.org/bugzilla/show_bug.cgi?id=50737

Related

Exception when deploying on glassfish: ArrayIndexOutOfBoundsException: 9578

when I deploy my war file on tomcat it is ok but when I deploy it on glassfish it gives the exception, I searched but found no result how to solve this.
java.lang.ArrayIndexOutOfBoundsException: 9578
at org.objectweb.asm.ClassReader.readClass(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:363)
at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:171)
at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:133)
at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:348)
at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:70)
at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:307)
at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:296)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
...............
[#|2018-10-07T15:19:22.345+0330|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=84;_ThreadName=Thread-2;|Exception while loading the app|#]
[#|2018-10-07T15:19:25.182+0330|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=84;_ThreadName=Thread-2;|Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'TestController' defined in file [E:\glassfish3-Reservation\glassfish3\glassfish\domains\domain1\applications\myproject\WEB-INF\classes\com\company\controller\TestController.class]: Instantiation of bean failed; nested exception is java.lang.ExceptionInInitializerError
Your best option is to update your Glassfish server if you can. Your version 3.1.2 is way too old, the current one is 5.0.
Another option would be to look for Lambda expressions in the TestController class and to remove or replace them with standard code.
This exception seems to occur when you are using Lambda expressions or newer Java bytecode with a version of asm.jar which is too old. This is related to your old version of Glassfish which comes bundled with Jersey 1.x which has bundled asm.jar 3.1. This version seems to be not fully compatible with Java8 or newer bytecode.
More related information:
Strange java.lang.ArrayIndexOutOfBoundsException thrown on jetty startup
Java 8 Lambda Expression Within REST Service not working
ArrayIndexOutOfBoundsException when using Java 8 language features

Solr indexing issue after upgrading from 4.7 to 7.1

I just upgraded our solr from 4.7 to 7.1.
I copied the older folder name 'old_core' (that contains the folders: 'index', 'snapshot_metadata' and 'tlog') into the data folder.
I also created a new core via the new solr UI.
When starting solr, I get an error message (on the UI):
old_core: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error opening new searcher.
I found that when I copy the subfolder 'index' from the "new_core" into the "old_core" folder it starts without any error messages.
Is it means that indexes from solr version 4.7 can't be transferred into version 7.1?
Is there a way to fix it? Is it safe or may corrupt the indexes?
Error from the log:
Short:
Caused by: org.apache.lucene.index.IndexFormatTooOldException: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/data/solr/sst1_1/index/segments_5"))): 1 (needs to be between 6 and 7). This version of Lucene only supports indexes created with release 6.0 and later.
Full:
>
ERROR - 2017-11-23 10:05:57.182; org.apache.solr.core.CoreContainer; Error waiting for SolrCore to be created
java.util.concurrent.ExecutionException: org.apache.solr.common.SolrException: Unable to create core [sst1_1]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.solr.core.CoreContainer.lambda$load$14(CoreContainer.java:671)
at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:188)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.solr.common.SolrException: Unable to create core [sst1_1]
at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1045)
at org.apache.solr.core.CoreContainer.lambda$load$13(CoreContainer.java:642)
at com.codahale.metrics.InstrumentedExecutorService$InstrumentedCallable.call(InstrumentedExecutorService.java:197)
... 5 more
Caused by: org.apache.solr.common.SolrException: Error opening new searcher
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:989)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:844)
at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1029)
... 7 more
Caused by: org.apache.solr.common.SolrException: Error opening new searcher
at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:2076)
at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:2196)
at org.apache.solr.core.SolrCore.initSearcher(SolrCore.java:1072)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:961)
... 9 more
Caused by: org.apache.lucene.index.IndexFormatTooOldException: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/data/solr/sst1_1/index/segments_5"))): 1 (needs to be between 6 and 7). This version of Lucene only supports indexes created with release 6.0 and later.
at org.apache.lucene.codecs.CodecUtil.checkHeaderNoMagic(CodecUtil.java:213)
at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:305)
at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:289)
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1076)
at org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:119)
at org.apache.solr.update.SolrIndexWriter.create(SolrIndexWriter.java:94)
at org.apache.solr.update.DefaultSolrCoreState.createMainIndexWriter(DefaultSolrCoreState.java:257)
at org.apache.solr.update.DefaultSolrCoreState.getIndexWriter(DefaultSolrCoreState.java:131)
at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:2037)
... 12 more
ERROR - 2017-11-23 10:05:59.235; org.apache.solr.update.SolrIndexWriter; SolrIndexWriter was not closed prior to finalize(), indicates a bug -- POSSIBLE RESOURCE LEAK!!!
ERROR - 2017-11-23 10:05:59.236; org.apache.solr.update.SolrIndexWriter; Error closing IndexWriter
java.lang.NullPointerException
at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3583)
at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3545)
at org.apache.lucene.index.IndexWriter.shutdown(IndexWriter.java:1272)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1317)
at org.apache.solr.update.SolrIndexWriter.close(SolrIndexWriter.java:280)
at org.apache.solr.update.SolrIndexWriter.finalize(SolrIndexWriter.java:336)
at java.lang.System$2.invokeFinalize(System.java:1270)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:98)
at java.lang.ref.Finalizer.access$100(Finalizer.java:34)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:210)
Thanks in advance!
Mike
You can't upgrade through that many versions in a single upgrade. Solr (Lucene) only supports the index format from the previous version, so you might have to do each version by itself.
There's a tool bundled with Solr to help you do this - the IndexUpgrader.
There's also a helpful script to automate migration from 4.x and onwards.
As always, keep a backup of your index if necessary. Also remember that certain field types may no longer be available, or field types has changed (and introduced new features which may be enabled by default).
If you can reindex, that's the preferred upgrade path.

Hot Swap Agent doesn't work with Java 8 and Tomcat 8.0.26

I have a question about hot swap agent. I configured it with java 8 and tomcat 8.0.26 64 bit. When I start server under Eclipse I got some errors:
Caused by: compile error: cannot find constructor org.apache.catalina.webresources.FileResource(org.apache.catalina.webresources.StandardRoot,java.lang.String,java.io.File,boolean)
and
Caused by: org.hotswap.agent.javassist.NotFoundException: getResource(..) is not found in org.apache.catalina.loader.WebappClassLoader
I put more detailed stack trace if it's needed.
I red that hot swap has problems with tomcat 8 to 8.0.23 version, but newer versions should work. I'm using 0.3 version of Hot Swap Agent. Any ideas?

Unable to start server due following issues: Launch process failed with exit code 1

For 3 days now, I have been trying to install glassfish 4.1 on eclipse Luna version 4.4.1. I first installed the plugin from eclipse marketplace then added it in my runtime using jdk 8. I also made jdk my default since eclipse default uses jre. I have to point out that I have been been using glassfish on netbeans and tomcat on eclipse but I decided to play around with glassfish on eclipse. Every information I got on the internet didn't fix my issue.
Below is the error I got in the console. Right now, this is driving me nuts so I have decided to come to you for direction.
Thanks
Launching GlassFish on Felix platform
ERROR: Unable to create cache directory: C:\Program Files\glassfish-4.1\glassfish\domains\domain1\osgi-cache\felix
ERROR: Error creating bundle cache. (java.lang.RuntimeException: Unable to create cache directory.)
java.lang.RuntimeException: Unable to create cache directory.
at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:131)
at org.apache.felix.framework.Felix.init(Felix.java:640)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:88)
Exception in thread "Thread-1" java.lang.RuntimeException: org.osgi.framework.BundleException: Error creating bundle cache.
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:90)
Caused by: org.osgi.framework.BundleException: Error creating bundle cache.
at org.apache.felix.framework.Felix.init(Felix.java:645)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:88)
Caused by: java.lang.RuntimeException: Unable to create cache directory.
at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:131)
at org.apache.felix.framework.Felix.init(Felix.java:640)
... 1 more
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Caused by: org.glassfish.embeddable.GlassFishException: java.lang.NullPointerException
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.build(OSGiGlassFishRuntimeBuilder.java:170)
at org.glassfish.embeddable.GlassFishRuntime._bootstrap(GlassFishRuntime.java:157)
at org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.java:110)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:112)
... 6 more
Caused by: java.lang.NullPointerException
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.newFramework(OSGiGlassFishRuntimeBuilder.java:241)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.build(OSGiGlassFishRuntimeBuilder.java:135)
... 9 more
Error stopping framework: java.lang.NullPointerException
java.lang.NullPointerException
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher$1.run(GlassFishMain.java:203)
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0
Run Eclipse or any other IDE you use in Administrator mode.
Works for me.
I think your comment deserves to be posted as the main answer but I have been trying to mark your comment as answer but I wash't able to. So I decided to post post your comment here and then back it up with my own experience.
Answer by unwichtich:
I guess this is a similar problem. The cause may be that you have installed Glassfish in c:\Program Files. You can try to move your Glassfish installation to a directory where your normal user account has full access rights but you then have to change the path to the Glassfish installation in Eclipse.
My own experience:
Turns out that all the problems I had with the glassfish server (including exit code 1 error) was because glassfish could not handle folder names with spaces in it. So I moved the glassfish-4.1 folder from C:\Program File\glassfish-4.1.. path to C:\ glassfish-4.1.. It wiped all my tears away. This is really important in eclipse and netbeans IDEs (if you are installing the netbeans that does not come with a glassfish bundled zip).
I had the same problem and fixed it by installing Glassfish under C:\ instead of C:\Program Files. Try that.
use JDk 7 instead of JDK 8 am also faced the same issue i just changed to jdk7 its working now.

Unsupported major.minor version 52.0 captive portal [duplicate]

This question already has answers here:
How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version
(51 answers)
Closed 5 years ago.
Hi guys,
I have to make a captive portal for a school project with some friends. One of us got it working and we basically copied the image from his Raspberry PI to our Raspberry PI. After we did that, everything seems to be fine but then suddenly when we open our Captive Portal and try to log in with the username and password which we have saved in the database, this appears:
HTTP Status 500 - captiveportal/proccess : Unsupported major.minor version 52.0 (unable to load class captiveportal.proccess)
type Exception report
message captiveportal/proccess : Unsupported major.minor version 52.0 (unable to load class captiveportal.proccess)
description The server encountered an internal error (captiveportal/proccess : Unsupported major.minor version 52.0 (unable to load class captiveportal.proccess)) that prevented it from fulfilling this request.
exception
java.lang.UnsupportedClassVersionError: captiveportal/proccess : Unsupported major.minor version 52.0 (unable to load class captiveportal.proccess)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2905)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1170)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:461)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:745)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.28 logs.
We basically need to fill in the username and the password and after that we should be able to use the internet but unfortunately this error appears.
Did somebody have got the same error before? I am not sure what to do, I kept searching for straight 2 days but unfortunately I couldn't find the answer.
I hope you guys can help me with this problem, thanks in advance.
Empaier.
What it means is that , your code is compiled with different version of java to java version which is running it .
make sure you compile and runt it with the same version if java.
It seems you are compiling your files with java 1.8 but the server where you are running them runs with an older java version.
Either run server with java 1.8 or compile your code with a target version equivalent to the jre running your server.
Check the runtime environment of server in eclipse
From the Window menu, select Preferences.
In the Preferences window, expand the Server folder and then select Runtime Environments.
select the server you are using
click edit button
Then check out the execution environment (check the java version(1.8) is correct or not)
check project compiler also
Right click your eclipse project
Take properties
click java compiler
Check the java compiler version is the same (1.8)
Thank you

Categories