You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Fawzib Rojas <f_...@spectron-msim.com> on 2013/03/08 19:15:05 UTC

Cocoon 2.2 WebApp in JBoss 7

Anyone tried running a cocoon 2.2 webapp (war) in JBoss 7? I have run a 
simple cocoon 2.2 app (just says Cocoon 2.2 runs!) in Glassfish and 
Jetty8 but is giving me an error in JBoss 7.1.1

10:45:26,737 DEBUG 
[org.jboss.osgi.framework.internal.AbstractFrameworkService] (MSC 
service thread 1-1) Starting: service jbosgi.Framework.ACTIVATOR in mode 
ON_DEMAND

10:45:26,741 DEBUG [org.jboss.as.osgi] (MSC service thread 1-6) 
Starting: service jboss.osgi.deployment."spectron.war" in mode ACTIVE
10:45:26,746 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) 
MSC00001: Failed to start service jboss.osgi.deployment."spectron.war": 
org.jboss.msc.service.StartException in service 
jboss.osgi.deployment."spectron.war": JBAS011966: Failed to install 
deployment: [:1.0.0,location=spectron.war]
at 
org.jboss.as.osgi.deployment.BundleInstallService.start(BundleInstallService.java:100) 

at 
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) 
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at 
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) 
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
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: java.lang.IllegalArgumentException: Empty name segment is not 
allowed for 8
at org.jboss.msc.service.ServiceName.of(ServiceName.java:85) 
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at 
org.jboss.osgi.framework.internal.BundleManager.getServiceNameInternal(BundleManager.java:245) 

at 
org.jboss.osgi.framework.internal.BundleManager.getServiceName(BundleManager.java:234) 

at 
org.jboss.osgi.framework.internal.HostBundleInstalledService.addService(HostBundleInstalledService.java:39) 

at 
org.jboss.osgi.framework.internal.BundleManager.installBundle(BundleManager.java:392) 

at 
org.jboss.as.osgi.deployment.BundleInstallService.start(BundleInstallService.java:97)
     ... 5 more

