camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: PackageScan Activiti Spring
Date Tue, 30 Jul 2013 09:43:56 GMT
Hi

See
http://camel.apache.org/how-do-i-run-activemq-and-camel-in-jboss.html

You would still need it if you want to use the package scan functionality.
Though you can also just not use the package scan and have it work out
of the box in JBoss.

On Tue, Jul 30, 2013 at 11:36 AM, ses <hawm@gmx.de> wrote:
> I use Camel 2.11 out of Activiti 5.13 (activiti-rest.war) running on a Jboss
> 7.1.1. My Routes are defined using Java DSL and are in a package in a JAR
> file which is in the WEB-INF/lib of activiti-rest. The routes aren't found
> by the packageScan in my camelContext. I get the following stack trace:
>
> 09:25:09,954 TRACE [org.apache.camel.impl.DefaultPackageScanClassResolver]
> (MSC service thread 1-4) Getting resource URL for package: MyPackage with
> classloader: ModuleClassLoader for Module
> "deployment.activiti-rest.war:main" from Service Module Loader
> 09:25:09,955 TRACE [org.apache.camel.impl.DefaultPackageScanClassResolver]
> (MSC service thread 1-4) URL from classloader:
> vfs:/C:/jboss/standalone/deployments/activiti-rest.war/WEB-INF/lib/MyJAR.jar/MyPackage/
> 09:25:09,956 TRACE [org.apache.camel.impl.DefaultPackageScanClassResolver]
> (MSC service thread 1-4) Decoded urlPath:
> /C:/jboss/standalone/deployments/activiti-rest.war/WEB-INF/lib/MyJAR.jar/MyPackage/
> with protocol: vfs
> 09:25:09,957 TRACE [org.apache.camel.impl.DefaultPackageScanClassResolver]
> (MSC service thread 1-4) Scanning for classes in:
> /C:/jboss/standalone/deployments/activiti-rest.war/WEB-INF/lib/MyJAR.jar/MyPackage/
> matching criteria:
> org.apache.camel.impl.scan.CompositePackageScanFilter@2a834bb2
> 09:25:09,959 TRACE [org.apache.camel.impl.DefaultPackageScanClassResolver]
> (MSC service thread 1-4) Loading from jar using file:
> C:\jboss\standalone\deployments\activiti-rest.war\WEB-INF\lib\MyJAR.jar\MyPackage
> 09:25:09,960 DEBUG [org.apache.camel.impl.DefaultPackageScanClassResolver]
> (MSC service thread 1-4) Cannot read entries in url:
> vfs:/C:/jboss/standalone/deployments/activiti-rest.war/WEB-INF/lib/MyJAR.jar/MyPackage/:
> java.io.FileNotFoundException:
> C:\jboss\standalone\deployments\activiti-rest.war\WEB-INF\lib\MyJAR.jar\MyPackage
> (Das System kann den angegebenen Pfad nicht finden)
>         at java.io.FileInputStream.open(Native Method) [rt.jar:1.7.0_17]
>         at java.io.FileInputStream.<init>(FileInputStream.java:138)
> [rt.jar:1.7.0_17]
>         at
> org.apache.camel.impl.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:296)
> [camel-core-2.11.0.jar:2.11.0]
>         at
> org.apache.camel.impl.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:206)
> [camel-core-2.11.0.jar:2.11.0]
>         at
> org.apache.camel.impl.DefaultPackageScanClassResolver.findImplementations(DefaultPackageScanClassResolver.java:177)
> [camel-core-2.11.0.jar:2.11.0]
>         at
> org.apache.camel.spring.PackageScanRouteBuilderFinder.appendBuilders(PackageScanRouteBuilderFinder.java:59)
> [camel-spring-2.11.0.jar:2.11.0]
>         at
> org.apache.camel.spring.CamelContextFactoryBean.findRouteBuildersByPackageScan(CamelContextFactoryBean.java:204)
> [camel-spring-2.11.0.jar:2.11.0]
>         at
> org.apache.camel.core.xml.AbstractCamelContextFactoryBean.findRouteBuilders(AbstractCamelContextFactoryBean.java:692)
> [camel-spring-2.11.0.jar:2.11.0]
>         at
> org.apache.camel.core.xml.AbstractCamelContextFactoryBean.afterPropertiesSet(AbstractCamelContextFactoryBean.java:281)
> [camel-spring-2.11.0.jar:2.11.0]
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
> [MyJAR.jar:]
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
> [MyJAR.jar:]
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
> [MyJAR.jar:]
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
> [MyJAR.jar:]
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
> [MyJAR.jar:]
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
> [MyJAR.jar:]
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
> [MyJAR.jar:]
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
> [MyJAR.jar:]
>         at
> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1102)
> [MyJAR.jar:]
>         at
> org.apache.camel.spring.CamelBeanPostProcessor$1.getOrLookupCamelContext(CamelBeanPostProcessor.java:69)
> [camel-spring-2.11.0.jar:2.11.0]
>         at
> org.apache.camel.impl.DefaultCamelBeanPostProcessor.postProcessBeforeInitialization(DefaultCamelBeanPostProcessor.java:85)
> [camel-core-2.11.0.jar:2.11.0]
>         at
> org.apache.camel.spring.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:148)
> [camel-spring-2.11.0.jar:2.11.0]
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
> [MyJAR.jar:]
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1448)
> [MyJAR.jar:]
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
> [MyJAR.jar:]
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
> [MyJAR.jar:]
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
> [MyJAR.jar:]
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
> [MyJAR.jar:]
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
> [MyJAR.jar:]
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
> [MyJAR.jar:]
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:591)
> [MyJAR.jar:]
>         at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
> [MyJAR.jar:]
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469)
> [MyJAR.jar:]
>         at
> org.springframework.context.support.GenericXmlApplicationContext.<init>(GenericXmlApplicationContext.java:61)
> [MyJAR.jar:]
>         at
> org.activiti.spring.SpringConfigurationHelper.buildProcessEngine(SpringConfigurationHelper.java:38)
> [activiti-spring-5.13.jar:]
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [rt.jar:1.7.0_17]
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> [rt.jar:1.7.0_17]
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [rt.jar:1.7.0_17]
>         at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_17]
>         at
> org.activiti.engine.ProcessEngines.initProcessEngineFromSpringResource(ProcessEngines.java:122)
> [activiti-engine-5.13.jar:5.13]
>         at org.activiti.engine.ProcessEngines.init(ProcessEngines.java:109)
> [activiti-engine-5.13.jar:5.13]
>         at
> org.activiti.engine.ProcessEngines.getProcessEngine(ProcessEngines.java:224)
> [activiti-engine-5.13.jar:5.13]
>         at
> org.activiti.engine.ProcessEngines.getDefaultProcessEngine(ProcessEngines.java:217)
> [activiti-engine-5.13.jar:5.13]
>         at
> org.activiti.rest.servlet.ActivitiServletContextListener.contextInitialized(ActivitiServletContextListener.java:35)
> [activiti-common-rest-5.13.jar:]
>         at
> org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392)
> [jbossweb-7.0.13.Final.jar:]
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3850)
> [jbossweb-7.0.13.Final.jar:]
>         at
> org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)
> [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
>         at
> org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
>         at
> org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> [rt.jar:1.7.0_17]
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> [rt.jar:1.7.0_17]
>         at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/PackageScan-Activiti-Spring-tp5736475.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message