Error while "creating relation tree" in RelAdmin webservice"

User 73ad691ca3

07-08-2012 12:07:33

Hi,


     We are getting the below error while "creating relation tree" using "Relational Data Management Web Service" of Jchem webservices.


Error:


-----------------------------------------------------------------------------------------------------------------------------------------------


Schema not found ---> System.ServiceModel.FaultException: Schema not found Server stack trace: at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at RelAdminWS.RelAdminWSPortType.addToRelationTree(addToRelationTreeRequest request) at RelAdminWS.RelAdminWSPortTypeClient.RelAdminWS.RelAdminWSPortType.addToRelationTree(addToRelationTreeRequest request) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dotnetnuke_community_06.02.00_install\4b65239a\61aec3b4\App_WebReferences.nrz77wce.1.cs:line 719 at RelAdminWS.RelAdminWSPortTypeClient.addToRelationTree(String connectionHandlerId, String relationTreeLabel, String relationType, String tableName1, String relationField1, String tableName2, String primaryField2, String relationField2, String fieldNameList2, String fieldTypeList2) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dotnetnuke_community_06.02.00_install\4b65239a\61aec3b4\App_WebReferences.nrz77wce.1.cs:line 734


---------------------------------------------------------------------------------------------------------------------------------------------------------


     We are using "Oracle" as database, Jchem webservice, jchem manager: 5.10.0, JChem Web Services 5.10.0,JVM: Oracle Corporation 1.7.0_05.  


     We are planning to search structure from "jchem structure table", and we want to export the structure from 'jchem structure table(called structure_1)' and the corresponding data from 'other table(called batch_1)'. 


     To do this,  we are using the jchem webservice called "Relational Data Management Web Service" to create the relationtree.  When i call the webservice method "createRelationTree" to create the relationtree, i was getting the above mentioned error. But in the database, the IJC tables were created, without any data.


     Below is the c# code, which i am using to create the relation tree:


------------------------code----------------------------------------------------------------------------------------------------------------


//here i am calling the webservice to create relation tree
protected void btnCreateRelationTree_Click1(object sender, EventArgs e)
    {
        try
        {
            RelAdminWS.RelAdminWSPortTypeClient ra = new RelAdminWS.RelAdminWSPortTypeClient("RelAdminWSHttpSoap11Endpoint");


            string connectionHandlerId = GetConnectionHandlerId();
            string relationTreeLabel = "tr1";
            string tableName = "structure_1";
            string primaryField = "cd_id";
            string fieldNameList = "";
            string fieldTypeList = "";


            string result = ra.createRelationTree(connectionHandlerId, relationTreeLabel, tableName, primaryField, fieldNameList, fieldTypeList); //ra.createRelationTree(GetConnectionHandlerId(), "relationTree1", "structure_1", "cd_id", "cd_id cd_molweight cd_timestamp", "integer float auto");


            DisplayMessage(result);
        }
        catch (System.Exception exc)
        {
            Exceptions.ProcessModuleLoadException(this, exc);
        }
    }


//to get connectionhandler id(this is working)
private string GetConnectionHandlerId()
    {
        try
        {
            //jchem webservice will use below parameters to connect to jchem database
            string server = "180.190.20.10";
            string port = "1521";
            string databaseName = "jcmdb";
            string username = "jcm";
            string password = "jcm";


            string propertyTable = "JCHEMPROPERTIES";
            string driver = "oracle.jdbc.driver.OracleDriver";


            string jdbcUrl = "jdbc:oracle:thin:@{0}:{1}:{2}";
            jdbcUrl = string.Format(jdbcUrl, server, port, databaseName);          


           
            ConnectionWS.ConnectionWSPortTypeClient conWS = new ConnectionWS.ConnectionWSPortTypeClient("ConnectionWSHttpSoap11Endpoint");
            string connectionResult = conWS.getConnection(driver, jdbcUrl, username, password, propertyTable);
            return ExtractConnectionHandlerId(connectionResult);
        }
        catch (System.Exception exc)
        {
            throw exc;
        }
    }


    private static string ExtractConnectionHandlerId(string connectionResult)
    {
        //Xml linq to get 'connectionHandlerId value' from 'ConnectionHandlerId Element' in the xml
        var connectionHandlerId = (XDocument.Parse(connectionResult).Element("ConnectionHandlerId")).Value;


        return connectionHandlerId;
    }


