PSO Toolkit Installation (Linux) - ClassNotFoundException for java.lang.StringBuilder

I am trying to install the PSO Toolkit for Rhythmyx 6.5, and am getting an error. I have set up the environment variables per the instructions in this forum from Dave ("Installing the PSO Toolkit on Linux, 7/22/08) , but am still seeing this error:

[cntmgtdev-00-ah.mathworks.com:/local/apps/cms60dev/PSOToolkitInstall]3 % ant -f deploy.xml
Buildfile: deploy.xml

dist:
[echo] Installing PSOToolkit to /local/apps/cms60dev

jarcopy:

installExtensions:
[java] Exception in thread “main” java.lang.NoClassDefFoundError: while resolving class: com.percussion.util.PSExtensionInstallTool
[java] at java.lang.ClassLoader.resolveClass0(java.lang.Class) (/lib/ssa/libgcj.so.4.0.0)
[java] at java.lang.Class.initializeClass() (/lib/ssa/libgcj.so.4.0.0)
[java] at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/lib/ssa/libgcj.so.4.0.0)
[java] at java.lang.Class.forName(java.lang.String) (/lib/ssa/libgcj.so.4.0.0)
[java] at gnu.gcj.runtime.FirstThread.run() (/lib/ssa/libgcj.so.4.0.0)
[java] at _Jv_ThreadRun(java.lang.Thread) (/lib/ssa/libgcj.so.4.0.0)
[java] at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/lib/ssa/libgcj.so.4.0.0)
[java] at __libc_start_main (/lib/tls/libc-2.3.2.so)
[java] Caused by: java.lang.ClassNotFoundException: java.lang.StringBuilder not found in [file:/local/apps/cms60dev/AppServer/server/rx/deploy/rxapp.ear/rxapp.war/WEB-INF/lib/commons-collections-3.1.jar, file:/local/apps/cms60dev/AppServer/server/rx/deploy/rxapp.ear/rxapp.war/WEB-INF/lib/commons-collections-testframework-3.1.jar, file:/local/apps/cms60dev/AppServer/server/rx/deploy/rxapp.ear/rxapp.war/WEB-INF/lib/commons-httpclient-2.0.2.jar, file:/local/apps/cms60dev/AppServer/server/rx/deploy/rxapp.ear/rxapp.war/WEB-INF/lib/commons-lang-2.1.jar, file:/local/apps/cms60dev/AppServer/server/rx/deploy/rxapp.ear/rxapp.war/WEB-INF/lib/jcr-1.0.jar, file:/local/apps/cms60dev/AppServer/server/rx/deploy/rxapp.ear/rxapp.war/WEB-INF/lib/rxutils.jar, file:/local/apps/cms60dev/AppServer/server/rx/deploy/rxapp.ear/rxapp.war/WEB-INF/lib/rxclient.jar, file:/local/apps/cms60dev/AppServer/server/rx/deploy/rxapp.ear/rxapp.war/WEB-INF/lib/rxserver.jar, file:/local/apps/cms60dev/AppServer/server/rx/deploy/rxapp.ear/rxapp.war/WEB-INF/lib/rxservices.jar, file:/local/apps/cms60dev/AppServer/server/rx/deploy/rxapp.ear/rxapp.war/WEB-INF/lib/commons-logging-1.1.jar, file:/local/apps/cms60dev/AppServer/lib/endorsed/xml-apis.jar, file:/local/apps/cms60dev/AppServer/server/rx/lib/javax.servlet.jar, core:/]
[java] at java.net.URLClassLoader.findClass(java.lang.String) (/lib/ssa/libgcj.so.4.0.0)
[java] at gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String) (/lib/ssa/libgcj.so.4.0.0)
[java] at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/lib/ssa/libgcj.so.4.0.0)
[java] at _Jv_FindClass(_Jv_Utf8Const, java.lang.ClassLoader) (/lib/ssa/libgcj.so.4.0.0)
[java] at _Jv_PrepareCompiledClass(java.lang.Class) (/lib/ssa/libgcj.so.4.0.0)
[java] at _Jv_WaitForState(java.lang.Class, int) (/lib/ssa/libgcj.so.4.0.0)
[java] at java.lang.ClassLoader.linkClass0(java.lang.Class) (/lib/ssa/libgcj.so.4.0.0)
[java] at java.lang.ClassLoader.resolveClass0(java.lang.Class) (/lib/ssa/libgcj.so.4.0.0)
[java] …7 more
[java] Java Result: 1

javadoc:

BUILD SUCCESSFUL
Total time: 1 second
[cntmgtdev-00-ah.mathworks.com:/local/apps/cms60dev/PSOToolkitInstall]4 %

Here are the environment variables I’m defining:


setenv RHYTHMYX_HOME /local/apps/cms60dev
setenv JAVA_HOME $RHYTHMYX_HOME/JRE
setenv ANT_HOME $RHYTHMYX_HOME/Patch/InstallToolkit
setenv PATH $RHYTHMYX_HOME/JRE/bin:$PATH

My java version is this:


cntmgtdev-00-ah.mathworks.com:/home/rhythmyx]6 % java -version
java version "1.5.0_12"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
Java HotSpot(TM) Client VM (build 1.5.0_12-b04, mixed mode)

Can anyone provide any clues on this? Seems like it should find java.lang.StringBuilder in the JRE with no problem, but obviously something’s not configured correctly…

-Kathleen

Kathleen,

Your stack trace indicates that you are still using GNU Java (e.g. gcj) not the Sun JRE.

One thing I noticed is that you called “setenv” but you did not “export” the symbols.

What shell are you using ?

If this is standard Linux BASH (Bourne Again Shell), then try:

export RHYTHMYX_HOME=/local/apps/cms60dev

Dave

Aha, so it’s using GNU Java, not the JRE that I’m pointing to with JAVA_HOME (/local/apps/cms60dev/JRE)?

The shell I’m using is tcsh. When I try the export command, I get

export: Command not found.

My understanding is that setenv is the equivalent of export in tcsh. When I do printenv, the environment variables that I set up are visible there:


...
PATH=/local/apps/cms60dev/JRE/bin:/usr/bin/X11:/home/rhythmyx:/home/rhythmyx/bin:/home/rhythmyx/bin/i686:/usr/local/bin:/hub/i686/bin:/hub/share/bin:/hub/bin:/hub/bat/share/bin:.:/usr/bin:/bin:/usr/sbin:/sbin:/usr/etc:/etc:/usr/ucb:/usr/bin
...
RHYTHMYX_HOME=/local/apps/cms60dev
JAVA_HOME=/local/apps/cms60dev/JRE
ANT_HOME=/local/apps/cms60dev/Patch/InstallToolkit

The JAVA_HOME variable points to a Sun JRE (assuming that you installed Rhythmyx at /local/apps/cms60dev).

The problem is that the invocation of Ant launches a new shell, and this new shell isn’t picking up the environment correctly.

I’m not a C Shell expert, but you’re correct that C Shell (and presumably tcsh and zsh) doesn’t have an export command.

Try adding the setenv commands to your .cshrc and then either log out/log in or type “source .cshrc”. That might make a difference.

Dave

OK, I see what you’re saying - I need to make sure the ant-invoked session has got the definitions.

I tried

  • assigning the environment variables interactively
  • putting them into the .cshrc, logging out and back in

Both produce the same results and the same error.

Please let me know if you have any further ideas on this - I will dig some more myself into how the ANT invocation is working.

Thanks,
Kathleen

Just checking…do you have both an .cshrc and a .tcshrc file? If so, then only the .tschrc file is read. Also make sure that there’s nothing funny in the global files (/etc/csh.cshrc and /etc/csh.login).

Any chance you can temporarily use another shell (bash or ksh) interactively to run this command?

I don’t see anything else wrong with your setup, but as I said, I’m not a C Shell expert.

Dave

Thanks for this suggestion Dave - I suspect something in /etc/ant.conf was the culprit. I got the installation to work by doing this:

  1. Set environment variables in .cshrc:
setenv RHYTHMYX_HOME /local/apps/cms60dev
setenv JAVA_HOME /local/apps/cms60dev/JRE
setenv ANT_HOME /local/apps/cms60dev/Patch/InstallToolkit
setenv PATH /local/apps/cms60dev/JRE/bin:$PATH

  1. Run ant with explicit path and --noconfig argument:
$ANT_HOME/bin/ant -f --noconfig /local/apps/cms60dev/PSOToolkitInstall/deploy.xml

The --noconfig makes it suppress sourcing of /etc/ant.conf, which does have the line ANT_HOME=/usr/share/ant, so I assume that was interfering with my settings.

One additional question - how do I make these installed extensions available in my workbench? I don’t see them in the System Design view. Do I need to register them?

-Kathleen

Kathleen,

The install process should have run the “installExtensions” target, which registers the extensions (so that you see them in the workbench). This will print out a line for each extension as it registered it.

Did you restart your server? The extensions don’t show up until you restart.

Dave

The server restart took care of it - I can see the new extensions now.

Thanks for all your help, Dave.

(You can take all these questions from me as suggestions for how to improve the PSO Toolkit installation instructions - another task for your copious free time… :wink:

-Kathleen