Technical Support Forum Index
Technical Support Forum
Access ChemAxon scientists and developers here. For registration and login issues contact website support.

Support Ticket System is replacing forum

This forum was converted into a searchable archive. You cannot add posts here any more. For support please use our new Ticket System.

Create your first ticket
Standardizer exception
To watch this topic for replies  Register (enables digests) or give email address:
This topic is locked: you cannot edit posts or make replies.
Display posts from previous:   
    View previous topic :: View next topic    
Author Message
Bob

Joined: 15 Jun 2004
Posts: 2629

View user's profile

Back to top
Link to postPosted: Thu Jul 17, 2014 8:40 pmPost subject: Standardizer exception Reply with quote

Getting an exception when starting up a Standardizer object in JChem 14.7.14.0:

Jul 17, 2014 3:36:47 PM chemaxon.naming.n2s.CASNumberConverter <clinit>
WARNING: Exception while loding cache
java.io.IOException: Cannot create parent directory
	at chemaxon.util.DotfileUtil.ensureParentExists(DotfileUtil.java:165)
	at chemaxon.util.DotfileUtil.getDotFileWithEnsuredPath(DotfileUtil.java:78)
	at chemaxon.naming.n2s.CASNumberConverter.<clinit>(CASNumberConverter.java:43)
	at chemaxon.formats.recognizer.NameRecognizer.isSurelyName(NameRecognizer.java:173)
	at chemaxon.formats.recognizer.NameRecognizer.evaluateName(NameRecognizer.java:111)
	at chemaxon.formats.recognizer.NameRecognizer.isNameLine(NameRecognizer.java:96)
	at chemaxon.formats.recognizer.NameRecognizer.tryToRecognize(NameRecognizer.java:57)
	at chemaxon.formats.recognizer.RecognitionSubsystem.processLine(RecognitionSubsystem.java:153)
	at chemaxon.formats.recognizer.RecognitionSubsystem.processLine(RecognitionSubsystem.java:114)
	at chemaxon.formats.MolInputStream.processLine(MolInputStream.java:334)
	at chemaxon.formats.MolInputStream.initTextFormat(MolInputStream.java:246)
	at chemaxon.formats.MolInputStream.init(MolInputStream.java:136)
	at chemaxon.formats.MolInputStream.<init>(MolInputStream.java:116)
	at chemaxon.formats.MolImporter.init(MolImporter.java:542)
	at chemaxon.formats.MolImporter.<init>(MolImporter.java:118)
	at chemaxon.standardizer.advancedactions.StripSaltsAction.readSaltDictionary(StripSaltsAction.java:309)
	at chemaxon.standardizer.advancedactions.StripSaltsAction.<clinit>(StripSaltsAction.java:65)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at chemaxon.standardizer.StandardizerActionFactory.getStandardizerAction(StandardizerActionFactory.java:231)
	at chemaxon.standardizer.StandardizerActionFactory.getAvailableStandardizerActions(StandardizerActionFactory.java:184)
	at chemaxon.standardizer.configuration.reader.StandardizerSAXHandler.initializeMap(StandardizerSAXHandler.java:112)
	at chemaxon.standardizer.configuration.reader.StandardizerSAXHandler.<init>(StandardizerSAXHandler.java:101)
	at chemaxon.standardizer.configuration.reader.StandardizerSAXHandler.<init>(StandardizerSAXHandler.java:78)
	at chemaxon.standardizer.configuration.reader.StandardizerXMLReader.<init>(StandardizerXMLReader.java:77)
	at chemaxon.standardizer.Standardizer.<init>(Standardizer.java:204)
	at com.epoch.servlet.GroupLoader.loadAppConfig(GroupLoader.java:125)
Bob

Joined: 15 Jun 2004
Posts: 2629

View user's profile

Back to top
Link to postPosted: Thu Jul 17, 2014 8:46 pmPost subject: Reply with quote

The line of code that is eliciting the error is:

AppConfig.standardizer =
                    new Standardizer(new File(normalizeConfigFile));

The contents of normalizeConfigFile are:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Standardizer configuration file -->

<StandardizerConfiguration Version ="0.1">
    <Actions>
        <Transformation ID="S_or_Se_ylide_double"
            Structure="[#16,#34;++:1]-[#34,#16,#8,#7,#6;-:2]>>[#16,#34;+:1]=[#34,#16,#8,#7,#6:2]"/>
        <Transformation ID="S_or_Se_ylide_double"
            Structure="[#16,#34;+:1]-[#34,#16,#8,#7,#6;-:2]>>[#16,#34;0:1]=[#34,#16,#8,#7,#6:2]"/>
        <Transformation ID="S_or_Se_ylide_triple"
            Structure="[#16,#34;++:1]=[#34,#16,#8,#7,#6;-:2]>>[#16,#34;+:1]#[#34,#16,#8,#7,#6:2]"/>
        <Transformation ID="S_or_Se_ylide_triple"
            Structure="[#16,#34;+:1]=[#34,#16,#8,#7,#6;-:2]>>[#16,#34;0:1]#[#34,#16,#8,#7,#6:2]"/>
        <Transformation ID="N_or_P_or_As_ylide_double"
            Structure="[#7,#15,#33;+:1]-[#34,#16,#8,#7,#6;-:2]>>[#7,#15,#33;0:1]=[#34,#16,#8,#7,#6:2]"/>
        <Transformation ID="N_or_P_or_As_ylide_triple"
            Structure="[#7,#15,#33;+:1]=[#34,#16,#8,#7,#6;-:2]>>[#7,#15,#33;0:1]#[#34,#16,#8,#7,#6:2]"/>
        <Transformation ID="N_or_P_or_As_dianion_ylide_double"
            Structure="[#7,#15,#33;+:1]-[#34,#16,#8,#7,#6;--:2]>>[#7,#15,#33;0:1]=[#34,#16,#8,#7,#6;-:2]"/>
    </Actions>
</StandardizerConfiguration>
Bob

Joined: 15 Jun 2004
Posts: 2629

View user's profile

Back to top
Link to postPosted: Thu Jul 17, 2014 8:51 pmPost subject: Reply with quote

Interestingly, when I change the code to try to catch the IOException, then when I compile, I get this error:

GroupLoader.java:127: exception java.io.IOException is never thrown in body of corresponding try statement
		} catch (IOException e) {
		  ^
GroupLoader.java:139: exception java.io.IOException is never thrown in body of corresponding try statement
		} catch (IOException e) {
		  ^

Seems pretty clear that the line is throwing an IOException, so why won't it let me catch it?.

So then I changed the code to catch a generic exception. It compiles now, but it still doesn't catch the exception when the program starts up.

I think I have done all I can do to solve this problem.

Zsolt
ChemAxon personnel
Joined: 11 Jan 2006
Posts: 1163

View user's profile

Back to top
Link to postPosted: Fri Jul 18, 2014 11:02 amPost subject: Reply with quote

Bob, it's not an exception thrown from Standardizer code, it's a stack trace printed by chemaxon.naming.n2s.CASNumberConverter. Standardizer ignores it on purpose: it's absolutely not relevant there.

Just ignore this printed message. We will find less confusing ways to display such warnings. 

This topic is locked: you cannot edit posts or make replies.
Page 1 of 1


To watch this topic for replies   Register (enables digests) or give email address  
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum