When i run my program then system gives this error. How can I solve this error? - cucumber-jvm

I am facing an error whenever I run the cucumber program by Junit. Here the errors. Any help will be awesome
But in a program, there is no error.
java.lang.NoClassDefFoundError: cucumber/io/ResourceLoader
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.getConstructor(Unknown Source)
at cucumber.runtime.Reflections.hasConstructor(Reflections.java:53)
at cucumber.runtime.Reflections.instantiateSubclasses(Reflections.java:)
at cucumber.runtime.Runtime.loadBackends(Runtime.java:87)
at cucumber.runtime.Runtime.<init>(Runtime.java:41)
at cucumber.api.junit.Cucumber.createRuntime(Cucumber.java:84)
at cucumber.api.junit.Cucumber.<init>(Cucumber.java:63)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(UnknownSource)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.junit.internal.requests.ClassRequest.buildRunner(ClassRequest.java:33)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:28)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:90)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:76)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:49)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:525)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
Caused by: java.lang.ClassNotFoundException: cucumber.io.ResourceLoader
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 23 more
I want to run my program but the system gives an error.

Please make sure you have the correct Cucumber dependency / dependencies.
You can find which ones you need and their latest version in the docs
If you are using multiple Cucumber dependencies, please make sure to use the same version for all, to avoid conflicts.

Here are the minimum dependencies needed to get your Cucumber running:
Cucumber-java (1.2.2) | Cucumber-junit (1.2.2) | Cucumber-picocontainer (1.2.2) |junit (4.12)
Maven manages the rest of the dependencies. Make sure you have the latest dependencies, and that you are not mixing and matching versions (all shall follow 1.2.2/4.0.0 version)
Please share your POM.XML dependencies.

You're probably missing the cucumber-core.jar from your classpath

Hope yours is NOT a maven project or you didnt add cucumber-core dependency in your pom.xml. I can see the solution already provided by #funkyjelly, please go through that.

Related

java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics

So I'm just exporting a basic program with one library tornadofx-1.7.11.jar plus the standard Kotlin library. I've exported it fully using this guide. I tried running it in the command line, but received this error:
Exception in thread "main" java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
at main.app.AppKt.main(app.kt)
Caused by: java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more
I've looked up my issue here, and it said that my error has to do with a broken class path. I have no idea what I'm doing with regards to class paths, but the guide mentioned earlier stated to just put the names of all jars. If you really want it, here's my class path: tornadofx-1.7.11.jar. Just that one line. I'm not sure if I should add more, but I did it like the example showed.
If needed, I'm running on Intellij IDEA version 2017.2.6.IC-172.4574.11.
You need to add the kotlin stdlib to the classpath to to run it from the command line.
Something like:
java --class-path tornadofx-1.7.11.jar stdlib.jar -jar myprogram.jar
Running it from InteliJ is simpler since it configures it on its own.

Error creating Erlang project on eclipse through Erlide plugin

I ran into trouble when trying to install the Erlide plugin in eclipse for Erlang using the guide below:
"myadventuresincoding.wordpress.com/2009/02/11/erlang-getting-started-and-using-eclipse/"
and I have successfully installed Erlang on my PC and was able to link the binary files to the system "PATH".
However, when it came to installing the plugin on my eclipse Indigo, it first I could not find the repository: "http://erlide.sourceforge.net/update". But that easily fixed by changing the repo to "http://erlide.org/update" which give a list of tools to download, which happened seamlessly.
And this is when I started to wonder: "Could it really be that easy ?".
My doubts were soon confirmed when I went on to create a new project (File > New > Project... > Erlang > Erlang Project), which immediately gave me an error box of
"Unable to create the selected preference page.
An error occurred while automatically activating bundle org.erlide.ui (317)."
I've been googling this issue for a while now (~3 hours) with not even a hint to this issue. Is there anyone who has encountered this issue before ?
//----------------------------------------------------------------------------------------------------------------------------------
Here is the error generated from it I hope it helps:
eclipse.buildId=M20120208-0800
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86_64
Error
Sun Feb 09 16:46:35 EET 2014
Plug-in org.erlide.ui was unable to load class org.erlide.ui.views.ErlPatternMatchListenerDelegate.
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.erlide.ui (469).
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:122)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:463)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:268)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:52)
at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:264)
at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition$1.run(LightweightDecoratorDefinition.java:124)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.runtime.Platform.run(Platform.java:888)
at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.internalGetDecorator(LightweightDecoratorDefinition.java:120)
at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(LightweightDecoratorDefinition.java:251)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunnable.run(LightweightDecoratorManager.java:81)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(LightweightDecoratorManager.java:365)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(LightweightDecoratorManager.java:347)
at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(DecorationScheduler.java:370)
at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java:330)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.osgi.framework.BundleException: The activator org.erlide.ui.internal.ErlideUIPlugin for bundle org.erlide.ui is invalid
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:171)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
... 30 more
Caused by: java.lang.NoClassDefFoundError: org/erlide/backend/api/IBackendListener
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:166)
... 36 more
Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.erlide.backend (453).
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:122)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:463)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 42 more
Caused by: org.osgi.framework.BundleException: Exception in org.erlide.backend.internal.BackendPlugin.start() of bundle org.erlide.backend.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
... 51 more
Caused by: java.lang.NumberFormatException: For input string: "03-1"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at org.erlide.runtime.runtimeinfo.RuntimeVersion.<init>(RuntimeVersion.java:81)
at org.erlide.runtime.runtimeinfo.RuntimeVersion.getVersion(RuntimeVersion.java:254)
at org.erlide.runtime.runtimeinfo.RuntimeInfo.getVersion(RuntimeInfo.java:181)
at org.erlide.runtime.runtimeinfo.RuntimeInfoCatalog.addRuntime(RuntimeInfoCatalog.java:64)
at org.erlide.runtime.runtimeinfo.RuntimeInfoCatalog.initializeRuntimesList(RuntimeInfoCatalog.java:190)
at org.erlide.runtime.runtimeinfo.RuntimeInfoCatalog.setRuntimes(RuntimeInfoCatalog.java:47)
at org.erlide.runtime.api.RuntimeCore.getRuntimeInfoCatalog(RuntimeCore.java:20)
at org.erlide.backend.BackendCore.getRuntimeInfoCatalog(BackendCore.java:28)
at org.erlide.backend.internal.BackendPlugin.start(BackendPlugin.java:34)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
... 57 more
Thanks guys !
Regards.
I believe that you are using R16B03-1 and in that case you should use the latest beta (0.25.0) from http://download.erlide.org/update/beta. Please let me know if there are other problems.
regards,
Vlad

