JDeveloper - Calling a PL/SQL stored procedure

From: Rainer Neideck <rainer.neideck_at_unisys.com>
Date: Thu, 11 Jan 2001 18:34:30 +0100
Message-ID: <93kjb1$mr$1_at_ih292.ea.unisys.com>


I have created a stored packaged PL/SQL procedure on Oracle 8i. I would like to call this procedure in my JDeveloper Web Application, and I want use the current transaction/session/connection.

I used JPublisher to create a java wrapper (.sqlj file) for the PL/SQL Procedure. The .sqlj file reside in a project containing the Business Components.

If I invoke the PL/SQL procedure from a small Java main everything works fine.

While invoking the PL/SQL procedure from a customized web bean I´m getting the following error:

>>Source for class oracle.lite.web.JupServlet not found.

The program fails while executing the following statement in the java wrapper:

  /* constructors */
  public Limademo() throws SQLException
{

    _ctx = new _Ctx(DefaultContext.getDefaultContext());   }

What could be the reason for that error ?. Please help me in overcoming this problem.

Thanks in advance.

Rainer Neideck

The java main :
package LimademoBC;
import oracle.sql.Datum;
import oracle.sql.NUMBER;
import java.math.BigDecimal;
import sqlj.runtime.ref.DefaultContext;
import oracle.sqlj.runtime.Oracle;
import oracle.jdbc.driver.OracleConnection;

public class TestLimademo
{
  public static void main(String[] args)   throws java.sql.SQLException
{

    Oracle.connect("jdbc:oracle:thin:_at_xxx.xxx.xxx.x:1521:limademo","lima", "lima");

    Limademo l = new Limademo();
    NUMBER RowCount = l.count();
    System.out.println("cat_place count: " + RowCount.stringValue());   }
}

The java wrapper:
package LimademoBC;

import java.sql.SQLException;
import sqlj.runtime.ref.DefaultContext;
import sqlj.runtime.ConnectionContext;
import java.sql.Connection;

public class Limademo
{
  #sql static context _Ctx;
  protected _Ctx _ctx;

  /* constructors */
  public Limademo() throws SQLException
{

    _ctx = new _Ctx(DefaultContext.getDefaultContext());   }
  public Limademo(ConnectionContext c) throws SQLException
{

    _ctx = new _Ctx(c);
  }
  public Limademo(Connection c) throws SQLException
{

    _ctx = new _Ctx(c);
  }
  public oracle.sql.NUMBER count ()
  throws SQLException
{

    oracle.sql.NUMBER __jPt_result;
    #sql [_ctx] __jPt_result = { VALUES(LIMADEMO.COUNT()) };     return __jPt_result;
  }
} Received on Thu Jan 11 2001 - 18:34:30 CET

Original text of this message