Debugging JSR 168 Portlet with spring, eclipse & pluto - java

I am trying to set up a development environment to test Spring Portlet MVC for development of JSR 168 conforming portlets. I have the latest STS installed, which included Spring 2.5 and Eclipse (Catalina). This has been my environment to develop with Spring MVC, and that works fine using Apache as a local server for debugging.
I found some instructions on the Pluto portal site on using Pluto as a remote debugging host for portlets. I have implemented those instructions. I am sending Eclipse into debug mode by right clicking on one of the JSPs and going into "debug as". My problem is that when I log into Pluto, it is not sending me into debug mode. I am seeing the default Pluto page as opposed to my portlet. My portlet has not been installed onto Pluto, and the instructions do not seem to require the portlet to be installed.
To help, I have a screen shot at
http://www.ceruleaninc.ca/pluto_problem.jpg, showing the following:
Eclipse showing the remote debugging to localhost:8000
Tomcat showing the "Listening for transport dt_socket at address: 8000
The Catalina.bat jpda start command
The Pluto Portal screen after log in
Thanks much! I would welcome any advice on approaches to debugging portlets. I am not tied to pluto. There does seem to be a lack of detailed instructions on this topic.

When you run Pluto in debug mode, it is an external application, so you need to connect Eclipse to that external application rather than trying to debug a JSP.
The simplest way to do this is to select the project containing your sources, right-click and select Debug Configurations.... In the dialog's left-hand pane you should see an item called Remote Java application, double-click that and a new launch configuration should appear in the right-hand pane. Ensure the host and port is correct (it defaults to localhost, 8000) and it has a memorable name (it will default to the selected resource's name) and then click Debug.
remote debug configuration screenshot http://www.nakov.com/blog/wp-content/uploads/2008/08/eclipse-remote-debug-configuration.png
Eclipse will then attempt to attach the debugger to any process listening on the specified port.
On subsequent debug runs you can the simply select Run->[name of your external configuration].

Related

Azure, default "Hey, Java developers!" welcome page after successfully deployment

After succesfully deployment via Github repo of my Spring boot Application in Azure's App Service i have still "Hey java developers!" page, i tried do this via Github and Github Actions, Github and Kudu, FTP, but result is allways the same. I'm out of ideas.
UPDATE
Today, I try again. I disconnect connection. And try to reconnect, I saw build area like below.
After Action completed, it works.
So I suggest you disconnect and reconnect to solve the problem.
PRIVIOUS
According to your description, I personally tested one side and your problem reappeared.
My troubleshooting steps:
First create a default page for webapp. (Under windows, it fails, indicating that this is not).
Deploy the webapp under linux and find that everything is normal.
From the Action on github, it was found that there should be a problem with the build in the deployment under windows.
In conclusion:
It is recommended to use linux to deploy webapp. As for the deployment failure under windows, it is recommended to raise a support ticket for help.
My test result.
Under Linux, after build action, we can see app.jar file under wwwroot folder.
I also move it to windows webapp, it doesn't work.

How to run Jprofile with weblogic 10.x managed server?

Question:
How to make Jprofile 9.1 collect data from specific manged server and not from admin server?
Details:
By going with Jprofile wizard (Profile application server) I am able to attached Jprofile to the running Admin server but I am unable to find any option that allow me to monitor specific manged server.
In this question How can I connect Jprofiler with weblogic managed servers?
one of the answer says the following:
You're profiling the wrong server in that case. The VM parameter for JProfiler (-agentpath:...) has to be added to the JVM on which your application is executed.
The answer trying to point to some parameter changes to be done but it is not clear how to do it.
Here is a question that talks about setting JVM parameters for weblogic servers.
custom arguments to set in weblogic JVM
In the Domain Structure pane, expand the Servers node.
Click the name of the server that you want to configure.
In the right pane, click Server Start. Select Lock & Edit.
In the Arguments text box, provide the JVM options. After inserting your options, click Save.
Then click Activate Changes.
Restart the server so that the new
settings are used.
You should be able to set the relevant agentLib argument use the above described procedure.
Note, you need to copy the agent libraries onto the host that has the managed server.

GWT, superdevmode, and an extra Tomcat port

Based on samples found in the net, I developped a GWT webapp....that works fine (so far) when it is started in superdevmode from eclipse (through Jetty).
A browser can access my webpage from local/remote computer (bindaddress=0.0.0.0).
Issues appear when trying to deploy it with TomCat. Indeed, the webpage is accessible, but at some point, there is a redirection to port 9786. I guess this is a normal situation since it is built in superdevmode? If I set the development mode in Eclipse to Classic mode, it doesn't even work in Eclipse.
I thought having a web server listening on port 9786 is not a proper implementation. So, I am trying to get rid of this port (probably a matter of dev mode).
What should I do?

google app engine local server doesn't work run after multiple times in eclipse

After running app-engine java project multiple times in eclipse, app-engine local server doesn't work. I am getting error "This webpage is not available" in Google chrome. But eclipse console says that "dev App Server is now running". But using dev_appserver.cmd works fine, it is too difficult when developing the project. Any ideas to solve this?
PS: rerunning is done after stopping the current execution of the server.
Choose 'Automatically select an unused port' in debug configuration.
Local server will start every time on different port, but it should solve your problem.
try to change the configuration by "run as" or "debug as" and check server and port no.
Also ensure that in Windows>>preference>>java>>jre a path to jdk (not jre) is selected.
Please provide more details of the problem if it is still there.

JavaEE application throws HTTP 408 when debugging application with eclipse

currently I'm starting to learn JavaEE. I created a simple donation-management-system which is secured by a login form. In the past I've just deployed my code to JBoss AS 7.1.1 and accessed it via browser.
However I would like to debug my application using Eclipse, as my application is starting to get bigger. I found several tutorials on the web and here at so but they didn't bring the expected result.
Here is what I did:
I edited the "standalone.conf.bat" and uncommented the line
set "JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
Then I created a new "Remote Java Application"-Configuration in Eclipse using localhost as hostname and 8787 as port.
Now my problem is as follows:
When I try to debug the application, the integrated eclipse browser opens up and show the expected web page, but when I enter the credentials and click "Login" I this exception:
HTTP Status 408 - The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser
When I open my application in f.e. Firefox everything works fine.
Any ideas how to fix that? I'm already getting grey hair..
Edit: For the Login-Form I use the j_security_check
Could potentially be an issue with the integrated browser in Eclipse. Perhaps it's not handling session cookies properly.
To eliminate that possibility, I believe that in your general Eclipse preferences you can change the "Web Browser" setting to an external web browser (like Firefox) and see if you still have the issue.

Categories