I am unable to configure Spring Batch Admin 1.3.0
I have overridden the data source defaults but I keep getting all kinds of errors.
The last one has to do with ClassNotFoundException.
Caused by: java.lang.ClassNotFoundException: org.springframework.integration.MessagingException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714) ~[catalina.jar:7.0.42]
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) ~[catalina.jar:7.0.42]
... 35 more
Sep 30, 2014 5:45:18 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
I have included Spring Messaging 4.0 jar in the pom..
I had similar issues using Spring Batch Admin 1.3.0 with Spring 4.1.4 . Several of the classes have had their names changed or have been moved to different packages. Also, a couple of the previously deprecated "SimpleXxx" classes have been dropped (SimpleJdbcTemplate, for example). The resolution is to use the current classes and packages, and to lose the "simple" from a couple of class names.
I finally resolved all of my issues with spring-batch-admin by downloading the current 1.3.1.RELEASE source from github and building it without any modifications.
Does this help?
You might be missing spring-integration-core jar. Please check and try again.
Related
I am following this blog to try out a Spring-Boot-Admin application. And when I run the app it fails with the below error:
Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'adminHandlerMapping' defined in class path resource [de/codecentric/boot/admin/server/config/AdminServerWebConfiguration$ServletRestApiConfirguation.class]:
Invocation of init method failed; nested exception is java.lang.StackOverflowError
I look further below and find these below lines:
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_231]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.2.1.RELEASE.jar:2.2.1.RELEASE]
Caused by: java.lang.StackOverflowError: null
at de.codecentric.boot.admin.server.web.servlet.AdminControllerHandlerMapping.withPrefix(AdminControllerHandlerMapping.java:48) ~[spring-boot-admin-server-2.1.0.jar:2.1.0]
at de.codecentric.boot.admin.server.web.servlet.AdminControllerHandlerMapping.registerHandlerMethod(AdminControllerHandlerMapping.java:44) ~[spring-boot-admin-server-2.1.0.jar:2.1.0]
Not sure if there is some circular dependency in the jars. Any idea please?
The comment by #the hand of NOD made me relook into my pom.xml file and the pom.xml file provided in the blog
The problem lies in the version number of the spring-boot-starter-parent. The tutorial uses a version 2.1.0.RELEASE whereas the latest one when you prepare a project from Spring Intializr is 2.2.1.RELEASE
I downgraded to 2.1.0.RELEASE and it worked! With 2.2.1.RELEASE there is some dependency that is going cyclic with spring-boot-admin-starter-server
P.S. It seems that the codecentric team is already working upon it and would release the 2.2.0 compliant version by 22 Nov 2019 (https://github.com/codecentric/spring-boot-admin/milestones)
It works for me upgrade spring-boot-admin-starter-admin to 2.2.4 and using
spring-boot-starter-parent 2.2.8.RELEASE, spring-boot-admin-starter-client 2.1.6 on service's pom
I have a question. I'm still new to Spring Framework and how to configure a Jetty server with Apache CXF and JAX-RS services there.
I'm working on a Maven multi-module project and my module is just one part of that whole project. It's written in Java. And it uses the Spring Framework with Spring Beans/BeanFactory there. It's configured in an XML file there.
I followed those documentations:
- http://cxf.apache.org/docs/jetty-configuration.html
- http://cxf.apache.org/docs/jax-rs.html#JAX-RS-ConfiguringJAX-RSservices
- http://cxf.apache.org/docs/secure-jax-rs-services.html
The JAX-RS service is running so far already, but it shows me an empty webpage then. It also shows me in a LOG file that the Java classes (with the JAX-RS annotations #GET, #PUT and so on) of the JAX-RS service are running and called already, but as soon as I send a request, I receive the following error message:
27 Apr 2014 20:05:53 (cdmi) [] /
java.lang.NoSuchMethodError: org.eclipse.jetty.server.Request.getConnection()Lorg/eclipse/jetty/server/HttpConnection;
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:222) ~[cxf-rt-transports-http-jetty-2.4.0.jar:2.4.0]
at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72) ~[cxf-rt-transports-http-jetty-2.4.0.jar:2.4.0]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1024) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.Server.handle(Server.java:370) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644) [jetty-http-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) [jetty-http-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) [jetty-util-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) [jetty-util-8.1.13.v20130916.jar:8.1.13.v20130916]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_55]
Does someone know this error message. What is the error message trying to tell me and how can I solve it?
I'm not sure which further information might be required, but I can add that information if necessary. The dependency for cxf-rt-transports-http-jetty (version 2.4.0) exists in the POM.xml file of my Maven module.
Many thanks in advance!!!
NoSuchMethodError basically means that a class definition has changed between compile time and runtime. This can be caused by using a different version of a jar when running your application than the version things were compiled with.
It looks like sometime between Jetty 8 and 9 the getConnection method was removed from Request. I would check your target folder to make sure you don't have multiple versions of any jars and that the versions you are using are compatible with each other. Also make sure that however you are running Jetty, it's the same version as the libraries your application depends on.
You might also run maven dependency:tree to check that versions in your pom aren't being overridden in unexpected ways.
While I am deploying and runing my web application on Apache Tomcat in Eclipse IDE
I've included the JSTL1.2.jar, jstl-impl.jar.
I'm really wondering how to get this fixed. The same deployment works perfectly fine on Weblogic server(on PROD environment)
Exception stack trace:
INFO: Starting Servlet Engine: Apache Tomcat/7.0.12
Feb 10, 2014 6:40:29 PM org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/ConditionalTagSupport
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1148)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1643)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1223)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1450)
at org.apache.jasper.compiler.Parser.parse(Parser.java:138)
I would check a number of things:
1) That the jar files are sitting in the lib folder under WEB-INF and not just referenced in the build path.
2) That the tomcat 7 runtime library is included in your build path
3) I'd check the web.xml file and ensure that I'm complying to a spec higher than or equal to 2.5.
If you provide more details with your project setup it might be easier to answer.
Hi! Although I've found very similar questions over the forum, none of them was meeting my requirement.
I am using Tomcat 7 to deploy my spring app. However, I am facing:
‘java.lang.ClassNotFoundException:
org.springframework.web.context.ContextLoaderListener’ error,
java.lang.ClassNotFoundException:
org.springframework.web.context.ContextLoaderListener at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at
org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:532)
at
org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:514)
at
org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:133)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)
at
org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Oct 09, 2012 7:37:32 PM org.apache.catalina.core.StandardContext
listenerStart SEVERE: Skipped installing application listeners due to
previous error(s) Oct 09, 2012 8:00:48 PM
org.apache.catalina.core.ApplicationContext log
I have verified that org.springframework.web-3.1.2.RELEASE.jar is present in the WEB-INF\ \lib\ folder and the required file is present inside it. Kindly note that I am not using any build tool to deploy this web-app like maven.
I have tried to clean and reinstall the app, restarted Tomcat, but didn't have any luck.
Please help.
In WEB-INF\ \lib\ where? In artifacts, or in the project? if it is in the project then it does not mean it is in classpath, If you are using eclipse and did not edit output classpath by eclipse - tomcat setting then you should make sure the .jar file is in:
..\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\YourApp\WEB-INF\lib
that is the default place that eclipse makes artifact and deploys it from there. So make sure you included jar file in eclipse build path configuration. First time when you add new jar or something that related to classpath then do: right click on tomcat(in eclipse) then publish from menu, By this way eclipse updates whole artifact.
Worth verifying if you have the project structure and required jars in classpath. You can take help of this if required for set up.
If you are sure all the jars are available in your lib directory, try cleaning tomcat work directory.
From eclipse (servers view), right click on Tomcat server and then click on the menu "Clean Tomcat Work Directory).
We have been using ehcache.server.1.0.0.war for almost a year.
This week we moved to new computer. We copied cache and changed ehcache.xml accordingly.
However, the new server is now not starting. It throws the error:
SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
at org.slf4j.impl.JDK14LoggerAdapter.warn(JDK14LoggerAdapter.java:429)
at net.sf.ehcache.store.DiskStore.deleteIndexIfCorrupt(DiskStore.java:267)
at net.sf.ehcache.store.DiskStore.initialiseFiles(DiskStore.java:210)
at net.sf.ehcache.store.DiskStore.<init>(DiskStore.java:166)
at net.sf.ehcache.store.DiskStore.create(DiskStore.java:187)
at net.sf.ehcache.Cache.createDiskStore(Cache.java:1069)
at net.sf.ehcache.Cache.initialise(Cache.java:941)
at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:921)
at net.sf.ehcache.CacheManager.addConfiguredCaches(CacheManager.java:607)
at net.sf.ehcache.CacheManager.init(CacheManager.java:336)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:276)
at net.sf.ehcache.CacheManager.create(CacheManager.java:636)
at net.sf.ehcache.CacheManager.getInstance(CacheManager.java:657)
at net.sf.ehcache.server.soap.EhcacheWebServiceEndpoint.<init>(EhcacheWebServiceEndpoint.java:71)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
Any ideas appreciated.
java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
This error happens when you have wrong slf4j version of the jar. Check carefully all jar versions/sizes on your old server and make sure they are the same on a new server.
Also diff. versions of the jars could be in your new app server system classpath that would interfere with your application classpath. You should configure class loading order policy in your deployment descriptor (its specific to the app server vendor you are using)