Quantcast

[servicemix-user] ServiceMix 2.0-SNAPSHOT

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[servicemix-user] ServiceMix 2.0-SNAPSHOT

Guillaume Nodet-3
Hi All !

A snapshot of ServiceMix 2.0 has been deployed at
http://dist.codehaus.org/servicemix/jars/servicemix-2.0-SNAPSHOT.jar
It includes a number of bug fixes, especially on cluster flow (for
Craig) and sendSync on pub/sub (for George).

To use it on a 1.x distribution, you will need to put the jar at the
place of the old one (do not forget to remove the old one from the
classpath).
It works the same way, and you can access the compatibility mode in the
following way :
    ..\..\bin\servicemix -v1 servicemix.xml

You will certainly encouter a number of ClassNotFoundException. You will
need to add the following jars to the classpath:
    http://dist.codehaus.org/xbean/jars/xbean-spring-2.0-SNAPSHOT.jar
    http://www.ibiblio.org/maven/springframework/jars/spring-1.2.5.jar
   
http://www.ibiblio.org/maven/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar

Do not forget to remove the old spring jar from the classpath too.

Enjoy !

Cheers,
Guillaume Nodet

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] ServiceMix 2.0-SNAPSHOT

Craig Walls

Excellent. I'll give this a shot later today or tomorrow. I gave 2.0 a
spin the other day, but was met with less-than-success, so I went back
to 1.1. This time I'll follow your specific instructions with regard to
what's required in the classpath and see if it helps.

What's important for me is this: I want my stuff to be clustered--to me
it doesn't make much sense for all of my services to be contained in a
single container. That said, I need for the content to be sent between
the containers. I *could* send content in the properties of the message
(actually, that's what I'm doing as a workaround right now), but then I
lose the ability to use things like the XSLT component for content-based
routing.

In short, content not being sent across containers is a *HUGE* bug.
Show-stopper. Hopefully this 2.0 snapshot will fix everything for me.

One more thing...I see in JIRA that 2.0 is scheduled for a November 7th
release. How on target are you for that? No rush...just curious.



Guillaume Nodet wrote:

> Hi All !
>
> A snapshot of ServiceMix 2.0 has been deployed at
> http://dist.codehaus.org/servicemix/jars/servicemix-2.0-SNAPSHOT.jar
> It includes a number of bug fixes, especially on cluster flow (for
> Craig) and sendSync on pub/sub (for George).
>
> To use it on a 1.x distribution, you will need to put the jar at the
> place of the old one (do not forget to remove the old one from the
> classpath).
> It works the same way, and you can access the compatibility mode in
> the following way :
>    ..\..\bin\servicemix -v1 servicemix.xml
>
> You will certainly encouter a number of ClassNotFoundException. You
> will need to add the following jars to the classpath:
>    http://dist.codehaus.org/xbean/jars/xbean-spring-2.0-SNAPSHOT.jar
>    http://www.ibiblio.org/maven/springframework/jars/spring-1.2.5.jar
>    
> http://www.ibiblio.org/maven/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar 
>
>
> Do not forget to remove the old spring jar from the classpath too.
>
> Enjoy !
>
> Cheers,
> Guillaume Nodet
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[servicemix-user] servicemix install - problems - help appreciated

Ranga Nathan
In reply to this post by Guillaume Nodet-3
I had problems installin servicemix but tried this 2.0 snapshot. I was
able to install. But when I run servicemix, I get the following errors:
Loading ServiceMix from servicemix.xml on the CLASSPATH
Exception in thread "main" java.lang.NoClassDefFoundError
        at
org.xbean.spring.context.impl.PropertyEditorHelper.class$(PropertyEditorHelper.java:33)
        at
org.xbean.spring.context.impl.PropertyEditorHelper.registerCustomEditors(PropertyEditorHelper.java:34)
        at
org.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.<clinit>(XBeanXmlBeanDefinitionParser.java:74)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:141)
        at
org.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader.class$(XBeanXmlBeanDefinitionReader.java:58)
        at
org.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader.<init>(XBeanXmlBeanDefinitionReader.java:58)
        at
org.xbean.spring.context.ClassPathXmlApplicationContext.loadBeanDefinitions(ClassPathXmlApplicationContext.java:166)
        at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:268)
        at
org.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:158)
        at
org.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:48)
        at org.servicemix.Main.main(Main.java:44)
Caused by: java.lang.ClassNotFoundException: javax.management.ObjectName
        at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:141)
        ... 13 more

The CLASS_PATH is set to the servicemix lib directory (/opt/servicemix/lib)
ilt2:/opt/servicemix/bin # ls -lat $CLASS_PATH
total 7438
drwxr-xr-x  12 root root     416 2005-10-30 09:50 ..
drwxr-xr-x   3 root root     888 2005-10-30 08:49 .
drwxr-xr-x   2 root root     256 2005-10-30 08:49 optional
-rw-r--r--   1 root root 3444780 2005-10-27 01:01 activemq-3.2.jar
-rw-r--r--   1 root root   73568 2005-10-27 01:01 activemq-ra-3.2.jar
-rw-r--r--   1 root root  188671 2005-10-27 01:01
commons-beanutils-1.7.0.jar
-rw-r--r--   1 root root  559366 2005-10-27 01:01
commons-collections-3.1.jar
-rw-r--r--   1 root root   38015 2005-10-27 01:01 commons-logging-1.0.4.jar
-rw-r--r--   1 root root   42492 2005-10-27 01:01 commons-pool-1.2.jar
-rw-r--r--   1 root root  189284 2005-10-27 01:01 concurrent-1.3.4.jar
-rw-r--r--   1 root root   31514 2005-10-27 01:01
geronimo-spec-activation-1.0.2-rc4.jar
-rw-r--r--   1 root root   35858 2005-10-27 01:01
geronimo-spec-j2ee-connector-1.5-rc4.jar
-rw-r--r--   1 root root   18174 2005-10-27 01:01
geronimo-spec-j2ee-management-1.0-rc4.jar
-rw-r--r--   1 root root   30838 2005-10-27 01:01
geronimo-spec-jms-1.1-rc4.jar
-rw-r--r--   1 root root   13468 2005-10-27 01:01
geronimo-spec-jta-1.0.1B-rc4.jar
-rw-r--r--   1 root root  460330 2005-10-27 01:01 jencks-all-1.1.jar
-rw-r--r--   1 root root  387915 2005-10-27 01:01
servicemix-core-2.0-SNAPSHOT.jar
-rw-r--r--   1 root root   14943 2005-10-27 01:01
servicemix-jbi-2.0-SNAPSHOT.jar
-rw-r--r--   1 root root 1871868 2005-10-27 01:01 spring-1.2.5.jar
-rw-r--r--   1 root root  126771 2005-10-27 01:01 wsdl4j-1.5.1.jar
-rw-r--r--   1 root root   48380 2005-10-27 01:01
xbean-spring-2.0-SNAPSHOT.jar

ilt2:/opt/servicemix/bin # echo $JAVA_HOME
/usr/lib/java/jsdk


Guillaume Nodet wrote:

> Hi All !
>
> A snapshot of ServiceMix 2.0 has been deployed at
> http://dist.codehaus.org/servicemix/jars/servicemix-2.0-SNAPSHOT.jar
> It includes a number of bug fixes, especially on cluster flow (for
> Craig) and sendSync on pub/sub (for George).
>
> To use it on a 1.x distribution, you will need to put the jar at the
> place of the old one (do not forget to remove the old one from the
> classpath).
> It works the same way, and you can access the compatibility mode in
> the following way :
>    ..\..\bin\servicemix -v1 servicemix.xml
>
> You will certainly encouter a number of ClassNotFoundException. You
> will need to add the following jars to the classpath:
>    http://dist.codehaus.org/xbean/jars/xbean-spring-2.0-SNAPSHOT.jar
>    http://www.ibiblio.org/maven/springframework/jars/spring-1.2.5.jar
>    
> http://www.ibiblio.org/maven/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar 
>
>
> Do not forget to remove the old spring jar from the classpath too.
>
> Enjoy !
>
> Cheers,
> Guillaume Nodet
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] servicemix install - problems - help appreciated

Guillaume Nodet-3
You should add the libraries in the optional dirs, especially the
mx4j-xxx jars
which are needed if you do not run under a j2se 5.

Cheers,
Guillaume Nodet

Ranga Nathan wrote:

> I had problems installin servicemix but tried this 2.0 snapshot. I was
> able to install. But when I run servicemix, I get the following errors:
> Loading ServiceMix from servicemix.xml on the CLASSPATH
> Exception in thread "main" java.lang.NoClassDefFoundError
>        at
> org.xbean.spring.context.impl.PropertyEditorHelper.class$(PropertyEditorHelper.java:33)
>
>        at
> org.xbean.spring.context.impl.PropertyEditorHelper.registerCustomEditors(PropertyEditorHelper.java:34)
>
>        at
> org.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.<clinit>(XBeanXmlBeanDefinitionParser.java:74)
>
>        at java.lang.Class.forName0(Native Method)
>        at java.lang.Class.forName(Class.java:141)
>        at
> org.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader.class$(XBeanXmlBeanDefinitionReader.java:58)
>
>        at
> org.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader.<init>(XBeanXmlBeanDefinitionReader.java:58)
>
>        at
> org.xbean.spring.context.ClassPathXmlApplicationContext.loadBeanDefinitions(ClassPathXmlApplicationContext.java:166)
>
>        at
> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
>
>        at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:268)
>
>        at
> org.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:158)
>
>        at
> org.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:48)
>
>        at org.servicemix.Main.main(Main.java:44)
> Caused by: java.lang.ClassNotFoundException: javax.management.ObjectName
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
>        at java.lang.Class.forName0(Native Method)
>        at java.lang.Class.forName(Class.java:141)
>        ... 13 more
>
> The CLASS_PATH is set to the servicemix lib directory
> (/opt/servicemix/lib)
> ilt2:/opt/servicemix/bin # ls -lat $CLASS_PATH
> total 7438
> drwxr-xr-x  12 root root     416 2005-10-30 09:50 ..
> drwxr-xr-x   3 root root     888 2005-10-30 08:49 .
> drwxr-xr-x   2 root root     256 2005-10-30 08:49 optional
> -rw-r--r--   1 root root 3444780 2005-10-27 01:01 activemq-3.2.jar
> -rw-r--r--   1 root root   73568 2005-10-27 01:01 activemq-ra-3.2.jar
> -rw-r--r--   1 root root  188671 2005-10-27 01:01
> commons-beanutils-1.7.0.jar
> -rw-r--r--   1 root root  559366 2005-10-27 01:01
> commons-collections-3.1.jar
> -rw-r--r--   1 root root   38015 2005-10-27 01:01
> commons-logging-1.0.4.jar
> -rw-r--r--   1 root root   42492 2005-10-27 01:01 commons-pool-1.2.jar
> -rw-r--r--   1 root root  189284 2005-10-27 01:01 concurrent-1.3.4.jar
> -rw-r--r--   1 root root   31514 2005-10-27 01:01
> geronimo-spec-activation-1.0.2-rc4.jar
> -rw-r--r--   1 root root   35858 2005-10-27 01:01
> geronimo-spec-j2ee-connector-1.5-rc4.jar
> -rw-r--r--   1 root root   18174 2005-10-27 01:01
> geronimo-spec-j2ee-management-1.0-rc4.jar
> -rw-r--r--   1 root root   30838 2005-10-27 01:01
> geronimo-spec-jms-1.1-rc4.jar
> -rw-r--r--   1 root root   13468 2005-10-27 01:01
> geronimo-spec-jta-1.0.1B-rc4.jar
> -rw-r--r--   1 root root  460330 2005-10-27 01:01 jencks-all-1.1.jar
> -rw-r--r--   1 root root  387915 2005-10-27 01:01
> servicemix-core-2.0-SNAPSHOT.jar
> -rw-r--r--   1 root root   14943 2005-10-27 01:01
> servicemix-jbi-2.0-SNAPSHOT.jar
> -rw-r--r--   1 root root 1871868 2005-10-27 01:01 spring-1.2.5.jar
> -rw-r--r--   1 root root  126771 2005-10-27 01:01 wsdl4j-1.5.1.jar
> -rw-r--r--   1 root root   48380 2005-10-27 01:01
> xbean-spring-2.0-SNAPSHOT.jar
>
> ilt2:/opt/servicemix/bin # echo $JAVA_HOME
> /usr/lib/java/jsdk
>
>
> Guillaume Nodet wrote:
>
>> Hi All !
>>
>> A snapshot of ServiceMix 2.0 has been deployed at
>> http://dist.codehaus.org/servicemix/jars/servicemix-2.0-SNAPSHOT.jar
>> It includes a number of bug fixes, especially on cluster flow (for
>> Craig) and sendSync on pub/sub (for George).
>>
>> To use it on a 1.x distribution, you will need to put the jar at the
>> place of the old one (do not forget to remove the old one from the
>> classpath).
>> It works the same way, and you can access the compatibility mode in
>> the following way :
>>    ..\..\bin\servicemix -v1 servicemix.xml
>>
>> You will certainly encouter a number of ClassNotFoundException. You
>> will need to add the following jars to the classpath:
>>    http://dist.codehaus.org/xbean/jars/xbean-spring-2.0-SNAPSHOT.jar
>>    http://www.ibiblio.org/maven/springframework/jars/spring-1.2.5.jar
>>    
>> http://www.ibiblio.org/maven/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar 
>>
>>
>> Do not forget to remove the old spring jar from the classpath too.
>>
>> Enjoy !
>>
>> Cheers,
>> Guillaume Nodet
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] servicemix install - problems - help appreciated

Ranga Nathan


Guillaume Nodet wrote:

> You should add the libraries in the optional dirs, especially the
> mx4j-xxx jars
> which are needed if you do not run under a j2se 5.

