Hi, allI have the problem when I try to put the value into the object. I use the method setValue of ObjectReference ( JDI ) looklike this private ObjectReference TestObj;private Field TestField;private Value TestValue; ... (get value of thes field)TestObj.setValue(TestField, TestValue);When I ...
258 byte By
umbfera at 2007-9-29 4:44:32
Hi all, is it possible with JPDA to know which is the value of the arguments of the methods in the current stack frame without using -g option? If not, is there any workaround (e.g., using jvmpi)?Thanks for your attention.Umberto Ferraro
Hi , I have problem that I want to get the caller object when the program call any method. I use com.sun.jdi.MethodEntryEvent to catch the calling event but I don't know how to get the caller. thanks for any answers.
Hi,I am using JVMDI to debug a java application. I launch the application and debugger with the following command line.java -Xdebug -Xnoagent -XrunTest:ADA <applicationName>When I try and suspend the application after a method entry event, everything (including my JVMDI debugger) is ...
I tried to use ClassType.newInstance() with user defined types but doesn't works. It seems that instantiates only Sun Classes (sun.*, java.*). Can anyone give me an hint for to overcome this logic?Thanx.
The short version:When I try to start a jvm with the -Xrunjdwp from C++ using JNI_CreateJavaVM and the following settings, it simply crashes. I can run my program just fine when this option is not present.JavaVMOption aoOptions[5];aoOptions[0].optionString = ...
979 byte By
gniluxa at 2007-9-29 7:07:03
HiI have coded a JVMPI module which wants to make use of JVMDI HotSwap feature and only that one. So I am using an "in process JVMDI".I am wondering if there is a mean to run the VM with my module and not necessary with -Xdebug to use redefineClass method of JVMDI API, since I am not interested ...
Hi,How does the socket attaching connectors work in Windows platform?If I have an application that I wish to debug, and I wish to usesockets between my debugging front end and debuggee back-end, how should I launch the debuggee process. Now the problem is in that I use also JVMPI in my debuggee ...
Hi everyone,i want to know the string driver and url to connect jdbc to MS SQL Server 7.example:Class.forName(driver?);Connection con = DriverManager.getConnection(url?);
I've been trying to use the instance filters added to JDI in Java 1.4 without success. JPDA appears to ignore my attempts to add instance filters to MethodEntryRequests and MethodExitRequests. It produces MethodEntryEvents or MethodExitEvents for every method entry or exit that passes the ...
i am a newbie to java and jboss. if i want to develope a cmp ejb , and deploy to jboss server, where do i map a ejb to relation database ?
664 byte By
KR.Fa at 2007-9-29 9:04:40
Hello:I am -new- to Java, an I am trying to write servlet/jsp (using this package, package org.apache.jsp;) but when using the class, import org.apache.jasper.runtime.*;, using Apache's Tomcat. I am getting an error message ... FileName_jsp.java:6: package org.apache.jasper.runtime does not ...
Hi;On a xpPro system, with J2SE 1.4.2, Java cannot find my main class, IF and only IF I try to run it with the options required to make it a debugee. From the exact same directory all works ok with the exact same command line less the Xdebug stuff.Here is the command I tried: (I tried with and ...
1222 byte By
wmshuba at 2007-9-29 9:13:10
This might be a FAQ; it it is, please point me to the answer. Meanwhile:Is there a java equivalent to the Unix "abort" call? I guess what I really want to do is have my application serialize the whole java memory space into a file, then later use jdb or something similar to examine the file, ...
Hi, i am trying to convert Trace.java to use AttachingConnector.The problem i am having is in the method redirectOutput, vm.precess() only returns a Process if LaunchingConnector was used.how can i convert redirectOutput method to work with ...
Hallo,I'm using JDI and i would like to know if all my java threads are suspended at a safepoint when a breakpoint is reached. (Suspend Policy: SUSPEND_ALL)M.
Hello All, The server has Tomcat 3 and JDBC mysql-connector-java-2.0.14 I wrote a test jdbc code but that is not working.However I can connect to the database using the mysql command.But with jdbc, I get the following error:java.sql.SQLException: Server configuration denies access to data ...
to. everybody I'm interesting to methodology for process migration. I think java debugger is the useful mechanism for migration. I think mechanism of migration can be possible by getting the running state of object and transfer it to destination and resume its state for running on destination ...
231 byte By
YMLYNNa at 2007-9-29 12:10:49
I could not found jdb nor javadt directories after unzipping the demo\jpda\examples.jar file. I did found the Trace example though.Can someone tell me how to get hod of the JDB and javadt examples source?Thanks
315 byte By
YMLYNNa at 2007-9-29 12:11:24
I encountered the following error while running the Trace example:D:\JPDA\Trace\classes>java com.sun.tools.example.trace.TraceException in thread "main" java.lang.NoClassDefFoundError: com/sun/jdi/connect/VMStartExceptionCan someone help me how to resolve the JDI ...
832 byte By
along2a at 2007-9-29 12:14:11
Dear everyone:I recently build a debugging tool!I get some trouble,I write a program like follows:class test { public static void main(String[] args) {obj1 ob=new obj1(); }} class obj1 { int a; String b; public obj1() {a=1;b="this is obj1"; }}After I set breakpoint at the end of class test.I ...
Dear all,While executing method using JDI:private void methodEntryEvent(MethodEntryEvent event){ThreadReference tr = event.thread();try{tr.suspend();tr.frame(0);}catch(Exception e){e.printStackTrace();}tr.resume();}I get the frame count to be 0 and keep getting the folloing error ...
HiI am wondering if there is a way to determine the classloader instance that is loading bytecode to load a class when handling the JVMPI_EVENT_CLASS_LOAD_HOOK event.The structure passed during this event contains the class bytecode, from which it is possible to fetch the classname or other ...
I have been trying to do get an object from a VM using JDI. What I am trying to do is this:Get all classes using vm.allClasses(). This retuns a list of ReferenceTypes. Now, using ReferenceType.classObject() I get a "ClassObjectReference". But where do we go from here. How do I get the actual ...
658 byte By
sameida at 2007-9-29 13:35:58
as part of my project, i need to create an user interface then debug a java class from it.the user interface can be both java or C++, and hope to execute jdb.exe directly, then send command to jdb (such as stop at and run).i tried some samples, one is "TTY" but it doesn't work (excption says ...
319 byte By
sameida at 2007-9-29 13:36:01
i am learning jdb (very new), when i compile and execute example of TTY, error says "handle is not available".i use windows. i think i miss something because TTy code tries to load a file in user directory, but i don't have the file - if this is reason, what is content of the file?thanks for ...
327 byte By
sameida at 2007-9-29 13:36:16
i am learning jdb (very new), when i compile and execute example of TTY, error says "handle is not available".i use windows. i think i miss something because TTy code tries to load a file in user directory, but i don't have the file - if this is reason, what is content of the file?thanks for ...
Hi.I need to store images (in jpeg format) into a DBMS (probably MySQL).I remember, from what I studied, files could be saved in DBs in binary format, in fields called BLOBs.Am I right?I used JDBC in the past to do normal (text, numbers, dates,...) operations on DBs, but I'm pretty newbie in ...
hi,i need to watch total memory occupied by objects in my application (all objects of given class, or - it would be great - also all memory occupied by objects of given class and classes inherited from that class), total memory means that it is memory which will be relased by gc on that object ...
1367 byte By
vika12a at 2007-9-29 14:25:14
Hi, I am trying to obtain Stack Frames from the main thread by setting StepEventRequest in the following way:List threads = vm.allThreads();ThreadReference tr=null;for (Iterator iterThreads=threads.iterator();iterThreads.hasNext();){ tr = ((ThreadReference)iterThreads.next()); ...
1675 byte By
RGibsona at 2007-9-29 14:27:06
Hi,I have added a button to our Swing application that lets me get a complete thread dump of our application - I do this by starting the app via JDI and adding a breakpoint on a specific type of exception, which is then deliberately thrown when I press the button. The breakpoint has a suspend ...
Hi, I'm learning J2ee and I'd like to use and debugJava adventure. I tried to find some information but found nothing.What I tried to debug , is to start the j2ee server by adding the following options into the bin/asadmin.bat file:-Xdebug ...
580 byte By
duanyha at 2007-9-29 15:01:55
Hi,everyone: As a part of my research project, I need catch the type of variables dynamically.So I decided to use the JDI. First I want to compile and run the jdb example. But I got a problem. When I use Eclipse, it run fine. But when I use the command line mode, I got a error:Exception in ...
Hi All,I have a jvm that is already running a debugee application. I now want to be able to attach a socket connector to it to listen for events in that program. However, I have a reference to the jvm but I do not know how to find what port the debugee application is running on. Is there a way ...
Why is it that JDB runs the print, dump, lock, and other commands in a separate thread?I encountered a documented bug using these commands in a "read" command file so I made all these commands run synchronously by changing the code in command.java.Everything seems to work fine and I have ...
1599 byte By
soso999a at 2007-9-29 15:05:58
dear all, i am new to jdb, thanks for help.i am using windows OS.when i use shared-memory in jdb, every thing is OK, but i can not use socket, follwing is what i did:run first bat file with command successfully:java -Xdebug -Xnoagent -Djava.compiler=NONE ...
442 byte By
soso999a at 2007-9-29 15:06:05
dear all, i am new to jdb, i need some concept about java debug:1. jdb is not a 'must' for debug, all of key debug processes are done by java, not jdb. jdb is just an interface for communication between java-jdb-user.2. if we know (but i don't know now), we can develop our interface similar ...
1324 byte By
soso999a at 2007-9-29 15:06:28
i have a research task, which has made me dead, if i can't get light from the forum, i really can't continue.the task is: use an user interface to debug java program.what i did is:step 1:create an user interface, then run java from the interface with following command:java -Xdebug -Xnoagent ...
605 byte By
soso999a at 2007-9-29 15:23:16
i read sun's doc JDWP then to its detail on page http://java.sun.com/j2se/1.4.2/docs/guide/jpda/jdwp/jdwp-protocol.htmlthere 2 tech words on the page which made me quite confused, i can not find definition anywhere about them.Q1. Out Datadoes it mean data from debug to java?is "out data" in ...
767 byte By
foxman1a at 2007-9-29 15:26:22
I am new to this stuff! From a previous question, it was mentioned that the vm.allClasses() returns ReferenceTypes and NOT objects, what does this mean? Can I use the vm.allClasses to list only the types for each class loaded in the VM, or will it allow me to get a list of all object types? I ...
668 byte By
bonniota at 2007-9-29 15:29:27
Hi,I'm investigating using SourceDebugExtension for compiling a non-java language, Nice: http://nice.sf.net. So far the results are promising, in that jdb reports files and line numbers as encoded in the SMAP my compiler generates. So far, so good.However, if a stack trace is generated, I ...
865 byte By
soso999a at 2007-9-29 15:34:06
following line are copied from http://java.sun.com/j2se/1.4.2/docs/guide/jpda/jdwp-spec.html//==========================================JDWP Start UpAfter the transport connection is established and before any packets are sent, a handshake occurs between the two sides of the connection:The ...
282 byte By
soso999a at 2007-9-29 15:34:09
good all,i am using JDWP now, but i have no idea how to implement the protocol by sun's documentations currently available.i also can not find any in google.could someone give me a hand so i can find more docs (links, docs, books etc).many thanks
314 byte By
smooglia at 2007-9-29 15:35:02
Hi,I'd like to do some debug stress testing. Something like: set a breakpoint and hit it 100 times.Is there a way to give JDB a script that contains the debug commands?something like:1> set a breakpoint at line 202> run.. cont.. run.. cont.. etc ...
Hi,I've a Windows JVMDI dll running nicely, tracing exceptions and method calls. Now I'd like to optimise it.Every time I catch an event I need to know the class name which caused it. So I end up callingjvmdi_interface->GetClassSignature ( clazz, &pcClassSignatureUTF8 );for every ...
1097 byte By
soso999a at 2007-9-29 15:58:20
i create a process in an app to load jdb - it is a bug only in the case.(the app is in c++, i guess it is the same if in java).stand handles are re-directed to the app, that is, all commands are sent from the app.first command is similar to "jdb MyClass".after set few break-points, send "run" - ...
578 byte By
soso999a at 2007-9-29 15:58:28
Q1. when i use jdb, i see: main[1], main[2], ... i guess main[2] is the same as main[1], no any different, only a copy of main[1] - or run in another thread, is this correct? if not, please explain few lines.Q2: can i change "step in MyApp:30" to "step at MyApp:30" or vice versa after "run"?Q3: ...
114 byte By
soso999a at 2007-9-29 16:05:17
what does "bci" in jdb output stand for?it is codeIndex from tty code, what does it mean?thx.
114 byte By
soso999a at 2007-9-29 16:32:04
i want to know if a class is compiled by -g option before doing debug?thx for both c++ or java idea.
443 byte By
soso999a at 2007-9-29 16:32:07
hi all,i am new to debug, i need concept of this staff.i want to know if it is possible to debug an applet or a normal (not an application) class?if yes please tell me how to do it.i guess we can't debug a normal class because there is no start point (if multiple constructors) in a normal ...