Steve Calkins

Greenhorn
+ Follow
since Mar 28, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Steve Calkins

This effect happens when Tomcat and Oracle are set to accept queries from the same port. Unfortunately, both Tomcat and Oracle listen by default to port 8080. Change the Tomcat port number in server.xml (in the $Catalina_Home/conf folder) to another value and the effect disappears.
Maybe I wasn't thorough enough in my explanation. The agent.jar file was created from a separate project in Eclipse. This way I can use the Instrumentation interface for other purposes. In the project that uses agent.jar in Eclipse I extended the classpath by adding the jar file to the classpath entries. Thus I can debug the thing. But it doesn't work. Has anyone else tried this from Eclipse and had a similar problem? maybe it is an Eclipse thing...
12 years ago
I tried this suggestion, creating the JavaAgent.class and putting it in agent.jar
The pertinent parts of the manifest are:

Manifest-Version: 1.0
...
Specification-Version: 1.0.0
...
Premain-Class: de.cmsol.agent.JavaAgent

I use Eclipse and the VM argument list was set to:
-javaagent:agent.jar
...

Still the VM doesn't start. I get the exception:

java.net.SocketException: socket closed
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at org.eclipse.jdi.internal.connect.SocketTransportService.accept(SocketTransportService.java:95)
at org.eclipse.jdi.internal.connect.SocketTransportImpl.accept(SocketTransportImpl.java:56)
at org.eclipse.jdi.internal.connect.SocketListeningConnectorImpl.accept(SocketListeningConnectorImpl.java:135)
at org.eclipse.jdt.internal.launching.StandardVMDebugger$ConnectRunnable.run(StandardVMDebugger.java:107)
at java.lang.Thread.run(Thread.java:619)

What am I doiing wrong?
12 years ago