469,366 Members | 2,254 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,366 developers. It's quick & easy.

Call Javacode from Pl/SQL

I want to call JavaScript/Java Code from a PL/SQL
If any one has idea, pl share
Thanks in advance
Beena
Aug 11 '08 #1
11 6133
r035198x
13,262 8TB
Javascript != Java.
Which one do you want to call?
Aug 11 '08 #2
Javascript != Java.
Which one do you want to call?
First preferance - java script if not possible then java class
Aug 11 '08 #3
r035198x
13,262 8TB
First preferance - java script if not possible then java class
Are we talking about Java stored procedures here?
Aug 11 '08 #4
I have a java script& javacodes to generate Barcode. I want to call it from a SQL query.
when I load the java class using loadjava errors coming...
Is it possible to call javascript from PL/SQL
Aug 12 '08 #5
r035198x
13,262 8TB
I have a java script& javacodes to generate Barcode. I want to call it from a SQL query.
when I load the java class using loadjava errors coming...
Is it possible to call javascript from PL/SQL
Why don't you explain what your application set up is like? Are you creating a web application using JSPs? How are you mixing the Java and Javascript?
Aug 12 '08 #6
Why don't you explain what your application set up is like? Are you creating a web application using JSPs? How are you mixing the Java and Javascript?
It is a J2EE based web application with oracle 10g as data base.
From one of my JSP, i am calling a Jasper report to print bills. in that bill i want to include barcodes also. I have java script and java code to generate barcodes.
without saving into databse , i have to print it while calling reports.
Aug 12 '08 #7
r035198x
13,262 8TB
It is a J2EE based web application with oracle 10g as data base.
From one of my JSP, i am calling a Jasper report to print bills. in that bill i want to include barcodes also. I have java script and java code to generate barcodes.
without saving into databse , i have to print it while calling reports.
So you know want to save the generated bar codes in the database? Into a column of what type?
Aug 12 '08 #8
So you know want to save the generated bar codes in the database? Into a column of what type?
I don't want to save it into database, while calling report for every bill_no, i want to generate the corresponding barcode of billno.

My requirement is this.

If i have a function barcodegen with input as billno(number) and output as corresponding barcode (as image type), i can call it in the query as
select bill_no,barcodegen(bill_no) ---> this is my requirement, i can place the
image in my report without saving into database.
any idea?
Aug 12 '08 #9
r035198x
13,262 8TB
See if this
helps.
Aug 12 '08 #10
See if this
helps.
I have refered that site.. follwed the steps
1. Creates Class files
2. While loading class files into database, the following errors coming
(My oracle user is kwa and class file is Area.class , which is working fine in java)

D:\oracle\product\10.2.0\db_1\BIN>loadjava -user kwa/kwa Area.class

Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x807
7E76
Function=[Unknown.]
Library=D:\oracle\product\10.2.0\db_1\jdk\jre\bin\ client\jvm.dll

NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.


Current Java thread:
at oracle.jdbc.driver.T2CConnection.t2cCreateState(Na tive Method)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnecti on.java:346)
at oracle.jdbc.driver.PhysicalConnection.<init>(Physi calConnection.java:
413)
at oracle.jdbc.driver.T2CConnection.<init>(T2CConnect ion.java:131)
at oracle.jdbc.driver.T2CDriverExtension.getConnectio n(T2CDriverExtensio
n.java:77)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriv er.java:752)
at java.sql.DriverManager.getConnection(DriverManager .java:512)
- locked <0x141ae178> (a java.lang.Class)
at java.sql.DriverManager.getConnection(DriverManager .java:140)
- locked <0x141ae178> (a java.lang.Class)
at oracle.aurora.server.tools.loadjava.DatabaseOption s.getConnection(Dat
abaseOptions.java:180)
at oracle.aurora.server.tools.loadjava.DatabaseOption s.connect(DatabaseO
ptions.java:123)
at oracle.aurora.server.tools.loadjava.LoadJavaState. getConnection(LoadJ
avaState.java:409)
at oracle.aurora.server.tools.loadjava.LoadJavaState. getOldMD5(LoadJavaS
tate.java:696)
at oracle.aurora.server.tools.loadjava.ClientSchemaOb ject.getOldMD5(Clie
ntSchemaObject.java:52)
at oracle.aurora.server.tools.loadjava.SchemaObject.d oCreate(SchemaObjec
t.java:172)