I am sorry, I do not get this. I feel stupid. Could you break it down
for me? My java is not strong enough to understand this.
Thanks
Ranga Nathan

>
> Cheers,
> Guillaume Nodet
>
> Ranga Nathan wrote:
>
>> I had problems installin servicemix but tried this 2.0 snapshot. I
>> was able to install. But when I run servicemix, I get the following
>> errors:
>> Loading ServiceMix from servicemix.xml on the CLASSPATH
>> Exception in thread "main" java.lang.NoClassDefFoundError
>>        at
>> org.xbean.spring.context.impl.PropertyEditorHelper.class$(PropertyEditorHelper.java:33)
>>
>>        at
>> org.xbean.spring.context.impl.PropertyEditorHelper.registerCustomEditors(PropertyEditorHelper.java:34)
>>
>>        at
>> org.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.<clinit>(XBeanXmlBeanDefinitionParser.java:74)
>>
>>        at java.lang.Class.forName0(Native Method)
>>        at java.lang.Class.forName(Class.java:141)
>>        at
>> org.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader.class$(XBeanXmlBeanDefinitionReader.java:58)
>>
>>        at
>> org.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader.<init>(XBeanXmlBeanDefinitionReader.java:58)
>>
>>        at
>> org.xbean.spring.context.ClassPathXmlApplicationContext.loadBeanDefinitions(ClassPathXmlApplicationContext.java:166)
>>
>>        at
>> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
>>
>>        at
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:268)
>>
>>        at
>> org.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:158)
>>
>>        at
>> org.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:48)
>>
>>        at org.servicemix.Main.main(Main.java:44)
>> Caused by: java.lang.ClassNotFoundException: javax.management.ObjectName
>>        at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
>>        at java.security.AccessController.doPrivileged(Native Method)
>>        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
>>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
>>        at java.lang.Class.forName0(Native Method)
>>        at java.lang.Class.forName(Class.java:141)
>>        ... 13 more
>>
>> The CLASS_PATH is set to the servicemix lib directory
>> (/opt/servicemix/lib)
>> ilt2:/opt/servicemix/bin # ls -lat $CLASS_PATH
>> total 7438
>> drwxr-xr-x  12 root root     416 2005-10-30 09:50 ..
>> drwxr-xr-x   3 root root     888 2005-10-30 08:49 .
>> drwxr-xr-x   2 root root     256 2005-10-30 08:49 optional
>> -rw-r--r--   1 root root 3444780 2005-10-27 01:01 activemq-3.2.jar
>> -rw-r--r--   1 root root   73568 2005-10-27 01:01 activemq-ra-3.2.jar
>> -rw-r--r--   1 root root  188671 2005-10-27 01:01
>> commons-beanutils-1.7.0.jar
>> -rw-r--r--   1 root root  559366 2005-10-27 01:01
>> commons-collections-3.1.jar
>> -rw-r--r--   1 root root   38015 2005-10-27 01:01
>> commons-logging-1.0.4.jar
>> -rw-r--r--   1 root root   42492 2005-10-27 01:01 commons-pool-1.2.jar
>> -rw-r--r--   1 root root  189284 2005-10-27 01:01 concurrent-1.3.4.jar
>> -rw-r--r--   1 root root   31514 2005-10-27 01:01
>> geronimo-spec-activation-1.0.2-rc4.jar
>> -rw-r--r--   1 root root   35858 2005-10-27 01:01
>> geronimo-spec-j2ee-connector-1.5-rc4.jar
>> -rw-r--r--   1 root root   18174 2005-10-27 01:01
>> geronimo-spec-j2ee-management-1.0-rc4.jar
>> -rw-r--r--   1 root root   30838 2005-10-27 01:01
>> geronimo-spec-jms-1.1-rc4.jar
>> -rw-r--r--   1 root root   13468 2005-10-27 01:01
>> geronimo-spec-jta-1.0.1B-rc4.jar
>> -rw-r--r--   1 root root  460330 2005-10-27 01:01 jencks-all-1.1.jar
>> -rw-r--r--   1 root root  387915 2005-10-27 01:01
>> servicemix-core-2.0-SNAPSHOT.jar
>> -rw-r--r--   1 root root   14943 2005-10-27 01:01
>> servicemix-jbi-2.0-SNAPSHOT.jar
>> -rw-r--r--   1 root root 1871868 2005-10-27 01:01 spring-1.2.5.jar
>> -rw-r--r--   1 root root  126771 2005-10-27 01:01 wsdl4j-1.5.1.jar
>> -rw-r--r--   1 root root   48380 2005-10-27 01:01
>> xbean-spring-2.0-SNAPSHOT.jar
>>
>> ilt2:/opt/servicemix/bin # echo $JAVA_HOME
>> /usr/lib/java/jsdk
>>
>>
>> Guillaume Nodet wrote:
>>
>>> Hi All !
>>>
>>> A snapshot of ServiceMix 2.0 has been deployed at
>>> http://dist.codehaus.org/servicemix/jars/servicemix-2.0-SNAPSHOT.jar
>>> It includes a number of bug fixes, especially on cluster flow (for
>>> Craig) and sendSync on pub/sub (for George).
>>>
>>> To use it on a 1.x distribution, you will need to put the jar at the
>>> place of the old one (do not forget to remove the old one from the
>>> classpath).
>>> It works the same way, and you can access the compatibility mode in
>>> the following way :
>>>    ..\..\bin\servicemix -v1 servicemix.xml
>>>
>>> You will certainly encouter a number of ClassNotFoundException. You
>>> will need to add the following jars to the classpath:
>>>    http://dist.codehaus.org/xbean/jars/xbean-spring-2.0-SNAPSHOT.jar
>>>    http://www.ibiblio.org/maven/springframework/jars/spring-1.2.5.jar
>>>    
>>> http://www.ibiblio.org/maven/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar 
>>>
>>>
>>> Do not forget to remove the old spring jar from the classpath too.
>>>
>>> Enjoy !
>>>
>>> Cheers,
>>> Guillaume Nodet
>>>
>>>
>>
>>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] ServiceMix 2.0-SNAPSHOT

Craig Walls
In reply to this post by Guillaume Nodet-3

Okay, finally getting around to trying this out, but...I get this error
when compiling:

    [javac] bad class file:
/Users/wallsc/projects/pig/lib/xbean-spring-2.0-SNAPSHOT.jar(org/xbean/spring/context/ClassPathXmlApplicationContext.class)
    [javac] class file has wrong version 49.0, should be 48.0
    [javac] Please remove or make sure it appears in the correct
subdirectory of the classpath.
    [javac] import org.xbean.spring.context.ClassPathXmlApplicationContext;
    [javac]                                 ^
    [javac] 1 error

Does this mean that XBean is dependent on Java 5? I can switch to Java 5
easily for tinkering around, but I may want this to run in Java 1.4.2.
Is there any reason that XBean can't be used in Java 1.4.2?



Guillaume Nodet wrote:

> Hi All !
>
> A snapshot of ServiceMix 2.0 has been deployed at
> http://dist.codehaus.org/servicemix/jars/servicemix-2.0-SNAPSHOT.jar
> It includes a number of bug fixes, especially on cluster flow (for
> Craig) and sendSync on pub/sub (for George).
>
> To use it on a 1.x distribution, you will need to put the jar at the
> place of the old one (do not forget to remove the old one from the
> classpath).
> It works the same way, and you can access the compatibility mode in
> the following way :
>    ..\..\bin\servicemix -v1 servicemix.xml
>
> You will certainly encouter a number of ClassNotFoundException. You
> will need to add the following jars to the classpath:
>    http://dist.codehaus.org/xbean/jars/xbean-spring-2.0-SNAPSHOT.jar
>    http://www.ibiblio.org/maven/springframework/jars/spring-1.2.5.jar
>    
> http://www.ibiblio.org/maven/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar 
>
>
> Do not forget to remove the old spring jar from the classpath too.
>
> Enjoy !
>
> Cheers,
> Guillaume Nodet
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] ServiceMix 2.0-SNAPSHOT

Craig Walls
In reply to this post by Guillaume Nodet-3

Okay, I moved up to Java 1.5 and have the service-side of my example
working with the 2.0 SNAPSHOT. I'm loading the container myself in
Spring code that is similar to the code in org.servicemix.Main:

    List processors = Arrays.asList(new Object[] { new XBeanProcessor() });
    new ClassPathXmlApplicationContext(
        "com/habuma/pig/service/service-container.xml", processors);

But I run into a wrinkle with the client-side...You see, the client side
of my example is web-based. Previously (with version 1.1), I had this in
my web.xml file:

  <servlet>
    <servlet-name>pig</servlet-name>
   
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    <init-param>
      <param-name>contextClass</param-name>
     
<param-value>org.servicemix.jbi.config.XmlWebApplicationContext</param-value>
    </init-param>
  </servlet>

Now that I'm at 2.0, I figured that I should probably be using the XBean
version of XmlWebApplicationContext...not a problem...

    <init-param>
      <param-name>contextClass</param-name>
     
<param-value>org.xbean.spring.context.XmlWebApplicationContext</param-value>
    </init-param>

But here's the problem...using "1.1 compatibility" I need to be able to
set an XBeanProcessor on XmlWebApplicationContext, similar to what I did
on the service side. Except that I don't instantiate
XmlWebApplicationContext. DispatcherServlet has that honor. Therefore,
there's no clear way to set the XBeanProcessor and so the
XmlWebApplicationContext doesn't know how to parse the
ServiceMix-specific context.

There are a few options:

    * My client's container doesn't have any of its own components, so I
      suppose that I could use standard Spring XML to configure the
      container. But if I decide to add a service to that container then
      things get ugly.
    * I could go put the appropriate property file in META-INF and
      declare an xmlns in my XML to handle the ServiceMix-specific
      stuff. But in my opinion the fact that ServiceMix is using XBean
      should be as transparent to me as possible. Having to tweak my XML
      to explicitly say that I'm using ServiceMix tags via XBean seems
      kinda dirty to me.
    * Perhaps a custom ServiceMix-specific DispatcherServlet could be
      written that handles the creation of XmlWebApplicationContext
      appropriately.
    * Or perhaps (and maybe even better), the ServiceMix version of
      XmlWebApplicationContext could extend the XBean version and
      properly register the XBeanProcessor. This means I'd have to
      change web.xml back to use the old ServiceMix-specific
      XmlWebApplicationContext...but that's okay with me.

What advice is there for me? Any ideas on how to deal with this? I favor
the last option...here's what I've got that seems to do the trick:

package org.servicemix.jbi.config;

import java.util.Arrays;

import org.servicemix.jbi.config.spring.XBeanProcessor;

public class XmlWebApplicationContext extends
org.xbean.spring.context.XmlWebApplicationContext {
  public XmlWebApplicationContext() {
    super(Arrays.asList(new Object[] { new XBeanProcessor() }));
  }
}




Guillaume Nodet wrote:

> Hi All !
>
> A snapshot of ServiceMix 2.0 has been deployed at
> http://dist.codehaus.org/servicemix/jars/servicemix-2.0-SNAPSHOT.jar
> It includes a number of bug fixes, especially on cluster flow (for
> Craig) and sendSync on pub/sub (for George).
>
> To use it on a 1.x distribution, you will need to put the jar at the
> place of the old one (do not forget to remove the old one from the
> classpath).
> It works the same way, and you can access the compatibility mode in
> the following way :
>    ..\..\bin\servicemix -v1 servicemix.xml
>
> You will certainly encouter a number of ClassNotFoundException. You
> will need to add the following jars to the classpath:
>    http://dist.codehaus.org/xbean/jars/xbean-spring-2.0-SNAPSHOT.jar
>    http://www.ibiblio.org/maven/springframework/jars/spring-1.2.5.jar
>    
> http://www.ibiblio.org/maven/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar 
>
>
> Do not forget to remove the old spring jar from the classpath too.
>
> Enjoy !
>
> Cheers,
> Guillaume Nodet
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] ServiceMix 2.0-SNAPSHOT

Craig Walls

Incidentally...after all of that...I still can't seem to get the content
sent across container boundaries. In summary, here's what I did:

1. Placed the 2.0 SNAPSHOT and those other 3 JARs in my classpath.
2. Moved up to Java 5 to avoid the invalid class version error when
compiling
3. Started up the services container.
4. Rolled my own XmlWebApplicationContext that instantiates itself with
the XBeanProcessor.
5. Deployed the web client.

 From all indications, the content that I'm setting on the client side
of the exchange never makes it to the service-side. Properties make the
trip, but the content does not.

Any clues?


Craig Walls wrote:

>
> Okay, I moved up to Java 1.5 and have the service-side of my example
> working with the 2.0 SNAPSHOT. I'm loading the container myself in
> Spring code that is similar to the code in org.servicemix.Main:
>
>    List processors = Arrays.asList(new Object[] { new XBeanProcessor()
> });
>    new ClassPathXmlApplicationContext(
>        "com/habuma/pig/service/service-container.xml", processors);
>
> But I run into a wrinkle with the client-side...You see, the client
> side of my example is web-based. Previously (with version 1.1), I had
> this in my web.xml file:
>
>  <servlet>
>    <servlet-name>pig</servlet-name>
>    
> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
>
>    <load-on-startup>1</load-on-startup>
>    <init-param>
>      <param-name>contextClass</param-name>
>      
> <param-value>org.servicemix.jbi.config.XmlWebApplicationContext</param-value>
>
>    </init-param>
>  </servlet>
>
> Now that I'm at 2.0, I figured that I should probably be using the
> XBean version of XmlWebApplicationContext...not a problem...
>
>    <init-param>
>      <param-name>contextClass</param-name>
>      
> <param-value>org.xbean.spring.context.XmlWebApplicationContext</param-value>
>
>    </init-param>
>
> But here's the problem...using "1.1 compatibility" I need to be able
> to set an XBeanProcessor on XmlWebApplicationContext, similar to what
> I did on the service side. Except that I don't instantiate
> XmlWebApplicationContext. DispatcherServlet has that honor. Therefore,
> there's no clear way to set the XBeanProcessor and so the
> XmlWebApplicationContext doesn't know how to parse the
> ServiceMix-specific context.
>
> There are a few options:
>
>    * My client's container doesn't have any of its own components, so I
>      suppose that I could use standard Spring XML to configure the
>      container. But if I decide to add a service to that container then
>      things get ugly.
>    * I could go put the appropriate property file in META-INF and
>      declare an xmlns in my XML to handle the ServiceMix-specific
>      stuff. But in my opinion the fact that ServiceMix is using XBean
>      should be as transparent to me as possible. Having to tweak my XML
>      to explicitly say that I'm using ServiceMix tags via XBean seems
>      kinda dirty to me.
>    * Perhaps a custom ServiceMix-specific DispatcherServlet could be
>      written that handles the creation of XmlWebApplicationContext
>      appropriately.
>    * Or perhaps (and maybe even better), the ServiceMix version of
>      XmlWebApplicationContext could extend the XBean version and
>      properly register the XBeanProcessor. This means I'd have to
>      change web.xml back to use the old ServiceMix-specific
>      XmlWebApplicationContext...but that's okay with me.
>
> What advice is there for me? Any ideas on how to deal with this? I
> favor the last option...here's what I've got that seems to do the trick:
>
> package org.servicemix.jbi.config;
>
> import java.util.Arrays;
>
> import org.servicemix.jbi.config.spring.XBeanProcessor;
>
> public class XmlWebApplicationContext extends
> org.xbean.spring.context.XmlWebApplicationContext {
>  public XmlWebApplicationContext() {
>    super(Arrays.asList(new Object[] { new XBeanProcessor() }));
>  }
> }
>
>
>
>
> Guillaume Nodet wrote:
>
>> Hi All !
>>
>> A snapshot of ServiceMix 2.0 has been deployed at
>> http://dist.codehaus.org/servicemix/jars/servicemix-2.0-SNAPSHOT.jar
>> It includes a number of bug fixes, especially on cluster flow (for
>> Craig) and sendSync on pub/sub (for George).
>>
>> To use it on a 1.x distribution, you will need to put the jar at the
>> place of the old one (do not forget to remove the old one from the
>> classpath).
>> It works the same way, and you can access the compatibility mode in
>> the following way :
>>    ..\..\bin\servicemix -v1 servicemix.xml
>>
>> You will certainly encouter a number of ClassNotFoundException. You
>> will need to add the following jars to the classpath:
>>    http://dist.codehaus.org/xbean/jars/xbean-spring-2.0-SNAPSHOT.jar
>>    http://www.ibiblio.org/maven/springframework/jars/spring-1.2.5.jar
>>    
>> http://www.ibiblio.org/maven/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar 
>>
>>
>> Do not forget to remove the old spring jar from the classpath too.
>>
>> Enjoy !
>>
>> Cheers,
>> Guillaume Nodet
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] servicemix install - problems - help appreciated

Guillaume Nodet-3
In reply to this post by Ranga Nathan
You need to add the jars contained in the "lib/optional" directory to
your classpath.
You can just move the jars in the "lib/optional" directory to the "lib"
directory if you prefer.

Btw, the CLASSPATH environment variable should contain a ";" or ":"
separated list of
locations. These locations should point to class files, not jars.
So your CLASSPATH variable should looks like:
   /opt/servicemix/lib/activemq-3.2.jar;/opt/servicemix/lib/...
If you use the distribution, you also have the shell scripts in the
"bin" directory that
set the classpath for you and launch servicemix.

Cheers,
Guillaume Nodet

Ranga Nathan wrote:

>
>
> Guillaume Nodet wrote:
>
>> You should add the libraries in the optional dirs, especially the
>> mx4j-xxx jars
>> which are needed if you do not run under a j2se 5.
>
>
> I am sorry, I do not get this. I feel stupid. Could you break it down
> for me? My java is not strong enough to understand this.
> Thanks
> Ranga Nathan
>
>>
>> Cheers,
>> Guillaume Nodet
>>
>> Ranga Nathan wrote:
>>
>>> I had problems installin servicemix but tried this 2.0 snapshot. I
>>> was able to install. But when I run servicemix, I get the following
>>> errors:
>>> Loading ServiceMix from servicemix.xml on the CLASSPATH
>>> Exception in thread "main" java.lang.NoClassDefFoundError
>>>        at
>>> org.xbean.spring.context.impl.PropertyEditorHelper.class$(PropertyEditorHelper.java:33)
>>>
>>>        at
>>> org.xbean.spring.context.impl.PropertyEditorHelper.registerCustomEditors(PropertyEditorHelper.java:34)
>>>
>>>        at
>>> org.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.<clinit>(XBeanXmlBeanDefinitionParser.java:74)
>>>
>>>        at java.lang.Class.forName0(Native Method)
>>>        at java.lang.Class.forName(Class.java:141)
>>>        at
>>> org.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader.class$(XBeanXmlBeanDefinitionReader.java:58)
>>>
>>>        at
>>> org.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader.<init>(XBeanXmlBeanDefinitionReader.java:58)
>>>
>>>        at
>>> org.xbean.spring.context.ClassPathXmlApplicationContext.loadBeanDefinitions(ClassPathXmlApplicationContext.java:166)
>>>
>>>        at
>>> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
>>>
>>>        at
>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:268)
>>>
>>>        at
>>> org.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:158)
>>>
>>>        at
>>> org.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:48)
>>>
>>>        at org.servicemix.Main.main(Main.java:44)
>>> Caused by: java.lang.ClassNotFoundException:
>>> javax.management.ObjectName
>>>        at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
>>>        at java.security.AccessController.doPrivileged(Native Method)
>>>        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
>>>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>>>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
>>>        at java.lang.Class.forName0(Native Method)
>>>        at java.lang.Class.forName(Class.java:141)
>>>        ... 13 more
>>>
>>> The CLASS_PATH is set to the servicemix lib directory
>>> (/opt/servicemix/lib)
>>> ilt2:/opt/servicemix/bin # ls -lat $CLASS_PATH
>>> total 7438
>>> drwxr-xr-x  12 root root     416 2005-10-30 09:50 ..
>>> drwxr-xr-x   3 root root     888 2005-10-30 08:49 .
>>> drwxr-xr-x   2 root root     256 2005-10-30 08:49 optional
>>> -rw-r--r--   1 root root 3444780 2005-10-27 01:01 activemq-3.2.jar
>>> -rw-r--r--   1 root root   73568 2005-10-27 01:01 activemq-ra-3.2.jar
>>> -rw-r--r--   1 root root  188671 2005-10-27 01:01
>>> commons-beanutils-1.7.0.jar
>>> -rw-r--r--   1 root root  559366 2005-10-27 01:01
>>> commons-collections-3.1.jar
>>> -rw-r--r--   1 root root   38015 2005-10-27 01:01
>>> commons-logging-1.0.4.jar
>>> -rw-r--r--   1 root root   42492 2005-10-27 01:01 commons-pool-1.2.jar
>>> -rw-r--r--   1 root root  189284 2005-10-27 01:01 concurrent-1.3.4.jar
>>> -rw-r--r--   1 root root   31514 2005-10-27 01:01
>>> geronimo-spec-activation-1.0.2-rc4.jar
>>> -rw-r--r--   1 root root   35858 2005-10-27 01:01
>>> geronimo-spec-j2ee-connector-1.5-rc4.jar
>>> -rw-r--r--   1 root root   18174 2005-10-27 01:01
>>> geronimo-spec-j2ee-management-1.0-rc4.jar
>>> -rw-r--r--   1 root root   30838 2005-10-27 01:01
>>> geronimo-spec-jms-1.1-rc4.jar
>>> -rw-r--r--   1 root root   13468 2005-10-27 01:01
>>> geronimo-spec-jta-1.0.1B-rc4.jar
>>> -rw-r--r--   1 root root  460330 2005-10-27 01:01 jencks-all-1.1.jar
>>> -rw-r--r--   1 root root  387915 2005-10-27 01:01
>>> servicemix-core-2.0-SNAPSHOT.jar
>>> -rw-r--r--   1 root root   14943 2005-10-27 01:01
>>> servicemix-jbi-2.0-SNAPSHOT.jar
>>> -rw-r--r--   1 root root 1871868 2005-10-27 01:01 spring-1.2.5.jar
>>> -rw-r--r--   1 root root  126771 2005-10-27 01:01 wsdl4j-1.5.1.jar
>>> -rw-r--r--   1 root root   48380 2005-10-27 01:01
>>> xbean-spring-2.0-SNAPSHOT.jar
>>>
>>> ilt2:/opt/servicemix/bin # echo $JAVA_HOME
>>> /usr/lib/java/jsdk
>>>
>>>
>>> Guillaume Nodet wrote:
>>>
>>>> Hi All !
>>>>
>>>> A snapshot of ServiceMix 2.0 has been deployed at
>>>> http://dist.codehaus.org/servicemix/jars/servicemix-2.0-SNAPSHOT.jar
>>>> It includes a number of bug fixes, especially on cluster flow (for
>>>> Craig) and sendSync on pub/sub (for George).
>>>>
>>>> To use it on a 1.x distribution, you will need to put the jar at
>>>> the place of the old one (do not forget to remove the old one from
>>>> the classpath).
>>>> It works the same way, and you can access the compatibility mode in
>>>> the following way :
>>>>    ..\..\bin\servicemix -v1 servicemix.xml
>>>>
>>>> You will certainly encouter a number of ClassNotFoundException. You
>>>> will need to add the following jars to the classpath:
>>>>    http://dist.codehaus.org/xbean/jars/xbean-spring-2.0-SNAPSHOT.jar
>>>>    http://www.ibiblio.org/maven/springframework/jars/spring-1.2.5.jar
>>>>    
>>>> http://www.ibiblio.org/maven/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar 
>>>>
>>>>
>>>> Do not forget to remove the old spring jar from the classpath too.
>>>>
>>>> Enjoy !
>>>>
>>>> Cheers,
>>>> Guillaume Nodet
>>>>
>>>>
>>>
>>>
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] ServiceMix 2.0-SNAPSHOT

Guillaume Nodet-3
In reply to this post by Craig Walls
I've uploaded a new snapshot of xbean compiled for 1.4, so you should
give it a try
if you want to use jdk 1.4.

Cheers,
Guillaume Nodet

Craig Walls wrote:

>
> Okay, finally getting around to trying this out, but...I get this
> error when compiling:
>
>    [javac] bad class file:
> /Users/wallsc/projects/pig/lib/xbean-spring-2.0-SNAPSHOT.jar(org/xbean/spring/context/ClassPathXmlApplicationContext.class)
>
>    [javac] class file has wrong version 49.0, should be 48.0
>    [javac] Please remove or make sure it appears in the correct
> subdirectory of the classpath.
>    [javac] import
> org.xbean.spring.context.ClassPathXmlApplicationContext;
>    [javac]                                 ^
>    [javac] 1 error
>
> Does this mean that XBean is dependent on Java 5? I can switch to Java
> 5 easily for tinkering around, but I may want this to run in Java
> 1.4.2. Is there any reason that XBean can't be used in Java 1.4.2?
>
>
>
> Guillaume Nodet wrote:
>
>> Hi All !
>>
>> A snapshot of ServiceMix 2.0 has been deployed at
>> http://dist.codehaus.org/servicemix/jars/servicemix-2.0-SNAPSHOT.jar
>> It includes a number of bug fixes, especially on cluster flow (for
>> Craig) and sendSync on pub/sub (for George).
>>
>> To use it on a 1.x distribution, you will need to put the jar at the
>> place of the old one (do not forget to remove the old one from the
>> classpath).
>> It works the same way, and you can access the compatibility mode in
>> the following way :
>>    ..\..\bin\servicemix -v1 servicemix.xml
>>
>> You will certainly encouter a number of ClassNotFoundException. You
>> will need to add the following jars to the classpath:
>>    http://dist.codehaus.org/xbean/jars/xbean-spring-2.0-SNAPSHOT.jar
>>    http://www.ibiblio.org/maven/springframework/jars/spring-1.2.5.jar
>>    
>> http://www.ibiblio.org/maven/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar 
>>
>>
>> Do not forget to remove the old spring jar from the classpath too.
>>
>> Enjoy !
>>
>> Cheers,
>> Guillaume Nodet
>>
>>
>
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] ServiceMix 2.0-SNAPSHOT

Guillaume Nodet-3
In reply to this post by Craig Walls
Some basic questions, but ...
Have you removed from the classpath the old version of servicemix ?
Do you use the latest snapshot ?
If you answer yes to the two questions, could you please test if the
MessageExchange
are correctly serialized / deserialized.
Using the following code:

        MessageExchange me = new InOnlyImpl("exchangeId");
        NormalizedMessage msg = me.createMessage();
        me.setMessage(msg, "in");
        msg.setContent(new StringSource("<hello>world</hello>"));
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        oos.writeObject(me);
        oos.close();
       
        ByteArrayInputStream bais = new
ByteArrayInputStream(baos.toByteArray());
        ObjectInputStream ois = new ObjectInputStream(bais);
        Object out = ois.readObject();
       System.out.println(((MessageExchange)
out).getMessage("in").getContent());
       
Could you check that the out object has a content ?
If no, then one of the two previous questions is not correct ;) as this
works perfectly for me.

Cheers,
Guillaume Nodet

Craig Walls wrote:

