Java Class loaded in Database.

hi
I have loaded a Java class into Oracle 8.1.6 database. I have created a procedure (call spec) for calling a method in that class.
It takes 3 parameters (Server ip address, From,To). Actually the purpose of the program is to take parameters and send mails
The Java program uses JavaMail. I have loaded all classes required and the class shows status as valid. When I try to execute the method through a pl/sql procedure it gives the following error.
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.security.AccessControlException: the Permission
(java.util.PropertyPermission * read,write) has not been granted by
dbms_java.grant_permission to
SchemaProtectionDomain(SANTOSH|PolicyTableProxy(SANTOSH))
ORA-06512: at "SANTOSH.SENDMAIL", line 0
ORA-06512: at line 2
In Dbms_java package there is nothing called grant_permission .
What may have gone wrong ???
Thanks

Maybe you should grant JAVASYSPRIV and JAVAUSERPRIV privilege to your db user
first.
Good luck!
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Santosh Nair ([email protected]):
hi
I have loaded a Java class into Oracle 8.1.6 database. I have created a procedure (call spec) for calling a method in that class.
It takes 3 parameters (Server ip address, From,To). Actually the purpose of the program is to take parameters and send mails
The Java program uses JavaMail. I have loaded all classes required and the class shows status as valid. When I try to execute the method through a pl/sql procedure it gives the following error.
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.security.AccessControlException: the Permission
(java.util.PropertyPermission * read,write) has not been granted by
dbms_java.grant_permission to
SchemaProtectionDomain(SANTOSH|PolicyTableProxy(SANTOSH))
ORA-06512: at "SANTOSH.SENDMAIL", line 0
ORA-06512: at line 2
In Dbms_java package there is nothing called grant_permission .
What may have gone wrong ???
Thanks<HR></BLOCKQUOTE>
null

Similar Messages

  • Load java class into the database 10g

    Hi ,
    We have a program which creates pdf files by using bi publisher.for this program we r using some java package to create a directory in unix whenever invoiceprint program runs.
    Now i need to load this class into database,so how can i load this class into database.
    I got some samples and docs from google but i was confused with those wether i should load from Oracle/applmgr user.
    So Could any one please tell me how can i load java class into oracle database.
    I am verymuch thankful for your kind help.Its an emergency issue for me.
    Thanks,
    YMR

    Hi,
    http://www.oracle-training.cc/teas_elite_util9.htm
    SS

  • Java Class Loading.

    I know that the primordial, default java class loader may be re-written and replaced for the java runtime environment,
    so that it uses the new one.
    However, I have also heard the replacement is not entire; the replacement loader is always saught out by the original,
    "primordial" class loader.
    -Is this true?
    The java language and runtime does furnish the developer to program their own class loader and tell
    the runtime to use that.
    -Within the java language, is it possible to recreate the .class file bytecode read by java to load
    user defined classes from the Class reference on an object? Does serialization allow this?
    -If so, is there a secure way, within one's own program, to specify an option forbidding the user to replace
    the default class loader within the runtime instance of a program, which may not be further
    abragated within the java language in another runtime instance?

    -Is this true?It doesn't even make sense. If the 'primordial class loader' has been replaced how can it do anything at all? Either it isn't replaced or it is. What do your sources actually say?
    -Within the java language, is it possible to recreate the .class file bytecode read by java to load
    user defined classes from the Class reference on an object?No, you ultimately have to call one of the defineClass() methods, which are final.
    Does serialization allow this?No.
    -If so, is there a secure way, within one's own program, to specify an option forbidding the user to replace
    the default class loader within the runtime instance of a program, which may not be further
    abragated within the java language in another runtime instance?The Security Manager can prevent the application from creating class loaders.

  • How to generate the java classes of the database tables

    Hi,
    I am using Sun One 4 update1 CE for generate java classes of tables from an Oracle database. I have got the database schema file. However, when I right clicked on the database schema file, there is no selection for "Generate Java...".
    Besides, when I was trying to use database Schema template from the project tab in the explore window by double click on the project, after following all the procedures of inputing the database url, driver, uername, password, and select the table to generate, the following exception came out:
    Tue Jan 28 16:22:28 PST 2003: java.lang.NullPointerException: Posted StackTrace
    Annotation: Exception occurred in Request Processor
    org.openide.util.RequestProcessor$Holder: Posted StackTrace(task org.netbeans.core.ModuleActions$1@e4b7d3 [-31035, 1, -1])
    at org.openide.util.RequestProcessor$Holder.fillInStackTrace(RequestProcessor.java:300)
    at java.lang.Throwable.<init>(Throwable.java:195)
    at java.lang.Exception.<init>(Exception.java:41)
    at org.openide.util.RequestProcessor$Holder.<init>(RequestProcessor.java:280)
    at org.openide.util.RequestProcessor$Task.createHolder(RequestProcessor.java:333)
    at org.openide.util.RequestProcessor.post(RequestProcessor.java:100)
    at org.openide.util.RequestProcessor.post(RequestProcessor.java:73)
    at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:123)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.openide.explorer.view.TreeView.invokeAction(TreeView.java:878)
    at org.openide.explorer.view.TreeView$PopupSupport.mouseClicked(TreeView.java:958)
    at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:208)
    at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:207)
    at java.awt.Component.processMouseEvent(Component.java:5096)
    at java.awt.Component.processEvent(Component.java:4890)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3174)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
    at java.awt.Container.dispatchEventImpl(Container.java:1609)
    at java.awt.Window.dispatchEventImpl(Window.java:1585)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    Tue Jan 28 16:22:28 PST 2003: java.lang.NullPointerException: <no message>
    java.lang.NullPointerException
    at org.netbeans.modules.projects.ProjectDataObject.add(ProjectDataObject.java:204)
    at org.netbeans.modules.projects.AddNewAction.performAction(AddNewAction.java:88)
    at org.openide.util.actions.NodeAction.actionPerformed(NodeAction.java:167)
    at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:105)
    at org.openide.util.Task.run(Task.java:152)
    [catch] at org.openide.util.RequestProcessor$ProcessorThread.run(RequestProcessor.java:622)
    Any suggestions to the solution of these problems are greatly appreciated. Thanks.
    Yi-Xiong

    you also could use this to generate java beans out of database tables:
         * Convert SQL type code to corresponding Java class.
         * @param sqlType One of java.sql.Types.xxx.
         * @return Class that corresponds to the given type.
        public static Class toClass(int sqlType) {
            Class result = null;
            switch (sqlType) {
            case Types.BIGINT :
            case Types.INTEGER :
            case Types.SMALLINT :
            case Types.TINYINT :
                result = Integer.class;
                break;
            case Types.BIT :
            case Types.BOOLEAN :
                result = Boolean.class;
                break;
            case Types.CHAR :
                result = Character.class;
                break;
            case Types.DATE :
            case Types.TIMESTAMP :
                result = java.util.Date.class;
                break;
            case Types.DECIMAL :
            case Types.DOUBLE :
            case Types.FLOAT :
                result = BigDecimal.class;
                break;
            case Types.NULL :
                result = null;
                break;
            case Types.LONGVARCHAR :
            case Types.VARCHAR :
            default :
                result = String.class;
                break;
            return result;
        }//toClass()
         * Create a Java bean (source file) to map a database table. The class name is the table name, the bean
         * properties are the table columns. Each column will result in a property with a corresponding set() and
         * get() method.
         * @param connection Database connection to load table from.
         * @param tableName Name of table to create the bean for.
         * @param packageName Name of package for Java class.
         * @param className Name of Java class to create.
         * @param superClass Optional name of super class.
         * @return Java source of container class.
         * @throws SQLException, IOException
         * @see <a href="http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html">Data Access Object </a>
        public static String getTableBean(Connection connection, String tableName, String packageName, String className, String superClass)
                throws SQLException, IOException {
            String result = null;
            if (connection != null && tableName != null) {
                //read table columns:
                DatabaseMetaData dmd = connection.getMetaData();
                ResultSet resultSet = dmd.getColumns(null, "%", tableName, null);
                Properties props = new Properties();
                if (resultSet != null) {
                    while (resultSet.next()) { //for each table
                        String name = resultSet.getString("COLUMN_NAME");
                        int type = resultSet.getInt("DATA_TYPE");
                        props.setProperty(name, ""+type);
                    }//next table
                }//else: resultSet unavailable
                Set imports = new HashSet();
                StringBuffer sb1 = new StringBuffer(); //fields
                StringBuffer sb2 = new StringBuffer(); //methods
                StringBuffer sb3 = new StringBuffer(); //toString()
                Enumeration enum = props.keys();
                while (enum.hasMoreElements()) {
                    String columnName = (String) enum.nextElement();
                    //change first character of column name to lower case:
                    String fieldName = columnName.substring(0, 1).toLowerCase() + columnName.substring(1);
                    //datat type:
                    String stype = props.getProperty(columnName, ""+Types.VARCHAR);
                    int type = (new Integer(stype)).intValue();
                    Class javaClass = toClass(type);
                    String typeName = "String"; //default
                    if (javaClass != null) {
                        String javaClassName = javaClass.getName();
                        int lastDot = javaClassName.lastIndexOf('.');
                        if (lastDot >= 0) {
                            typeName = javaClassName.substring(lastDot + 1);
                        if (!javaClassName.startsWith("java.lang.")) {
                            imports.add(javaClassName);
                    //field:
                    sb1.append("    /** ");
                    sb1.append(columnName);
                    sb1.append(" */\n");
                    sb1.append("    private ");
                    sb1.append(typeName);
                    sb1.append(" ");
                    sb1.append(fieldName);
                    sb1.append(" = null;\n");
                    //toString() method:
                    sb3.append("        sb.append(\",");
                    sb3.append(fieldName);
                    sb3.append("=\");\n");
                    sb3.append("        sb.append(");
                    sb3.append(fieldName);
                    sb3.append(");\n");
                    //set method:
                    sb2.append("    /**\n");
                    sb2.append("     * Set ");
                    sb2.append(columnName);
                    sb2.append(".\n     *\n     * @param value ");
                    sb2.append(columnName);
                    sb2.append(" to set.\n");
                    sb2.append("     */\n");
                    sb2.append("    public void set");
                    sb2.append(columnName);
                    sb2.append("(");
                    sb2.append(typeName);
                    sb2.append(" value) {\n        ");
                    sb2.append(fieldName);
                    sb2.append(" = value;\n    }\n\n");
                    //get method:
                    sb2.append("    /**\n");
                    sb2.append("     * Get ");
                    sb2.append(columnName);
                    sb2.append(".\n     *\n     * @return ");
                    sb2.append(columnName);
                    sb2.append(".\n     */\n");
                    sb2.append("    public ");
                    sb2.append(typeName);
                    sb2.append(" get");
                    sb2.append(columnName);
                    sb2.append("() {\n");
                    sb2.append("        return ");
                    sb2.append(fieldName);
                    sb2.append(";\n    }\n\n");
                }//next column
                //build class source code:
                StringBuffer sb = new StringBuffer();
                sb.append("/* $Header: /data/iComps/icf/prg/java/src/de/icomps/sql/JDBCUtils.java 9     24.10.03 14:25 Hilpert $ */\n");
                sb.append("package ");
                sb.append(packageName);
                sb.append(";\n\n");
                //import statements:
                Iterator iterator = imports.iterator();
                while (iterator.hasNext()) {
                    String jcn = (String) iterator.next();
                    sb.append("import ");
                    sb.append(jcn);
                    sb.append(";\n");
                if (imports.size() > 0) {
                    sb.append("\n");
                //class:
                sb.append("/**\n");
                sb.append(" * Container class to store data of one record (row) of table '"+tableName+"'.\n");
                sb.append(" *\n");
                sb.append(" * @version $Revision: 9 $ ($Date: 24.10.03 14:25 $)\n");
                sb.append(" * @author $Author: Hilpert $\n");
                sb.append(" */\n");
                sb.append("public class ");
                sb.append(className);
                if (superClass != null) {
                    sb.append(" extends ");
                    sb.append(superClass);
                sb.append(" {\n\n");
                //fields:
                sb.append(sb1.toString());
                //methods:
                sb.append("\n\n");
                sb.append(sb2.toString()); //methods
                //overwrite toString() method:
                sb.append("    /**\n");
                sb.append("     * Overwrite super.\n");
                sb.append("     *\n     * @return String representation of the object.\n");
                sb.append("     */\n");
                sb.append("    public String toString() {\n");
                sb.append("        StringBuffer sb = new StringBuffer(super.toString());\n\n");
                sb.append(sb3.toString());
                sb.append("\n        return sb.toString();\n");
                sb.append("    }\n\n");
                sb.append("}//"+className);
                result = sb.toString();
            }//else: input unavailable
            return result;
        }//getTableBean()

  • Using normal java classes to access database

    Dear friends,
    Is it a good practice to make database calls from a normal java class within J2EE environment.
    What I meant by a normal java class is a class which is not an enterprise bean.
    Best Regards,
    Chamal.

    it is quite normal.
    If you make your own DAOs, it may not be efficient/generic.
    JSP/Servlets can use Hibernate (which is a set of POJOs) to access DB. Thus you have a J2EE environment using a very matured DB access methodoloy, and doing away with Enterprise bean.
    regards

  • Deploy Java Classes to the Database 2

    Hi,
    I have made a program with JDeveloper, and with the function deploy I can store the code in the Oracle database.
    But now I want to use the loadjava tool.
    I put all the class files in one jar file and used the following command:
    (when I put the .java files in the jar file it works fine, but I want to load the .class files)
    loadjava -user test/test@xx–resolve file.jar
    The following errors I get:
    errors : class test/AnalyzeAccNum
    ORA-29534: referenced object XX.test/QueryManager could not be resolved
    ORA-29545: badly formed class:
    errors : class test/AnalyzeBalNew
    ORA-29534: referenced object XX.test/ReadEB could not be resolved
    ORA-29545: badly formed class:
    errors : class test/AnalyzeBalOld
    ORA-29534: referenced object XX.test/ReadEB could not be resolved
    ORA-29545: badly formed class:
    errors : class test/QueryManager
    ORA-29545: badly formed class:
    errors : class test/ReadEB
    ORA-29534: referenced object XX.test/FetchBankAccountID could not be resolved
    ORA-29545: badly formed class:
    errors : class test/RecognizeAndSaveLine
    ORA-29534: referenced object XX.test/AnalyzeStatementLine could not be resolved
    ORA-29545: badly formed class:
    The following operations failed
    class test/AnalyzeAccNum: resolution
    class test/AnalyzeBalNew: resolution
    class test/AnalyzeBalOld: resolution
    class test/AnalyzeDefLin: resolution
    class test/AnalyzeDesLin: resolution
    class test/AnalyzeDetLin: resolution
    class test/AnalyzePayRef: resolution
    class test/AnalyzeStaNum: resolution
    class test/AnalyzeStatementLine: resolution
    class test/BankCheck: resolution
    class test/FetchBankAccountID: resolution
    class test/FormatLayout: resolution
    class test/FormatLayoutTag: resolution
    class test/InsertInvoiceLine: resolution
    class test/InsertStatement: resolution
    class test/InsertStatementLine: resolution
    class test/ProcessStatementLine: resolution
    class test/QueryManager: resolution
    class test/ReadEB: resolution
    class test/RecognizeAndSaveLine: resolution
    exiting : Failures occurred during processing
    In JDeveloper it works fine, and I changed nothing in de code.
    What am I doing wrong?
    Thanks in advance.

    To make it more simple I made a new java file with only this code:
    package project1;
    public class test {
        public static void test() {
            System.out.println("test");
    }I used the following command to make a class file:
    javac -source 1.3 -target 1.3 test.java
    I used the following command for loadjava:
    loadjava -user test/test@database -resolve -verbose test.class
    this are the errors I get:
    arguments: '-user' 'test/test@database' '-resolve' '-verbose' 'test.class'
    creating : class project1/test
    loading : class project1/test
    resolving: class project1/test
    errors : class project1/test
    ORA-29545: badly formed class:
    The following operations failed
    class project1/test: resolution
    exiting : Failures occurred during processing
    If I do this all in JDeveloper it works fine when i want to deploy the .java file. But when I select the .class to deploy I get this message:
    Invoking loadjava on connection 'database' with arguments:
    -order -resolve -debug -force -thin -verbose
    creating : class project1/test
    loading : class project1/test
    Oracle Jdbc tracing is not avaliable in a non-debug zip/jar file
    resolving: class project1/test
    errors : class project1/test
    ORA-29545: badly formed class:
    The following operations failed
    class project1/test: resolution
    oracle.aurora.server.tools.loadjava.ToolsException: Failures occurred during processing
         at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:863)
         at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:116)
         at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:46)
         at oracle.jdevimpl.deploy.OracleDeployer.deploy(OracleDeployer.java:97)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:473)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:360)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeployToMostRecent(StoredProcHandler.java:256)
         at oracle.jdevimpl.deploy.StoredProcProfileDt$2.run(StoredProcProfileDt.java:193)
    #### Deployment incomplete. #### Jun 20, 2007 8:51:09 AM
    *** Note ***
    One possibility for the deployment failure is that the target Database may not support JDK version 1.3. Updating your Project Properties compiler Source & Target to an earlier release could fix this problem.
    Someone who knows what the problem is?
    Message was edited by:
    KdeGraaf

  • Manual Deployment of Java Class's to Database

    I was using JDeveloper, now my company has bought JBuilder 4.0, Can any one tell me how deploy my class's manually becuase JBuilder doesnt support deployment=(

    You will need to use the loadjava command line facility that comes with Oracle8i. JDeveloper's deployment feature just calls loadjava.
    You can find the doc for this in the Oracle8i Java Stored Procedures Developer's Guide, which is available on the Documentation pages of OTN.

  • Download jar / java class from database

    Hello,
    I have database 10.2.0.3 with one procedure that calls some java class loaded in database. Unfortunately I don't have source code of that java class or whole jar that was loaded into database.
    I would like to download it from database and try to decompile it.
    Can you tell me how can I download some java classes from database?
    Everything I know is only the name of some java class that is used in one PL/SQL procedure (CREATE OR REPLACE PROCEDURE ..... AS LANGUAGE JAVA)
    Thanks for some tips

    Can you tell me how can I download some java classes from database?You can use dbms_java.export_class procedure to export class as blob, then just save the blob to file.

  • Site Studio Content in a Java Class

    Hi Gurus,
    I would like to know if there's some Webcenter Content Service ou some Webcenter Portal interface, service, class ou data control to consume the content from a Site Studio Contributor Data File in my custom Java class.
    Obviously I can request the XML from some URL and consume as any XML in Java, but if there's some way to abstract this implementation I think that would be a best practice,      
    eventually Oracle can do some change in XML patterns and if I use some service I don't need to worry about this.
    There's in a Site Studio service called WCM_EDIT_DATA_FILE that I thought that can help, but this works in browser request, but no in my custom java service.
    It's possible test this service in this way:
    http://<host>:<port>/cs/idcplg?IdcService=WCM_EDIT_DATA_FILE&dDocName=<dDocName>&IsSoap=1
    I know that this thread are related with Webcenter Content, but I think that is more possible that someone from Portal already did this.
    Thanks for help

    Never mind. I resolved this using a ResourceBundle, thanks to another posting on this forum. I must say, the oracle documentation for this feature is scant and erroneous.
    How does one go about accessing a java resource object from a java class loaded into the database?
    I created a.properties file and loaded it using loadjava.
    Next I wrote a class in which I try to load the resource:
    import java.io.*;
    import java.util.*;
    public class C {
    public static void load() throws Exception {
    Properties p = new Properties();
    p.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("a.properties"));
    I then published method load as procedure p.
    When I execute p, I get the following error:
    SQL> exec p
    java.lang.NullPointerException
    at C.load(C.java:5)
    BEGIN p; END;
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.NullPointerException
    ORA-06512: at "QSI.P", line 0
    ORA-06512: at line 1
    Thanks
    Suresh

  • Accessing Java Resource in a Java class

    How does one go about accessing a java resource object from a java class loaded into the database?
    I created a.properties file and loaded it using loadjava.
    Next I wrote a class in which I try to load the resource:
    import java.io.*;
    import java.util.*;
    public class C {
    public static void load() throws Exception {
    Properties p = new Properties();
    p.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("a.properties"));
    I then published method load as procedure p.
    When I execute p, I get the following error:
    SQL> exec p
    java.lang.NullPointerException
    at C.load(C.java:5)
    BEGIN p; END;
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.NullPointerException
    ORA-06512: at "QSI.P", line 0
    ORA-06512: at line 1
    Thanks
    Suresh

    Never mind. I resolved this using a ResourceBundle, thanks to another posting on this forum. I must say, the oracle documentation for this feature is scant and erroneous.
    How does one go about accessing a java resource object from a java class loaded into the database?
    I created a.properties file and loaded it using loadjava.
    Next I wrote a class in which I try to load the resource:
    import java.io.*;
    import java.util.*;
    public class C {
    public static void load() throws Exception {
    Properties p = new Properties();
    p.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("a.properties"));
    I then published method load as procedure p.
    When I execute p, I get the following error:
    SQL> exec p
    java.lang.NullPointerException
    at C.load(C.java:5)
    BEGIN p; END;
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.NullPointerException
    ORA-06512: at "QSI.P", line 0
    ORA-06512: at line 1
    Thanks
    Suresh

  • Drop java class not working

    Hello,
    i'm using a freshly installed SQLDeveloper 1.5.1 to a java class to the database. Loading the class works, i can see my class in the tree under java.
    Now i wanted to change the source code of my class, so i wanted to drop it in the database. But although SQLDeveloper tells me that the Java Object "MyClass" has been dropped, it is still there in the tree. When i click on the entry in the tree i can still see the code.
    What do i need to do to remove my java code from the database?
    Thanks for help in advance,
    Dirk

    Hi ,
    select XMLTOOLKIT option in Operation mapping and execute it.
    I am not sure we can call java program in XSLT Program,but alternative is copy the code and use it in XSLT mapping it self,that means your XSLT program will become with JAVA extensions.
    then in Operation mapping level select SAPXMLTOOL kit option and execute it. i hope it will work. if it is not working then you have deploy some JAXP files on server,because the way execution of XSLT Mpaping program got changed,like when eve you executing XSLT with extnasions( if you are not using XMLTOOL kit option) then you have to use latest version of JAXP.JDK files.
    Regards,
    Raj

  • Inserting JavA Class in sql,problems with import

    hi i am trying to insert java class in the database
    create or replace and compile java source named AppelCommande as
    import client.AppelClient;
    public class Run
    * Creates a new instance of Run
    public static String Run(String cmd) {
    AppelClient AC = new AppelClient();
    return AC.AppelCmd(cmd);
    it gives me the following error
    Class client.AppelClient not found in import.
    i can compile this java code alone and i added client.jar in the classPath
    so there must be some configuration in the database to make it work
    thank you for your help

    thx for the reply
    i did try to load the classes in the database but i seem to have a problem somewhere
    i am using webservices and there are too many libraries to add so i added the rt.jar in java and i am getting the following error
    ORA-29545: badly formed class: User has attempted to load a class (java.math.MathContext) into a restricted package. Permission can be granted using dbms_java.grant_permission(<user>, LoadClassInPackage...

  • Error 'Inconsistent datatypes' with Java classes

    Hi,
    I have some Java classes loaded in Oracle 8.1.6, mapped as Object Types, so when I create one object from PL/SQL, JVM ought to create the matching Java object, communicating via the SQLData interface.
    Unfortunately, after the code:
    pippo:=OraMailer('mail.server.com','mymail');
    that creates the PL/SQL object, any code that use member procedures or function wrapping instance methods of the Java class fails with the error 932: Inconsistent datatypes.
    I looked for a mistake in my PL/SQL and Java code, but no error was found.
    It is very important: help me!!!
    Thx

    So here is what you are doing:
    ArrayList results = //get employees from database
    ListIterator langIt = results.listIterator();
    while (langIt.hasNext()) {
      Employee emp = langIt.next();
      String name2 = emp.getName();
      String SSNo = emp.getSSNum();
      results.add(name2);
      results.add(SSNo);
    }So you get a list or Employee objects, then you get an iterator over the list. For each Employee in the list you add the name and SSNo as Strings back to the same list. From the API for ConcurrentModificationException the exception can be thrown when you modify a collection while iterating over the collection - which is precisely what you are doing.
    The ListIterator interface allows you to modify the list through its own methods. Try using:
      langIt.add(name2);
      langIt.add(SSNo);instead.
    Why are you taking the name and SSNo out of the Employee object and placing them back in the same List anyway? That makes no sense to me.

  • Create java class/resource from binary blob in SQL statement

    Is there a way of creating a java class or resource from a binary blob in the CREATE JAVA CLASS statement? Something like:
    CREATE OR REPLACE JAVA CLASS
    USING BLOB 'CAFEBABE0000003100120A0004000D08000E07000F0700100100063C696E69743E010003282956010004436F646501000F4C696E654E756D6265725461626C6501000372756E01001428294C6A6176612F6C616E672F537472696E673B01000A536F7572636546696C6501001152657475726E537472696E672E6A6176610C0005000601001F546869732069732061206E657720737472696E67207269676874206865726501000C52657475726E537472696E670100106A6176612F6C616E672F4F626A65637401000F6175726F72615F6F70745F696E666F002100030004000000000002000100050006000100070000001D00010001000000052AB70001B10000000100080000000600010000000100090009000A000100070000001B00010000000000031202B0000000010008000000060001000000030002000B00000002000C00110000004C00000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009705070397050703';
    I've tried various combinations of casting & convert functions, all of them give an ORA-29506 error 'Invalid query derived from USING clause', and nothing useful is gained from google about this. Is there a way of specifying the class binary in this way?

    You can load Java classes into the database, then create a PL/SQL procedure or function in the database that calls that Java class.
    This leaves you with a standard PL/SQL procedure/function which you can call from Oracle Forms.
    Have a look at the database documentation on how to load a Java class: http://download.oracle.com/docs/cd/A91202_01/901_doc/java.901/a90210/toc.htm

  • Urgent !!!!!!!!!!!! regarding CREATE JAVA CLASS USING BFILE

    We have Oracle 8.1.7 spatial database. We got to load some java classes into the database. We would like to make it as the java programs to be loaded from a client system into the oracle server. I am using CREATE DIRECTORY command to create a directory object (say suppose \\prav\loadjavaclasses\. Then using the CREATE OR REPLACE JAVA CLASS USING BFILE (object_name, 'CLASSNAME.CLASS'). This .class file is in the network identified by prav which in turn has a shared directory (full privileges) loadjavaclasses folder. Can you please help in this regard.
    Please mail me to [email protected]
    thanks in advance
    SudhaSrikanthan
    null

    use loadjava

Maybe you are looking for