10:45:26,776 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) 
JBAS015870: Deploy of deployment "spectron.war" was rolled back with 
failure message {"JBAS014671: Failed services" => 
{"jboss.osgi.deployment.\"spectron.war\"" => 
"org.jboss.msc.service.StartException in service 
jboss.osgi.deployment.\"spectron.war\": JBAS011966: Failed to install 
deployment: [:1.0.0,location=spectron.war]"}}

10:45:26,783 ERROR [org.jboss.as.server.deployment] (MSC service thread 
1-5) JBAS015892: Deployment unit processor 
org.jboss.as.jpa.processor.PersistenceProviderProcessor@43285f7a 
unexpectedly threw an exception during undeploy phase INSTALL of 
deployment "spectron.war": java.lang.NullPointerException
at 
org.jboss.as.jpa.processor.PersistenceProviderProcessor.allDeploymentModuleClassLoaders(PersistenceProviderProcessor.java:138)
at 
org.jboss.as.jpa.processor.PersistenceProviderProcessor.undeploy(PersistenceProviderProcessor.java:122)
at 
org.jboss.as.server.deployment.DeploymentUnitPhaseService.safeUndeploy(DeploymentUnitPhaseService.java:167) 
[jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at 
org.jboss.as.server.deployment.DeploymentUnitPhaseService.stop(DeploymentUnitPhaseService.java:161) 
[jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at 
org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911) 
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at 
org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874) 
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
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]

10:45:26,862 INFO  [org.jboss.as.server.deployment] (MSC service thread 
1-1) JBAS015877: Stopped deployment spectron.war in 84ms
10:45:26,866 INFO  [org.jboss.as.controller] (DeploymentScanner-threads 
- 2) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service 
jboss.osgi.deployment."spectron.war": 
org.jboss.msc.service.StartException in service 
jboss.osgi.deployment."spectron.war": JBAS011966: Failed to install 
deployment: [:1.0.0,location=spectron.war]
10:45:26,874 ERROR [org.jboss.as.server.deployment.scanner] 
(DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed 
and was rolled back. Steps that failed:" => {"Operation step-2" => 
{"JBAS014671: Failed services" => 
{"jboss.osgi.deployment.\"spectron.war\"" => 
"org.jboss.msc.service.StartException in service 
jboss.osgi.deployment.\"spectron.war\": JBAS011966: Failed to install 
deployment: [:1.0.0,location=spectron.war]"}}}}

-------------------------------------
jetty.xml
-------------------------------------
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
     <New id="ds" class="org.eclipse.jetty.plus.jndi.Resource">
         <Arg>jdbc/MSIM</Arg>
         <Arg>
             <New class="com.mchange.v2.c3p0.ComboPooledDataSource">
                  <Set 
name="driverClass">com.microsoft.sqlserver.jdbc.SQLServerDataSource</Set>
                  <Set name="jdbcUrl">server_address</Set>
                 <Set name="user">user</Set>
                 <Set name="password">password</Set>
                 <Set name="minPoolSize">5</Set>
                 <Set name="maxPoolSize">20</Set>
                 <Set name="acquireIncrement">5</Set>
               </New>
         </Arg>
     </New>

     <New id="mailSessionId" class="org.eclipse.jetty.plus.jndi.Resource">
           <Arg>javamail/MSIM</Arg>
         <Arg>
               <New 
class="org.eclipse.jetty.jndi.factories.MailSessionReference">
                 <Set name="user">username</Set>
                 <Set name="password">password</Set>
                 <Set name="properties">
                       <New class="java.util.Properties">
                           <Put name="mail.transport.protocol">smtp</Put>
                         <Put name="mail.host">mailserver</Put>
                         <Put name="mail.debug">false</Put>
                         <Put name="mail.smtp.auth">true</Put>
                       </New>
                 </Set>
               </New>
         </Arg>
     </New>

     <Set name="securityHandler">
         <New class="org.eclipse.jetty.security.ConstraintSecurityHandler">
              <Set name="loginService">
                    <New 
class="org.eclipse.jetty.plus.jaas.JAASLoginService">
                      <Set name="name">realm_name</Set>
                      <Set name="loginModuleName">MSIM</Set>
                    </New>
              </Set>
     </New>
   </Set>

</Configure>

-------------------------------------
jboss-web.xml
-------------------------------------

<jboss-web>
     <context-root>/</context-root>
     <!-- java:/MSIM_JDBC and java:/MSIM_MAIL, and the realm are defined 
in JBOSS -->
        <!-- at least they say bound/started on the logs -->
     <resource-ref>
         <res-ref-name>jdbc/MSIM</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
         <jndi-name>java:/MSIM_JDBC</jndi-name>
     </resource-ref>
     <resource-ref>
         <res-ref-name>javamail/MSIM</res-ref-name>
         <res-type>javax.mail.Session</res-type>
         <jndi-name>java:/MSIM_MAIL</jndi-name>
     </resource-ref>
     <!-- Use the JaasSecurityMgr other security domain for authentication
       and authorization of secured web content.
      -->
<security-domain>java:/jaas/realm_name</security-domain>
</jboss-web>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Cocoon 2.2 WebApp in JBoss 7

Posted by Fawzib Rojas <f_...@spectron-msim.com>.
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
>>
>>
>


Re: Cocoon 2.2 WebApp in JBoss 7

Posted by Fawzib Rojas <f_...@spectron-msim.com>.
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) 
[spring-context-2.5.1.jar:2.5.1]
     at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:338) 
[spring-context-2.5.1.jar:2.5.1]
     at 
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261) 
[spring-web-2.5.1.jar:2.5.1]
     at 
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) 
[spring-web-2.5.1.jar:2.5.1]
     at 
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) 
[spring-web-2.5.1.jar:2.5.1]
     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]


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
>
>


Re: Cocoon 2.2 WebApp in JBoss 7

Posted by gelo1234 <ge...@gmail.com>.
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


2013/3/8 Fawzib Rojas <f_...@spectron-msim.com>

