Thread: loadjava: JNI panic: JNI received a null array


Permlink Replies: 5 - Pages: 1 - Last Post: Feb 9, 2009 7:03 AM Last Post By: Jpmill
voiceprovider

Posts: 30
Registered: 02/13/01
loadjava: JNI panic: JNI received a null array
Posted: Oct 5, 2005 7:03 AM
Click to report abuse...   Click to reply to this thread Reply
Hi,
Oracle standard edition 9.2.0.6 on Solaris 10,
I'm trying to use the loadjava-tool and getting the following error below. My user has been granted javasyspriv.

$>loadjava -user a_user/a_password@an_instance -verbose AJavaClass.class
JNI panic: JNI received a null array
at oracle.jdbc.oci8.OCIDBAccess.blobWrite(Compiled Code)
at oracle.jdbc.oci8.OCIDBAccess.lobWrite(Compiled Code)
at oracle.sql.LobDBAccessImpl.putBytes(Compiled Code)
at oracle.sql.BLOB.putBytes(Compiled Code)
at oracle.jdbc.driver.OracleBlobOutputStream.flushBuffer(Compiled Code)
at oracle.jdbc.driver.OracleBlobOutputStream.flush(Compiled Code)
at oracle.aurora.util.IOCopy.copy(Compiled Code)
at oracle.aurora.server.tools.loadjava.SchemaObject.load(Compiled Code)
at oracle.aurora.server.tools.loadjava.ClientClassObject.create(Compiled Code)
at oracle.aurora.server.tools.loadjava.SchemaObject.process1(Compiled Code)
at oracle.aurora.server.tools.loadjava.LoadJava.add(Compiled Code)
at oracle.aurora.server.tools.loadjava.LoadJava.addClass(Compiled Code)
at oracle.aurora.server.tools.loadjava.LoadJava.add(Compiled Code)
at oracle.aurora.server.tools.loadjava.LoadJava.add(Compiled Code)
at oracle.aurora.server.tools.loadjava.LoadJava.add(Compiled Code)
at oracle.aurora.server.tools.loadjava.LoadJava.add(Compiled Code)
at oracle.aurora.server.tools.loadjava.LoadJava.processDeferredFiles(Compiled Code)
at oracle.aurora.server.tools.loadjava.LoadJava.process(Compiled Code)
at oracle.aurora.server.tools.loadjava.LoadJava.command(Compiled Code)
at oracle.aurora.server.tools.loadjava.LoadJavaMain.run(Compiled Code)
at oracle.aurora.server.tools.loadjava.LoadJavaMain.main(Compiled Code)

/Carl-Michel
Avi Abrami

Posts: 4,090
Registered: 07/02/00
Re: loadjava: JNI panic: JNI received a null array
Posted: Oct 5, 2005 7:00 PM   in response to: voiceprovider in response to: voiceprovider
Click to report abuse...   Click to reply to this thread Reply
Carl-Michel,
Just a suggestion: Did you try your command without the "@an_instance"? And are you running this command from the directory where the "AJavaClass.class" file is located?

Good Luck,
Avi.
voiceprovider

Posts: 30
Registered: 02/13/01
Re: loadjava: JNI panic: JNI received a null array
Posted: Oct 6, 2005 1:36 AM   in response to: Avi Abrami in response to: Avi Abrami
Click to report abuse...   Click to reply to this thread Reply
Thanks Avi,

yes, the class-file is located in my working directory.

If I omit "@an_instance" the output is:

SQL Error while connecting with oci8 driver to default database: ORA-12162: TNS:service name is incorrectly specified
exiting : could not open connection

So I'm afraid your suggestions didn't work.
Any other suggestions...
Thanks
Carl-Michael
voiceprovider

Posts: 30
Registered: 02/13/01
Re: loadjava: JNI panic: JNI received a null array
Posted: Oct 6, 2005 3:24 AM   in response to: voiceprovider in response to: voiceprovider
Click to report abuse...   Click to reply to this thread Reply
Hi all,
found a note at metalink about this, it's a bug that occures with Oracle 9.2.0.6 and Solaris 64-bit. The quick workaround is:

to use the -thin argument, this uses the thin jdbc driver and the problem is only in the OCI,
syntax is: loadjava -thin -user username/password@server:port#:SID some.class

I used the thin driver as suggested and it worked perfect!

/Carl-Michael
AnastasiaAourik

Posts: 13
Registered: 02/22/08
Re: loadjava: JNI panic: JNI received a null array
Posted: Feb 22, 2008 7:07 AM   in response to: voiceprovider in response to: voiceprovider
Click to report abuse...   Click to reply to this thread Reply
I took your advice and added -thin....(as shown)

C:\aaourik\OracleLite\drs>loadjava -thin -user system/smith@jdbc:polite:MYDRS -f
orce -verbose drsolite.jar
arguments: '-thin' '-user' 'system/smith@jdbc:polite:MYDRS' '-force' '-verbose'
'drsolite.jar'
creating : resource META-INF/MANIFEST.MF
loading : resource META-INF/MANIFEST.MF
SQL Error while connecting with thin driver to jdbc:polite:MYDRS: Io exception:
Invalid number format for port number
exiting : could not open connection
=========
I don't know what PORT oracle lite is running on by default. I did not alter the port so if anyone knows this information, I'd appreciate it.

cheers,Anastasia Aourik
Jpmill

Posts: 54
Registered: 01/26/09
Re: loadjava: JNI panic: JNI received a null array
Posted: Feb 9, 2009 7:03 AM   in response to: voiceprovider in response to: voiceprovider
Click to report abuse...   Click to reply to this thread Reply
Hi , I have the same problem as you. I tried your solution but here's what I got :

bash-2.05$ loadjava -thin -u scott/tiger@wagner:1521:CORP -v -resolve itext-1.4.jar
arguments: '-thin' '-u' 'scott/tiger@wagner:1521:CORP' '-v' '-resolve' 'itext-1.4.jar'
SQL Error while connecting with thin driver to wagner:1521:CORP: Io exception: The Network Adapter could not establish the connection
exiting : could not open connection

there is my tnsname.ora info :

WAGNER =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.50.59)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = CORP)
)
)


What can be the problem? Is it the thin driver?

Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums