The Selection Cannot Be Run Any Server Eclipse Websphere - eclipse

I have been having issues on my project on Eclipse. It keeps on showing me the error message "The selection cannot be run on any server".
I have already checked the project facets and Dynamic Web Module, Java, Javascript, Websphere Web (Coexistence and Extended) are checked.
I have Websphere checked on runtimes as well.
Websphere settings are fine as well.
There are no errors on the project.
It runs on Tomcat without issues, but when I try to run it on WebSphere Application Server I get an error.
When I click on Server > Add & Remove > I am not able to find my project there.
I have already reinstalled Websphere.
I have already researched about the issue and mostly have done the steps in there.
I'm hoping someone could help me and enlighten as to why this is happening. Thank you!

Related

How to run application using wildfly in Eclipse?

I am new to wildfly server. I have successfully integrated wildfly server in my eclipse and able to start it.
But when i am going to Run As from project left click or Add from Server Console in eclipse. It is not showing available project to me.
As those project as not listed so I am not able to run and debug it. While from command line, I am able to make deployment files using gradale and then deployed on wildlfy server and started it.
If some one have any findings on this that will be helpful for me.

How to run/debug java web service project in eclipse

I have a Java Web Service project which was just handed over to me by a colleague who just resigned (no one is assisting me in my new company). Im new to Java (J2EE) and my background is .Net + frontend + azure so I am pretty much very confused with setting up and running the java project. Also, Since my background is .Net Im referencing everything with how things work in Visual Studio from running a project, setting up a project to setting up and debugging a WCF project which I realized now is very different from eclipse + java.
I would really appreciate if someone could explain to me how I can run this project which is supposedly a java web service (as I was told)?
First I have a project that is like this:
Im assuming that the project boxed as blue is the webservice (and the rest are just libraries)? Is this correct? if so how do I run and debug the project using eclipse
Second when I click on debug as -> debug on server this is all I see:
Another colleague told me to install JBOSS (I haven't installed a server in eclipse) because that is what they used. Is there good documentation (step-by-step guide) on how to install JBOSS to run in eclipse. Im assuming that JBOSS + eclipse is like IIS express + Visual studio. Are there also other alternatives to JBOSS + eclipse like perhaps tomcat + ecplise that I can configure.
I really really find it hard to setup the java web service project in eclipse I have little to no prior experience with java j2ee programming especially with web services so any clarifications with my questions would be much appreciated. To sum up:
How would I really know that the project is a java webservice?
If so, how do I run the project and host the project using debugging in eclipse with tomcat or jboss?
I would appreciate if anyone can point me to the right direction of figuring out the source code
From here we can only guide you, you will have to go through some tutorials to understand how java projects work.
Your project is a webservice project according to your web.xml file because its having context params for rest.
the context param sets a front url to your webservice which in this case is gametime.
Check these tutorials and you will understand how it works
http://www.mkyong.com/tutorials/jax-rs-tutorials/
Create simple examples given in the above tutorial and then you can execute your's program
Jboss is a application server which we use to run our app.
You can install jboss in eclipse or you can use it externally also.
To install eclipse and jboss you can follow the link
http://theopentutorials.com/tutorials/java-ee/installing-jboss-tools-in-eclipse/
The other option is to download eclipse and jboss seperately
and use them.
Go to jbosshome/bin
If you download both of them seperately
then in that case for jboss
Invoke the add-user.sh or add-user.bat script. ...
Choose to add a Management user. ...
Choose the realm for the user. ...
Enter the desired username and password. ...
Choose whether the user represents a remote JBoss Enterprise Application Platform 6 server instance. ...
Enter additional users. ...
Create users non-interactively.
After this go to eclipse and follow steps of below link to add jboss to eclipse
http://www.mastertheboss.com/eclipse/jboss-eclipse/jboss-and-eclipse
A Java web application among other things has a predefined directory structure including folders named WEB-INF, WEB-CONTENT etc.
On how to deploy a web application to Tomcat via Eclipse you can follow the steps in this tutorial.

Step through debugging of web app code in Eclipse maven app running on tomcat

I am trying to set up eclipse so that I can work on a maven web application which packages as a war file without building the war file and deploying to tomcat webapps manually.
This would also allow me to step through the code. I have installed tomcat 7 and my app deploys there ok and I have pointed eclipse at the installation of tomcat but it does not seem to deploy properly even though the manual deployment works fine.
The issue I get when deploying is that eclipse informs me that tomcat was not able to start.
To deploy my app I am going "servers >> add and remove" and then deploying my application from the available list by moving it into the configured list. After doing this and starting the tomcat server I get the error message.
Can anybody help me with running the app from within eclipse based on the compiled code and not on whats in the war file as ideally my end result would be to be able to step through code I am working on without building the war file first.
Thanks
I finally sorted this out after a few hours of messing around reading numerous posts, so hopefully this answer may help someone else who gets the error message:
"Server Tomcat v7.0 Server at localhost was unable to start within 45 seconds"
Below are the steps I took:
1) Backed up my projects in my work space and then deleted the workspace
2) Recreated the workspace and imported my projects back into it
3) (this bit was crucial for me) - Added a connector to my server.xml on port 8080 as my app was set up to only run with SSL, it seems that eclipse tries to verify your app started by hitting the root of the web app and it couldnt do this due to the SSL connector.
I hope this helps someone out.

