- This topic has 5 replies, 2 voices, and was last updated 13 years, 5 months ago by
ironmaiden189.
-
AuthorPosts
-
ironmaiden189MemberHi guys I need to attach to the sandbox Tomcat a tool that profiles java calls to generate uml sequence diagrams, but it needs to know which port the server accepts connections.
The tool is ReverseJava (http://www.reversejava.com/reversejavahome.htm), and here I report what’s written on the manual:Using Reverse Java
Before starting Reverse Java you would have to start the target application (Application which is
to be reverse engineered) in debug mode.For Stand alone java application
Any stand alone java application can be started in debug mode by setting JVM
arguments. Just start your application like
java MyStandAloneJavaApp -Xdebug
-Xrunjdwp:transport=dt_socket,address=1111,server=y,suspend=y
The sample command above uses Debug port as 1111, you can use any port available in your
system. Please note this is the port you need to define in Field Debug Port during installation
Remember to start your application in suspended mode as shown in above sample command by
setting the property suspend=y. Reverse Java will resume the suspended application.For Web Application
Any Web application can be started in DEBUG Mode using Admin console of the
Application Server. Please refer to your application server guides, on how to enable Debug mode.
Do not start web application in suspended mode.I am running my web application within MyEclipse\Debug, but I don’t know which port to specify to let ReverseJava point intercept java calls..
P.S.: is there an administration console for the integrated Tomcat? I recall of a web page to configure the standard Tomcat, but I didn’t find anything in MyEclipse.
Thanks
support-swapnaModeratorironmaiden189 ,
The Sandbox Tomcat is a tailored version of Tomcat. The default port would be 8080.The administration console is not available in Sandbox Tomcat. I suggest you work with an external Tomcat for your scenario.
Let us know if you have any other issues.
ironmaiden189MemberThank you, after a bit of struggling I correctly configured Tomcat 7.0 to work with my profiler.
BUT… For it to work I have to make it load through CMD to make it work in debug mode.
I tried configuring it in MyEclipse, but even if I can start it I cannot see the console: the server is active because I can use my web application but the console output is not in the console view of the perspective.Below the list of steps I took to achieve this partial result:
- downloaded zipped version of Tomcat 7.0 from Apache website
- extracted in program files the folder
- opened MyEclipse For Spring
- “Configure servers” preferences
- Servers\Tomcat 7.0 panel
- Tomcat server: enable, Tomcat home and base directory: C:\Program Files\apache-tomcat-7.0.21, Tomcat temp directory: C:\Program Files\apache-tomcat-7.0.21\temp
- Servers\Tomcat 7.0\Launch panel
- Tomcat launch mode: debug
- Clicked on button “Create launch configuration”
- On the new window “Debug configuration”, panel “Arguments”
- Program arguments: jpda start, VM arguments: -Dcatalina.home=C:”/Programmi/apache-tomcat-7.0.21″ -Dcatalina.base=C:”/Programmi/apache-tomcat-7.0.21″ -Djava.endorsed.dirs=C:”/Programmi/apache-tomcat-7.0.21/common/endorsed” -Djava.io.tmpdir=C:”/Programmi/apache-tomcat-7.0.21/temp” -Djava.library.path=C:”/Programmi/MyEclipse for Spring/Common/binary/com.sun.java.jdk.win32.x86_1.6.0.013/bin;C:/Programmi/apache-tomcat-7.0.21/bin” -Dsun.io.useCanonCaches=false -Xms1024m -Xmx1024m
- panel “Environment” created 2 variables: “JPDA_ADDRESS” = 8000, “JPDA_TRANSPORT” = dt_socket
Can you tell if I did anything wrong?
ironmaiden189MemberI forgot to mention this:
I can run my application from the new server within MyEclipse but can’t edit the memory settings for the JVM. If you notice my previous post I increase the min and max memory sizes because the profiler needs lots of memory. If I start the webapp through “Run as” button how can I edit those settings? I don’t see an “Arguments” tab in this view..
support-swapnaModeratorironmaiden189 ,
1) Can you share your Build ID from Help > About MyEclipse for Spring > Build ID ?
2) If you are on a release earlier than 9.1, then can you please update to 9.1 version and check if the issue with console output exists ? If you still see the issue, can you check the .log file which is located at <workspace dir>/.metadata/.log for any errors of interest and paste them here.
3) When you do a run as, a launch configuration is created that can be accessed from the Run menu. you can edit that configuration for the memory settings.
ironmaiden189Member1)Build ID: 9.1.0 Build 10 (110630_1845)
2)In the log there are various entries like this one:
!ENTRY com.genuitec.eclipse.core.common 1 0 2011-09-15 11:26:18.215
!MESSAGE CustomConsoleProcess should be launch only by CustomConsoleLaunch3) I’m sorry but I think we are thinking of different windows… The “run as” launch configuration I have has only two tabs: “Main” and “Common”. The one I need is “Arguments”, but it’s located on MyEclipse server, not MyEclipse server application..
I’m pasting a couple of screenshots here so you can see:
here is the configuration obtained through right click on the project \ run as, which has the console but I cannot edit its memory settings
here is the configuration obtained through the steps in my second post, which hasn’t the console but has the right memory settings
-
AuthorPosts