0

I use XMLEncoder to encode JGraph object to XML format. I use 2 machines to test, both of them have same java version as I check by cmd java -version

java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)

However, I get these XML headers from 2 machines as following: Machine 1:

<java version="1.6.0_31" class="java.beans.XMLDecoder"> 

Machine 2:

<java version="1.7.0_05" class="java.beans.XMLDecoder">

Anyone knows why the java version is different? The reason I ask this question because I suspect is the root cause for my following problem. After that, I use XMLDecoder to decode the JGraph object. However, the graphModel gives me different result for

Object[] objs = graphModel.getOutgoingEdges(graphModel, cell);

With machine 1, objs has length = 1, machine 2 objs has length = 0. Anyone has any idea? Is it the problem with java version?

baizen
  • 304
  • 6
  • 14
  • 2
    I suspect that Java 7 is installed on the second machine. You might not see when you check the version from command line but if you are using some IDE and it is configured to use JRE/JDK 7 then you might face this issue. I had a similar issue earlier. – dharam Jul 03 '12 at 04:40
  • lets say, the 2 machines decode with different java versions, the 2 XML outputs are a bit different, I'm not sure how the graphModel.getOutgoingEdges works but they give me different arrays. Any idea? – baizen Jul 03 '12 at 06:44
  • Are you sure the data at both places is identical? – user207421 Jul 03 '12 at 06:45
  • the graph represent a workflow, both machine connect to same server, same database, both load same workflow then I re-save this workflow again. the XML(s) I check from log file after clicking save from each machines have differences (with different java version). Then the problem occurs for machine2 when I use graphModel function – baizen Jul 03 '12 at 06:53

0 Answers0