Am trying to integrate Spring 3.2.3 with JSF 2.2.1 and getting an error like Caused by: java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapable The class is available in my classpath (spring-core-3.2.3.RELEASE.jar) but not sure why this error occurs.
It worked fine when I removed the project from the server, clean/build and restarted again. Thanks.
Related
Recently I updated my JDK from 8 (1.8_275) to 11 (openjdk version "11.0.9.1" 2020-11-04)
While I am trying to launch SCDF local server using
java -jar spring-cloud-dataflow-server-local-1.7.4.RELEASE.jar
It had no issues at all while I used JDK 8. But with JDK 11, I am getting below exception:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]:
Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError:
javax/xml/bind/JAXBException
I looked here and here. Even trying (with --add-modules java.xml.bind):
java -jar spring-cloud-dataflow-server-local-1.7.4.RELEASE.jar --add-modules java.xml.bind
results in the same error as mentioned above.
I understand, as per this, it is removed in JDK 11. But What I am missing here? I mean how can I make it work or what is work around for this?
You're using an ancient and deprecated version of SCDF. The 1.x version of SCDF has reached EOL/EOGS, as well. In particular, the version you're using is >2yrs old.
Please upgrade to the 2.x version. The latest GA is at 2.7.0.
Check out the getting-started guide and the release blog for more details.
You could try running without internet connection. They didn’t update the pre-built jars properly and it must be behind a firewall also. Try kubernetes too.
While running my spring-boot application I'm getting this exception:
ClassNotFoundException: javax.servlet.Filter
I am getting this in case of IntelliJ only while it is running successfully in STS 3.
Is there any generic reason?
I am trying to migrate my project from jboss-eap-6.4 to jboss-eap-7.2.
When I try to deploy my war file, I get following error:
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYUT0027: Failed to parse XML descriptor \"/C:/jboss-eap-7.2/standalone/deployments/my.war/WEB-INF/lib/spring-modules-validation-1.0.0.jar/META-INF/valang.tld\" at [13,23]
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[13,23]
Message: Unexpected value 'body-content' encountered"}}
I tried searching about this and I got to know that this is common issue. And I got one of the solution as,
changing <body-content>None</body-content> to <body-content>empty</body-content> in valang.tld
in this redhat link: https://access.redhat.com/solutions/910833
as body-content is present at line 13 and I read the documentation for jboss eap 7.2 in which it has written that the value should be empty.
I saw another solution as making this as dependency in maven pom.xml or excluding it.
But I can't do any of this things.
I am using JBOSS EAP 7.2 with gradle, So is there any thing I can do by making changes in gradle or JBOSS's configuration files to solve this issue?
Please help me on this :)
I finally made the same change in the spring-modules-calidation.jar. My concern was to after making this change does it affect my other server, as I was running this on jboss as well as tomcat. So now I am providing the updated jar to JBOSS EAP 7 and the original one to tomcat.
When i run my grails application in tomcat i get the following error
java.lang.NoClassDefFoundError: org/apache/batik/dom/svg/SVGOMDocument. But the batik-svg-dom.1.7.jar is packaged in the war and in the classpath.
I don't however get this error when i am running the application in debug mode in STS.
I am using Grails 2.3 and building my war using maven. I am using FOP and have excluded the "xml-apis".
I have tried to place the batik-svg-dom.jar in the lib folder of tomcat, that did not work.
Thanks in advance.
Just moved to Grails 1.2.1 (used 1.1.1 before). Changed application.properties, ran grails upgrade, fixed BuildConfig and Bootstrap - everything works just fine from grails console.
However, getting a problem when deploy packaged war under jetty 6.1.22:
1581 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.NoSuchMethodError: org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory.setParameterNameDiscoverer(Lorg/springframework/core/ParameterNameDiscoverer;)V
My project is built with maven2. I researched the war dependencies and see that both spring 2.5.6 and 3.0.0.RELEASE are used there.
I then tried to suppress use of spring 2.5.6 and got a problem with Acegi plugin (using version 0.5.1):
2010-03-10 21:06:56.440:WARN::Nested in org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava/lang/String;)V
Any help would be greatly appreciated.
The problem is caused by the fact that in new version of Spring
ConfigurableWebApplicationContext is located in spring-web.jar, but the interface it inherits ConfigurableApplicationContext, which contains setId(String) method is in located in spring-context.jar.
If you have a library which has been compiled against older version of spring-context it will fail with NoMethodFound exception.
The solution is to locate and recompile that library against latest Spring version.
If you are using Spring version below 3.0 you could try to put full Spring bundle Jar instead of separate packages.