Error when use stored procedure in Named Query and Custom SQL

This is a toplink development on Jdev 1013. A package with a function is created which returns a "ref cursor" in a oracle 9i database. I tried to access the function in jdev toplink descriptor editor either through custom sql (Readall) or a named query (procedureTest) and I got java.sql.SQLException: SQL string is not Query. Note: I am NOT talking about programatic storedprocedurecall object.
The client access code is following (where error was thrown):
results = (Collection) session.executeQuery("procedureTest", WuTest.class);

Any responses? Thanks.

Similar Messages

  • ESB throwing error when invoking Stored Procedure

    Hi there,
    I'm using SOA Suite 10.1.3.4. I have an ESB service which stores orders from a IBM Maximo system(Procurement system) into Oracle database using stored procedure. I can insert the orders through the endpoint URL using the test client provided by SOA Suite ESB console. But when Maximo sends the orders i'm getting errors as below. I can also see that the input is null when called the procedure. But in the instance of the ESB Console i can see the Payload sent by the Maximo system. Not sure where and why the payload disappears before calling the stored procedure.
    I have been battling on this for couple of days. Any help on this is much appreciated.
    <2009-01-09 11:21:12,003> <DEBUG> <default.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> client acquired
    <2009-01-09 11:21:12,003> <DEBUG> <default.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> acquire unit of work: 25523441
    <2009-01-09 11:21:12,003> <DEBUG> <default.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> TX beginTransaction, status=STATUS_ACTIVE
    <2009-01-09 11:21:12,003> <DEBUG> <default.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.sp.AbstractStoredProcedure execute> BEGIN APSEZ.APS_MAXIMO_INTERFACE.APS_RECIEVE_POV(I_PO_IN_OBJ=>?); END;
    <2009-01-09 11:21:12,003> <DEBUG> <default.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.sp.AbstractStoredProcedure execute> Bindings [I_PO_IN_OBJ=>APSEZ.GET_PO_IN_OBJ(null)]
    ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the APSEZ.APS_MAXIMO_INTERFACE.APS_RECIEVE_POV API. Cause: java.sql.SQLException: ORA-06531: Reference to uninitialized collection
    ORA-06512: at "APSEZ.APS_MAXIMO_INTERFACE", line 52
    ORA-06512: at line 1
    [Caused by: ORA-06531: Reference to uninitialized collection
    ORA-06512: at "APSEZ.APS_MAXIMO_INTERFACE", line 52
    ORA-06512: at line 1
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
         at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:469)
         at oracle.tip.adapter.db.sp.SPUtil.createResourceException(SPUtil.java:172)
         at oracle.tip.adapter.db.sp.AbstractStoredProcedure.execute(AbstractStoredProcedure.java:116)
         at oracle.tip.adapter.db.sp.SPInteraction.executeStoredProcedure(SPInteraction.java:134)
         at oracle.tip.adapter.db.DBInteraction.executeStoredProcedure(DBInteraction.java:1014)
         at oracle.tip.adapter.db.DBInteraction.execute(DBInteraction.java:232)
         at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:486)
         at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeInputOnlyOperation(WSIFOperation_JCA.java:739)
         at oracle.tip.esb.server.common.wsif.WSIFInvoker.executeOperation(WSIFInvoker.java:894)
         at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:810)
         at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:832)
         at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.nextService(OutboundAdapterService.java:223)
         at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.processBusinessEvent(OutboundAdapterService.java:135)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(InitialEventDispatcher.java:406)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:164)
         at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1988)
         at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1467)
         at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:205)
         at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:136)
         at oracle.tip.esb.server.service.EsbRouterSubscription.onBusinessEvent(EsbRouterSubscription.java:309)
         at oracle.tip.esb.server.dispatch.EventDispatcher.executeSubscription(EventDispatcher.java:138)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscription(InitialEventDispatcher.java:545)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscriptions(InitialEventDispatcher.java:527)
         at oracle.tip.esb.server.dispatch.EventDispatcher.dispatchRoutingService(EventDispatcher.java:94)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:160)
         at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1988)
         at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1467)
         at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.raiseEvent(EventOracleSoapProvider.java:399)
         at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.processMessage(EventOracleSoapProvider.java:225)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:956)
         at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:466)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:96)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:194)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Thanks
    Dhilip

    I doubt JPublisher has anything to do with this issue as JDeveloper is the tool used for SOA Development. The issue here is with the process that gets invoked by maximo. It is not populating the data correctly, and nulls are being sent to the adapter. When nulls are sent this causes issues in the code because it cannot initilise varrays in the stored procedure.
    Therefore the fix is to sort this issue out is to stop it sending nulls, if nulls are valid form the maximo system then the stored procedure needs to manage these. This can be done by setting defaults for the inputs.
    cheers
    James

  • Using stored procedures for insert, update and delete

    Hello all;
    We have a question from our customer (who is the DBA), who has not in the past used TopLink, about whether it makes sense to tie TopLink into existing stored procedures to save and retrieve informations.
    Is it possible?
    Is there any circumstance under which it is a good idea?
    Thanks

    In TopLink any operation for which TopLink generates SQL, can be replaced by custom SQL, or a stored procedure call.
    Custom SQL or stored procedures can be used for each of the descriptor's CRUD operations, but also for mapping queries and named queries. The Mapping Workbench only supports defining custom SQL for the descriptor CRUD operations and named queries, so many of the stored procedures call from the descriptor and mappings will need to be done through amendment methods.
    Whether it makes sense or not depends on the application and the company and their requirements. It will add significant overhead to the development process to have to define and maintain all of the stored procedures, and the stored procedure calls in the descriptors. You may wish develop your application using TopLink generated SQL, and once you have the model and queries stabilized then switch to using stored procedures.
    Whether it is a good idea depends on the application and the company and their requirements. Stored procedures may give the DBA more freedom to change the data-model once in production, and may allow for adding database-level security checks. In general using stored procedures will not improve performance if the procedures contain the same SQL that would have be executed anyway, but they may allow for the DBA to tune the SQL better.

  • UTL_HTTP working in SQL Query, error when used in procedure

    Hi,
    We are trying to call web service from stored procedure .
    When we run the utl_http.request independently in a query its working fine but when we put that in a stored procedure we are unable to connect. Getting HTTP request failed error.
    select utl_http.request("SSL_URL",
                            null,
                            "Wallet Details",
                            'password')
    from dual;
    But the same query if we put into procedure getting the error as below,
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1722
    ORA-28860: Fatal SSL error
    All the parameters are set properly w.r.t ACL and Oracle Wallet for SSL .
    grant execute on UTL_HTTP to &&SCHEMA_NAME;
    --Step1 grant on UTL_HTTP package to schema
    grant execute on UTL_HTTP to &&SCHEMA_NAME;
    Created ACL using the below scripts.
    begin
    dbms_network_acl_admin.create_acl (
    acl => 'utlpkg.xml',
    description => 'Normal Access',
    principal => 'CONNECT',
    is_grant => TRUE,
    privilege => 'connect',
    start_date => null,
    end_date => null
    end;
    begin
    dbms_network_acl_admin.assign_acl (
    acl => 'utlpkg.xml',
    host => '*',
    lower_port => 1,
    upper_port => 35000);
    end;
    begin
    dbms_network_acl_admin.add_privilege (
    acl => 'utlpkg.xml',
    principal => '&&SCHEMA_NAME',
    is_grant => TRUE,
    privilege => 'connect',
    start_date => null,
    end_date => null);
    end;
    Thanks in advance for the help!!!!!!!

    Any responses? Thanks.

  • SSRS dataset throws error when another stored procedure is called inside dataset stored procedure

    Hello;
    I am using Report Build 3.0, I have a simple report which gets data using dataset which is created from a Stored Procedure. I have another stored procedure which updates the data in the table which is used for the report. I want to get the live data on report everytime
    the report is run so that I call that stored procedure (sp_updatedata) inside my report dataset stored procedure and here where my report fails as it throws error while creating dataset.
    Here is sample:
    sp_updatedata (this only returns "Command(s) completed successfully"
    Create Proce sp_getReportData
    As
    Begin
    Exec sp_updatedata -- I call it to update the data before it displays on the report
    Select * from customers
    End
    If I remove this line it works.
    Exec sp_updatedata -- I call it to update the data before it displays on the report
    Thanks
    Essa Mughal

    Hi MESSA,
    According to your description, you create a dataset based on a stored procedure. In this procedure, it calls another procedure. Now it throws error when creating dataset. Right?
    In Reporting Services, when creating dataset, all the query or stored procedure will be executed in SSMS. So if the procedure can be executed in SSMS, it supposed to be working in SSRS. However, it has a limitation in SSRS. In a dataset, it can only return
    one result set.
    In this scenario, I don't think it's the issue of calling other procedure inside of procedure. Because we tested in our local environment, it works fine. I guess the sp_updatedata returns a result set, and the "select * from customers" returns
    another result set. This might be the reason cause the error.
    Reference:
    Query Design Tools in Report Designer SQL Server Data Tools (SSRS)
    Reporting Services Query Designers
    If you still have any question, please post the error message and the store procedure (sp_updatedata).
    Best Regards,
    Simon Hou

  • Get Error on using Stored Procedure to use it in Crystal Reports XI

    Post Author: Krüger
    CA Forum: Integrated Solutions
    Hello, I need your help please. I use Oracle 10 and now write a correct compiled stored procedure: this procedure is really simple how you can see:set pagesize 50000set linesize 1000set wrap offset head offset feedback offset trimspool onset serveroutput onset verify offcreate or replace procedure GetFirmenNachMontag is  lutype varchar2(10);BEGINDECLAREbegin lutype:='Test';  dbms_output.put_line(lutype);END;END; In using in sql directly it is really all fine. But when I want to integrat it in a simple report in Crystal I get the error unknow databank connector error. I hope that somebody can help me please. With best regardsM.Krüger 

    If you are using MSSQL SERVER then try creating a stored procedure like this
    create proc Name
    select * from Table
    by executing this in sql query analyzer will create a stored procedure that returns all the data from Table
    here is the syntax to create SP
    Syntax
    CREATE PROC [ EDURE ] procedure_name [ ; number ]
        [ { @parameter data_type }
            [ VARYING ] [ = default ] [ OUTPUT ]
        ] [ ,...n ]
    [ WITH
        { RECOMPILE | ENCRYPTION | RECOMPILE , ENCRYPTION } ]
    [ FOR REPLICATION ]
    AS sql_statement [ ...n ]
    Now Create new report and create new connection to your database and select stored procedure and add it to the report that shows all the columns and you can place the required fields in the report and refresh the report.
    Regards,
    Raghavendra
    Edited by: Raghavendra Gadhamsetty on Jun 11, 2009 1:45 AM

  • Got error when creating stored procedure

    Hi,
    I am a rookie in Oracle. I created a stored procedure:
    create or replace procedure my_first_sp
    as
    begin
    select cid from actions where rownum<3;
    end;
    And I got an error : "**** compilation error"
    After I "show error" I got the description to see a "into" is expected.
    But if I change the select statement to a insert statement, no error.
    Please advice.
    Thanks a lot.

    When you have a standalone SELECT statement in PL/SQL, you have to have an INTO clause if you want the results to be stored in a local variable.
    In your case, it would appear that you want your query to return multiple rows. In that case, you'd want to create a cursor, i.e.
    CREATE OR REPLACE my_first_sp
    AS
    BEGIN
      FOR cursor_name IN (SELECT cid FROM actions WHERE rownum < 3)
      LOOP
        <<Do something>>
      END LOOP;
    END;I would also tend to suspect that your SELECT statement is wrong. This statement will return an arbitrary two cid values from the actions table, which is not likely what you want.
    Justin

  • Error when calling Stored Procedure from backing bean

    I am using Jdeveloper 11.1.1.6 and am trying to utilize the following URL to execute a SP from a backing bean: http://ramannanda.blogspot.com/2011/11/optimized-update-insert-adf.html
    The reason I am looking at this is currently I have coded my backing bean to perform inserts and deletes through the use of my View Objects. I am performing up to a combined 5-10K inserts and deletes and the performance is rather slow. If there is a way to tune the view objects as well as the commit to be much faster, that is the prefered method. If that can't be done then I would like to figure out the approach identified in the URL.
    I have highlighted a section of code below that is failing when using the URL approach. It errors out with the following exception: javax.el.ELException: oracle.jbo.JboException: java.sql.SQLException: Internal Error: Inconsistent catalog view
    Do you have thoughts as to what might cause this exception.
    create or replace
    type TYP_TEST_R is object
         Test_Id Number(5,0) ,
         Test_Num Number(7,0)
    create or replace
    type TYP_TEST_TB as table of TYP_TEST_R;
    private void myMethod(MyTableVORowImpl pCurrentRow) {
    int i = 0;
    DCIteratorBinding lDciter =
    (DCIteratorBinding)getBindings().get("MyTable1Iterator");
    MyAppModuleAMImpl lMyAppModuleAMImpl =
    (MyAppModuleAMImpl)lDciter.getViewObject().getApplicationModule();
    Connection lConnection =
    lMyAppModuleAMImpl.getDBTransaction().createStatement(1).getConnection();
    StructDescriptor lTblRecordStructType =
    StructDescriptor.createDescriptor("DBADMIN.TYP_TEST_R",
    lConnection);
    .....<additional logic here>......
    Object lArray[] = new Object[lSortedDifferences.size()];
    while (........) {
    Number lNumber = .......
    Number lDifferentStore = (Number)lDifferentIterator.next();
    STRUCT lTempStruct =+_
    new STRUCT(lTblRecordStructType, lConnection,+_
    *new Object[] { pCurrentRow.getTestId(),*+_
    lDifferentStore });+_
    lArray[i] = lTempStruct;
    i = i + 1;
    //create array structure descriptor
    ArrayDescriptor lTableDesc =
    ArrayDescriptor.createDescriptor("DBADMIN.TYP_TEST_TB",
    lConnection);
    //create an Array type with given structure definition
    ARRAY lTableArray =
    new ARRAY(lTableDesc, lConnection, lArray);
    String lCallableProcedureStatement =
    " begin DBADMIN.SP_TEST(?,?); end;";
    OracleCallableStatement lOracleCallableStatement = null;
    lOracleCallableStatement =
    (OracleCallableStatement)lMyAppModuleAMImpl.getDBTransaction().createCallableStatement(lCallableProcedureStatement,
    0);
    lOracleCallableStatement.setARRAY(1, lTableArray);
    lOracleCallableStatement.setString(2,
    (String)ADFUtil.evaluateEL("#{sessionScope['UserName']}"));
    lOracleCallableStatement.executeUpdate();
    }

    That was helpful and now I can execute up to my last line of code: "lOracleCallableStatement.executeUpdate();"
    This code executes the SP.
    My SP is as follows:
    create or replace
    PROCEDURE          SP_TEST
    *( param1 IN TYP_TEST_TB,*
    param2 IN VARCHAR2) as
    CURSOR for_insert_csr IS
    SELECT *
    FROM TABLE(param1) T1;
    temp_update TYP_TEST_R;
    BEGIN
    FOR temp_update IN for_insert_csr
    LOOP
    -- do stuff in this loop
    END LOOP;
    end;
    When trying to execute the SP, I get the following error:
    +<LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5+
    javax.el.ELException: oracle.jbo.JboException: java.sql.SQLException: ORA-06550: line 1, column 7:*
    PLS-00201: identifier DBADMIN.SP_TEST must be declared*
    ORA-06550: line 1, column 7:*
    PL/SQL: Statement ignored*
    at com.sun.el.parser.AstValue.invoke(Unknown Source)*
    at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)*
    at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1300)*
    at oracle.adf.view.rich.component.UIXDialog.broadcast(UIXDialog.java:97)*
    at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)*
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)*
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)*
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)*
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)*
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)*
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)*
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)*
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)*
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)*
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386)*
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)*
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)*
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)*
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)*
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)*
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)*
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)*
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)*
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)*
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)*
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)*
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)*
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)*
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)*
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)*
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)*
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)*
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)*
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)*
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)*
    at java.security.AccessController.doPrivileged(Native Method)*
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)*
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)*
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)*
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)*
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)*
    Do you have any suggestions on what I might want to try?

  • Unspecified Error when submitting stored procedure

    I am having problems submitting stored procedures against Oracle 8i using OraOLEDB. I am using the ODBC escape syntax in the command text. If I attempt to pass any of the following three characters @ or ! or ~ in the text of a varchar parameter an unspecified error 80004005 occurs, without these characters the process works fine.
    The following VB 6.0 code fragment illustrates the problem:
    Dim a As New ADODB.Connection
    Dim b As New ADODB.Command
    Dim c As ADODB.Recordset
    a.ConnectionString = "DistribTX=0;SPPrmsLOB=1;PLSQLRSet=1;Provider=OraOLEDB.Oracle;Data Source=ORACLE1;User Id=XXXX;Password=XXXX"
    a.Open
    b.CommandText = "{call gpa.dp_gpa_report.list('@MDU')}"
    Set b.ActiveConnection = a
    Set c = b.Execute
    Any advice would be appreciated. Note that if is use SQL Plus to execute gpa.dp_gpa_report.list('@MDU') it executes with not problem.
    More Information
    Software Versions:
    Windows 2000 Pro SP2
    MDAC 2.6
    OraOLEDB.dll - 8.1.7.0
    Oracle 8.1.7.0.0
    I have run the OLE-DB trace facility and it returns the following info where the error occurs:
    COracleCommand::SetCommandText(hr=80004005): 2558
    TID: 304 (ENTRY)
    The stored procedure gpa.dp_gpa_report.list is a wrapper over a table which has the following structure:
    REPORT_CODE NOT NULL VARCHAR2(50)
    EMPLOYEE_ID NOT NULL GRD.GRD_ID_TYP
    FUND_SCREEN_FILTER NUMBER(1)
    MODEL_SORT_FIELD VARCHAR2(2000)
    CLIENT_SORT_FIELD VARCHAR2(2000)
    FUND_LIST_CODE VARCHAR2(10)
    FUND_MODEL VARCHAR2(10)
    BENCHMARK_INDEX VARCHAR2(10)
    BENCHMARK_IS_TEMPLATE VARCHAR2(1)
    VALUE_DATE DATE
    HELD_STOCKS VARCHAR2(1)
    PRICE_PERFORMANCE VARCHAR2(1)
    COMPANY_INFORMATION VARCHAR2(1)
    ANALYSTS_DATA VARCHAR2(1)
    REPORT_FORMAT NUMBER(1)
    INCLUDE_SECTOR_L1 VARCHAR2(1)
    INCLUDE_SECTOR_L2 VARCHAR2(1)
    INCLUDE_SECTOR_L3 VARCHAR2(1)
    INCLUDE_SECTOR_L4 VARCHAR2(1)
    INCLUDE_ASSETS VARCHAR2(1)
    FUND_HOLDINGS VARCHAR2(1)
    INDEX_WEIGHTINGS VARCHAR2(1)
    ACTIVE_POSITIONS VARCHAR2(1)
    NO_OF_ACTIVE_POSITIONS NUMBER(5)
    ACTIVE_POSITIONS_GT_THAN NUMBER
    LIST_SORT_FIELD VARCHAR2(2000)
    AP_SORT_FIELD VARCHAR2(2000)
    INDEX_IND_STRUCT_CODE VARCHAR2(6)
    INDEX_CURRENCY VARCHAR2(6)
    ALWAYS_LATEST_DATE VARCHAR2(1)
    PERCENTAGES VARCHAR2(1)
    MARKET_VALUES VARCHAR2(1)
    HOLDINGS VARCHAR2(1)
    ISIN VARCHAR2(1)
    SEDOL VARCHAR2(1)
    DEPOT VARCHAR2(1)
    TRADED_COUNTRY_CODE VARCHAR2(1)
    SECTOR_LOWEST_CODE VARCHAR2(1)
    GIM2_ASSET_UNIVERSE VARCHAR2(6)
    GIM2_INCLUDE_CASH VARCHAR2(1)
    TRITON_ASSET_UNIVERSE VARCHAR2(6)
    TRITON_INCLUDE_CASH VARCHAR2(1)
    MODEL_ASSET_UNIVERSE VARCHAR2(6)
    MODEL_INCLUDE_CASH VARCHAR2(1)
    MARKET_CAP_LOCAL VARCHAR2(1)
    MARKET_CAP_USD VARCHAR2(1)
    ADR_INFO VARCHAR2(1)
    FMC_ASSET_UNIVERSE VARCHAR2(6)
    FMC_INCLUDE_CASH VARCHAR2(1)

    I am having problems submitting stored procedures against Oracle 8i using OraOLEDB. I am using the ODBC escape syntax in the command text. If I attempt to pass any of the following three characters @ or ! or ~ in the text of a varchar parameter an unspecified error 80004005 occurs, without these characters the process works fine.
    The following VB 6.0 code fragment illustrates the problem:
    Dim a As New ADODB.Connection
    Dim b As New ADODB.Command
    Dim c As ADODB.Recordset
    a.ConnectionString = "DistribTX=0;SPPrmsLOB=1;PLSQLRSet=1;Provider=OraOLEDB.Oracle;Data Source=ORACLE1;User Id=XXXX;Password=XXXX"
    a.Open
    b.CommandText = "{call gpa.dp_gpa_report.list('@MDU')}"
    Set b.ActiveConnection = a
    Set c = b.Execute
    Any advice would be appreciated. Note that if is use SQL Plus to execute gpa.dp_gpa_report.list('@MDU') it executes with not problem.
    More Information
    Software Versions:
    Windows 2000 Pro SP2
    MDAC 2.6
    OraOLEDB.dll - 8.1.7.0
    Oracle 8.1.7.0.0
    I have run the OLE-DB trace facility and it returns the following info where the error occurs:
    COracleCommand::SetCommandText(hr=80004005): 2558
    TID: 304 (ENTRY)
    The stored procedure gpa.dp_gpa_report.list is a wrapper over a table which has the following structure:
    REPORT_CODE NOT NULL VARCHAR2(50)
    EMPLOYEE_ID NOT NULL GRD.GRD_ID_TYP
    FUND_SCREEN_FILTER NUMBER(1)
    MODEL_SORT_FIELD VARCHAR2(2000)
    CLIENT_SORT_FIELD VARCHAR2(2000)
    FUND_LIST_CODE VARCHAR2(10)
    FUND_MODEL VARCHAR2(10)
    BENCHMARK_INDEX VARCHAR2(10)
    BENCHMARK_IS_TEMPLATE VARCHAR2(1)
    VALUE_DATE DATE
    HELD_STOCKS VARCHAR2(1)
    PRICE_PERFORMANCE VARCHAR2(1)
    COMPANY_INFORMATION VARCHAR2(1)
    ANALYSTS_DATA VARCHAR2(1)
    REPORT_FORMAT NUMBER(1)
    INCLUDE_SECTOR_L1 VARCHAR2(1)
    INCLUDE_SECTOR_L2 VARCHAR2(1)
    INCLUDE_SECTOR_L3 VARCHAR2(1)
    INCLUDE_SECTOR_L4 VARCHAR2(1)
    INCLUDE_ASSETS VARCHAR2(1)
    FUND_HOLDINGS VARCHAR2(1)
    INDEX_WEIGHTINGS VARCHAR2(1)
    ACTIVE_POSITIONS VARCHAR2(1)
    NO_OF_ACTIVE_POSITIONS NUMBER(5)
    ACTIVE_POSITIONS_GT_THAN NUMBER
    LIST_SORT_FIELD VARCHAR2(2000)
    AP_SORT_FIELD VARCHAR2(2000)
    INDEX_IND_STRUCT_CODE VARCHAR2(6)
    INDEX_CURRENCY VARCHAR2(6)
    ALWAYS_LATEST_DATE VARCHAR2(1)
    PERCENTAGES VARCHAR2(1)
    MARKET_VALUES VARCHAR2(1)
    HOLDINGS VARCHAR2(1)
    ISIN VARCHAR2(1)
    SEDOL VARCHAR2(1)
    DEPOT VARCHAR2(1)
    TRADED_COUNTRY_CODE VARCHAR2(1)
    SECTOR_LOWEST_CODE VARCHAR2(1)
    GIM2_ASSET_UNIVERSE VARCHAR2(6)
    GIM2_INCLUDE_CASH VARCHAR2(1)
    TRITON_ASSET_UNIVERSE VARCHAR2(6)
    TRITON_INCLUDE_CASH VARCHAR2(1)
    MODEL_ASSET_UNIVERSE VARCHAR2(6)
    MODEL_INCLUDE_CASH VARCHAR2(1)
    MARKET_CAP_LOCAL VARCHAR2(1)
    MARKET_CAP_USD VARCHAR2(1)
    ADR_INFO VARCHAR2(1)
    FMC_ASSET_UNIVERSE VARCHAR2(6)
    FMC_INCLUDE_CASH VARCHAR2(1)

  • IllegalArgumentException when using Constructor expression in Named Query.

    I have the following JPQL-query:
    SELECT NEW se.callista.test.dto.EmployeeReportData(e.firstName, e.lastName, a.city, e.employmentPeriod.startDate) FROM Employee e JOIN e.address a ORDER BY e.lastName, e.firstNamewhere EmployeeReportData is a dto (not an entity). The query works fine when running it as a normal query. When I put it as a named query however, I get the following error message when trying to execute it: java.lang.IllegalArgumentException: Object: se.callista.test.dto.EmployeeReportData@10f9644 is not a known entity type.
    I can't find anything in the JPA-spec that says a named query cannot contain a constructor expression - am I missing something?
    Found the error. It works fine now :)
    Message was edited by:
    Sofia_Jonsson

    I had the same problem.
    It seems that the Entity class is not loaded by the JVM at the moment of calling createNamedQuerey(string).
    I've solved this problem by loading the entity class manually in the caller by calling "Class.forName(string)" and passing the entity's class name as a parameter.

  • Error when using "inlist operator" in the query filter of Webi 3.1

    Hi,
    We are currently in the process of migrating Deski to webi (BOXI 3.1).
    The problem is, Deski is using the "inlist" operator which is working fine but after migrating to webi the inlist operator in the query filter is throwing the below error,
    *Error Message :*
    A database error occured. The database error text is: ORA-00907: missing right parenthesis. (WIS 10901)
    Appreciate your assistance on this.
    Thanks !
    Regards,
    Perialt

    Karthik ,
    Yes I am seeing an additional paranthesis in Webi SQL query.
    For example plz consider the product table below,
    SELECT
    Product.ID,
    Product.Name
    FROM Product
    WHERE
    Product.Name IN ( @Prompt('4) Name:','C','Product\Name-M',multi,free)  )
    As a work around in Custom SQL, If I remove the paranthesis the below query is running fine in webi
    SELECT
    Product.ID,
    Product.Name
    FROM Product
    WHERE
      Product.Name IN  @Prompt('4) Name:','C','Product\Name-M',multi,free) 
    But I want a permanent solution.

  • Getting error when calling stored procedure

    I have created 2 stored procedures as follows
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    ALTER PROCEDURE [dbo].[REAL_PUSH_UPDATE_REPORTS] AS
    BEGIN TRANSACTION
         DECLARE @cursor_contact_id bigint;
         DECLARE cursorContactId Cursor FOR SELECT distinct(contact_id) FROM [dbo].credit_reports WHERE loan_id IS NULL;
         OPEN cursorContactId;
         Fetch NEXT FROM cursorContactId INTO @cursor_contact_id;
    IF(@@FETCH_STATUS <> 0)
    PRINT 'There are no LOAN contacts are there with loan ID null, May be you have already executed this procedure'
         WHILE(@@FETCH_STATUS =0)
         BEGIN
    PRINT @cursor_contact_id;
              EXECUTE REAL_UPDATE_REPORTS @cursor_contact_id;
              Fetch NEXT FROM cursorContactId INTO @cursor_contact_id
         END
         CLOSE cursorContactId;
         DEALLOCATE cursorContactId;
         IF (@@Error = 0)
              BEGIN
                   COMMIT TRANSACTION;
              END
         ELSE
              BEGIN
                   ROLLBACK TRANSACTION;
              END
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    ALTER PROCEDURE [dbo].[REAL_UPDATE_REPORTS] @initial_contact_id bigint AS
    BEGIN TRANSACTION
         DECLARE @loan_count bigint;
         DECLARE cursorLoanID Cursor FOR (SELECT l.loan_id loanIDList FROM (([dbo].loans l LEFT OUTER JOIN [dbo].loan_requests lr
    ON lr.loan_id=l.loan_id
    AND lr.contact_id = l.primary_borrower_id)
    LEFT OUTER JOIN [dbo].loan_codes lc
    ON l.loan_code_id = lc.loan_code_id) 
    WHERE (l.primary_borrower_id=@initial_contact_id)
    AND l.active=1  UNION  SELECT l.loan_id 
    FROM   [dbo].loans l LEFT OUTER JOIN [dbo].loan_requests lr
    ON lr.loan_id=l.loan_id LEFT OUTER JOIN [dbo].contacts c
    ON c.contact_id =l.primary_borrower_id
    WHERE (l.loan_id IN
    (SELECT cb.loan_id FROM coborrowers cb where contact_id =@initial_contact_id and active = 1))
    UNION
    SELECT l.loan_id 
    FROM   [dbo].loans l LEFT OUTER JOIN [dbo].loan_requests lr
    ON lr.loan_id=l.loan_id LEFT OUTER JOIN [dbo].contacts c
    ON c.contact_id =l.primary_borrower_id
    WHERE (l.loan_id IN (SELECT cs.loan_id
    FROM cosigners   cs where contact_id =@initial_contact_id and active = 1)) UNION
    SELECT g.loan_id  FROM   [dbo].groups g, [dbo].group_members gm,
    [dbo].loan_requests lr WHERE gm.group_id = g.group_id
    AND lr.loan_id = g.loan_id
    AND lr.contact_id = gm.secondary_borrower_id
    AND gm.secondary_borrower_id=@initial_contact_id and gm.active = 1) 
    ORDER BY loanIDList DESC;
         OPEN cursorLoanID;
         SET @loan_count = @@CURSOR_ROWS;
    PRINT @loan_count;
         IF(@loan_count > 0)     BEGIN
              DECLARE @loans_loan_id bigint;
              Fetch NEXT FROM cursorLoanID INTO @loans_loan_id;
              DECLARE @my_count bigint;
              SET @my_count=1;
              WHILE(@@FETCH_STATUS =0)
              BEGIN
                   DECLARE @temp_contact_id bigint;
                   DECLARE @temp_loan_id bigint;
                   SET @temp_contact_id = @initial_contact_id;
                   SET @temp_loan_id = @loans_loan_id;
                   IF(@my_count=@loan_count)
                        BEGIN
                             UPDATE [dbo].credit_reports SET loan_id = @temp_loan_id WHERE
    loan_id IS NULL AND contact_id = @initial_contact_id 
    AND NOT EXISTS (SELECT * FROM  [dbo].credit_reports
    WHERE contact_id = @initial_contact_id  AND
    loan_id=@temp_loan_id);
                        END
                   ELSE
                        BEGIN
                             INSERT INTO [dbo].credit_reports(contact_id,credit_bureau_id, credit_score, thirty_days_late,
    sixty_days_late, ninety_days_late, currently_negative, amount_past_due,
    inquiries_six_mos, public_records, collections, total_accounts_balance,
    total_mthly_pymts, report_file, report_gu_id, data_entry_by, data_entry_date,
    loan_id)  SELECT contact_id,credit_bureau_id, credit_score, thirty_days_late,
    sixty_days_late, ninety_days_late, currently_negative, amount_past_due,
    inquiries_six_mos, public_records, collections, total_accounts_balance,
    total_mthly_pymts, report_file, report_gu_id, data_entry_by,
    data_entry_date,@temp_loan_id   FROM [dbo].credit_reports WHERE contact_id
    = @initial_contact_id AND loan_id IS NULL
    AND NOT EXISTS (SELECT * FROM
    [dbo].credit_reports WHERE contact_id=@initial_contact_id AND
    loan_id=@temp_loan_id);
    END
    Fetch NEXT FROM cursorLoanID INTO @loans_loan_id;               
    SET @my_count = @my_count + 1;
              END
    close cursorLoanID
    deallocate cursorLoanID
              IF (@@Error = 0)
                   BEGIN
                        COMMIT TRANSACTION;
                        PRINT 'Success for contactID :'+CONVERT(varchar(50),@initial_contact_id);
                   END
              ELSE
                   BEGIN
                        ROLLBACK TRANSACTION;
                        PRINT 'Failed for contactID :'+CONVERT(varchar(50),@initial_contact_id);
                   END
         END
         ELSE
         BEGIN
              ROLLBACK;
              PRINT 'NO Loans For the contactID :'+CONVERT(varchar(50),@initial_contact_id);
         ENDnow the problem is
    i have executed 2 procedures saperately thn its ok while im calling im getting
    Msg 16915, Level 16, State 1, Procedure REAL_UPDATE_REPORTS, Line 5
    A cursor with the name 'cursorLoanID' already exists.
    Msg 16905, Level 16, State 1, Procedure REAL_UPDATE_REPORTS, Line 6
    The cursor is already open.Please let me know the reason...
    Thank you.
    Message was edited by:
    User71408

    What the heck, that's fun..
    I for one, have never seen T-sql or whatever it's called.
    Looking at it, it seems that a
    close cursorLoanID
    deallocate cursorLoanID
    is missing from the ELSE section doing the rollback.
    But, only guessing
    Fun, fun, fun

  • JSP Compile Error when using dynamic ID in logic:iterate and bean:size

    Hello,
    I try to create a dynamic table with logic:iterate and bean:size tag. Dynamic means the attributes are written by scriptlet. Eg.:
    <logic:iterate id="customerBean" name="<%= formName %>"  property="<%= propertyName%>" length="<%= sRowSize%>">When I replace the id Attribute with propertyName I get compile errors, such as
    the compiler doesn't know the value at runtime:
    Unable to compile class for JSP An error occurred at line: 179 in the jsp file: /pages/formContent.jsp Generated servlet error: _newCustomer.java:1046: Missing term. java.lang.Object <%= propertyName %> = null; ^
    Whats wrong ?
    Thanks for your help

    Solution: don't use a runtime expression for the id attribute.
    The id attribute is used to declare
    - an attribute in scope
    - a scriptlet variable on the page
    These are only available for the duration of the <logic:iterate> tag
    The "id" is only used in your programming. You don't need to make it dynamic.

  • Getting denied errors when using TMG Array for publishing Exchange and Lync

    I'm setting up a TMG array of 2 TMG servers for Lync. The TMG array is already in use for Exchange. The Exchange publishing rules and web listener use a VIP of x.x.x.220.
    I added a secondary VIP of x.x.x.209 for Lync and set up a web listener and Lync pubishing rule using the secondary VIP. I am now getting the below error. And yes, there are publishing rule and listener for the Lync URL's already.
    I've google'd and google'd but didn't find any answers.
    One thing I do notice on the setting for the Lync Web Listener is that the secondary VIP IP shows as "Virtual IP" as opposed to "<server name>" as with the primary VIP IP for Exchange rules/listener (x.x.x.220).
    All the listner / rule settings are fine, and I've rechecked many times. It just appears that when I send requests for the Lync URL's, TMG doesn't even relate the request to the Lync Rule.
    Any help would be appreciated!
    me

    If NLB reports configuration failure as above, then that is your issue.
    The resulting error message when traffic hits TMG is because of that and the reason for it is that the IP address used in publishing is in the TMG configuration but most likely not configured on the NIC. As long as your IT dept doesn't resolve the issue
    with NLB then your progress will be limited.
    If the hotfix matches your environment, then apply it. If it resolves it, then that is good.
    If not, you need to review your NLB configuration in TMG (unicast/multicast) vs your network infrastructure. If it is multicast, then you need to have your networking team look at the switch TMG is conneced to and configure it accordingly.
    http://technet.microsoft.com/en-us/library/ff849728.aspx is a good start for troubleshooting and understanding NLB and TMG.
    Hth, Anders Janson Enfo Zipper

  • Unexpected error when using appendChild() in SDK 3.4 and above

    I'm using an API class to build XML objects within AS3 and passing them as a String (of well-formed XML) to a Web service. This class has worked just fine in Flex 3.0:
    public class MyXMLClass
    private var message:XML = <root></root>;
    public function MyXMLClass()
    message.appendChild(<arguments></arguments>);
    public function setArgument(name:String):void
    message.arguments[0].appendChild("<argument name=\"" + name +"\"></argument>");
    public function setArgumentValue(name:String,value:String):void
    message.arguments[0].argument.(@name == name).appendChild("<value>" + value + "</value>");
    public function getMessage():XML
    return message;
    //Take the result of getMessage().toXMLString() and pass that into the Web service as a String.
    But now that I am running Flash Builder whether I compile with 3.4 or 4.0 SDK I get:
    Error #1086: The appendChild method only works on lists containing one item.
    The line of code it chokes on is the setArgumentValue function.    

    Yeah that was it Alex. The following code change worked:
    public function setArgument(name:String):void
    message.arguments[0].appendChild(<argument name={ name }></argument>);
    public function setArgumentValue(name:String,value:String):void
    message.arguments[0].argument.(@name == name).appendChild(<value>{ value }</value>);
    This now works in SDK 3.4. Unfortunately SDK 4.0 (Adobe Forums: Discrepancy in XML between Flex 3.4 and...) breaks all my XML but at least I can cross this one off. Thanks.
    11/15/09: Glad to report having found a workaround for the other issue mentioned above.

Maybe you are looking for