Why is my Jenkins throwing 'no such method found' exceptions after restart? - java

Jenkins was restarted. I lost all the projects that had used 'jenkins pipeline'. I see the directories on the server itself, but from the looks of it, Jenkins fails to load them; I don't see the projects on the UI.
Below is the error I see repeating itself. What could be the reason? I am on Jenkins 2.7.4.
May 07, 2018 2:32:00 PM com.cloudbees.hudson.plugins.folder.computed.FolderCron doRun
WARNING: Cron thread throw an exception
java.lang.NoSuchMethodError: jenkins.model.Jenkins.allItems(Ljava/lang/Class;)Ljava/lang/Iterable;
at com.cloudbees.hudson.plugins.folder.computed.FolderCron.checkTriggers(FolderCron.java:117)
at com.cloudbees.hudson.plugins.folder.computed.FolderCron.doRun(FolderCron.java:101)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:50)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
java.lang.NoSuchMethodError: jenkins.model.Jenkins.allItems(Ljava/lang/Class;)Ljava/lang/Iterable;
at com.cloudbees.hudson.plugins.folder.computed.FolderCron.checkTriggers(FolderCron.java:117)
at com.cloudbees.hudson.plugins.folder.computed.FolderCron.doRun(FolderCron.java:101)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:50)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

The only clue for now is in JENKINS 48649:
Facing the same error after upgrading one of the plugins.
So if you have recently upgraded some plugins, try and:
empty your JENKINS_HOME/plugins folder
relaunch and re-install only the JENKINS Pipeline Plugin
see if the issue persists
add your other plugins incrementally
The OP iCodeLikeImDrunk actually mentions:
we just upgrade to the latest, seems to resolve everything.

Related

JBoss Wildfly 9.0 ArrayIndexOutOfBoundException [asm 3.1]

While deploying war in JBoss getting below exception: Using asm3.1 jar
I've verified this on google. But I didn't get much info. It said that check asm jar dependency with java8 version and I've tried updating asm latest builds also after updating latest builds (asm 5.0.3 or later) I got another error as incompatibleclasschangeerror
java.lang.ArrayIndexOutOfBoundsException: 9578
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320) Caused by: java.lang.ArrayIndexOutOfBoundsException: 9578
at org.objectweb.asm.ClassReader.readClass(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at com.sun.jersey.spi.scanning.AnnotationScannerListener.onProcess(AnnotationScannerListener.java:133)
at com.sun.jersey.core.spi.scanning.JarFileScanner.scan(JarFileScanner.java:97)
at com.sun.jersey.spi.scanning.WebAppResourcesScanner$1.f(WebAppResourcesScanner.java:94)
I've removed the lambda dependency from my application and verified it. It is working fine. (asm 3.1, JBoss wildfly 9.0, Java 1.8).

Tomcat error on AWS: org.apache.catalina.startup.HostConfig.deployDirectory Error deploying web application directory

I have a big problem with maven, tomcat 8 and AWS.
I have a java based web page and everything is working fine, when I'm using it local. But, when I try to upload to AWS I get this error message:
20-Aug-2018 20:56:52.010 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Error deploying web application directory /var/lib/tomcat8/webapps/ROOT
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:731)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1125)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1868)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Two weeks ago everything was working, now I can't deploy anything. If I go back to some older version then it's working.
Thanks for help!

"Error wrapping InputStream in GZIPInputStream" while running Play project