>
> Incidentally...after all of that...I still can't seem to get the
> content sent across container boundaries. In summary, here's what I did:
>
> 1. Placed the 2.0 SNAPSHOT and those other 3 JARs in my classpath.
> 2. Moved up to Java 5 to avoid the invalid class version error when
> compiling
> 3. Started up the services container.
> 4. Rolled my own XmlWebApplicationContext that instantiates itself
> with the XBeanProcessor.
> 5. Deployed the web client.
>
> From all indications, the content that I'm setting on the client side
> of the exchange never makes it to the service-side. Properties make
> the trip, but the content does not.
>
> Any clues?
>
>
> Craig Walls wrote:
>
>>
>> Okay, I moved up to Java 1.5 and have the service-side of my example
>> working with the 2.0 SNAPSHOT. I'm loading the container myself in
>> Spring code that is similar to the code in org.servicemix.Main:
>>
>>    List processors = Arrays.asList(new Object[] { new
>> XBeanProcessor() });
>>    new ClassPathXmlApplicationContext(
>>        "com/habuma/pig/service/service-container.xml", processors);
>>
>> But I run into a wrinkle with the client-side...You see, the client
>> side of my example is web-based. Previously (with version 1.1), I had
>> this in my web.xml file:
>>
>>  <servlet>
>>    <servlet-name>pig</servlet-name>
>>    
>> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
>>
>>    <load-on-startup>1</load-on-startup>
>>    <init-param>
>>      <param-name>contextClass</param-name>
>>      
>> <param-value>org.servicemix.jbi.config.XmlWebApplicationContext</param-value>
>>
>>    </init-param>
>>  </servlet>
>>
>> Now that I'm at 2.0, I figured that I should probably be using the
>> XBean version of XmlWebApplicationContext...not a problem...
>>
>>    <init-param>
>>      <param-name>contextClass</param-name>
>>      
>> <param-value>org.xbean.spring.context.XmlWebApplicationContext</param-value>
>>
>>    </init-param>
>>
>> But here's the problem...using "1.1 compatibility" I need to be able
>> to set an XBeanProcessor on XmlWebApplicationContext, similar to what
>> I did on the service side. Except that I don't instantiate
>> XmlWebApplicationContext. DispatcherServlet has that honor.
>> Therefore, there's no clear way to set the XBeanProcessor and so the
>> XmlWebApplicationContext doesn't know how to parse the
>> ServiceMix-specific context.
>>
>> There are a few options:
>>
>>    * My client's container doesn't have any of its own components, so I
>>      suppose that I could use standard Spring XML to configure the
>>      container. But if I decide to add a service to that container then
>>      things get ugly.
>>    * I could go put the appropriate property file in META-INF and
>>      declare an xmlns in my XML to handle the ServiceMix-specific
>>      stuff. But in my opinion the fact that ServiceMix is using XBean
>>      should be as transparent to me as possible. Having to tweak my XML
>>      to explicitly say that I'm using ServiceMix tags via XBean seems
>>      kinda dirty to me.
>>    * Perhaps a custom ServiceMix-specific DispatcherServlet could be
>>      written that handles the creation of XmlWebApplicationContext
>>      appropriately.
>>    * Or perhaps (and maybe even better), the ServiceMix version of
>>      XmlWebApplicationContext could extend the XBean version and
>>      properly register the XBeanProcessor. This means I'd have to
>>      change web.xml back to use the old ServiceMix-specific
>>      XmlWebApplicationContext...but that's okay with me.
>>
>> What advice is there for me? Any ideas on how to deal with this? I
>> favor the last option...here's what I've got that seems to do the trick:
>>
>> package org.servicemix.jbi.config;
>>
>> import java.util.Arrays;
>>
>> import org.servicemix.jbi.config.spring.XBeanProcessor;
>>
>> public class XmlWebApplicationContext extends
>> org.xbean.spring.context.XmlWebApplicationContext {
>>  public XmlWebApplicationContext() {
>>    super(Arrays.asList(new Object[] { new XBeanProcessor() }));
>>  }
>> }
>>
>>
>>
>>
>> Guillaume Nodet wrote:
>>
>>> Hi All !
>>>
>>> A snapshot of ServiceMix 2.0 has been deployed at
>>> http://dist.codehaus.org/servicemix/jars/servicemix-2.0-SNAPSHOT.jar
>>> It includes a number of bug fixes, especially on cluster flow (for
>>> Craig) and sendSync on pub/sub (for George).
>>>
>>> To use it on a 1.x distribution, you will need to put the jar at the
>>> place of the old one (do not forget to remove the old one from the
>>> classpath).
>>> It works the same way, and you can access the compatibility mode in
>>> the following way :
>>>    ..\..\bin\servicemix -v1 servicemix.xml
>>>
>>> You will certainly encouter a number of ClassNotFoundException. You
>>> will need to add the following jars to the classpath:
>>>    http://dist.codehaus.org/xbean/jars/xbean-spring-2.0-SNAPSHOT.jar
>>>    http://www.ibiblio.org/maven/springframework/jars/spring-1.2.5.jar
>>>    
>>> http://www.ibiblio.org/maven/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar 
>>>
>>>
>>> Do not forget to remove the old spring jar from the classpath too.
>>>
>>> Enjoy !
>>>
>>> Cheers,
>>> Guillaume Nodet
>>>
>>>
>>
>>
>
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] ServiceMix 2.0-SNAPSHOT

Craig Walls

I'll try giving it another try later today. I did remove the old
servicemix JAR and I was using the new SNAPSHOT JAR. Of course, I was
doing all of this while fending of trick-or-treaters coming to my door, so
I may have made a mistake...



> Some basic questions, but ...
> Have you removed from the classpath the old version of servicemix ? Do
> you use the latest snapshot ?
> If you answer yes to the two questions, could you please test if the
> MessageExchange
> are correctly serialized / deserialized.
> Using the following code:
>
>         MessageExchange me = new InOnlyImpl("exchangeId");
>         NormalizedMessage msg = me.createMessage();
>         me.setMessage(msg, "in");
>         msg.setContent(new StringSource("<hello>world</hello>"));
>         ByteArrayOutputStream baos = new ByteArrayOutputStream();
>         ObjectOutputStream oos = new ObjectOutputStream(baos);
>         oos.writeObject(me);
>         oos.close();
>
>         ByteArrayInputStream bais = new
> ByteArrayInputStream(baos.toByteArray());
>         ObjectInputStream ois = new ObjectInputStream(bais);
>         Object out = ois.readObject();
>        System.out.println(((MessageExchange)
> out).getMessage("in").getContent());
>
> Could you check that the out object has a content ?
> If no, then one of the two previous questions is not correct ;) as this
> works perfectly for me.
>
> Cheers,
> Guillaume Nodet
>
> Craig Walls wrote:
>
>>
>> Incidentally...after all of that...I still can't seem to get the
>> content sent across container boundaries. In summary, here's what I
>> did:
>>
>> 1. Placed the 2.0 SNAPSHOT and those other 3 JARs in my classpath. 2.
>> Moved up to Java 5 to avoid the invalid class version error when
>> compiling
>> 3. Started up the services container.
>> 4. Rolled my own XmlWebApplicationContext that instantiates itself
>> with the XBeanProcessor.
>> 5. Deployed the web client.
>>
>> From all indications, the content that I'm setting on the client side
>> of the exchange never makes it to the service-side. Properties make
>> the trip, but the content does not.
>>
>> Any clues?
>>
>>
>> Craig Walls wrote:
>>
>>>
>>> Okay, I moved up to Java 1.5 and have the service-side of my example
>>> working with the 2.0 SNAPSHOT. I'm loading the container myself in
>>> Spring code that is similar to the code in org.servicemix.Main:
>>>
>>>    List processors = Arrays.asList(new Object[] { new
>>> XBeanProcessor() });
>>>    new ClassPathXmlApplicationContext(
>>>        "com/habuma/pig/service/service-container.xml", processors);
>>>
>>> But I run into a wrinkle with the client-side...You see, the client
>>> side of my example is web-based. Previously (with version 1.1), I had
>>>  this in my web.xml file:
>>>
>>>  <servlet>
>>>    <servlet-name>pig</servlet-name>
>>>
>>> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
>>>
>>>
>>>    <load-on-startup>1</load-on-startup>
>>>    <init-param>
>>>      <param-name>contextClass</param-name>
>>>
>>> <param-value>org.servicemix.jbi.config.XmlWebApplicationContext</param-value>
>>>
>>>
>>>    </init-param>
>>>  </servlet>
>>>
>>> Now that I'm at 2.0, I figured that I should probably be using the
>>> XBean version of XmlWebApplicationContext...not a problem...
>>>
>>>    <init-param>
>>>      <param-name>contextClass</param-name>
>>>
>>> <param-value>org.xbean.spring.context.XmlWebApplicationContext</param-value>
>>>
>>>
>>>    </init-param>
>>>
>>> But here's the problem...using "1.1 compatibility" I need to be able
>>> to set an XBeanProcessor on XmlWebApplicationContext, similar to what
>>>  I did on the service side. Except that I don't instantiate
>>> XmlWebApplicationContext. DispatcherServlet has that honor.
>>> Therefore, there's no clear way to set the XBeanProcessor and so the
>>> XmlWebApplicationContext doesn't know how to parse the
>>> ServiceMix-specific context.
>>>
>>> There are a few options:
>>>
>>>    * My client's container doesn't have any of its own components, so
>>> I
>>>      suppose that I could use standard Spring XML to configure the
>>> container. But if I decide to add a service to that container
>>> then things get ugly.
>>>    * I could go put the appropriate property file in META-INF and
>>>      declare an xmlns in my XML to handle the ServiceMix-specific
>>> stuff. But in my opinion the fact that ServiceMix is using XBean
>>> should be as transparent to me as possible. Having to tweak my
>>> XML to explicitly say that I'm using ServiceMix tags via XBean
>>> seems kinda dirty to me.
>>>    * Perhaps a custom ServiceMix-specific DispatcherServlet could be
>>>      written that handles the creation of XmlWebApplicationContext
>>> appropriately.
>>>    * Or perhaps (and maybe even better), the ServiceMix version of
>>>      XmlWebApplicationContext could extend the XBean version and
>>> properly register the XBeanProcessor. This means I'd have to
>>> change web.xml back to use the old ServiceMix-specific
>>>      XmlWebApplicationContext...but that's okay with me.
>>>
>>> What advice is there for me? Any ideas on how to deal with this? I
>>> favor the last option...here's what I've got that seems to do the
>>> trick:
>>>
>>> package org.servicemix.jbi.config;
>>>
>>> import java.util.Arrays;
>>>
>>> import org.servicemix.jbi.config.spring.XBeanProcessor;
>>>
>>> public class XmlWebApplicationContext extends
>>> org.xbean.spring.context.XmlWebApplicationContext {
>>>  public XmlWebApplicationContext() {
>>>    super(Arrays.asList(new Object[] { new XBeanProcessor() }));
>>>  }
>>> }
>>>
>>>
>>>
>>>
>>> Guillaume Nodet wrote:
>>>
>>>> Hi All !
>>>>
>>>> A snapshot of ServiceMix 2.0 has been deployed at
>>>> http://dist.codehaus.org/servicemix/jars/servicemix-2.0-SNAPSHOT.jar
>>>> It includes a number of bug fixes, especially on cluster flow (for
>>>> Craig) and sendSync on pub/sub (for George).
>>>>
>>>> To use it on a 1.x distribution, you will need to put the jar at the
>>>>  place of the old one (do not forget to remove the old one from the
>>>> classpath).
>>>> It works the same way, and you can access the compatibility mode in
>>>> the following way :
>>>>    ..\..\bin\servicemix -v1 servicemix.xml
>>>>
>>>> You will certainly encouter a number of ClassNotFoundException. You
>>>> will need to add the following jars to the classpath:
>>>>    http://dist.codehaus.org/xbean/jars/xbean-spring-2.0-SNAPSHOT.jar
>>>> http://www.ibiblio.org/maven/springframework/jars/spring-1.2.5.jar
>>>>
>>>> http://www.ibiblio.org/maven/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar
>>>>
>>>>
>>>>
>>>> Do not forget to remove the old spring jar from the classpath too.
>>>>
>>>> Enjoy !
>>>>
>>>> Cheers,
>>>> Guillaume Nodet



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] ServiceMix 2.0-SNAPSHOT

Craig Walls
In reply to this post by Guillaume Nodet-3

Okay, I gave this a shot...I took the chunk of code you gave below and
turned it into a unit-test. The TestCase I'm using is as follows:

package com.habuma.sm.example;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import javax.jbi.messaging.MessageExchange;
import javax.jbi.messaging.NormalizedMessage;
import junit.framework.TestCase;
import org.servicemix.jbi.jaxp.StringSource;
import org.servicemix.jbi.messaging.InOnlyImpl;

public class ServiceMixTest extends TestCase {
  public void testContentDelivery() {
    try {
      MessageExchange me = new InOnlyImpl("exchangeId");
      NormalizedMessage msg = me.createMessage();
      me.setMessage(msg, "in");
      msg.setContent(new StringSource("<hello>world</hello>"));
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectOutputStream oos = new ObjectOutputStream(baos);
      oos.writeObject(me);
      oos.close();
            ByteArrayInputStream bais = new
ByteArrayInputStream(baos.toByteArray());
      ObjectInputStream ois = new ObjectInputStream(bais);
      Object out = ois.readObject();
      assertNotNull("OUT EXCHANGE IS NULL", out);
      assertNotNull("OUT EXCHANGE'S IN MESSAGE IS NULL",
((MessageExchange) out).getMessage("in"));
      assertNotNull("THE IN MESSAGE'S CONTENT IS NULL",
((MessageExchange) out).getMessage("in").getContent());
    } catch (Exception e) {
      fail("Exception thrown:  " + e);
    }

  }
}

The test fails on the line that says "THE IN MESSAGE'S CONTENT IS NULL".

