You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2013/05/03 06:01:20 UTC

[Bug 54921] New: Redeploy problem with Preferences= Illegal access: this web application instance has been stopped already. Could not load com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.

https://issues.apache.org/bugzilla/show_bug.cgi?id=54921

            Bug ID: 54921
           Summary: Redeploy problem with Preferences=  Illegal access:
                    this web application instance has been stopped
                    already.  Could not load
                    com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMMa
                    nager.
           Product: Tomcat 7
           Version: 7.0.39
          Hardware: HP
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: george.forman@gmail.com
    Classification: Unclassified

My Servlet uses the Java Preferences API to persist a sequence number
periodically.

If I *restart* my servlet without taking the entire Tomcat7 JVM down, then the
next time my servlet tries to persist the updated number via
Preferences.sync(), Catalina throws this error:

May 02, 2013 8:38:14 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. 
Could not load com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.  

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:1599)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
        at
com.sun.org.apache.xalan.internal.utils.ObjectFactory.findProviderClass(ObjectFactory.java:548)
        at
com.sun.org.apache.xalan.internal.utils.ObjectFactory.lookUpFactoryClass(ObjectFactory.java:223)
        at
com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTMManagerClass(XSLTCDTMManager.java:112)
        at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.<init>(TransformerFactoryImpl.java:239)
        at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.<init>(TransformerFactoryImpl.java:231)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
        at java.lang.Class.newInstance0(Class.java:374)
        at java.lang.Class.newInstance(Class.java:327)
        at
javax.xml.transform.FactoryFinder.newInstance(FactoryFinder.java:188)
        at javax.xml.transform.FactoryFinder.find(FactoryFinder.java:296)
        at
javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:101)
        at java.util.prefs.XmlSupport.writeDoc(XmlSupport.java:263)
        at java.util.prefs.XmlSupport.exportMap(XmlSupport.java:355)
        at
java.util.prefs.FileSystemPreferences$7.run(FileSystemPreferences.java:622)
        at
java.util.prefs.FileSystemPreferences$7.run(FileSystemPreferences.java:615)
        at java.security.AccessController.doPrivileged(Native Method)
        at
java.util.prefs.FileSystemPreferences.writeBackCache(FileSystemPreferences.java:614)
        at
java.util.prefs.FileSystemPreferences.syncSpiPrivileged(FileSystemPreferences.java:801)
        at
java.util.prefs.FileSystemPreferences.access$2300(FileSystemPreferences.java:50)
        at
java.util.prefs.FileSystemPreferences$12.run(FileSystemPreferences.java:771)
        at
java.util.prefs.FileSystemPreferences$12.run(FileSystemPreferences.java:769)
        at java.security.AccessController.doPrivileged(Native Method)
        at
java.util.prefs.FileSystemPreferences.syncSpi(FileSystemPreferences.java:768)
        at
java.util.prefs.AbstractPreferences.sync2(AbstractPreferences.java:1332)
        at
java.util.prefs.AbstractPreferences.sync(AbstractPreferences.java:1323)
        at
java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:747)
        at com.hpl.suggester.Suggest.saveSerialNumber(Suggest.java:97)


Searched Google and couldn't find anyone else complaining about this.  Probably
not that common to be using the new Java Preferences API under Tomcat?? 
Anyway, it should just work.  I guess I'll use the older Java Properties API on
a file somewhere.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54921] Redeploy problem with Preferences= Illegal access: this web application instance has been stopped already. Could not load com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54921

--- Comment #3 from Konstantin Kolinko <kn...@gmail.com> ---
(In reply to comment #1)
> It isn't clear which preferences API you are using. The code appears to be
> using "java.util.prefs" which is from Java 1.4 yet you state you are using a
> "new" preferences API. Something doesn't add up here.
> 

+1 to all that Mark wrote.

1. The "java.util.prefs.FileSystemPreferences" class from your stacktrace is
not present in neither one of Oracle JDKs {6u45 or 7u21} on Windows.

2. Your stack trace is not full. It is not clear to what execution thread it
belongs. (E.g. if it is called from a Finalizer, there is no wonder in such
behaviour).

You have to provide some sample web application that reproduces this and more
details on your platform.

3. Some classloader memory leaks in JRE classes may be avoided by preloading
those classes when Tomcat starts. There is a Listener that can be configured to
do that, if you know what classes to preload.
Further discussion belongs to the users@ mailing list.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54921] Redeploy problem with Preferences= Illegal access: this web application instance has been stopped already. Could not load com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54921

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
It isn't clear which preferences API you are using. The code appears to be
using "java.util.prefs" which is from Java 1.4 yet you state you are using a
"new" preferences API. Something doesn't add up here.

What you seeing is a form of memory leak [1]. It isn't possible to tell if this
is an application issue, a JRE issue or a Tomcat issue. If it is a Tomcat issue
we should be able to fix it. If it is a JRE issue we might be able to work
around it. If it is an application issue there is nothing we can do.

To progress this we need the simplest possible test case that reproduces this.
>From your description you should be able to do this with a single JSP or
Servlet. If you provide a Servlet, please just provide the source code for the
Servlet (it should not have any 3rd party dependencies).

Finally, this issue may be platform dependent so please can you provide
information on exactly what platform (OS, JVM) you are seeing this issue on.

[1]
http://people.apache.org/~markt/presentations/2010-11-04-Memory-Leaks-60mins.pdf

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54921] Redeploy problem with Preferences= Illegal access: this web application instance has been stopped already. Could not load com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54921

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
I can't reproduce this with a simple test case based on the information
provided in the original report.

Given that it has been two weeks without a response to my request for further
information I am closing this as INVALID. It can always be re-opened if a test
case that demonstrates the issue is made available.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org