JMVA: exception when solving a simple model.
Brought to you by:
danieledipompeo,
g_serazzi
When solving a simple computer model from one of the exercises out of "Programming by Design" by Menascé and Almeida, the program returns the following exception:
<QUOTE>
Exception in thread "AWT-EventQueue-0" java.lang.AbstractMethodError: org.apache.xerces.dom.DocumentImpl.getXmlStandalone()Z
</QUOTE>
I copied the full exception into a file.
This also happens if I want to save the input to a file (same exception).
Guus Bonnema, Leiden, The Netherlands.
Exception trying to solve a model with JWAT or save the input.
Logged In: YES
user_id=284795
Originator: YES
Changed the title from JWAT to JMVA!
Sorry for the inconvenience.
Could you please re-assign this bug?
Guus Bonnema, Leiden, The Netherlands.
Logged In: YES
user_id=703766
Originator: NO
Okay, I'll take up this! This exception is arised for every model or only for this one? If this is the case, can you please describe it? (number of classes, number of stations, demands etc.). Which version of the JDK are you currently using? On which architecture? I have a strong feeling that it is again something related to the JDK...
Logged In: YES
user_id=284795
Originator: YES
Hi Marco,
The failure occurs on every solve or save.
As I built the system using netbeans, would it be possible, that I am missing something in my configuration?
BTW, the compilation went ok (apart from the encoding warning due to Italian), so the compilation worked.
Still, my configuration may not be complete. Is there something I can check to be sure my configuration is OK?
Logged In: YES
user_id=703766
Originator: NO
Hello, I installed JDK 1.6 and tested this.
It was an issue related to JDK 1.6 as it included XERCES XML parser classes that conflicted with the one used by JMT. I solved this right now (a simple update of xerces library was sufficient). If you perform an SVN update everything should work fine.
Best Regards
Bertoli Marco
Logged In: YES
user_id=284795
Originator: YES
Hi Bertoli,
Thanks for the update. After updating (svn update), there indeed was an update of classes, including a delete of a xerces object/class.
Also, I did a 'clean and build', which removes all existing class/jar files, and rebuilds all.
However, I am sorry to report that it does not work as expected.
The same error occurs. Both at solving and saving the model.
So I hope you don't mind that I reopened the bug?
Also, from the JMVA module I entered the data and switched through one of the buttons to JSIM. This works OK and the simulation runs OK (I did not finish the simulation though), but as soon as I try to save the file I get the same error.
Do I have to remove any the of the libraries included?
Currently I have included:
JavaHelp, JGraph and the Freehep-graphics libraries.
Any ideas?
Logged In: YES
user_id=703766
Originator: NO
Hello,
I tried again but everyting seems correct on my laptop.
I have uploaded a JMT binary, try to get it from url http://jmt.sourceforge.net/testing/jmt-bin.tar.gz
If everything works well it's probably a problem of caching on your Java IDE that is still using the old version of xerces.
(try to manually clean cache and output folders).
Required libraries are all the jar files in the lib folder. Try to inspect your project settings and add every JAR that is there as project library, and see
if some unversioned file is left there by accident (for example multiple revisions of xerces)...
You can also try to do a clean cleckout (in a new folder) and compile that one.
If none of this hints is useful and the binary doesn't work, I will try to investigate it (but I need to reproduce it).
Let me know your findings!
p.s. you did well reopening the bug, I did wrong closing it before your answer!
Logged In: YES
user_id=284795
Originator: YES
Hi Bertoli,
After fooling around trying to get it compiled, I caved in and downloaded the pre-compiled version for both Windows and Linux.
Now it works fabulously!
Thanks very much for the change.
In the development list (I think there is one?) I will talk about the compiling.
Guus Bonnema, Leiden, The Netherlands.
P.S. I assume that means it is solved, so it can be closed?
Logged In: YES
user_id=703766
Originator: NO
You are welcome!
I'm glad that now you can use JMT!!
Best Regards
Marco Bertoli