Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-5871

JBoss EAP 5.1 RPM links cause CNF exceptions when using twiddle

    XMLWordPrintable

Details

    • Hide

      Install JBoss EAP 5.1 from RHN

      • add jbappplatform-5-x86_64-server-5-rpm channel
      • yum -y install jbossas

      Start JBoss EAP 5.1
      cd $JBOSS_HOME/bin/
      ./twiddle.sh -s localhost:1099 -u admin -p admin get jboss.system:type=ServerInfo

      Show
      Install JBoss EAP 5.1 from RHN add jbappplatform-5-x86_64-server-5-rpm channel yum -y install jbossas Start JBoss EAP 5.1 cd $JBOSS_HOME/bin/ ./twiddle.sh -s localhost:1099 -u admin -p admin get jboss.system:type=ServerInfo
    • Hide

      1) cp /usr/share/java/jbossas/jbossall-client-5.1.0.jar /usr/share/jbossas/client/jbossall-client.jar
      2) Edit $JBOSS_HOME/bin/twiddle.sh, add the JBOSSALL_CLIENT_JAR line and change the line with the jbossall-client.jar as shown below:

      JBOSSALL_CLIENT_JAR_PATH=/usr/share/jbossas/client

      if [ "x$JBOSS_CLASSPATH" = "x" ]; then
      JBOSS_CLASSPATH="$JBOSS_BOOT_CLASSPATH"
      JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSSALL_CLIENT_JAR_PATH/jbossall-client.jar"
      JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/client/getopt.jar"
      JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
      JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/lib/jboss-jmx.jar"
      JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/lib/dom4j.jar"
      else
      JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_BOOT_CLASSPATH"
      fi

      Show
      1) cp /usr/share/java/jbossas/jbossall-client-5.1.0.jar /usr/share/jbossas/client/jbossall-client.jar 2) Edit $JBOSS_HOME/bin/twiddle.sh, add the JBOSSALL_CLIENT_JAR line and change the line with the jbossall-client.jar as shown below: JBOSSALL_CLIENT_JAR_PATH=/usr/share/jbossas/client if [ "x$JBOSS_CLASSPATH" = "x" ]; then JBOSS_CLASSPATH="$JBOSS_BOOT_CLASSPATH" JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSSALL_CLIENT_JAR_PATH/jbossall-client.jar" JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/client/getopt.jar" JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/client/log4j.jar" JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/lib/jboss-jmx.jar" JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/lib/dom4j.jar" else JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_BOOT_CLASSPATH" fi
    • Not Required

    Description

      The twiddle.sh sets up its classpath to include $JBOSS_HOME/jbossall-client.jar. This jbossall-client.jar is a link to
      /usr/share/java/jbossas/jbossall-client.jar which is a link to /usr/share/java/jbossas/jbossall-client-5.1.0.jar.

      The problem is in EAP >= 5, the jbossall-client.jar no longer includes any classes, to reduce the download size, the jbossall-client.jar just uses the MANIFEST.MF to specify the Class-Path which points to the jars in the $JBOSS_HOME/client directory. When using the rpm, the jars in the jbossall-client.jar classpath are in /usr/share/jbossas/client/ which has jars which are links to /usr/share/java/

      So the jbossall-client.jar needs to be in a directory with the jars it references, and in testing, it seemed having a jbossall-client.jar which is a link in the directory with the jars it referenced did not seem to work correctly.

      if [ "x$JBOSS_CLASSPATH" = "x" ]; then
      JBOSS_CLASSPATH="$JBOSS_BOOT_CLASSPATH"
      JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/jbossall-client.jar"
      JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/client/getopt.jar"
      JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
      JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/lib/jboss-jmx.jar"
      JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/lib/dom4j.jar"
      else
      JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_BOOT_CLASSPATH"
      fi

      Running twiddle command such as ./twiddle.sh -s localhost:1099 -u admin -p admin get jboss.system:type=ServerInfo
      results in:

      Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/util/NestedException
      at java.lang.ClassLoader.defineClass1(Native Method)
      ...

      Attachments

        Activity

          People

            pjanouse@redhat.com Pavel Janousek
            rhn-support-bmaxwell Brad Maxwell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: