cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: DB2 helpful hint
Date Mon, 09 May 2011 07:48:33 GMT
Ok. Now that you posted a new stack trace, it totally makes sense.

Andrus

On May 6, 2011, at 5:54 PM, Andrew Willerding wrote:

> Hi Andrus,
> 
> I know we had discussed this before where I was using DB2 V9.x.  The difference this
time was with the error and the failure to even deploy and start the application at all the
first time it was even loaded by tomcat.  I dug around some more in the tomcat log files and
now found this in the localhost log file which confirms that the issue was that the db2java.zip
file was not being loaded.
> 
> Andrew
> 
> May 6, 2011 9:47:33 AM org.apache.catalina.core.StandardContext filterStart
> SEVERE: Exception starting filter CayenneFilter
> org.apache.cayenne.ConfigurationException: [v.3.0.1 Aug 25 2010 19:38:17] Error during
Configuration initialization. [v.3.0.1 Aug 25 2010 19:38:17] Load failures. Main configuration
class: org.apache.cayenne.conf.DefaultConfiguration, details:
>    domain.node.name=SurveyNode, domain.node.datasource=SurveyNode.driver.xml, reason:
DataSource load failed - Can not load JDBC driver named 'COM.ibm.db2.jdbc.net.DB2Driver':
COM.ibm.db2.jdbc.net.DB2Driver
>    at org.apache.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:168)
>    at org.apache.cayenne.conf.ServletUtil.initializeSharedConfiguration(ServletUtil.java:83)
>    at org.apache.cayenne.conf.WebApplicationContextFilter.init(WebApplicationContextFilter.java:59)
>    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
>    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
>    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
>    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4071)
>    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4725)
>    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
>    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
>    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
>    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
>    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
>    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
>    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)
>    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
>    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
>    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
>    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
>    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
>    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
>    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
>    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> Caused by: org.apache.cayenne.ConfigurationException: [v.3.0.1 Aug 25 2010 19:38:17]
Load failures. Main configuration class: org.apache.cayenne.conf.DefaultConfiguration, details:
>    domain.node.name=SurveyNode, domain.node.datasource=SurveyNode.driver.xml, reason:
DataSource load failed - Can not load JDBC driver named 'COM.ibm.db2.jdbc.net.DB2Driver':
COM.ibm.db2.jdbc.net.DB2Driver
>    at org.apache.cayenne.conf.RuntimeLoadDelegate.finishedLoading(RuntimeLoadDelegate.java:489)
>    at org.apache.cayenne.conf.ConfigLoader.loadDomains(ConfigLoader.java:79)
>    at org.apache.cayenne.conf.DefaultConfiguration.initialize(DefaultConfiguration.java:152)
>    at org.apache.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:159)
>    ... 29 more
> 
> 
> On 05/06/2011 10:23 AM, Andrus Adamchik wrote:
>> Hi Andrew,
>> 
>> It is odd that unrecognized driver could cause issues with Cayenne EventManager threads,
so maybe the driver issue is separate?
>> The "memory leak" warning in Tomcat is often related to the app's failure to shutdown
EventManager. Checking the archives, we discussed that before: http://markmail.org/message/3m2pxfunrfhzgxck
>> 
>> WebApplicationContextFilter was fixed in Cayenne 3.0.1 per https://issues.apache.org/jira/browse/CAY-1467
so it should no longer cause this message. Also if you are not using WebApplicationContextFilter
and manage Cayenne stack yourself, you will need to take care of the EventManager shutdown
in your code. E.g. check the "destroy" method here:
>> 
>> http://svn.apache.org/repos/asf/cayenne/main/tags/3.0.1/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/WebApplicationContextFilter.java
>> 
>> Andrus
>> 
>> 
>> On May 6, 2011, at 5:08 PM, Andrew Willerding wrote:
>> 
>>> I hope you don't mind me posting this here as hopefully this helps somebody else
trying to deploy a web app under tomcat 6.0.32 using DB2 Version 7.  (I know it's old but
I had no choice)
>>> 
>>> I was struggling to get the application to load and it was refusing to deploy
at all.  I kept getting the errors listed below.
>>> 
>>> It turns out that the IBM "jar" library file db2java.zip must be renamed to db2java.jar
for it to get loaded.  I believe that this is a tomcat issue and not a cayenne issue because
when I loaded the library in the Cayenne Modeler, cayenne was able to access the database.
>>> 
>>> 
>>> Andrew
>>> 
>>> SEVERE: The web application [/Survey] appears to have started a thread named
[ca
>>> yenne-edt-12217363-0] but has failed to stop it. This is very likely to create
a
>>> memory leak.
>>> May 6, 2011 9:41:46 AM org.apache.catalina.loader.WebappClassLoader clearReferen
>>> cesThreads
>>> SEVERE: The web application [/Survey] appears to have started a thread named
[ca
>>> yenne-edt-12217363-1] but has failed to stop it. This is very likely to create
a
>>> memory leak.
>>> May 6, 2011 9:41:46 AM org.apache.catalina.loader.WebappClassLoader clearReferen
>>> cesThreads
>>> SEVERE: The web application [/Survey] appears to have started a thread named
[ca
>>> yenne-edt-12217363-2] but has failed to stop it. This is very likely to create
a
>>> memory leak.
>>> May 6, 2011 9:41:46 AM org.apache.catalina.loader.WebappClassLoader clearReferen
>>> cesThreads
>>> SEVERE: The web application [/Survey] appears to have started a thread named
[ca
>>> yenne-edt-12217363-3] but has failed to stop it. This is very likely to create
a
>>> memory leak.
>>> 
> 
> 
> -- 
> Andrew Willerding
> Callista CTI
> 
>  ph: 416 444-9702 x9455
>  fx: 416 444-9732
> cell: 416 712-2323
> www: http://www.callistacti.com
> 
> 


Mime
View raw message