--------------------------------------------------------------------------------------------------------------------------------------------


     Is there any settings need to be done, or do we need to give any privilege?


     Please help us on this?


     Please let us know, if you need any information regarding this issue?


     Please reply me asap.........


Thanks,


D. Senthil Vijai.

User 73ad691ca3

10-08-2012 12:17:39

Hi,


This is just to follow up on my last request("Error while "creating relation tree" in RelAdmin webservice"), Let me know what is the issue, how can we resolve this issue.


Please reply asap.


Thanks,


D. Senthil kumar vijai.

ChemAxon e07e2a364b

13-08-2012 10:07:13

Thanks for the bug report! We working on this issue. Most probable it will be fixed in the next version.

User 73ad691ca3

13-08-2012 12:34:07

Hi,


we have tried to 'create relation tree with two tables' using javascript example given by chemaxon for the relational data management webservice(i.e,. js_examples/relational/reladmin.html).


we gave the appropriate values in 'Advanced functions', but the example program gives the error.


Find the attached error details, for your reference:


Do we need to give any database privileges to achieve the functionality of relational data management using jchem webservice(reladminws).


Even the chemaxon example is not working here.


Please look into this error, and let us know how to resolve this issue asap.


We are awaiting for your response regarding this.


 


Thanks,


Senthil kumar vijai.


 


 

User 73ad691ca3

17-08-2012 05:32:02

Hi,


Is there any update on this.


Please let us know the solution for this error asap.


 


Thanks & Regards,


D.Senthil kumar vijai.

ChemAxon e07e2a364b

17-08-2012 06:48:20

Dear D.Senthil kumar vijai,


 


   This is a bug. We are working on the fix. Most probably, the fix will be included in the next version (5.11), which is expected in 4-5 weeks. 


 


Gabor

User 73ad691ca3

21-08-2012 09:56:44

Hi,


We are going to implement "the exporting of structure with data from structure table and other data tables" using the Jchem .Net API(i.e,. custom export, based on the select query).


So we are using "Exporter class of jchem" to export the sdf data from structure table based on the select query.


When we try to export the sdf data using "Exporter class of jchem", jchem throws exception. Jchem throws the exception when we set "the select query" to the exporter object. 


Exception:


Transfer exception:


Unexpected error during DB export init: null


----


Jchem version details:


-->JChem .NET API 5.10.3.437


-->Oracle database


Note: But when we try to export the sdf data for "the entire structure table"(i,e. setTableName method), we are able to get the exported results from the jchem exporter class.


Below is the code we used for exporting structure data(i,e,. setSelectQuery), for this jchem throws exception:


/////////////////////////////////////////////////////// using setSeletQuery /////////////////////////////////////////////////


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using java.io;
using System.Configuration;
using chemaxon.util;
using java.sql;
using chemaxon.jchem.db;


namespace JChemBaseSearch
{
    public class Exporter1
    {
        public Exporter1()
        {


        }