D:\oracle\product\10.2.0\db_1\BIN>loadjava -user kwa/kwa Area.class

Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x807
7E76
Function=[Unknown.]
Library=D:\oracle\product\10.2.0\db_1\jdk\jre\bin\ client\jvm.dll

NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.


Current Java thread:
at oracle.jdbc.driver.T2CConnection.t2cCreateState(Na tive Method)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnecti on.java:346)
at oracle.jdbc.driver.PhysicalConnection.<init>(Physi calConnection.java:
413)
at oracle.jdbc.driver.T2CConnection.<init>(T2CConnect ion.java:131)
at oracle.jdbc.driver.T2CDriverExtension.getConnectio n(T2CDriverExtensio
n.java:77)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriv er.java:752)
at java.sql.DriverManager.getConnection(DriverManager .java:512)
- locked <0x141ae178> (a java.lang.Class)
at java.sql.DriverManager.getConnection(DriverManager .java:140)
- locked <0x141ae178> (a java.lang.Class)
at oracle.aurora.server.tools.loadjava.DatabaseOption s.getConnection(Dat
abaseOptions.java:180)
at oracle.aurora.server.tools.loadjava.DatabaseOption s.connect(DatabaseO
ptions.java:123)
at oracle.aurora.server.tools.loadjava.LoadJavaState. getConnection(LoadJ
avaState.java:409)
at oracle.aurora.server.tools.loadjava.LoadJavaState. getOldMD5(LoadJavaS
tate.java:696)
at oracle.aurora.server.tools.loadjava.ClientSchemaOb ject.getOldMD5(Clie
ntSchemaObject.java:52)
at oracle.aurora.server.tools.loadjava.SchemaObject.d oCreate(SchemaObjec
t.java:172)
at oracle.aurora.server.tools.loadjava.SchemaObject.p rocess1(SchemaObjec
t.java:215)
at oracle.aurora.server.tools.loadjava.LoadJava.add(L oadJava.java:532)
at oracle.aurora.server.tools.loadjava.LoadJava.addCl ass(LoadJava.java:5
86)
at oracle.aurora.server.tools.loadjava.LoadJava.add(L oadJava.java:436)
at oracle.aurora.server.tools.loadjava.LoadJava.add(L oadJava.java:380)
at oracle.aurora.server.tools.loadjava.LoadJava.add(L oadJava.java:349)
at oracle.aurora.server.tools.loadjava.LoadJava.add(L oadJava.java:652)
at oracle.aurora.server.tools.loadjava.LoadJava.proce ssDeferredFiles(Loa
dJava.java:617)
at oracle.aurora.server.tools.loadjava.LoadJava.proce ss(LoadJava.java:81
8)
at oracle.aurora.server.tools.loadjava.LoadJava.comma nd(LoadJava.java:25
1)
at oracle.aurora.server.tools.loadjava.LoadJavaMain.r un(LoadJavaMain.jav
a:103)
at oracle.aurora.server.tools.loadjava.LoadJavaMain.m ain(LoadJavaMain.ja
va:28)

