3 Replies Latest reply on Oct 19, 2006 6:28 PM by flindet

    Null or empty p_xmlString using TestJBossESB.sh in Cygwin

    flindet Newbie

      Hello,

      I'm trying the basic testJBossESB with JBossESB 4.0 Beta 1 MP1 from subversion.

      I'm on windows with cygwin, using Java 1.5.0_09. First of all, I had to make a number of changes to the testJBossESB.sh to find the jars in the proper path, to add the jbossts-common.jar, and to get the script to execute with cygwin.

      Here is my testJbossESB.sh after changes:

      #!/bin/sh
      
      ESB_HOME=/cygdrive/c/Eclipse/workspace/JBossESB4.0Beta1MP1
      export ESB_HOME
      
      JBOSS_HOME=/cygdrive/c/JBoss/jboss-4.0.4.GA
      export JBOSS_HOME
      
      JAVA_HOME=/cygdrive/c/Java/jdk1.5.0_09
      export JAVA_HOME
      
      PATH=$PATH:$JAVA_HOME/bin
      export PATH
      
      cygwin=false;
      case "`uname`" in
       CYGWIN*)
       cygwin=true
       ;;
      esac
      
      # For Cygwin, ensure paths are in UNIX format before anything is touched
      if $cygwin ; then
       [ -n "$JBOSS_HOME" ] &&
       JBOSS_HOME=`cygpath --unix "$JBOSS_HOME"`
       [ -n "$JAVA_HOME" ] &&
       JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
       [ -n "$ESB_HOME" ] &&
       ESB_HOME=`cygpath --unix "$ESB_HOME"`
      fi
      
      CLASSPATH="$ESB_HOME/product/build/dist/lib/jbossesb-services.jar:$ESB_HOME/product/build/dist/lib/jbossesb-rosetta.jar:$ESB_HOME/product/build/dist/lib/jbossesb-listeners.jar:$ESB_HOME/product/lib/ext/jbossts-common.jar:$JBOSS_HOME/client/jbossall-client.jar:$JBOSS_HOME/client/log4j.jar:$JBOSS_HOME/client/jboss-aspect-jdk50-client.jar:$JBOSS_HOME/client/jboss-aop-jdk50-client.jar:$JBOSS_HOME/client/jboss-ejb3-client.jar:."
      
      if $cygwin ; then
       CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
      fi
      
      java -classpath "$CLASSPATH" org.jboss.soa.esb.listeners.GpListener paramsDir/FileMoverConfigExampleJason.xml
      


      When I try to execute this, I get:

      16:03:37,112 INFO ParamFileRepository:75 - Setting parameter repository root dir to [c:\Eclipse\workspace\JBossESB4.0Beta1MP1\product\samples\TestJBossESB\.].
      Exception in thread "main" java.lang.IllegalArgumentException: Null or empty 'p_xmlString' arg in call.
       at org.jboss.soa.esb.helpers.DomElement.fromXml(DomElement.java:182)
       at org.jboss.soa.esb.listeners.GpListener.getListenerConfig(GpListener.java:230)
       at org.jboss.soa.esb.listeners.GpListener.<init>(GpListener.java:180)
       at org.jboss.soa.esb.listeners.GpListener.main(GpListener.java:79)
      


      I added the jbossts-common.jar to the testJBossESB.bat and it ran fine. My testJBossESB.bat looks like:

      SET ESB_HOME=c:\Eclipse\workspace\JBossESB4.0Beta1MP1
      SET JBOSS_HOME=C:\JBoss\jboss-4.0.4.GA
      
      java -cp %ESB_HOME%/product/build/dist/lib/jbossesb-services.jar;%ESB_HOME%/product/build/dist/lib/jbossesb-rosetta.jar;%ESB_HOME%/product/build/dist/lib/jbossesb-listeners.jar;%ESB_HOME%/product/lib/ext/jbossts-common.jar;%JBOSS_HOME%/client/jbossall-client.jar;%JBOSS_HOME%/client/log4j.jar;%JBOSS_HOME%/client/jboss-aspect-jdk50-client.jar;%JBOSS_HOME%/client/jboss-aop-jdk50-client.jar;%JBOSS_HOME%/client/jboss-ejb3-client.jar;. org.jboss.soa.esb.listeners.GpListener paramsDir/FileMoverConfigExample.xml
      


      I believe that my problem may be related to how the "parameter repository root dir" is being set in the cygwin environment (notice the colon and backslashes that could be a problem). Is there anything I can do to fix this? Is this a bug?

      Thanks for any advice.

      P.S. Even though the JBossESB is in my Eclipse workspace due to a checkout from within Eclipse, I'm running all of this command-line for the moment, and not from within Eclipse.