Announcement Announcement Module
Collapse
No announcement yet.
java.lang.OutOfMemoryError when hot-redeploying stock Roo app [Tomcat, Oracle] Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • java.lang.OutOfMemoryError when hot-redeploying stock Roo app [Tomcat, Oracle]

    Hi all, using

    -) Spring Roo 1.2.3.RELEASE
    -) Oracle 11.2.0.3 (with ojdbc6-11.2.0.3)
    -) Tomcat 7.0.40

    With a simple stock roo application (containing a simple entity called Person with a single string field), with only two hot-redeploys on a stock Tomcat 7.0.40 i get an OutOfMemory error.
    Unfortunately, the problems also has shown in a production environment, where stop-restart server is not an option....and it doesn't depend by our organization, but on client's one. :/

    The "leak" shows using Oracle, while does not shows when using PostgreSQL, apparently...it means that i've not been able to reproduce it using postgreSQL.

    Here an excerpt from catalina.out

    INFO: Undeploying context [/leak-0.1.0.BUILD-SNAPSHOT]
    mag 28, 2013 6:01:24 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
    SEVERE: The web application [/leak-0.1.0.BUILD-SNAPSHOT] registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
    mag 28, 2013 6:01:24 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    SEVERE: The web application [/leak-0.1.0.BUILD-SNAPSHOT] created a ThreadLocal with key of type [org.aspectj.runtime.internal.cflowstack.ThreadStac kFactoryImpl.ThreadCounterImpl] (value [org.aspectj.runtime.internal.cflowstack.ThreadStac kFactoryImpl$ThreadCounterImpl@113f4eab]) and a value of type [org.aspectj.runtime.internal.cflowstack.ThreadStac kFactoryImpl.ThreadCounterImpl.Counter] (value [org.aspectj.runtime.internal.cflowstack.ThreadStac kFactoryImpl$ThreadCounterImpl$Counter@5345c565]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
    mag 28, 2013 6:01:25 PM org.apache.catalina.startup.HostConfig deployWAR
    INFO: Deploying web application archive /Applications/development/apache-tomcat-7.0.40/webapps/leak-0.1.0.BUILD-SNAPSHOT.war
    mag 28, 2013 6:02:09 PM org.apache.catalina.startup.HostConfig deleteRedeployResources
    INFO: Undeploying context [/leak-0.1.0.BUILD-SNAPSHOT]
    mag 28, 2013 6:02:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
    SEVERE: The web application [/leak-0.1.0.BUILD-SNAPSHOT] registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
    mag 28, 2013 6:02:09 PM org.apache.catalina.startup.HostConfig deployWAR
    INFO: Deploying web application archive /Applications/development/apache-tomcat-7.0.40/webapps/leak-0.1.0.BUILD-SNAPSHOT.war
    Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]"
    Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]"
    Exception in thread "Timer-2"
    Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Timer-2"
    2013-05-28 18:36:37.750 java[5124:7b03] Connection with distnoted server was invalidated
    I've read several posts about leak introduced by CGLIB and commons-logging and so on...it's my case too?
    Is anything here related to Oracle and oracle jdbc driver?
    Anyone can give me an insight on how could avoid such behavior?


    Thanks,

    Paolo

    P.S. I'm attaching my roo simple project. It does not contain Ojdbc6-11.2.0.3 driver, and to start it needs to adjust database connection settings on the property file.
Working...
X