        private static ConnectionHandler getConnectionHandler()
        {
            string url = ConfigurationManager.AppSettings["url"];//jdbc:oracle:thin:@dbora:1521:jchem
            string username = ConfigurationManager.AppSettings["username"];//jcm
            string password = ConfigurationManager.AppSettings["password"];//jcm


            try
            {
                DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                Connection conn = DriverManager.getConnection(url, username, password);


                ConnectionHandler ch = new ConnectionHandler();
                ch.setConnection(conn);


                return ch;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }


        public void ExportQueryData()
        {
            try
            {
                //Note: create the folder, "c:/test"
                string fileName = "c:/test/sdfTest12345.sdf";
                string tname = "test";


                string QUERY = "SELECT  T.CD_STRUCTURE, T.CD_ID, B.BATCH_NUMBER FROM TEST T INNER JOIN BATCH_DETAILS B ON T.CD_ID = B.CD_ID"; //"SELECT  TEST.CD_STRUCTURE FROM TEST WHERE TEST.CD_ID = 478";


                int format = Transfer.__Fields.SDFILE;
                File file = new File(fileName);
                OutputStream os = new FileOutputStream(file);
                Exporter ex = new Exporter();
                ex.setConnectionHandler(getConnectionHandler());


                //Note: comment below 2 lines, if you want to export the data of query results
                //ex.setTableName(tname);
                //ex.setDefaults(false);


                ex.setOutputStream(os);
                ex.setFormat(format);


                //Note: uncomment below line, if you want to export the data from the structure table(here it is "test")
                ex.setSelectStatement(QUERY); //when we uncomment this line, we get error. To do:


                int written = ex.writeAll();
            }
            catch (Exception ex)
            {
                throw ex;
            }


        }


    }
}


////////////////////////////////////////////////////////////////////////////


 


//////////////Code to export structure data from a table/////////////this is working fine//////////////////////


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using java.io;
using System.Configuration;
using chemaxon.util;
using java.sql;
using chemaxon.jchem.db;


namespace JChemBaseSearch
{
    public class Exporter1
    {
        public Exporter1()
        {


        }


        private static ConnectionHandler getConnectionHandler()
        {
            string url = ConfigurationManager.AppSettings["url"];//jdbc:oracle:thin:@dbora:1521:jchem
            string username = ConfigurationManager.AppSettings["username"];//jcm
            string password = ConfigurationManager.AppSettings["password"];//jcm


            try
            {
                DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                Connection conn = DriverManager.getConnection(url, username, password);


                ConnectionHandler ch = new ConnectionHandler();
                ch.setConnection(conn);


                return ch;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }


        public void ExportQueryData()
        {
            try
            {
                //Note: create the folder, "c:/test"
                string fileName = "c:/test/sdfTest12345.sdf";
                string tname = "test";


                string QUERY = "SELECT  T.CD_STRUCTURE, T.CD_ID, B.BATCH_NUMBER FROM TEST T INNER JOIN BATCH_DETAILS B ON T.CD_ID = B.CD_ID"; //"SELECT  TEST.CD_STRUCTURE FROM TEST WHERE TEST.CD_ID = 478";


                int format = Transfer.__Fields.SDFILE;
                File file = new File(fileName);
                OutputStream os = new FileOutputStream(file);
                Exporter ex = new Exporter();
                ex.setConnectionHandler(getConnectionHandler());


                //Note: comment below 2 lines, if you want to export the data of query results
                ex.setTableName(tname);
                ex.setDefaults(false);


                ex.setOutputStream(os);
                ex.setFormat(format);


                //Note: uncomment below line, if you want to export the data from the structure table(here it is "test")
                //ex.setSelectStatement(QUERY); //when we uncomment this line, we get error. To do:


                int written = ex.writeAll();
            }
            catch (Exception ex)
            {
                throw ex;
            }


        }


    }
}


/////////////////////////////////////////////////////////


Please resolve this issue asap.


we are waiting for your reply, and help us how to solve this issue.


We want the export functionality to be working fine.


Please let us know, if you need any other information regarding this.


Thanks and Regards,


D.Senthil kumar vijai.


 


 

ChemAxon bd13b5bd77

26-09-2012 14:32:15

Hi Vijai,


have you already checked the C# web service demo example against your Web Service instance.


https://www.chemaxon.com/webservices/developersGuide.html#examples


Viktor