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
Java Error on duplicate import
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
Karl

Joined: 16 Dec 2008
Posts: 2

View user's profile

Back to top
Link to postPosted: Tue Dec 16, 2008 11:39 pmPost subject: Java Error on duplicate import Reply with quote

Hi, can anyone help me understand the duplicate filtering on import in Instant JChem 2.4?

I was given an sdf file that included a few duplicates and I wanted the import process to weed these out. I did a file import into a new JChemBase entity with the "Duplicate filtering" flag checked in the advanced options.

It begins the import and then errors with the following java error:
Quote:
java.lang.NullPointerException
at com.im.ijc.io.api.ErrorWriter.getErrorFile(ErrorWriter.java:138)
at com.im.ijc.io.api.ErrorWriter.getErrorWriter(ErrorWriter.java:85)
at com.im.ijc.io.api.ErrorWriter.write(ErrorWriter.java:63)
at com.im.ijc.io.formats.StructureFileParser$Parser.writeCurrentRecordAsError(StructureFileParser.java:283)
at com.im.ijc.io.quickimport.QuickImportWizardIterator.processError(QuickImportWizardIterator.java:897)
at com.im.ijc.io.quickimport.QuickImportWizardIterator.loadData(QuickImportWizardIterator.java:776)
at com.im.ijc.io.quickimport.QuickImportWizardIterator.access$100(QuickImportWizardIterator.java:91)
at com.im.ijc.io.quickimport.QuickImportWizardIterator$2.run(QuickImportWizardIterator.java:547)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
The import window behind the java error reports:
Quote:
Structure is mapped to current field Structure
Starting to import data...
Warning: Structure 63 not imported. It is a duplicate of CD_ID 53 in the database.

Warning: Failed to import row 63: null
At this point, I'm given the option to Finish or Cancel, but both lead to the same result of a table created with the first 62 chemicals in the sdf only.

I *did* once find a method for import that led to a full table creation with the duplicates saved in a new file (in the same directory as the input file) that was called ORIG-FILENAME_duplicates.sdf...but I can not find that method any more. Any ideas?

Thanks!

--Karl
Tim
ChemAxon personnel
Joined: 05 Oct 2004
Posts: 1703

View user's profile

Back to top
Link to postPosted: Wed Dec 17, 2008 9:25 amPost subject: Reply with quote

This is a known problem on Windows when the file that is being imported is accessed through a UNC (e.g. \\drive\path\to\file network drive) rather than a disk mapped to a letter (e.g. C:). In this case writing the file containing the duplicates fails.
This problem is fixed in the upcoming 2.4.1 update, but in the meantime the workaroud is to copy the file that is to be imported to a drive that is mapped to a letter (e.g copy it to your C: drive). That way the duplicates file is written OK.

Let me know if this doesn't work.

Tim
Karl

Joined: 16 Dec 2008
Posts: 2

View user's profile

Back to top
Link to postPosted: Wed Dec 17, 2008 4:02 pmPost subject: Reply with quote

Yes, that turns out to have been the problem. Thanks for the help. The file is on a mapped drive but the file selection browser was referencing it as the double slash directory instead of the mapped style. Once I forced it to navigate to the file as a mapped drive (H:), everything went as expected originally.
Tim
ChemAxon personnel
Joined: 05 Oct 2004
Posts: 1703

View user's profile

Back to top
Link to postPosted: Wed Dec 17, 2008 4:06 pmPost subject: Reply with quote

OK, thanks for the feedback.
As I mentioned, this workaround should not be necessary with 2.4.1.

Tim
Tim
ChemAxon personnel
Joined: 05 Oct 2004
Posts: 1703

View user's profile

Back to top
Link to postPosted: Fri Dec 26, 2008 10:36 amPost subject: Reply with quote

As mentioned, this problem is now fixed in IJC 2.4.1, so the workaround should no longer be necessary.

Tim
Corey

Joined: 11 Jul 2008
Posts: 3

View user's profile

