| Author | Topic |
Posts: 273
Registered: June 2006
|
|
Serious problems when reading models with JSBML
|
30 Nov '10 01:54
|
 |
|
Dear all,
It seems that after the latest changes in the repository reading SBML
files does not work properly anymore.
First, what is not so important, the parser now writes these
(unnecessary) messages when reading Level 2 Version 4 models:
WARN (SBMLCoreParser.java:405) - No unitDefinition matches the
areaUnitsID of Model.
WARN (SBMLCoreParser.java:415) - No unitDefinition matches the
lengthUnitsID of Model.
WARN (SBMLCoreParser.java:419) - No unitDefinition matches the
substanceUnitsID of Model.
WARN (SBMLCoreParser.java:422) - No unitDefinition matches the
timeUnitsID of Model.
WARN (SBMLCoreParser.java:425) - No unitDefinition matches the
volumeUnitsID of Model.
In L2V4 the model doesn't have all these attributes, hence, it is not
necessary to write this.
It seems that the parser does not set the Level/Version attribute
correctly. When trying to call the method
setHasOnlySubstanceUnits
in Species, we receive an
Exception in thread "AWT-EventQueue-0" Property hasOnlySubstanceUnits is
not defined for Level -1 and Version -1
at org.sbml.jsbml.Species.setHasOnlySubstanceUnits(Species.java:747)
Furthermore, there is also the problem of log4j that it is impossible to
find the log file. Is there a way to switch logging completely off?
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: ./log/jsbml.log (No such file or directory)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:207)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:272)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:151)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:247)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:123)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:87)
at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:645)
at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:603)
at
org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:500)
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:406)
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:432)
at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)
at org.apache.log4j.Logger.getLogger(Logger.java:94)
at
org.sbml.jsbml.xml.stax.SBMLReader.readSBMLFromStream(SBMLReader.java:397)
at org.sbml.jsbml.xml.stax.SBMLReader.readSBML(SBMLReader.java:340)
Cheers
Andreas
--
Dipl.-Bioinform. Andreas Dräger
Eberhard Karls University Tübingen
Center for Bioinformatics (ZBIT)
Sand 1
72076 Tübingen
Germany
Phone: +49-7071-29-70436
Fax: +49-7071-29-5091
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
Re: Serious problems when reading models with JSBML
|
30 Nov '10 02:04

|
 |
|
On 11/30/2010 09:54 AM, Andreas Draeger wrote:
> Dear all,
>
> It seems that after the latest changes in the repository reading SBML
> files does not work properly anymore.
>
> First, what is not so important, the parser now writes these
> (unnecessary) messages when reading Level 2 Version 4 models:
>
> WARN (SBMLCoreParser.java:405) - No unitDefinition matches the
> areaUnitsID of Model.
> WARN (SBMLCoreParser.java:415) - No unitDefinition matches the
> lengthUnitsID of Model.
> WARN (SBMLCoreParser.java:419) - No unitDefinition matches the
> substanceUnitsID of Model.
> WARN (SBMLCoreParser.java:422) - No unitDefinition matches the
> timeUnitsID of Model.
> WARN (SBMLCoreParser.java:425) - No unitDefinition matches the
> volumeUnitsID of Model.
This messages where always there but were not printed. I put them on, so
that we can perfect the parser.
Of course for L2, we should not have this warnings and we should not
have them either for L3 if the attribute are not defined in the model.
> In L2V4 the model doesn't have all these attributes, hence, it is not
> necessary to write this.
>
> It seems that the parser does not set the Level/Version attribute
> correctly. When trying to call the method
>
> setHasOnlySubstanceUnits
>
> in Species, we receive an
>
> Exception in thread "AWT-EventQueue-0" Property hasOnlySubstanceUnits is
> not defined for Level -1 and Version -1
> at org.sbml.jsbml.Species.setHasOnlySubstanceUnits(Species.java:747)
>
>
> Furthermore, there is also the problem of log4j that it is impossible to
> find the log file. Is there a way to switch logging completely off?
>
> log4j:ERROR setFile(null,true) call failed.
> java.io.FileNotFoundException: ./log/jsbml.log (No such file or directory)
I just answered about that, just do an update and it will works.
To configure log4j, you need to edit the file src/log4j.properties
At the moment, log4j is setup to print at the DEBUG level on the console
and on the jsbml.log file.
You have also lines like that :
log4j.logger.org.sbml.jsbml.util=WARN
log4j.logger.org.sbml.jsbml.xml.parsers.StringParser=WARN
Which prevent to display the DEBUG output of the classes in the
org.sbml.jsbml.util package and of the class
org.sbml.jsbml.xml.parsers.StringParser.
You need to comment these line, they will then inherit the glogal level,
so DEBUG or you can set something else than WARN.
Cheers,
Nico
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
|
Posts: 273
Registered: June 2006
|
|
Re: Serious problems when reading models with JSBML
|
30 Nov '10 02:20