>  In every jar in the war archive? I hope not. Maybe another question:
>
> I'm putting the war in the standalone/deployments directory so it gets
> autodeployed. Is there a way to deploy in Jboss and tell it "It is a war,
> not osgi bundle"?
>
>
> On 3/8/2013 2:29 PM, gelo1234 wrote:
>
>   Hi Fawzib,
>
> Looks like you are trying to deploy spectron.war as an OSGi
> bundle/application, so you need OSGi-compatible META-INF/MANIFEST
>  file in every .jar
>
>  Greetings,
> Greg
>
>
> 2013/3/8 Fawzib Rojas <f_...@spectron-msim.com>
>
>> Anyone tried running a cocoon 2.2 webapp (war) in JBoss 7? I have run a
>> simple cocoon 2.2 app (just says Cocoon 2.2 runs!) in Glassfish and Jetty8
>> but is giving me an error in JBoss 7.1.1
>>
>> 10:45:26,737 DEBUG
>> [org.jboss.osgi.framework.internal.AbstractFrameworkService] (MSC service
>> thread 1-1) Starting: service jbosgi.Framework.ACTIVATOR in mode ON_DEMAND
>>
>> 10:45:26,741 DEBUG [org.jboss.as.osgi] (MSC service thread 1-6) Starting:
>> service jboss.osgi.deployment."spectron.war" in mode ACTIVE
>> 10:45:26,746 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6)
>> MSC00001: Failed to start service jboss.osgi.deployment."spectron.war":
>> org.jboss.msc.service.StartException in service
>> jboss.osgi.deployment."spectron.war": JBAS011966: Failed to install
>> deployment: [:1.0.0,location=spectron.war]
>> at
>> org.jboss.as.osgi.deployment.BundleInstallService.start(BundleInstallService.java:100)
>>
>> at
>> org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
>> [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
>> at
>> org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
>> [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
>> 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: java.lang.IllegalArgumentException: Empty name segment is not
>> allowed for 8
>> at org.jboss.msc.service.ServiceName.of(ServiceName.java:85)
>> [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
>> at
>> org.jboss.osgi.framework.internal.BundleManager.getServiceNameInternal(BundleManager.java:245)
>>
>> at
>> org.jboss.osgi.framework.internal.BundleManager.getServiceName(BundleManager.java:234)
>>
>> at
>> org.jboss.osgi.framework.internal.HostBundleInstalledService.addService(HostBundleInstalledService.java:39)
>>
>> at
>> org.jboss.osgi.framework.internal.BundleManager.installBundle(BundleManager.java:392)
>>
>> at
>> org.jboss.as.osgi.deployment.BundleInstallService.start(BundleInstallService.java:97)
>>     ... 5 more
>>
>> 10:45:26,776 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2)
>> JBAS015870: Deploy of deployment "spectron.war" was rolled back with
>> failure message {"JBAS014671: Failed services" =>
>> {"jboss.osgi.deployment.\"spectron.war\"" =>
>> "org.jboss.msc.service.StartException in service
>> jboss.osgi.deployment.\"spectron.war\": JBAS011966: Failed to install
>> deployment: [:1.0.0,location=spectron.war]"}}
>>
>> 10:45:26,783 ERROR [org.jboss.as.server.deployment] (MSC service thread
>> 1-5) JBAS015892: Deployment unit processor
>> org.jboss.as.jpa.processor.PersistenceProviderProcessor@43285f7aunexpectedly threw an exception during undeploy phase INSTALL of deployment
>> "spectron.war": java.lang.NullPointerException
>> at
>> org.jboss.as.jpa.processor.PersistenceProviderProcessor.allDeploymentModuleClassLoaders(PersistenceProviderProcessor.java:138)
>> at
>> org.jboss.as.jpa.processor.PersistenceProviderProcessor.undeploy(PersistenceProviderProcessor.java:122)
>> at
>> org.jboss.as.server.deployment.DeploymentUnitPhaseService.safeUndeploy(DeploymentUnitPhaseService.java:167)
>> [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
>> at
>> org.jboss.as.server.deployment.DeploymentUnitPhaseService.stop(DeploymentUnitPhaseService.java:161)
>> [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
>> at
>> org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911)
>> [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
>> at
>> org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874)
>> [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
>> 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]
>>
>> 10:45:26,862 INFO  [org.jboss.as.server.deployment] (MSC service thread
>> 1-1) JBAS015877: Stopped deployment spectron.war in 84ms
>> 10:45:26,866 INFO  [org.jboss.as.controller] (DeploymentScanner-threads -
>> 2) JBAS014774: Service status report
>> JBAS014777:   Services which failed to start:      service
>> jboss.osgi.deployment."spectron.war": org.jboss.msc.service.StartException
>> in service jboss.osgi.deployment."spectron.war": JBAS011966: Failed to
>> install deployment: [:1.0.0,location=spectron.war]
>> 10:45:26,874 ERROR [org.jboss.as.server.deployment.scanner]
>> (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed
>> and was rolled back. Steps that failed:" => {"Operation step-2" =>
>> {"JBAS014671: Failed services" => {"jboss.osgi.deployment.\"spectron.war\""
>> => "org.jboss.msc.service.StartException in service
>> jboss.osgi.deployment.\"spectron.war\": JBAS011966: Failed to install
>> deployment: [:1.0.0,location=spectron.war]"}}}}
>>
>>
>
>

Re: Cocoon 2.2 WebApp in JBoss 7

Posted by Fawzib Rojas <f_...@spectron-msim.com>.
In every jar in the war archive? I hope not. Maybe another question:

I'm putting the war in the standalone/deployments directory so it gets 
autodeployed. Is there a way to deploy in Jboss and tell it "It is a 
war, not osgi bundle"?

On 3/8/2013 2:29 PM, gelo1234 wrote:
> Hi Fawzib,
>
> Looks like you are trying to deploy spectron.war as an OSGi 
> bundle/application, so you need OSGi-compatible META-INF/MANIFEST
> file in every .jar
>
> Greetings,
> Greg
>
>
> 2013/3/8 Fawzib Rojas <f_rojas@spectron-msim.com 
> <ma...@spectron-msim.com>>
>
>     Anyone tried running a cocoon 2.2 webapp (war) in JBoss 7? I have
>     run a simple cocoon 2.2 app (just says Cocoon 2.2 runs!) in
>     Glassfish and Jetty8 but is giving me an error in JBoss 7.1.1
>
>     10:45:26,737 DEBUG
>     [org.jboss.osgi.framework.internal.AbstractFrameworkService] (MSC
>     service thread 1-1) Starting: service jbosgi.Framework.ACTIVATOR
>     in mode ON_DEMAND
>
>     10:45:26,741 DEBUG [org.jboss.as.osgi] (MSC service thread 1-6)
>     Starting: service jboss.osgi.deployment."spectron.war" in mode ACTIVE
>     10:45:26,746 ERROR [org.jboss.msc.service.fail] (MSC service
>     thread 1-6) MSC00001: Failed to start service
>     jboss.osgi.deployment."spectron.war":
>     org.jboss.msc.service.StartException in service
>     jboss.osgi.deployment."spectron.war": JBAS011966: Failed to
>     install deployment: [:1.0.0,location=spectron.war]
>     at
>     org.jboss.as.osgi.deployment.BundleInstallService.start(BundleInstallService.java:100)
>
>     at
>     org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
>     [jboss-msc-1.0.2.GA.jar:1.0.2.GA <http://1.0.2.GA>]
>     at
>     org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
>     [jboss-msc-1.0.2.GA.jar:1.0.2.GA <http://1.0.2.GA>]
>     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: java.lang.IllegalArgumentException: Empty name segment
>     is not allowed for 8
>     at org.jboss.msc.service.ServiceName.of(ServiceName.java:85)
>     [jboss-msc-1.0.2.GA.jar:1.0.2.GA <http://1.0.2.GA>]
>     at
>     org.jboss.osgi.framework.internal.BundleManager.getServiceNameInternal(BundleManager.java:245)
>
>     at
>     org.jboss.osgi.framework.internal.BundleManager.getServiceName(BundleManager.java:234)
>
>     at
>     org.jboss.osgi.framework.internal.HostBundleInstalledService.addService(HostBundleInstalledService.java:39)
>
>     at
>     org.jboss.osgi.framework.internal.BundleManager.installBundle(BundleManager.java:392)
>
>     at
>     org.jboss.as.osgi.deployment.BundleInstallService.start(BundleInstallService.java:97)
>         ... 5 more
>
>     10:45:26,776 INFO  [org.jboss.as.server]
>     (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment
>     "spectron.war" was rolled back with failure message {"JBAS014671:
>     Failed services" => {"jboss.osgi.deployment.\"spectron.war\"" =>
>     "org.jboss.msc.service.StartException in service
>     jboss.osgi.deployment.\"spectron.war\": JBAS011966: Failed to
>     install deployment: [:1.0.0,location=spectron.war]"}}
>
>     10:45:26,783 ERROR [org.jboss.as.server.deployment] (MSC service
>     thread 1-5) JBAS015892: Deployment unit processor
>     org.jboss.as.jpa.processor.PersistenceProviderProcessor@43285f7a
>     unexpectedly threw an exception during undeploy phase INSTALL of
>     deployment "spectron.war": java.lang.NullPointerException
>     at
>     org.jboss.as.jpa.processor.PersistenceProviderProcessor.allDeploymentModuleClassLoaders(PersistenceProviderProcessor.java:138)
>     at
>     org.jboss.as.jpa.processor.PersistenceProviderProcessor.undeploy(PersistenceProviderProcessor.java:122)
>     at
>     org.jboss.as.server.deployment.DeploymentUnitPhaseService.safeUndeploy(DeploymentUnitPhaseService.java:167)
>     [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
>     at
>     org.jboss.as.server.deployment.DeploymentUnitPhaseService.stop(DeploymentUnitPhaseService.java:161)
>     [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
>     at
>     org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911)
>     [jboss-msc-1.0.2.GA.jar:1.0.2.GA <http://1.0.2.GA>]
>     at
>     org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874)
>     [jboss-msc-1.0.2.GA.jar:1.0.2.GA <http://1.0.2.GA>]
>     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]
>
>     10:45:26,862 INFO  [org.jboss.as.server.deployment] (MSC service
>     thread 1-1) JBAS015877: Stopped deployment spectron.war in 84ms
>     10:45:26,866 INFO  [org.jboss.as.controller]
>     (DeploymentScanner-threads - 2) JBAS014774: Service status report
>     JBAS014777:   Services which failed to start:      service
>     jboss.osgi.deployment."spectron.war":
>     org.jboss.msc.service.StartException in service
>     jboss.osgi.deployment."spectron.war": JBAS011966: Failed to
>     install deployment: [:1.0.0,location=spectron.war]
>     10:45:26,874 ERROR [org.jboss.as.server.deployment.scanner]
>     (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation
>     failed and was rolled back. Steps that failed:" => {"Operation
>     step-2" => {"JBAS014671: Failed services" =>
>     {"jboss.osgi.deployment.\"spectron.war\"" =>
>     "org.jboss.msc.service.StartException in service
>     jboss.osgi.deployment.\"spectron.war\": JBAS011966: Failed to
>     install deployment: [:1.0.0,location=spectron.war]"}}}}
>
>


Re: Cocoon 2.2 WebApp in JBoss 7

Posted by gelo1234 <ge...@gmail.com>.
Hi Fawzib,

Looks like you are trying to deploy spectron.war as an OSGi
bundle/application, so you need OSGi-compatible META-INF/MANIFEST
file in every .jar

Greetings,
Greg


2013/3/8 Fawzib Rojas <f_...@spectron-msim.com>

> Anyone tried running a cocoon 2.2 webapp (war) in JBoss 7? I have run a
> simple cocoon 2.2 app (just says Cocoon 2.2 runs!) in Glassfish and Jetty8
> but is giving me an error in JBoss 7.1.1
>
> 10:45:26,737 DEBUG [org.jboss.osgi.framework.**internal.**AbstractFrameworkService]
> (MSC service thread 1-1) Starting: service jbosgi.Framework.ACTIVATOR in
> mode ON_DEMAND
>
> 10:45:26,741 DEBUG [org.jboss.as.osgi] (MSC service thread 1-6) Starting:
> service jboss.osgi.deployment."**spectron.war" in mode ACTIVE
> 10:45:26,746 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6)
> MSC00001: Failed to start service jboss.osgi.deployment."**spectron.war":
> org.jboss.msc.service.**StartException in service jboss.osgi.deployment."*
> *spectron.war": JBAS011966: Failed to install deployment:
> [:1.0.0,location=spectron.war]
> at org.jboss.as.osgi.deployment.**BundleInstallService.start(**BundleInstallService.java:100)
>
> at org.jboss.msc.service.**ServiceControllerImpl$**StartTask.startService(
> **ServiceControllerImpl.java:**1811) [jboss-msc-1.0.2.GA.jar:1.0.2.**GA<http://1.0.2.GA>
> ]
> at org.jboss.msc.service.**ServiceControllerImpl$**StartTask.run(**
> ServiceControllerImpl.java:**1746) [jboss-msc-1.0.2.GA.jar:1.0.2.**GA<http://1.0.2.GA>
> ]
> 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: java.lang.**IllegalArgumentException: Empty name segment is
> not allowed for 8
> at org.jboss.msc.service.**ServiceName.of(ServiceName.**java:85)
> [jboss-msc-1.0.2.GA.jar:1.0.2.**GA <http://1.0.2.GA>]
> at org.jboss.osgi.framework.**internal.BundleManager.**
> getServiceNameInternal(**BundleManager.java:245)
> at org.jboss.osgi.framework.**internal.BundleManager.**
> getServiceName(BundleManager.**java:234)
> at org.jboss.osgi.framework.**internal.**HostBundleInstalledService.**
> addService(**HostBundleInstalledService.**java:39)
> at org.jboss.osgi.framework.**internal.BundleManager.**
> installBundle(BundleManager.**java:392)
> at org.jboss.as.osgi.deployment.**BundleInstallService.start(**
> BundleInstallService.java:97)
>     ... 5 more
>
> 10:45:26,776 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2)
> JBAS015870: Deploy of deployment "spectron.war" was rolled back with
> failure message {"JBAS014671: Failed services" => {"jboss.osgi.deployment.\"
> **spectron.war\"" => "org.jboss.msc.service.**StartException in service
> jboss.osgi.deployment.\"**spectron.war\": JBAS011966: Failed to install
> deployment: [:1.0.0,location=spectron.war]**"}}
>
> 10:45:26,783 ERROR [org.jboss.as.server.**deployment] (MSC service thread
> 1-5) JBAS015892: Deployment unit processor org.jboss.as.jpa.processor.**
> PersistenceProviderProcessor@**43285f7a unexpectedly threw an exception
> during undeploy phase INSTALL of deployment "spectron.war":
> java.lang.NullPointerException
> at org.jboss.as.jpa.processor.**PersistenceProviderProcessor.**
> allDeploymentModuleClassLoader**s(**PersistenceProviderProcessor.**
> java:138)
> at org.jboss.as.jpa.processor.**PersistenceProviderProcessor.**undeploy(**
> PersistenceProviderProcessor.**java:122)
> at org.jboss.as.server.**deployment.**DeploymentUnitPhaseService.**
> safeUndeploy(**DeploymentUnitPhaseService.**java:167)
> [jboss-as-server-7.1.1.Final.**jar:7.1.1.Final]
> at org.jboss.as.server.**deployment.**DeploymentUnitPhaseService.**stop(**
> DeploymentUnitPhaseService.**java:161) [jboss-as-server-7.1.1.Final.**
> jar:7.1.1.Final]
> at org.jboss.msc.service.**ServiceControllerImpl$**StopTask.stopService(**
> ServiceControllerImpl.java:**1911) [jboss-msc-1.0.2.GA.jar:1.0.2.**GA<http://1.0.2.GA>
> ]
> at org.jboss.msc.service.**ServiceControllerImpl$**StopTask.run(**
> ServiceControllerImpl.java:**1874) [jboss-msc-1.0.2.GA.jar:1.0.2.**GA<http://1.0.2.GA>
> ]
> 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]
>
> 10:45:26,862 INFO  [org.jboss.as.server.**deployment] (MSC service thread
> 1-1) JBAS015877: Stopped deployment spectron.war in 84ms
> 10:45:26,866 INFO  [org.jboss.as.controller] (DeploymentScanner-threads -
> 2) JBAS014774: Service status report
> JBAS014777:   Services which failed to start:      service
> jboss.osgi.deployment."**spectron.war": org.jboss.msc.service.**StartException
> in service jboss.osgi.deployment."**spectron.war": JBAS011966: Failed to
> install deployment: [:1.0.0,location=spectron.war]
> 10:45:26,874 ERROR [org.jboss.as.server.**deployment.scanner]
> (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed
> and was rolled back. Steps that failed:" => {"Operation step-2" =>
> {"JBAS014671: Failed services" => {"jboss.osgi.deployment.\"**spectron.war\""
> => "org.jboss.msc.service.**StartException in service
> jboss.osgi.deployment.\"**spectron.war\": JBAS011966: Failed to install
> deployment: [:1.0.0,location=spectron.war]**"}}}}
>
> ------------------------------**-------
> jetty.xml
> ------------------------------**-------
> <Configure class="org.eclipse.jetty.**webapp.WebAppContext">
>     <New id="ds" class="org.eclipse.jetty.plus.**jndi.Resource">
>         <Arg>jdbc/MSIM</Arg>
>         <Arg>
>             <New class="com.mchange.v2.c3p0.**ComboPooledDataSource">
>                  <Set name="driverClass">com.**microsoft.sqlserver.jdbc.**
> SQLServerDataSource</Set>
>                  <Set name="jdbcUrl">server_address<**/Set>
>                 <Set name="user">user</Set>
>                 <Set name="password">password</Set>
>                 <Set name="minPoolSize">5</Set>
>                 <Set name="maxPoolSize">20</Set>
>                 <Set name="acquireIncrement">5</**Set>
>               </New>
>         </Arg>
>     </New>
>
>     <New id="mailSessionId" class="org.eclipse.jetty.plus.**
> jndi.Resource">
>           <Arg>javamail/MSIM</Arg>
>         <Arg>
>               <New class="org.eclipse.jetty.jndi.**factories.**
> MailSessionReference">
>                 <Set name="user">username</Set>
>                 <Set name="password">password</Set>
>                 <Set name="properties">
>                       <New class="java.util.Properties">
>                           <Put name="mail.transport.protocol"**>smtp</Put>
>                         <Put name="mail.host">mailserver</**Put>
>                         <Put name="mail.debug">false</Put>
>                         <Put name="mail.smtp.auth">true</**Put>
>                       </New>
>                 </Set>
>               </New>
>         </Arg>
>     </New>
>
>     <Set name="securityHandler">
>         <New class="org.eclipse.jetty.**security.**
> ConstraintSecurityHandler">
>              <Set name="loginService">
>                    <New class="org.eclipse.jetty.plus.**
> jaas.JAASLoginService">
>                      <Set name="name">realm_name</Set>
>                      <Set name="loginModuleName">MSIM</**Set>
>                    </New>
>              </Set>
>     </New>
>   </Set>
>
> </Configure>
>
> ------------------------------**-------
> jboss-web.xml
> ------------------------------**-------
>
> <jboss-web>
>     <context-root>/</context-root>
>     <!-- java:/MSIM_JDBC and java:/MSIM_MAIL, and the realm are defined in
> JBOSS -->
>        <!-- at least they say bound/started on the logs -->
>     <resource-ref>
>         <res-ref-name>jdbc/MSIM</res-**ref-name>
>         <res-type>javax.sql.**DataSource</res-type>
>         <jndi-name>java:/MSIM_JDBC</**jndi-name>
>     </resource-ref>
>     <resource-ref>
>         <res-ref-name>javamail/MSIM</**res-ref-name>
>         <res-type>javax.mail.Session</**res-type>
>         <jndi-name>java:/MSIM_MAIL</**jndi-name>
>     </resource-ref>
>     <!-- Use the JaasSecurityMgr other security domain for authentication
>       and authorization of secured web content.
>      -->
> <security-domain>java:/jaas/**realm_name</security-domain>
> </jboss-web>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.**apache.org<us...@cocoon.apache.org>
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>