9 Replies Latest reply on Jun 11, 2004 3:28 PM by Dan Meany

    JBoss on IBM Mainframe under z/OS

    David Wells Newbie

      Has anyone tried running JBoss on an IBM Mainframe under z/OS or OS/390? If so, did you use the 1.3.1 or 1.4 JDK? What version of JBoss?


        • 1. Re: JBoss on IBM Mainframe under z/OS
          Suchin Gupta Newbie

          Did anyone reply to this one? We are interested to do the same

          • 2. Re: JBoss on IBM Mainframe under z/OS
            Marty Urbanek Newbie

            I have been trying to get Jboss 2.4.4 Tomcat 3.2.3 bundle to run on z/OS 1.2 and JDK 1.3.1.

            I am using the default config, i.e. straight out of the zip file.

            Parts of it try to start but it chokes on several "java.net.BindException: EDC8115I Address already in use." errors trying to start WebService, ConfigurationService and EmbeddedTomcatServiceSX. I do not know what ports these services want, but I do not think the ports are already in use (just looking at ports used by Jboss under Win2k). Anybody know where I can configure which ports Jboss is trying to use?

            I also get errors like:

            org.jboss.mq.xml.XElementException: Parse Error: org.xml.sax.SAXParseException:
            Character conversion error: "Unconvertible UTF-8 character beginning with 0xa7"

            for StateManager and ConfigurationService as well as when it tries to deploy EAR files. I am pretty sure this has to do with the XML files embedded in the EARs being extracted into the "wrong" (or unexpected) character encoding, but I don't know what to do about it.

            It really seems like it is pretty close to running, except for these few errors (many more successful status messages than failures).

            ANY IDEAS OR EXPERIENCE APPRECIATED. If everybody would chip in their two cents maybe we could all get this working.


            • 3. Re: JBoss on IBM Mainframe under z/OS
              Marty Urbanek Newbie

              I have made some progress, in that I can get it to start up and deploy tomcat-test.ear without any java exceptions being displayed.

              There is definitely a server talking because I see the ports open and if I connect to port 8080, I receive a nicely formatted 404 error.

              If I connect to port 8082, I receive a browser window full of garbage, however if I look at that garbage in hex, it is actually the "Agent View" page, but encoded in EBCDIC. Everything is in EBCDIC, including the "HTTP/1.0 200" header and the entire Agent View page.

              This is so close but yet so far. Can anybody help me solve this?

              Sorry I am using an older distribution, but I have this version running on other systems and therefore I want to compare apples to apples. But not EBCDIC apples!

              THANKS in advance.

              • 4. Re: JBoss on IBM Mainframe under z/OS
                Marty Urbanek Newbie

                I have been experimenting with the java system property file.encoding, but so far have not found a setting that will allow Jboss to start (other than the default Cp1047).

                • 5. Re: JBoss on IBM Mainframe under z/OS
                  Dan Meany Newbie

                  I was able to get JBoss 3.x apparently running (a servlet works) on OS/390 (z/OS) OMVS by uploading everything in my JBoss windows directories as a binary tar (preserving the ascii encoding of the xml files and not converting to EBCDIC), then setting the system properties in run.sh as if it was Windows:

                  JAVA_OPTS="$JAVA_OPTS -Dsun.io.unicode.encoding=UnicodeLittle -Dfile.encoding=Cp1252 -Djava.compiler=NONE"

                  This is using the same IBM JDK 1.3.1 to run JBoss that runs my app on Websphere on Z/OS. The console output is in ascii, which is viewable on the OMVS console as garbage, but you can ftp download server.log as binary and view it in Notepad. You could also probably write a ascii-to-EBCDIC conversion program in java easily and pipe the JBoss console output thru it to view it in OMVS.

                  I still have some work to do with the EJB deployment so there may be other issues I havent encountered yet.

                  Anyone else have any caveats to share?

                  • 6. Re: JBoss on IBM Mainframe under z/OS
                    Dan Meany Newbie

                    My ejb app is now working on z/OS using JBoss 3.x, but I had to go to the IBM 1.4 vm instead of the IBM 1.3.1 vm. This is due to a message I was getting about "class violated loader constraints" during EJB access which seems to be due to an issue in the IBM 1.3.1 vm. This plus doing everything in ascii instead of ebcdic (uploading all config and xml files as binary from windows, and setting the system properties listed in my last post) seems to be the key. The reason is there are alot of 3rd party libraries both in JBoss and that I am using in my app not all of which I am entirely confident will always handle all the character conversions correctly if I don't stick with ascii. I also needed to make sure I deleted the server/default/tmp directory if it originally came from somewhere else.

                    • 7. Re: JBoss on IBM Mainframe under z/OS
                      Dan Meany Newbie

                      Here is some additional information that may be useful setting up a connection to DB2 under JBoss 3.x on z/OS, using IBM's native driver. I used these connection parameters:

                      ConnectionURL: jdbc:db2os390sqlj:<db location name>
                      DriverClass: COM.ibm.db2os390.sqlj.jdbc.DB2SQLJDriver

                      Set these paths (appropriate to your setup) in run.sh so that the driver can find its .so (library path) and .ser (looks in regular classpath) files:

                      -Djava.library.path=/V1R4W/usr/lpp/db2/db2710/lib/ \
                      "$JBOSS_CLASSPATH":/V1R4W/usr/lpp/db2/db2710/classes/ \

                      Also, db2j2classes.zip (IBM's JDBC driver classes) goes in /roi_web/jboss/server/default/lib, but you may need to remove the java.* packages from it since JBoss already has these and they can cause a classloader conflict.

                      • 8. Re: JBoss on IBM Mainframe under z/OS
                        Dan Meany Newbie

                        that should read "...remove the javax.* packages from it..."

                        • 9. Re: JBoss on IBM Mainframe under z/OS
                          Dan Meany Newbie

                          If you change the default encoding of the VM as I suggested above, console output is in ascii. If you want to see it without downloading the server log file you can convert the output stream to EBCDIC so that you can view it in a telnet console for instance. You can pipe the output thru a filter program something like this. It also works for nohup.out. In run.sh add:

                          org.jboss.Main "$@" \
                          | java -classpath . test.Convstream

                          package test;
                          // Convert from one encoding to another
                          public class Convstream {
                           public static void main(String[] args) {
                           if (args.length == 1 && "-?".equals(args[0])) {
                           Object[] a =
                           for (int i = 0; i < a.length; i++)
                           System.out.println(i + ": " + a);
                           System.out.println("Syntax: <from-codepage> <to-codepage>");
                           String cp1;
                           String cp2;
                           if (args.length < 2) {
                           cp1 = "Cp1252"; // pc
                           cp2 = "Cp1047"; // ebcdic (The IBM VM has this, but not the Sun one) // or Cp500
                           } else {
                           cp1 = args[0];
                           cp2 = args[1];
                           try {
                           while (true) {
                           int i = System.in.available();
                           if (i == -1) break;
                           if (i > 0) {
                           byte [] b1 = new byte;
                           String s1 = new String(b1, cp1);
                           byte[] b2 = s1.getBytes(cp2);
                           } catch (Exception e) {