|
 |
|
Hi all,
> On 11/30/2010 09:54 AM, Andreas Draeger wrote:
>> Dear all,
>>
>> It seems that after the latest changes in the repository reading SBML
>> files does not work properly anymore.
>>
>> First, what is not so important, the parser now writes these
>> (unnecessary) messages when reading Level 2 Version 4 models:
>>
>> WARN (SBMLCoreParser.java:405) - No unitDefinition matches the
>> areaUnitsID of Model.
>> WARN (SBMLCoreParser.java:415) - No unitDefinition matches the
>> lengthUnitsID of Model.
>> WARN (SBMLCoreParser.java:419) - No unitDefinition matches the
>> substanceUnitsID of Model.
>> WARN (SBMLCoreParser.java:422) - No unitDefinition matches the
>> timeUnitsID of Model.
>> WARN (SBMLCoreParser.java:425) - No unitDefinition matches the
>> volumeUnitsID of Model.
> This messages where always there but were not printed. I put them on, so
> that we can perfect the parser.
> Of course for L2, we should not have this warnings and we should not
> have them either for L3 if the attribute are not defined in the model.
>
>> In L2V4 the model doesn't have all these attributes, hence, it is not
>> necessary to write this.
It would be nice if we can avoid messages if not required.
>>
>> It seems that the parser does not set the Level/Version attribute
>> correctly. When trying to call the method
>>
>> setHasOnlySubstanceUnits
>>
>> in Species, we receive an
>>
>> Exception in thread "AWT-EventQueue-0" Property hasOnlySubstanceUnits is
>> not defined for Level -1 and Version -1
>> at org.sbml.jsbml.Species.setHasOnlySubstanceUnits(Species.java:747)
>>
>>
>> Furthermore, there is also the problem of log4j that it is impossible to
>> find the log file. Is there a way to switch logging completely off?
>>
>> log4j:ERROR setFile(null,true) call failed.
>> java.io.FileNotFoundException: ./log/jsbml.log (No such file or directory)
> I just answered about that, just do an update and it will works.
Sorry, but the same ERROR still occurs. My application crashes when
trying to set the hasOnlySubstanceUnits attribute because the L/V
combination is set to -1 and -1 although I parsed SBML test model case 1.
>
> To configure log4j, you need to edit the file src/log4j.properties
> At the moment, log4j is setup to print at the DEBUG level on the console
> and on the jsbml.log file.
>
> You have also lines like that :
>
> log4j.logger.org.sbml.jsbml.util=WARN
> log4j.logger.org.sbml.jsbml.xml.parsers.StringParser=WARN
>
> Which prevent to display the DEBUG output of the classes in the
> org.sbml.jsbml.util package and of the class
> org.sbml.jsbml.xml.parsers.StringParser.
> You need to comment these line, they will then inherit the glogal level,
> so DEBUG or you can set something else than WARN.
Would it be possible to switch messages off by default? I mean, people
will not like to do much configuration. The default value should be: no
messages, no logging.
Cheers
Andreas
--
Dipl.-Bioinform. Andreas Dräger
Eberhard Karls University Tübingen
Center for Bioinformatics (ZBIT)
Sand 1
72076 Tübingen
Germany
Phone: +49-7071-29-70436
Fax: +49-7071-29-5091
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
Re: Serious problems when reading models with JSBML
|
30 Nov '10 02:28

