files developed on JDK1.2.2 (Weblogic 5.1) vs JDK1.3(Solaris)


EJB programming & troubleshooting: files developed on JDK1.2.2 (Weblogic 5.1) vs JDK1.3(Solaris)

  1. hi,
     We had developed some Java class files using JDK1.2.2 on WebLogic 5.1(on Win Nt) , but now when I am trying to run them on WebLogic 5.1 with JDK1.3 on Solaris it gives the error that :
    "cannot access CLASSFILENAME
    bad class file "
    After this if we compile the class again, it is able to read it. I have checked my classpath the class file is in the appropriate location.
    One more thing is that I have developed using JDK1.2.2 on Wint Nt now I am trying it on JDK1.3 on Solaris. In both places I have used Weblogic 5.1.
    But I don't think different OS should make a difference.
    Same was the case with mail.jar & activation.jar so we extracted the files into the appropriate path which we had set in the classpath.
    But again this error is there (bad class file).
    /****** / cannot access javax.mail.Session
    bad class file: /opt/weblogic/myserver/mail/jars/javax/mail/Session.class
    bad constant pool tag: 32 at 337
    Please remove or make sure it appears in the correct subdirectory of the classpath.
                            Session session = Session.getDefaultInstance(props,null)


    We have checked the permissions , group etc. in Solaris. Each directory and all our subdirectories have execute permissions with our group name etc.
    How is that if we compile using JDK1.3 everything works fine then.
    Any help ??
  2. Is it possible that the class files were corrupted when transfering them between NT and Solaris? Say, by FTP'ing the files in text mode rather than binary?

  3. no the files are not corrupted. I tried it many no. of time. As a example we have developed a mail program which uses Java Mail API and in this case the
    mail.jar file and
    activation.jar file which we have download from the sun's site also gives the same problem. That it is an 'Invalid Jar file.
    If I unzip the jar and extract it it gives "bad class file".
    and many other such error messages. Can u give any insight what is wrong with these and where the problem lies.