7 Replies Latest reply on Mar 31, 2010 4:01 AM by Lukas Vlcek

    Spring and Bsh

    Lukas Vlcek Newbie

      Hi,

       

      I have the following application: I need to create a Spring bean based on Bsh script. Spring requires specific version of BeanShell so I included this jar file into WEB-INF/lib and I need to configure the classloading in such a way that this jar gets priority before BeanShell provided by AS. I am not very familiar with classload icolation configuration in AS. I tried both the jboss-classloading.xml and jboss-web.xml and several modifications to these files but without success.

       

      Attached  sample application is not polished but it is small and it should be at least deployeble without the following exception:

       

      21:11:52,967 INFO  [TomcatDeployment] deploy, ctxPath=/scheduling-test-webapp
      21:11:53,046 INFO  [[/scheduling-test-webapp]] Initializing Spring root WebApplicationContext
      21:11:53,046 INFO  [ContextLoader] Root WebApplicationContext: initialization started
      21:11:53,083 INFO  [VFSXmlWebApplicationContext] Refreshing org.jboss.spring.vfs.context.VFSXmlWebApplicationContext@12ac86bb: display name [Root WebApplicationContext]; startup date [Mon Mar 22 21:11:53 CET 2010]; root of context hierarchy
      21:11:53,137 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
      21:11:53,230 INFO  [VFSXmlWebApplicationContext] Bean factory for application context [org.jboss.spring.vfs.context.VFSXmlWebApplicationContext@12ac86bb]: org.springframework.beans.factory.support.DefaultListableBeanFactory@3fa7e1a8
      21:11:53,313 INFO  [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3fa7e1a8: defining beans [simpleLogger,logDateJob,cronTrigger,org.springframework.scripting.config.scriptFactoryPostProcessor,bshLogger,logBshDateJob,cronBshTrigger,org.springframework.scheduling.quartz.SchedulerFactoryBean#0,timerLogger,scheduledTimerLogger,timerFactory,jbossTaskExecutor,initBean]; root of factory hierarchy
      21:11:53,376 INFO  [DefaultListableBeanFactory] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3fa7e1a8: defining beans [simpleLogger,logDateJob,cronTrigger,org.springframework.scripting.config.scriptFactoryPostProcessor,bshLogger,logBshDateJob,cronBshTrigger,org.springframework.scheduling.quartz.SchedulerFactoryBean#0,timerLogger,scheduledTimerLogger,timerFactory,jbossTaskExecutor,initBean]; root of factory hierarchy
      21:11:53,376 INFO  [DefaultListableBeanFactory] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@75536174: defining beans [scriptFactory.bshLogger,scriptedObject.bshLogger]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@3fa7e1a8
      21:11:53,377 ERROR [ContextLoader] Context initialization failed
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bshLogger': BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scriptedObject.bshLogger': Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.Object org.springframework.scripting.bsh.BshScriptFactory.getScriptedObject(org.springframework.scripting.ScriptSource,java.lang.Class[]) throws java.io.IOException,org.springframework.scripting.ScriptCompilationException] threw exception; nested exception is java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:405)
          at java.security.AccessController.doPrivileged(Native Method)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
          at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
          at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
          at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
          at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
          at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
          at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
          at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
          at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
          at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
          at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
          at $Proxy38.start(Unknown Source)
          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
          at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
          at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
          at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
          at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
          at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
          at org.jboss.system.ServiceController.start(ServiceController.java:460)
          at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
          at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          at java.lang.Thread.run(Thread.java:636)
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scriptedObject.bshLogger': Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.Object org.springframework.scripting.bsh.BshScriptFactory.getScriptedObject(org.springframework.scripting.ScriptSource,java.lang.Class[]) throws java.io.IOException,org.springframework.scripting.ScriptCompilationException] threw exception; nested exception is java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils
          at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:444)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:903)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:817)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
          at java.security.AccessController.doPrivileged(Native Method)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
          at org.springframework.scripting.support.ScriptFactoryPostProcessor.postProcessBeforeInstantiation(ScriptFactoryPostProcessor.java:314)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:791)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:762)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:399)
          ... 76 more
      Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.Object org.springframework.scripting.bsh.BshScriptFactory.getScriptedObject(org.springframework.scripting.ScriptSource,java.lang.Class[]) throws java.io.IOException,org.springframework.scripting.ScriptCompilationException] threw exception; nested exception is java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils
          at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:127)
          at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:435)
          ... 91 more
      Caused by: java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils
          at org.springframework.scripting.bsh.BshScriptUtils.evaluateBshScript(BshScriptUtils.java:159)
          at org.springframework.scripting.bsh.BshScriptFactory.getScriptedObject(BshScriptFactory.java:123)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:115)
          ... 92 more
      21:11:53,379 ERROR [[/scheduling-test-webapp]] 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 'bshLogger': BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scriptedObject.bshLogger': Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.Object org.springframework.scripting.bsh.BshScriptFactory.getScriptedObject(org.springframework.scripting.ScriptSource,java.lang.Class[]) throws java.io.IOException,org.springframework.scripting.ScriptCompilationException] threw exception; nested exception is java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:405)
          at java.security.AccessController.doPrivileged(Native Method)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
          at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
          at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
          at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
          at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
          at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
          at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
          at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
          at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
          at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
          at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
          at $Proxy38.start(Unknown Source)
          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
          at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
          at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
          at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
          at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
          at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
          at org.jboss.system.ServiceController.start(ServiceController.java:460)
          at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
          at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          at java.lang.Thread.run(Thread.java:636)
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scriptedObject.bshLogger': Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.Object org.springframework.scripting.bsh.BshScriptFactory.getScriptedObject(org.springframework.scripting.ScriptSource,java.lang.Class[]) throws java.io.IOException,org.springframework.scripting.ScriptCompilationException] threw exception; nested exception is java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils
          at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:444)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:903)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:817)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
          at java.security.AccessController.doPrivileged(Native Method)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
          at org.springframework.scripting.support.ScriptFactoryPostProcessor.postProcessBeforeInstantiation(ScriptFactoryPostProcessor.java:314)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:791)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:762)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:399)
          ... 76 more
      Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.Object org.springframework.scripting.bsh.BshScriptFactory.getScriptedObject(org.springframework.scripting.ScriptSource,java.lang.Class[]) throws java.io.IOException,org.springframework.scripting.ScriptCompilationException] threw exception; nested exception is java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils
          at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:127)
          at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:435)
          ... 91 more
      Caused by: java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils
          at org.springframework.scripting.bsh.BshScriptUtils.evaluateBshScript(BshScriptUtils.java:159)
          at org.springframework.scripting.bsh.BshScriptFactory.getScriptedObject(BshScriptFactory.java:123)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:115)
          ... 92 more
      21:11:53,380 ERROR [StandardContext] Error listenerStart
      21:11:53,380 ERROR [StandardContext] Context [/scheduling-test-webapp] startup failed due to previous errors
      21:11:53,380 INFO  [[/scheduling-test-webapp]] Closing Spring root WebApplicationContext
      21:11:53,382 ERROR [AbstractKernelController] Error installing to Start: name=jboss.web.deployment:war=/scheduling-test-webapp state=Create mode=Manual requiredState=Installed
      org.jboss.deployers.spi.DeploymentException: URL file:/home/lukas/applications/jboss-5.1.0.GA/server/default/tmp/3j001-7chq7k-g73ord2s-1-g73pq6yo-9r/scheduling-test-webapp.war/ deployment failed
          at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:331)
          at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
          at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
          at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
          at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
          at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
          at $Proxy38.start(Unknown Source)
          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
          at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
          at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
          at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
          at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
          at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
          at org.jboss.system.ServiceController.start(ServiceController.java:460)
          at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
          at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          at java.lang.Thread.run(Thread.java:636)
      21:11:53,387 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/home/lukas/applications/jboss-5.1.0.GA/server/default/deploy/scheduling-test-webapp.war/ state=PreReal mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: URL file:/home/lukas/applications/jboss-5.1.0.GA/server/default/tmp/3j001-7chq7k-g73ord2s-1-g73pq6yo-9r/scheduling-test-webapp.war/ deployment failed
          at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:331)
          at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
          at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
          at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
          at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
          at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
          at $Proxy38.start(Unknown Source)
          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
          at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
          at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
          at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
          at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
          at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
          at org.jboss.system.ServiceController.start(ServiceController.java:460)
          at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
          at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          at java.lang.Thread.run(Thread.java:636)
      21:11:53,395 WARN  [HDScanner] Failed to process changes
      org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

       

      *** DEPLOYMENTS IN ERROR: Name -> Error

       

      vfszip:/home/lukas/applications/jboss-5.1.0.GA/server/default/deploy/scheduling-test-webapp.war/ -> org.jboss.deployers.spi.DeploymentException: URL file:/home/lukas/applications/jboss-5.1.0.GA/server/default/tmp/3j001-7chq7k-g73ord2s-1-g73pq6yo-9r/scheduling-test-webapp.war/ deployment failed

       


      DEPLOYMENTS IN ERROR:
        Deployment "vfszip:/home/lukas/applications/jboss-5.1.0.GA/server/default/deploy/scheduling-test-webapp.war/" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: URL file:/home/lukas/applications/jboss-5.1.0.GA/server/default/tmp/3j001-7chq7k-g73ord2s-1-g73pq6yo-9r/scheduling-test-webapp.war/ deployment failed

       

          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          at java.lang.Thread.run(Thread.java:636)

        • 1. Re: Spring and Bsh
          Lukas Vlcek Newbie

          The following is probably the most important line in the exception thread:

          Caused by: java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils

           

          Also I am not saying that files jboss-classloading.xml and/or jboss-web.xml are correct.

          • 2. Re: Spring and Bsh
            Ales Justin Master

            How do you know this is a CL issue?

             

            Is this .bsh valid?

            foo() {
                void logCurrentDate()
                {
                    System.out.println("Date");
                }
                return this;
            }

             

            Can you dig more into this:

            * http://grepcode.com/file/repo1.maven.org/maven2/org.springframework/spring/2.5.4/org/springframework/scripting/bsh/BshScriptUtils.java#BshScriptUtils.evaluateBshScript%28java.lang.String,java.lang.Class[],java.lang.ClassLoader%29

            • 3. Re: Spring and Bsh
              Lukas Vlcek Newbie

              Ales,

               

              you were right the .bsh script was not valid. More specifically it was not valid as an implementation of interface stated in the spring configuration (other that this it would be probably possible to compile this script without issues... but that is OT now). The problem is that even after fixing this script I am still getting an exception.

               

              Attached are two sample applications. One it for tomcat, it works, I tested it on 6.0.18. The other is meant for jboss as 5.1.0.GA. These two new sample applications differ only in web.xml (added jboss context class implementation) and pom.xml (scoped some dependencies as provided). This time no jboss-web or jboss-classloading xml files are provided. Both applications are simplified versions of the original sample application. I believe now the application and bsh is "valid" from the syntactical point of view (runs on tomcat) thus the configuration is probably the only remaining issue.

               

              I am getting the following exception during jboss deployment. The *main theme* seems to remain

              java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils

               

              Here is the full stacktrace:

               

              12:13:37,046 INFO  [TomcatDeployment] deploy, ctxPath=/my-webapp

              12:13:37,094 INFO  [[/my-webapp]] Initializing Spring root WebApplicationContext

              12:13:37,094 INFO  [ContextLoader] Root WebApplicationContext: initialization started

              12:13:37,128 INFO  [VFSXmlWebApplicationContext] Refreshing org.jboss.spring.vfs.context.VFSXmlWebApplicationContext@30479402: display name [Root WebApplicationContext]; startup date [Tue Mar 23 12:13:37 CET 2010]; root of context hierarchy

              12:13:37,181 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]

              12:13:37,284 INFO  [VFSXmlWebApplicationContext] Bean factory for application context [org.jboss.spring.vfs.context.VFSXmlWebApplicationContext@30479402]: org.springframework.beans.factory.support.DefaultListableBeanFactory@3bbe4d52

              12:13:37,399 INFO  [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3bbe4d52: defining beans [org.springframework.scripting.config.scriptFactoryPostProcessor,bshLogger,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,initBean]; root of factory hierarchy

              12:13:37,403 INFO  [DefaultListableBeanFactory] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3bbe4d52: defining beans [org.springframework.scripting.config.scriptFactoryPostProcessor,bshLogger,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,initBean]; root of factory hierarchy

              12:13:37,416 INFO  [DefaultListableBeanFactory] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@63f8b70e: defining beans [scriptFactory.bshLogger,scriptedObject.bshLogger]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@3bbe4d52

              12:13:37,416 ERROR [ContextLoader] Context initialization failed

              org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bshLogger': BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scriptedObject.bshLogger': Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.Object org.springframework.scripting.bsh.BshScriptFactory.getScriptedObject(org.springframework.scripting.ScriptSource,java.lang.Class[]) throws java.io.IOException,org.springframework.scripting.ScriptCompilationException] threw exception; nested exception is java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:405)

                  at java.security.AccessController.doPrivileged(Native Method)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

                  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

                  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

                  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

                  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)

                  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)

                  at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)

                  at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)

                  at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)

                  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)

                  at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)

                  at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)

                  at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)

                  at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)

                  at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)

                  at org.jboss.web.deployers.WebModule.start(WebModule.java:97)

                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                  at java.lang.reflect.Method.invoke(Method.java:616)

                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

                  at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)

                  at $Proxy38.start(Unknown Source)

                  at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

                  at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

                  at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

                  at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

                  at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

                  at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                  at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

                  at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                  at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

                  at org.jboss.system.ServiceController.doChange(ServiceController.java:688)

                  at org.jboss.system.ServiceController.start(ServiceController.java:460)

                  at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

                  at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

                  at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

                  at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

                  at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

                  at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

                  at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                  at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                  at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

                  at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

                  at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

                  at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)

                  at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)

                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

                  at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)

                  at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)

                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

                  at java.lang.Thread.run(Thread.java:636)

              Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scriptedObject.bshLogger': Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.Object org.springframework.scripting.bsh.BshScriptFactory.getScriptedObject(org.springframework.scripting.ScriptSource,java.lang.Class[]) throws java.io.IOException,org.springframework.scripting.ScriptCompilationException] threw exception; nested exception is java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils

                  at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:444)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:903)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:817)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

                  at java.security.AccessController.doPrivileged(Native Method)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

                  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

                  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

                  at org.springframework.scripting.support.ScriptFactoryPostProcessor.postProcessBeforeInstantiation(ScriptFactoryPostProcessor.java:314)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:791)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:762)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:399)

                  ... 76 more

              Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.Object org.springframework.scripting.bsh.BshScriptFactory.getScriptedObject(org.springframework.scripting.ScriptSource,java.lang.Class[]) throws java.io.IOException,org.springframework.scripting.ScriptCompilationException] threw exception; nested exception is java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils

                  at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:127)

                  at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:435)

                  ... 91 more

              Caused by: java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils

                  at org.springframework.scripting.bsh.BshScriptUtils.evaluateBshScript(BshScriptUtils.java:159)

                  at org.springframework.scripting.bsh.BshScriptFactory.getScriptedObject(BshScriptFactory.java:123)

                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                  at java.lang.reflect.Method.invoke(Method.java:616)

                  at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:115)

                  ... 92 more

              12:13:37,418 ERROR [[/my-webapp]] 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 'bshLogger': BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scriptedObject.bshLogger': Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.Object org.springframework.scripting.bsh.BshScriptFactory.getScriptedObject(org.springframework.scripting.ScriptSource,java.lang.Class[]) throws java.io.IOException,org.springframework.scripting.ScriptCompilationException] threw exception; nested exception is java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:405)

                  at java.security.AccessController.doPrivileged(Native Method)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

                  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

                  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

                  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

                  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)

                  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)

                  at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)

                  at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)

                  at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)

                  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)

                  at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)

                  at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)

                  at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)

                  at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)

                  at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)

                  at org.jboss.web.deployers.WebModule.start(WebModule.java:97)

                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                  at java.lang.reflect.Method.invoke(Method.java:616)

                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

                  at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)

                  at $Proxy38.start(Unknown Source)

                  at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

                  at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

                  at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

                  at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

                  at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

                  at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                  at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

                  at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                  at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

                  at org.jboss.system.ServiceController.doChange(ServiceController.java:688)

                  at org.jboss.system.ServiceController.start(ServiceController.java:460)

                  at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

                  at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

                  at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

                  at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

                  at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

                  at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

                  at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                  at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                  at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

                  at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

                  at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

                  at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)

                  at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)

                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

                  at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)

                  at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)

                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

                  at java.lang.Thread.run(Thread.java:636)

              Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scriptedObject.bshLogger': Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.Object org.springframework.scripting.bsh.BshScriptFactory.getScriptedObject(org.springframework.scripting.ScriptSource,java.lang.Class[]) throws java.io.IOException,org.springframework.scripting.ScriptCompilationException] threw exception; nested exception is java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils

                  at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:444)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:903)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:817)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

                  at java.security.AccessController.doPrivileged(Native Method)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

                  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

                  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

                  at org.springframework.scripting.support.ScriptFactoryPostProcessor.postProcessBeforeInstantiation(ScriptFactoryPostProcessor.java:314)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:791)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:762)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:399)

                  ... 76 more

              Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.Object org.springframework.scripting.bsh.BshScriptFactory.getScriptedObject(org.springframework.scripting.ScriptSource,java.lang.Class[]) throws java.io.IOException,org.springframework.scripting.ScriptCompilationException] threw exception; nested exception is java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils

                  at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:127)

                  at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:435)

                  ... 91 more

              Caused by: java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils

                  at org.springframework.scripting.bsh.BshScriptUtils.evaluateBshScript(BshScriptUtils.java:159)

                  at org.springframework.scripting.bsh.BshScriptFactory.getScriptedObject(BshScriptFactory.java:123)

                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                  at java.lang.reflect.Method.invoke(Method.java:616)

                  at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:115)

                  ... 92 more

              12:13:37,419 ERROR [StandardContext] Error listenerStart

              12:13:37,419 ERROR [StandardContext] Context [/my-webapp] startup failed due to previous errors

              12:13:37,419 INFO  [[/my-webapp]] Closing Spring root WebApplicationContext

              12:13:37,428 ERROR [AbstractKernelController] Error installing to Start: name=jboss.web.deployment:war=/my-webapp state=Create mode=Manual requiredState=Installed

              org.jboss.deployers.spi.DeploymentException: URL file:/home/lukas/applications/jboss-5.1.0.GA/server/default/tmp/3j001-8k7lkj-g74lsm1f-1-g74lxtz7-9r/my-webapp.war/ deployment failed

                  at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:331)

                  at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)

                  at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)

                  at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)

                  at org.jboss.web.deployers.WebModule.start(WebModule.java:97)

                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                  at java.lang.reflect.Method.invoke(Method.java:616)

                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

                  at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)

                  at $Proxy38.start(Unknown Source)

                  at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

                  at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

                  at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

                  at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

                  at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

                  at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                  at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

                  at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                  at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

                  at org.jboss.system.ServiceController.doChange(ServiceController.java:688)

                  at org.jboss.system.ServiceController.start(ServiceController.java:460)

                  at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

                  at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

                  at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

                  at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

                  at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

                  at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

                  at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                  at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                  at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

                  at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

                  at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

                  at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)

                  at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)

                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

                  at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)

                  at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)

                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

                  at java.lang.Thread.run(Thread.java:636)

              12:13:37,458 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/home/lukas/applications/jboss-5.1.0.GA/server/default/deploy/my-webapp.war/ state=PreReal mode=Manual requiredState=Real

              org.jboss.deployers.spi.DeploymentException: URL file:/home/lukas/applications/jboss-5.1.0.GA/server/default/tmp/3j001-8k7lkj-g74lsm1f-1-g74lxtz7-9r/my-webapp.war/ deployment failed

                  at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:331)

                  at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)

                  at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)

                  at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)

                  at org.jboss.web.deployers.WebModule.start(WebModule.java:97)

                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                  at java.lang.reflect.Method.invoke(Method.java:616)

                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

                  at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)

                  at $Proxy38.start(Unknown Source)

                  at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

                  at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

                  at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

                  at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

                  at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

                  at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                  at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

                  at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                  at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

                  at org.jboss.system.ServiceController.doChange(ServiceController.java:688)

                  at org.jboss.system.ServiceController.start(ServiceController.java:460)

                  at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

                  at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

                  at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

                  at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

                  at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

                  at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

                  at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                  at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                  at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

                  at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

                  at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

                  at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)

                  at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)

                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

                  at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)

                  at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)

                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

                  at java.lang.Thread.run(Thread.java:636)

              12:13:37,462 WARN  [HDScanner] Failed to process changes

              org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

               

              *** DEPLOYMENTS IN ERROR: Name -> Error

               

              vfszip:/home/lukas/applications/jboss-5.1.0.GA/server/default/deploy/my-webapp.war/ -> org.jboss.deployers.spi.DeploymentException: URL file:/home/lukas/applications/jboss-5.1.0.GA/server/default/tmp/3j001-8k7lkj-g74lsm1f-1-g74lxtz7-9r/my-webapp.war/ deployment failed

               

               

              DEPLOYMENTS IN ERROR:

               

                Deployment "vfszip:/home/lukas/applications/jboss-5.1.0.GA/server/default/deploy/my-webapp.war/" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: URL file:/home/lukas/applications/jboss-5.1.0.GA/server/default/tmp/3j001-8k7lkj-g74lsm1f-1-g74lxtz7-9r/my-webapp.war/ deployment failed

               

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)

                  at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)

                  at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)

                  at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)

                  at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)

                  at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)

                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

                  at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)

                  at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)

                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

                  at java.lang.Thread.run(Thread.java:636)

              • 4. Re: Spring and Bsh
                Ales Justin Master
                I am getting the following exception during jboss deployment. The *main theme* seems to remain

                java.lang.IllegalAccessError: tried to access class bsh.XThis from class org.springframework.scripting.bsh.BshScriptUtils

                We/you need to dig deeper into this exception, as this doesn't tell us anything.

                I tried googling for it, w/o success. Can it be debugged?

                • 5. Re: Spring and Bsh
                  Slawomir Sawa Newbie

                  Hi,

                   

                  I had similar exception in my standalone application. It was caused by wrong version of bsh jar, when I switched to bsh-2.0b4.jar it started to work correctly. Which version of bsh.jar do you use?

                  • 6. Re: Spring and Bsh
                    Lukas Vlcek Newbie

                    Attached is fixed version of the application. The problem was in maven dependencies:

                     

                    1) missing snowdrop-vfs

                    2) spring is required (can not be provided)

                     

                    Now it works.

                    • 7. Re: Spring and Bsh
                      Lukas Vlcek Newbie

                      Slawomir, there is correct version of bsh required in pom.xml the problem was in other dependencies, see my other post to in this thread. Now it is fixed.