cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Dahbura <dahb...@aopslab.com>
Subject Having problems with cayenne.xml in web application
Date Tue, 17 May 2011 14:04:19 GMT
I have placed the cayenne.xml file in WEB-INF directory, also in classes directory under WEB-INF
and even added a parameter to my web.xml file to : 

<filter> 
<filter-name>CayenneFilter</filter-name> 
<filter-class>org.apache.cayenne.conf.WebApplicationContextFilter</filter-class>

<init-param> 
<param-name>cayenne.configuration.path</param-name> 
<param-value>/WEB-INF/classes</param-value> 
</init-param> 
</filter> 


I cannot get Cayenne the web application to startup without throwing a cayenne.xml not found....


SEVERE: Exception sending context initialized event to listener instance of class com.tasc.aops.eurest.Context.DatabaseStartup

org.apache.cayenne.ConfigurationException: [v.3.0.1 Aug 25 2010 19:42:04] Error during Configuration
initialization. [v.3.0.1 Aug 25 2010 19:42:04] [org.apache.cayenne.conf.DefaultConfiguration]
: Domain configuration file "cayenne.xml" is not found. 
at org.apache.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:168)

at org.apache.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:141)

at org.apache.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:121)

at org.apache.cayenne.conf.Configuration.getSharedConfiguration(Configuration.java:91) 
at org.apache.cayenne.access.DataContext.createDataContext(DataContext.java:143) 
at com.tasc.aops.eurest.Context.DatabaseAccess.<init>(DatabaseAccess.java:70) 
at com.tasc.aops.eurest.Context.DatabaseAccess.getInstance(DatabaseAccess.java:87) 
at com.tasc.aops.eurest.Context.DatabaseStartup.contextInitialized(DatabaseStartup.java:25)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934) 
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429) 
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) 
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) 
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) 
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) 
at org.apache.catalina.core.StandardService.start(StandardService.java:516) 
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) 
at org.apache.catalina.startup.Catalina.start(Catalina.java:583) 
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:288) 
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 

I When my application starts up it tries to do a DataContext dataContext = DataContext.createDataContext();
which is causing the error.... 

I am using version 3.0.1.... with the WebApplicationContextFilter.... 

Thanks, 
Tony 




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message