Error 404: SRVE0190E: File not found: {0} on websphere 8.5 - java

We are migrating our Web application from WAS5.1 (Java 1.4) to WAS8.5(Java 7) using Eclipse Oxygen and WAS Migration Toolkit plug in.
We are able to build and publish application successfully on WAS8.5 local server but while accessing home page of application, we are getting below error. We don't have any special setting at container level for WAS5.1 but not sure what is missing here.
Error 404: SRVE0190E: File not found: {0}.

I was getting this error when trying to run an EAR on the server using Eclipse. I couldn't find an answer so I deleted the EAR and the project from my computer and re-cloned the project and made a new EAR. Somehow everything worked fine after doing that.. not going to question it. The old "unplug and plug back in".

Please check the web.xml file. I faced same issue and found that web.xml was got overritten with some default values.Not sure how it happened.but changing it to old values was working fine.
Check the jsp pages and if any errors for jsp in web.xml also can cause issues

Related

Error parsing application.xml when trying to publish a WebLogic 12.2.1 application

I have Java web application that runs on WebLogic 12.2.1. I've never had any trouble publishing to run locally - until now.
Now I always get the following error:
weblogic.management.DeploymentException: Error parsing META-INF/application.xml
The application.xml file itself seems fine, and it definitely hasn't changed. I can't figure out what the issue is.
Any suggestions? Thanks.
Thanks for the steer. It all has to do with replacing every instance of
http://java.sun.com/xml/ns/javaee/
with
http://xmlns.jcp.org/xml/ns/javaee/
in your xml files such as application.xml and weblogic.xml.

Project doesnt deploy to localhost root but deploys to localhost/projecttitle

Alternative title: Unable to find [main.SearchServlet], mapping my servlet in Tomcat whilst using annotations
I'm trying to migrate my web application from java netbeans glassfish jdk 1.8 to eclipse tomcat jdk 1.7.
I keep getting a 405 then 404 error when I try to perform my POST by pressing a button on my loaded index jsp.
javax.naming.NameNotFoundException: Name [main.SearchServlet/annj] is not bound in this Context. Unable to find [main.SearchServlet].
I thought that setting a <context root>/</context root> in web.xml would fix this. It did move my loading page from localhost/animelist/index and localhost/animelist down one level to localhost/ and localhost/animelist however it did not fix my error.
As it stands, my project does not run at http://localhost:8080/ or http://localhost:8080/index.jsp . It DOES run at http://localhost:8080/animelist1/ and http://localhost:8080/animelist1/index.jsp
The project works fine in my netbeans setup so my question is what do i need to do for my servlets to be mapped properly in tomcat?
Someone said that " Likely the only problem you have is that the application deployment in your secondary Eclipse isn't working properly yet. As in: the servlet class file is not deployed to the server at all." I'm not sure how to go about fixing this (or googling for it).
I have my classes instanced with
#EJB
private AnnJAXB annj;
and servlet with
#WebServlet(name = "SearchServlet", urlPatterns = { "/search" })
and like i said it all works in netbeans setup.
so do i have to do something with tomcat config or application properties, since deployment should be done automatically? why isn't mainClass.SearchServlet being found?
thankyou for reading. i am near the end i feel . it has been 15 hours trying to deploy this to a host and it is exhausting.

Switch java spring maven project from linux to windows

I am new to spring development so i am stuck here. Is there any configuration while switching spring + maven project from linux to windows. I am running on tomcat server 7. The project is initially developed in linux. I have moved all the file from linux to wondows. While running on server, i get error The requested resource (/myproject/login/) is not available. Do i need to make any changes or add add in configuation.
Thanks in advance.
I think you have missed something.
Try this.but i'am not sure this is working or not.
Tomcat, by default invoker servlet disabled (commented out in the web.xml file). You have to create a 'servlet' and a 'servlet-mapping' entry in your web.xml.
Once you do, you can get rid of the "servlet/" part of your url.
Check out the following URL for more information regarding the invoker servlet:
http://faq.javaranch.com/view?InvokerServlet

Axis Error unable to engage module addressing

I am using axis2 on Apache Tomcat. I am writing client side to consumer SOAP WS. I configured Eclipse to use Tomcat as a server and while executing that line
stub._getServiceClient().engageModule("addressing");
I was getting that error "unable to engage module addressing". To fix that issue I add following line in the VM arguments of run configuration
-Daxis2.repo="E:\axis2\repository"
Now I export my project as a war file and deploy it on the real server. But Now I am again getting the same error(I checked the log file). I don't know how to fix, can every one help me. Thanks
It got resolved on my side in the following way:
I had an outdated WEB-INF/modules/axis2-jaxws-mar*.mar or rather 2 versions of it and the classloader got the older one of it and AxisServlet didn't start altogether
java.lang.NoSuchMethodError: org.apache.axis2.engine.AxisConfiguration.getGlobalModules()Ljava/util/List;
at org.apache.axis2.jaxws.module.JAXWSModule.registerGlobalModule(JAXWSModule.java:51)

java.lang.NoClassDefFoundError: javax.servlet.ServletInputStream Error deploying on websphere

I have created a jersey web service with neatbeans using glassfish as my server, everything works fine but i have issues trying to install the same app on websphere 7.
i get this error "Error 500 An error occurred while processing request: /ibm/console/upload.do Message: java.lang.NoClassDefFoundError: javax.servlet.ServletInputStream".
I even tried creating a simple web app and tried to deploy on websphere, again, i have the same error.
Anybody with ideas? I need your help so badly ya'll. Thanks in advance
Make sure you don't have servlet-api.jar in your WEB-INF/lib. If its there it may interfere with the one already present in websphere a trick the classloader
I did below steps which worked for me :
Go to the server in console(which was stand - alone in my case i.e no DMGR)
Change the class loader policy to "multiple".
I suppose I am not too late to reply to this question. The HttpServlet class can be found in the j2ee.jar. WAS does not bundle it in servlet-api.jar, the way Tomcat does it.
You need to bundle servlet-api.jar file in your application.

Categories