How to import user defined class in UIX page?

Does anyone know how to import user defined class in UIX page so that the class can be called in the javascript in the UIX ?
Thks & Rgds,
Benny

what you are referring to is not javascript.
it is JSP scriptlets. These are very different.
In order to keep a strict separation between View and Controller, it is not possible to run arbitrary java code from within your UIX code.
However, you can run java code from within a UIX event handler; see:
http://otn.oracle.com/jdeveloper/help/topic?inOHW=true&linkHelp=false&file=jar%3Afile%3A/u01/app/oracle/product/IAS904/j2ee/OC4J_ohw/applications/jdeveloper904/jdeveloper/helpsets/jdeveloper/uixhelp.jar!/uixdevguide/introducingbaja.html
event handler code is run before the page is rendered.

Similar Messages

  • Import user defined class in JSP page

    In my test.jsp page, I tried to display the user name using the value returned from a class UserInfo's static function getUsername(), like this:
    <%@page import="toystore.view.UserInfo" %>
    <html:text property="username" value="<%= UserInfo.getUsername()%>"
    Is this allowed? I tried to run it but failed, it complained:
    OracleJSP: oracle.jsp.provider.JspCompileException:
    Errors compiling:D:\java\bc4jtoystore\ToyStoreController\classes\.jsps\_web_2d_inf\_jsp\_signin.java
    Line # Error
    0 cannot access class toystore.view.UserInfo; file toystore\view\UserInfo.class not found
    64 variable UserInfo not found in class web2d_inf._jsp._signin
    If it is allowed, what is the correct way to do it?
    Thanks.
    P.S. UserInfo is compiled in toystore.view package.

    check your classpath. it looke like the compilers complaining that it can't locate your toy store package location not that there is a problem with your jsp. Hope this helps

  • How to import User-Defined Libraries to ODI?

    Hi All,
    I am trying to execute Java programs using ODI. There are many User-Defined classes imported in the programs.
    I have these User-Defined classes in JAR form.
    My ODI is setup on a linux system.
    So, where should these JAR files be uploaded in the system so that it can be imported in the Java programs?
    Please help me in resolving this issue.
    Thanks

    Hi Sutirtha,
    My ODI is installed on a linux system and I am using it on my desktop through a remote desktop connection.
    I connect to it using Tarantella account. Here I have to create a session and a view to use the ODI.
    So, when I am looking in the linux system for the <ODI_HOME>/oracledi/drivers folder, I am finding a lot of them.
    So, Please help me in locating the exact one where I need to put the JAR files.
    Thanks

  • ADF : How to import a java class in jspx page

    Hi All,
    In jsp we have page directive to import a java class. Do we have anything similar to that in a jspx page?

    Hello,
    If you create a new jspx file in jdeveloper, the untitled file generated will be this:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=UTF-8" import="java.util.*"/>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>untitled1</title>
    </head>
    <body></body>
    </html>
    </jsp:root>
    You can see the page directive there!

  • How to get user defined class in java client of a bpel prcoess?

    I have written a simple bpel process which returns a bean class namely employee which has three String fields(name,id and email). From java client when I am invoking the prcoess the prcoess instance is starting and completing properly. From Bpel console when I check the audit of the instance, it shows everything as expected. But in client class instead of three strings I am getting only first string i.e email in response. I checked the mapping and all WSDL files but could not find a proper reason. I am attaching the wsdls of bpel prcoess and the client code:
    BPELProcess5.wsdl
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="BPELProcess5"
    targetNamespace="http://xmlns.oracle.com/BPELProcess5"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:client="http://xmlns.oracle.com/BPELProcess5"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:sq="http://xmlns.oracle.com/BPELProcess5/bean">
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         TYPE DEFINITION - List of services participating in this BPEL process
         The default output of the BPEL designer uses strings as input and
         output to the BPEL Process. But you can define or import any XML
         Schema type and us them as part of the message types.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <types>
    <schema attributeFormDefault="qualified"
                   elementFormDefault="qualified"
                   targetNamespace="http://xmlns.oracle.com/BPELProcess5/bean"
                   xmlns="http://www.w3.org/2001/XMLSchema">
    <complexType name="employeetype" >
    <all>
    <element name="fname" type="string"/>
    <element name="lname" type="string"/>
    <element name="id" type="string"/>
         </all>
    </complexType>
    </schema>
              <schema attributeFormDefault="qualified"
                   elementFormDefault="qualified"
                   targetNamespace="http://xmlns.oracle.com/BPELProcess5"
                   xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://xmlns.oracle.com/BPELProcess5/bean"/>
                   <element name="BPELProcess5ProcessRequest">
                        <complexType >
                             <sequence>
                                  <element name="input" type="string"/>
                             </sequence>
                        </complexType>
                   </element>
    <!--
                   <element name="BPELProcess5ProcessResponse">               
    <complexType >
                             <sequence>
                                  <element name="output" type="sq:employeetype"/>
                             </sequence>
                        </complexType>
                   </element>
    -->
              </schema>
         </types>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         MESSAGE TYPE DEFINITION - Definition of the message types used as
         part of the port type defintions
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <message name="BPELProcess5RequestMessage">
              <part name="payload" element="client:BPELProcess5ProcessRequest"/>
         </message>
         <message name="BPELProcess5ResponseMessage">
              <part name="payload" type="sq:employeetype"/>
         </message>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         PORT TYPE DEFINITION - A port type groups a set of operations into
         a logical service unit.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- portType implemented by the BPELProcess5 BPEL process -->
         <portType name="BPELProcess5">
              <operation name="process">
                   <input message="client:BPELProcess5RequestMessage" />
                   <output message="client:BPELProcess5ResponseMessage"/>
              </operation>
         </portType>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         PARTNER LINK TYPE DEFINITION
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <plnk:partnerLinkType name="BPELProcess5">
              <plnk:role name="BPELProcess5Provider">
                   <plnk:portType name="client:BPELProcess5"/>
              </plnk:role>
         </plnk:partnerLinkType>
    </definitions>
    BPELPrcoess5.bpel
    // Oracle JDeveloper BPEL Designer
    // Created: Thu Jul 14 16:50:15 IST 2005
    // Author: Arka
    // Purpose: Synchronous BPEL Process
    -->
    <process name="BPELProcess5" targetNamespace="http://xmlns.oracle.com/BPELProcess5" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:ns1="http://demows/handler/SessionEJB.wsdl" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://xmlns.oracle.com/BPELProcess5/bean" xmlns:client="http://xmlns.oracle.com/BPELProcess5" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"><!-- ================================================================= --><!-- PARTNERLINKS --><!-- List of services participating in this BPEL process --><!-- ================================================================= -->
    <partnerLinks><!--
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="client" partnerLinkType="client:BPELProcess5" myRole="BPELProcess5Provider"/>
    <partnerLink myRole="SessionEJBPortType_Role" name="PartnerLink_1" partnerRole="SessionEJBPortType_Role" partnerLinkType="ns1:SessionEJBPortType_PL"/>
    </partnerLinks><!-- ================================================================= --><!-- VARIABLES --><!-- List of messages and XML documents used within this BPEL process --><!-- ================================================================= -->
    <variables><!-- Reference to the message passed as input during initiation -->
    <variable name="inputVariable" messageType="client:BPELProcess5RequestMessage"/><!--
    Reference to the message that will be returned to the requester
    -->
    <variable name="outputVariable" messageType="client:BPELProcess5ResponseMessage"/>
    <variable name="Invoke_1_getEmployee_InputVariable" messageType="ns1:getEmployee1Request"/>
    <variable name="Invoke_1_getEmployee_OutputVariable" messageType="ns1:getEmployee1Response"/>
    </variables><!-- ================================================================= --><!-- ORCHESTRATION LOGIC --><!-- Set of activities coordinating the flow of messages across the --><!-- services integrated within this business process --><!-- ================================================================= -->
    <sequence name="main"><!-- Receive input from requestor.
    Note: This maps to operation defined in BPELProcess5.wsdl
    -->
    <receive name="receiveInput" partnerLink="client" portType="client:BPELProcess5" operation="process" variable="inputVariable" createInstance="yes"/><!-- Generate reply to synchronous request -->
    <assign name="Assign_1">
    <copy>
    <from variable="inputVariable" part="payload" query="/client:BPELProcess5ProcessRequest/client:input"/>
    <to variable="Invoke_1_getEmployee_InputVariable" part="empid"/>
    </copy>
    </assign>
    <invoke name="Invoke_1" partnerLink="PartnerLink_1" portType="ns1:SessionEJBPortType" operation="getEmployee" inputVariable="Invoke_1_getEmployee_InputVariable" outputVariable="Invoke_1_getEmployee_OutputVariable"/>
    <assign name="Assign_2">
    <copy>
    <from variable="Invoke_1_getEmployee_OutputVariable" part="return" query="/return/fname"/>
    <to variable="outputVariable" part="payload" query="/payload/ns2:fname"/>
    </copy>
    <copy>
    <from variable="Invoke_1_getEmployee_OutputVariable" part="return" query="/return/lname"/>
    <to variable="outputVariable" part="payload" query="/payload/ns2:lname"/>
    </copy>
    <copy>
    <from variable="Invoke_1_getEmployee_OutputVariable" part="return" query="/return/id"/>
    <to variable="outputVariable" part="payload" query="/payload/ns2:id"/>
    </copy>
    </assign>
    <reply name="replyOutput" partnerLink="client" portType="client:BPELProcess5" operation="process" variable="outputVariable"/>
    </sequence>
    </process>
    myClient.java
    package mypackage2;
    import bean.EmployeeBean;
    import java.rmi.RemoteException;
    import java.util.ArrayList;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.JAXRPCException;
    import javax.xml.rpc.ParameterMode;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.ServiceException;
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.encoding.XMLType;
    import javax.xml.rpc.soap.SOAPFaultException;
    import org.apache.axis.Constants;
    import org.apache.axis.client.Call;
    public class myClient
    private static QName SERVICE_NAME;
    private static QName PORT_TYPE;
    private static QName OPERATION_NAME;
    private static String SOAP_ACTION;
    private static String STYLE;
    private static String THIS_NAMESPACE = "http://xmlns.oracle.com/BPELProcess5";
    private static String PARAMETER_NAMESPACE = "http://xmlns.oracle.com/BPELProcess5";
    private String location;
    static
    SERVICE_NAME = new QName(THIS_NAMESPACE,"BPELProcess5");
    PORT_TYPE = new QName(THIS_NAMESPACE,"BPELProcess5") ;
    OPERATION_NAME = new QName(THIS_NAMESPACE,"BPELProcess5ProcessRequest");
    SOAP_ACTION = "process";
    STYLE = "wrapped";
    public myClient()
    public void setLocation(String location)
    this.location = location;
    public void initiate(String symbol)
    try
    DeserializerImpl des = new DeserializerImpl();
    ServiceFactory serviceFactory = ServiceFactory.newInstance();
    Service service = serviceFactory.createService( SERVICE_NAME );
    Call call = (Call)service.createCall( PORT_TYPE );
    call.setTargetEndpointAddress( location );
    call.setProperty(Call.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
    call.setProperty(Call.SOAPACTION_URI_PROPERTY, SOAP_ACTION);
    call.setOperationName(OPERATION_NAME);
    call.addParameter(new QName(PARAMETER_NAMESPACE,"input"), XMLType.XSD_STRING, ParameterMode.IN);
    Object[] params = new Object[1];
    params[0] = "1";
    call.setReturnType(new QName("http://xmlns.oracle.com/BPELProcess5", "BPELProcess5ProcessResponse"), EmployeeBean.class);
    EmployeeBean response = (EmployeeBean)call.invoke(params);
    System.out.println( " BPEL process initiated" );
    catch (SOAPFaultException e)
    System.err.println("Generated fault: ");
    System.out.println (" Fault Code = " + e.getFaultCode());
    System.out.println (" Fault String = " + e.getFaultString());
    catch (JAXRPCException e)
    System.err.println("JAXRPC Exception: " + e.getMessage());
    catch (ServiceException e)
    System.err.println("Service Exception: " + e.getMessage());
    catch(RemoteException e)
    System.err.println("Remote Exception: " + e.getMessage());
    public static void main(String[] args)
    String location = "http://localhost:9700/orabpel/default/BPELProcess5/1.0";
    myClient client = new myClient();
         client.setLocation( location );
    client.initiate( "" );
    }

    Hi Abdul,
    From the document, we know that CONSTRAINED flag is used to reduce the risk of injection attacks via the specified string. If a string is provided that is not directly resolvable to qualified
    or unqualified member names, the following error appears: "The restrictions imposed by the CONSTRAINED flag in the STRTOSET function were violated."
    So you need to make sure the members are passed properly to the STRTOSET function. For more details, please see the following links:
    http://ch1n2.wordpress.com/2010/02/21/the-restrictions-imposed-by-the-constrained-flag-in-the-strtoset-function-were-violated/
    http://www.bp-msbi.com/2010/04/passing-unconstrained-set-and-member-parameters-between-reports-in-reporting-services/
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to use user defined contact fields in Pages 4.3?

    I would like to use new fields definded in Contacts (Vers. 7.1) in Pages (Vers. 4.3) for personalizing documents on my iMac under Mountain Lion. Is this possible, and how? Thank you.

    Yes, here are four of them:
    #1: shows the new field "foo" in the template
    #2: shows "foo" in the list of names
    #3: shows "foo" while editing a new card
    #4 shows the absence of "foo" in the available names while trying to put the field "foo" in a pages document.

  • How to put a user defined class in Web dynpro

    How and where can we create some user defined classes?
    For example i wanted to create some utility classs for my project. Under what folder should i create this?

    Please create the .java files under src folder of the project
    Go to PackageExplorer->expand the project->select src/packages and create the package under this and create java file.
    Regards, Anilkumar

  • How can 1 make an object of user defined class immutable?

    Hi All,
    How can one make an object of user defined class immutable?
    Whats the implementation logic with strings as immutable?
    Regards,

    Hi All,
    How can one make an object of user defined class
    immutable?The simple answer is you can't. That is, you can't make the object itself immutable, but what you can do is make a wrapper so that the client never sees the object to begin with.
    A classic example of a mutable class:
    class MutableX {
        private String name = "None";
        public String getName() {
            return name;
        public void setName(String name) {
            this.name = name;
    }I don't think it's possible to make this immutable, but you can create a wrapper that is:
    class ImmutableX {
        private final MutableX wrappedInstance;
        public ImmutableX (String name) {
            wrappedInstance = new MutableX();
            wrappedInstance.setName(name);
        public String getName() {
            return wrappedInstance.getName();
        // Don't give them a way to set the name and never expose wrappedInstance.
    }Of course, if you're asking how you can make your own class immutable then the simple answer is to not make any public or protected methods that can mutate it and don't expose any mutable members.
    Whats the implementation logic with strings as
    immutable?
    Regards,I don't understand the question.

  • How to use user-defined packages in JAX-RPC web service

    I am trying to use Object of my class located in my package in jax-rpc webservice,the code is
    package supercomputer;
    import Hello.*;
    public class SuperImpl implements SuperIF
    public String sendParam(String data)
    Temp ob=new Temp();
    int i=ob.get1(10000);
    return data+"returned by supercomputer";
    Temp is located in Hello package,I have jar the Hello package as Hello.jar and has set its classpath in targets.xml of Ant tool.
    The code compiles well and service is deployed successfully,but when i try to call the service from the client its gives me following error.
    [echo] Running the supercomputer.SuperClient program....
    [java] java.rmi.ServerException: Missing port information
    [java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:357)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
    [java] at supercomputer.SuperIF_Stub.sendParam(SuperIF_Stub.java:60)
    [java] at supercomputer.SuperClient.main(Unknown Source)
    I dont know if it deploys why it gives error on client side.
    Please tell how to use user-defined packages and class in jax-rpc service code ,i am not talking about passing user-defined parameters i am just talking about making objects of user defined classes in jax-rpc service.I think there is some problem in classpath.
    Please guide me in doing that.
    Thanks,
    Farrukh

    Farrukh,
    I don't know if your error is about a missing class from your custom package, ... what track did you followed to say that?
    To use your package in the implementation of you web service, you should only follow the rules of making a web application: put your package jar in your \lib directory inside WEB-INF/ or your package classes unjared in classes (also in WEB-INF/).
    As I already said, I have doubts that your error should be originated from a missing class from your package, but:
    -try to see the logs (errors?) when you deploy your web service that could give a hint about the problem.
    -try to see if you can access your endpoint through your browser to see if there is a online status
    -display your config/WSDL file, and the steps you did to build your web service.
    regards,
    Pedro Salazar.

  • How to create user defined button in alv report

    how to create user defined button in alv report
    thnks in advance.

    Hi,
    U can define it the the PF-STATUS ( Menu for ALV ).
    For that u have to define it in the EVENTCAT.
    form z_eventcat  using    p_i_eventcat type slis_t_event.
      data: i_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
        exporting
          i_list_type     = 0
        importing
          et_events       = p_i_eventcat
        exceptions
          list_type_wrong = 1
          others          = 2.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
      clear i_event.
      read table p_i_eventcat with key name = slis_ev_top_of_page into
      i_event.
      if sy-subrc = 0.
        move 'TOP_OF_PAGE' to i_event-form.
        append i_event to p_i_eventcat.
      endif.
      read table p_i_eventcat with key name = slis_ev_pf_status_set into i_event.
      if sy-subrc = 0.
        move 'SET_PF_STATUS' to i_event-form.
        append i_event to p_i_eventcat.
      endif.
      clear i_event.
      read table p_i_eventcat into i_event with key name = slis_ev_user_command .
      if sy-subrc = 0.
        move 'USER_COMMAND' to i_event-form.
        append i_event to p_i_eventcat.
      endif.
    And in the DISPLAY
    call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
         i_callback_program                = v_progname
         i_callback_pf_status_set          = 'SET_PF_STATUS'
         i_callback_user_command           = 'USER_COMMAND'
         i_callback_top_of_page            = 'TOP_OF_PAGE'
         i_grid_title                      = v_gridtitle
         i_save                            = 'A'
         is_layout                         = i_layout
         it_fieldcat                       = i_fieldcat[]
         it_sort                           = i_sortinfo
         it_events                         = i_eventcat
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        tables
          t_outtab                          = it_final
       exceptions
         program_error                     = 1
         others                            = 2
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    *MENU SETTINGS.
    form set_pf_status using rt_extab type slis_t_extab.
      set pf-status 'ALV_MENU'.
    endform.                    "SET_PF_STATUS
    endform.                    " Z_EVENTCAT
    Now double click on ALV MENU nad u can create a button in the application bar.
    Regards,
    Pritha.

  • Cannot comile user defined classes

    Hello i have a problem on compiling user defined classes .
    example
    file x.java
    public class x{
    file y.java
    import x;
    public class y{
    I first compile x.java and everything is OK .
    Then i compile y.java and the compiler gives the folowing
    y.java:2: '.' expected
    import y
    I have tried to put the classes on a package and added the folowing line yo each file
    import /home/bill/test
    Then i puted the java files on that dir
    and compiled with
    javac -classpath /home/bill/test y.java
    AGAIN THE SAME
    y.java:2: '.' expected
    import y
    WHAT I DO WRONG PLEASE HELP!!!!!!!!!!!!

    1. Since J2SDK 1.4, you can not import classes that are in the default (or unnamed) package. You are getting the error because the compiler expects something after y like y.*;
    2. You do not need to import classes that are in the same package, and all classes in the default package are in the same package.
    In your case, your classes are in the default package so remove the import statement.

  • Pass an array of a user defined class to a stored procedure in java

    Hi All,
    I am trying to pass an array of a user defined class as an input parameter to a stored procedure. So far i have done the following:
    Step 1: created an object type.
    CREATE TYPE department_type AS OBJECT (
    DNO NUMBER (10),
    NAME VARCHAR2 (50),
    LOCATION VARCHAR2 (50)
    Step 2: created a varray of the above type.
    CREATE TYPE dept_array1 AS TABLE OF department_type;
    Step 3:Created a package to insert the records.
    CREATE OR REPLACE PACKAGE objecttype
    AS
    PROCEDURE insert_object (d dept_array);
    END objecttype;
    CREATE OR REPLACE PACKAGE BODY objecttype
    AS
    PROCEDURE insert_object (d dept_array)
    AS
    BEGIN
    FOR i IN d.FIRST .. d.LAST
    LOOP
    INSERT INTO department
    VALUES (d (i).dno,d (i).name,d (i).location);
    END LOOP;
    END insert_object;
    END objecttype;
    Step 4:Created a java class to map the columns of the object type.
    public class Department
    private double DNO;
    private String Name;
    private String Loation;
    public void setDNO(double DNO)
    this.DNO = DNO;
    public double getDNO()
    return DNO;
    public void setName(String Name)
    this.Name = Name;
    public String getName()
    return Name;
    public void setLoation(String Loation)
    this.Loation = Loation;
    public String getLoation()
    return Loation;
    Step 5: created a method to call the stored procedure.
    public static void main(String arg[]){
    try{
    Department d1 = new Department();
    d1.setDNO(1); d1.setName("Accounts"); d1.setLoation("LHR");
    Department d2 = new Department();
    d2.setDNO(2); d2.setName("HR"); d2.setLoation("ISB");
    Department[] deptArray = {d1,d2};
    OracleCallableStatement callStatement = null;
    DBConnection dbConnection= DBConnection.getInstance();
    Connection cn = dbConnection.getDBConnection(false); //using a framework to get connections
    ArrayDescriptor arrayDept = ArrayDescriptor.createDescriptor("DEPT_ARRAY", cn);
    ARRAY deptArrayObject = new ARRAY(arrayDept, cn, deptArray); //I get an SQLException here
    callStatement = (OracleCallableStatement)cn.prepareCall("{call objecttype.insert_object(?)}");
    ((OracleCallableStatement)callStatement).setArray(1, deptArrayObject);
    callStatement.executeUpdate();
    cn.commit();
    catch(Exception e){ 
    System.out.println(e.toString());
    I get the following exception:
    java.sql.SQLException: Fail to convert to internal representation
    My question is can I pass an array to a stored procedure like this and if so please help me reslove the exception.
    Thank you in advance.

    OK I am back again and seems like talking to myself. Anyways i had a talk with one of the java developers in my team and he said that making an array of structs is not much use to them as they already have a java bean/VO class defined and they want to send an array of its objects to the database not structs so I made the following changes to their java class. (Again hoping some one will find this useful).
    Setp1: I implemented the SQLData interface on the department VO class.
    import java.sql.SQLData;
    import java.sql.SQLOutput;
    import java.sql.SQLInput;
    import java.sql.SQLException;
    public class Department implements SQLData
    private double DNO;
    private String Name;
    private String Location;
    public void setDNO(double DNO)
    this.DNO = DNO;
    public double getDNO()
    return DNO;
    public void setName(String Name)
    this.Name = Name;
    public String getName()
    return Name;
    public void setLocation(String Location)
    this.Location = Location;
    public String getLoation()
    return Location;
    public void readSQL(SQLInput stream, String typeName)throws SQLException
    public void writeSQL(SQLOutput stream)throws SQLException
    stream.writeDouble(this.DNO);
    stream.writeString(this.Name);
    stream.writeString(this.Location);
    public String getSQLTypeName() throws SQLException
    return "DOCCOMPLY.DEPARTMENT_TYPE";
    Step 2: I made the following changes to the main method.
    public static void main(String arg[]){
    try{
    Department d1 = new Department();
    d1.setDNO(1);
    d1.setName("CPM");
    d1.setLocation("LHR");
    Department d2 = new Department();
    d2.setDNO(2);
    d2.setName("Admin");
    d2.setLocation("ISB");
    Department[] deptArray = {d1,d2};
    OracleCallableStatement callStatement = null;
    DBConnection dbConnection= DBConnection.getInstance();
    Connection cn = dbConnection.getDBConnection(false);
    ArrayDescriptor arrayDept = ArrayDescriptor.createDescriptor("DEPT_ARRAY", cn);
    ARRAY deptArrayObject = new ARRAY(arrayDept, cn, deptArray);
    callStatement = (OracleCallableStatement)cn.prepareCall("{call objecttype.insert_array_object(?)}");
    ((OracleCallableStatement)callStatement).setArray(1, deptArrayObject);
    callStatement.executeUpdate();
    cn.commit();
    catch(Exception e){
    System.out.println(e.toString());
    and it started working no more SQLException. (The changes to the department class were done manfully but they tell me JPublisher would have been better).
    Regards,
    Shiraz

  • How to create user defined transactioncode in bw

    hi,
    How to create user defined transactioncode in bw.My user want this
    regards,
    Abhishek

    hi 
    by using the t code SE93 u can create.
    after that it will ask u for what ur going create
    1.Program and screen
    2.Program and selection screen
    3.method of class
    4.transaction with variant
    5.transaction with parameter
    here u have to select appropriate option based on ur requirement
    and enter the options as per ur needs save and activate

  • How to create user defined metrics for SQL Server target?

    The customer is not able to create a user defined metrics for SQL Server target.
    This is very important for him to use this product.
    He is asking how to create user defined metrics?
    I sent him Note 304952.1 How to Create a User-Defined SQL Metric in EM 10g Grid Control
    But it would work for an Oracle DB, but his target is SQL Server DB
    Not able to find the "User-Defined Metrics" link from Database home page.
    How to create user defined metrics for SQL Server target?

    http://download-uk.oracle.com/docs/cd/B14099_19/manage.1012/b16241/Monitoring.htm

  • How to Developed user defined functions to call function modules in SAP R/3

    •     how to Develope user defined functions to call function modules in SAP R/3 system

    Hello Raja,
    Go through this V.imp Link...
    http://download.oracle.com/docs/cd/B10464_05/integrate.904/b10408/rfc.htm
    Steps to crate FM..
    Follow these steps..
    Go to the T: code SE37
    First You Create Function Group
    On That u specify
    Function Group Name..............
    Short Text..............................
    save...
    Go to SE 37
    Specify the Function Module Name: Eg: Z_Bapi_Materialmaster
    Short Text.......
    Save...
    Next Go to Attributes..
    Select Radio button : Remote enabled model
    Go to Parameters..
    Click Import...
    Give Parameter Type Associate type S.t
    next Click Export...
    Give Parameter Type Associate type S.t
    Next Click Tables Button..
    Specify tables..
    Next click source code button..
    Write Source code here..
    Eg : Select statements Etc..
    Finally we should be select the Radio button Enable remorely
    https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action?pageId=39728
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/bapi%2bstep%2bby%2bstep
    Re: User Defined Functions Tutorials
    Hope this information is useful to you..
    Thanks ,
    Satya Kumar..

Maybe you are looking for

  • How can I get my custom PS workflows to run correctly when I Retry them after a failure?

    I have some custom PowerShell workflows in place that monitor for status changes to various work items and add Action Log entries as required. As an example one of these workflows monitors for newly created Service Requests and creates an Action Log

  • D110 used to be able to ePrint from iPhone, now it cant

    Hi, A few months back, our D110 no longer is able to print from our iPhone or iPad, the print job just stalls.  When I first setup ePrint it worked with no problems.  The one thing I noticed is that the printer has an IP that is not internal to the h

  • Need logic

    HI all, I am getting the amount(DMBE2) from GL accoumt, but i need to fill the Quaterly wise in the report output depends on Account type.. How can segregate the year in Quaters Please help me in thius. regards, AR

  • Ubuntu上でDAQmxBaseのlsdaqが認識しない

    お世話になります. USB-6501をDAQmxBase 3.4.0で使用しています. サポート外なのは承知していますが.ubuntu 9.04, kernel 2.6.28-19-genericで動作させようとしています. installは何とかできて.dio-sample(readDigPort.cのみ)のmakeもでき.起動させてもエラーは出ないのですが. 実行させると. Data read: 0xB770C2A0 の様な形で.ポートのデータが読めていないようです.(スイッチを付けても変化

  • Orientation Screen stuck upside-down and freezing

    iPhone 6 Plus on iOS 8 My phones home screen flips upside down when the orientation moves around then freezes in that orientation.  It also happens while in the messaging app when it goes in landscape mode.  They only way I can get t back to normal i