Bug 1043805 - dtgov, dtgov-war module, unit tests DeploymentResourceTest, NotificationResourceTest - ClassNotFoundException (TJWSEmbeddedJaxrsServer), missing dependencies
Summary: dtgov, dtgov-war module, unit tests DeploymentResourceTest, NotificationResou...
Keywords:
Status: ASSIGNED
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: 3rd Party
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: FUTURE
Assignee: Julian Coleman
QA Contact: Tomas Sykora
URL:
Whiteboard:
: 1043836 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-17 09:09 UTC by Martin Basovník
Modified: 2021-10-15 11:51 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1043836 0 unspecified CLOSED s-ramp, s-ramp server module, unit tests, ClassNotFoundException - TJWSEmbeddedJaxrsServer 2021-02-22 00:41:40 UTC

Internal Links: 1043836

Description Martin Basovník 2013-12-17 09:09:37 UTC
Description of problem:

Failing tests due to Caused by: java.lang.NoClassDefFoundError: org/jboss/resteasy/plugins/server/tjws/TJWSEmbeddedJaxrsServer. 
=> Dependencies are missing. It is possible to use dependencies from section "Additional info" to overcome this problem.

org.overlord.sramp.governance.services.DeploymentResourceTest.org.overlord.sramp.governance.services.DeploymentResourceTest 
org.overlord.sramp.governance.services.NotificationResourceTest.org.overlord.sramp.governance.services.NotificationResourceTest 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Get DTGov from FSW6 ER7-2
2. Use maven development repository (http://download.devel.redhat.com/brewroot/repos/jb-ip-6-build/latest/maven/)
3. cd <path-to-dtgov>/dtgov-war
4. mvn -fae -Dmave.test.skip=false -DskipTests=false clean test

Actual results:
Stacktrace

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.overlord.sramp.common.test.resteasy.EmbeddedContainer.start(EmbeddedContainer.java:91)
	at org.overlord.sramp.common.test.resteasy.EmbeddedContainer.start(EmbeddedContainer.java:70)
	at org.overlord.sramp.common.test.resteasy.BaseResourceTest.before(BaseResourceTest.java:43)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.NoClassDefFoundError: org/jboss/resteasy/plugins/server/tjws/TJWSEmbeddedJaxrsServer
	at org.overlord.sramp.common.test.resteasy.TJWSServletContainer.start(TJWSServletContainer.java:106)
	at org.overlord.sramp.common.test.resteasy.TJWSServletContainer.start(TJWSServletContainer.java:100)
	at org.overlord.sramp.common.test.resteasy.TJWSServletContainer.start(TJWSServletContainer.java:46)
	... 29 more
Caused by: java.lang.ClassNotFoundException: org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 32 more

Standard Output

[Embedded Container Start]
[Embedded Container Stop]


Expected results:



Additional info:
Try to add following dependencies to file <path-to-dtgov>/dtgov-war/pom.xml. Dependencies are not contained and contain missing classes.

<dependency>
    <groupId>org.jboss.resteasy</groupId>
    <artifactId>resteasy-jaxrs</artifactId>
    <version>3.0.6.Final</version>
</dependency>
<dependency>
    <groupId>org.jboss.resteasy</groupId>
    <artifactId>jaxrs-api</artifactId>
    <version>3.0.6.Final</version>
</dependency>

Comment 1 kconner 2013-12-17 16:09:05 UTC
Where is this source coming from?  The production version of the codebase already contains dependencies for those two as below

    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-jaxrs</artifactId>
      <scope>provided</scope>
    </dependency>


    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>jaxrs-api</artifactId>
      <scope>provided</scope>
    </dependency>

Comment 2 Martin Basovník 2013-12-17 22:31:42 UTC
I do not know why it did not work but I just added dependencies which contained missing classes. I found the dependencies according to information found on this page http://search.maven.org/#advancedsearch|gav. Maybe those provided information are not really "provided" by container.

Comment 3 kconner 2013-12-17 23:37:33 UTC
It looks like there are classes missing from the resteasy-jaxrs-2.3.6.Final-redhat-1.jar provided in the repo

351,358d352
< org/jboss/resteasy/plugins/server/tjws/
< org/jboss/resteasy/plugins/server/tjws/AuthenticatedHttpServletRequest.class
< org/jboss/resteasy/plugins/server/tjws/PatchedHttpServletRequest.class
< org/jboss/resteasy/plugins/server/tjws/TJWSEmbeddedJaxrsServer.class
< org/jboss/resteasy/plugins/server/tjws/TJWSRequestPreProcessor.class
< org/jboss/resteasy/plugins/server/tjws/TJWSServletDispatcher.class
< org/jboss/resteasy/plugins/server/tjws/TJWSServletServer$FileMappingServe.class
< org/jboss/resteasy/plugins/server/tjws/TJWSServletServer.class
432,436d425
< org/jboss/resteasy/test/
< org/jboss/resteasy/test/BaseResourceTest.class
< org/jboss/resteasy/test/EmbeddedContainer.class
< org/jboss/resteasy/test/TJWSServletContainer.class
< org/jboss/resteasy/test/TestPortProvider.class
472d460
< org/jboss/resteasy/util/HttpServletRequestDelegate.class

Comment 4 kconner 2013-12-17 23:40:04 UTC
*** Bug 1043836 has been marked as a duplicate of this bug. ***

Comment 6 Julian Coleman 2014-01-07 13:48:28 UTC
The EAP 6.1.1 build of RESTEasy :2.3.6.Final-redhat-1 does not include the tjws
classes.  A build of 2.3.7 has been done for us, which does include them:

  https://brewweb.devel.redhat.com/buildinfo?buildID=319693

We will use this RESTEasy version in CR1.

Note, that the test/*.class files will still not be present.

See also:

  https://bugzilla.redhat.com/show_bug.cgi?id=1032115

Comment 8 Martin Basovník 2014-01-16 13:39:31 UTC
New version of RESTEasy dependency (containing missing classes) was not included in CR1! Problem was not solved.

There is still old version 2.3.6.Final-redhat-1.


Note You need to log in before you can comment on or make changes to this bug.