I have a question regarding java.lang.ClassNotFoundException.
I build my Maven Projekt in eclipse and everything Looks Fine, however at Runtime i geht the following exception Locally:
java.lang.ClassNotFoundException
I Also found the class at the correct directory in .war file. Then I deployed the Same war file on Tomcat test Server and it Works Fine There. I only See the exception when i Start the Projekt locally and try to Debug it. Does anybody any have an idea how can i get rid of this exception locally as well? What Could be the possible differents between tomcats locally and in the server ?
Regards
P.S I have no access to server data I just can deploy my file on it
Related
First post on here and I'm fairly new to JAVA so please keep that in mind ;) I've spent literally days trying to solve my problem and am running out of patience. Here's the deal : I've got a Spring Boot web app that I've successfully deployed on Digital Ocean by running a Tomcat Server and deploying a WAR file on my cloud VM. Everything was working fine with that set up when my app wasn't a Spring Boot app. Since then I've changed it to Spring Boot (added Spring Security etc.) and would like to deploy a JAR file which has Tomcat built into it which I was told is simpler and the better way of doing things. After creating my JAR file via my IntelliJ IDE, using Maven clean and build I'm able to run the app successfully on my windows machine command line which I've confirmed runs : localhost:8080/login spits out a message to the console so I know it's in my controller as well as I can see a connection to my DB. The issue is my JSPs files aren't loading and am seeing the below in my console:
Errors
Forwarding to [/WEB-INF/view/login.jsp]
Completed 404 NOT_FOUND
After many hours I've realized that when I open my JAR file via WinRAR, the JAR file is missing my files that I had under my webapp directory in IntelliJ. Since this is a stand alone executable JAR, these files need to be located somewhere in my JAR, right?
Two questions I guess:
1.Do I need to do something special to get my webapp files added to the JAR during the build?
2.Can I just alter the JAR manually and place them in there? If so, where should I locate them so that they can be accessed and I won't get the 404 errors anymore?
Thanks all for your help. Much appreciated.
My question is about deploying a project written in scala and java with springboot as backend. First I tried to build it with IDEA as .war file and put it under
my-tomcat-dir/webapps/
on my Ubuntu 18.04 server. When I run it with
sh my-tomcat-dir/bin/catalina.sh run
it just seems well, however it didn't respond to any request from my frontend application and there is no any errors log in my terminal screen. So I tried to build the project on my Ubuntu server. First I upload my project files to the server and run
sbt assembly
in the project directory, later I run
sbt package
and got a .war file. Again I put the file under
my-tomcat-dir/webapps/
and it just got the same result as before. How can I get this project built and run well under this situation? Any further information please inform me to provide, thanks!
I've created a simple web app and it works fine when I deploy it on internally configured server in eclipse.
But now I exported it as a WAR and tried to deploy on another Weblogic server. I get the following error:
java.lang.NoClassDefFoundError: com/ofss/UcbparamConnector
at jsp_servlet.__ucbparam12._jspService(__ucbparam12.java:88)
The UcbparamConnector.class is present in the WAR under WEB-INF/classes/ but looks like it is not found during the runtime. Please suggest what could have gone wrong.
The other Weblogic server was configured to run on different JRE which was causing this problem.
After changing JDK path, web app is working as expected.
Thank you.
I have an ear file. I start my glassfish domain and deploy using an ide (IDEA or eclipse). On server start up when I check the logs I see a FileNotFoundException for I believe each and every dependency we have on the project.
Sample :
java.io.FileNotFoundException:
C:\Developer\web-server\glassfish3.1.2\glassfish\domains\domain1\applications\AYDEMPANOTEST-EAR.ear\spring-beans-3.2.0.RELEASE.jar
(The system cannot find the file specified)
I use maven for dependency managment. After a set of FileNotFoundExceptions the final log confirms that the domain started successfully and the project is deployed as expected.
Sample :
[#|2014-02-06T14:20:16.648+0200|INFO|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=45;_ThreadName=Thread-2;|AYDEMPANOTEST-EAR.ear
was successfully deployed in 23,440 milliseconds.|#]
The project works and behaves fine however I'm still very curious about why we have so many exceptions thrown that can be observed in the logs and why they have no effect at all.
Turns out it's a known TLD scanning bug that is fixed on glassfish 4.0.
I have searched stackoverflow before posting this question.
In eclipse i am running a tomcat server. I deleted the .class files from the work folder of the tomcat server. From then on I am facing the issue saying the class couldnot be found.
I re-built the project. Didnt help
Can you please suggest how to fix this issue.
You should NOT run Tomcat as a normal program inside Eclipse. You should use the EE version of Eclipse, and then add Tomcat in the server view. This will allow you to deploy Dynamic Web Projects directly to Tomcat or any other supported server.
delete the server from eclipse server view and create it again.