Laurent Perez wrote:
> I still have a problem gettting cocoon to load my own Spring beans : I
> put a daoContext.xml file under WEB-INF/cocoon/spring, but when I
> restart the container it again shows SEVERE : errorListener, nothing
> else. That file is working fine under spring2.0m4.
Could you post your whole stacktrace and the context file?
well, there is no stacktrace at all, the catalina log just writes
"SEVERE : errorListener" and prevents the webapp from deploying. I'll
try to figure out if tomcat startup can be set to some DEBUG loglevel.
I tried to change my context to a very basic one, with a root <beans>
and a single <bean> entry, and it shows the same error. I then tried
to add a <bean> entry to WEB-INF/applicationContext.xml and it also
outputs that error, I'm pretty lost, but yeah I'll post that file
later on. Note that the single <bean> I tried to add is a
org.springframework.jdbc.datasource.DriverManagerDataSource class.
I also stumbled across
http://www.mail-archive.com/dev@cocoon.apache.org/msg46302.html , does
it mean I have to put a <cocoon:"something"/> tag somewhere into my
context ?
no you don't. WEB-INF/applicationContext.xml is automatically deployed
to your webapp from cocoon-core block:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:cocoon="http://org.apache.cocoon/core"
xmlns:avalon="http://org.apache.cocoon/avalon"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
http://org.apache.cocoon/core
http://org.apache.cocoon/core.xsd
http://org.apache.cocoon/avalon
http://org.apache.cocoon/avalon.xsd">
<!-- Load all the properties for Cocoon -->
<cocoon:settings/>
<!-- Load Avalon configurations
If you want to use a different logger than the default log4j logger,
add a bean conforming to the Avalon Logger interface to this definition
and leave out the loggingConfiguration attribute.
-->
<avalon:avalon location="/WEB-INF/cocoon/cocoon.xconf"
loggingConfiguration="/WEB-INF/cocoon/log4j.xconf"/>
</beans>
You must not put any other file in that location (yours will take
precedence and cocoon probably won't start).
Please try to mimic the steps I described here:
http://ouzo.squash.eu.org/2006/09/creating_a_mavenized_cocoon_ap.html
At the end of the entry there is a link to download the project source.
Try to put your application context into:
squasher/squasher-core/src/main/resources/META-INF/spring
and run the application.
--
Leszek Gawron, IT Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65