Menu

was not able to create connection

Help
ann
2004-12-03
2013-06-03
  • ann

    ann - 2004-12-03

    Hello,

    I am using dbforms_2.4,
    I created dbforms-config.xml file using DevGUI tool, and when I tested the connection to my Oracle Db, it was successfull.
    But when I call my menu.jsp from browser, I get this error message:
    "java.lang.IllegalArgumentException: JDBC-Troubles:  was not able to create connection from DbConnection = id=null, name=jdbc:oracle:thin:@machineName:1521:DBName, jndi=false, conClass=oracle.jdbc.driver.OracleDriver, username=usr, default=true
    "

    Here is my dbforms-config code:
    <?xml version="1.0" encoding="ISO-8859-1" ?>

    <dbforms-config>
        <dbconnection
            name   = "jdbc:oracle:thin:@machineName:1521:DBName"
            isJndi = "false"
            conClass  = "oracle.jdbc.driver.OracleDriver"
            username = "usr"
            password  = "pwd"
        />
        <table name="CUSTOMER0"
                    defaultVisibleFields="CUSTOMER_ID" >
            <field name="CUSTOMER_ID" fieldType="char" size="64" isKey="true"/>
            <field name="C_FULL_NAME" fieldType="char" size="128"/>
            <field name="C_ADDRESS" fieldType="char" size="510"/>
            <field name="C_PASSWORD" fieldType="char" size="32"/>
            <field name="CUST_PRFL_ID" fieldType="char" size="64"/>
            <field name="C_BALANCE" fieldType="integer" size="18"/>       
            <field name="C_BAL_CRNCY" fieldType="char" size="3"/>
            <field name="TXN_LIMIT_ID" fieldType="integer" size="22"/>       
            <field name="C_TXN_COUNTER" fieldType="integer" size="22"/>       
            <field name="C_DISABLED" fieldType="char" size="1"/>
            <field name="C_FREETEXT" fieldType="char" size="1024"/>
            <field name="TXN_ID" fieldType="integer" size="22"/>       
            <field name="C_TIMESTAMP" fieldType="date" size="7"/>

            <!-- add "granted-privileges" element for security constraintegers -->

        </table>

        <!-- ========== Connection =================================== -->
        <!--
        uncomment this if you have access to JNDI of an application server (see users guide for more info)
        <dbconnection
            name = "jdbc/dbformstest"
            isJndi = "true"
        />
        -->

       
    </dbforms-config>

    menu.jsp code:
      <%@ taglib uri="/WEB-INF/dbForms.tld" prefix="db" %>
      <html>
      <head>
        <db:base/>
      </head>
        
      <body>
        <h1>Menu</h1>
        <db:dbform followUp="/menu.jsp">
        <center>    
        <p>
          <db:gotoButton caption="Edit services" destination="/service.jsp" destTable="customer0"/>
        </p>

        </center>
        </db:dbform>
      </body>
      </html> 

    I tried the colution posted earlier, like puting dbconnection tag on top and changin field types,but nothing helped so far.

    Please help!

     
    • Henner Kollmann

      Henner Kollmann - 2004-12-03

      Are you shure that the oracle jar file are in your WEB-INF/lib directory?
      Pay attention - you must rename the *.zip files to *.jar because tomcat do not load *.zip files!

      Cheers,
      Henner

       
    • ann

      ann - 2004-12-03

      uph,
      thanx for help. i had no idea that tomcat does not load.zip files!
      thanx

       
    • huangcheng

      huangcheng - 2005-04-21

      If  put ms jdbc dirver to %catalina_home%/common/lib
      and this error message show again.
      What reason?

       

Log in to post a comment.

MongoDB Logo MongoDB