Accessibility of Tomcat during debug - java

I am trying to debug Web Service running on Tomcat 7.0 via Axis2 in Eclipse Mars2.
I have started Tomcat inside Eclipse with this arguments:
-Xdebug
-Xnoagent
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
I have created the remote debug configuration for my project and started it. Everything seems fine: there's tomcat running and in debug perspective I see my Remote Java Application with some Daemon threads.
But how do I test it? When I try to access tomcat via browser typing "http://localhost:8080/axis2/services/REButils/" it returns 404, Soap UI returns the same?
How do I invoke my service if it's unaccessible?

I've managed to start Tomcat separately in jpda mode and it worked fine with eclipse remote debugging.
No idea why 404 happenned while starting apache from Eclipse though.

Related

Timeout when starting Tomcat from Eclipse

My server.xml is configured to use Apache in connection to Tomcat. If I start Tomcat with startup.sh, it works fine because I can access a simple html-file located in webapps/ROOT at port 80 and 443.
Netstat -tulpn shows that a java process occupies the 8005 and 8009 ports.
Then I run shutdown.sh, and the netstat shows the ports are no longer occupied.
I try to start Tomcat from Eclipse. The console says it is started within 10000ms. The ports 8005 and 8009 are occupied by a javaprocess, but in Eclipse I get timeout, and the state of the server is 'Starting'.
I try to start a html-script that calls the restful web service, but I get 503 Service unavailable. I've stuggled with this the whole day. I do not understand what to do with this. Please help !
I have just solved this problem. It was due to my java version 8 was not supported by Tomcat version 8.5. I had to install tomcat version 9. Then I got another problem when I added tomcat to Eclipse. That was Unknown version of Tomcat. I eventually solved that problem too by setting my user as the owner of the apache-tomcat-directory.

Can't run Java EE project through WildFly 10

When I unzip the wildfly-10.1.0.Final.zip file on my computer at home. Then WildFly starts running automatically. I had verified this through going to localhost:8080. Because of this I can't run my Java EE project on Netbeans (I have added WildFly as server in Netbeans). In the logs I see:
Address localhost: 8080 is already in use
I also can't shutdown WildFly through the following command:
$ ./jboss-cli.sh --connect command=:shutdown
However I can shutdown WildFly by killing his process. But this still doesn't fixed my issue on Netbeans. Because I still get to see: Address localhost: 8080 is already in use.
At my work when I had unzipped the wildfly-10.1.0.Final.zip file. It didn't start automatically I also had no problems with running my project on WildFly. And I also can shutdown WildFly through the command line or Netbeans.
Anyone that maybe knows how I can fix my WildFly server problem on my computer at home?
Which version of NetBeans are you using ? Until 8.2 WildFly 10 isn't correctly identified.
You may try NetBeans 8.2 RC1 from https://netbeans.org/community/releases/82/ or a nightly build as this would fix your issue.
NetBeans checks if there the instance is already running before trying to start it, so you don't have to start it beforehand but you can :)

Application running on wrong apache Tomcat server

I created an application on Eclipse, locally on my PC. Once it was working I created a war file and deployed it to my Linux server. Now the problem is that the application is still running on my local Tomcat. I am not sure why this is happening.
Is there any place I can look to find the cause of this issue?
I created this application in JSP/servlet.
Your query looks invalid , application can keep on running on your local PC and server both , its about which one you access i.e. which url you use in browser.
To stop the application from running on your pc there are a lot of thing you can do to stop it.
If you are running windows and tomcat is installed as a service then you can stop the Apache Tomcat service by opening services.msc
You can also uninstall tomcat using $CATALINA_HOME/uninstall.exe
You can also access the tomcat's manager application and un-deploy your application. To do this go to http://localhost:port/manager/html. Enter the credentials you used during installation to log in. Find the application from the list there and stop it.
You might check the running java vm by jvisualvm on your OS(with GUI). Or check the current running processes both in PC and linux server.
If you have not stopped the application running locally it will continue to run till you stop the tomcat server. Application can be packaged into a war file while tomcat is running.
If you have started the tomcat with in eclipse, use "Server" view in eclipse to stop the tomcat. If you have started tomcat via command line, you can use shutdown.sh or shutdown.cmd to stop the tomcat.

eclipse - Java Remote debugging does not hit the breakpoint

I am using Jetty 8 and trying to connect from Eclipse(Remote Debugging). I am using Java 1.6. I have the latest code in eclipse. The port is not blocked in firewall.
Jetty is running on port 8080. I opened the debug port on 5999 using the below command
java -Xdebug -agentlib:jdwp=transport=dt_socket,address=5999,server=y,suspend=n -jar start.jar.
I opened the application in browser(https://[servername]:8080) and logged in to the application.
Later I connected in eclipse(Run-->Debug configurations and gave hostname and port(5999)), breakpoint is not hit when I browse through the application in browser. But I could able to see the Threads in the eclipse, only the code is not hit in eclipse

How to launch and debug spring application on linux server?

I have a spring application on my local PC. And a VPS, run centos OS and has installed tomcat. My application could run well in localhost, but after I put it on the server(/tomcat/webapps) through ftp. It doesn't work any more and the tomcat will stop service when start that application. So what's the right steps to run application on tomcat on a linux server, and how can I check what's wrong with the application(like the debug log on local Eclipse)? Thx!
Can you check Tomcat's server logs, (located in <~tomcat-installation-directory>/logs? You may find the possible cause for your server's crash. If you server and application is up and running, then you may do remote debugging using Eclipse.

Categories