Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old August 11th, 2008, 06:30 AM
Newbie
 
Join Date: Aug 2008
Posts: 8
Default 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
Reply
  #2  
Old August 11th, 2008, 06:52 AM
Administrator
 
Join Date: Sep 2006
Posts: 11,312
Default

Javascript != Java.
Which one do you want to call?
Reply
  #3  
Old August 11th, 2008, 08:28 AM
Newbie
 
Join Date: Aug 2008
Posts: 8
Default

Quote:
Originally Posted by r035198x
Javascript != Java.
Which one do you want to call?
First preferance - java script if not possible then java class
Reply
  #4  
Old August 11th, 2008, 03:10 PM
Administrator
 
Join Date: Sep 2006
Posts: 11,312
Default

Quote:
Originally Posted by beenanic
First preferance - java script if not possible then java class
Are we talking about Java stored procedures here?
Reply
  #5  
Old August 12th, 2008, 07:33 AM
Newbie
 
Join Date: Aug 2008
Posts: 8
Default

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
Reply
  #6  
Old August 12th, 2008, 08:07 AM
Administrator
 
Join Date: Sep 2006
Posts: 11,312
Default

Quote:
Originally Posted by beenanic
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?
Reply
  #7  
Old August 12th, 2008, 10:46 AM
Newbie
 
Join Date: Aug 2008
Posts: 8
Default

Quote:
Originally Posted by r035198x
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.
Reply
  #8  
Old August 12th, 2008, 11:01 AM
Administrator
 
Join Date: Sep 2006
Posts: 11,312
Default

Quote:
Originally Posted by beenanic
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?
Reply
  #9  
Old August 12th, 2008, 11:07 AM
Newbie
 
Join Date: Aug 2008
Posts: 8
Default

Quote:
Originally Posted by r035198x
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?
Reply
  #10  
Old August 12th, 2008, 11:25 AM
Administrator
 
Join Date: Sep 2006
Posts: 11,312
Default

See if this
helps.
Reply
  #11  
Old August 12th, 2008, 12:14 PM
Newbie
 
Join Date: Aug 2008
Posts: 8
Default

Quote:
Originally Posted by r035198x
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>
Reply
  #12  
Old August 13th, 2008, 07:21 AM
Newbie
 
Join Date: Aug 2008
Posts: 8
Default

Quote:
Originally Posted by beenanic
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....
Reply
Reply

Bookmarks

Thread Tools

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 Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles