Re: Cocoon 2.2 WebApp in JBoss 7
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] at org.springframework.core.io.UrlResource.getFile(UrlResource.java:156) [spring-core-2.5.1.jar:2.5.1] at org.springframework.core.io.support.PathMatchingResourcePatternResolver.doFindPathMatchingFileResources(PathMatchingResourcePatternResolver.java:457) [spring-core-2.5.1.jar:2.5.1] at org.springframework.web.context.support.ServletContextResourcePatternResolver.doFindPathMatchingFileResources(ServletContextResourcePatternResolver.java:80) [spring-web-2.5.1.jar:2.5.1] at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:323) [spring-core-2.5.1.jar:2.5.1] at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:244) [spring-core-2.5.1.jar:2.5.1] at org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1026) [spring-context-2.5.1.jar:2.5.1] at org.apache.cocoon.spring.configurator.impl.AbstractSettingsElementParser.handleBeanInclude(AbstractSettingsElementParser.java:184) [cocoon-spring-configurator-1.0.2.jar:] at org.apache.cocoon.spring.configurator.impl.AbstractSettingsElementParser.parse(AbstractSettingsElementParser.java:145) [cocoon-spring-configurator-1.0.2.jar:] at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69) [spring-beans-2.5.1.jar:2.5.1] at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1246) [spring-beans-2.5.1.jar:2.5.1] at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1236) [spring-beans-2.5.1.jar:2.5.1] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135) [spring-beans-2.5.1.jar:2.5.1] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92) [spring-beans-2.5.1.jar:2.5.1] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:488) [spring-beans-2.5.1.jar:2.5.1] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:383) [spring-beans-2.5.1.jar:2.5.1] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:327) [spring-beans-2.5.1.jar:2.5.1] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:295) [spring-beans-2.5.1.jar:2.5.1] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) [spring-beans-2.5.1.jar:2.5.1] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) [spring-beans-2.5.1.jar:2.5.1] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) [spring-beans-2.5.1.jar:2.5.1] at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) [spring-web-2.5.1.jar:2.5.1] at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92) [spring-web-2.5.1.jar:2.5.1] at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:97) [spring-context-2.5.1.jar:2.5.1] at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:411)
Re: Cocoon 2.2 WebApp in JBoss 7
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