1
votes

I am using Windows 7, Enterprise Architect (EA) 6.5 and 32-bit Java 1.6.0_22

I am trying to generate a sequence diagram modelling externally run java program. For now I have been using a dummy java class run via command line to see if that's possible. I have got java class' source directory imported to EA. Package Build Scripts->Debug is set to "Attach" in order to attach to an external process.

My java class is compiled and run via cmd, after launching it waits for user input which gives me the time to attach EA to it. I run and compile java program with:

javac -g ClassName.java   

//^ -g generates debug info, necessary to make EA "happy"

java -agentpath:"path_to_SSJavaProfiler65" ClassName

//^ agentpath allows EA to attach to the process //Note: program must be run with a 32bit version of java, otherwise EA wont find it.

After running java program waits for my input. In EA I right click on launched program's method -> Generate Sequence Diagram

At that point EA pops out a window asking me to select a process to attach to. I pick the right one and EA attaches to it, printing out in System Output:

06/10/2011 14::43 debug starts for C:\Program Files (x86)\Java\jdk1.6.0_22\bin\java.exe 

//^ process running my java program

After entering input into the java program allows it to contiune and EA generates a beautiful Sequence Diagram for the method -> exactly what I wanted. Problem appears when I try to generate the diagram via debugger, which should allow me to model more than a single method's behaviour.

To do that I launch the java program in the same way as before, when it enquires for input I got to the EA, right click on package of the launched program (that's where the package scripts are set) -> Build and Run -> Debug Run. Again, I select the process to attach to. I get confirmation that it succeded. I enter the input into my java program to allow it to continue, and that's when EA produces error message:

Source file path loaded in module doesnt match, please rebuild

I have tried "Synchronize model with code", "Rebuild" both from cmd level as well as from EA, I also tried rebuilding and reimporting entire source directory. None of it helped. Any ideas what I might be doing wrong?

Any help would be highly appreciated as I already wasted a few days on this.

Thanks!

1

1 Answers

1
votes

I found today this paper in the Communitiny news: SparxSystems Community News. Dont know whether it is compatible down to your version. No chance to upgrade to 9.x?