Dynamic libraries:
0x00400000 - 0x0040B000 D:\oracle\product\10.2.0\db_1\jdk\jre\bin\java.e
xe
0x7C900000 - 0x7C9B0000 C:\WINDOWS\system32\ntdll.dll
0x7C800000 - 0x7C8F5000 C:\WINDOWS\system32\kernel32.dll
0x77DD0000 - 0x77E6B000 C:\WINDOWS\system32\ADVAPI32.dll
0x77E70000 - 0x77F01000 C:\WINDOWS\system32\RPCRT4.dll
0x77C10000 - 0x77C68000 C:\WINDOWS\system32\MSVCRT.dll
0x08000000 - 0x08138000 D:\oracle\product\10.2.0\db_1\jdk\jre\bin\client
\jvm.dll
0x7E410000 - 0x7E4A0000 C:\WINDOWS\system32\USER32.dll
0x77F10000 - 0x77F57000 C:\WINDOWS\system32\GDI32.dll
0x76B40000 - 0x76B6D000 C:\WINDOWS\system32\WINMM.dll
0x76390000 - 0x763AD000 C:\WINDOWS\system32\IMM32.DLL
0x10000000 - 0x10007000 D:\oracle\product\10.2.0\db_1\jdk\jre\bin\hpi.dl
l
0x00390000 - 0x0039E000 D:\oracle\product\10.2.0\db_1\jdk\jre\bin\verify
.dll
0x003B0000 - 0x003C9000 D:\oracle\product\10.2.0\db_1\jdk\jre\bin\java.d
ll
0x003D0000 - 0x003DE000 D:\oracle\product\10.2.0\db_1\jdk\jre\bin\zip.dl
l
0x62F00000 - 0x62F13000 D:\oracle\product\10.2.0\db_1\BIN\ocijdbc10.dll
0x02E70000 - 0x02EC7000 D:\oracle\product\10.2.0\db_1\BIN\OCI.dll
0x7C340000 - 0x7C396000 D:\oracle\product\10.2.0\db_1\BIN\MSVCR71.dll
0x76C90000 - 0x76CB8000 C:\WINDOWS\system32\imagehlp.dll
0x59A60000 - 0x59B01000 C:\WINDOWS\system32\DBGHELP.dll
0x77C00000 - 0x77C08000 C:\WINDOWS\system32\VERSION.dll
0x76BF0000 - 0x76BFB000 C:\WINDOWS\system32\PSAPI.DLL

Heap at VM Abort:
Heap
def new generation total 576K, used 77K [0x10010000, 0x100b0000, 0x104f0000)
eden space 512K, 13% used [0x10010000, 0x10021b20, 0x10090000)
from space 64K, 11% used [0x10090000, 0x10091cd0, 0x100a0000)
to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000)
tenured generation total 1408K, used 243K [0x104f0000, 0x10650000, 0x14010000
)
the space 1408K, 17% used [0x104f0000, 0x1052cdd0, 0x1052ce00, 0x10650000)
compacting perm gen total 4096K, used 2414K [0x14010000, 0x14410000, 0x1801000
0)
the space 4096K, 58% used [0x14010000, 0x1426b810, 0x1426ba00, 0x14410000)

Local Time = Mon Aug 11 12:18:03 2008
Elapsed Time = 0
#
# HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION
# Error ID : 4F530E43505002EF
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_08-b03 interpreted mode)
#
# An error report file has been saved as hs_err_pid2940.log.
# Please refer to the file for further information.
#

D:\oracle\product\10.2.0\db_1\BIN>
Aug 12 '08 #11
I have refered that site.. follwed the steps
1. Creates Class files
2. While loading class files into database, the following errors coming
(My oracle user is kwa and class file is Area.class , which is working fine in java)

D:\oracle\product\10.2.0\db_1\BIN>loadjava -user kwa/kwa Area.class

Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x807
7E76
Function=[Unknown.]
Library=D:\oracle\product\10.2.0\db_1\jdk\jre\bin\ client\jvm.dll

NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.


