In my web-based application, we've recently implemented language (utf-8) support. Since we have gotten it working, I have had the following error message spammed in my tomcat output. I don't have to have the web page open, only the application deployed, and this starts printing to the output at exact 30 second intervals, 5 times per interval.
Oct 09, 2013 4:26:46 PM org.apache.catalina.loader.WebappClassLoader findResourceInternal
INFO: Illegal access: this web application instance has been stopped already.
Could not load oracle/sql/converter_xcharset/CharacterConverter002e.glb. The
eventual following stack trace is caused by an error thrown for debugging purposes
as well as to attempt to terminate the thread which caused the illegal access, and
has no functional impact.
I am using ojdbc6 and see that there isn't anything like "CharacterConverter002e.glb" in the library. What is causing my application to look for this? Am I using the wrong ojdbc? It doesn't appear to keep anything from working but it's bothersome.
Related
When my database request takes too long tomcat crashes / closes and I find this in my log. I am totally clueless right now :)
Any thoughts ?
SEVERE: The web application [/ir] is still processing a request that
has yet to finish. This is very likely to create a memory leak. You
can control the time allowed for requests to finish by using the
unloadDelay attribute of the standard Context implementation.
Mar 14, 2015 2:14:38 AM org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [/ir] appears to have started a thread
named [MySQL Statement Cancellation Timer] but has failed to stop it.
This is very likely to create a memory leak.
What should I be doing ?
I have a Spring web application running on Tomcat.
When trying to shutdown Tomcat with the shutdown.sh script, the java process doesn't end because it has a Thread that's still running. The catalina.log contains
Jul 22, 2013 2:07:50 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/myapp] appears to have started a thread named [com.google.common.base.internal.Finalizer] but has failed to stop it. This is very likely to create a memory leak.
Apparently BoneCP has some Guava integration that causes this thread to block. Is there a clean or intended way to kill this thread?
There's an open issue on Guava for this problem - the issue itself is pretty old but if you check the latest comments you'll see some suggestions from other BoneCP users to resolve this issue
Also check this other issue and this patch
I’ve come to an hold with my programing because I’m getting an error from glassfish. I’m using NetBeans IDE 7.3 for this project. And I’ve built a simple program which runs over the web(jsp file etc). But I keep on getting the weirdest error display from glassfish. I’ve searched the internet for my solution and found people posting similar things, but I never seem actually manage to fix it because I don’t really understand the post which I’ve read.
So what is the error that I get at startup? First time I run it I get this from the Output
Starting GlassFish Server 3.1.2
GlassFish Server 3.1.2 is running.
In-place deployment at C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\build\web
Initializing...
deploy?
DEFAULT=C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\build\web&name=ÄrendeWebApplication&contextroot=/_rendeWebApplication&force=true failed on GlassFish Server 3.1.2
Error occurred during deployment: null. Please see server.log for more details.
C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\nbproject\build-impl.xml:1038: The module has not been deployed.
See the server log for details.
The actually name of the project is ÄrendeWebApplication and sure it’s a weird name for some people.
Well anyhow I tried to run the application again just to make sure it’s not something spooky going on, and I got a totally different error message.
In-place deployment at
C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\build\web
Initializing...
deploy?
DEFAULT=C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\build\web&name=Ärende
WebApplication&contextroot=/_rendeWebApplication&force=true failed on GlassFish Server 3.1.2
Error occurred during deployment: Application name ÄrendeWebApplication is already in use.
Please pick a different name.. Please see server.log for more details.
C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\nbproject\build-impl.xml:1038: The module has not been deployed.
See the server log for details.
Alright so this is the weirdest part since it’s complaining that the name of my application is already in use? So I thought first it could perhaps be something with the database, but went to see the “Java DB Database Process” and it seemed fine, will post it too just in case
Fri Jun 07 11:01:10 CEST 2013 : Security manager installed using the Basic server security policy.
Fri Jun 07 11:01:11 CEST 2013 : Apache Derby Network Server - 10.8.2.2 - (1181258) started and ready to accept connections on port 1527
So the database is not the problem “I Believe” so I went later to check on the Glassfish server 3.1.2 and I found some warning messages which read
WARNING: Multiple [2] JMX MBeanServer instances exist, we will use the server at index [0] : [com.sun.enterprise.v3.admin.DynamicInterceptor#297b0d9d].
WARNING: JMX MBeanServer in use: [com.sun.enterprise.v3.admin.DynamicInterceptor#297b0d9d] from index [0]
WARNING: JMX MBeanServer in use: [com.sun.jmx.mbeanserver.JmxMBeanServer#572b43d] from index [1]
INFO: EJB5181:Portable JNDI names for EJB ÄrendeDao: [java:global/ÄrendeWebApplication/ÄrendeDao!com.Ärende.dao.ÄrendeDaoLocal, java:global/ÄrendeWebApplication/ÄrendeDao]
INFO: WEB0671: Loading application [ÄrendeWebApplication] at [/_rendeWebApplication]
SEVERE: The log message is empty or null. Please log an issue against the component in the logger field.
And here is where I’ve tried different things, well I thought it first complained about the name, it’s alredy in use right…. So I deleted the application and moved it to another place on my hard drive and well, I wouldn’t be posting this if it worked. Then I started considering that perhaps the database was something wrong with, I went to the console admin in glassfish to check the connection and the Ping and showed me that it worked as it should. Also perhaps important information is that I’ve connected glassfish through MySQL, but I hardly believe that this is the problem. I then stumbled across someone saying that you could force “redeploy via Eclipse” well first problem here is that I’m not using Esclipse and second problem is I’ve searched A LOT to find if there is a “Force redeploy in NetBeans” and that is not the easiest task in life. So I believe this is perhaps my last stop hopefully and maybe someone here could help me out.
here are some steps you can try:
Fix your projects name :3
If your problem is the one the question title suggests, undeploy your application first, then redeploy. You can easily undeploy and force redeploy in the Glassfish Admin Gui (http://localhost:4848).
If your application still does not work, update your question with proper formatted log messages of the actual problem.
I have been searching a lot but have not found a perfect one which can help me to solve this problem.
I have web services and am generating the stub using JAX-WS.
To access the methods of web services I have wriiten a class in which all the methods are static like
public static String getLocation()
{
//call to the web service
}
I am specifying static because I want to confirm this is not the root cause of my problem.
Now when I am checking the logs in the Tomcat directory the catilina log shows some thins like this...This error is occured when I Startup or shutdown the tomcat server
Mar 18, 2010 11:13:07 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: stop: Stopping web application at '/testWeb'
Mar 18, 2010 11:13:07 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [leakingThread] but has failed to stop it. This is very likely to create a memory leak.
Another error I am seeing is
SEVERE: Unable to determine string representation of value of type [com.sun.xml.stream.writers.XMLStreamWriterImpl]
java.lang.UnsupportedOperationException
at com.sun.xml.stream.writers.XMLStreamWriterImpl.entrySet (XMLStreamWriterImpl.java:2134)
at java.util.AbstractMap.toString(AbstractMap.java:478)
at org.apache.catalina.loader.WebappClassLoader.clearThreadLocalMap(WebappClassLoader.java:2433)
at org.apache.catalina.loader.WebappClassLoader.clearReferencesThreadLocals(WebappClassLoader.java:2349)
at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1921)
at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1833)
at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:740)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4920)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:936)
Please can any one help me to clear these errors.
Thanks in advance.
My diagnossis: you have a Map implementation in a thread local, and this map doesn't support the operation entrySet, which is triggered by Map#toString. To be precise, your exception is thrown from this line of code in com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.
Tomcat's code that clears the thread local is quite unfortunately written to unconditionally call toString on objects just to be able to log them if the debug level is on.
If you can't get rid of using a thread-local for this, you may have quite some trouble working around this problem.
Your thread leak, by the way, is very probably the result of failed cleanup due to the above error.
i get this error
Mar 22, 2011 12:36:01 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal
INFO: Illegal access: this web application instance has been stopped already. Could not load META-INF/services/javax.xml.parsers.DocumentBuilderFactory. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
Mar 22, 2011 12:36:01 AM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1562)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
at javax.xml.parsers.FactoryFinder.getProviderClass(Unknown Source)
at javax.xml.parsers.FactoryFinder.newInstance(Unknown Source)
at javax.xml.parsers.FactoryFinder.find(Unknown Source)
at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
at com.xmlparser.XmlParser.parseXmlFile(XmlParser.java:33)
at com.xmlparser.XmlParser.<init>(XmlParser.java:25)
at com.jobs.SendRoutineMessagesJob.execute(SendRoutineMessagesJob.java:29)
at org.quartz.core.JobRunShell.run(JobRunShell.java:199)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)
could some one please guide me as to what mistake i am committing here. i am not sure if i would need to paste the source code as well.
This because of you are deploying new instance of your application to server but the some thread or connection of previous instance attempts doing some business logic you have written. That's why, the main part of JVM called ClassLoader informs you about "Illegal access: this web application instance has been stopped already" and throws appropriate exception ... You can switch off auto deploy feature of Application Server which preferable on Production Environment and after deploying application restart server manually. Or you can in Class level control Servlet Life Cycle :))) during "pre deploy" close all connection or stop some threads. Or use sophisticated way controlling Threads with ManagedExecutorService. Good luck!!!
seems like i was creating instance of something which was already created..i removed the instance and now it works fine
Are you using Netbeans? I had a similar error except it was could not load oracle.sql.lnxlib. Like many posters have pointed out, this error usually has to do with Tomcat caching multiple instances of the application. A coworker was able to solve the problem for me by undeploying old instances of the application within Netbeans. To do so, go to the Services Tab > Servers and then double click on Apache Tomcat or TomEE and after running the application once since opening netbeans, a Web Applications Folder should appear. If you double click on that, you should see instances of your application appear. You should be able to right click them and then click undeploy (you may have to right click them and hit stop first). Finally, you should stop and then start tomcat before building and running your application.
Hope this helps.
See attached screenshot for clarity
If you use gradle there is an error
Illegal access: this web application instance has been stopped already. Could not load [].
The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
You can change mysql-connect-java to
mysql: mysql-connector-java: 8.0.13
Good luck
I got this error on Tomcat on an Ubuntu server ....finally resolved it by doing a Tomcat shutdown with "systemctl stop tomcat" and then "sudo reboot" and then once the box came back up, starting Tomcat again