|
 |
|
On 11/30/2010 10:20 AM, Andreas Draeger wrote:
> Hi all,
>
>> On 11/30/2010 09:54 AM, Andreas Draeger wrote:
>>> Dear all,
>>>
>>> It seems that after the latest changes in the repository reading SBML
>>> files does not work properly anymore.
>>>
>>> First, what is not so important, the parser now writes these
>>> (unnecessary) messages when reading Level 2 Version 4 models:
>>>
>>> WARN (SBMLCoreParser.java:405) - No unitDefinition matches the
>>> areaUnitsID of Model.
>>> WARN (SBMLCoreParser.java:415) - No unitDefinition matches the
>>> lengthUnitsID of Model.
>>> WARN (SBMLCoreParser.java:419) - No unitDefinition matches the
>>> substanceUnitsID of Model.
>>> WARN (SBMLCoreParser.java:422) - No unitDefinition matches the
>>> timeUnitsID of Model.
>>> WARN (SBMLCoreParser.java:425) - No unitDefinition matches the
>>> volumeUnitsID of Model.
>> This messages where always there but were not printed. I put them on, so
>> that we can perfect the parser.
>> Of course for L2, we should not have this warnings and we should not
>> have them either for L3 if the attribute are not defined in the model.
>>
>>> In L2V4 the model doesn't have all these attributes, hence, it is not
>>> necessary to write this.
>
> It would be nice if we can avoid messages if not required.
Yes, of course, it is on the todo list.
The messages are there because the code of the parser is wrong at the
moment.
>>> It seems that the parser does not set the Level/Version attribute
>>> correctly. When trying to call the method
>>>
>>> setHasOnlySubstanceUnits
>>>
>>> in Species, we receive an
>>>
>>> Exception in thread "AWT-EventQueue-0" Property hasOnlySubstanceUnits is
>>> not defined for Level -1 and Version -1
>>> at org.sbml.jsbml.Species.setHasOnlySubstanceUnits(Species.java:747)
>>>
>>>
>>> Furthermore, there is also the problem of log4j that it is impossible to
>>> find the log file. Is there a way to switch logging completely off?
>>>
>>> log4j:ERROR setFile(null,true) call failed.
>>> java.io.FileNotFoundException: ./log/jsbml.log (No such file or directory)
>> I just answered about that, just do an update and it will works.
>
> Sorry, but the same ERROR still occurs. My application crashes when
> trying to set the hasOnlySubstanceUnits attribute because the L/V
> combination is set to -1 and -1 although I parsed SBML test model case 1.
>
I was speaking about the log file problem here. I haven't had time to
look at the issue with setHasOnlySubstanceUnits.
>> To configure log4j, you need to edit the file src/log4j.properties
>> At the moment, log4j is setup to print at the DEBUG level on the console
>> and on the jsbml.log file.
>>
>> You have also lines like that :
>>
>> log4j.logger.org.sbml.jsbml.util=WARN
>> log4j.logger.org.sbml.jsbml.xml.parsers.StringParser=WARN
>>
>> Which prevent to display the DEBUG output of the classes in the
>> org.sbml.jsbml.util package and of the class
>> org.sbml.jsbml.xml.parsers.StringParser.
>> You need to comment these line, they will then inherit the glogal level,
>> so DEBUG or you can set something else than WARN.
> Would it be possible to switch messages off by default? I mean, people
> will not like to do much configuration. The default value should be: no
> messages, no logging.
>
Of course, but we are on the developing/debugging stage at the moment.
But we can modify the log4j.properties file if needed.
We would have to have a documentation to explain a bit how to do.
Nico
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
|
Posts: 273
Registered: June 2006
|
|
|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
|
Posts: 273
Registered: June 2006
|
|
|
|