As for my classpath, I'm certain that I have the
servicemix-2.0-SNAPSHOT.jar (and no other servicemix JAR). In fact, here
are all of the JARs in my classpath...basically everything in the
ServiceMix 1.1 lib directory, plus activeluster-1.1-SNAPSHOT.jar, plus
all of the JARs you recommended with the servicemix-2.0-SNAPSHOT.jar.

activation.jar
activecluster-1.1-SNAPSHOT.jar
activemq-3.2.jar
activemq-ra-3.2.jar
ant-1.6.jar
backport-util-concurrent-2.0_01_pd.jar
commons-beanutils-1.7.0.jar
commons-collections-3.1.jar
commons-logging-1.0.3.jar
commons-pool-1.2.jar
concurrent-1.3.4.jar
geronimo-spec-j2ee-connector-1.5-rc4.jar
geronimo-spec-j2ee-management-1.0-rc4.jar
geronimo-spec-jms-1.1-rc4.jar
geronimo-spec-jta-1.0.1B-rc4.jar
groovy-all-1.0-jsr-02.jar
jaxp-1.3.jar
jencks-all-1.1.jar
jsr-223-1.0-pr.jar
junit.jar
lingo-1.0-M1.jar
mx4j-2.1.1.jar
mx4j-impl-2.1.1.jar
mx4j-jmx-2.1.1.jar
mx4j-remote-2.1.1.jar
mx4j-tools-2.1.1.jar
servicemix-2.0-SNAPSHOT.jar
spring-1.2.5.jar
stax-api-1.0.jar
stax-utils-snapshot-20040917.jar
wstx-asl-2.0.jar
xalan-2.6.0.jar
xbean-spring-2.0-SNAPSHOT.jar
xercesImpl-2.6.2.jar
xmlParserAPIs-2.6.2.jar


Any ideas? Could there be some other JAR that I'm missing or have the
wrong version of?

Thanks,
Craig









Guillaume Nodet wrote:

> Some basic questions, but ...
> Have you removed from the classpath the old version of servicemix ?
> Do you use the latest snapshot ?
> If you answer yes to the two questions, could you please test if the
> MessageExchange
> are correctly serialized / deserialized.
> Using the following code:
>
>        MessageExchange me = new InOnlyImpl("exchangeId");
>        NormalizedMessage msg = me.createMessage();
>        me.setMessage(msg, "in");
>        msg.setContent(new StringSource("<hello>world</hello>"));
>        ByteArrayOutputStream baos = new ByteArrayOutputStream();
>        ObjectOutputStream oos = new ObjectOutputStream(baos);
>        oos.writeObject(me);
>        oos.close();
>              ByteArrayInputStream bais = new
> ByteArrayInputStream(baos.toByteArray());
>        ObjectInputStream ois = new ObjectInputStream(bais);
>        Object out = ois.readObject();
>       System.out.println(((MessageExchange)
> out).getMessage("in").getContent());
>       Could you check that the out object has a content ?
> If no, then one of the two previous questions is not correct ;) as
> this works perfectly for me.
>
> Cheers,
> Guillaume Nodet
>
> Craig Walls wrote:
>
>>
>> Incidentally...after all of that...I still can't seem to get the
>> content sent across container boundaries. In summary, here's what I did:
>>
>> 1. Placed the 2.0 SNAPSHOT and those other 3 JARs in my classpath.
>> 2. Moved up to Java 5 to avoid the invalid class version error when
>> compiling
>> 3. Started up the services container.
>> 4. Rolled my own XmlWebApplicationContext that instantiates itself
>> with the XBeanProcessor.
>> 5. Deployed the web client.
>>
>> From all indications, the content that I'm setting on the client side
>> of the exchange never makes it to the service-side. Properties make
>> the trip, but the content does not.
>>
>> Any clues?
>>
>>
>> Craig Walls wrote:
>>
>>>
>>> Okay, I moved up to Java 1.5 and have the service-side of my example
>>> working with the 2.0 SNAPSHOT. I'm loading the container myself in
>>> Spring code that is similar to the code in org.servicemix.Main:
>>>
>>>    List processors = Arrays.asList(new Object[] { new
>>> XBeanProcessor() });
>>>    new ClassPathXmlApplicationContext(
>>>        "com/habuma/pig/service/service-container.xml", processors);
>>>
>>> But I run into a wrinkle with the client-side...You see, the client
>>> side of my example is web-based. Previously (with version 1.1), I
>>> had this in my web.xml file:
>>>
>>>  <servlet>
>>>    <servlet-name>pig</servlet-name>
>>>    
>>> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
>>>
>>>    <load-on-startup>1</load-on-startup>
>>>    <init-param>
>>>      <param-name>contextClass</param-name>
>>>      
>>> <param-value>org.servicemix.jbi.config.XmlWebApplicationContext</param-value>
>>>
>>>    </init-param>
>>>  </servlet>
>>>
>>> Now that I'm at 2.0, I figured that I should probably be using the
>>> XBean version of XmlWebApplicationContext...not a problem...
>>>
>>>    <init-param>
>>>      <param-name>contextClass</param-name>
>>>      
>>> <param-value>org.xbean.spring.context.XmlWebApplicationContext</param-value>
>>>
>>>    </init-param>
>>>
>>> But here's the problem...using "1.1 compatibility" I need to be able
>>> to set an XBeanProcessor on XmlWebApplicationContext, similar to
>>> what I did on the service side. Except that I don't instantiate
>>> XmlWebApplicationContext. DispatcherServlet has that honor.
>>> Therefore, there's no clear way to set the XBeanProcessor and so the
>>> XmlWebApplicationContext doesn't know how to parse the
>>> ServiceMix-specific context.
>>>
>>> There are a few options:
>>>
>>>    * My client's container doesn't have any of its own components, so I
>>>      suppose that I could use standard Spring XML to configure the
>>>      container. But if I decide to add a service to that container then
>>>      things get ugly.
>>>    * I could go put the appropriate property file in META-INF and
>>>      declare an xmlns in my XML to handle the ServiceMix-specific
>>>      stuff. But in my opinion the fact that ServiceMix is using XBean
>>>      should be as transparent to me as possible. Having to tweak my XML
>>>      to explicitly say that I'm using ServiceMix tags via XBean seems
>>>      kinda dirty to me.
>>>    * Perhaps a custom ServiceMix-specific DispatcherServlet could be
>>>      written that handles the creation of XmlWebApplicationContext
>>>      appropriately.
>>>    * Or perhaps (and maybe even better), the ServiceMix version of
>>>      XmlWebApplicationContext could extend the XBean version and
>>>      properly register the XBeanProcessor. This means I'd have to
>>>      change web.xml back to use the old ServiceMix-specific
>>>      XmlWebApplicationContext...but that's okay with me.
>>>
>>> What advice is there for me? Any ideas on how to deal with this? I
>>> favor the last option...here's what I've got that seems to do the
>>> trick:
>>>
>>> package org.servicemix.jbi.config;
>>>
>>> import java.util.Arrays;
>>>
>>> import org.servicemix.jbi.config.spring.XBeanProcessor;
>>>
>>> public class XmlWebApplicationContext extends
>>> org.xbean.spring.context.XmlWebApplicationContext {
>>>  public XmlWebApplicationContext() {
>>>    super(Arrays.asList(new Object[] { new XBeanProcessor() }));
>>>  }
>>> }
>>>
>>>
>>>
>>>
>>> Guillaume Nodet wrote:
>>>
>>>> Hi All !
>>>>
>>>> A snapshot of ServiceMix 2.0 has been deployed at
>>>> http://dist.codehaus.org/servicemix/jars/servicemix-2.0-SNAPSHOT.jar
>>>> It includes a number of bug fixes, especially on cluster flow (for
>>>> Craig) and sendSync on pub/sub (for George).
>>>>
>>>> To use it on a 1.x distribution, you will need to put the jar at
>>>> the place of the old one (do not forget to remove the old one from
>>>> the classpath).
>>>> It works the same way, and you can access the compatibility mode in
>>>> the following way :
>>>>    ..\..\bin\servicemix -v1 servicemix.xml
>>>>
>>>> You will certainly encouter a number of ClassNotFoundException. You
>>>> will need to add the following jars to the classpath:
>>>>    http://dist.codehaus.org/xbean/jars/xbean-spring-2.0-SNAPSHOT.jar
>>>>    http://www.ibiblio.org/maven/springframework/jars/spring-1.2.5.jar
>>>>    
>>>> http://www.ibiblio.org/maven/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar 
>>>>
>>>>
>>>> Do not forget to remove the old spring jar from the classpath too.
>>>>
>>>> Enjoy !
>>>>
>>>> Cheers,
>>>> Guillaume Nodet
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] ServiceMix 2.0-SNAPSHOT

Guillaume Nodet-3
Then this must be the snapshot that is outdated. I'll upload a new one
within an hour.
In the mean time you can try with the exploded jars
(servicemix-core-2.0-SNAPSHOT.jar, servicemix-jbi,
servicemix-components).  They are more up to date.

Cheers,
Guillaume Nodet

Craig Walls wrote:

