Donate Share

ServingXML

Subscribe

Problem to connect to oracle database

  1. 2009-11-04 07:04:15 UTC

    Hi all, I cannot run the sql to xml format. It gives error msg 'com.servingxml.util.system.DefaultLogger error SEVERE: Error in element sx:sqlConnectionPool. Creation of JDBC Connection Pool failed. No suitable driver found for jdbc....... I already copy in the classes12.jar file and rebuild. Thks in advance. :)

  2. 2009-11-04 10:36:49 UTC

    Hi all, The full error msg is 'com.servingxml.util.system.DefaultLogger error SEVERE: Error in element sx:sqlConnectionPool. Creation of JDBC Connection Pool failed. No suitable driver found for jdbc:oracle:thin:@kl-lx-oracle4:1521:kl41'.

    The resource script is shown below: <?xml version="1.0"?>

    <sx:resources xmlns:sx="http://www.servingxml.com/core">

    <sx:service id="employees">
    <sx:serialize> <sx:content ref="employees"/> </sx:serialize> </sx:service>

    <sx:recordContent id="employees"> <sx:sqlReader> <sx:sqlConnectionPool ref="jdbcPool"/>

      &lt;sx:parameter name=&quot;jobList&quot;&gt;
        &lt;sx:toString value=&quot;{$job}&quot; separator=&quot;,&quot;&gt;
          &lt;sx:quoteSymbol character=&quot;'&quot; escapeCharacter=&quot;'&quot;/&gt;
        &lt;/sx:toString&gt;
      &lt;/sx:parameter&gt;
    
      &lt;sx:sqlQuery recordType = &quot;employee&quot;&gt;
        SELECT EMPNO, ENAME AS NAME, JOB FROM EMP WHERE JOB = '{$job}' 
      &lt;/sx:sqlQuery&gt;
    
    &lt;/sx:sqlReader&gt;
    
    &lt;sx:recordMapping ref=&quot;employeesToXml&quot;/&gt;
    

    </sx:recordContent>

    <sx:recordMapping id="employeesToXml"> <employees> <sx:groupBy fields="JOB"> <sx:elementMap element="{JOB}"> <sx:onRecord> <employee> <sx:fieldAttributeMap field="EMPNO" attribute="employee-no"/> <sx:fieldElementMap field="NAME" element="name"/> </employee> </sx:onRecord> </sx:elementMap> </sx:groupBy> </employees> </sx:recordMapping>

    <sx:sqlConnectionPool id="jdbcPool" driver="oracle.jdbc.driver.OracleDriver" databaseUrl="jdbc:oracle:thin:@kl-lx-oracle4:1521:kl41" user="{$user}" password="{$password}" minConnections="2" testStatement="SELECT * FROM DUAL"/>

    </sx:resources>

    I am very new to this tool. I hope anyone can help me on this. Thks in advance. :)

  3. 2009-11-04 13:05:31 UTC

    Which version of ServingXML are you using? (run servingxml -verision)

    1.1.1 had an issue, which was fixed in 1.1.1a

    -- Daniel

  4. 2009-11-04 15:27:10 UTC

    Hi Daniel, Thks for ur reply. I will try it tomorrow when I get to office. I'm currently using version 1.1.1. At first I thought this is the latest version. Haha. The download page is a bit misleading. I guess I can use the latest version, 1.1.1b as well right? Anyway, thank you very much. :)

  5. 2009-11-05 07:19:06 UTC

    Hi Daniel, I tried to use version 1.1.1b and it works. Thks again. :)

< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.