Uploaded image for project: 'Maven Changes Plugin'
  1. Maven Changes Plugin
  2. MCHANGES-299

ClassNotFoundException when running jira-report using Maven 2.2.1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.9
    • 2.9
    • jira
    • None

    Description

      When I try to build the site locally for the trunk of maven-changes-plugin itself using this command:

      mvn site -Preporting
      

      I get an exception when it is running changes:jira-report, see stack trace below. The result is an empty JIRA report.

      I have also tried with Java 1.6 + Maven 2.2.1 with the same results.

      Using Maven 3.0.4 on either Java 1.5 or Java 1.6 however successfully created the JIRA report.

      Searching on google I found this comment:

      AFAIK, this happens when, jax-rs api jars cannot find the JAXRS impl classes. According to the spec, it get the impl class using a system property. If not found defaults to, com.sun.ws.rs.ext.RuntimeDelegateImpl.

      Does that mean that we have some JAXRS impl classes included in the class path when using Maven 3, but not when using Maven 2? If so, which jar do we need to add as a dependency to maven-changes-plugin to make it work with Maven 2 again?

      [INFO] Generating "JIRA Report" report    --- Maven Changes Report Plugin 2.9-SNAPSHOT
      Jan 3, 2013 9:35:39 AM org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean createWebClient
      SEVERE: java.lang.RuntimeException : java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl
      [WARNING]
      java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl
              at org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.createWebClient(JAXRSClientFactoryBean.java:217)
              at org.apache.cxf.jaxrs.client.WebClient.create(WebClient.java:91)
              at org.apache.maven.plugin.jira.RestJiraDownloader.setupWebClient(RestJiraDownloader.java:508)
              at org.apache.maven.plugin.jira.RestJiraDownloader.doExecute(RestJiraDownloader.java:100)
              at org.apache.maven.plugin.jira.AdaptiveJiraDownloader.doExecute(AdaptiveJiraDownloader.java:47)
              at org.apache.maven.plugin.jira.JiraMojo.executeReport(JiraMojo.java:367)
              at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:190)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:592)
              at org.apache.maven.plugins.site.ReportDocumentRenderer.generateMultiPage(ReportDocumentRenderer.java:302)
              at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:221)
              at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:319)
              at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:135)
              at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:175)
              at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:138)
              at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
              at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:592)
              at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
              at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
              at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
              at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl
              at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:122)
              at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:91)
              at javax.ws.rs.core.UriBuilder.newInstance(UriBuilder.java:69)
              at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:80)
              at org.apache.cxf.jaxrs.client.LocalClientState.<init>(LocalClientState.java:51)
              at org.apache.cxf.jaxrs.client.AbstractClient.<init>(AbstractClient.java:99)
              at org.apache.cxf.jaxrs.client.WebClient.<init>(WebClient.java:77)
              at org.apache.cxf.jaxrs.client.WebClient.<init>(WebClient.java:73)
              at org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.createWebClient(JAXRSClientFactoryBean.java:208)
              ... 35 more
      Caused by: java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl
              at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
              at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
              at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
              at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
              at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:164)
              at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:62)
              at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:155)
              at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:105)
              ... 43 more
      

      Attachments

        Activity

          People

            bmargulies Benson Margulies
            dennisl@apache.org Dennis Lundberg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: