Hi,
I have a lot experience with Java on other platforms but am totally new to iSeries/AS400. I ran into a strange problem recently and hope someone can enlighten me.
We have an Java application packaged as a jar file and depends on a number of libraries. The application uses a custom LOG4J appender which uses JavaMail API to send errors out as email. The application has been in production for 2 years, but 3 weeks suddenly stopped working in one of the test environments.
The symptom is a NoClassDefFoundError when trying to load the javax.mail.internet.InternetAddress class. This class is in the mail.jar.
I verified the manifest.mf of the application jar file and confirmed that the classpath was right (it hasn't changed for a while). To make sure the jar files are not corrupted, I even copied the jar files and libraries to my windows box. It loads the classes perfectly fine on windows box.
I also tried to check if the permissions had changed on the files using QSH (not sure that's the right way, I only know unix, not AS400). The permission string for the mail.jar is "-rwxr-xr-x" which seems to be right. I even tried to use jar -xf to extract the jar files and it worked fine too. So I'm reasonably sure that the mail.jar file is not corrupted.
I have asked our AS400 admin and he doesn't have a clue either...
java.lang.NoClassDefFoundError: javax/mail/internet/InternetAddress
at java.lang.Throwable.<init>(Throwable.java:195)
at java.lang.LinkageError.<init>(LinkageError.java:36 )
at java.lang.NoClassDefFoundError.<init>(NoClassDefFo undError.java:40
)
at java.lang.Class.privateGetDeclaredMethods(Class.ja va:1691)
I have a lot experience with Java on other platforms but am totally new to iSeries/AS400. I ran into a strange problem recently and hope someone can enlighten me.
We have an Java application packaged as a jar file and depends on a number of libraries. The application uses a custom LOG4J appender which uses JavaMail API to send errors out as email. The application has been in production for 2 years, but 3 weeks suddenly stopped working in one of the test environments.
The symptom is a NoClassDefFoundError when trying to load the javax.mail.internet.InternetAddress class. This class is in the mail.jar.
I verified the manifest.mf of the application jar file and confirmed that the classpath was right (it hasn't changed for a while). To make sure the jar files are not corrupted, I even copied the jar files and libraries to my windows box. It loads the classes perfectly fine on windows box.
I also tried to check if the permissions had changed on the files using QSH (not sure that's the right way, I only know unix, not AS400). The permission string for the mail.jar is "-rwxr-xr-x" which seems to be right. I even tried to use jar -xf to extract the jar files and it worked fine too. So I'm reasonably sure that the mail.jar file is not corrupted.
I have asked our AS400 admin and he doesn't have a clue either...
java.lang.NoClassDefFoundError: javax/mail/internet/InternetAddress
at java.lang.Throwable.<init>(Throwable.java:195)
at java.lang.LinkageError.<init>(LinkageError.java:36 )
at java.lang.NoClassDefFoundError.<init>(NoClassDefFo undError.java:40
)
at java.lang.Class.privateGetDeclaredMethods(Class.ja va:1691)
Comment