failed ear file deployment on jboss server - java

I'm trying to run a simple Java EE app on jboss wildfly 8 server. I just by selecting Run on Server menu. but deployments folder is empty. browser shows error 404 not found by accessing address:http://127.0.0.1:8080/EjbTest/. Any idea?

Finally, I figured out what problem my ear file had. As EAR File Structure says, my ear file didn't follow the structure. after putting necessary files into .ear file, it worked with no problem.

Related

Spring Boot REST API war file generating 404 error

I have a REST API developed with Spring Boot.
If I run it from the IDE it works fine.
For instance, the following url returns the correct json.
http://localhost:8080/xyz
Now I want to deploy the app.
Generated a war file and deployed it locally to:
C:\apache-tomcat-9.0.43\webapps
Closed the IDE.
Then started Tomcat and accessed the following url again.
http://localhost:8080/xyz
I'm getting a HTTP 404 error.
What could be the reason?
Tomcat is starting correctly.
http://localhost:8080 correctly opens tomcat main page.
It is also correctly generating the app folder under \webapps.
After deploying your war file a folder will be generated with same name of war file.
So the Url will be http://localhost:8080/<war_file_name>/xyz
When you run with your Ide its run only Enbibed tomcat and its only run your app that why you don't need that war file name as root path. But when run your app extremal tomcat it's need to use War File name as root of your app because here root is tomcat container that run different war and each war root path its file name. That's why <war_file_name> is needed before your path.
http://localhost:8080/<war_file_name>/xyz

java.lang.ClassNotFoundException - org.openrdf.repository.config.RepositoryConfigException in JSF

I am trying to run a JSF application on Tomcat 6 which is only for connecting to the Sesame repository. I added all the external Jar files needed for Sesame and the the project is created as Dynamic Web Project for JSF. I also configured everything for JSF by following some tutorials. In Eclipse, I export the WAR file to deploy it on Tomcat 6 as follows:
Right-click on the project -> Export -> WAR file.
The WAR file is stored in webapps folder in Tomcat. When I insert the URL: http://localhost:8080/JSFSesame/faces/index.jsp, I get the following message:
An Error Occurred:
org/openrdf/repository/config/RepositoryConfigException
Caused by:
java.lang.ClassNotFoundException - org.openrdf.repository.config.RepositoryConfigException
I do not know what is missing at this point. It seems like I need to add JAR files that I am not aware of. Could anyone please assist me to solve this problem? Your help would be very much appreciated.
The Class RepositoryConfigException is missing.
It is e.g. part of the following JAR sesame-repository-api-2.5.0.jar.
Alternatively use Ctrl+Shift+H in eclipse and look, fro which jar it is retrieved from there - copy the jar.

Deploying a Dynamic Web Project with Tomcat

I currently have a working servlet created in Eclipse. When running it from the Tomcat plugin, everything works, and my app shows up at localhost:8080/project_name/. However, when I package the project into a .war file and place it in the /webapps directory of Tomcat and start the server, the servlet cannot be accessed. In Terminal, I can see Tomcat loading my project, and a temporary folder of the unarchived project is also created in /webapps. However, I simply cannot access my servlet.
Note:
I'm using Tomcat 7 and I don't have a web.xml file in my project.
How are you creating the war file? Check if your war files contain jar files under WEB-INF/lib folder and if the class files are not missing. You can easily verify it under tomcat/webapps/[project name] folder.

Difference in EAR Deployed in Websphere Application server. (war to ear )

I have a web application(Myapp) configured in eclipse.
So in order to Deploy it in Websphere v5.1 I have to export it to EAR.
Scenario 1: In eclipse--> new --> Enterprise Application Project
-->Named as MyappEAR--> Selected Existing Module(Myapp)--> Finish. Now I got MyappEAR in Project Explorer. Right click on MyappEAR export to
EAR. Done. Got MyappEAR.ear file with Myapp.war inside it.(Includes
META-INF and xml)
Deployed MyappEAR.ear in Websphere, Deployed Successfully. But when i
tried to start MyappEAR it ends up with this error SRVE0054E: An error
occurred while loading Web application (No more information found).
Scenario 2: Eclipse--> right click on Myapp export to war--> Got
Myapp.war--> Deleted existing myapp from Project explorer.
File-->Import-->WAR--> enabled Add project to an EAR and named it as
MyappEAR-->finish Right click on MyappEAR-->export to EAR. Done . Got
MyappEAR.ear with same stuff as above.
Deloplyed and Started working fine.
Now my question is What's the difference in both ways causing that error? (even checked with beyond compare, everything is same).
Websphere app server v5.1,
Java 1.4,
Eclipse Indigo.
We have a Maven project and it builds the EAR after we run mvn clean install.Then I take EAR from target folder and deploy it in server.
In local setup,Just add the project in server and start the server.Normally it works.

Jsp Project not running

I have created a web project which includes .jsp and Java beans pages. When I run this project with eclipse, using tomcat it works perfectly fine, I deployed the project successfully, the program runs and I receive a web page in the browser.
But when I try to deploy war file in webapps folder of tomcat6 and run on browser it gives error –
This is the error I see on the page:
HTTP status 404. Description: the requested resource is not available.
What might be the problem?
Check if you have file index.html/index.jsp in your war if it is not there then you have to either need to change the name of file that is opened in context "/" or you have to make changes in list.
To create WAR file using eclipse, follow the option File -> export -> Web > War File and finally select project and destination folder. To deploy war file in Tomcat, place the war file in Tomcat Installation Directory > webapps directory and start the Tomcat.
Hope this is useful for you !!

Categories