Current Java thread:
at oracle.jdbc.driver.T2CConnection.t2cCreateState(Na tive Method)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnecti on.java:346)
at oracle.jdbc.driver.PhysicalConnection.<init>(Physi calConnection.java:
413)
at oracle.jdbc.driver.T2CConnection.<init>(T2CConnect ion.java:131)
at oracle.jdbc.driver.T2CDriverExtension.getConnectio n(T2CDriverExtensio
n.java:77)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriv er.java:752)
at java.sql.DriverManager.getConnection(DriverManager .java:512)
- locked <0x141ae178> (a java.lang.Class)
at java.sql.DriverManager.getConnection(DriverManager .java:140)
- locked <0x141ae178> (a java.lang.Class)
at oracle.aurora.server.tools.loadjava.DatabaseOption s.getConnection(Dat
abaseOptions.java:180)
at oracle.aurora.server.tools.loadjava.DatabaseOption s.connect(DatabaseO
ptions.java:123)
at oracle.aurora.server.tools.loadjava.LoadJavaState. getConnection(LoadJ
avaState.java:409)
at oracle.aurora.server.tools.loadjava.LoadJavaState. getOldMD5(LoadJavaS
tate.java:696)
at oracle.aurora.server.tools.loadjava.ClientSchemaOb ject.getOldMD5(Clie
ntSchemaObject.java:52)
at oracle.aurora.server.tools.loadjava.SchemaObject.d oCreate(SchemaObjec
t.java:172)



D:\oracle\product\10.2.0\db_1\BIN>loadjava -user kwa/kwa Area.class

Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x807
7E76
Function=[Unknown.]
Library=D:\oracle\product\10.2.0\db_1\jdk\jre\bin\ client\jvm.dll

NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.


Current Java thread:
at oracle.jdbc.driver.T2CConnection.t2cCreateState(Na tive Method)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnecti on.java:346)
at oracle.jdbc.driver.PhysicalConnection.<init>(Physi calConnection.java:
413)
at oracle.jdbc.driver.T2CConnection.<init>(T2CConnect ion.java:131)
at oracle.jdbc.driver.T2CDriverExtension.getConnectio n(T2CDriverExtensio
n.java:77)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriv er.java:752)
at java.sql.DriverManager.getConnection(DriverManager .java:512)
- locked <0x141ae178> (a java.lang.Class)
at java.sql.DriverManager.getConnection(DriverManager .java:140)
- locked <0x141ae178> (a java.lang.Class)
at oracle.aurora.server.tools.loadjava.DatabaseOption s.getConnection(Dat
abaseOptions.java:180)
at oracle.aurora.server.tools.loadjava.DatabaseOption s.connect(DatabaseO
ptions.java:123)
at oracle.aurora.server.tools.loadjava.LoadJavaState. getConnection(LoadJ
avaState.java:409)
at oracle.aurora.server.tools.loadjava.LoadJavaState. getOldMD5(LoadJavaS
tate.java:696)
at oracle.aurora.server.tools.loadjava.ClientSchemaOb ject.getOldMD5(Clie
ntSchemaObject.java:52)
at oracle.aurora.server.tools.loadjava.SchemaObject.d oCreate(SchemaObjec
t.java:172)
at oracle.aurora.server.tools.loadjava.SchemaObject.p rocess1(SchemaObjec
t.java:215)
at oracle.aurora.server.tools.loadjava.LoadJava.add(L oadJava.java:532)
at oracle.aurora.server.tools.loadjava.LoadJava.addCl ass(LoadJava.java:5
86)
at oracle.aurora.server.tools.loadjava.LoadJava.add(L oadJava.java:436)
at oracle.aurora.server.tools.loadjava.LoadJava.add(L oadJava.java:380)
at oracle.aurora.server.tools.loadjava.LoadJava.add(L oadJava.java:349)
at oracle.aurora.server.tools.loadjava.LoadJava.add(L oadJava.java:652)
at oracle.aurora.server.tools.loadjava.LoadJava.proce ssDeferredFiles(Loa
dJava.java:617)
at oracle.aurora.server.tools.loadjava.LoadJava.proce ss(LoadJava.java:81
8)
at oracle.aurora.server.tools.loadjava.LoadJava.comma nd(LoadJava.java:25
1)
at oracle.aurora.server.tools.loadjava.LoadJavaMain.r un(LoadJavaMain.jav
a:103)
at oracle.aurora.server.tools.loadjava.LoadJavaMain.m ain(LoadJavaMain.ja
va:28)

