AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
#Operatingsystems
#Servers
 View Only
  • 1.  Java 1.3 v/s Java 1.4 URGENT ***

    Posted 09/07/06 03:02 PM

    Originally posted by: SystemAdmin



    Hi,
    We have the following setup:

    Test server:
    ************
    OS: AIX 5
    Java: 14
    MQ: 5.3

    Production server:
    ******************
    OS: AIX 4
    Java: 131
    MQ: 5.3

    We have this simple java app which listens to MQ, converts XML to ASCII, sends reply back to MQ about the status of conversion.

    On Test server everything is fine.

    On Production, we are getting problems due to older version of Java (131).

    First problem we got:
    Exception in thread "main" java.lang.NoClassDefFoundError: org/w3c/dom/Node
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:262)
    at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:327)
    at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:457)
    at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
    at org.apache.log4j.Logger.getLogger(Logger.java:104)
    at com.wellpoint.medadvantage.MedicareAdvantageApp.<clinit>(MedicareAdvantageApp.java:18)

    Resolved by including xml.jar from java14 to classpath of the application.

    Next problem we are getting is

    2006-09-07 11:04:53,970 INFO main MedAdvantageServiceActivator - Listener started to listen for 30000 ms.
    2006.09.07 11:04:54 MQJMS1034E MessageListener threw: java.lang.NoSuchMethodError: java.lang.String: method replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; not found
    2006.09.07 11:04:55 MQJMS1034E MessageListener threw: java.lang.NoSuchMethodError: java.lang.String: method replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; not found
    2006.09.07 11:04:55 MQJMS1034E MessageListener threw: java.lang.NoSuchMethodError: java.lang.String: method replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; not found
    2006.09.07 11:04:55 MQJMS1034E MessageListener threw: java.lang.NoSuchMethodError: java.lang.String: method replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; not found
    2006.09.07 11:04:55 MQJMS1034E MessageListener threw: java.lang.NoSuchMethodError: java.lang.String: method replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; not found
    2006.09.07 11:04:55 MQJMS1022E failed to redirect message

    This is basically on the onMessage() method.

    Can anybody help me with how to resolve this. I am wondering if MQ 5.3 is compatible with Java131.
    If not, what must be done ?

    Please help,
    Thanks,
    apjwp
    #AIX-Forum


  • 2.  Re: Java 1.3 v/s Java 1.4 URGENT ***

    Posted 09/07/06 03:19 PM

    Originally posted by: SystemAdmin


    Why not just put Java 1.4 on the box as well. You can have both instances intalled at the same time and run some applications with one and some with the other. I don't know what MQ requirements are, you would need to talk to IBM Software group on that one. Make sure when you apply Java 1.4 that you put on the latest maintenance, or whatever is supported by MQ (maybe the level you have working).

    The packaging of Jar files changed some between releases 1.3 and 1.4 and Sun made some changes to the spec that can cause problems.
    #AIX-Forum


  • 3.  Re: Java 1.3 v/s Java 1.4 URGENT ***

    Posted 09/07/06 04:47 PM

    Originally posted by: SystemAdmin


    Hi,
    Thanks for the suggestion.

    Installing Java 1.4 on the Production involves lot of prodedures and time consuming at the place where i am working. So this will be the last option.

    One thing untried was re-compile the program with Java1.3, clear all non-runtime exceptions and then go for run-time exceptions.

    Previously i was running program on 1.3 which was compiled in 1.4

    Please keep posting your suggestions.
    #AIX-Forum


  • 4.  Re: Java 1.3 v/s Java 1.4 URGENT ***

    Posted 09/07/06 05:02 PM

    Originally posted by: SystemAdmin


    Remember that compiling in Java is not like compiling a C program. You are simply creating byte code. I haven't seen this fix problems, normally the issue isn't in the code, but in the location of the class files or in support for a particular function. Or is this a new method added in Java 1.4? I'm not sure but that would be something to check.

    A quick google search of replaceall shows the Java 1.4.2 documentation first. Other items say it is generally a method to avoid.

    http://www.javapractices.com/Topic80.cjp
    Seems to indicate this is only available in Java 1.4 and not earlier

    Based on this, I'm thinking that you won't get this to work with 1.3.1.
    #AIX-Forum


  • 5.  Re: Java 1.3 v/s Java 1.4 URGENT ***

    Posted 09/07/06 07:13 PM

    Originally posted by: SystemAdmin


    Thanks much again.

    As you said replaceAll is in 1.4 only. I have already written my own code for that.

    Some Exception constructors are also new in 1.4. I fixed them.

    Finally we were using java.util.regex from 1.4, I am looking at jakarta-oro as an option for this and working on it.

    Hopefully then i'll be out of all non-runtime exceptions. Luckily if we dont get any non-runtime exceptions, we should be fine.
    #AIX-Forum


  • 6.  Re: Java 1.3 v/s Java 1.4 URGENT ***

    Posted 09/08/06 12:23 PM

    Originally posted by: SystemAdmin


    Hi,
    The issue is resolved. Anybody can contact me or us this thread if they are downgrading from Java 1.4 to Java 1.3. It has not much to do with MQ and AIX.

    Thanks,
    apjwp
    #AIX-Forum


  • 7.  Re: Java 1.3 v/s Java 1.4 URGENT ***

    Posted 10/16/06 11:52 AM

    Originally posted by: SystemAdmin


    What was the solution, I am encountering the same issue.

    Thanks.
    #AIX-Forum


  • 8.  Re: Java 1.3 v/s Java 1.4 URGENT ***

    Posted 10/16/06 12:02 PM

    Originally posted by: SystemAdmin


    Please go through all the replies, you'll find the answer.

    Thanks,
    apjwp
    #AIX-Forum