Loadjava command

Hi
I am trying to load a java file into database but when i try to give the command from command prompt the following appears.
C:\>loadjava -user abc/abc@xyz c:\abc.java
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-showversion print product version and continue
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
it means that i am getting java properties , instead of getting loadjava properties.
My environment variable settings are as follows
Path is set as follows
C:\Program Files\Java\jdk1.5.0_09\bin\;C:\Oracle\product\10.1.0\Client_2\bin;C:\Oracle\product\10.1.0\Client_2\jre\1.4.2\bin\client;C:\Oracle\product\10.1.0\Client_2\jre\1.4.2\bin;C:\Perl\bin\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Rational\ClearCase\bin;C:\Program Files\Rational\common;
how to resolve the problem, any suggestion.Thanks in advance

Hi,
Try using the full path of the loadjava command (i.e., oracle/bin/loadjava.xxx -- where xxx = bat or sh).
Kuassi

Similar Messages

  • Help - loadjava command for Stored Procedures

    Hello,
    I'm trying to load a java class onto Oracle 8i. When I use the
    loadjava command I get an error as follows:
    C:\project>loadjava -user student/learn -resolve -force
    StoredProcedures.class
    The system cannot find the path specified.
    I assume my environment variables are off. Does anyone know how
    to correct this? Thanks for your help!!

    Here is the command we use:
    loadjava -u userid/password@HOST:PORT:SID -t -v -r
    javaclasses.zip
    Linda

  • Getting error : Jre not found when using Loadjava command

    Hi folks,
    I am getting an error when I run the below load java command on a 9.2.0.8 database on Sun/Solaris platform.
    Command:
    loadjava -user user/[email protected]:1529:OLS2 -thin -force -resolve -verbose filename.jar
    Error:
    /olcdbt/u01/app/oracle/product/9.2.0.8/bin/loadjava: /olcdbt/u01/app/oracle/product/9.2.0.8/jdk/jre/bin/jre: not found
    When I tried creating a new Jre soft link from $ORACLE_HOME/bin like : 'ln -s $ORACLE_HOME/jdk/jre/bin/java $ORACLE_HOME/jdk/jre/bin/jre' its giving a new error:
    jre was not found in /olcdbt/u01/app/oracle/product/9.2.0.8/jdk/jre/bin/../bin/sparc/native_threads/jre
    Strange thing here is that this was working fine in 9206 home and after upgrading to 9208 1 month back I am facing this issue. I am sure I am missing something here but not sure what.. Please help me resolve this issue.
    Regards,
    Raji.

    Dear my collegue, the best place to ask this question is JVM forum.
    Java in the Oracle Database

  • Jre not found when using Loadjava command

    Hello,
    I am getting an error when I run the below load java command on a 9.2.0.8 database on Sun/Solaris platform.
    Command:
    loadjava -user user/[email protected]:1529:OLS2 -thin -force -resolve -verbose filename.jar
    Error:
    /olcdbt/u01/app/oracle/product/9.2.0.8/bin/loadjava: /olcdbt/u01/app/oracle/product/9.2.0.8/jdk/jre/bin/jre: not found
    When I tried creating a new Jre soft link from $ORACLE_HOME/bin like : 'ln -s $ORACLE_HOME/jdk/jre/bin/java $ORACLE_HOME/jdk/jre/bin/jre' its giving a new error:
    jre was not found in /olcdbt/u01/app/oracle/product/9.2.0.8/jdk/jre/bin/../bin/sparc/native_threads/jre
    Strange thing here is that this was working fine in 9206 home and after upgrading to 9208 1 month back I am facing this issue. I am sure I am missing something here but not sure what.. Please help me resolve this issue.
    Regards,
    Raji.

    Hi,
    Even though the problem manifests when using loadjava, it has noting to do with the embedded Java VM in the database; it's rather an install /upgrade problem.
    Perhaps the followinf post can help: http://64.233.167.104/search?q=cache:h3XhGo2kZaYJ:forums.oracle.com/forums/thread.jspa%3FthreadID%3D43105+site:oracle.com+%22JRE+not+found%22&hl=en&ct=clnk&cd=9&gl=us
    Kuassi http://db360.blogspot.com

  • Error while executing the LOADJAVA command.

    Hi everybody,
    I am trying to load the following jar files:
    loadjava -u uname/pwd@DRDEV XXX.jar
    olite40.jar
    wsclient.jar
    orabpel-ant.jar
    ojdbc14.jar
    orabpel-boot.jar
    orabpel-common.jar
    orabpel-thirdparty.jar
    orabpel.jar
    bpm-services.jar
    soap.jar
    orasaaj.jar
    xml.jar
    oc4jclient.jar
    jazncore.jar
    bpm-infra.jar
    xmlparserv2.jar
    It is giving an error that it could not refernce some other classes and loading only those classes with valid state which are not importing any other classes unavailable in the databse...in what order should I loasd them..or is there any way I could load them with looking for dependencies.
    Thanks
    Krrish

    loadjava relies on a correct JAVACLASSPATH environment variable.
    Other than that, this very much looks like a BPEL question, and this will probably have it's own forum. Various products require emendations to the standard JAVACLASSPATH.
    Sybrand Bakker
    Senior Oracle DBA

  • Error in using the command "loadjava"(help me !)

    When I use "loadjava" command to load the sample source code of
    XML SQL Utility for Java,the errors as below:
    C:>loadjava -u system/manager -v -r -t samp1.java
    internal error:unanticipated
    exeption:java.lang.NoClassDefFoundError:
    oracle/aurora/sqljdecl/SqljDecl
    java.lang.NoClassDefFoundError:
    oracle/aurora/sqljdecl/SqljDecl
    at oracle.aurora.server.tools.SourceFileReader.getScanner
    (SourceFileReader.java:52)
    at oracle.aurora.server.tools.SourceFileReader.getFirstName
    (SourceFileReader.java:61)
    at oracle.aurora.server.tools.LoadJava.processLoadAndCreate
    (LoadJava.java:1094)
    at oracle.aurora.server.tools.LoadJava.process
    (LoadJava.java:1021)
    at oracle.aurora.server.tools.LoadJavaMain.run
    (LoadJavaMain.java:193)
    at oracle.aurora.server.tools.LoadJavaMain.main
    (LoadJavaMain.java:49)resolvers:
    loadjava :1 errors
    C:>
    I looked for the class "oracle/aurora/sqljdecl/SqljDecl"
    by executing the SQL query as below:
    "select object_name from user_objects
    where object_name like oracle%"
    But I found only "oracle/aurora/sqljdecl/Token".
    Maybe my envirenment have some errors(I get Oracle8i from
    oracle's home by downloading)
    I can't find out the reason.This matter have troubled me for a
    long time.
    Does anyone know the reason?please tell me.thanks a lot.
    null

    plz help me !!!!!

  • "loadjava" is unknow command in SQL*Plus (Oracle8i)

    I am attempting to laod a java class in the database but when I type the command "loadjava" the SQL*Plus prompt indicates this is an unknown command. Is there a configuration problem I should address with the DBA?

    Chris,
    If you want the loadjava command, it's outside the database (a batch file if you're Windows). The other option is the CREATE OR REPLACE JAVA example I told you about in an earlier thread.
    Hope this helps,
    -Dan
    http://www.compuware.com/products/devpartner/db/oracle_debug.htm
    Debug PL/SQL and Java in the Oracle Database

  • Problem in loadjava using sys account

    Hello
    When I load a jar file into the database using loadjava command using sys account like
    loadjava -user sys/<password> -resolve -order weblogic.jar
    it gave the following error
    loading : oracle/jdbc/driver/OracleResultSetCache
    creating : oracle/jdbc/driver/OracleResultSetCache
    Error while creating class oracle/jdbc/driver/OracleResultSetCache
    ORA-01031: insufficient privileges
    I have seen in the table that sys account has the right to loadclassinpackage oracle.jdbc.*.
    Please tell me what is the error and how can I rectify the error.
    Prashant

    Prashant,
    If I'm not mistaken, this is exactly the same question as you
    posted 10 minutes earlier -- but with a different title. The title
    of the earlier question is...
    calling EJB installed on weblogic from PL/SQL
    Is there a reason why you did this?
    Anyway, seeing as I'm sure this is the same as your previous question,
    I suggest you look at the answer I gave to that question -- it will
    probably be relevant to this question {;-)
    Good Luck,
    Avi.

  • Error while loading the jar file using loadjava

    Hi,
    I'm trying to load a jar file in to a database through the loadjava utility. First time when i loaded a jar file it created few public synonyms with /'s. like /5b3d7f97_BeanInfoIndexer.
    Now i want to drop these synonyms before i reload the jar file with loadjava.
    If i use DROP PUBLIC SYNONYM /5b3d7f97_BeanInfoIndexer; it gives the following error...
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    I wonder how to drop these synonyms. I have to drop all these synonyms to freshly load the jar file.
    Thanks
    Shiva

    You can include the synonym names in double quotes in the drop synonym command. But it is not a good idea to drop the synonyms(which have been created by loadjava) using drop synonym command. Instead, you can use dropjava command which will automatically drop all the synonyms created by the loadjava command.

  • Issues with loadjava utility on oracle database 10.2.0.4.0

    Hi all
    Hoping if this is a known issue, am approaching you here .. We have an oracle database in 10.2.0.4.0 version. This database functionality of Websphere Process Server, a product from IBM. In the course we are expected to load a JAR file for a one schema and it fails for some reason with ORA - 07445 errors. I happen to set out SGA_MAX_SIZE and SGA_TARGET at 1024 MB and JAVA_POOL_SIZE at 768MB to allow this loadjava command to run successfully. I also happen to set the LD_LIBRARY_PATH as $ORACLE_HOME/lib on this solaris 10 machine. Below is the command and the error message we are receiving. Please do advice us if this is a known issue or guide us to any information which might help us resolve this issue while we continue searching for a solution.. Many thanks in advance.
    Regards!
    Sarat
    loadjava -user BPCDB/[email protected]:1521:WPSDB -resolve /opt/IBMProc/WebSphere/ProcServer/lib/bpcodbutil.jar -thin -schema BPCDB
    Error while testing for existence of dbms_java.handleMd5
    No more data to read from socket
    Error while testing for existence of "BPCDB".JAVA$CLASS$MD5$TABLE
    OALL8 is in an inconsistent state
    Error while testing for existence of "BPCDB".JAVA$CLASS$MD5$TABLE
    OALL8 is in an inconsistent state
    Error while creating "BPCDB".JAVA$CLASS$MD5$TABLE
    No more data to read from socket
    Error while getting old MD5 of META-INF/MANIFEST.MF
    Io exception: Broken pipe
    Error while testing for existence of "BPCDB".CREATE$JAVA$LOB$TABLE
    Closed Connection
    Error while testing for existence of "BPCDB".CREATE$JAVA$LOB$TABLE
    Closed Connection
    Error while creating "BPCDB".CREATE$JAVA$LOB$TABLE
    Closed Connection
    Error while getLoadLOB BPCDB
    Closed Connection
    Error while deleting MD5 of META-INF/MANIFEST.MF
    Closed Connection
    Error while getting old MD5 of com/ibm/bpe/observer/dbutil/TimestampUtil
    Closed Connection
    Error while processing com/ibm/bpe/observer/dbutil/TimestampUtil
    Exception java.lang.NullPointerException
    Error while deleting MD5 of META-INF/MANIFEST.MF
    Closed Connection
    Error while getShortFromLongnameStmt
    Closed Connection
    Error while processing class BPCDB.com/ibm/bpe/observer/dbutil/TimestampUtil
    Exception java.lang.NullPointerException
    Error while getShortFromLongnameStmt
    Closed Connection
    Exception in thread "main" java.lang.NullPointerException
    at oracle.aurora.server.tools.loadjava.ClientSchemaObject.getShortname(C
    lientSchemaObject.java:65)
    at oracle.aurora.server.tools.loadjava.ClientSchemaObject.status(ClientS
    chemaObject.java:91)
    at oracle.aurora.server.tools.loadjava.SchemaObject.failure(SchemaObject
    .java:799)
    at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:85
    1)
    at oracle.aurora.server.tools.loadjava.LoadJava.command(LoadJava.java:25
    1)
    at oracle.aurora.server.tools.loadjava.LoadJavaMain.run(LoadJavaMain.jav
    a:103)
    at oracle.aurora.server.tools.loadjava.LoadJavaMain.main(LoadJavaMain.ja
    va:28)
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    ORA-07445 is an untrapped exception, an error, in Oracle's own code.
    Open an SR at metalink and update an RDA along with your description of what happened.

  • Loadjava protocol adapter error

    Hello all,
    I am developing a program using Java Stored Procedures with Oracle 9.2.0.1 using an oracle client and am having difficulty with the loadjava utility.
    When attempting to load a class using loadjava I get unresolvable errors no matter what driver I use (thin, oci, oci8). When using the oci or oci8 drivers I get a "protocol adapter" error. When I use the thin driver I get a "null username or password" error even though I specify the username/password in the call.
    These are the messages I am receiving through the DOS command prompt:
    //using OCI8
    P:\&gt;loadjava -v -user username\password HiThere.class
    arguments: '-v' 'user' 'username\password' 'HiThere.class'
    SQL Error while connecting with oci8 driver to default database: ORA-12560: TNS:
    protocol adapter error
    //specifying OCI
    P:\&gt;loadjava -v -user username\password -oci HiThere.class
    arguments: 'v' 'user' 'username\password' 'oci' 'HiThere.class'
    SQL Error while connecting with oci8 driver to default database: ORA-12560: TNS:
    protocol adapter error
    //using thin driver
    P:\&gt;loadjava -v -thin -user username\[email protected]:1521:cnfi HiThere.
    class arguments: '-v' '-thin' '-user' 'username\[email protected]:1521:cnfi' 'H
    iThere.class'
    SQL Error while connecting with thin driver to gaia.nfis.org:1521:cnfi: Null user or password not supported in THIN driver
    exiting : could not open connection
    I can connect to the database using a JDBC connection and the thin driver but have no idea how to get the loadjava command using the thin driver to use the username\password that I provide instead of saying that there cannot be a null username\password.
    Any suggestions on how I can get loadjava to connect to Oracle would be much appreciated.
    Thankyou,
    Matt
    ps: I am also having difficulties using the dbms_java.loadjava utility using SQL*Plus (java.security.AccessControlException) which might be resolved through my DBA.

    Matt,
    This is just a guess, but try using a forward slash ("/") instead of a backslash ("\"), to separate the "username" from the "password", as in:
    loadjava -v -thin -user username/[email protected]:1521:cnfi HiThere.classGood Luck,
    Avi.

  • Loadjava with end-of-file on communication channel

    Hello,
    I have a job that needs to load all the OIM jar files in the lib/ and ext/ directories into the database.
    The majority of the jar files got loaded fine. However, some of them would result in the following error:
    resolving: class com/thortech/xl/security/wl/XellerateAuthenticationProviderImpl
    Error while resolving com/thortech/xl/security/wl/XellerateAuthenticationProviderImpl
    ORA-03113: end-of-file on communication channel
    This was for the xlAuthentication.jar file in the lib directory.
    I was trying to load them in a oracle 10g db on my laptop. The loadjava command I used is as follows:
    loadjava -user username/pwd@SID -v -resolve -genmissing filename.jar
    Please let me know how you fixed this if you ran into it before.
    Thanks

    Ashok,
    a) Full Database version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
    b) OS, MS Windows XP
    c) I am trying to reproduce the errors so I can post the log, but I have not been successful. I reloaded the jars that caused an error end-of-file on communication channel. The error disappeared completely for some jars. For other jars, I got cannot resolve due to class not found error.
    There is one more jar that I would like to try reloading, which is the weblogic.jar. The last time I tried to load it, it ran for a day and half.
    I'll try loading weblogic.jar and let you know how it goes.
    Thanks

  • Loadjava mysql jdbc - error

    Hi!
    I´m Trying to load the mysql connector into oracle database.
    I create a package to connect to mysql and all that is missing is the jdbc driver.
    So i executed loadjava, but i´m getting the error bellow. Can anyone help me?
    Oracle database 10g
    arguments: '-u' 'vendas/***@idev10g' '-v' '-resolve' '/ora10g/app/oracle/product/10.2.0/db_1/jlib/mysql-connector-java-5.1.12.jar'
    dropped  : JAVA$CLASS$MD5$TABLE
    Exception in thread "main" java.lang.UnsatisfiedLinkError: getClassContext
            at com.ibm.jvm.classloader.ClassLoaderUtils.getLastClassLoader(ClassLoaderUtils.java:38)
            at java.security.Provider.loadProvider(Provider.java:209)
            at java.security.Security$2.run(Security.java:434)
            at java.security.AccessController.doPrivileged1(Native Method)
            at java.security.AccessController.doPrivileged(AccessController.java:351)
            at java.security.Security.getProviderAt(Security.java:431)
            at java.security.Security.getAlgClassName(Security.java:583)
            at java.security.Security.getAlgClassName(Security.java:637)
            at java.security.Security.getImpl(Security.java:1118)
            at java.security.MessageDigest.getInstance(MessageDigest.java:135)
            at oracle.aurora.server.tools.loadjava.SchemaObject.MD5OfStream(SchemaObject.java:730)
            at oracle.aurora.server.tools.loadjava.SchemaObject.getNewMD5(SchemaObject.java:418)
            at oracle.aurora.server.tools.loadjava.SchemaObject.doCreate(SchemaObject.java:174)
            at oracle.aurora.server.tools.loadjava.SchemaObject.process1(SchemaObject.java:215)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:548)
            at oracle.aurora.server.tools.loadjava.LoadJava.addObject(LoadJava.java:529)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:467)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:396)
            at oracle.aurora.server.tools.loadjava.LoadJava.addJar(LoadJava.java:743)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:448)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:396)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:365)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:668)
            at oracle.aurora.server.tools.loadjava.LoadJava.processDeferredFiles(LoadJava.java:633)
            at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:834)
            at oracle.aurora.server.tools.loadjava.LoadJava.command(LoadJava.java:267)
            at oracle.aurora.server.tools.loadjava.LoadJavaMain.run(LoadJavaMain.java:164)
            at oracle.aurora.server.tools.loadjava.LoadJavaMain.main(LoadJavaMain.java:89)

    I solved it.
    I had to increase the java pool memory (first time i run the server complained about it) and then load the mysql jdbc driver executing in sqlplus:
    dbms_java.loadjava('path to jdbc driver file');
    When executing from console, the loadjava command require extra information (LD_LIBRARY_PATH etc) giving the error i mention above.
    Executing from sqlplus it is all set.

  • Loadjava error witth IFs classes

    I try to do a Java Store Procedure, this procedure use a IFs classes
    ===
    import oracle.ifs.adk.user.UserManager;
    import oracle.ifs.common.AttributeValue;
    import oracle.ifs.beans.DirectoryUser;
    import oracle.ifs.common.IfsException;
    import java.util.Hashtable;
    ===
    but when i try to use loadjava command this errors apears
    =====
    IFSUser:5: Class oracle.ifs.adk.user.UserManager not found in import.
    IFSUser:6: Class oracle.ifs.common.AttributeValue not found in import.
    IFSUser:7: Class oracle.ifs.beans.DirectoryUser not found in import.
    IFSUser:8: Class oracle.ifs.common.IfsException not found in import.
    ====
    How Can i register the IFs clases into the database JVM?

    Its a long procedure to do so. Read the Oracle 8i Java Stored Procedures Developer's Guide for details.

  • Loadjava versus DBMS_JAVA

    Is there any difference wich method to use when loading java to a database - loadjava utility or DBMS_JAVA package?
    When it is better to put all the jars to the server, and use DBMS_JAVA instead of loading directly from a client PC using loadjava utility?
    For example in the JSSE use case (http://www.oracle.com/technology/tech/java/jsp/pdf/JavaDB_Use_Case.pdf) for a Oracle 8i, to load JSSE libs they are using loadjava, but to complete the same task in a Oracle 9iR2, they suggest putting libraries directly to the server and then using DBMS_JAVA.
    Could anybody describe why is it so?

    Hi, I have very different behaviour between loadjava command line tool and the dbms_java.loadjava function. By the command line all the .jar-files are loaded both on the local database and also on a remote database. But any try loading the same files with CALL dbms_java.loadjava( '...') is failing, however differently on the local and the remote database. Locally, there is no exception, but only a warning, the .jar-file would be empty, what is definitely wrong. But in fact no Java classes are loaded. The same call to a remote database leads to an error:
    Error while opening file: C:\apache-tomcat-5.5.25\temp\DatSec15888_install\activation.jar
    Exception java.io.FileNotFoundException: No such file or directory
    [from .trc-file]
    and:
    java.sql.SQLException: ORA-29532: Java-Aufruf durch nicht abgefangene Java-Excep
    tion beendet: oracle.aurora.server.tools.loadjava.ToolsError: Error during loadj
    ava: Failures occurred during processing. Check trace file for details
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
    :145)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:210)
    at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1126
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
    nt.java:1311)
    at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatem
    ent.java:1909)
    at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java
    :1878)
    [from tomcat-log]
    The platform is WinXP SP2. Oracle Version: Database 10g Enterprise Edition Release 10.2.0.1.0 - Production.
    I'd appreciate any hint, what is going wrong with the usage of the DBMS_JAVA package, because I don't see any other way to load java from a java application running in a servlet engine.

Maybe you are looking for