Dynamic libraries:
0x00400000 - 0x0040B000 D:\oracle\product\10.2.0\db_1\jdk\jre\bin\java.e
xe
0x7C900000 - 0x7C9B0000 C:\WINDOWS\system32\ntdll.dll
0x7C800000 - 0x7C8F5000 C:\WINDOWS\system32\kernel32.dll
0x77DD0000 - 0x77E6B000 C:\WINDOWS\system32\ADVAPI32.dll
0x77E70000 - 0x77F01000 C:\WINDOWS\system32\RPCRT4.dll
0x77C10000 - 0x77C68000 C:\WINDOWS\system32\MSVCRT.dll
0x08000000 - 0x08138000 D:\oracle\product\10.2.0\db_1\jdk\jre\bin\client
\jvm.dll
0x7E410000 - 0x7E4A0000 C:\WINDOWS\system32\USER32.dll
0x77F10000 - 0x77F57000 C:\WINDOWS\system32\GDI32.dll
0x76B40000 - 0x76B6D000 C:\WINDOWS\system32\WINMM.dll
0x76390000 - 0x763AD000 C:\WINDOWS\system32\IMM32.DLL
0x10000000 - 0x10007000 D:\oracle\product\10.2.0\db_1\jdk\jre\bin\hpi.dl
l
0x00390000 - 0x0039E000 D:\oracle\product\10.2.0\db_1\jdk\jre\bin\verify
.dll
0x003B0000 - 0x003C9000 D:\oracle\product\10.2.0\db_1\jdk\jre\bin\java.d
ll
0x003D0000 - 0x003DE000 D:\oracle\product\10.2.0\db_1\jdk\jre\bin\zip.dl
l
0x62F00000 - 0x62F13000 D:\oracle\product\10.2.0\db_1\BIN\ocijdbc10.dll
0x02E70000 - 0x02EC7000 D:\oracle\product\10.2.0\db_1\BIN\OCI.dll
0x7C340000 - 0x7C396000 D:\oracle\product\10.2.0\db_1\BIN\MSVCR71.dll
0x76C90000 - 0x76CB8000 C:\WINDOWS\system32\imagehlp.dll
0x59A60000 - 0x59B01000 C:\WINDOWS\system32\DBGHELP.dll
0x77C00000 - 0x77C08000 C:\WINDOWS\system32\VERSION.dll
0x76BF0000 - 0x76BFB000 C:\WINDOWS\system32\PSAPI.DLL

Heap at VM Abort:
Heap
def new generation total 576K, used 77K [0x10010000, 0x100b0000, 0x104f0000)
eden space 512K, 13% used [0x10010000, 0x10021b20, 0x10090000)
from space 64K, 11% used [0x10090000, 0x10091cd0, 0x100a0000)
to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000)
tenured generation total 1408K, used 243K [0x104f0000, 0x10650000, 0x14010000
)
the space 1408K, 17% used [0x104f0000, 0x1052cdd0, 0x1052ce00, 0x10650000)
compacting perm gen total 4096K, used 2414K [0x14010000, 0x14410000, 0x1801000
0)
the space 4096K, 58% used [0x14010000, 0x1426b810, 0x1426ba00, 0x14410000)

Local Time = Mon Aug 11 12:18:03 2008
Elapsed Time = 0
#
# HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION
# Error ID : 4F530E43505002EF
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_08-b03 interpreted mode)
#
# An error report file has been saved as hs_err_pid2940.log.
# Please refer to the file for further information.
#

D:\oracle\product\10.2.0\db_1\BIN>
If any one face this error, pl respond....
Aug 13 '08 #12

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Hubert Baumeister | last post: by
13 posts views Thread by mitchellpal | last post: by
3 posts views Thread by cberthu | last post: by
9 posts views Thread by CryptiqueGuy | last post: by
12 posts views Thread by Rahul | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.