eclipse requested resource not available

I have run a j2ee application in tomcat/eclipse for several months now, but suddenly (after working with changed in the css files), I get the server error:
The requested resource /appname/ is not available. I'm totally lost. I've gone through a number of posts. This one describes my problem: Eclipse is not detecting servlet libraries, but I've gone through everything in that post without finding any missing jars or servers or anything in my project.
I'm running Eclipse Java EE IDE for Web Developers.
Version: Helios Service Release 1.
Project -> Properties -> Server shows Tomcat v6.0 Server at localhost
Project -> Build path, please see attached screen dump.
Project -> Project Facets: Dynamic Web Module 2.5 and Java 1.6 is checked.
I have tried to clean and rebuild the project.
I'm running over https so I'm connecting to https://localhost:8443/appname/Start. I'm not sure if that could be the problem, but it has worked ok until now.
Can anyone give me a hint what can be wrong?
Finally got it working again, but I honestly don't know exactly what fixed it.
I started with removing some servlets/servlet mappings from the web.xml file. After having done that change, when restarting the server, the Start servlet was found, but the jsp that the servlet was forwaring to was not (and the url to the jsp page looked strange). Also the logcat property file was not found. I read in another post that the Server might need to be cleaned so I did that and then cleaned the project once again. Then restarted the Server and now it's the application is running again.
Thanks for your help anyway, Andrei.
try cleaning your tomcat from eclipse:
right click in tomcat > clean.
then restart your server

Why not able to get the 'Run on Server' option for JSF jsp page on eclipse, weblogic, JBossTools?

I am trying to run a JSF 1.2 application created using Eclipse Ganemede and JBoss Tools on WebLogic 10.0 MP1
I have created a simple JSF helloworld application and have added a simple JSP. I have configured a weblogic domain and a server using the JBoss Tools plugin through eclipse. When I right click on the JSP file I can only see "Run Configurations..." options and NOT "Run on Server..". I do get this ('run on server') option when I right click on the application in the eclipse, but it doesn't run the
This is strange as in another JSF application on the same eclipse workspace, i am able to 'run on server' the JSP pages by right clicking on them.
Can anyone suggest a solution for this ?
Thanks.
Ankit
Do you see any error log when you start the server associated to your JSF application (either in the eclipse Error log view or in the logs of the server)?
As illustrated by this thread:
There are certain classes, identified by their package, that the server supplies which webapps aren't allowed to override.
If such classes are found in a jar in WEB-INF/lib, Tomcat deals with this by ignoring the offending jar.
Obviously, javax.servlet is one of those packages. Assuming javax.servlet.jar only contained javax.servlet classes, this shouldn't by itself cause your webapp to fail.
I would start by removing this jar from the webapp since it is always wrong to have a jar like this in WEB-INF/lib.
Not much of a solution, but at least you can provide some more details/logs which may be enough for you to get a better grasp on this issue.
Can you add the project by dragging the project to the server ?
If not then it's not a WTP project of some reason and then no run-as will be available.
There might be some error in web.xml.Even i faced the same issue after clearing the errors in web.xml ,i can able to see run-as option