>
> Okay, I gave this a shot...I took the chunk of code you gave below and
> turned it into a unit-test. The TestCase I'm using is as follows:
>
> package com.habuma.sm.example;
> import java.io.ByteArrayInputStream;
> import java.io.ByteArrayOutputStream;
> import java.io.ObjectInputStream;
> import java.io.ObjectOutputStream;
> import javax.jbi.messaging.MessageExchange;
> import javax.jbi.messaging.NormalizedMessage;
> import junit.framework.TestCase;
> import org.servicemix.jbi.jaxp.StringSource;
> import org.servicemix.jbi.messaging.InOnlyImpl;
>
> public class ServiceMixTest extends TestCase {
>  public void testContentDelivery() {
>    try {
>      MessageExchange me = new InOnlyImpl("exchangeId");
>      NormalizedMessage msg = me.createMessage();
>      me.setMessage(msg, "in");
>      msg.setContent(new StringSource("<hello>world</hello>"));
>      ByteArrayOutputStream baos = new ByteArrayOutputStream();
>      ObjectOutputStream oos = new ObjectOutputStream(baos);
>      oos.writeObject(me);
>      oos.close();
>            ByteArrayInputStream bais = new
> ByteArrayInputStream(baos.toByteArray());
>      ObjectInputStream ois = new ObjectInputStream(bais);
>      Object out = ois.readObject();
>      assertNotNull("OUT EXCHANGE IS NULL", out);
>      assertNotNull("OUT EXCHANGE'S IN MESSAGE IS NULL",
> ((MessageExchange) out).getMessage("in"));
>      assertNotNull("THE IN MESSAGE'S CONTENT IS NULL",
> ((MessageExchange) out).getMessage("in").getContent());
>    } catch (Exception e) {
>      fail("Exception thrown:  " + e);
>    }
>
>  }
> }
>
> The test fails on the line that says "THE IN MESSAGE'S CONTENT IS NULL".
>
> As for my classpath, I'm certain that I have the
> servicemix-2.0-SNAPSHOT.jar (and no other servicemix JAR). In fact,
> here are all of the JARs in my classpath...basically everything in the
> ServiceMix 1.1 lib directory, plus activeluster-1.1-SNAPSHOT.jar, plus
> all of the JARs you recommended with the servicemix-2.0-SNAPSHOT.jar.
>
> activation.jar
> activecluster-1.1-SNAPSHOT.jar
> activemq-3.2.jar
> activemq-ra-3.2.jar
> ant-1.6.jar
> backport-util-concurrent-2.0_01_pd.jar
> commons-beanutils-1.7.0.jar
> commons-collections-3.1.jar
> commons-logging-1.0.3.jar
> commons-pool-1.2.jar
> concurrent-1.3.4.jar
> geronimo-spec-j2ee-connector-1.5-rc4.jar
> geronimo-spec-j2ee-management-1.0-rc4.jar
> geronimo-spec-jms-1.1-rc4.jar
> geronimo-spec-jta-1.0.1B-rc4.jar
> groovy-all-1.0-jsr-02.jar
> jaxp-1.3.jar
> jencks-all-1.1.jar
> jsr-223-1.0-pr.jar
> junit.jar
> lingo-1.0-M1.jar
> mx4j-2.1.1.jar
> mx4j-impl-2.1.1.jar
> mx4j-jmx-2.1.1.jar
> mx4j-remote-2.1.1.jar
> mx4j-tools-2.1.1.jar
> servicemix-2.0-SNAPSHOT.jar
> spring-1.2.5.jar
> stax-api-1.0.jar
> stax-utils-snapshot-20040917.jar
> wstx-asl-2.0.jar
> xalan-2.6.0.jar
> xbean-spring-2.0-SNAPSHOT.jar
> xercesImpl-2.6.2.jar
> xmlParserAPIs-2.6.2.jar
>
>
> Any ideas? Could there be some other JAR that I'm missing or have the
> wrong version of?
>
> Thanks,
> Craig
>
>
>
>
>
>
>
>
>
> Guillaume Nodet wrote:
>
>> Some basic questions, but ...
>> Have you removed from the classpath the old version of servicemix ?
>> Do you use the latest snapshot ?
>> If you answer yes to the two questions, could you please test if the
>> MessageExchange
>> are correctly serialized / deserialized.
>> Using the following code:
>>
>>        MessageExchange me = new InOnlyImpl("exchangeId");
>>        NormalizedMessage msg = me.createMessage();
>>        me.setMessage(msg, "in");
>>        msg.setContent(new StringSource("<hello>world</hello>"));
>>        ByteArrayOutputStream baos = new ByteArrayOutputStream();
>>        ObjectOutputStream oos = new ObjectOutputStream(baos);
>>        oos.writeObject(me);
>>        oos.close();
>>              ByteArrayInputStream bais = new
>> ByteArrayInputStream(baos.toByteArray());
>>        ObjectInputStream ois = new ObjectInputStream(bais);
>>        Object out = ois.readObject();
>>       System.out.println(((MessageExchange)
>> out).getMessage("in").getContent());
>>       Could you check that the out object has a content ?
>> If no, then one of the two previous questions is not correct ;) as
>> this works perfectly for me.
>>
>> Cheers,
>> Guillaume Nodet
>>
>> Craig Walls wrote:
>>
>>>
>>> Incidentally...after all of that...I still can't seem to get the
>>> content sent across container boundaries. In summary, here's what I
>>> did:
>>>
>>> 1. Placed the 2.0 SNAPSHOT and those other 3 JARs in my classpath.
>>> 2. Moved up to Java 5 to avoid the invalid class version error when
>>> compiling
>>> 3. Started up the services container.
>>> 4. Rolled my own XmlWebApplicationContext that instantiates itself
>>> with the XBeanProcessor.
>>> 5. Deployed the web client.
>>>
>>> From all indications, the content that I'm setting on the client
>>> side of the exchange never makes it to the service-side. Properties
>>> make the trip, but the content does not.
>>>
>>> Any clues?
>>>
>>>
>>> Craig Walls wrote:
>>>
>>>>
>>>> Okay, I moved up to Java 1.5 and have the service-side of my
>>>> example working with the 2.0 SNAPSHOT. I'm loading the container
>>>> myself in Spring code that is similar to the code in
>>>> org.servicemix.Main:
>>>>
>>>>    List processors = Arrays.asList(new Object[] { new
>>>> XBeanProcessor() });
>>>>    new ClassPathXmlApplicationContext(
>>>>        "com/habuma/pig/service/service-container.xml", processors);
>>>>
>>>> But I run into a wrinkle with the client-side...You see, the client
>>>> side of my example is web-based. Previously (with version 1.1), I
>>>> had this in my web.xml file:
>>>>
>>>>  <servlet>
>>>>    <servlet-name>pig</servlet-name>
>>>>    
>>>> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
>>>>
>>>>    <load-on-startup>1</load-on-startup>
>>>>    <init-param>
>>>>      <param-name>contextClass</param-name>
>>>>      
>>>> <param-value>org.servicemix.jbi.config.XmlWebApplicationContext</param-value>
>>>>
>>>>    </init-param>
>>>>  </servlet>
>>>>
>>>> Now that I'm at 2.0, I figured that I should probably be using the
>>>> XBean version of XmlWebApplicationContext...not a problem...
>>>>
>>>>    <init-param>
>>>>      <param-name>contextClass</param-name>
>>>>      
>>>> <param-value>org.xbean.spring.context.XmlWebApplicationContext</param-value>
>>>>
>>>>    </init-param>
>>>>
>>>> But here's the problem...using "1.1 compatibility" I need to be
>>>> able to set an XBeanProcessor on XmlWebApplicationContext, similar
>>>> to what I did on the service side. Except that I don't instantiate
>>>> XmlWebApplicationContext. DispatcherServlet has that honor.
>>>> Therefore, there's no clear way to set the XBeanProcessor and so
>>>> the XmlWebApplicationContext doesn't know how to parse the
>>>> ServiceMix-specific context.
>>>>
>>>> There are a few options:
>>>>
>>>>    * My client's container doesn't have any of its own components,
>>>> so I
>>>>      suppose that I could use standard Spring XML to configure the
>>>>      container. But if I decide to add a service to that container
>>>> then
>>>>      things get ugly.
>>>>    * I could go put the appropriate property file in META-INF and
>>>>      declare an xmlns in my XML to handle the ServiceMix-specific
>>>>      stuff. But in my opinion the fact that ServiceMix is using XBean
>>>>      should be as transparent to me as possible. Having to tweak my
>>>> XML
>>>>      to explicitly say that I'm using ServiceMix tags via XBean seems
>>>>      kinda dirty to me.
>>>>    * Perhaps a custom ServiceMix-specific DispatcherServlet could be
>>>>      written that handles the creation of XmlWebApplicationContext
>>>>      appropriately.
>>>>    * Or perhaps (and maybe even better), the ServiceMix version of
>>>>      XmlWebApplicationContext could extend the XBean version and
>>>>      properly register the XBeanProcessor. This means I'd have to
>>>>      change web.xml back to use the old ServiceMix-specific
>>>>      XmlWebApplicationContext...but that's okay with me.
>>>>
>>>> What advice is there for me? Any ideas on how to deal with this? I
>>>> favor the last option...here's what I've got that seems to do the
>>>> trick:
>>>>
>>>> package org.servicemix.jbi.config;
>>>>
>>>> import java.util.Arrays;
>>>>
>>>> import org.servicemix.jbi.config.spring.XBeanProcessor;
>>>>
>>>> public class XmlWebApplicationContext extends
>>>> org.xbean.spring.context.XmlWebApplicationContext {
>>>>  public XmlWebApplicationContext() {
>>>>    super(Arrays.asList(new Object[] { new XBeanProcessor() }));
>>>>  }
>>>> }
>>>>
>>>>
>>>>
>>>>
>>>> Guillaume Nodet wrote:
>>>>
>>>>> Hi All !
>>>>>
>>>>> A snapshot of ServiceMix 2.0 has been deployed at
>>>>> http://dist.codehaus.org/servicemix/jars/servicemix-2.0-SNAPSHOT.jar
>>>>> It includes a number of bug fixes, especially on cluster flow (for
>>>>> Craig) and sendSync on pub/sub (for George).
>>>>>
>>>>> To use it on a 1.x distribution, you will need to put the jar at
>>>>> the place of the old one (do not forget to remove the old one from
>>>>> the classpath).
>>>>> It works the same way, and you can access the compatibility mode
>>>>> in the following way :
>>>>>    ..\..\bin\servicemix -v1 servicemix.xml
>>>>>
>>>>> You will certainly encouter a number of ClassNotFoundException.
>>>>> You will need to add the following jars to the classpath:
>>>>>    http://dist.codehaus.org/xbean/jars/xbean-spring-2.0-SNAPSHOT.jar
>>>>>    http://www.ibiblio.org/maven/springframework/jars/spring-1.2.5.jar
>>>>>    
>>>>> http://www.ibiblio.org/maven/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar 
>>>>>
>>>>>
>>>>> Do not forget to remove the old spring jar from the classpath too.
>>>>>
>>>>> Enjoy !
>>>>>
>>>>> Cheers,
>>>>> Guillaume Nodet
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] ServiceMix 2.0-SNAPSHOT

Mats Norén
Hi,
Would it be possible to put the date in the name of the snapshot jar?

/regards Mats


Guillaume Nodet wrote:

> Then this must be the snapshot that is outdated. I'll upload a new one
> within an hour.
> In the mean time you can try with the exploded jars
> (servicemix-core-2.0-SNAPSHOT.jar, servicemix-jbi,
> servicemix-components).  They are more up to date.
>
> Cheers,
> Guillaume Nodet
>
> Craig Walls wrote:
>
>>
>> Okay, I gave this a shot...I took the chunk of code you gave below and
>> turned it into a unit-test. The TestCase I'm using is as follows:
>>
>> package com.habuma.sm.example;
>> import java.io.ByteArrayInputStream;
>> import java.io.ByteArrayOutputStream;
>> import java.io.ObjectInputStream;
>> import java.io.ObjectOutputStream;
>> import javax.jbi.messaging.MessageExchange;
>> import javax.jbi.messaging.NormalizedMessage;
>> import junit.framework.TestCase;
>> import org.servicemix.jbi.jaxp.StringSource;
>> import org.servicemix.jbi.messaging.InOnlyImpl;
>>
>> public class ServiceMixTest extends TestCase {
>>  public void testContentDelivery() {
>>    try {
>>      MessageExchange me = new InOnlyImpl("exchangeId");
>>      NormalizedMessage msg = me.createMessage();
>>      me.setMessage(msg, "in");
>>      msg.setContent(new StringSource("<hello>world</hello>"));
>>      ByteArrayOutputStream baos = new ByteArrayOutputStream();
>>      ObjectOutputStream oos = new ObjectOutputStream(baos);
>>      oos.writeObject(me);
>>      oos.close();
>>            ByteArrayInputStream bais = new
>> ByteArrayInputStream(baos.toByteArray());
>>      ObjectInputStream ois = new ObjectInputStream(bais);
>>      Object out = ois.readObject();
>>      assertNotNull("OUT EXCHANGE IS NULL", out);
>>      assertNotNull("OUT EXCHANGE'S IN MESSAGE IS NULL",
>> ((MessageExchange) out).getMessage("in"));
>>      assertNotNull("THE IN MESSAGE'S CONTENT IS NULL",
>> ((MessageExchange) out).getMessage("in").getContent());
>>    } catch (Exception e) {
>>      fail("Exception thrown:  " + e);
>>    }
>>
>>  }
>> }
>>
>> The test fails on the line that says "THE IN MESSAGE'S CONTENT IS NULL".
>>
>> As for my classpath, I'm certain that I have the
>> servicemix-2.0-SNAPSHOT.jar (and no other servicemix JAR). In fact,
>> here are all of the JARs in my classpath...basically everything in the
>> ServiceMix 1.1 lib directory, plus activeluster-1.1-SNAPSHOT.jar, plus
>> all of the JARs you recommended with the servicemix-2.0-SNAPSHOT.jar.
>>
>> activation.jar
>> activecluster-1.1-SNAPSHOT.jar
>> activemq-3.2.jar
>> activemq-ra-3.2.jar
>> ant-1.6.jar
>> backport-util-concurrent-2.0_01_pd.jar
>> commons-beanutils-1.7.0.jar
>> commons-collections-3.1.jar
>> commons-logging-1.0.3.jar
>> commons-pool-1.2.jar
>> concurrent-1.3.4.jar
>> geronimo-spec-j2ee-connector-1.5-rc4.jar
>> geronimo-spec-j2ee-management-1.0-rc4.jar
>> geronimo-spec-jms-1.1-rc4.jar
>> geronimo-spec-jta-1.0.1B-rc4.jar
>> groovy-all-1.0-jsr-02.jar
>> jaxp-1.3.jar
>> jencks-all-1.1.jar
>> jsr-223-1.0-pr.jar
>> junit.jar
>> lingo-1.0-M1.jar
>> mx4j-2.1.1.jar
>> mx4j-impl-2.1.1.jar
>> mx4j-jmx-2.1.1.jar
>> mx4j-remote-2.1.1.jar
>> mx4j-tools-2.1.1.jar
>> servicemix-2.0-SNAPSHOT.jar
>> spring-1.2.5.jar
>> stax-api-1.0.jar
>> stax-utils-snapshot-20040917.jar
>> wstx-asl-2.0.jar
>> xalan-2.6.0.jar
>> xbean-spring-2.0-SNAPSHOT.jar
>> xercesImpl-2.6.2.jar
>> xmlParserAPIs-2.6.2.jar
>>
>>
>> Any ideas? Could there be some other JAR that I'm missing or have the
>> wrong version of?
>>
>> Thanks,
>> Craig
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Guillaume Nodet wrote:
>>
>>> Some basic questions, but ...
>>> Have you removed from the classpath the old version of servicemix ?
>>> Do you use the latest snapshot ?
>>> If you answer yes to the two questions, could you please test if the
>>> MessageExchange
>>> are correctly serialized / deserialized.
>>> Using the following code:
>>>
>>>        MessageExchange me = new InOnlyImpl("exchangeId");
>>>        NormalizedMessage msg = me.createMessage();
>>>        me.setMessage(msg, "in");
>>>        msg.setContent(new StringSource("<hello>world</hello>"));
>>>        ByteArrayOutputStream baos = new ByteArrayOutputStream();
>>>        ObjectOutputStream oos = new ObjectOutputStream(baos);
>>>        oos.writeObject(me);
>>>        oos.close();
>>>              ByteArrayInputStream bais = new
>>> ByteArrayInputStream(baos.toByteArray());
>>>        ObjectInputStream ois = new ObjectInputStream(bais);
>>>        Object out = ois.readObject();
>>>       System.out.println(((MessageExchange)
>>> out).getMessage("in").getContent());
>>>       Could you check that the out object has a content ?
>>> If no, then one of the two previous questions is not correct ;) as
>>> this works perfectly for me.
>>>
>>> Cheers,
>>> Guillaume Nodet
>>>
>>> Craig Walls wrote:
>>>
>>>>
>>>> Incidentally...after all of that...I still can't seem to get the
>>>> content sent across container boundaries. In summary, here's what I
>>>> did:
>>>>
>>>> 1. Placed the 2.0 SNAPSHOT and those other 3 JARs in my classpath.
>>>> 2. Moved up to Java 5 to avoid the invalid class version error when
>>>> compiling
>>>> 3. Started up the services container.
>>>> 4. Rolled my own XmlWebApplicationContext that instantiates itself
>>>> with the XBeanProcessor.
>>>> 5. Deployed the web client.
>>>>
>>>> From all indications, the content that I'm setting on the client
>>>> side of the exchange never makes it to the service-side. Properties
>>>> make the trip, but the content does not.
>>>>
>>>> Any clues?
>>>>
>>>>
>>>> Craig Walls wrote:
>>>>
>>>>>
>>>>> Okay, I moved up to Java 1.5 and have the service-side of my
>>>>> example working with the 2.0 SNAPSHOT. I'm loading the container
>>>>> myself in Spring code that is similar to the code in
>>>>> org.servicemix.Main:
>>>>>
>>>>>    List processors = Arrays.asList(new Object[] { new
>>>>> XBeanProcessor() });
>>>>>    new ClassPathXmlApplicationContext(
>>>>>        "com/habuma/pig/service/service-container.xml", processors);
>>>>>
>>>>> But I run into a wrinkle with the client-side...You see, the client
>>>>> side of my example is web-based. Previously (with version 1.1), I
>>>>> had this in my web.xml file:
>>>>>
>>>>>  <servlet>
>>>>>    <servlet-name>pig</servlet-name>
>>>>>    
>>>>> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
>>>>>
>>>>>    <load-on-startup>1</load-on-startup>
>>>>>    <init-param>
>>>>>      <param-name>contextClass</param-name>
>>>>>      
>>>>> <param-value>org.servicemix.jbi.config.XmlWebApplicationContext</param-value>
>>>>>
>>>>>    </init-param>
>>>>>  </servlet>
>>>>>
>>>>> Now that I'm at 2.0, I figured that I should probably be using the
>>>>> XBean version of XmlWebApplicationContext...not a problem...
>>>>>
>>>>>    <init-param>
>>>>>      <param-name>contextClass</param-name>
>>>>>      
>>>>> <param-value>org.xbean.spring.context.XmlWebApplicationContext</param-value>
>>>>>
>>>>>    </init-param>
>>>>>
>>>>> But here's the problem...using "1.1 compatibility" I need to be
>>>>> able to set an XBeanProcessor on XmlWebApplicationContext, similar
>>>>> to what I did on the service side. Except that I don't instantiate
>>>>> XmlWebApplicationContext. DispatcherServlet has that honor.
>>>>> Therefore, there's no clear way to set the XBeanProcessor and so
>>>>> the XmlWebApplicationContext doesn't know how to parse the
>>>>> ServiceMix-specific context.
>>>>>
>>>>> There are a few options:
>>>>>
>>>>>    * My client's container doesn't have any of its own components,
>>>>> so I
>>>>>      suppose that I could use standard Spring XML to configure the
>>>>>      container. But if I decide to add a service to that container
>>>>> then
>>>>>      things get ugly.
>>>>>    * I could go put the appropriate property file in META-INF and
>>>>>      declare an xmlns in my XML to handle the ServiceMix-specific
>>>>>      stuff. But in my opinion the fact that ServiceMix is using XBean
>>>>>      should be as transparent to me as possible. Having to tweak my
>>>>> XML
>>>>>      to explicitly say that I'm using ServiceMix tags via XBean seems
>>>>>      kinda dirty to me.
>>>>>    * Perhaps a custom ServiceMix-specific DispatcherServlet could be
>>>>>      written that handles the creation of XmlWebApplicationContext
>>>>>      appropriately.
>>>>>    * Or perhaps (and maybe even better), the ServiceMix version of
>>>>>      XmlWebApplicationContext could extend the XBean version and
>>>>>      properly register the XBeanProcessor. This means I'd have to
>>>>>      change web.xml back to use the old ServiceMix-specific
>>>>>      XmlWebApplicationContext...but that's okay with me.
>>>>>
>>>>> What advice is there for me? Any ideas on how to deal with this? I
>>>>> favor the last option...here's what I've got that seems to do the
>>>>> trick:
>>>>>
>>>>> package org.servicemix.jbi.config;
>>>>>
>>>>> import java.util.Arrays;
>>>>>
>>>>> import org.servicemix.jbi.config.spring.XBeanProcessor;
>>>>>
>>>>> public class XmlWebApplicationContext extends
>>>>> org.xbean.spring.context.XmlWebApplicationContext {
>>>>>  public XmlWebApplicationContext() {
>>>>>    super(Arrays.asList(new Object[] { new XBeanProcessor() }));
>>>>>  }
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Guillaume Nodet wrote:
>>>>>
>>>>>> Hi All !
>>>>>>
>>>>>> A snapshot of ServiceMix 2.0 has been deployed at
>>>>>> http://dist.codehaus.org/servicemix/jars/servicemix-2.0-SNAPSHOT.jar
>>>>>> It includes a number of bug fixes, especially on cluster flow (for
>>>>>> Craig) and sendSync on pub/sub (for George).
>>>>>>
>>>>>> To use it on a 1.x distribution, you will need to put the jar at
>>>>>> the place of the old one (do not forget to remove the old one from
>>>>>> the classpath).
>>>>>> It works the same way, and you can access the compatibility mode
>>>>>> in the following way :
>>>>>>    ..\..\bin\servicemix -v1 servicemix.xml
>>>>>>
>>>>>> You will certainly encouter a number of ClassNotFoundException.
>>>>>> You will need to add the following jars to the classpath:
>>>>>>    http://dist.codehaus.org/xbean/jars/xbean-spring-2.0-SNAPSHOT.jar
>>>>>>    http://www.ibiblio.org/maven/springframework/jars/spring-1.2.5.jar
>>>>>>    
>>>>>> http://www.ibiblio.org/maven/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar 
>>>>>>
>>>>>>
>>>>>> Do not forget to remove the old spring jar from the classpath too.
>>>>>>
>>>>>> Enjoy !
>>>>>>
>>>>>> Cheers,
>>>>>> Guillaume Nodet
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] ServiceMix 2.0-SNAPSHOT

