The web app I'm trying to debug only exhibits a bug on a particular Glassfish server, so I want to debug the web app remotely. But the web app was developed in Eclipse for Java SE and I can't see how to do that.
I have:
Installed Eclipse 3.7 for Java EE
Installed the Glassfish adapter
Configured the server for secure login and JPDA debugging
Added the server as a server in Eclipse
However, I do not see "Run on server" or "Debug on server" in the Run menu of Eclipse. If do Debug as, I can create a new Glassfish configuration but I can't select a server, so I can't configure the configuration.
For Glassfish 3:
First enable debugging in the Glassfish administration console
(Application Server -> JVM Settings -> General -> Debug Options)
which require restarting the domain. Make a note of the port number.
Then you can attach to the Glassfish debug port like any other debug session, with a "Remote Java Application" in the debug configurations.
Related
I have issue to deploy Spring project directly from Eclipse. It doesn't work if I try run to server option from Eclipse. But same project works fine if I deploy from console to local Tomcat. I would like to debug it by setting break point and also want to see debug output to console as I used many log as logger.info("Listing Walks"); Where is this log if I deploy from console?
on the console in your tomcat folder do
set JPDA_ADDRESS=8000
set JPDA_TRANSPORT=dt_socket
bin/catalina.bat jpda start
This starts tomcat in debug mode
Then in in eclipse you can create a remote debug profile to attach to the tomcat process on port 8000
Is there any way to enable WL.Logger.debug log to be displayed in Worklight Development Server Console view in eclipse?
I am using Worklight 6.1.
I believe not.
See my explanation from this question: IBM Worklight 6.0 - How to enable/view WL.Logger.debug in adapters?
Copy/paste:
WebSphere Liberty profile does not support debug level logging in the Worklight Development Server Console view.
You can use WL.Logger.debug and edit server.xml to view the log in the trace.log file
Open the Servers view in Eclipse
Expend the Worklight Development Server entry
Double-click on Server Configuration (server.xml)
Switch to Source tab
Uncomment this line: <logging traceSpecification="com.worklight.*=debug=enabled"/>
After invoking your adapter procedure you will find the log at <eclipseWorkspace>\WorklightServerConfig\servers\worklight\logs\trace.log
Be sure to re-deploy the adapter before attempting to view the logs.
Alternatively,
You can use WL.Logger.warn or WL.Logger.error; these logs will display in the Worklight Development Server Console view.
I have a tomcat webapp project checked out in eclipse (call it 'xyz'). I use eclipse tomcat plugin with Devloader. Everything runs fine. etc, etc, happy.
Now I want to run the same project on OC4J app server and debug in eclipse. For that, I have downloaded and installed standalone OC4J server. I created a OC4J server instance in eclipse. Question is how do I deploy the earlier checked out project 'xyz' to run on OC4J server in eclipse.
Additionally, is there any plugin for OC4J similar to tomcat in eclipse, that makes life easier.
Thanks in advance for your replies.
Package your application in an EAR file and deploy it to OC4J
Start OC4J with VM arguments that enable remote debugging (See http://docs.oracle.com/javase/1.4.2/docs/tooldocs/solaris/jdb.html)
Create a Debug Configuration of type Remote Java Application in Eclipse, and use that to connect to the running VM
Fuse ESB uses karaf server with OSGi.
for the code if anybody has steps to get the debugger for the application it will help.
I am currently using Eclipse Indigo.
As OSGi is used we are using Maven to build the same.
Which plugin will help for Karaf with OSGi
Java allows you to remote debug any JVM running.
So if you start the ESB with a debug argument, then it will run in debug mode listening on port 5005.
davsclaus:/opt/fuse-esb-7.0.1.fuse-084$ bin/fuseesb debug
Listening for transport dt_socket at address: 5005
Then you can do remote debugging from Eclipse using that port number. This is standard Java remote debugging, and Eclipse has a wizard for that already. Its the debug wizard which has a remote debug functionality.
You just need to put the following line in the Fuse ESB startup script (e.g. fuseesb.bat or karaf.bat):
set KARAF_DEBUG=true
After that Fuse ESB will start in debug mode using 5005 port.
1) just run $fuse debug (jboss fuse 6.1.0 version) debug port is 5005,
2) in eclipse or jboss dev studio do following
i) run
ii) debug configuration
iii) remote java application -> create new
iv) host: localhost, port : 5005
v) click on debug
3) put breakpoints in java classes
I am using Eclipse 3.7.2 with JBoss Tools 3.3 under Ubuntu 12 and have configured a locally installed copy of JBoss AS 7.1.1 in Eclipse under "Preferences::Server::Runtime" Environments.
However, when trying to run a Java EE application by double-clicking on the project or an .xhtml page I only see "Run As / Run" on Server as an option and I get an HTTP 404 from Apache Tomcat/7.0.26 at localhost:8080. That is, it seems like Eclipse is trying to deploy to a Tomcat server as opposed to the JBoss AS I have configured in "Preferences::Server::Runtime" and I don't get an option like "Run on JBoss" or anything. When I export my application as a war and manually deploy to JBoss AS the app runs fine.
The idea is to add your application to a specific server that you have configured. Additionally; just adding the server runtime isn't enough.
You need to open the Servers view, and from there right click on the background and select New, and then Server. If you choose JBoss Community -> JBoss AS 7.1 here, you can select your previously created Server runtime in the Server runtime environment, or optionally create a new one.
Then comes the mental twist that you need to make. In WTP you don't use the Run As command, but instead right click the server in the Servers view (default name should be JBoss 7.1 Runtime Server, and select Add and Remove. Select one or more applications from your workspace that you would like to run on your server. Click finish when done.
Now right click again on your server, and choose either Start or Debug.