[ 
https://jira.codehaus.org/browse/CONTINUUM-2731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=363181#comment-363181
 ] 

Brent N Atkinson commented on CONTINUUM-2731:
---------------------------------------------

The deployer was able to get further after updating the WEB-INF/jboss-web.xml 
bundled in the continuum war to remove the following:

{code:xml}
<class-loading java2ClassLoadingCompliance='false'>
  <loader-repository>
    org.apache.continuum:loader=continuum
    
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
  </loader-repository>
</class-loading>
{code}

The deployment failed due to unmapped JNDI resources:

{code}
015870: Deploy of deployment "apache-continuum-1.4.3.war" was rolled back with 
the following failure message:
{"JBAS014771: Services with missing/unavailable dependencies" => [
    
"jboss.naming.context.java.module.\"apache-continuum-1.4.3\".\"apache-continuum-1.4.3\".env.mail.Session
 is missing [jboss.naming.context.java.Mail]",
    
"jboss.naming.context.java.module.\"apache-continuum-1.4.3\".\"apache-continuum-1.4.3\".env.jdbc.continuum
 is missing [jboss.naming.context.java.continuum]",
    
"jboss.naming.context.java.module.\"apache-continuum-1.4.3\".\"apache-continuum-1.4.3\".env.jdbc.users
 is missing [jboss.naming.context.java.users]"
]}
{code}

I dropped a JDBC4-compliant derby driver, derby-10.10.1.1.jar, into 
standalone/deployments and JBoss successfully deployed it. I then was able to 
configure a datasource named ContinuumDS using the admin console. After 
enabling the datasource through the admin console, I updated the jboss-web.xml 
descriptor to point to the JNDI names like so:

{code:xml}
  <resource-ref>
    <res-ref-name>jdbc/continuum</res-ref-name>
    <jndi-name>java:jboss/datasources/ContinuumDS</jndi-name>
  </resource-ref>
  <resource-ref>
    <res-ref-name>jdbc/users</res-ref-name>
    <jndi-name>java:jboss/datasources/ContinuumDS</jndi-name>
  </resource-ref>
  <resource-ref>
    <res-ref-name>mail/Session</res-ref-name>
    <jndi-name>java:jboss/mail/Default</jndi-name>
  </resource-ref>
{code}

JBoss picked up the changed war immediately and started the application. 
However, application startup failed with the following:

{code}
11:20:41,874 ERROR 
[org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/continuum]]
 (ServerService Thread Pool -- 57) JBWEB000287: Exception sending context 
initialized event to listener instance of class 
org.apache.continuum.web.startup.ContinuumStartup: 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'scmManager' defined in URL 
[vfs:/content/apache-continuum-1.4.3.war/WEB-INF/lib/continuum-scm-1.4.3.jar/META-INF/spring-context.xml]:
 Cannot resolve reference to bean 'scmLogger' while setting bean property 
'scmLogger'; nested exception is 
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 
'scmLogger' is defined
...
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No 
bean named 'scmLogger' is defined
   at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:387)
 [spring-beans-2.5.6.jar:2.5.6]
   at 
org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:971)
 [spring-beans-2.5.6.jar:2.5.6]
   at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246)
 [spring-beans-2.5.6.jar:2.5.6]
   at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
 [spring-beans-2.5.6.jar:2.5.6]
   at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
 [spring-beans-2.5.6.jar:2.5.6]
   at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
 [spring-beans-2.5.6.jar:2.5.6]
   ... 29 more
{code}

It appears that the issue is with component-scanning in JBoss with Spring 
2.5.6. The ApplicationContext doesn't support the VFS filesystem for classpath 
scanning until Spring 3 and up. Deploying on JBoss should still be possible, 
but it will require updating the application to use a VFS-capable 
ApplicationContext during deployment. JBoss provides an ApplicationContext 
implementation called 
[snowdrop|http://docs.jboss.org/snowdrop/2.0.0.Final/html_single] for this 
purpose.

> Application fails to deploy on JBoss AS 7
> -----------------------------------------
>
>                 Key: CONTINUUM-2731
>                 URL: https://jira.codehaus.org/browse/CONTINUUM-2731
>             Project: Continuum
>          Issue Type: Task
>    Affects Versions: 1.4.2, 1.4.3
>         Environment: JBoss EAP 6.3
>            Reporter: Brent N Atkinson
>
> Recent versions of JBoss fail to deploy continuum due to the bundled 
> jboss-web.xml:
> {code}
> 17:41:58,830 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) 
> MSC000001: Failed to start service 
> jboss.deployment.unit."apache-continuum-1.4.2.war".PARSE: 
> org.jboss.msc.service.StartException in service 
> jboss.deployment.unit."apache-continuum-1.4.2.war".PARSE: JBAS018733: Failed 
> to process phase PARSE of deployment "apache-continuum-1.4.2.war"
>         at 
> org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166)
>  [jboss-as-server-7.4.2.Final-redhat-2.jar:7.4.2.Final-redhat-2]
>         at 
> org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980)
>  [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
>         at 
> org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913)
>  [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  [rt.jar:1.7.0_55]
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  [rt.jar:1.7.0_55]
>         at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_55]
> Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: 
> JBAS018014: Failed to parse XML descriptor 
> "/content/apache-continuum-1.4.2.war/WEB-INF/jboss-web.xml" at [26,3]
>         at 
> org.jboss.as.web.deployment.JBossWebParsingDeploymentProcessor.deploy(JBossWebParsingDeploymentProcessor.java:79)
>         at 
> org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159)
>  [jboss-as-server-7.4.2.Final-redhat-2.jar:7.4.2.Final-redhat-2]
>         ... 5 more
> Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[26,3]
> Message: Unexpected element 'class-loading' encountered
>         at 
> org.jboss.metadata.parser.util.MetaDataElementParser.unexpectedElement(MetaDataElementParser.java:109)
>         at 
> org.jboss.metadata.parser.jbossweb.JBossWebMetaDataParser.parse(JBossWebMetaDataParser.java:210)
>         at 
> org.jboss.as.web.deployment.JBossWebParsingDeploymentProcessor.deploy(JBossWebParsingDeploymentProcessor.java:71)
>         ... 6 more
> {code}
> See https://developer.jboss.org/thread/221002?tstart=0&_sscc=t



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to