Craig Walls
In reply to this post by Guillaume Nodet-3

Okay, I just replaced the servicemix-2.0-SNAPSHOT.jar (I downloaded it
from the repository last night, but I don't know what the date on it
was) with the one that was placed in the repository at "02-Nov-2005
06:03" and my unit-test works. And...voila!...my own sample code works
with clustering as well.

Many many thanks...
Craig



Guillaume Nodet wrote:

> Then this must be the snapshot that is outdated. I'll upload a new one
> within an hour.
> In the mean time you can try with the exploded jars
> (servicemix-core-2.0-SNAPSHOT.jar, servicemix-jbi,
> servicemix-components).  They are more up to date.
>
> Cheers,
> Guillaume Nodet
>
> Craig Walls wrote:
>
>>
>> Okay, I gave this a shot...I took the chunk of code you gave below
>> and turned it into a unit-test. The TestCase I'm using is as follows:
>>
>> package com.habuma.sm.example;
>> import java.io.ByteArrayInputStream;
>> import java.io.ByteArrayOutputStream;
>> import java.io.ObjectInputStream;
>> import java.io.ObjectOutputStream;
>> import javax.jbi.messaging.MessageExchange;
>> import javax.jbi.messaging.NormalizedMessage;
>> import junit.framework.TestCase;
>> import org.servicemix.jbi.jaxp.StringSource;
>> import org.servicemix.jbi.messaging.InOnlyImpl;
>>
>> public class ServiceMixTest extends TestCase {
>>  public void testContentDelivery() {
>>    try {
>>      MessageExchange me = new InOnlyImpl("exchangeId");
>>      NormalizedMessage msg = me.createMessage();
>>      me.setMessage(msg, "in");
>>      msg.setContent(new StringSource("<hello>world</hello>"));
>>      ByteArrayOutputStream baos = new ByteArrayOutputStream();
>>      ObjectOutputStream oos = new ObjectOutputStream(baos);
>>      oos.writeObject(me);
>>      oos.close();
>>            ByteArrayInputStream bais = new
>> ByteArrayInputStream(baos.toByteArray());
>>      ObjectInputStream ois = new ObjectInputStream(bais);
>>      Object out = ois.readObject();
>>      assertNotNull("OUT EXCHANGE IS NULL", out);
>>      assertNotNull("OUT EXCHANGE'S IN MESSAGE IS NULL",
>> ((MessageExchange) out).getMessage("in"));
>>      assertNotNull("THE IN MESSAGE'S CONTENT IS NULL",
>> ((MessageExchange) out).getMessage("in").getContent());
>>    } catch (Exception e) {
>>      fail("Exception thrown:  " + e);
>>    }
>>
>>  }
>> }
>>
>> The test fails on the line that says "THE IN MESSAGE'S CONTENT IS NULL".
>>
>> As for my classpath, I'm certain that I have the
>> servicemix-2.0-SNAPSHOT.jar (and no other servicemix JAR). In fact,
>> here are all of the JARs in my classpath...basically everything in
>> the ServiceMix 1.1 lib directory, plus activeluster-1.1-SNAPSHOT.jar,
>> plus all of the JARs you recommended with the
>> servicemix-2.0-SNAPSHOT.jar.
>>
>> activation.jar
>> activecluster-1.1-SNAPSHOT.jar
>> activemq-3.2.jar
>> activemq-ra-3.2.jar
>> ant-1.6.jar
>> backport-util-concurrent-2.0_01_pd.jar
>> commons-beanutils-1.7.0.jar
>> commons-collections-3.1.jar
>> commons-logging-1.0.3.jar
>> commons-pool-1.2.jar
>> concurrent-1.3.4.jar
>> geronimo-spec-j2ee-connector-1.5-rc4.jar
>> geronimo-spec-j2ee-management-1.0-rc4.jar
>> geronimo-spec-jms-1.1-rc4.jar
>> geronimo-spec-jta-1.0.1B-rc4.jar
>> groovy-all-1.0-jsr-02.jar
>> jaxp-1.3.jar
>> jencks-all-1.1.jar
>> jsr-223-1.0-pr.jar
>> junit.jar
>> lingo-1.0-M1.jar
>> mx4j-2.1.1.jar
>> mx4j-impl-2.1.1.jar
>> mx4j-jmx-2.1.1.jar
>> mx4j-remote-2.1.1.jar
>> mx4j-tools-2.1.1.jar
>> servicemix-2.0-SNAPSHOT.jar
>> spring-1.2.5.jar
>> stax-api-1.0.jar
>> stax-utils-snapshot-20040917.jar
>> wstx-asl-2.0.jar
>> xalan-2.6.0.jar
>> xbean-spring-2.0-SNAPSHOT.jar
>> xercesImpl-2.6.2.jar
>> xmlParserAPIs-2.6.2.jar
>>
>>
>> Any ideas? Could there be some other JAR that I'm missing or have the
>> wrong version of?
>>
>> Thanks,
>> Craig
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Guillaume Nodet wrote:
>>
>>> Some basic questions, but ...
>>> Have you removed from the classpath the old version of servicemix ?
>>> Do you use the latest snapshot ?
>>> If you answer yes to the two questions, could you please test if the
>>> MessageExchange
>>> are correctly serialized / deserialized.
>>> Using the following code:
>>>
>>>        MessageExchange me = new InOnlyImpl("exchangeId");
>>>        NormalizedMessage msg = me.createMessage();
>>>        me.setMessage(msg, "in");
>>>        msg.setContent(new StringSource("<hello>world</hello>"));
>>>        ByteArrayOutputStream baos = new ByteArrayOutputStream();
>>>        ObjectOutputStream oos = new ObjectOutputStream(baos);
>>>        oos.writeObject(me);
>>>        oos.close();
>>>              ByteArrayInputStream bais = new
>>> ByteArrayInputStream(baos.toByteArray());
>>>        ObjectInputStream ois = new ObjectInputStream(bais);
>>>        Object out = ois.readObject();
>>>       System.out.println(((MessageExchange)
>>> out).getMessage("in").getContent());
>>>       Could you check that the out object has a content ?
>>> If no, then one of the two previous questions is not correct ;) as
>>> this works perfectly for me.
>>>
>>> Cheers,
>>> Guillaume Nodet
>>>
>>> Craig Walls wrote:
>>>
>>>>
>>>> Incidentally...after all of that...I still can't seem to get the
>>>> content sent across container boundaries. In summary, here's what I
>>>> did:
>>>>
>>>> 1. Placed the 2.0 SNAPSHOT and those other 3 JARs in my classpath.
>>>> 2. Moved up to Java 5 to avoid the invalid class version error when
>>>> compiling
>>>> 3. Started up the services container.
>>>> 4. Rolled my own XmlWebApplicationContext that instantiates itself
>>>> with the XBeanProcessor.
>>>> 5. Deployed the web client.
>>>>
>>>> From all indications, the content that I'm setting on the client
>>>> side of the exchange never makes it to the service-side. Properties
>>>> make the trip, but the content does not.
>>>>
>>>> Any clues?
>>>>
>>>>
>>>> Craig Walls wrote:
>>>>
>>>>>
>>>>> Okay, I moved up to Java 1.5 and have the service-side of my
>>>>> example working with the 2.0 SNAPSHOT. I'm loading the container
>>>>> myself in Spring code that is similar to the code in
>>>>> org.servicemix.Main:
>>>>>
>>>>>    List processors = Arrays.asList(new Object[] { new
>>>>> XBeanProcessor() });
>>>>>    new ClassPathXmlApplicationContext(
>>>>>        "com/habuma/pig/service/service-container.xml", processors);
>>>>>
>>>>> But I run into a wrinkle with the client-side...You see, the
>>>>> client side of my example is web-based. Previously (with version
>>>>> 1.1), I had this in my web.xml file:
>>>>>
>>>>>  <servlet>
>>>>>    <servlet-name>pig</servlet-name>
>>>>>    
>>>>> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
>>>>>
>>>>>    <load-on-startup>1</load-on-startup>
>>>>>    <init-param>
>>>>>      <param-name>contextClass</param-name>
>>>>>      
>>>>> <param-value>org.servicemix.jbi.config.XmlWebApplicationContext</param-value>
>>>>>
>>>>>    </init-param>
>>>>>  </servlet>
>>>>>
>>>>> Now that I'm at 2.0, I figured that I should probably be using the
>>>>> XBean version of XmlWebApplicationContext...not a problem...
>>>>>
>>>>>    <init-param>
>>>>>      <param-name>contextClass</param-name>
>>>>>      
>>>>> <param-value>org.xbean.spring.context.XmlWebApplicationContext</param-value>
>>>>>
>>>>>    </init-param>
>>>>>
>>>>> But here's the problem...using "1.1 compatibility" I need to be
>>>>> able to set an XBeanProcessor on XmlWebApplicationContext, similar
>>>>> to what I did on the service side. Except that I don't instantiate
>>>>> XmlWebApplicationContext. DispatcherServlet has that honor.
>>>>> Therefore, there's no clear way to set the XBeanProcessor and so
>>>>> the XmlWebApplicationContext doesn't know how to parse the
>>>>> ServiceMix-specific context.
>>>>>
>>>>> There are a few options:
>>>>>
>>>>>    * My client's container doesn't have any of its own components,
>>>>> so I
>>>>>      suppose that I could use standard Spring XML to configure the
>>>>>      container. But if I decide to add a service to that container
>>>>> then
>>>>>      things get ugly.
>>>>>    * I could go put the appropriate property file in META-INF and
>>>>>      declare an xmlns in my XML to handle the ServiceMix-specific
>>>>>      stuff. But in my opinion the fact that ServiceMix is using XBean
>>>>>      should be as transparent to me as possible. Having to tweak
>>>>> my XML
>>>>>      to explicitly say that I'm using ServiceMix tags via XBean seems
>>>>>      kinda dirty to me.
>>>>>    * Perhaps a custom ServiceMix-specific DispatcherServlet could be
>>>>>      written that handles the creation of XmlWebApplicationContext
>>>>>      appropriately.
>>>>>    * Or perhaps (and maybe even better), the ServiceMix version of
>>>>>      XmlWebApplicationContext could extend the XBean version and
>>>>>      properly register the XBeanProcessor. This means I'd have to
>>>>>      change web.xml back to use the old ServiceMix-specific
>>>>>      XmlWebApplicationContext...but that's okay with me.
>>>>>
>>>>> What advice is there for me? Any ideas on how to deal with this? I
>>>>> favor the last option...here's what I've got that seems to do the
>>>>> trick:
>>>>>
>>>>> package org.servicemix.jbi.config;
>>>>>
>>>>> import java.util.Arrays;
>>>>>
>>>>> import org.servicemix.jbi.config.spring.XBeanProcessor;
>>>>>
>>>>> public class XmlWebApplicationContext extends
>>>>> org.xbean.spring.context.XmlWebApplicationContext {
>>>>>  public XmlWebApplicationContext() {
>>>>>    super(Arrays.asList(new Object[] { new XBeanProcessor() }));
>>>>>  }
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Guillaume Nodet wrote:
>>>>>
>>>>>> Hi All !
>>>>>>
>>>>>> A snapshot of ServiceMix 2.0 has been deployed at
>>>>>> http://dist.codehaus.org/servicemix/jars/servicemix-2.0-SNAPSHOT.jar
>>>>>> It includes a number of bug fixes, especially on cluster flow
>>>>>> (for Craig) and sendSync on pub/sub (for George).
>>>>>>
>>>>>> To use it on a 1.x distribution, you will need to put the jar at
>>>>>> the place of the old one (do not forget to remove the old one
>>>>>> from the classpath).
>>>>>> It works the same way, and you can access the compatibility mode
>>>>>> in the following way :
>>>>>>    ..\..\bin\servicemix -v1 servicemix.xml
>>>>>>
>>>>>> You will certainly encouter a number of ClassNotFoundException.
>>>>>> You will need to add the following jars to the classpath:
>>>>>>    http://dist.codehaus.org/xbean/jars/xbean-spring-2.0-SNAPSHOT.jar
>>>>>>    
>>>>>> http://www.ibiblio.org/maven/springframework/jars/spring-1.2.5.jar
>>>>>>    
>>>>>> http://www.ibiblio.org/maven/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar 
>>>>>>
>>>>>>
>>>>>> Do not forget to remove the old spring jar from the classpath too.
>>>>>>
>>>>>> Enjoy !
>>>>>>
>>>>>> Cheers,
>>>>>> Guillaume Nodet
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] servicemix install - problems - help appreciated

