Indirect Referencing

Dear All Assalam-o-Alikum,
i have write this code
DECLARE
V VARCHAR2(50):='V1';
V1 NUMBER;
BEGIN
dbms_output.put_line(v);
end;
now i want that what ever value variable "V" contain, this vale consider as variable and value should be assign to this variable like this
IF V contain value "V1" then we can able to assign the value to v1 through programming. i want to do this on PL/SQL. i have done this on Form but i want to do this on Database Level.
I want to know how can i do this.
Thanks
Best Regadrs
Farrukh Shaikh

So, do you mean like this?
V1 -> V -> 'Oralce'
V1 should hold the value of the variable 'V' even though 'V' was referred as a Value to V1 rather a variable?
Like
V1 Varchar2(30) := 'V';
In that case, AFAIK..
1. Oracle PL/SQL does not follow forward reference
2. A value is a value and a Variable is a variable, Values inside single quote cannot be considered as Variable.
But you can do this
PRAZY@solarc> declare
  2  V number := 30;
  3  V1 varchar2(10) := V;
  4  V2 Varchar2(10) := 'V';
  5  begin
  6  DBMS_OUTPUT.PUT_LINE('Value of V1 :'||V1);
  7  DBMS_OUTPUT.PUT_LINE('Value of V2 :'||V2);
  8  end;
  9  /
Value of V1 :30
Value of V2 :V
PL/SQL procedure successfully completed.Text marked with in single quotes will be considered as value at all cost.
Regards,
Prazy

