Platform Dependent Verify Failure?!!
I have a strange problem with the RI (beta-Q4, 2004 version)
I and a few of my colleagues are trying to get familiar with this, we have various windows systems, and a Solaris 9 box.
Some of us find that we build the "converter" example application from the J2EE Tutorial and get deployment failures. Closer investigation shows that the .ear files are failing to verify. So far, this has only happened under windows. However, it's happened to three of us, while six others (five on various windows variants, and one on the Solaris box) have perfect success.
In desperation, I copied the working ear file from the Solaris box to my windows sytems, and found that the exact same ear file that verifies correctly on Solaris, fails to verify under windows.
The exact output from the verifier is:
war-ic.war tests.web.elements.WebEjbReferencesElement FAILED
app-client-ic.jar tests.appclient.elements.AppClientEjbReferencesElement FAILED
I suspected this might be trying to say that I haven't resolved the JNDI lookup in the two clients to a real JNDI reference, but the "Sun Specific Settings" for the application shows:
EJB Ref ConverterClient ejb/SimpleConverter ConverterBean
EJB Ref WebApp ejb/TheConverter ConverterBean
And, of course, the self-same ear verifies (and runs) under Solaris.
Any offers please?
Hi,
strange problem indeed. Please see my response in line. Please supply us more information as mentioned in this email below to further investigate the issue.
> Some of us find that we build the "converter" example
> application from the J2EE Tutorial and get deployment
> failures. Closer investigation shows that the .ear
> files are failing to verify. So far, this has only
> happened under windows. However, it's happened to
> three of us, while six others (five on various
> windows variants, and one on the Solaris box) have
> perfect success.
You mentioned about ear file not getting deployed. Are you using --verify=true option while deploying?
Did you use the sample build.xml to build the converter app?
> war-ic.war tests.web.elements.WebEjbReferencesElement
> FAILED
> app-client-ic.jar
> tests.appclient.elements.AppClientEjbReferencesElement
> FAILED
Please run verifier with -v (v for verbose) option and send us the output txt report at J2EE_AVK_support@sun.com.
What JDK are you using while using J2EE SDK?
>
> I suspected this might be trying to say that I
> haven't resolved the JNDI lookup in the two clients
> to a real JNDI reference, but the "Sun Specific
> Settings" for the application shows:
>
These tests do not refer to JNDI names. They try to ensure that the referenced ejb home and component interface classes are loadable from the referring module.
Sahoo
> You mentioned about ear file not getting deployed.
> Are you using --verify=true option while deploying?
> Did you use the sample build.xml to build the
> converter app?
I compile using:
asant build
which I must assume uses the provided build.xml, because I haven't created anything whatsoever.
I'm doing all of the packaging/deployment from the GUI (following the instructions in chapter 24 of the tutorial edition for the beta, q4 2004 release).
> Please run verifier with -v (v for verbose) option
> and send us the output txt report at
> J2EE_AVK_support@sun.com.
It outputs this:
D:\j2eetutorial14\examples\ejb\converter>verifier.bat -v ConverterApp.ear
Setting verbose flag to TRUE.
Jar filename: D:\j2eetutorial14\examples\ejb\converter\ConverterApp.ear
*******************************END "Parse Args"
*******************************BEGIN "Static Verification"
Starting loadJar() method......
Dec 14, 2004 12:16:25 AM com.sun.enterprise.tools.verifier.Verifier validateRunt
imeDD
INFO: About to ValidateParse META-INF/sun-application.xml file.
META-INF/sun-application.xml file is Valid.
Dec 14, 2004 12:16:25 AM com.sun.enterprise.tools.verifier.Verifier validate
INFO: About to ValidateParse META-INF/application.xml file.
Exception : java.lang.ClassFormatError: Unknown constant tag in .class file
# of Failures : 0
# of Warnings : 0
# of Errors : 1
Look in file "ConverterApp.ear.xml" for detailed results on test assertions.
Look in file "ConverterApp.ear.txt" for detailed results on test assertions.
> What JDK are you using while using J2EE SDK?
In the past, I've had several JDKs on my system, as have some of my colleagues. I find the uninstall system unreliable. There is some order like if you remove the JDK before the JRE, or vice versa, stuff messes up. Notably, if you're dumb enough to remove the JDK/JRE before you remove the J2EE SDK, oh boy, are you in trouble! You can't remove the J2EE SDK without a JRE!
Anyway, I've tried to clean up my system as best I can prior to installing the "huge bundle" of J2EE and J2SE, consequently, all these issues arise using the j2sdk 1.4.2_05 that is installed under \Sun\AppServ\jdk and was installed by the same install process as the J2EE SDK. However, it's quite probable that something remains in the registry that was created by or for one of the older VMs (which "older VMs" include JDK 1.5, er sorry 5.0 :) I have also had JBoss on my system at one time or another, though that's not the case for any of my colleagues.
> These tests do not refer to JNDI names. They try to
> ensure that the referenced ejb home and component
> interface classes are loadable from the referring
> module.
Indeed, and when I looked for the command-line verifier, lo and behold, the directory is filled with xml and txt files that apparently have been created by the GUI verification process. At the risk of hiding the critical info behind my ignorance, this appears to be the crux of the problem:
Error Name : Exception : java.lang.ClassFormatError: Unknown constant t
ag in .class file
Which makes it look like there's a "wrong" VM version on my system, but I'm pretty sure that's not the case (with the possible exception of something nasty like an MS psuedo-VM embedded in IE)
That's all I can think of for now...
Cheers