If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Oracle External Object Wrappers

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-22-04, 06:40
matthew.eichler matthew.eichler is offline
Registered User
 
Join Date: Sep 2004
Location: Amsterdam
Posts: 1
Oracle External Object Wrappers

I'm trying to use the Oracle wrappers for Java objects implented using SQLData, but get an error right away with loading the type definition:

ORA-00604: error occurred at recursive SQL level 1
ORA-29540: class oracle/aurora/sqljtype/SQLJTypeDesc does not exist

Anyone run into this?

The Oracle object type definition is ----------------------------------
CREATE OR REPLACE TYPE t_person_obj AS OBJECT EXTERNAL NAME 'com.dexels.sportlink.ora2syb.Person'
LANGUAGE JAVA USING SQLDATA (
personid VARCHAR2 (32)
, lastname VARCHAR2 (35)
, firstname VARCHAR2 (35)
, MEMBER FUNCTION update_person
RETURN NUMBER
EXTERNAL NAME 'update() return int'
);
/

The Java implementation is ------------------------------------------
package com.dexels.sportlink.ora2syb;

import java.sql.SQLData;
import java.sql.SQLException;
import java.sql.SQLInput;
import java.sql.SQLOutput;

public class Person implements SQLData {

private String sqlType;

private String id;

private String lastName;

private String firstName;

/**
*
*/
public Person() {
super();
}

public int update() {
; /* do something useful */
return ( 0 );
}

public String getSQLTypeName() throws SQLException {
return ( this.sqlType );
}

public void writeSQL( SQLOutput stream ) throws SQLException {
stream.writeString( this.id );
stream.writeString( this.lastName );
stream.writeString( this.firstName );

}

public void readSQL( SQLInput stream, String typeName ) throws SQLException {
this.sqlType = typeName;
this.id = stream.readString();
this.lastName = stream.readString();
this.firstName = stream.readString();
}

}

------------------
I've tried executing the object type DDL on Win 9.2 and Linux 10.1 SQL*Plus clients, the database is 9.2 on RedHat Linux.

Any and all help appreciated,

ME
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On