Meet Error when run Spring MVC web application, " Servlet [mvc-dispatcher] in web application threw load() exception java.lang.ClassNotFoundException" - eclipse

Hello I was trying to build a simple spring MVC project but when I am running my code I am getting: Hello I am new to spring and I was trying to build a simple spring MVC project but when I am running my code I am getting: Servlet [mvc-dispatcher] in web application threw load() exception java.lang.ClassNotFoundException
I run it in Eclipse + TomCAt 9.0

It sounds like you're missing some jar(s). Note the specific class that you're missing, then google the jar that it belongs in, download it and add it to your project.

Related

Spring 2.0.2 Build war file using gradle

I utilized the following to develop a Restful application.
jdk1.8.0_171
tomcat 8.5(servlet 3.1)
Spring boot 2.0.2 to
I built a war file by doing below three things:
made main class to extend SpringBootServletInitializer and overrode its configure method
add apply plugin: 'war' to build.gradle
add providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' to dependencies in build.gradle
I started application by executing java -jar MyApp.war. The application can be accessed from any browser. But when the same war file was deployed to tomcat server, I got 404 error when I tried to access the application from a browser. There is no error in log.
Anyone has idean? Thanks!

GWT RequestFactory on Nebeans

Hello i have a trouble to run a simple application using RequestFactory i'm using Nebeans 7.3 GWT 2.5.1 deployed on Glassfish server 3.1.2
I got the following exception when the request is fired
SEVERE: Unexpected error
java.lang.RuntimeException: The RequestFactory ValidationTool must be run for the "xxxx" RequestFactory type
Has anyone tried that on Netbeans IDE if yes can you provide a link or a pom.xml?
Thank you in advance for any help you can provide.
2 steps!
Project->Libraries->Processors add requestfactory-apt.jar
Project->properties->Build->Compiling :check Enable Annotation Processing
save
Clean and Build the Deobfuscator will be generated

Spring 3.1 NoClassDefFoundError ListableBeanFactory

I am trying to upgrade an old project from Spring 2.5.6 to Spring 3.1.0. The project is not built with Maven so I had to add the jars manually to the build path.
The application uses Eclipse RAP as well as Spring.
I added all the Spring 3.1 jars in my build path:
lib/org.springframework.aop-3.1.0.RELEASE.jar
lib/org.springframework.asm-3.1.0.RELEASE.jar
lib/org.springframework.aspects-3.1.0.RELEASE.jar
lib/org.springframework.beans-3.1.0.RELEASE.jar
lib/org.springframework.context-3.1.0.RELEASE.jar
lib/org.springframework.context.support-3.1.0.RELEASE.jar
lib/org.springframework.core-3.1.0.RELEASE.jar
lib/org.springframework.expression-3.1.0.RELEASE.jar
lib/org.springframework.instrument-3.1.0.RELEASE.jar
lib/org.springframework.instrument.tomcat-3.1.0.RELEASE.jar
lib/org.springframework.jdbc-3.1.0.RELEASE.jar
lib/org.springframework.jms-3.1.0.RELEASE.jar
lib/org.springframework.orm-3.1.0.RELEASE.jar
lib/org.springframework.oxm-3.1.0.RELEASE.jar
lib/org.springframework.test-3.1.0.RELEASE.jar
lib/org.springframework.transaction-3.1.0.RELEASE.jar
lib/org.springframework.web-3.1.0.RELEASE.jar
lib/org.springframework.web.portlet-3.1.0.RELEASE.jar
lib/org.springframework.web.servlet-3.1.0.RELEASE.jar
lib/org.springframework.web.struts-3.1.0.RELEASE.jar
and I also listed them in the MANIFEST.MF.
The project builds fine, but at runtime when trying to login it gives me the following error:
java.lang.NoClassDefFoundError: org/springframework/beans/factory/ListableBeanFactory
I looked in the beans jar and the class is definitely there. I also searched through the project and the class is not used explicitly anywhere.
What could cause this? Thank you in advance.
This class does not exist in Spring 3.1.0. See http://www.jarfinder.com/index.php/java/info/org.springframework.beans.factory.ListableBeanFactory

javax.servlet.ServletException: PWC1391: Servlet.init() for servlet <project>.webservice.ApplicationConfig threw exception

What could be the cause for this error while running my Java EE 6 app from embedded container using Eclipse?
HTTP Status 500 -
type Exception report
message
description: The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: PWC1391: Servlet.init() for servlet <project>.webservice.ApplicationConfig threw exception
root cause
com.sun.jersey.spi.inject.Errors$ErrorMessagesException
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 3.1.2.2 logs.
Edit: Basically since I ran it successfully, I upgraded eclipse and made some changes in project (refactor/renaming variables) and svn repository setup.
Have you tried the suggestions Google produces when you search for PWC1391? Namely resolving potential version conflicts with the Jersey library (i.e. removing it from project).
Finally figured out that there were some libraries missing...including Glassfish 3.1.2 being the major one from "Web"'s "Java Build Path > Libraries".

jsf-console 3.x on JBoss 6.x possible?

I'm trying to move an application from JBoss 4.2.2 AS to 6.x AS. Right now I'm trying to get jbpm 3.x running on the AS I have this problem when trying to upload a .par file to the server:
13:41:51,713 ERROR [org.jbpm.db.GraphSession] (http-127.0.0.1-8888-1) java.lang.ClassCastException: org.jbpm.graph.def.Node_$$_javassist_92 cannot be cast to javassist.util.proxy.ProxyObject
Which then results in:
13:41:51,740 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/app].[ProcessUploadServlet]] (http-127.0.0.1-8888-1) Servlet.service() for servlet ProcessUploadServlet threw exception: org.jbpm.JbpmException: couldn't find process definition 'ProcessName'.
I've tried using both old and new versions of javassist which has no positive effect. Any ideas?
It seems you are using eclipse plugins and you have class loader problem between 2 plugins, make sure that you have only one class loader to load ProxyObject (Javassist)