Migration from JChem 5.1 to 6.2.2

User f6678ce8b0

17-04-2014 10:01:51

Hi Support.


I have troubles with my application. After launching it on the DB, an update was done (as usual), but now, all my tools are failing to retrieve structure from the DB (get a NullPointerException, because the DB field is returned null).


Is there a tool I can use to directly connect to the DB and visualize the structures, or get info on the state of them (jcman doesn't help much here, and the recalculate process I have tried is still running after 2 hours with 0 as progress) ?


I have tried with knime but the Blob column is not recognized as a valid structure column by MarvinView or MolConverter node.


Any script or things I should  consider to fix things or at least investigate further ?


Thanks a lot in advance,


Best regards,


Fabien


 

ChemAxon d4fff15f08

17-04-2014 10:34:31

Hi Fabien,


 


I am not sure whether I understand your situation correctly, but I'll try to give you some advice.


 


Generally, if a recalculation is running on a certain table, we would not recommend accessing it with other application such as search.


How big is your table (how many records do you have? are there any chemical terms that need to be recalculated - because that could take some time)? Unfortunately the recalculation is indeed not the fastest procedure during an upgrade, it will undoubtedly take some time.


 


No matter what process is running on your db, you must be able to access it with conventional db manager tools as sqldeveloper, or similar programs. With these tools you might also be able to run some diagnostics on the table (is it locked? does any sql statement running that affects your table? etc)


 


Could you please paste or attach the full error log (NPE) you are getting? It might help us to identify what kind of problem you are facing.


 


Thanks in advande, 


Norbert

User f6678ce8b0

17-04-2014 12:11:01

Hi Norbert.


What puzzles me is the Molecule count:0 on the Progress window.


There are 2693 lines in the structure table. Nothing impressive.


I can connect to the table (Oracle 11.2.0), its just that I seem to have troubles reading the structure from it (thus my attempts with other softwares, to try to see if it is my code or the db). The NPE won't help since it is thrown by my code, not the jchem lib. The error occurs below (on the red line).


The code is


    String query = "select cd_id,cd_structure from bp_structure where cd_id in ("+Tools.getListNoQuote(cdid)+")";
        String[] queries = Tools.splitQuery(query);
        MolHandler mh = new MolHandler();
        for (int i=0;i<queries.length;i++){
            ml.executeQuery(queries);
            while(ml.result.next()){
                String struc = new String(ml.result.getBytes(2),"ASCII");
                if (struc!=null){
                    try {
                        mh.setMolecule(struc);
                        compIdStructure.put((String)cdidCompId.get(ml.result.getString(1)),mh.getMolecule());
                    } catch(Exception e){
                        // no structure will be stored for this comp_id
                    }
                }
            }
            ml.result.close();
        }


 


if you see something... (but that was working with jchem 5.1)


thanks,


Fabien

User f6678ce8b0

17-04-2014 12:32:27

Hum.


Seems my CD_STRUCTURE column is empty. This is very annoying...


 

ChemAxon d4fff15f08

17-04-2014 13:06:17

Hi Fabien,


 


Thanks for the code, the only problem is that we can not see what is 'ml.result.getBytes(2)' and it seems that one of its items goes null. Could you send us the part of the code where you declare the object and its functions?


 


Irrespectively to the code, having empty cd_structure column never means good in the Chemaxon word. What information do you have in your DB? column names? is your cd_smiles or cd_smarts column populated with data? 


It seems to me that you are using cartridge is that correct?


 


regards,


Norbert

User f6678ce8b0

17-04-2014 13:29:23

since the structure is empty, the null is retrieved from the DB and caused the NPE.


I am trying to re-import the structures in the DB, tried with jcman but it creates new rows, which is not what I would like to, so I will use the internally coded part, which is currently running (for an unpredicatable time, and hopefully did insert the structures).


However, the code itself being pretty old,(even for jchem 5.1 standards)  many of the calls are marked as deprecated... which may cause problems... I will report back once the import finishes (or crashes).


 


Thanks for your help so far...


 


Fabien


 

User f6678ce8b0

17-04-2014 13:49:02

hum...


javax.servlet.ServletException: Could not initialize class chemaxon.jchem.db.MarkushTableInfo
        at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:498)
        at org.apache.jsp.displayReport_jsp._jspService(displayReport_jsp.java:164)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:720)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:720)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145)
        at cerep.webapp.filters.CerepLogFilter.doFilter(CerepLogFilter.java:87)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:165)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:139)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
        at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2460)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
        at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:119)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
        at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:157)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
        at java.lang.Thread.run(Thread.java:619)


Any hint ?


Thanks,


Fabien

ChemAxon d4fff15f08

17-04-2014 14:10:23

Hi,


The error message says that the MarkushTableInfo.class class is not found. This is normally situated in jchem-db.jar in the lib folder of the installed jchem.


Please make sure that you have the mentioned .jar, and its path is properly set in $PATH variable.


 


Best regards,


Norbert

User f6678ce8b0

17-04-2014 14:57:09

this is unexpected since the lib is, together with jchem.jar, in the shared/lib of tomcat...


I have copied over all libs in the lib folder to the shared/lib...


I will check if ever I have an old jchem.jar somewhere that may be used instead of the one in the shared/lib (which may explain a few things)

User f6678ce8b0

17-04-2014 16:02:58

Maybe a hint. There was an error before, which may explain the later one...


java.lang.ExceptionInInitializerError
        at chemaxon.jchem.db.SimpleJChemSearch$TargetCollectionRef.acquire(SimpleJChemSearch.java:140)
        at chemaxon.jchem.db.SimpleJChemSearch.searchCore(SimpleJChemSearch.java:236)
        at chemaxon.jchem.db.JChemSearch.searchCore(JChemSearch.java:1382)
        at chemaxon.jchem.db.JChemSearch.search(JChemSearch.java:1439)
        at chemaxon.jchem.db.JChemSearch.run(JChemSearch.java:1355)
        at cerep.bobj.modeling.bptools.database.DBStructure.getCDIDfromMolecule(DBStructure.java:2040)
        at cerep.bobj.modeling.bptools.database.DBStructure.getCDIDfromMolecule(DBStructure.java:2006)
        at cerep.webapp.importMolecules.ImportMolecules.insertOneMolecule(ImportMolecules.java:908)
        at org.apache.jsp.genStructuresFromSmiles_jsp._jspService(genStructuresFromSmiles_jsp.java:147)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:720)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:720)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145)
        at cerep.webapp.filters.CerepLogFilter.doFilter(CerepLogFilter.java:87)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:165)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:139)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
        at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2460)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
        at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:119)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
        at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:157)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: Failed to create default XML configuration.
        at chemaxon.descriptors.MDParameters.initParameters(MDParameters.java:225)
        at chemaxon.descriptors.MarkushDescriptorParameters.<init>(MarkushDescriptorParameters.java:70)
        at chemaxon.jchem.db.MarkushTableInfo$DefaultConfigSingleTable.getMDTableInfoArray(MarkushTableInfo.java:283)
        at chemaxon.jchem.db.MarkushTableInfo.<clinit>(MarkushTableInfo.java:124)
        ... 48 more
Caused by: org.dom4j.InvalidXPathException: Invalid XPath expression: '//MarkushDescriptorConfiguration/Parameters'. Caused by: org.jaxen.dom4j.DocumentNavigator.getInstance()Lorg/jaxen/Navigator;
        at org.dom4j.xpath.DefaultXPath.parse(DefaultXPath.java:362)
        at org.dom4j.xpath.DefaultXPath.<init>(DefaultXPath.java:59)
        at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:230)
        at org.dom4j.tree.AbstractNode.createXPath(AbstractNode.java:207)
        at org.dom4j.tree.AbstractNode.selectSingleNode(AbstractNode.java:183)
        at chemaxon.descriptors.MarkushDescriptorParameters.processDocument(MarkushDescriptorParameters.java:191)
        at chemaxon.descriptors.MDParameters.initParameters(MDParameters.java:217)

ChemAxon a9ded07333

18-04-2014 08:46:54

Hi Fabien,


In JChem we use Java ServiceLoader in connection with MarkushTableInfo.
The service description can be found in jchem.jar, in /META-INF/services
subdirectory.
If this directory is not accessible it causes the problems mentioned in your post.

So please make sure that jchem.jar/META-INF/services 's content is accessible from your application.

Best regads,
Tamás

User f6678ce8b0

22-04-2014 07:41:19

I have done the upgarde process again from a new (restored) database. Here are the steps and obtained results, leading to the structures loss. Please let me know what I can do since upgarding to v 6.2.2 leads me to no structure at all (which obviously lessen the interest of switching to this version...)


regards,


Fabien

ChemAxon d4fff15f08

22-04-2014 12:02:31

Hi Fabien,


 


We succeed to reproduce the erroneous behaviour described by you. The problem is with the handling of the "long raw" column type of cd_structure - set by you - during recalculation. As a workaround we can offer you to use the default "cd_structure BLOB NOT NULL," setting for your table. If there are any concerns using BLOB, you might continue using LONG RAW but, please set the 'NOT NULL' option true for cd_structures column (nullable=No). This will protect you from loosing the content of cd_structure during the upgrade (though, ORA-01407 error messages will appear during the upgrade, but you can ignore them).


 


I hope this can solve some of your problems.


 


Best regards,


Norbert

ChemAxon d4fff15f08

22-04-2014 14:32:23

Hi Fabien,


 


I've forgot to mention that even Oracle recommends changing from LONG RAW to LOB (BLOB), see: http://docs.oracle.com/cd/B28359_01/server.111/b28286/sql_elements001.htm#SQLRF50973


Best regards,


Norbert

User f6678ce8b0

22-04-2014 15:30:25

As a matter of fact, Jchem was using Long Raw data types when we started using it. Migration of Long Raw columns being messy, we did not change it (so far...).


thanks for your previous suggestions, I will give them a go.


Best regards,


Fabien


 

User f6678ce8b0

30-04-2014 13:23:26










cheese wrote:

Hi Fabien,


In JChem we use Java ServiceLoader in connection with MarkushTableInfo. The service description can be found in jchem.jar, in /META-INF/services subdirectory.
If this directory is not accessible it causes the problems mentioned in your post.

So please make sure that jchem.jar/META-INF/services 's content is accessible from your application.

Best regads,
Tamás



The problem was because of buildstamp.properties file not in the lib folder (I copied all jars, and only those...)


Now, I have an other problem (but making progress)


While doing a structure search, I have


java.lang.Exception: ORA-00904: "A"."CD_SCREEN_DESCRIPTOR" : identificateur non valide


Any thought ?


Thanks !


Fabien


 


 


 

User f6678ce8b0

30-04-2014 13:30:37

Oops, I am answring my own questions :)


I noticed some columns where missing from the structure table, so I did an update with jcman and everything is working as expected now.


Thank you for your support,


Fabien


 

ChemAxon d4fff15f08

05-05-2014 06:53:17

Hi Fabien,


 


I am happy to hear that everything is working fine.


 


All the bests,


Norbert