[jboss-jira] [JBoss JIRA] (AS7-4066) Using groovy throws a NoClassDefFoundError

Kim Lindberg (JIRA) jira-events at lists.jboss.org
Wed Mar 7 02:33:36 EST 2012


Kim Lindberg created AS7-4066:
---------------------------------

             Summary: Using groovy throws a NoClassDefFoundError
                 Key: AS7-4066
                 URL: https://issues.jboss.org/browse/AS7-4066
             Project: Application Server 7
          Issue Type: Bug
          Components: Class Loading
    Affects Versions: 7.1.0.Final
         Environment: Mac OSX 10.7.2
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11D50b)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
            Reporter: Kim Lindberg
            Assignee: David Lloyd


Using groovy (tested versions 1.7.6 and 1.8.6 (latest) results in a NoClassDefFoundError even though the groovy jar is in the classpath. If the dependency to groovy module is removed, it fails at an earlier stage, which would indicate that it finds the library correctly. Declaring the groovy module as a global module did not help.

To clarify the procedure leading to the error is:
1. a configuration xml file is deployed
2. the deployer creates a spring bean based on the xml
3. some configurations are done with groovy script, so during bean construction, the groovy script is processed
4. exception is thrown

Stacktrace follows:
[Server:ivr] 15:44:47,833 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.unit."DEFAULT-ivr-messageservice.xml".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.unit."DEFAULT-ivr-messageservice.xml".DEPENDENCIES: Failed to process phase DEPENDENCIES of deployment "DEFAULT-ivr-messageservice.xml"
[Server:ivr] 	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
[Server:ivr] 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
[Server:ivr] 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
[Server:ivr] 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_29]
[Server:ivr] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_29]
[Server:ivr] 	at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_29]
[Server:ivr] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageTransport' defined in URL [jar:file:/usr/java/jboss-as-7.1.0.Final/modules/com/tecnomen/ivr/system/ivr-message-service/main/ivr-message-service-2.0.0-6-SNAPSHOT.jar!/com/tecnomen/ivr/messaging/service/receiver/jms/applicationContext-message-service-jms.xml]: Cannot resolve reference to bean 'messageRouter' while setting bean property 'messageRouter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageRouter' defined in URL [jar:file:/usr/java/jboss-as-7.1.0.Final/modules/com/tecnomen/ivr/system/ivr-message-service/main/ivr-message-service-2.0.0-6-SNAPSHOT.jar!/com/tecnomen/ivr/messaging/service/receiver/jms/applicationContext-message-service-jms.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
[Server:ivr] PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'routing' threw exception; nested exception is java.lang.NoClassDefFoundError: groovy/lang/Script
[Server:ivr] 	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
[Server:ivr] 	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
[Server:ivr] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)
[Server:ivr] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
[Server:ivr] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
[Server:ivr] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
[Server:ivr] 	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
[Server:ivr] 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
[Server:ivr] 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
[Server:ivr] 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
[Server:ivr] 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
[Server:ivr] 	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
[Server:ivr] 	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
[Server:ivr] 	at com.tecnomen.ivr.messaging.service.receiver.jms.JmsForwardingMessageListener.initJMSTransport(JmsForwardingMessageListener.java:97)
[Server:ivr] 	at com.tecnomen.ivr.messaging.service.receiver.jms.JmsForwardingMessageListener.init(JmsForwardingMessageListener.java:55)
[Server:ivr] 	at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader.initConfigurable(XMLConfigurationReader.java:128)
[Server:ivr] 	at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader.access$1100(XMLConfigurationReader.java:42)
[Server:ivr] 	at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader$ReportChannelXMLConfiguration.parseListener(XMLConfigurationReader.java:768)
[Server:ivr] 	at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader$ReportChannelXMLConfiguration.parse(XMLConfigurationReader.java:751)
[Server:ivr] 	at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader$ReportChannelXMLConfiguration.<init>(XMLConfigurationReader.java:743)
[Server:ivr] 	at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader$MessageServiceXMLConfiguration.parseReportChannel(XMLConfigurationReader.java:370)
[Server:ivr] 	at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader$MessageServiceXMLConfiguration.parse(XMLConfigurationReader.java:329)
[Server:ivr] 	at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader$MessageServiceXMLConfiguration.<init>(XMLConfigurationReader.java:314)
[Server:ivr] 	at com.tecnomen.ivr.messaging.service.configuration.XMLConfigurationReader.parseConfiguration(XMLConfigurationReader.java:47)
[Server:ivr] 	at com.tecnomen.ivr.messaging.service.MessageServiceDeployer.deploy(MessageServiceDeployer.java:186)
[Server:ivr] 	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
[Server:ivr] 	... 5 more
[Server:ivr] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageRouter' defined in URL [jar:file:/usr/java/jboss-as-7.1.0.Final/modules/com/tecnomen/ivr/system/ivr-message-service/main/ivr-message-service-2.0.0-6-SNAPSHOT.jar!/com/tecnomen/ivr/messaging/service/receiver/jms/applicationContext-message-service-jms.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
[Server:ivr] PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'routing' threw exception; nested exception is java.lang.NoClassDefFoundError: groovy/lang/Script
[Server:ivr] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1396)
[Server:ivr] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
[Server:ivr] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
[Server:ivr] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
[Server:ivr] 	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
[Server:ivr] 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
[Server:ivr] 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
[Server:ivr] 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
[Server:ivr] 	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
[Server:ivr] 	... 30 more
[Server:ivr] Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
[Server:ivr] PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'routing' threw exception; nested exception is java.lang.NoClassDefFoundError: groovy/lang/Script
[Server:ivr] 	at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:102)
[Server:ivr] 	at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58)
[Server:ivr] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
[Server:ivr] 	... 38 more
[Server:ivr] 
[Server:ivr] 15:44:47,850 INFO  [org.jboss.as.server] (host-controller-connection-threads - 3) JBAS015870: Deploy of deployment "DEFAULT-ivr-messageservice.xml" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"DEFAULT-ivr-messageservice.xml\".DEPENDENCIES" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"DEFAULT-ivr-messageservice.xml\".DEPENDENCIES: Failed to process phase DEPENDENCIES of deployment \"DEFAULT-ivr-messageservice.xml\""}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list