Ranga Nathan
In reply to this post by Guillaume Nodet-3
Guillaume Nodet wrote:

> You need to add the jars contained in the "lib/optional" directory to
> your classpath.
> You can just move the jars in the "lib/optional" directory to the
> "lib" directory if you prefer.
>
I did this. I still had the same problem. I then unzipped the jar files
which created subdirectories with the classes in them. I set the
CLASSPATH to the lib directory. I still have the same problem. I wonder
if the pre-requisites have been satisfied? My CLASSPATH  had
/opt/servicemix/lib when I got this error. Would this work for
subdirectories within lib that contain the classes? Or do they need to
be enumerated?
Here is the error output. Thanks for the help.

Loading ServiceMix from servicemix.xml on the CLASSPATH
Exception in thread "main" java.lang.NoClassDefFoundError
        at
org.xbean.spring.context.impl.PropertyEditorHelper.class$(PropertyEditorHelper.java:33)
        at
org.xbean.spring.context.impl.PropertyEditorHelper.registerCustomEditors(PropertyEditorHelper.java:34)
        at
org.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.<clinit>(XBeanXmlBeanDefinitionParser.java:74)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:141)
        at
org.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader.class$(XBeanXmlBeanDefinitionReader.java:58)
        at
org.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader.<init>(XBeanXmlBeanDefinitionReader.java:58)
        at
org.xbean.spring.context.ClassPathXmlApplicationContext.loadBeanDefinitions(ClassPathXmlApplicationContext.java:166)
        at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:268)
        at
org.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:158)
        at
org.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:48)
        at org.servicemix.Main.main(Main.java:44)
Caused by: java.lang.ClassNotFoundException: javax.management.ObjectName
        at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:141)
        ... 13 more

> Btw, the CLASSPATH environment variable should contain a ";" or ":"
> separated list of
> locations. These locations should point to class files, not jars.
> So your CLASSPATH variable should looks like:
>   /opt/servicemix/lib/activemq-3.2.jar;/opt/servicemix/lib/...
> If you use the distribution, you also have the shell scripts in the
> "bin" directory that
> set the classpath for you and launch servicemix.
>
> Cheers,
> Guillaume Nodet
>
> Ranga Nathan wrote:
>
>>
>>
>> Guillaume Nodet wrote:
>>
>>> You should add the libraries in the optional dirs, especially the
>>> mx4j-xxx jars
>>> which are needed if you do not run under a j2se 5.
>>
>>
>>
>> I am sorry, I do not get this. I feel stupid. Could you break it down
>> for me? My java is not strong enough to understand this.
>> Thanks
>> Ranga Nathan
>>
>>>
>>> Cheers,
>>> Guillaume Nodet
>>>
>>> Ranga Nathan wrote:
>>>
>>>> I had problems installin servicemix but tried this 2.0 snapshot. I
>>>> was able to install. But when I run servicemix, I get the following
>>>> errors:
>>>> Loading ServiceMix from servicemix.xml on the CLASSPATH
>>>> Exception in thread "main" java.lang.NoClassDefFoundError
>>>>        at
>>>> org.xbean.spring.context.impl.PropertyEditorHelper.class$(PropertyEditorHelper.java:33)
>>>>
>>>>        at
>>>> org.xbean.spring.context.impl.PropertyEditorHelper.registerCustomEditors(PropertyEditorHelper.java:34)
>>>>
>>>>        at
>>>> org.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.<clinit>(XBeanXmlBeanDefinitionParser.java:74)
>>>>
>>>>        at java.lang.Class.forName0(Native Method)
>>>>        at java.lang.Class.forName(Class.java:141)
>>>>        at
>>>> org.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader.class$(XBeanXmlBeanDefinitionReader.java:58)
>>>>
>>>>        at
>>>> org.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader.<init>(XBeanXmlBeanDefinitionReader.java:58)
>>>>
>>>>        at
>>>> org.xbean.spring.context.ClassPathXmlApplicationContext.loadBeanDefinitions(ClassPathXmlApplicationContext.java:166)
>>>>
>>>>        at
>>>> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
>>>>
>>>>        at
>>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:268)
>>>>
>>>>        at
>>>> org.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:158)
>>>>
>>>>        at
>>>> org.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:48)
>>>>
>>>>        at org.servicemix.Main.main(Main.java:44)
>>>> Caused by: java.lang.ClassNotFoundException:
>>>> javax.management.ObjectName
>>>>        at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
>>>>        at java.security.AccessController.doPrivileged(Native Method)
>>>>        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
>>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
>>>>        at
>>>> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
>>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>>>>        at
>>>> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
>>>>        at java.lang.Class.forName0(Native Method)
>>>>        at java.lang.Class.forName(Class.java:141)
>>>>        ... 13 more
>>>>
>>>> The CLASS_PATH is set to the servicemix lib directory
>>>> (/opt/servicemix/lib)
>>>> ilt2:/opt/servicemix/bin # ls -lat $CLASS_PATH
>>>> total 7438
>>>> drwxr-xr-x  12 root root     416 2005-10-30 09:50 ..
>>>> drwxr-xr-x   3 root root     888 2005-10-30 08:49 .
>>>> drwxr-xr-x   2 root root     256 2005-10-30 08:49 optional
>>>> -rw-r--r--   1 root root 3444780 2005-10-27 01:01 activemq-3.2.jar
>>>> -rw-r--r--   1 root root   73568 2005-10-27 01:01 activemq-ra-3.2.jar
>>>> -rw-r--r--   1 root root  188671 2005-10-27 01:01
>>>> commons-beanutils-1.7.0.jar
>>>> -rw-r--r--   1 root root  559366 2005-10-27 01:01
>>>> commons-collections-3.1.jar
>>>> -rw-r--r--   1 root root   38015 2005-10-27 01:01
>>>> commons-logging-1.0.4.jar
>>>> -rw-r--r--   1 root root   42492 2005-10-27 01:01 commons-pool-1.2.jar
>>>> -rw-r--r--   1 root root  189284 2005-10-27 01:01 concurrent-1.3.4.jar
>>>> -rw-r--r--   1 root root   31514 2005-10-27 01:01
>>>> geronimo-spec-activation-1.0.2-rc4.jar
>>>> -rw-r--r--   1 root root   35858 2005-10-27 01:01
>>>> geronimo-spec-j2ee-connector-1.5-rc4.jar
>>>> -rw-r--r--   1 root root   18174 2005-10-27 01:01
>>>> geronimo-spec-j2ee-management-1.0-rc4.jar
>>>> -rw-r--r--   1 root root   30838 2005-10-27 01:01
>>>> geronimo-spec-jms-1.1-rc4.jar
>>>> -rw-r--r--   1 root root   13468 2005-10-27 01:01
>>>> geronimo-spec-jta-1.0.1B-rc4.jar
>>>> -rw-r--r--   1 root root  460330 2005-10-27 01:01 jencks-all-1.1.jar
>>>> -rw-r--r--   1 root root  387915 2005-10-27 01:01
>>>> servicemix-core-2.0-SNAPSHOT.jar
>>>> -rw-r--r--   1 root root   14943 2005-10-27 01:01
>>>> servicemix-jbi-2.0-SNAPSHOT.jar
>>>> -rw-r--r--   1 root root 1871868 2005-10-27 01:01 spring-1.2.5.jar
>>>> -rw-r--r--   1 root root  126771 2005-10-27 01:01 wsdl4j-1.5.1.jar
>>>> -rw-r--r--   1 root root   48380 2005-10-27 01:01
>>>> xbean-spring-2.0-SNAPSHOT.jar
>>>>
>>>> ilt2:/opt/servicemix/bin # echo $JAVA_HOME
>>>> /usr/lib/java/jsdk
>>>>
>>>>
>>>> Guillaume Nodet wrote:
>>>>
>>>>> Hi All !
>>>>>
>>>>> A snapshot of ServiceMix 2.0 has been deployed at
>>>>> http://dist.codehaus.org/servicemix/jars/servicemix-2.0-SNAPSHOT.jar
>>>>> It includes a number of bug fixes, especially on cluster flow (for
>>>>> Craig) and sendSync on pub/sub (for George).
>>>>>
>>>>> To use it on a 1.x distribution, you will need to put the jar at
>>>>> the place of the old one (do not forget to remove the old one from
>>>>> the classpath).
>>>>> It works the same way, and you can access the compatibility mode
>>>>> in the following way :
>>>>>    ..\..\bin\servicemix -v1 servicemix.xml
>>>>>
>>>>> You will certainly encouter a number of ClassNotFoundException.
>>>>> You will need to add the following jars to the classpath:
>>>>>    http://dist.codehaus.org/xbean/jars/xbean-spring-2.0-SNAPSHOT.jar
>>>>>    http://www.ibiblio.org/maven/springframework/jars/spring-1.2.5.jar
>>>>>    
>>>>> http://www.ibiblio.org/maven/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar 
>>>>>
>>>>>
>>>>> Do not forget to remove the old spring jar from the classpath too.
>>>>>
>>>>> Enjoy !
>>>>>
>>>>> Cheers,
>>>>> Guillaume Nodet
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: [servicemix-user] servicemix install - problems - help appreciated

John Hurst-6
Ranga,

As Guillaume said in his note, you need to include each JAR file in your
CLASSPATH -- it doesn't work simply to point CLASSPATH at a directory
containing JARs.  (It does work to point it at a directory containing
classes.)

You might like to read the documentation at
  http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/classpath.html
(Windows)
  http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/classpath.html (UNIX)

John Hurst
Wellington, New Zealand

> -----Original Message-----
> From: Ranga Nathan [mailto:[hidden email]]
> Sent: Saturday, 5 November 2005 16:05
> To: [hidden email]
> Subject: Re: [servicemix-user] servicemix install - problems - help
> appreciated
>
> Guillaume Nodet wrote:
>
> > You need to add the jars contained in the "lib/optional" directory to
> > your classpath.
> > You can just move the jars in the "lib/optional" directory to the
> > "lib" directory if you prefer.
> >
> I did this. I still had the same problem. I then unzipped the jar files
> which created subdirectories with the classes in them. I set the
> CLASSPATH to the lib directory. I still have the same problem. I wonder
> if the pre-requisites have been satisfied? My CLASSPATH  had
> /opt/servicemix/lib when I got this error. Would this work for
> subdirectories within lib that contain the classes? Or do they need to
> be enumerated?
> Here is the error output. Thanks for the help.
>

Loading...