Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassNotFoundException: com.sun.ts.tests.common.vehicle.VehicleClient for javatests #153

Closed
alwin-joseph opened this issue Oct 3, 2024 · 6 comments
Assignees

Comments

@alwin-joseph
Copy link
Contributor

alwin-joseph commented Oct 3, 2024

I see CNFE (com.sun.ts.tests.common.vehicle.VehicleClient class) when running the javatests (jsp, servlet vehicles) when using M16 version of arquillian jar tools to run jsonb and jta platform tests.

The issue seems to be introduced in M16 , tests are passing with M15.

I reproduced same from Jenkins (running from https://github.com/alwin-joseph/jakartaee-tck/tree/jsonb_ee_javatest).

From JSONB logs:

10-03-2024 12:20:54: Harness - ServiceEETest: 10 args: [-p, /tmp/tstest.jte, -ap, /dev/null, -classname, com.sun.ts.tests.jsonb.cdi.customizedmapping.adapters.AdaptersCustomizationCDIJspTest, -t, testCDISupport, -vehicle, jsp]
10-03-2024 12:20:54: Opened connection to http://localhost:8080/jsonb_cdi_customizedmapping_adapters_jsp_vehicle_web/jsp_vehicle.jsp
10-03-2024 12:20:55: SVR-ERROR: Test running in jsp vehicle failed
10-03-2024 12:20:55: SVR-ERROR: java.lang.NoClassDefFoundError: com/sun/ts/tests/common/vehicle/VehicleClient
at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:90)
at org.apache.jsp.jsp_005fvehicle_jsp.runTest(jsp_005fvehicle_jsp.java:29)
at org.apache.jsp.jsp_005fvehicle_jsp._jspService(jsp_005fvehicle_jsp.java:134)
at org.glassfish.wasp.runtime.HttpJspBase.service(HttpJspBase.java:68)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.glassfish.wasp.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at org.glassfish.wasp.servlet.JspServlet.serviceJspFile(JspServlet.java:358)
at org.glassfish.wasp.servlet.JspServlet.service(JspServlet.java:287)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1313)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:118)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:563)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:504)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:121)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:293)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:186)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:425)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:144)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:174)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:153)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:196)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:88)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:246)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:178)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:118)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:96)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:51)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:510)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:82)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:83)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:101)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:535)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:515)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ClassNotFoundException: com.sun.ts.tests.common.vehicle.VehicleClient
at com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:720)
at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:634)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
at org.glassfish.common.util.GlassfishUrlClassLoader.loadClass(GlassfishUrlClassLoader.java:115)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 36 more

I could see the same issue with JTA javatests also. The tests were passing with M15, but got CNFE with M16.

Could the commit ef12777#diff-4fee96ce82a539a6704748b62a39711850dcf17787106248c4ce7649ec157aa9 cause this, I see the changes are only for appclient except the correction in arquillian/common/src/main/java/tck/arquillian/protocol/common/TsTestPropsBuilder.java.

@starksm64 Can you please check

cc @scottmarlow @gurunrao

@starksm64
Copy link
Member

There is no usage of a classname property in the com.sun.ts.lib.harness.* classes, so I can't see how that diff is the cause. If I try running the tests locally from the current jsonb_ee_javatest branch of https://github.com/alwin-joseph/jakartaee-tck with the version.jakarta.tck.arquillian set back to 1.0.0-M16:

[starksm@scottryzen jsonb-platform-tck]$ git diff
diff --git a/glassfish-runner/jsonp-platform-tck/pom.xml b/glassfish-runner/jsonp-platform-tck/pom.xml
index 1aba65c44..02860e176 100644
--- a/glassfish-runner/jsonp-platform-tck/pom.xml
+++ b/glassfish-runner/jsonp-platform-tck/pom.xml
@@ -39,7 +39,7 @@
         <tck.version>11.0.0-SNAPSHOT</tck.version>
         <ts.home>/jakartaeetck</ts.home>
         <version.jakarta.tck>11.0.0-SNAPSHOT</version.jakarta.tck>
-        <version.jakarta.tck.arquillian>1.0.0-M15</version.jakarta.tck.arquillian>
+        <version.jakarta.tck.arquillian>1.0.0-M16</version.jakarta.tck.arquillian>
     </properties>
 
     <dependencyManagement>

all tests pass when running mvn clean verify -Pstaging

[starksm@scottryzen jsonb-platform-tck]$ mvn clean verify -Pstaging -Dmaven.build.cache.enabled=false
...
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.39 s -- in com.sun.ts.tests.jsonb.cdi.customizedmapping.adapters.AdaptersCustomizationCDIJspTest

[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.739 s -- in com.sun.ts.tests.jsonb.cdi.customizedmapping.adapters.AdaptersCustomizationCDIServletTest

[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.653 s -- in com.sun.ts.tests.jsonb.cdi.customizedmapping.serializers.SerializersCustomizationCDIJspTest

[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.390 s -- in com.sun.ts.tests.jsonb.cdi.customizedmapping.serializers.SerializersCustomizationCDIServletTest


[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.547 s -- in com.sun.ts.tests.jsonb.pluggability.jsonbprovidertests.ClientServletTest

[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.527 s -- in com.sun.ts.tests.jsonb.pluggability.jsonbprovidertests.ClientJspTest

@alwin-joseph
Copy link
Contributor Author

There is no usage of a classname property in the com.sun.ts.lib.harness.* classes, so I can't see how that diff is the cause. If I try running the tests locally from the current jsonb_ee_javatest branch of https://github.com/alwin-joseph/jakartaee-tck with the version.jakarta.tck.arquillian set back to 1.0.0-M16:

[starksm@scottryzen jsonb-platform-tck]$ git diff
diff --git a/glassfish-runner/jsonp-platform-tck/pom.xml b/glassfish-runner/jsonp-platform-tck/pom.xml
index 1aba65c44..02860e176 100644
--- a/glassfish-runner/jsonp-platform-tck/pom.xml
+++ b/glassfish-runner/jsonp-platform-tck/pom.xml
@@ -39,7 +39,7 @@
         <tck.version>11.0.0-SNAPSHOT</tck.version>
         <ts.home>/jakartaeetck</ts.home>
         <version.jakarta.tck>11.0.0-SNAPSHOT</version.jakarta.tck>
-        <version.jakarta.tck.arquillian>1.0.0-M15</version.jakarta.tck.arquillian>
+        <version.jakarta.tck.arquillian>1.0.0-M16</version.jakarta.tck.arquillian>
     </properties>
 

I think you changed the jsonp-platform-tck/pom.xml , can you change the jsonb-platform-tck/pom.xml

Also I had changed the arquillian-protocol-javatest version to M15 in latest (alwin-joseph/jakartaee-tck@aae9d5e ) which also passed the test for me , logs : https://ci.eclipse.org/jakartaee-tck/job/11/job/platform-tck/job/jsonb-platform-tck-run/4/.
Did you pick up this change , can you check git log -n 3 ?

@starksm64
Copy link
Member

Yes, I have those changes, and I see the arquillian-protocol-javatest dependency has the version set explicitly so changing the property would not have any effect. If I update the version to 1.0.0-M16 I do see the errors.

@starksm64
Copy link
Member

Because the arquillian-protocol-javatest jar is including classes from the jakarta.tck:common jar which is currently a snapshot, new releases of arquillian-protocol-javatest pickup the platform tck snapshot as that time. The real issue causing this is:
jakartaee/platform-tck#1562

@starksm64
Copy link
Member

The 1.0.0-M17 release fixes the problem form me.

@alwin-joseph
Copy link
Contributor Author

Thanks @starksm64 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants