Hi

Sorry but that class is still from Camel 2.0. What about you own code.
Did you compile it against 2.0?
Make sure you are only using Camel 1.5 .jars


On Fri, Jul 10, 2009 at 4:35 PM, chu_man_fu<[email protected]> wrote:
>
> The jars I have are those which are included in
> activemq-web-console-5.2.0.war:
>
> activeio-core-3.1.0.jar
> activemq-camel-5.2.0.jar
> activemq-console-5.2.0.jar
> activemq-core-5.2.0.jar
> activemq-pool-5.2.0.jar
> activemq-web-5.2.0.jar
> activemq-xmpp-5.2.0.jar
> aopalliance-1.0.jar
> backport-util-concurrent-2.1.jar
> camel-core-1.5.0.jar
> camel-jms-1.5.0.jar
> camel-spring-1.5.0.jar
> commons-logging-1.1.jar
> commons-logging-api-1.1.jar
> commons-pool-1.4.jar
> derby-10.1.3.1.jar
> geronimo-activation_1.1_spec-1.0.2.jar
> geronimo-j2ee-management_1.0_spec-1.0.jar
> geronimo-jacc_1.1_spec-1.0.1.jar
> geronimo-jms_1.1_spec-1.1.1.jar
> geronimo-jta_1.0.1B_spec-1.0.1.jar
> geronimo-jta_1.1_spec-1.1.1.jar
> geronimo-stax-api_1.0_spec-1.0.1.jar
> jaxb-api-2.0.jar
> jaxb-impl-2.0.3.jar
> jdom-1.0.jar
> log4j-1.2.14.jar
> rome-0.8.jar
> sitemesh-2.2.1.jar
> slf4j-api-1.5.0.jar
> slf4j-log4j12-1.5.0.jar
> smackx-1.5.0.jar
> spring-aop-2.5.5.jar
> spring-beans-2.5.5.jar
> spring-context-2.5.5.jar
> spring-context-support-2.5.5.jar
> spring-core-2.5.5.jar
> spring-jms-2.5.5.jar
> spring-tx-2.5.5.jar
> spring-web-2.5.5.jar
> spring-webmvc-2.5.5.jar
> wstx-asl-3.0.1.jar
> xbean-spring-3.4.jar
> xmlpull-1.1.3.4d_b4_min.jar
> xpp3_min-1.1.4c.jar
> xstream-1.3.jar
>
> If there is something with these jars how come the context which I include
> in the activemq.xml file work?
>
>
> Claus Ibsen-2 wrote:
>>
>> On Fri, Jul 10, 2009 at 3:58 PM, chu_man_fu<[email protected]> wrote:
>>>
>>> I have added my route builder to the classes directory but I now get this
>>> error:
>>>
>>>  ERROR [0]] Exception sending context initialized event to listener
>>> instance
>>> of class org.apache.activemq.web.WebConsoleStarter
>>> org.springframework.beans.factory.BeanCreationException: Error creating
>>> bean
>>> with name 'sessionPool' defined in ServletContext resource
>>> [/WEB-INF/webconsole-embedded.xml]: Cannot resolve reference to bean
>>> 'connectionFactory' while setting bean property 'connectionFactory';
>>> nested
>>> exception is org.springframework.beans.factory.BeanCreationException:
>>> Error
>>> creating bean with name 'connectionFactory' defined in ServletContext
>>> resource [/WEB-INF/webconsole-embedded.xml]: Cannot resolve reference to
>>> bean 'brokerURL' while setting constructor argument; nested exception is
>>> org.springframework.beans.factory.BeanCreationException: Error creating
>>> bean
>>> with name 'brokerService' defined in ServletContext resource
>>> [/WEB-INF/webconsole-embedded.xml]: Invocation of init method failed;
>>> nested
>>> exception is org.springframework.beans.factory.BeanCreationException:
>>> Error
>>> creating bean with name 'camel:beanPostProcessor': Cannot resolve
>>> reference
>>> to bean 'camel' while setting bean property 'camelContext'; nested
>>> exception
>>> is org.springframework.beans.factory.BeanCreationException: Error
>>> creating
>>> bean with name 'camel': Invocation of init method failed; nested
>>> exception
>>> is java.lang.NoSuchMethodError:
>>> my.package.name.MyRoute.from(Ljava/lang/String;)Lorg/apache/camel/model/RouteDefinition;
>> You must have mixed .jars. RouteDefinition is a Camel 2.0 name only.
>> Double check that you only use Camel 1.5.0 jars
>>
>>
>>>
>>> My code is:
>>>
>>> package my.package.name;
>>>
>>> import org.apache.camel.builder.RouteBuilder;
>>>
>>> public class MyRoute extends RouteBuilder
>>> {
>>>
>>>       �...@override
>>>    public void configure() throws Exception
>>>    {
>>>
>>>                from("activemq:queue.1").to("activemq:queue.2");
>>>    }
>>>
>>> }
>>>
>>> I have camel-core-1.5.0.jar and activemq-camel-5.2.0.jar in my WAR's lib
>>> folder.
>>> What am I missing?
>>>
>>>
>>> Claus Ibsen-2 wrote:
>>>>
>>>> On Fri, Jul 10, 2009 at 1:00 PM, chu_man_fu<[email protected]> wrote:
>>>>>
>>>>> I have routing configured via XML working with no problems.
>>>>> It's the <package> part I want to get working but I don't know where to
>>>>> put
>>>>> my classes/package.
>>>>
>>>> Do you deploy your application as a WAR file in JBoss? If so just put
>>>> your classes in WEB-INF/classes
>>>>
>>>>
>>>>
>>>>>
>>>>> I have looked at apache-camel-jboss-5-spring but I don't understand how
>>>>> to
>>>>> get it to work. Are there any examples of this on the net which I could
>>>>> learn from?
>>>>>
>>>>> I have just created a MBean which lets me stop and start a Camel
>>>>> context
>>>>> which connects to my ActiveMQ broker.
>>>>> What I want to achieve is being able to add routing on the fly without
>>>>> causing too much disruption.
>>>>>
>>>>
>>>> Yeah. Well you could just deploy routes as WAR files and do redloyments.
>>>> eg every route / application as a separate WAR file.
>>>>
>>>> In Camel 2.x the dynamic modification of routing will be improved.
>>>> There is a Camel web console that will be improved over time where you
>>>> can modify a route at runtime
>>>> http://camel.apache.org/web-console.html
>>>>
>>>> Currently there is a Google Summer of school project in which a person
>>>> is adding groovy editing capabilities to this editor.
>>>> Still work in progress.
>>>>
>>>> And the JMX side will be improved as well in 2.x. At first management
>>>> and monitoring though.
>>>>
>>>>
>>>>
>>>>>
>>>>> Claus Ibsen-2 wrote:
>>>>>>
>>>>>> Hi
>>>>>>
>>>>>> The package scan uses class loading and classloaders in J2EE servers
>>>>>> is "a nightmare".
>>>>>>
>>>>>> There have been some JBoss people creating a Camel plugin that allows
>>>>>> it to use JBoss specific classloading.
>>>>>> http://codeandtell.wordpress.com/2009/03/03/apache-camel-jboss-5-spring/
>>>>>>
>>>>>> So I guess its the problem.
>>>>>>
>>>>>> You cold try without the <package> and see if Camel can be loaded in
>>>>>> jboss and do a basic routing
>>>>>>
>>>>>> <route>
>>>>>>    <from uri="timer://foo?period=1000"/>
>>>>>>     <to uri="log:foo?level=WARN"/>
>>>>>> </route>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Jul 10, 2009 at 12:19 PM, chu_man_fu<[email protected]> wrote:
>>>>>>>
>>>>>>> I have Camel working great in ActiveMQ intergated into JBoss but only
>>>>>>> by
>>>>>>> modifying my activemq.xml file:
>>>>>>>
>>>>>>>   <camelContext id="camel"
>>>>>>> xmlns="http://activemq.apache.org/camel/schema/spring";>
>>>>>>>        <package>my.package.name</package>
>>>>>>>        <route>
>>>>>>>        <from uri="activemq:Q1"/>
>>>>>>>             <from uri="activemq:Q2"/>
>>>>>>>        </route>
>>>>>>>    </camelContext>
>>>>>>>    <bean id="activemq"
>>>>>>> class="org.apache.activemq.camel.component.ActiveMQComponent" >
>>>>>>>        <property name="connectionFactory">
>>>>>>>          <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>>>>>>>            <property name="brokerURL"
>>>>>>> value="vm://localhost?create=false&waitForStart=10000" />
>>>>>>>            <property name="userName" value="${activemq.username}"/>
>>>>>>>            <property name="password" value="${activemq.password}"/>
>>>>>>>          </bean>
>>>>>>>        </property>
>>>>>>>    </bean>
>>>>>>>
>>>>>>> How do I get camel to use package:
>>>>>>> <package>my.package.name</package>?
>>>>>>> I have created a package which that name but I don't know where to
>>>>>>> put
>>>>>>> it
>>>>>>> or
>>>>>>> how I tell camel to look at it. I am not sure where the camel context
>>>>>>> is
>>>>>>> started, I am guess via the ActiveMQComponent bean.
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://www.nabble.com/Camel-with-intergated-ActiveMQ-Web-Console-and-JBoss-tp24424870p24424870.html
>>>>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Claus Ibsen
>>>>>> Apache Camel Committer
>>>>>>
>>>>>> Open Source Integration: http://fusesource.com
>>>>>> Blog: http://davsclaus.blogspot.com/
>>>>>> Twitter: http://twitter.com/davsclaus
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Camel-with-intergated-ActiveMQ-Web-Console-and-JBoss-tp24424870p24425350.html
>>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Claus Ibsen
>>>> Apache Camel Committer
>>>>
>>>> Open Source Integration: http://fusesource.com
>>>> Blog: http://davsclaus.blogspot.com/
>>>> Twitter: http://twitter.com/davsclaus
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Camel-with-intergated-ActiveMQ-Web-Console-and-JBoss-tp24424870p24428158.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Camel-with-intergated-ActiveMQ-Web-Console-and-JBoss-tp24424870p24428339.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to