I was working on my Play project when I got BSOD. After computer rebooted I started getting the following exception when trying to run any activator command (like activator clean or activator run):
[info] Done updating.
Error wrapping InputStream in GZIPInputStream: java.util.zip.ZipException: Not in GZIP format
at sbt.ErrorHandling$.translate(ErrorHandling.scala:10)
at sbt.WrapUsing.open(Using.scala:34)
at sbt.Using.apply(Using.scala:23)
at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:863)
at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:862)
at sbt.Using.apply(Using.scala:24)
at sbt.IO$.gzipFileIn(IO.scala:862)
at sbt.Sync$.readUncaught(Sync.scala:88)
at sbt.Sync$.readInfo(Sync.scala:84)
at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:28)
at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:22)
at sbt.Defaults$$anonfun$copyResourcesTask$1.apply(Defaults.scala:941)
at sbt.Defaults$$anonfun$copyResourcesTask$1.apply(Defaults.scala:937)
at scala.Function4$$anonfun$tupled$1.apply(Function4.scala:35)
at scala.Function4$$anonfun$tupled$1.apply(Function4.scala:34)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.zip.ZipException: Not in GZIP format
at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:165)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:79)
at sbt.Using$$anonfun$gzipInputStream$1.apply(Using.scala:84)
at sbt.Using$$anonfun$gzipInputStream$1.apply(Using.scala:84)
at sbt.Using$$anon$1.openImpl(Using.scala:51)
at sbt.WrapUsing$$anonfun$open$2.apply(Using.scala:34)
at sbt.ErrorHandling$.translate(ErrorHandling.scala:10)
at sbt.WrapUsing.open(Using.scala:34)
at sbt.Using.apply(Using.scala:23)
at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:863)
at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:862)
at sbt.Using.apply(Using.scala:24)
at sbt.IO$.gzipFileIn(IO.scala:862)
at sbt.Sync$.readUncaught(Sync.scala:88)
at sbt.Sync$.readInfo(Sync.scala:84)
at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:28)
at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:22)
at sbt.Defaults$$anonfun$copyResourcesTask$1.apply(Defaults.scala:941)
at sbt.Defaults$$anonfun$copyResourcesTask$1.apply(Defaults.scala:937)
at scala.Function4$$anonfun$tupled$1.apply(Function4.scala:35)
at scala.Function4$$anonfun$tupled$1.apply(Function4.scala:34)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (root/compile:copyResources) Error wrapping InputStream in GZIPInputStream: java.util.zip.ZipException: Not in GZIP format
I tried all workarounds I managed to find. I deleted the "project" and all "target" folders in the project I tried to run and the project it depends on. I deleted ".sbt" folder in "C:\Users...". I even cleaned TEMP directory. Nothing helped - I still get this error after "Loading project definition from.." and "Resolving..." messages in the log. What else can be done to solve the issue?
Try to clean the project's target directory
cd ${your_project}
rm -fr project/target
rm -fr project/project/target
I've solved the problem - there were some other dependent projects, when I cleaned them the issue disapppeared.

ClassNotFoundException: com.allen_sauer.gwt.log.client.WrappedClientThrowable

I'm getting class not found exception for com.allen_sauer.gwt.log.client.WrappedClientThrowable while starting my application in tomcat 8.0.36.
Libraries used
- gwt-user-2.8
- gwt-servlet-2.7.0
- spring4gwt-0.0.1
- gwt-log-3.1.2
This class is present in gwt-log but in package com.allen_sauer.gwt.log.shared. My application code is referring to the correct package but still I'm getting this exception:
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: com/allen_sauer/gwt/log/client/WrappedClientThrowable
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at org.apache.catalina.util.Introspection.getDeclaredMethods(Introspection.java:127)
at org.apache.catalina.startup.WebAnnotationSet.loadMethodsAnnotation(WebAnnotationSet.java:273)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:133)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:335)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:782)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:306)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5202)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
... 10 more
Caused by: java.lang.ClassNotFoundException: com.allen_sauer.gwt.log.client.WrappedClientThrowable
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
... 24 more
Not sure which library is referring to the old package. Any help is appreciated. Thanks in advance.
Seems like you have a gwt-user and gwt-servlet in different versions.
It would be great if you could post your full "mvn dependency:tree" (or gradle equivalent)
EDIT:
Feels like you are using a somewhat outdated logging library.
https://github.com/fredsa/gwt-log/wiki/GettingStarted
Try adding this guy to your dependencies: compile 'com.allen-sauer.gwt.log:gwt-log:3.3.2
Seems this issue was introduced due to some duplicate compiled classes. I got the application from a different team who have recently converted it to gradle build. When I checked the project structure and gradle scripts, I found many inconsistencies. Basically project was not converted correctly.
After I converted it correctly, this error was gone.
Thanks for the insights, really appreciate it

java.lang.IllegalStateException: container base add child?

SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Error deploying configuration descriptor C:\Users\PRINCE SHARMA\Downloads\Compressed\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\conf\Catalina\localhost\ROOT.xml
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:587)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1798)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I am getting these errors in my tomcat apache window in console afer running my application. The application runs fine in browser and nothing seems suspicious but I do not have any idea why these errors shows up in 'tomcat apache console'
My tomcat apache version is 8
and i'm using java se 8.

Categories

Resources