Hi -
I'm trying to get a webapp up and running by packaging my cocoon webapp as a
war file & deploying to tomcat.
What I have done is create two blocks - one (mla-wrp) has a dependency on
the other (mla-wrp-editable-fragments):
So, in mla-wrp's block-service-servlet.xml file I have set up
mla-wrp-editable-fragments as a connection:
<bean name="com.semantico.mla-wrp.service"
class="org.apache.cocoon.sitemap.SitemapServlet">
<servlet:context mount-path="/mla-wrp"
context-path="blockcontext:/mla-wrp/">
<servlet:connections>
<entry key="mla-wrp-editable-fragments"
value-ref="com.semantico.mla-wrp-editable-fragments.service"/>
</servlet:connections>
</servlet:context>
</bean>
I also have the ml-wrp-editable-fragment block set up as a dependency in the
mla-wrp pom.xml file.
In mla-wrp-editable-fragments block, I have the block-servlet-service.xml
file set up as follows:
<bean name="com.semantico.mla-wrp-editable-fragments.service"
class="org.apache.cocoon.sitemap.SitemapServlet">
<servlet:context mount-path="/mla-wrp-editable-fragments"
context-path="blockcontext:/mla-wrp-editable-fragments/" />
</bean>
This works absolutely fine.
I then create a webapp, add in both blocks as a dependency into the pom.xml
and I get the following error:
Error creating bean with name 'com.semantico.mla-wrp.service': Cannot
resolve reference to bean 'com.semantico.mla-wrp-editable-fragments.service'
while setting bean property 'connections' with key [TypedStringValue: value
[mla-wrp-editable-fragments], target type [null]]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'com.semantico.mla-wrp-editable-fragments.service': Invocation of
init method failed; nested exception is java.net.MalformedURLException:
Could not resolve blockcontext:/mla-wrp-editable-fragments/ due to
java.net.MalformedURLException: Unknown block name
mla-wrp-editable-fragments in block context uri
blockcontext:/mla-wrp-editable-fragments/
>From what I can gather from the documentation I have done everything that I
need to -
Could anyone explain what the problem is here? or atleast what cocoon is
trying to do? Why can it run perfectly when I am running the mla-wrp block
using the rcl plugin, but I can't run the application in the way it is
supposed to be deployed!
If anyone could offer any assistance, I would be very grateful.
Many thanks,
Anil.
--
View this message in context:
http://www.nabble.com/webapp%3A-Cannot-resolve-reference-to-bean-tp19191486p19191486.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]