Similar Messages

  • How Indirect Referencing in Oracle PL/SQL

    hi,
    can u please help in write a pl/sql code that support the indirect referencing.
    the example given is the modified version of my actual requirement.
    declare
    x varchar2(10);
    y varchar2(10);
    begin
    x := 'y';
    y := 'abcd';
    end;
    can i print the value of y that 'abcd' by using variable X by some indirect reference.
    thanks

    Hi, Michael thanks for the reply.
    I am trying to replicate the Oracle Forms (D2K) functionality in PL/SQL. In Oracle Forms we have built-ins "NAME_IN" or "COPY. In most of the oracle env we normally have around 200 pl/sql packages/procedure/function. Most of us get the diff. errors from these procedures time to time. The currently i am also facing the same. so i decided the write a generic/dynamic procedure that will return the values of the parameter that is passed in the procedure.
    For this i made some changes in "who_call_me" procedure (originly written in "asktom.oracle.com site") now it will return the comma separated parameter list as out variable. Inside this procedure i am manipulating "dbms_utility.format_call_stack" and get the "package.procdure name". Ones i get the "package and procedure name" the cursor statement on "user_argument" table will give the entire "IN" parameters name.
    The comma separated parameter list I am returning to my main procedure.
    Now I want to print these values.
    See the code given below. I am sorry for that the code is bad shape. but it in working condition.
    Please follow the step given below…
    Step 1) connect to sqlplus user/passwd@conectstring
    Step 2)
    create or replace procedure who_call_me(
    parameter_list out varchar2 )
    as
    owner varchar2(100);
    name1 varchar2(100);
    lineno number;
    caller_t varchar(100);
    type Varchar2_Table IS TABLE OF user_arguments.argument_name%type INDEX BY BINARY_INTEGER;
    all_arguments Varchar2_Table;
    ARGUMENTS dbms_sql.NUMBER_table;
    SQL_STAT VARCHAR2(4000);
    pname VARCHAR2(50);
    call_stack varchar2(4096) default dbms_utility.format_call_stack;
    n number;
    found_stack BOOLEAN default FALSE;
    line1 varchar2(255);
    cnt number := 0;
    begin
    loop
    n := instr( call_stack, chr(10) );
    exit when ( cnt = 2 or n is NULL or n = 0 );
    line1 := substr( call_stack, 1, n-1 );
    call_stack := substr( call_stack, n+1 );
    if ( NOT found_stack ) then
    if ( line1 like '%handle%number%name%' ) then
    found_stack := TRUE;
    end if;
    else
    cnt := cnt + 1;
    if ( cnt = 2 ) then
    line1 := ltrim(substr(line1, instr(line1, ' ' )) );
    lineno := to_number(substr( line1, 1, instr(line1,' ') ));
    line1 := ltrim( substr( line1, instr(line1,' ' ) ) );
    if ( line1 like 'pr%' ) then
    n := length( 'procedure ' );
    elsif ( line1 like 'fun%' ) then
    n := length( 'function ' );
    elsif ( line1 like 'package body%' ) then
    n := length( 'package body ' );
    elsif ( line1 like 'pack%' ) then
    n := length( 'package ' );
    elsif ( line1 like 'anonymous%' ) then
    n := length( 'anonymous block ' );
    else
    n := null;
    end if;
    if ( n is not null ) then
    caller_t := ltrim(rtrim(upper(substr( line1, 1, n-1 ))));
    else
    caller_t := 'TRIGGER';
    end if;
    line1 := substr( line1, nvl(n,1) );
    n := instr( line1, '.' );
    owner := ltrim(rtrim(substr( line1, 1, n-1 )));
    name1 := ltrim(rtrim(substr( line1, n+1 )));
    -- dbms_output.put_line('line '||line1);
    -- dbms_output.put_line('owner '||owner);
    -- dbms_output.put_line('name '||name1);
    end if;
    end if;
    end loop;
    SQL_STAT := ' SELECT TRIM(SUBSTR(TXT,START_POS,END_POS-START_POS)) FROM
    select txt,
    CASE WHEN INSTR(txt,'||''''||'PROCEDURE'||''''||') <> 0 THEN INSTR(txt,'||''''||'PROCEDURE'||''''||')+9
    WHEN INSTR(txt,'||''''||'FUNCTION'||''''||') <> 0 THEN INSTR(txt,'||''''||'FUNCTION'||''''||') +8 END START_POS,
    CASE WHEN INSTR(txt,'||''''||' IS '||''''||') <> 0 THEN INSTR(txt,'||''''||' IS '||''''||')
    WHEN INSTR(txt,'||''''||' AS '||''''||') <> 0 THEN INSTR(txt,'||''''||' AS '||''''||') END END_POS
    FROM
    SELECT TXT FROM
    SELECT UPPER(TEXT) TXT, LINE LINENO, MIN(LINE) OVER() MIN_LINE
    from user_source us
    where us.name = '||''''||name1||''''||'
    and type = '||''''||caller_t||''''||'
    and ( upper(text) like '||''''||'%PROCEDURE%'||''''||' OR upper(text) like '||''''||'%FUNCTION%'||''''||')
    AND LINE <= 16
    ) WHERE LINENO = MIN_LINE
    EXECUTE IMMEDIATE(SQL_STAT) INTO pname;
    IF caller_t = 'PACKAGE BODY' THEN
    name1 := name1||'.'||pname;
    END IF;
    declare
    cursor c1 is select ARGUMENT_NAME
    from user_arguments where
    object_name = name1
    and decode(nvl(PNAME,'*'),'*','*', OBJECT_NAME) = nvl(PNAME,'*')
    AND ARGUMENT_NAME IS NOT NULL
    and in_out = 'IN'
    ORDER BY POSITION ;
    begin
    for i in c1 loop
    if parameter_list is not null then
    parameter_list := parameter_list||',';
    end if;
    parameter_list := parameter_list||i.ARGUMENT_NAME;
    end loop;
    end;
    end;
    step 3
    create or replace procedure my_test(empno varchar2,sal number) is
    x varchar2(4);
    begin
    x := 'abcdef';
    exception when others then
    declare
    my_parameter_list varchar2(4000);
    begin
    who_call_me(my_parameter_list);
    dbms_output.put_line('Parameter List---->'||my_parameter_list);
    end;
    end;
    Step 4)
    Sql> set serveroutput on
    SQL> execute my_test('sam',1000);
    Parameter List---->EMPNO,SAL
    PL/SQL procedure successfully completed.
    SQL>
    If u see the output of the My_Test is "EMPNO,SAL".
    now can u help to print the values that is 'sam',1000.
    Thanks
    Sanjeev Saxena
    My email id - [email protected]
    - [email protected]

  • ClassName cannot be resolved. Indirectly referenced. Eclipse IDE.

    Hi, I am trying to import a selection of classes within Eclipse and am having trouble. I seem to be able to link the classes so they are recognised by Eclipse but when I preform any operations on instances of the class I get the error as per my title.
    Outside of eclipse the classes work fine if I put the folder in with the source files and just import org.smslib.*. Any help is much appreciated, here is a picture of the problem which may highlight something I have missed.
    http://img512.imageshack.us/my.php?image=eclipseerrorqn3.jpg

    Hey, thank you very much for the response. Sorry I have not gotten back to you sooner but the main forum page was showing 10 views and no replies for some reason.
    I followed your instructions but they didn't quite work. Taking it back to the org folder allowed me to import smslib.* and it would recognise the classes but they were stilling looking for the functions etc in org.smslib so I went back another folder still and put the org folder inside a classes folder which solved the issue as I can now import org.smslib.*
    Thanks for the hint, you allowed me to figure out the problem (or at least a solution!).
    Here is a new screenshot to show you the new structure.
    http://img89.imageshack.us/my.php?image=eclipsefixaj6.jpg

  • Destination Service API - missing indirect class reference

    I'm trying to use the destination service api as described in the <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/17/d609b48ea5f748b47c0f32be265935/content.htm">documentation</a>, but Eclipse can't compile the code due to an indirectly referenced class called com.sap.security.core.server.util0.IDEException.
    References to com.sap.exception, security.class and tc/sec/destination/interface have already been set. According to the documentation, there should also be a reference to tc/sec/destination/service, but I don't have such an option in the context menu "Add Additional Libraries".
    So, where do I find the missing IDEException?
    Best regards,
    Frank

    The class com.sap.security.core.server.util0.IDEException is in library com.sap.exception. That's correct. Don't worry about that.
    You have to add those 3 additional libraries to your EJB Project with the right-click over project option:
    security.class
    tc/sec/destination/interface
    com.sap.exception.
    You have to add 4 references in your application-j2ee-engine.xml: : 3 to those 3 libraries and another one to the service, which doesn't appear in the popup list. Type it manually. The correct name is "tcsecdestination~service" (not /), and reference target type is "service".
    If this doesn't work, you can add to the 'java build path' of your EJB Project the libraries:
    tc_sec_destinations_interface.jar
    tc_sec_destinations_service.jar
    ... you can find them into the path of your server:
    /usr/sap/<SID>/JC00/j2ee/cluster/server0/bin/interfaces
    /usr/sap/<SID>/JC00/j2ee/cluster/server0/bin/service
    (some people has had problem with correct versions)
    If you are using DCs, you have to add those 3 libraries as Used DCs in your EJB Project. And set the 4 references in application-j2ee-engine.xml
    Hope this helps you. Don't forget the reward points
    Best regards.

  • Referenced Assembly BihConsumerInterop could not be found

    We have a fairly big SharePoint project where we use TFS, kicking of a build runs some tests and everything works as expected, but we get a warning:
    CA0060 : The indirectly-referenced assembly 'BihConsumerInterop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=48e046c834625a88' could not be found. This assembly is not required for analysis, however, analysis results could be incomplete. This assembly
    was referenced by: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI\Microsoft.Office.Server.Search.dll.
    Now the solution according to other blogposts is to add the referenced DLL to the project, but it seems i cannot find anything about the assembly BihConsumerInterop, so I was wondering if there was anyone that knows a bit more about this DLL :)

    We are trying to execute unit tests on our build server and running into the same problem.
    It seems that BihConsumerInterop cannot be found anywhere on the server.
    We've tried adding Microsoft.Office.Server.Search.dll to the GAC, but this error still persists.
    Would love to hear from Microsoft on this before installing SharePoint on our server.
    zaanglabs.com |
    charliedigital.com | linkedin.com/in/charlescchen

  • Problem in creation of ABAP proxies

    Hi,
    I am trying to create proxies of Message Interfaces that are built from External Definitions(XSDs). In the scenario, we use two XSDs, one for structure of BAPI and one as Document Envelope containing header level information of the document. Message Interface is created for Document Envelope and internally it references XSD of structure of BAPI.
    For e.g. For request message of BAPI_COMPANY_GETDETAIL, we have two XSDs:
    1. BAPI_COMPANY_GETDETAIL
    2. BAPI_COMPANY_GETDETAIL_Document_Envelope
    I create interface for document envelope; interface internally references XSD BAPI_COMPANY_GETDETAIL.
    When I try to create proxy for such an Interface I get following error:
    Cannot generate proxy (object <element name="BAPI_ACC_DOCUMENT_POST"> missing in WSDL, see long text)
    Message no. SPRX084
    and diagnosis provided in long text is as follows:
    Diagnosis
    In the WSDL document, the object
       "<element name="Documents"> <complex/simpleType ..."
    from the namespace
      "http://mindef.nl/schemas/DocumentEnvelope"
    links to the object
       "<element name="BAPI_ACC_DOCUMENT_POST">"
    from the namespace
       "urn:sap-com:document:sap:rfc:functions"
    However, this last object does not exist in the WSDL document.
    System Response
    ABAP proxy generation expects that all directly and indirectly referenced objects are in the WSDL document. Therefore, no proxy can be generated for this WSDL and the system displays an error message.
    Procedure
    This situation can have different causes:
    Object "<element name="BAPI_ACC_DOCUMENT_POST">" not been defined
    Object "<element name="BAPI_ACC_DOCUMENT_POST">" saved in the wrong namespace
    In the reference to object "<element name="BAPI_ACC_DOCUMENT_POST">", the wrong name was specified
    In the reference to object "<element name="BAPI_ACC_DOCUMENT_POST">", the wrong namespace "urn:sap-com:document:sap:rfc:functions" was specified
    Internal error in the service that constructs the WSDL document
    Internal error in ABAP proxy generation
    I have checked all the possibilities, there is no inconsistency in WSDL.
    Kindly provide some suggestions to tackle this problem.
    regards,
    Bhavish Bhatia

    Hi Bhatia,
    You cannot create ABAP proxies from external definitions, IDOC or BAPI, when your application system is based on 6.20.
    This works only, when your application system is based on 6.40 or higher.
    Regards,
    Udo

  • ADF from JDeveloper 10.1.2 not compatible with iAS 9.0.1

    Hi,
    We developed an ADF Application with JDeveloper 10.1.2 and we use the ADF interMedia domains (e.g. oracle.ord.im.OrdDocDomain). The application runs fine in JDeveloper, but doesn't run on our iAS 9.0.4.1. We get the following exception:
    java.lang.NoClassDefFoundError: oracle/sql/DatumWithConnection
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:219)
    at oracle.jbo.common.java2.JDK2ClassLoader.loadClassForName(JDK2ClassLoader.java:38)
    at oracle.jbo.common.JBOClass.forName(JBOClass.java:161)
    at oracle.jbo.common.JBOClass.findDataClass(JBOClass.java:203)
    at oracle.jbo.server.AttributeDefImpl.initFromXML(AttributeDefImpl.java:2061)
    at oracle.jbo.server.AttributeDefImpl.loadFromXML(AttributeDefImpl.java:2013)
    at oracle.jbo.server.EntityDefImpl.loadAttribute(EntityDefImpl.java:2815)
    at oracle.jbo.server.EntityDefImpl.loadAttributes(EntityDefImpl.java:2779)
    at oracle.jbo.server.EntityDefImpl.loadFromXML(EntityDefImpl.java:2362)
    at oracle.jbo.server.EntityDefImpl.loadFromXML(EntityDefImpl.java:2106)
    at oracle.jbo.server.MetaObjectManager.loadFromXML(MetaObjectManager.java:514)
    [...rest of stacktrace omitted ...]
    The problem is that the JDBC version of the iAS 9.0.4.1 is missing the class DatumWithConnection that is indirectly referenced by the interMedia classes supplied with JDeveloper 10.1.2.
    In detail, oracle.ord.im.OrdDoc uses oracle.sql.STRUCT. The inheritance hierarchy of STRUCT is different in the JDBC versions on iAS 9.0.4.1 (oracle.sql.Datum <- oracle.sql.STRUCT) and JDeveloper 10.1.2 (oracle.sql.Datum <- oracle.sql.DatumWithConnection <- oracle.sql.STRUCT). The class file of oracle.ord.im.OrdDoc (from 10.1.2. JDeveloper) was apparently compiled the new JDBC driver version since it contains a reference to oracle.sql.DatumWithConnection. And that class cannot be found if run on iAS 9.0.4.1 with its old JDBC version.
    I think this is a very serious problem, since it means that ADF from JDeveloper 10.1.2 is not compatible with iAS 9.0.4.1, in contradiction to the support matrix (http://www.oracle.com/technology/products/jdev/collateral/papers/10g/as_supportmatrix.html).
    Upgrading the JDBC Driver on the iAS seems to be the only clean solution for this problem (we also tried using old versions of the ordim.jar etc. but that always leads to other problems). But simply exchanging the JDBC jar-files on the server breaks the Enterprise Manager on our iAS installation.
    I have two questions:
    1) Is there a recommended workaround for the compatibility issue described above?
    2) Is there a documented and supported way to upgrade the JDBC driver of iAS 9.0.4.1? I searched OTN and MetaLink and haven't found anything about this.
    Kind Regards,
    Kay
    P.S. It is surprising that this problem is rarely mentioned in the OTN forums at all. The only relevant thread is on the JHeadstart Forum:
    JHeadstart Deployment Issue
    P.S.2
    More info on what we tested:
    We have thoroughly checked that the 10.1.2. ADF runtime was correctly deployed on our iAS 9.0.4.1. We installed a OC4J 9.0.4.0.0 standalone on the same linux machine as our iAS 9.0.4.1 and deployed our application on it, getting the same error (java.lang.NoClassDefFoundError: oracle/sql/DatumWithConnection) as on the iAS. Replacing the JDBC drivers of the OC4J standalone with the version that came with JDeveloper 10.1.2 solved the problem.

    I don't think that mixing classes from different jar file is a good idea. Nevertheless, we tested this approach already. Adding the DatumWithConnection.class from the 10.1.0.3.0 JDBC version to the jar file of the original JDBC version (of the iAS 9.0.4.1.0) caused a java.lang.VerifyError to appear.
    The DatumWithConnection class is not simply added in the newer JDBC version. It is inserted into the inheritance hierarchy of oracle.sql.STRUCT and oracle.sql.Datum. Simply providing the new class next to the old JDBC driver will not work.
    To give more information about what's wrong with updating the complete JDBC driver, I justed tested it again. To update the JDBC driver I stopped the server, changed the contents of jdbc/lib, started the server. I tried it with JDBC Version 9.2.0.5 as well as 10.1.0.3.0.
    In both cases, our own application works, i.e. no more NoClassDefFoundError caused by oracle.sql.DatumWithConnection.
    The Enterprise Manager shows strange behaviour, however. Some features work as usual but, for example, when I click on the "Applications" tab for our OC4J instance, we just get the following error shown in the browser:
    An error was encountered while loading page. Failed to initialize configuration management user session.. See base exception for details.
    Root Cause: TDU
    Resolution: See base exception for details.. TDU
    In one of the server logs I found the following stacktrace:
    java.lang.NoSuchFieldError: TDU
         at oracle.net.resolver.NavDescription.navigate(Unknown Source)
         at oracle.net.resolver.NavServiceAlias.navigate(Unknown Source)
         at oracle.net.resolver.AddrResolution.resolveAddrTree(Unknown Source)
         at oracle.net.resolver.AddrResolution.resolveAndExecute(Unknown Source)
         at oracle.net.ns.NSProtocol.establishConnection(Unknown Source)
         at oracle.net.ns.NSProtocol.connect(Unknown Source)
         at oracle.jdbc.ttc7.TTC7Protocol.connect(TTC7Protocol.java:1777)
         at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:215)
         at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:365)
         at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:547)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:347)
         at java.sql.DriverManager.getConnection(DriverManager.java:512)
         at java.sql.DriverManager.getConnection(DriverManager.java:171)
         at oracle.context.isearch.admin.users.InstanceManager.getSchemaConnection(InstanceManager.java:688)
         at test.admin__status._jspService(_admin__status.java:112)
         at com.orionserver[Oracle Application Server Containers for J2EE 10g (9.0.4.1.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.1.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.1.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.1.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:793)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.1.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    Kind Regards,
    Kay

  • Error in jsp page

    1.i create a database
    2.then i create a jsp page for welcome
    3.then another jsp page for view result
    4.then i write code for java
    here is my 1st jsp page
    <html>
    <head>
    <title>login</title>
    </head>
    <body bgcolor=pink>
    <form action="project.jsp" method=post>
    Project id
                      &nbsp
    ; <input type="text" name="proj_id"><br><br>
    Project Name                <input
    type="text" name="proj_name"><br><br>
    Client Name
                     <input
    type="text" name="client_name"><br><br>
    Project Start Date          <input type="text" name="strt_date"><br><br>
    Est Project End Date     <input type="text" name="est_date"><br><br>
    Project Manager            <input type="text"
    name="proj_mgr"><br><br>
    Est Effort
                      &nbsp
    ;   <input type="text" name="est_effort"><br><br>
    <input type="submit" name="add" value="Add" onClick=add() >
    <input type="button" name="modify" value="Modify">
    <input type="button" name="delete" value="Delete">
    <input type="button" name="assign" value="Assign">
    </form>
    </body>
    </html>
    here my java page
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.*;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.io.*;
    class base
         PreparedStatement pstmt=null;
         Connection con = null;
         Statement stmt = null;
         ResultSet rset = null;     
          int est_effort;
         String  proj_id,proj_name,client_name,strt_date,est_date,proj_mgr; 
    /*     int est_effort;
         String  Project_id,Project_name,client_name,start_date,estimated_date,Project_mgr;   */
         void add( )
              try
                   String driverName = "com.mysql.jdbc.Driver";
                   Class.forName(driverName);
                   String serverName = "192.168.10.5";
                   String mydatabase = "Trainees";
                   String url = "jdbc:mysql://" + serverName +  "/" + mydatabase; // a JDBC url
                   String username = "josep";
                   String password = "josep";
                   con = DriverManager.getConnection(url, username, password);
                   System.out.println("Connected");
              catch(Exception e)
                   System.err.println("Exception: " + e.getMessage());
              try{
                   System.out.println("Before Update1");     
    pstmt=con.prepareStatement("insert into project(proj_id,proj_name,client_name,strt_date,est_date,proj_mgr,est_effort) values  ('
    "+Project_id+" ',' "+Project_name+"',' "+client_name+" ',' "+start_date+" ',' "+estimated_date+" ',' "+Project_mgr+" ',' "+est_effort+"')");
    pstmt=con.prepareStatement("insert into project(proj_id,proj_name,client_name,strt_date,est_date,proj_mgr,est_effort) values 
                   System.out.println("Before Update2");
                   pstmt.setString(1,proj_id);
                   pstmt.setString (2,proj_name);
                   pstmt.setString (3,client_name);
                   pstmt.setString (4,strt_date);
                   pstmt.setString (5,est_date);
                   pstmt.setString(6,proj_mgr);
                   pstmt.setInt(7,est_effort);
                          pstmt.executeUpdate();
                   System.out.println("" +pstmt );
              catch(Exception e)
                   System.err.println("Exception: " + e.getMessage());
              finally
                   try
                        if(con != null)
                             con.close();
                   catch(SQLException e)
         void modify()
         void delete()
         void assign()
    public class xx extends base
         public static void main(String args[]) throws IOException
              base a= new base();
              a.add();
    here my second jsp page
    <%@ page language="java"%>
    <%@ page import="java.io.*" %>
    <%@ page import="java.sql.*"%>
    <%@page import="ss.xx"%>
    //<%@ page import="ss.xx.*"%>
    <html>
    <head><title>Welcome</title></head>
    <body bgcolor = "LightGrey">
    Welcome...
    <br>
    <%
    xx obj=new xx();
    obj.add( );
    %>
    <%
         String Project_id = request.getParameter("proj_id");
    String Project_name=request.getParameter("proj_name");
    String client_name=request.getParameter("client_name");
         String start_date=request.getParameter("strt_date");
         String estimated_date=request.getParameter("est_date");
         String Project_mgr=request.getParameter("proj_mgr");
         int est_effort=Integer.parseInt(request.getParameter("est_effort"));
    %>
    <p><font size="6">Project id :  <%= Project_id%></font></p>
    <p><font size="6">Project Name :  <%= Project_name%></font></p>
    <p><font size="6">Client Name :  <%= client_name%></font></p>
    <p><font size="6">Project Start Date :  <%= start_date%></font></p>
    <p><font size="6">Est Project End Date :  <%= estimated_date%></font></p>
    <p><font size="6">Project Manager :  <%= Project_mgr%></font></p>
    <p><font size="6">Est Effort :  <%= est_effort%></font></p>
    </body>
    </html>
    here that second jsp page error
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 12 in the jsp file: /project.jsp
    Generated servlet error:
    The type base cannot be resolved. It is indirectly referenced from required .class files
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:409)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    Uh, those aren't runtime errors, but just compilation errors. Googling on the error message can give a lot of results.
    Learn how to write Java properly. It would also help a lot if you put all the Java logic in Java classes instead of JSPs.

  • Error when Creating a ServiceClientFactory instance JAVA API

    When invoking Assembling a PDF document  quick start I'm having a compilation error when creating a ServiceClientFactory instance:
    //Create a ServiceClientFactory instance
    ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);
    The error is: The type com.adobe.idp.Context cannot be resolved. It is indirectly referenced from required .class files
    All the required jars are a path.
    What esle can be a problem ?
    Thanks, Yan

    Since you are using SOAP, you need to have the AXIS jars available.  They are in the LiveCycle_ES_SDK\client-libs\thirdparty directory:
    activation.jar (required for SOAP mode)
    axis.jar (required for SOAP mode)
    commons-codec-1.3.jar (required for SOAP mode)
      commons-collections-3.1.jar  (required for SOAP mode)
    commons-discovery.jar (required for SOAP mode)
    commons-logging.jar (required for SOAP mode)
    dom3-xml-apis-2.5.0.jar (required for SOAP mode)
    jaxen-1.1-beta-9.jar (required for SOAP mode)
    jaxrpc.jar (required for SOAP mode)
    log4j.jar (required for SOAP mode)
    mail.jar (required for SOAP mode)
    saaj.jar (required for SOAP mode)
    wsdl4j.jar (required for SOAP mode)
    xalan.jar (required for SOAP mode)
    xbean.jar (required for SOAP mode)
    xercesImpl.jar (required for SOAP mode)

  • Migration of weblogic.jar from 6.1 version to 10.3.2 version

    Hi,
    we are migrating our application from jdk 1.3 to jdk 1.6.As a part of that we are migrating Weblogic server also from 6.1 to Oracle weblogic 10.3.2. When we replaced old weblogic.jar with new weblogic.jar,we are getting following exceptions.
    1)The project was not built since its build path is incomplete. Cannot find the class file for weblogic.security.acl.BasicRealm. Fix the build path then try building this project          
    2)The type weblogic.security.acl.BasicRealm cannot be resolved. It is indirectly referenced from required .class files
    In one java class,import statement is there as follows
    import weblogic.security.acl.User     
    But it says import weblogic.security.acl.User cannot be resolved
    for the other import
    import weblogic.security.acl.AbstractListableRealm; it says AbstractListableRealm deprecated
    Please assist us what alternatives we can use to resolve the above two cases.

    Hi,
    we are migrating our application from jdk 1.3 to jdk 1.6.As a part of that we are migrating Weblogic server also from 6.1 to Oracle weblogic 10.3.2. When we replaced old weblogic.jar with new weblogic.jar,we are getting following exceptions.
    1)The project was not built since its build path is incomplete. Cannot find the class file for weblogic.security.acl.BasicRealm. Fix the build path then try building this project          
    2)The type weblogic.security.acl.BasicRealm cannot be resolved. It is indirectly referenced from required .class files
    In one java class,import statement is there as follows
    import weblogic.security.acl.User     
    But it says import weblogic.security.acl.User cannot be resolved
    for the other import
    import weblogic.security.acl.AbstractListableRealm; it says AbstractListableRealm deprecated
    Please assist us what alternatives we can use to resolve the above two cases.

  • ABAP WebAS 640 Consume Web Service

    I am trying to consume a .Net Web Service from a WebAS 640 system, but am encountering problems.  Here are the steps I am taking:
    1. In SE80, Create a new Package
    2. Right-click the package and choose Create > Enterprise Service / Web Service > Proxy Object
    3. Choose the first radio button "URL / HTTP Destination"
    4. Enter the url of the WSDL of my .Net service
    5. Type in the name of my package, and a prefix that begins with Z to put it in the customer namespace
    --->  At this point, SAP tries to generate the proxy but gives the following error:
    "<b>Cannot generate proxy (object schema missing in WSDL, see long text)</b>"
    When I click the help button for more information, I see that there is a reference in the WSDL to a namespace which is not defined in the WSDL.  This namespace is included by default in .Net - http://www.w3.org/2001/XMLSchema.  I do not know whether I should try to remove it or if there is a setting in SE80 which would cause SAP ignore the namespace reference.  Does anyone have experience with this?  
    I have pasted the help information below. 
    <b><u>Background</u></b>
    During proxy generation, an interface description in WSDL format is fetched from the Integration Builder or another source and interpreted. This WSDL document must describe the whole interface correctly.
    ==> Display WSDL Document
    <b><u>Diagnosis</u></b>
    In the WSDL document, the object
       "schema"
    from the namespace
      "http://mycompany.com"
    links to the object
       "schema"
    from the namespace
       "http://www.w3.org/2001/XMLSchema"
    However, this last object does not exist in the WSDL document.
    <b><u>System response</u></b>
    ABAP proxy generation expects that all directly and indirectly referenced objects are in the WSDL document. Therefore, no proxy can be generated for this WSDL and the system displays an error message.
    <b><u>Procedure</u></b>
    This situation can have different causes:
    Object "schema" not been defined
    Object "schema" saved in the wrong namespace
    In the reference to object "schema", the wrong name was specified
    In the reference to object "schema", the wrong namespace "http://www.w3.org/2001/XMLSchema" was specified
    Internal error in the service that constructs the WSDL document
    Internal error in ABAP proxy generation

    I have several Proxy Objects generated against .Net Web Services.  I just checked the WSDL for one of them and it has the www.w3.org reference in it:
    wsdl:definitions
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:tns="http://kww.webservices.kimball.com"
    xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    targetNamespace="http://kww.webservices.kimball.com"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    This is working fine in my WebAS 640 SP12 system.  We didn't do any manipulation to the WSDL (it straight linked off the ASMX page that generates for the WebService), nor did we do any particular settings inside SAP. 
    In your WSDL do you have a schema node in yoru wsdl:types area.  This is what mine looks like:
    <wsdl:types>
    + <s:schema elementFormDefault="qualified" targetNamespace="http://kww.webservices.kimball.com">
    - <s:element name="Req_By_Userid">
      </s:schema>
      </wsdl:types>
    Perhaps these snipets from my WSDL, that is working just fine from ABAP, will help out.

  • Sequence number different in DB than from assignSequenceNumber()

    I am using TopLink 10.1.3 DP4 (I think - inside JDev build 3565). I am attempting to use a sequence in a schema that I DO NOT OWN - I cannot make modifications tot he database sequence because there are other applications in place running against it.
    The database sequence is in a 10g database, with an interval of 1 and a cache of 20.
    My object uses the value of the sequence as the sole element of its primary key. I am creating a new object, registering it with a UnitOfWork using registerNewObject(obj). It seems that this does not make a clone, since the object returned by this method is the same identity as the object passed in.
    My project sequencing policy is set as follows:
    <project-sequencing-policy>
    <sequencing-policy>
    <preallocation-size>1</preallocation-size>
    <sequencing-type>Use native sequencing</sequencing-type>
    <name-field-handle>
    <field-handle/>
    </name-field-handle>
    <counter-field-handle>
    <field-handle/>
    </counter-field-handle>
    <sequencing-policy-table></sequencing-policy-table>
    </sequencing-policy>
    </project-sequencing-policy>
    Platform is 10g
    <platform-name>Oracle10g</platform-name>
    The sequence is accessed through a synonym (since JDev couldn't seem to reference a sequence in a different schema from a user's login).
    <sequence-number-name>EVENT_SEQ_SYN</sequence-number-name>
    <uses-sequencing>true</uses-sequencing>
    When I commit my new object, I can see the insert statements in the log claiming a value of 'x' for the primary key. The row in the database actually has a primary key of 'y', where 'x = y - preallocation size' and 'y = sequence last number - preallocation size'. I think I would get the right number if I could set the preallocation size to 0 (performance problems understood) but TopLink chokes on this at run-time.
    Is this problem familiar to anyone?
    Failing using native sequencing, I tried to write custom SQL for the insert statement, but I couldn't find any decent examples anywere on how to do that. I found in a deep google search an example that showed you could use hash (#) to reference the value of a property, but what if the value that needs to be inserted in the database is held in an indirect referenced object? For example, if I was trying to write an insert sql for a Pet object with an indirect reference (valueHolder) to its owner, and I needed to put the owner id in the row - how would I write that insert statement in the 'custom sql' pane in workbench?
    Thanks for your help.
    Dave

    Very strange case.
    I tried to reproduce it using TopLink Employee example - and couldn't.
    Here's the code:
        //  to get debug info
        session.setLogLevel(SessionLog.ALL);
        session.login();
        UnitOfWork uow = session.acquireUnitOfWork();
        Employee emp = new Employee();
        emp.setFirstName("sequencingTest");
        uow.registerNewObject(emp);
        uow.assignSequenceNumber(emp);
        uow.commit();
        System.out.println("firstName = "+emp.getFirstName() +"; id="+ emp.getId());And here's the log:
    [TopLink Info]: 2006.01.26 04:49:05.734--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--TopLink, version: Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060116)
    [TopLink Config]: 2006.01.26 04:49:06.171--DatabaseSessionImpl(18)--Connection(19)--Thread(Thread[main,5,main])--connecting(DatabaseLogin(
         platform=>Oracle9Platform
         user name=> "test"
         datasource URL=> "jdbc:oracle:thin:@localhost:1521:orcl"
    [TopLink Config]: 2006.01.26 04:49:10.140--DatabaseSessionImpl(18)--Connection(39)--Thread(Thread[main,5,main])--Connected: jdbc:oracle:thin:@localhost:1521:orcl
         User: TEST
         Database: Oracle Version: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
         Driver: Oracle JDBC driver Version: 10.1.0.4.0
    [TopLink Finest]: 2006.01.26 04:49:10.625--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--sequencing connected, state is Preallocation_NoTransaction_State
    [TopLink Finest]: 2006.01.26 04:49:10.718--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--sequence PROJ_SEQ: preallocation size 1
    [TopLink Finest]: 2006.01.26 04:49:10.718--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--sequence ADDRESS_SEQ: preallocation size 1
    [TopLink Finest]: 2006.01.26 04:49:10.718--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--sequence EMP_SEQ: preallocation size 1
    [TopLink Info]: 2006.01.26 04:49:11.453--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])-- login successful
    [TopLink Finer]: 2006.01.26 04:49:11.703--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--acquire unit of work: 48
    [TopLink Finest]: 2006.01.26 04:49:11.703--UnitOfWork(48)--Thread(Thread[main,5,main])--Register the new container bean Employee: sequencingTest
    [TopLink Finest]: 2006.01.26 04:49:11.734--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--Execute query ValueReadQuery()
    [TopLink Fine]: 2006.01.26 04:49:11.750--DatabaseSessionImpl(18)--Connection(39)--Thread(Thread[main,5,main])--SELECT EMP_SEQ.NEXTVAL FROM DUAL
    [TopLink Finest]: 2006.01.26 04:49:12.328--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--sequencing preallocation for EMP_SEQ: objects: 1 , first: 3,469, last: 3,469
    [TopLink Finest]: 2006.01.26 04:49:12.328--UnitOfWork(48)--Thread(Thread[main,5,main])--assign sequence to the object (3,469 -> Employee: sequencingTest )
    [TopLink Finer]: 2006.01.26 04:49:12.328--UnitOfWork(48)--Thread(Thread[main,5,main])--begin unit of work commit
    [TopLink Finer]: 2006.01.26 04:49:12.421--DatabaseSessionImpl(18)--Connection(39)--Thread(Thread[main,5,main])--begin transaction
    [TopLink Finest]: 2006.01.26 04:49:12.437--UnitOfWork(48)--Thread(Thread[main,5,main])--Execute query InsertObjectQuery(Employee: sequencingTest )
    [TopLink Finest]: 2006.01.26 04:49:12.625--UnitOfWork(48)--Thread(Thread[main,5,main])--Assign return row DatabaseRecord(
         EMPLOYEE.VERSION => 1)
    [TopLink Fine]: 2006.01.26 04:49:12.625--UnitOfWork(48)--Connection(39)--Thread(Thread[main,5,main])--INSERT INTO EMPLOYEE (EMP_ID, L_NAME, F_NAME, GENDER, END_DATE, START_DATE, MANAGER_ID, START_TIME, END_TIME, ADDR_ID, VERSION) VALUES (3469, NULL, 'sequencingTest', NULL, NULL, NULL, NULL, {t '09:00:00'}, {t '17:00:00'}, NULL, 1)
    [TopLink Fine]: 2006.01.26 04:49:12.640--UnitOfWork(48)--Connection(39)--Thread(Thread[main,5,main])--INSERT INTO SALARY (SALARY, EMP_ID) VALUES (0, 3469)
    [TopLink Finer]: 2006.01.26 04:49:12.781--DatabaseSessionImpl(18)--Connection(39)--Thread(Thread[main,5,main])--commit transaction
    [TopLink Finer]: 2006.01.26 04:49:12.796--UnitOfWork(48)--Thread(Thread[main,5,main])--end unit of work commit
    [TopLink Finer]: 2006.01.26 04:49:12.796--UnitOfWork(48)--Thread(Thread[main,5,main])--release unit of work
    firstName = sequencingTest; id=3469
    If I understood correctly, the problem is x showing up in insert as a value to be assigned to PK and y actually inserted into the db. If that's the case could there be a BeforeInsert trigger on the table? To test try inserting through jdbc using concrete pk value.

  • Cannot generate proxy

    Does anyone have an idea if the WSDL is wrong or if it's an XI problem?
    thanks
    Johann Marty
    TeamWork Management SA
    Geneva
    Cannot generate proxy (object  missing in WSDL, see long text)
    Message no. SPRX084
    Background
    During proxy generation, an interface description in WSDL format is fetched from the Integration Builder or another source and interpreted. This WSDL document must describe the whole interface correctly.
    ==> Display WSDL Document
    Diagnosis
    In the WSDL document, the object
       "<message name="existDocument"> <part name="invo..."
    from the namespace
      "http://tempuri.org/"
    links to the object
    from the namespace
    However, this last object does not exist in the WSDL document.
    System response
    ABAP proxy generation expects that all directly and indirectly referenced objects are in the WSDL document. Therefore, no proxy can be generated for this WSDL and the system displays an error message.
    Procedure
    This situation can have different causes:
    Object "" not been defined
    Object "" saved in the wrong namespace
    In the reference to object "", the wrong name was specified
    In the reference to object "", the wrong namespace "" was specified
    Internal error in the service that constructs the WSDL document
    Internal error in ABAP proxy generation

    Hi,
    Just cross check with your configuration details.
    Also try to recreate the proxy and activate it.-
    /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
    Regards,
    Moorthy

  • How to use third party themes in swing application?

    I want to use some third party themes (like [http://www.javasoft.de/synthetica/themes/|Synthetica] ) in my swing appliaction. i am using eclipse ide, got the jar file of theme and added the following code(according to the readme file i got with theme) with my application code
    try
       UIManager.setLookAndFeel(new SyntheticaBlackMoonLookAndFeel());
      catch (Exception e)
       e.printStackTrace();
      }but after this modification its showing the following error
    The type de.javasoft.plaf.synthetica.SyntheticaLookAndFeel cannot be resolved. It is indirectly referenced from required .class fileswhat does this mean? i tried searching on net but cant really find any useful answers
    Contents of Readme file:
    System Requirements
    ===================
    Java SE 5 (JRE 1.5.0) or above
    Synthetica V2.2.0 or above
    Integration
    ===========
    1. Ensure that your classpath contains all Synthetica libraries (including
       Synthetica's core library 'synthetica.jar').
    2. Enable the Synthetica Look and Feel at startup time in your application:
        import de.javasoft.plaf.synthetica.SyntheticaBlackMoonLookAndFeel;
        try
          UIManager.setLookAndFeel(new SyntheticaBlackMoonLookAndFeel());
        catch (Exception e)
          e.printStackTrace();
        }   

    It seems that you have the library that contains the SyntheticaBlackMoonLookAndFeel class, but you don't have the library which contains the SyntheticaLookAndFeel class which is needed by the LaF you're trying to load.
    And their website even says in clear english: "The 'BlackMoon Look and Feel' can not be used standalone (without Synthetica)".

  • MDX not working in Power View on sharepoint 2013

        I have this MDX statement below that should be able to dynamically give me a % of total for any dimension.  IN power View (sharepoint 2013)
    I am getting an error.  It works in Excel and works in the AS browser but will not seem to work in power view.  Any ideas on how to rewrite it so that it may work.  I am surprised I cannot find anything on this online about this issue. 
    When you highlight the "#ERROR!" in Power view it gives a long description of
    "The Axis Function was indirectly referenced from the context of a statement other than SELECT. Evaluations of Expressions involving this function succeed only
    when indirectly triggered by a SELECT statement".
    CREATEMEMBERCURRENTCUBE.MEASURES.[Percent
    of Total] AS 
    //Used to get % from total
    IIF([Measures].[Total Count] = 0,
    NULL,
    IIF(isempty( ([Measures].[Total Count],
    Axis(1)(0)(Axis(1)(0).Count-
    1).Dimension.CurrentMember.Parent
    )), 1,
        [Measures].[Total Count] / ([Measures].[Total Count],
    Axis(1)(0)(
    Axis(1)(0).Count-
    1 ).Dimension.CurrentMember.Parent))),
    FORMAT_STRING="#,##0.00
    %;-#,##0.00 %";

    Hey Mike,  Thank you very much for the answer.  Just need a little more help please???
    I have added two separate MDX statements that should get the individual % for these two separate dimensions. 
    1. First does it look correct from what your saying individually. Would you write it different?
    2. Next can you show me the MDX that would combine them into 1 measure.  Once I can see how these two get combined into 1 measure I should be able to do this for the rest of the dimensions. 
    3. Will Power View ever allow Axis function?  Just seems strange that it works in Excel Pivot but not in Power View.
    WITH MEMBER [Measures].[Percent] AS
    Case
    // Test to avoid division by zero.
    When IsEmpty ([Measures].[Total Count]) Then Null
    // Test for current coordinate being on the (All) member.
    When [Status].[Status Name].CurrentMember.Level Is [Status].[Status Name].[(All)] Then 1
    Else ( [Status].[Status Name].CurrentMember, [Measures].[Total Count] )
    / ( [Status].[Status Name].CurrentMember.Parent, [Measures].[Total Count] )
    End
    , FORMAT_STRING ="#,##0.00 %;-#,##0.00 %"
    SELECT
    { [Measures].[Total Count],[Measures].[Percent] } ON COLUMNS,
    { [Status].[Status Name].[Status Name]} ON ROWS
    FROM [Report]
    WITH MEMBER [Measures].[Percent2] AS
    Case
    // Test to avoid division by zero.
    When IsEmpty ([Measures].[Total Count]) Then Null
    // Test for current coordinate being on the (All) member.
    When [Order Placed Date].[Order Placed Date].CurrentMember.Level Is [Order Placed Date].[Order Placed Date].[(All)] Then 1
    Else ( [Order Placed Date].[Order Placed Date].CurrentMember, [Measures].[Total Count] )
    / ( [Order Placed Date].[Order Placed Date].CurrentMember.Parent, [Measures].[Total Count] )
    End
    , FORMAT_STRING ="#,##0.00 %;-#,##0.00 %"
    SELECT
    { [Measures].[Total Count],[Measures].[Percent2] } ON COLUMNS,
    { [Order Placed Date].[Order Placed Date].[Order Placed Year]} ON ROWS
    FROM [Report]

Maybe you are looking for