Problem verifying RAR with AVK 1.4

I'm trying to verify a RAR build for JCA 1.0 (not 1.5) with the ArchiveTest ANT task using AVK 1.4 ("Updated 04/19/2004") and am getting errors like the following:

[java] Nov 26, 2004 2:40:28 PM com.sun.enterprise.tools.verifier.Verifier validate

[java] INFO: About to ValidateParse META-INF/ra.xml file.

[java] java.lang.NoClassDefFoundError: org/apache/tools/ant/taskdefs/MatchingTask

[java] at java.lang.ClassLoader.defineClass0(Native Method)

[java] at java.lang.ClassLoader.defineClass(ClassLoader.java:537)

[java] at java.lang.ClassLoader.defineClass(ClassLoader.java:448)

[java] at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:480)

[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:289)

[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)

[java] at com.sun.enterprise.tools.verifier.tests.connector.ConnectorTest.findImplementorOf(ConnectorTest.java:128)

[java] at com.sun.enterprise.tools.verifier.tests.connector.ConnectorTest.findImplementorOf(ConnectorTest.java:202)

[java] at com.sun.enterprise.tools.verifier.tests.connector.managed.ManagedConnectionExistence.check(ManagedConnectionExistence.java:62)

[java] at com.sun.enterprise.tools.verifier.tests.connector.ConnectorTest.check(ConnectorTest.java:49)

[java] at com.sun.enterprise.tools.verifier.CheckMgr.check(CheckMgr.java:486)

[java] at com.sun.enterprise.tools.verifier.JarCheckImpl.check(JarCheckImpl.java:134)

[java] at com.sun.enterprise.tools.verifier.Verifier.verification(Verifier.java:2796)

[java] at com.sun.enterprise.tools.verifier.Verifier.callVerification(Verifier.java:3059)

[java] at com.sun.enterprise.tools.verifier.Verifier.loadConnector(Verifier.java:2321)

[java] at com.sun.enterprise.tools.verifier.Verifier.loadJar(Verifier.java:1249)

[java] at com.sun.enterprise.tools.verifier.Verifier.doit(Verifier.java:2842)

[java] at com.sun.enterprise.tools.verifier.Verifier.main(Verifier.java:2595)

The error message "java.lang.NoClassDefFoundError: org/apache/tools/ant/taskdefs/MatchingTask" is throwing me -- obivously the ant task for ArchiveTest is working. It seems like the verifier is confused by something but I can't tell what.

I get one of these findImplementorOf -> "java.lang.NoClassDefFoundError: org/apache/tools/ant/taskdefs/MatchingTask" exceptions for the following tests:

tests.connector.ConnectionRequestInfoImplHashcode

tests.connector.TransactionSupportExistence

tests.connector.ConnectionRequestInfoImplEquals

tests.connector.DefaultConnectionManagerExistence

tests.connector.managed.ManagedConnectionExistence

tests.connector.cci.RecordFactoryExistence

tests.connector.DefaultConnectionManagerSerializable

tests.connector.cci.ConnectionFactoryDefaultConstructor

tests.connector.managed.ManagedConnectionGetMetaData

tests.connector.cci.InteractionSpecExistence

tests.connector.cci.RecordExistence

tests.connector.cci.InteractionExistence

tests.connector.managed.ManagedConnectionMetaDataExistence

tests.connector.cci.InteractionSpecSerializable

tests.connector.cci.InteractionSpecJavaBeansCompliance

tests.connector.cci.ConnectionMetaDataExistence

tests.connector.cci.ResourceAdapterMetaDataExistence

The verifier is finding our classes in our jars in our RAR, because all of these other tests passed:

tests.connector.managed.CheckConnectionFactoryImplSerializable

tests.connector.managed.ManagedConnectionFactoryImplEquals

tests.connector.cci.ConnectionImplClose

tests.connector.CheckConfigPropertyName

tests.connector.TransactionSupport

tests.connector.cci.ConnectionInterfaceExistence

tests.connector.cci.ConnectionFactoryInterfaceExistence

tests.connector.managed.ManagedConnectionFactoryImplHashcode

tests.connector.cci.ConnectionInterfaceImpl

tests.connector.cci.ConnectionFactoryGetConnection

tests.connector.managed.CheckConnectionFactoryImplReferenceable

tests.connector.cci.ConnectionImplExistence

tests.connector.cci.ConnectionFactoryReferenceable

tests.connector.managed.ManagedConnectionFactoryProperties

tests.connector.cci.ConnectionFactoryInterfaceImpl

tests.connector.cci.ConnectionFactoryImplExistence

tests.connector.AuthMechType

tests.connector.cci.ConnectionFactorySerializable

tests.connector.managed.ManagedConnectionFactorySerializable

tests.connector.managed.ManagedConnectionFactoryImplementation

The RAR itself is working fine in our targeted application server. Any idea what verifier might be tripping up on?

[4775 byte] By [kylekc] at [2007-9-30 23:12:55]
# 1

Hi,

That error comes when connector bundle depends on some classes that are neither part of J2EE standard nor part of the J2EE application. In your case, please check to see if any of your connector implementation class depends on org/apache/tools/ant/taskdefs/MatchingTask.class. Even though you mentioned that the connector works, that does not mean that connector is portable. e.g. Sun app server runtime contain Ant classes in its classpath.

To some extent, this is also a bug in AVK because it should have reported the error in a much nicer way. We have addressed this in our next release, scheduled to come out in Feb '05.

Thanks for taking the time to use our forum.

Sahoo

sahoo at 2007-7-7 13:45:29 > top of Java-index,Enterprise & Remote Computing,AVK Portability...
# 2

Hi Sahoo,

We have some dependencies on classes that aren't part of the J2EE standard, but that are bundled in the RAR. None of those dependencies are in org.apache.tools.ant.

This is a standalone RAR, not bundled as part of an EAR, and intended to be deployed standalone.

Tried moving these dependent classes (in jars) to the root folder of the RAR (subsequent to sending this message). After moving to the root folder of the RAR, actually got the correct class reported as far as the verifier reporting a NoClassDefFound error.

So now, wondering if there's a way to have such classes in jars in the RAR such that the verifier can find them. Specifying class-path in the manifest.mf in the RAR did not help. The app servers we're using can find them but that may be server specific.

Thanks.

kylekc at 2007-7-7 13:45:29 > top of Java-index,Enterprise & Remote Computing,AVK Portability...