cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fawzib Rojas <f_ro...@spectron-msim.com>
Subject Re: Cocoon 2.2 WebApp in JBoss 7
Date Mon, 11 Mar 2013 15:39:53 GMT
Looking around found out that the problem was fixed on a newer version 
of Spring, so I replaced the old version (2.51) with the latest one 
(3.21) but now I get 3 more errors. Im trying to connect 2 cocoon blocks 
com.spectron.website.webapp-logger.service and 
com.spectron.website.webapp-home.service, maybe the format changed 
between versions?

11:30:43,466 ERROR [org.springframework.web.context.ContextLoader] (MSC 
service thread 1-5) Context initialization failed: 
org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name 'com.spectron.website.webapp-home.service': Cannot 
resolve reference to bean 'com.spectron.website.webapp-logger.service' 
while setting bean property 'connections' with key [TypedStringValue: 
value [loggerBlock], target type [null]]; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name 'com.spectron.website.webapp-logger.service': Invocation 
of init method failed; nested exception is 
java.net.MalformedURLException: Could not resolve 
blockcontext:/webapp-logger/ due to java.net.MalformedURLException: 
Unknown block name webapp-logger in block context uri 
blockcontext:/webapp-logger/
     at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:379)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:162)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1391)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:608)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)

[spring-context-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)

[spring-context-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)

[spring-web-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)

[spring-web-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)

[spring-web-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) 
[jbossweb-7.0.13.Final.jar:]
     at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]
     at 
org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) 
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
     at 
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
     at 
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
     at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 
[rt.jar:1.6.0_18]
     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 
[rt.jar:1.6.0_18]
     at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_18]
Caused by: org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 
'com.spectron.website.webapp-logger.service': Invocation of init method 
failed; nested exception is java.net.MalformedURLException: Could not 
resolve blockcontext:/webapp-logger/ due to 
java.net.MalformedURLException: Unknown block name webapp-logger in 
block context uri blockcontext:/webapp-logger/
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1486)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     ... 25 more
Caused by: java.net.MalformedURLException: Could not resolve 
blockcontext:/webapp-logger/ due to java.net.MalformedURLException: 
Unknown block name webapp-logger in block context uri 
blockcontext:/webapp-logger/
     at 
org.apache.cocoon.servletservice.spring.ServletFactoryBean.init(ServletFactoryBean.java:111)

[cocoon-servlet-service-impl-1.0.0.jar:]
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
[rt.jar:1.6.0_18]
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
[rt.jar:1.6.0_18]
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
[rt.jar:1.6.0_18]
     at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_18]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1612)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1553)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     ... 32 more

11:30:43,606 ERROR 
[org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/spectron/]] 
(MSC service thread 1-5) Exception sending context initialized event to 
listener instance of class 
org.springframework.web.context.ContextLoaderListener: 
org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name 'com.spectron.website.webapp-home.service': Cannot 
resolve reference to bean 'com.spectron.website.webapp-logger.service' 
while setting bean property 'connections' with key [TypedStringValue: 
value [loggerBlock], target type [null]]; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name 'com.spectron.website.webapp-logger.service': Invocation 
of init method failed; nested exception is 
java.net.MalformedURLException: Could not resolve 
blockcontext:/webapp-logger/ due to java.net.MalformedURLException: 
Unknown block name webapp-logger in block context uri 
blockcontext:/webapp-logger/
     at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:379)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:162)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1391)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:608)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)

[spring-context-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)

[spring-context-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)

[spring-web-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)

[spring-web-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)

[spring-web-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) 
[jbossweb-7.0.13.Final.jar:]
     at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]
     at 
org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) 
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
     at 
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
     at 
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
     at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 
[rt.jar:1.6.0_18]
     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 
[rt.jar:1.6.0_18]
     at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_18]
Caused by: org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 
'com.spectron.website.webapp-logger.service': Invocation of init method 
failed; nested exception is java.net.MalformedURLException: Could not 
resolve blockcontext:/webapp-logger/ due to 
java.net.MalformedURLException: Unknown block name webapp-logger in 
block context uri blockcontext:/webapp-logger/
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1486)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     ... 25 more
Caused by: java.net.MalformedURLException: Could not resolve 
blockcontext:/webapp-logger/ due to java.net.MalformedURLException: 
Unknown block name webapp-logger in block context uri 
blockcontext:/webapp-logger/
     at 
org.apache.cocoon.servletservice.spring.ServletFactoryBean.init(ServletFactoryBean.java:111)

[cocoon-servlet-service-impl-1.0.0.jar:]
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
[rt.jar:1.6.0_18]
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
[rt.jar:1.6.0_18]
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
[rt.jar:1.6.0_18]
     at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_18]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1612)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1553)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483)

[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]
     ... 32 more


On 3/11/2013 10:18 AM, Fawzib Rojas wrote:
> Ok, commented the OSGI stuff out (shouldnt it check if it is an OSGI 
> bundle before deploying as such?) and now is deploying but with a ton 
> of Spring errors:
>
> 10:04:24,163 DEBUG 
> [org.springframework.core.io.support.PathMatchingResourcePatternResolver] 
> (MSC service thread 1-2) Cannot search for matching files underneath 
> URL 
> [vfs:/C:/jboss-as-7.1.1.Final/bin/content/spectron.war/WEB-INF/lib/cocoon-expression-language-impl-1.0.0.jar/META-INF/cocoon/spring/]

> because it does not correspond to a directory in the file system: 
> java.io.FileNotFoundException: URL 
> [vfs:/C:/jboss-as-7.1.1.Final/bin/content/spectron.war/WEB-INF/lib/cocoon-expression-language-impl-1.0.0.jar/META-INF/cocoon/spring/]

> cannot be resolved to absolute file path because it does not reside in 
> the file system: 
> vfs:/C:/jboss-as-7.1.1.Final/bin/content/spectron.war/WEB-INF/lib/cocoon-expression-language-impl-1.0.0.jar/META-INF/cocoon/spring/
>     at 
> org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:198) 
> [spring-core-2.5.1.jar:2.5.1]
>
>
> On 3/8/2013 3:09 PM, gelo1234 wrote:
>> In every jar file :) But I don't think that such procedure will make 
>> your app work. Apparently its not OSGi app :)
>>
>> It looks to me that your jBoss is starting up in default OSGi mode or 
>> is treating your war file as an OSGi bundle.
>>
>> You can fix this:
>> 1. either by removing OSGI-specific info in every jar file 
>> (META-INF/MANIFEST.MF) - so jBoss wont recognize them as OSGi bundles
>> 2. or comment out the OSGi subsystem in jBoss if you dont plan to use 
>> it at all:
>> in jBoss standalone.xml file comment out:
>> |<subsystem  xmlns="urn:jboss:domain:osgi:1.2"  activation="lazy">
>>
>> ||
>>
>> </subsystem>|
>> or remove it and RESTART the jBoss server. Now your war file should 
>> be recognized as a standard JEE war file.
>>
>> Greetings,
>> -Greg
>>
>>
>


Mime
View raw message