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 via email to