Glassfish so many FileNotFoundException on server startup - java

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.

Related

Trying to deploy a Spring Boot web app using a JAR file, however am getting 404 NOT_FOUND errors on my JSPs

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.

Can't deploy application on WebSphere Application Server v8.5 [RAD IDE]

I'm using the Rational Application Developer IDE (RAD, which is a modification of eclipse) to modify an existing application. The problem is that I can't deploy the application on WebSphere Application Server v8.5, I actually get a french error message which translates to "Impossible to find the valid parent module to add to the server" and the next and finish buttons are disabled as shown in the screenshot below:
I have done some research I found out that it could be due to the fact that an EAR project doesn't exist but it is actually the case and I'm wondering if there is a configuration tweak to perfom to fix the problem.
What is the version of WebSphere Application Server that you are using and what is the EAR facet version of the EAR project? You may get that error because the EAR facet version is not supported by the server.

ClassNotFoundException: org.glassfish.jersey.servlet.ServletContainer

I downloaded Eclipse Luna and Tomcat 8.0.24 some months ago but I started using it. I've been creating a web app without Maven. I downloaded manually Jersey 2.23, Jersey media moxy 2.23, java-son 1.0 , jdbc mysql 5.x and sql2o 1.5.4. I'm starting to learn Angular and I successfully created one page without any issue.
I remember have added my jars manually in the Build Path of my project and I was forced to add them in the Deployment Assemblies also. Fine.
Since 2 weeks I didn't shutdown my laptop, just in sleep mode. But yesterday I did shutdown. Since then I suffered to make it work again. I use postman chrome to test my restful services and I received after the shutting down the 404 error.
I realized that I started to see the exception in the console:
java.lang.ClassNotFoundException: org.glassfish.jersey.servlet.ServletContainer
I deleted my folders of tomcat and eclipse to start again from scratch desperately. However, I got the same issue. The last thing that I remember I was playing with, were these modified options.
Double click in server from servers tab
Change from Use workspace metadata to Use Tomcat installation
Properties in Server
Switch Location from metadata to localhost.server
It was thanks to these questions that I solved my issue:
org.glassfish.jersey.servlet.ServletContainer ClassNotFoundException
java.lang.ClassNotFoundException: org.glassfish.jersey.servlet.ServletContainer
Now, after "reinstalling" eclipse and tomcat, when I add the jars in the library tab, they are now added in deployment assemblies automatically. (Surprised)
According to the previous attached questions, I added all the jars in WEB-INF/lib from my workspace as also in the tomcat/wtpwebapps/myproject/WEB-INF/lib. If I don't do this, I won't be able to make it work. Postman finally gives me the desired output.
Nevertheless, I realized when I copy the jars manually through windows explorer, the console in Eclipse displays the tomcat restarting again. BUT I still see the exception: java.lang.ClassNotFoundException: org.glassfish.jersey.servlet.ServletContainer. At least I can run my project in the browser or in postman without any issue. Very strange.
I want to add a new User Library in Windows > Preferences > Java > Build Path > User Libraries, but my list is EMPTY!!! So...
Finally, my questions:
What's going on with Eclipse?
Why am I not able to see my user libraries previously added?
Why do I still see the exception of glassfish.jersey in the console if I added the jars in the web-inf folder which makes it work apparently.
Why do I need to add the jars in web-inf, if when I see all the jars included in the Tomcat library all my jars are there because I forgot to mention that I added a folder called External in lib of my Tomcat folder.
For all these changes, I restarted Eclipse
Instead of adding jars manually, use maven and let the maven manage dependency of jars.
ClassNotFoundException occurs when you don't have a jar in the classpath. Maybe the package you are deploying on the server is not bundled correctly. Make sure you have jar bundled in your package or present in the classpath.
Another reason could be you have duplicate class files in two jars and the class your programme picking is not suitable.

NoClassDefFoundError after deploying WAR on Weblogic10.3.6 created from Eclipse

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.

Unable to install breakpoint in Eclipse: Absent Line Number Information

I have a Java 1.6.0 web application that I am developing using a Kepler Version 2 Eclipse development environment. I am using an Oracle Weblogic Server Administration Console 12c.
I'm running the app locally - and trying to debug it. Instead of stopping at any of the breakpoints I've set - I get the following error:
When I installed the application to Weblogic, I ran the Weblogic console and then installed the application by adding the ear file.
I thought I did everything exactly the same as previous web applications I've done this way - but I was always able to debug those applications.
Also - one other thing that is different. When make any changes and re-build the ear file - I actually have to delete and reinstall from the Weblogic console for the changes to take place. I'm thinking this might be related.
Any suggestions?
Thanks!
Have a jar file added to a build path in any of the projects that
include the classes in your project

Categories