i have a problem with netbeans IDE.
i created a web project , i can run it by index.jsp. it`s deploy and running successfully
but when i create webService in that, the project can deploy but not running
and web service dont run .
when i test web service, i see this warning:
Unable to open web service tester page:
http://localhost:8084/sample4/TestWebService
Make sure the service has been deployed successfully, and the server is running.
netbeans version is 6.8
tomcat 6.0
jdk 1.6
Can somebody please advice on this issue?
In my case, quite an obscure problem:
Project A is a Web project with dependency on project B, which depends on project C. Project C is the web service client generated with wsimport from the WSDL generated by project A (somehow a clean cycle).
My problem arised at the very moment when I rearranged the order of the libraries of project B, placing project C as the first of the list in the classpath (don't know if this matters, but before the call to catalina.jar).
So, when I rearranged my libraries in project B, placing the reference to project C as second of the list, everything went back to normal.
Wether if this works or not, please comment.
Related
I want to know the difference in running an application in eclipse by both ways below:
1)Run the application as maven build with 'tomcat' dependency in the pom.xml
2)download tomcat from apache site and add the server, run the tomcat and then run the application as server.
Lets say, my project name is 'messenger'. When I did using first step, i can access with below link"
http://localhost:8080/
but when i did as second step, i can access using below link:
http://localhost:8080/messenger/
can someone, please explain why the difference? arent both the same?
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.
When I run my GWT 2.7.0 app in Eclipse, all is fine.
I compile the app Right click on project > Google > GWT Compile. I build my war. Copy the war in the webapps directory.
I get the first page ok (static HTML), then when I click on the app, after some time, I get a message box that says:
The page at xxx:8081 says:
Couldn't load app from Super Dev Mode
server at http://xxx:9876.
Please make sure this server is ready.
Do you want to try again?
Here is what happened:
In debug / deployment mode, as I was working within eclipse, a library which used to be 100% compatible with GWT Client Side has evolved and is not anymore. It seems that the library was not recompiled while I was testing it (no need for recompilation) but when I compiled for deployment it did want to recompile the library, failed, but build the war anyway (probably lack of testing on the result), deployed the war, and got this error...
I found the same problem. And this happends because I generated the war file after deploying the project in Super Dev mode. The solution for me was to compile the project and generate the war before deploying it in Super Dev mode (which it is supposed to use the 9876 port not used in 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.
I'm trying to run the JHipster application via my Eclipse Juno, using jdk 1.7.
The app seems to be loading properly (no console errors), but when i'm trying to reach the server with the client side (or via Postman, by sending a request to the REST servlets in port 8080), it's not responding.
However, when i'm running "mvn spring-boot:run" in the command shell, the server is loaded successfully and is responding to the exact same requests. Also, I managed to run the same command via eclipse with some maven configuration but it seems to be running only the target files (jars) and not the source code. I still haven't been able to run the source code of this app using eclipse in order to properly debug it.
Any suggestions?
Thanks!
So the answer is quite trivial, but since I spent several hours to reach it, it might save some time for others-
Download & install STS IDE.
Import the project as existing Maven project.
Run/Debug the project.
I tried to run it via Eclipse the whole time (wasn't familiar with STS to be honest) and this probably needs some extra configuration (another comment with explanations on eclipse configuration will be much appreciated). Once you work with STS, it's easy.
You should not need STS, just Eclipse with the J2EE stuff.
I've imported the sample jhipster in Eclipse (without STS) as a Maven project and everything was OK, after installing the maven dependencies.
To run the project, run as an application and search for the Application (com.mycompany.myapp.Application)
This app works for me: https://github.com/jhipster/jhipster-sample-app. It is stuck on Boot RC5 which probably means it's a bit old. Maybe Julien can comment on that (or update it)?