Back to top
Link to postPosted: Mon Jan 05, 2009 11:59 pmPost subject: Reply with quote

Hello,

After updating to the latest Instant JChem build, I received a different java.lang.NullPointerException error:

"JChem has detected that some tables were created with an older version of JChem, and log tables should be created for them to be usable with this version.
Do you want JChem to create these log tables now?
Before you select YES, please stop all other JChem applications.
NOTE: You must have the CREATE TABLE right for this.
Tables affected: APP.ZINC_LEADLIKE"

After selecting YES to proceed with the update, IJC stalls with database initialization in progress. I would be happy to delete the offending table, but cannot connect to the database. Any alternative solutions?

Corey


HARDWARE/SOFTWARE:

Windows XP SP2
Dell Inspiron 9300
Instant JChem Version: 2.4.1 (build: 081222) JChem Version: 5.1.4 JChem Table Version: 50103 Marvin Version: 5.1.4 (build date: 2008-12-18) Java: 1.6.0_05; Java HotSpot(TM) Client VM 10.0-b19 System: Windows XP version 5.1 running on x86; Cp1252; en_US (instantjchem) NetBeans build: 200711261600 Userdir: C:\Documents and Settings\Corey\Application Data\.instantjchem\ijc_2_4 Java Web Start: No

ERROR STACK:

java.lang.NullPointerException
at chemaxon.jchem.db.TableInfo.createCreateLogTableStatement(TableInfo.java:623)
at chemaxon.jchem.db.TableInfo.createLogTable(TableInfo.java:910)
at chemaxon.jchem.db.Updater.createLogTables(Updater.java:666)
at chemaxon.jchem.db.Updater.performCurrentUpdate(Updater.java:140)
at chemaxon.jchem.db.Updater.performCurrentUpdate(Updater.java:127)
at com.im.df.impl.db.JChemTableUpdater.performNextAction(JChemTableUpdater.java:98)
at com.im.df.impl.db.sprovider.UpgradeJChemIterator$UpgradeAction.performNextAction(UpgradeJChemIterator.java:131)
at com.im.df.impl.db.sprovider.UpgradeJChemTablesState.proceedToNextState(UpgradeJChemTablesState.java:67)
at com.im.df.impl.db.sprovider.SchemaProviderImpl.proceedToNextState(SchemaProviderImpl.java:100)
at com.im.ijc.core.api.util.SchemaInitManager.startInit(SchemaInitManager.java:209)
at com.im.ijc.core.api.util.SchemaInitManager.access$000(SchemaInitManager.java:51)
at com.im.ijc.core.api.util.SchemaInitManager$1.run(SchemaInitManager.java:73)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Edvard
ChemAxon personnel
Joined: 03 Jan 2006
Posts: 349

View user's profile

Back to top
Link to postPosted: Wed Jan 07, 2009 12:47 amPost subject: Reply with quote

Hi,

We have found the problem, it is a bug in the JChem Base. We are going to fix it, and send you a patch soon.
Sorry for this inconvenience.

Regards, Edvard
Tim
ChemAxon personnel
Joined: 05 Oct 2004
Posts: 1703

View user's profile

Back to top
Link to postPosted: Wed Jan 07, 2009 6:29 pmPost subject: Reply with quote

We have fixed the problem.
It should only affect you if you are upgrading from quite an old version of IJC.
The fix will be included in future updates of IJC, but to apply it immediately please download the jchem.jar file located here:
http://www.chemaxon.com/shared/tim/ijc_support/ijc_2_4_1/patches/jchem_5.1.4.1/jchem.jar

and then copy the downloaded file to this directory to replace the existing jchem.jar file:
<IJC_INSTALL_DIR>\instantjchem\modules\ext
The full path (on Windows) should look something like this:
C:\Program Files\ChemAxon\InstantJChem\instantjchem\modules\ext

Once this file is updated then start IJC and the upgrade process should hopefully be successful.

Please let us know how this goes.

Tim
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