Getting Exception: java.lang.SecurityException: attempted to open sandboxed jar as Trusted-Only

We need to sign all 5 .class java files. That we have done by creating a .jar file and signed it too. But while executing my web application it is showing below error message in Java Console
java.lang.SecurityException: attempted to open sandboxed jar https://xxxxxxxxxxx.com/xxxx/JavaApplet.jar as Trusted-Only
at com.sun.deploy.security.CPCallbackHandler$ParentElement.checkResource(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.checkResource(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.SecurityException: attempted to open sandboxed jar https://xxxxxxxxxxx.com/xxxx/JavaApplet.jar as Trusted-Only*
I am not sure about this error. I have signed Jar 3-4 times after getting this error but I am getting same error again again.
Please can anybody help me if I am doing something wrong?
Check your Manifest.mf file of jar. This should contain the Trusted-Library: true if you are using MixedCode(Applet called from the javascript) and your files are self signed. oracle has released latest security updates in Java 7 update 21. According to the release notes you must sign your code with CA certificates only, else JRE will treat your code as malicious. oracle is totally deprecating the Mixedcode. Please check the release notes of latest updates. But before adding the attribute Trusted-Library: true in manifest.mf make sure you are aware of the effects of the attribute.

Error configuring dynamic methods for plugin [resources:1.1.6]: Cannot get property 'pluginPath'

Using grails 1.3.7 i have no problem compiling and running my project from my STS.
The error listed below occurs after packaging the WAR and trying to deply it from apache tomcat. This problem has not occured before and i have had success deploying it to apache tomcat in the same fashion before. (Using apache-tomcat-7.0.26).
In regards to the error:
at BootstrapResources.run(BootstrapResources.groovy:23) row 23 points to:
def twitterbootstrapPlugin = applicationContext.pluginManager.getGrailsPlugin('twitter-bootstrap')
row 23 --> twitterbootstrapPluginDir = applicationContext.getResource(twitterbootstrapPlugin.pluginPath).file
ERROR [pool-2-thread-1] (DefaultGrailsPluginManager.java:818) - Error configuring dynamic methods for plugin [resources:1.1.6]: Cannot get property 'pluginPath' on null object java.lang.NullPointerException: Cannot get property 'pluginPath' on null object
at BootstrapResources.run(BootstrapResources.groovy:23)
at org.grails.plugin.resource.module.ModuleDeclarationsFactory$_getModuleDeclarations_closure2.doCall(ModuleDeclarationsFactory.groovy:43)
at org.grails.plugin.resource.module.ModuleDeclarationsFactory.getModuleDeclarations(ModuleDeclarationsFactory.groovy:38)
at org.grails.plugin.resource.module.ModuleDeclarationsFactory.getModuleDeclarations(ModuleDeclarationsFactory.groovy)
at org.grails.plugin.resource.module.ModuleDeclarationsFactory$getModuleDeclarations.call(Unknown Source)
at org.grails.plugin.resource.ResourceProcessor.loadModules(ResourceProcessor.groovy:720)
at org.grails.plugin.resource.ResourceProcessor.this$2$loadModules(ResourceProcessor.groovy)
at org.grails.plugin.resource.ResourceProcessor$this$2$loadModules.callCurrent(Unknown Source)
at org.grails.plugin.resource.ResourceProcessor.reloadAll(ResourceProcessor.groovy:1056)
at org.grails.plugin.resource.ResourceProcessor$reloadAll.call(Unknown Source)
at ResourcesGrailsPlugin$_closure3.doCall(ResourcesGrailsPlugin.groovy:172)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
The latest additions to the project has been spring-security-core, but i cant see how this could be an issue.
Anyone has any ideas?
This is probably not a generic solution for this problem, but for my project this was an issue of my maven packaging not including all the needed plugins for successful deployment.
For some reason having defined my plugins within my BuildConfig.groovy file as follows:
plugins{
build ':whateverplugin:0.1'
compile ':whateverplugin:0.1'
runtime ':whateverplugin:0.1'
test ':whateverplugin:0.1'
}
The plugins were not including in the war packaging when packaging my project issuing the command:
mvn package -Dmaven.skip.test=true

Jenkins slave throws "Classloading from system classloader disabled" exception

When running a Maven2 job on a slave instance (Master on AIX 5.3; slave on Windows 2008(R2)), I get the following message (complete stack trace pasted in below): "java.lang.ClassNotFoundException: Classloading from system classloader disabled". This happens with the first job after the slave instance is started (it's running as a Windows service). After that, I get a "java.lang.NoClassDefFoundError: Could not initialize class hudson.maven.MavenModuleSetBuild" error.
If I create a freestyle job, and include the maven command as a batch command to run on the slave, it works fine. The Maven2 job appears to locate Maven on the slave machine, but it apparently can't find the maven-plugin (probably due to the classloading error).
I've searched and posted a ticket to the jenkins-ci site, but no luck as of yet. Has anyone run into this problem?
Stacktrace:
Found mavenVersion 2.2.1 from file jar:file:/C:/apache-maven-2.2.1/lib/maven-2.2.1-uber.jar!/META-INF/maven/org.apache.maven/maven-core/pom.properties
Parsing POMs
ERROR: Failed to parse POMs
hudson.util.IOException2: remote file operation failed: c:\jenkins-slave\workspace\AO_SISO_AT-smoketest-CIT1 at hudson.remoting.Channel#7b827b82:10.40.163.105
at hudson.FilePath.act(FilePath.java:752)
at hudson.FilePath.act(FilePath.java:738)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.parsePoms(MavenModuleSetBuild.java:817)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:617)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:429)
at hudson.model.Run.run(Run.java:1374)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:467)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
Caused by: java.io.IOException: Remote call on 10.40.163.105 failed
at hudson.remoting.Channel.call(Channel.java:652)
at hudson.FilePath.act(FilePath.java:745)
... 8 more
Caused by: java.lang.ExceptionInInitializerError
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1236)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1110)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1956)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:270)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1$1.run(Engine.java:60)
at java.lang.Thread.run(Unknown Source)
Caused by: com.thoughtworks.xstream.XStream$InitializationException: Could not instantiate converter : com.thoughtworks.xstream.converters.extended.DurationConverter : null
at com.thoughtworks.xstream.XStream.dynamicallyRegisterConverter(XStream.java:735)
at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:699)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:445)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:385)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:323)
at hudson.util.XStream2.<init>(XStream2.java:62)
at hudson.model.Run.<clinit>(Run.java:1867)
... 13 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.thoughtworks.xstream.XStream.dynamicallyRegisterConverter(XStream.java:728)
... 19 more
Caused by: javax.xml.datatype.DatatypeConfigurationException: Provider org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl not found
at javax.xml.datatype.DatatypeFactory.newInstance(Unknown Source)
at com.thoughtworks.xstream.converters.extended.DurationConverter.<init>(DurationConverter.java:33)
... 24 more
Caused by: java.lang.ClassNotFoundException: Classloading from system classloader disabled
at java.lang.Throwable.<init>(Throwable.java:56)
at java.lang.Throwable.<init>(Throwable.java:80)
at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:80)
at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch2(RemoteClassLoader.java:399)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274)
at hudson.remoting.Request$2.run(Request.java:270)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:432)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:284)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:799)
I had similar issue. Researched internet but did not get any solution. Finally debugged the jenkins/hudson and resolved this issue.
The root cause of this error is that recent versions of jenkin is shipped with xml parser within jenkins.war file. Looks like if your server already has this jar file, it won't let jenkin application to reload its own version of xml parsers. So to resolve this issue I have removed file xercesImpl-2.9.1.jar from WEB-INF/lib directory of jenkins.war file. After that replaced existing war file and restarted server. And it worked as without any problem.