I recently ran into an issue where I was using my Rational Application Developer environment, along with build.xml to build an .ear file for a customer. The custom code, once deployed, was not showing as available to the Portal Server.
After testing in multiple alternate environments, I finally realized that a difference between my test environments and the customers environment was that while I was using WebSphere Portal 8.5, the customer was running on 126.96.36.199.
More importantly, the version of WebSphere Application Server that they were running was using the 1.6 java environment. My code was being compiled for the default JDK in my environment, which was 1.7.
I then found this information:
Which basically states that 1.7 compiled code is incompatible with running in the 1.6 environment.
Since I was using the build.xml process as defined here:
I was able to easily change the way that the class files were being generated. In the build.xml, I had a compile task, which was using the javac process within ant to build the .class files. I leveraged the following:
By using the target and source parameters, I could properly compile the .classes for the 1.6 java runtime environment.