Oracle OTD sql exception

I'm trying to implement and Oracle OTD select statement. I need to select only 1 record for a given individual with a certain timestamp. I have tried several iterations of the select statement, but keep receiving "sql statement not properly ended" on the timestamp line. The table structure is a 1 to many from patient to patient detail. This is what I have right now.,,,
SimpleDateFormat whereDate = null;
String whereDt = whereDate.format( OTD.getPATIENT().getCURRENT_DETAIL_TIMESTAMP() );
OTD.getPATIENT_DETAIL().select( " patient_id = " + OTD.getPATIENT().getPATIENT_ID() );
OTD.getPATIENT_DETAIL().select( " detail_timestamp = to_date(" + whereDt + ",'mm/dd/yyyy hh24:mi:ss')" );
I've also tried it without the to date and get the same error. I tried using the java object in the select and that doesn't work either.
Any suggestions would be helpful.
Thanks!

SELECT JOB_HISTORY.EMPLOYEE_ID, JOB_HISTORY.START_DATE, JOB_HISTORY.END_DATE, JOB_HISTORY.JOB_ID, JOB_HISTORY.DEPARTMENT_ID FROM HR.JOB_HISTORY WHERE JOB_HISTORY.START_DATE like ?
This Query with a prepared statement and the following code in JCD worked:
Here I took the parameter as String.
public void receive( com.stc.connector.appconn.file.FileTextMessage input,
                             orclSelectOTD.OrclSelectOTDOTD orclSelectOTD_1,
                             com.stc.connector.appconn.file.FileApplication FileClient_1 ) throws Throwable{
        orclSelectOTD_1.getOrclSelect().setParam1( input.getText() );
        orclSelectOTD_1.getOrclSelect().executeQuery();
        if (orclSelectOTD_1.getOrclSelect().get$OrclSelectResults().next()) {
            FileClient_1.setText( "Got some records" );
            FileClient_1.write();
    }

Similar Messages

  • Sql exception when connecting to oracle database

    When trying to connect to an oracle database using the code below i get an sql error. i put the code below it and the stack trace below the code. any help would be great
    Connection connection = null;
            try {
                // Load the JDBC driver
                String driverName = "oracle.jdbc.driver.OracleDriver";
                Class.forName(driverName);
                //  Create a connection to the database
                String serverName = "192.168.0.2";
                String portNumber = "1158";
                String sid = "orcl";
                String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
                // String url = "jdbc:oracle:oci:@orcl";
                String username = "system";
                String password = "mmsi";
                connection = DriverManager.getConnection(url, username, password);
            } catch (ClassNotFoundException e) {
                System.out.println("Class Not Found Exception in connection to db");
            } catch (SQLException e) {
                System.out.println("SQL Exception in connecting to Database ");
                e.printStackTrace();
    stackTrace------------------------------------------------------------------------------
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    SQL Exception in connecting to Database
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
            at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
    before this.start
    got to doaction
            at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:420)
            at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
            at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
            at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
            at java.sql.DriverManager.getConnection(DriverManager.java:525)
            at java.sql.DriverManager.getConnection(DriverManager.java:171)
            at mmsiserver.conversation.<init>(conversation.java:190)
            at mmsiserver.Server.run(Server.java:105)
    Exception in thread "Thread-0" java.lang.NullPointerException
            at mmsiserver.conversation.doAction(conversation.java:218)
            at mmsiserver.conversation.<init>(conversation.java:202)
            at mmsiserver.Server.run(Server.java:105)Message was edited by:
    pcpitcher1

    Please read this
    http://forum.java.sun.com/thread.jspa?threadID=512566&start=0&tstart=0

  • SQl Exception while connecting to Oracle Databse : Network adaptar .......

    hi !
    I am geeting an SQL Exception ...
    Network apdator could not establish connection..
    the code is as follows
    String driverName = "oracle.jdbc.driver.OracleDriver";
    String dbURL = "jdbc:oracle:thin:@server:1521:biz";
    String uName = "uidt";
    String pwd = "pwd";
    Class.forName(driverName);
    conn = DriverManager.getConnection(dbURL, uName, pwd);
    Please help me out !!

    First aid check list for "connection refused":
    - Check host name in connect string.
    - Check port number in connect string.
    - Try numeric IP address of server host in connect string, in case name server is hosed.
    - Are there any firewalls between client and server blocking the port.
    - Check that the db server is running.
    - Check that the db server is listening to the port. On the server, try: "telnet localhost the-port-number". Or "netstat -an", there should be a listening entry for the port.
    - Try "telnet serverhost the-port-number" from the client, to see if firewalls are blocking it.
    - If "telnet" fails: try it with the numeric ip address.
    - If "telnet" fails: does it fail immediately or after an obvious timeout? How long is the timeout?
    - Does the server respond to "ping serverhost" or "telnet serverhost" or "ssh serverhost"?

  • Error while trying to call external  web service from oracle PL/SQL 10.2 g

    Hi I am trying to call an external web service from oracle PL/SQL .I am getting following run time error when I try to set the opeartion style.
    But as per the oracle documentation this is one of the 2 valid values.
    ORA-29532: Java call terminated by uncaught Java exception: operation style: "document" not supported.Teh webservice does expect the operation style as document.
    Following is the code I am executing.
    FUNCTION email
    return varchar2
    AS
    service_ SYS.utl_dbws.SERVICE;
    call_ SYS.utl_dbws.CALL;
    service_qname SYS.utl_dbws.QNAME;
    port_qname SYS.utl_dbws.QNAME;
    operation_qname SYS.utl_dbws.QNAME;
    string_type_qname SYS.utl_dbws.QNAME;
    retx ANYDATA;
    retx_string VARCHAR2(1000);
    retx_double number;
    retx_len number;
    params SYS.utl_dbws.ANYDATA_LIST;
    l_input_params SYS.utl_dbws.anydata_list;
    l_result ANYDATA;
    l_namespace VARCHAR2(1000);
    begin
    -- open internet explorer and navigate to http://webservices.imacination.com/distance/Distance.jws?wsdl
    -- search for 'targetNamespace' in the wsdl
    l_namespace := 'http://service.xmlservices.global.freedomgroup.com/';
    -- search for 'service name' in the wsdl
    service_qname := SYS.utl_dbws.to_qname(l_namespace, 'ClientCoreWebServiceBeanService');
    -- this is just the actual wsdl url
    service_ := SYS.utl_dbws.create_service(HTTPURITYPE('http://hostname/GlobalWebServices/services/ClientCoreWebService?wsdl'), service_qname);
    -- search for 'portType name' in the wsdl
    port_qname := SYS.utl_dbws.to_qname(l_namespace, 'ClientCoreWebServiceBeanPort');
    -- search for 'operation name' in the wsdl
    -- there will be a lot, we will choose 'getCity'
    operation_qname := SYS.utl_dbws.to_qname(l_namespace, 'postalCodelookup');
    -- bind things together
    call_ := SYS.utl_dbws.create_call(service_, port_qname, operation_qname);
    -- default is 'FALSE', so we make it 'TRUE'
    SYS.utl_dbws.set_property(call_, 'SOAPACTION_USE', 'TRUE');
    -- search for 'operation soapAction' under <wsdl:operation name="getCity">
    -- it is blank, so we make it ''
    SYS.utl_dbws.set_property(call_, 'SOAPACTION_URI', '');
    -- search for 'encodingstyle' under <wsdl:operation name="getCity">
    SYS.utl_dbws.set_property(call_, 'ENCODINGSTYLE_URI', 'http://schemas.xmlsoap.org/soap/encoding/');
    -- search for 'binding style'
    SYS.utl_dbws.set_property(call_, 'OPERATION_STYLE', 'DOCUMENT');
    -- search for 'xmlns:xs' to know the value of the first parameter
    -- under <wsdl:message name="getCityResponse"> you will see the line <wsdl:part name="getCityReturn" type="xsd:string" />
    -- thus the return type is 'string", removing 'xsd:'
    string_type_qname := SYS.utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string');
    -- in the line <wsdl:operation name="getCity" parameterOrder="zip">
    -- the parameterOrder is 'zip', thus we put in 'zip'
    -- the 'ParameterMode.IN' is used to specify that we will be passing an "In Parameter" to the web service
    -- the 'ParameterMode.IN' is a constant variable in the sys.utl_dbws package
    --vj this cud be either params or xml
    SYS.utl_dbws.add_parameter(call_, 'param1', string_type_qname, 'ParameterMode.IN');
    SYS.utl_dbws.add_parameter(call_, 'param2', string_type_qname, 'ParameterMode.IN');
    SYS.utl_dbws.set_return_type(call_, string_type_qname);
    -- supply the In Parameter for the web service
    params(0) := ANYDATA.convertvarchar('<TFGGlobalBasicXMLDO><systemCd>GLOBAL</systemCd><username>GlobalAdmin</username><password>GlobalAdmin</password><localID>1</localID></TFGGlobalBasicXMLDO>');
    params(1) := ANYDATA.convertvarchar('<TFGGlobalPostalCodeLookupIDDO><postalCode>02446</postalCode><countryCode>USA</countryCode><stateCode>MA</stateCode><cityDisplay>BROOKLINE</cityDisplay><countyDisplay>NORFOLK</countyDisplay><include_inactive_flag>True</include_inactive_flag></TFGGlobalPostalCodeLookupIDDO>');
    -- invoke the web service
    retx := SYS.utl_dbws.invoke(call_, params);
    dbms_output.put_line(retx.gettypename);
    -- access the returned value and output it to the screen
    retx_string := retx.accessvarchar2;
    dbms_output.put_line('done' || retx_string);
    dbms_output.put_line('PL/SQL DII client return ===> ' || retx_string);
    -- release the web service call
    SYS.utl_dbws.release_service(service_);
    return retx_string;
    end email;

    thsi is urgent anybody ????

  • Error invoking populateXRefRow:oracle.tip.xref.exception.RepositoryExceptio

    Hi All,
    I created an XREF table using XREF commandline utility. Table was successfully created and columns were also successfully added. But I am getting the following error while using populateXRefRow function in assign activity in BPEL. I have XREF_DATA table is present in oraesb schema.
    SOA suite version 10.1.3.4
    JDev version 10.1.3.4
    OS - Windows XP.
    Basic Installation with Oracle lite database.
    Caused by: oracle.xml.xpath.XPathException: Extension function error: Error invoking 'populateXRefRow':'oracle.tip.xref.exception.RepositoryException: Unable to access Cross Reference Values from Database.The SQL Exception is: "JDBC 2.0 feature is not yet implemented"
    Please ensure that the database is accessible. If accessible, please look at the stack trace and fix the issue. If unable to fix contact Oracle Support '
         at oracle.xml.xslt.XSLStylesheet.flushErrors(XSLStylesheet.java:1846)
         at oracle.xml.xslt.XSLStylesheet.execute(XSLStylesheet.java:612)
         at oracle.xml.xslt.XSLStylesheet.execute(XSLStylesheet.java:548)
         at oracle.xml.xslt.XSLProcessor.processXSL(XSLProcessor.java:333)
         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:460)
         ... 91 more
    oracle.xml.xpath.XPathException: Extension function error: Error invoking 'populateXRefRow':'oracle.tip.xref.exception.RepositoryException: Unable to access Cross Reference Values from Database.The SQL Exception is: "JDBC 2.0 feature is not yet implemented"
    Please ensure that the database is accessible. If accessible, please look at the stack trace and fix the issue. If unable to fix contact Oracle Support '
         at oracle.xml.xpath.XSLExtFunctions.callStaticMethod(XSLExtFunctions.java:118)
         at oracle.xml.xpath.XPathExtFunction.evaluateMethod(XPathExtFunction.java:337)
         at oracle.xml.xpath.XPathExtFunction.evaluate(XPathExtFunction.java:266)
         at oracle.xml.xslt.XSLValueOf.processAction(XSLValueOf.java:120)
         at oracle.xml.xslt.XSLNode.processChildren(XSLNode.java:480)
         at oracle.xml.xslt.XSLTemplate.processAction(XSLTemplate.java:205)
         at oracle.xml.xslt.XSLStylesheet.execute(XSLStylesheet.java:581)
         at oracle.xml.xslt.XSLStylesheet.execute(XSLStylesheet.java:548)
         at oracle.xml.xslt.XSLProcessor.processXSL(XSLProcessor.java:333)
         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:460)
         at com.collaxa.cube.xml.xpath.functions.xml.GetElementFromXSLTFunction.transform(GetElementFromXSLTFunction.java:335)
         at com.collaxa.cube.xml.xpath.functions.xml.GetElementFromXDKXSLTFunction.transform(GetElementFromXDKXSLTFunction.java:38)
         at com.collaxa.cube.xml.xpath.functions.xml.GetElementFromXSLTFunction.evaluate(GetElementFromXSLTFunction.java:144)
         at com.collaxa.cube.xml.xpath.functions.xml.GetElementFromXSLTFunction.call(GetElementFromXSLTFunction.java:89)
         at com.collaxa.cube.xml.xpath.BPELXPathFunctionWrapper.evaluate(BPELXPathFunctionWrapper.java:50)
         at oracle.xml.xpath.JXPathContext$JXFunction.invoke(JXPathContext.java:147)
         at oracle.xml.xpath.JXPathContext$JXFunction.invoke(JXPathContext.java:116)
         at oracle.xml.xpath.XPathExtFunction.evaluate(XPathExtFunction.java:254)
         at oracle.xml.xpath.JXPathExpression.evaluate(JXPathExpression.java:181)
         at com.collaxa.cube.xml.xpath.BPELXPathUtil.evaluate(BPELXPathUtil.java:189)
         at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.evalFromValue(BPELAssignWMP.java:679)
         at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.__executeStatements(BPELAssignWMP.java:143)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:199)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3698)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1655)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:217)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:314)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5765)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1087)
         at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.createAndInvoke(CubeEngineBean.java:133)
         at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.syncCreateAndInvoke(CubeEngineBean.java:162)
         at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
         at com.evermind.server.ThreadState.runAs(ThreadState.java:693)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiresNewInterceptor.invoke(TxRequiresNewInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at CubeEngineBean_LocalProxy_4bin6i8.syncCreateAndInvoke(Unknown Source)
         at com.collaxa.cube.engine.delivery.DeliveryHandler.initialRequestAnyType(DeliveryHandler.java:547)
         at com.collaxa.cube.engine.delivery.DeliveryHandler.initialRequest(DeliveryHandler.java:464)
         at com.collaxa.cube.engine.delivery.DeliveryHandler.request(DeliveryHandler.java:133)
         at com.collaxa.cube.ejb.impl.DeliveryBean.request(DeliveryBean.java:95)
         at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
         at com.evermind.server.ThreadState.runAs(ThreadState.java:693)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at DeliveryBean_RemoteProxy_4bin6i8.request(Unknown Source)
         at com.collaxa.cube.ws.soap.oc4j.SOAPRequestProvider.processNormalOperation(SOAPRequestProvider.java:451)
         at com.collaxa.cube.ws.soap.oc4j.SOAPRequestProvider.processBPELMessage(SOAPRequestProvider.java:274)
         at com.collaxa.cube.ws.soap.oc4j.SOAPRequestProvider.processMessage(SOAPRequestProvider.java:120)
         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.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:400)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:414)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
         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.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Please help me to resolve the above error.
    - Sam

    Hi Sam,
    This error is because JDBC 2.0 feature is not completely implemented in Oracle Lite database.
    So, you might want to go for an SOA Advanced Install with 10.2.0.3 oracle database to resolve your issue.
    Hope this helps!
    Cheers
    Anirudh Pucha

  • Error: ORA-03113 while executing complex java code from Oracle PL/SQL

    Hi,
    I am trying to execute a complex java code from Oracle PL/SQL. The classes were resolved successfully. But in the middle of execution, I am getting the following error:
    ERROR:
    ORA-03114: not connected to ORACLE
    begin
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    Process ID: 13685
    Session ID: 21 Serial number: 20
    Is there a way to debug the Java classes loaded into oracle? Or is there any utility to find out why the connection was lost?
    Regards,
    Saravana

    Hi Saravana:
    You could use simply System.out.println(..) at your Java code and see the output at the .trc files generated for your Oracle session.
    Or better than this adding Java Util Logging messages at your code, to see how to use JUL API at the OJVM please see this blog post [Using JUL API inside the OJVM|http://marceloochoa.blogspot.com/2007/11/getting-logging-entering-exiting-and.html].
    Best regards, Marcelo.
    PD: ora-0600 generally are associated with RDBMS bugs, but these bugs can be bypassed by replacing the code which throws the exception by other with a workaround.

  • Oracle.xml.sql.OracleXMLSQLException when using OracleXMLQuery getXMLDOM()

    Hi!
    I am trying to reuse a code in JDeveloper to get XML from a query. I have copied the code from a method and created a new method with the copied code and changed it. The problem is that when I run the old code I now get following error:
    Ett oförväntat fel har inträffat: Application: FND, Message Name: FND_GENERIC_MESSAGE.
    Tokens: MESSAGE = oracle.xml.sql.OracleXMLSQLException: Det här objektet har stängts.
    Vill du inte att objektet ska stängas automatiskt mellan anropen kan du granska metoden 'keepObjectOpen()'.;
    This means in english something like:
    An unexpected error accoured: Application: FND, Message Name: FND_GENERIC_MESSAGE = oracle.xml.sql.OracleXMLSQLException: This object is closed. If you don't want the object to close automatically between calls you can check method 'keepObjectOpen()';
    the code I'm running is:
    public String punchoutSomething()
    throws Exception
    StringBuffer sqlForXml =new StringBuffer("select pv.*"
    +", cursor(select * from XXPOS_PUNCHOUT_TABLE2 c where c.vendor_id=pv.vendor_id) as contacts"
    +" from XXPOS_PUNCHOUT_TABLE1 pv where vendor_id in (");
    // add all ids
    SuppSummVOImpl vendorView = getSuppSummVO();
    Row row;
    int punchoutCnt=0;
    // vendorView.reset();
    Row[] selectedRows = vendorView.getFilteredRows("SelectStatus","Y");
    for(int i=0;i<selectedRows.length;i++)
    if(punchoutCnt>0)
    sqlForXml.append(",");
    sqlForXml.append(((Number)selectedRows.getAttribute("VendorId")).toString());
    punchoutCnt++;
    if(punchoutCnt==0)
    sqlForXml.append("-1"); // make sql valid, will not return rows
    sqlForXml.append(")");
    // System.out.println(sqlForXml); // DEBUG
    OADBTransaction tx = (OADBTransaction)getOADBTransaction();
    OracleXMLQuery xq = new OracleXMLQuery( tx.getJdbcConnection()
    , sqlForXml.toString()
    xq.setRaiseException(true); // in case of error raise an exception (default
    // is to generate an error document
    xq.setEncoding("UTF-8"); // not necessary?
    xq.useLowerCaseTagNames();
    xq.setRowsetTag("vendors");
    xq.setRowTag("vendors_row");
    //System.out.println(xq.getXMLString()); // DEBUG
    XMLDocument suppl = (XMLDocument)xq.getXMLDOM();
    XSLProcessor xslt = new XSLProcessor();
    InputStream sheetStream = this.getClass().getResourceAsStream("mystylesheet.xsl");
    if(sheetStream==null)
    throw new Exception("Could not load stylesheet");
    XSLStylesheet sheet = xslt.newXSLStylesheet(
    sheetStream
    StringWriter serialize = new StringWriter();
    xslt.processXSL(sheet,suppl,new PrintWriter(serialize));
    String returnXML = serialize.getBuffer().toString();
    // System.out.println("X:"+returnXML); // DEBUG
    sheetStream.close();
    return returnXML;
    ===================
    i've copied the same code into another method and only changed the sql-statment to be used and the stylesheet to use to transform the xml. Is something wrong with that?
    Another question: if the xsl refers to a xsd but wihtout any path where should it be?
    Thanks for the help,
    Patricia

    Actually, having looked at Metalink, seems that although this message may be accurate and correct,
    it has been 'introduced' as part of the 9i JDBC driver.
    So, I used the 8i JDBC driver I happened to have instead and that worked fine.

  • SQL exception during creation of a physical standby database with EM

    Version: EM Oracle 10.2.5 (agents running, repository running, primary db running, all targets visible and reachable with EM)
    I try to create a physical standby database with the enterprise manager and each time the process is aborted with a SQL exception during the preparation of the job by the EM. I have added a part of the OMs log containing the error at the end of the excerpt.
    =============
    2010-04-29 16:00:39,856 [EMUI_16_00_39_/console/targets] WARN pref.SubtabPref getFolders.710 - Unknown folder id: VirtualServers retrieved from repository
    2010-04-29 16:01:04,765 [EMUI_16_01_04_/console/database/dataguard/create] ERROR em.dataguard validate.1329 - CreateBean: ClassNotFoundException: null
    2010-04-29 16:02:05,476 [EMUI_16_02_05_/console/database/dataguard/create] ERROR jobs.dbclone checkSetFileError.79 - DatabaseFileAttributes.checkSetFileError(): Null database file!
    2010-04-29 16:02:05,476 [EMUI_16_02_05_/console/database/dataguard/create] ERROR jobs.dbclone setControlfiles.160 - DatabaseFileAttributes.setDatafiles(): Invalid control file!
    2010-04-29 16:02:05,492 [EMUI_16_02_05_/console/database/dataguard/create] ERROR jobs.dbclone getControlFileNames.616 - DatabaseFileAttributes.getDatafileNames(): null datafile names!
    2010-04-29 16:02:32,823 [Thread-28] ERROR em.jobs remoteOp.2389 - DBVerify.remoteOp(): Error: max_stamp# 6071384
    2010-04-29 16:02:32,823 [Thread-28] ERROR jobs.dbclone submitJobPreparation.3297 - DBCloneObject.submitJobPreparation(): getMaxLogSequenceNum: Während der Vorbereitung des Jobs ist eine SQL Exception aufgetreten. Um das Problem zu diagnostizieren, legen Sie das Agent Perl-Skript-Tracing auf DEBUG fest und wiederholen den Vorgang
    2010-04-29 16:02:32,823 [Thread-28] ERROR jobs.dbclone submitJobPreparation.3501 - DBCloneObject.submitJobPreparation(): Exception: java.lang.Exception: Während der Vorbereitung des Jobs ist eine SQL Exception aufgetreten. Um das Problem zu diagnostizieren, legen Sie das Agent Perl-Skript-Tracing auf DEBUG fest und wiederholen den Vorgang
    2010-04-29 16:02:32,823 [Thread-28] ERROR jobs.dbclone submitDBCloneJob.3716 - DBCloneObject.submitDBCloneJob(): Exception: Während der Vorbereitung des Jobs ist eine SQL Exception aufgetreten. Um das Problem zu diagnostizieren, legen Sie das Agent Perl-Skript-Tracing auf DEBUG fest und wiederholen den Vorgang
    2010-04-29 16:02:37,496 [EMUI_16_02_37_/console/database/dataguard/create] ERROR em.dataguard onEvent.1243 - CreateConfigController: Exception: oracle.sysman.db.dg.util.VxxStandbyException: Während der Vorbereitung des Jobs ist eine SQL Exception aufgetreten. Um das Problem zu diagnostizieren, legen Sie das Agent Perl-Skript-Tracing auf DEBUG fest und wiederholen den Vorgang
    =========
    I have set the agent perl script tracing to DEBUG, but can't find any reason, why the job preparation failed.
    Has anyone an idea why the job cannot be prepared? Thanks in advance for investigation :-)

    Can you please tell me how can i see data gaurd on EM..
    I have oracle 11gR1..i have implemmented primary as well standby database..
    I have already started EM but i have no idea where to find datagaurd option..or how to create standdby db using EM..
    You got error that means u did it using EM..how can i do it on EM

  • SQL exception occurred during PL/SQL upload  (Web ADI)

    Hi,
    I am having issue loading data using Web ADI, I am getting "SQL exception occurred during PL/SQL upload" error, I tried to restart Apache, also looked into the BNE.log file for the exact error but I am still not sure about this exception, can anyone please help?
    bne:text="SQL exception occurred during PL/SQL upload."
    bne:cause="Database insert error"
    RDBMS: 11.2.0.3.0
    Oracle Applications: 12.0.6
    Thanks,
    Bharat

    I am having issue loading data using Web ADI, I am getting "SQL exception occurred during PL/SQL upload" error, I tried to restart Apache, also looked into the BNE.log file for the exact error but I am still not sure about this exception, can anyone please help?Please rename the log file, reproduce the issue and check the log file then.
    bne:text="SQL exception occurred during PL/SQL upload."
    bne:cause="Database insert error"Please see these docs.
    R12 Uploading Intercompany Transactions Shows SQL Exception Occurred During PL/SQL Upload [ID 1234063.1]
    Batch Element Entry (BEE) Spreadsheet Interface > 10 Rows Fails with Error: 'SQL exception occured during PL/SQL Upload.' [ID 388012.1]
    How Do You Setup An AGIS Transaction That Has Several Transaction Lines For The Same Transaction [ID 946499.1]
    FCH: Error: "The upload process has completed with errors. Please Close to return to the document and fix the errors. - No rows uploaded - <999> rows were invalid" During WebADI Data Upload [ID 553025.1]
    R12: Legal Entity Name must be < 31 characters. [ID 472505.1]
    Oracle Payroll 'Batch Element Entry ( BEE )' Frequently Asked Questions ( FAQ ) [ID 1353021.1]
    Thanks,
    Hussein

  • SQL exception occurred during PL/SQL upload in WEB ADI Upload

    Hi All,
    I created Custom Integrator with META DATA as Update. This Integrator Downloads the data and will update the date. Once it is updated, I am uploading the same. For Quite Some Time, Everything is working fine and no issue.
    All of Suddenly , I am getting the error message 'SQL exception occurred during PL/SQL upload.' When I am trying to update and upload the values in the same custom integrator.
    My Oracle Apps and DB Version are
    RDBMS : 11.1.0.7.0
    Oracle Applications : 12.1.3
    Any Help is appreciated.

    I found the issue. If you check read only check box for the mandataory parameters that Package is using, then we get this issue. Try to avoid read only check box for mandatory parameters in th epackage.
    For Example.
    I am using hr_person_extra_info_api.update_person_extra_info API in my custom package, In this API, p_person_extra_info_id is the mandaory parameter.
    I am trying to download the data and updating the data and uploading the values with the custom WEB ADI. In the custom layout, I checked ready only box to parameter 'p_person_extra_info_id '. With this I am getting issue 'SQL exception occurred during PL/SQL upload in WEB ADI Upload'.
    again I unchecked the read only button to this 'p_person_extra_info_id ' Parameter. It is uplaoding and working with no issues.
    Thanks Guys for all your help.

  • Weblogic 7 SP5 SQL Exceptions follow a JTA transaction timeout

    I have a problem in Weblogic 7 SP5 that was not happening in SP2. I'm using the
    Weblogic jDriver (weblogic.jdbc.mssqlserver4.Driver)
    I have a transaction that times out due to JTA transaction timeout, and then gets
    marked for rollback. For several minutes after the timeout, I get many SQL Exceptions
    with bogus messages like "invalid column name" when the column name is, in fact,
    correct.
    Then the weblogic log file shows "Exception during rollback of transaction" (javax.transaction.SystemException:
    Heuristic hazard). Next, the connection is tested on reserve, this test fails,
    and the connection is refreshed. As soon as the connection is refreshed, I stop
    getting SQL exceptions and everything starts working correctly again.
    It seems like the transaction timeout is making the connection go bad, and somehow
    other requests are using this bad connection before the transaction finishes rolling
    back. What could the problem be? Some excerpts from my app log and weblogic log
    are below.
    com.workpoint.server.ejb.WorkPointEJBException: The transaction is no longer active
    - status: 'Marked rollback. [Reason=weblogic.transaction.internal.TimedOutException:
    Transaction timed out after 901 seconds
    Name=[EJB com.storeperform.taskmgr.ejb.procrelease.ProcReleaseBean.distributeToOrgUnit(com.storeperform.taskmgr.values.DistributionUnit)],Xid=17109:68c10765ba68aaaa(12114044),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds
    since begin=901,seconds left=60,activeThread=Thread[WorkQueueThread[q=1, qName=ProcReleaseTaskWorkers,
    id=6],5,WorkQueueGroup[id=1, name=ProcReleaseTaskWorkers]],ServerResourceInfo[weblogic.jdbc.jts.Connection]=(state=ended,assigned=none,xar=weblogic.jdbc.jts.Connection@18cd616,re-Registered
    = false),SCInfo[DomainManager+edwards-s1]=(state=active),properties=({weblogic.transaction.name=[EJB
    com.storeperform.taskmgr.ejb.procrelease.ProcReleaseBean.distributeToOrgUnit(com.storeperform.taskmgr.values.DistributionUnit)],
    weblogic.jdbc=t3://10.10.3.17:7001}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=edwards-s1+10.10.3.17:7001+DomainManager+t3+,
    Resources={})],CoordinatorURL=edwards-s1+10.10.3.17:7001+DomainManager+t3+)]'.
    No further JDBC access is allowed within this transaction.SQL Command = INSERT
    INTO WP_PROCI_NODE_HIST (NODE_HIST_ID, NODE_HIST_DB, PROCI_ID, PROCI_DB, PROCI_NODE_ID,
    PROCI_NODE_DB, NODE_ITERATION, NODE_STATE_ID, ROW_VERSION, LU_ID, LU_DATE) VALUES
    weblogic.jdbc.mssqlserver4.TdsException: Invalid column name 'user_fname'.
    [from weblogic log]
    ####<Jun 17, 2004 8:14:16 AM MDT> <Error> <EJB> <EDWARDS> <edwards-s1> <WorkQueueThread[q=1,
    qName=ProcReleaseTaskWorkers, id=7]> <kernel identity> <> <010025> <Exception
    during rollback of transaction Name=[EJB com.storeperform.taskmgr.ejb.procrelease.ProcReleaseBean.distributeToOrgUnit(com.storeperform.taskmgr.values.DistributionUnit)],Xid=17439:68c10765ba68aaaa(31878774),Status=Rolled
    back. [Reason=weblogic.transaction.internal.AppSetRollbackOnlyException],HeuristicErrorCode=XA_HEURHAZ,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds
    since begin=3,seconds left=57,ServerResourceInfo[weblogic.jdbc.jts.Connection]=(state=rolledback,assigned=edwards-s1,xar=weblogic.jdbc.jts.Connection@15e1b7e,re-Registered
    = false),SCInfo[DomainManager+edwards-s1]=(state=rolledback),properties=({weblogic.transaction.name=[EJB
    com.storeperform.taskmgr.ejb.procrelease.ProcReleaseBean.distributeToOrgUnit(com.storeperform.taskmgr.values.DistributionUnit)],
    weblogic.jdbc=t3://10.10.3.17:7001}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=edwards-s1+10.10.3.17:7001+DomainManager+t3+,
    Resources={})],CoordinatorURL=edwards-s1+10.10.3.17:7001+DomainManager+t3+): javax.transaction.SystemException:
    Heuristic hazard: (weblogic.jdbc.jts.Connection, HeuristicHazard, (javax.transaction.xa.XAException:
    I/O exception while talking to the server, java.io.EOFException))
    ####<Jun 17, 2004 8:14:17 AM MDT> <Warning> <JDBC> <EDWARDS> <edwards-s1> <ExecuteThread:
    '8' for queue: 'default'> <kernel identity> <> <001094> <A connection from pool
    "sp_connection_pool" was tested during reserve with the SQL "select 1" and failed:
    weblogic.jdbc.mssqlserver4.TdsException: I/O exception while talking to the server,
    java.io.EOFException
    ...[stack trace omitted]...
    This connection will now be refreshed.>

    Brad Swanson wrote:
    According to BEA's documentation, the jDriver is deprecated (no longer supported)
    in WLS 7 SP5. Not sure when they stopped supporting it, but sometime after SP2,
    apparently. Our solution, unfortunately, was to stay with SP2. Using the newer,
    supported JDBC driver would presumably fix the problem, but we didn't have time
    to do a full regression test with a different driver.Hi, no. The jDriver is deprecated, not unsupported. For WLS releases that contain
    the jDriver it will be supported for as long as we support the WLS release!
    Deprecation just means that we may choose to not supply that driver in any future
    release, and will not support it in that or any subsequent release.
    Practically, much depends on which jDriver you're using. In decreasing order
    of practical support we have: The weblogic.jdbc.oci.Driver to Oracle: We do actively
    continue to fix bugs in it. The weblogic.jdbc.mssqlserver4.Driver: Very unlikely that
    we will fix any new problem with it. The weblogic.jdbc.ifmx.Driver: Even less
    likely that we will do anything with it...
    I hope that makes it better for you.
    Joe

  • Oracle PL/SQL and Microsoft Access..

    Does anyone know of a good tutorial on how to write the correct syntax for Oracle PL/SQL in an Access pass-through query?

    Do you want to write PL/SQL via Access, or just pass a SQL string as a query? There are many books on PL/SQL if that is what you need, however, I suspect it is not.
    Oracle SQL is pretty standard, except that for versions up to and including 8.x, it only accepts joins listed in the "WHERE" clause. Access itself will accept this syntax for inner joins. Most general SQL books seem to include a section on Oracle and T-sql variations.
    SELECT a.field_1, b.field_2
    FROM table_1 a, table_2 b
    WHERE a.field_x = b.field_y ;
    BUT if field_x is a CHAR field containing trailing spaces (CHAR(6) value is 'ABC ') and field_y is a VARCHAR2 field (value is 'ABC'), then the join condition should be:
    WHERE TRIM(a.field_x) = b.field_y ;
    for outer joins you add "(+)" to the field that may be blank
    SELECT a.field_1, b.field_2
    FROM table_1 a, table_2 b
    WHERE a.field_x = b.field_y(+) ;
    (Access) MID([field_1],2,5] becomes (Oracle) SUBSTR(field_1,2,5)
    regards

  • Sql exception occurred during pl/sql upload error in custom integrator

    Hi,
    I have modified custom integrator which was working fine. I have added one column in template and the lov is working fine.
    Issue is that when i upload the file to oracle it showing error as ''sql exception occurred during pl/sql upload".
    I have tried executing the same from back end but it was working fine from back end and inserting properly in interface table.
    Kindly suggest for the issue.
    Regards,
    Gk

    Hi,
    You can get the error message in excel sheet itself by using the following piece of code.
    FND_MESSAGE.CLEAR;
    FND_MESSAGE.SET_NAME ('APPLICATION', 'APPLICATION_MESSAGE_NAME');
    FND_MESSAGE.SET_TOKEN ('ERROR_TOKEN', ERROR MESSAGE);
    FND_MESSAGE.RAISE_ERROR;
    Create an excpetion block and include the above piece of code whilde catching the exception.
    APPLICATION- The applicatio in which you create message
    APPLICATION_MESSAGE_NAME-  The message Name
    ERROR_TOKEN- You must create a token in application message
    ERROR MESSAGE- You can see the  error using SQLERRM.
    Thanks,
    Vinoop

  • Oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an XM

    I need to use query-database functionality in transform activity to make a stored function call. My sql query parameter should be
    Select CDMB_BPEL_UTILS_PKG.get_coa(null) from dual
    Corresponding XML is
    ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://www.example.org" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc" exclude-result-prefixes="xsl ns0 xsd ldap xp20 bpws ora orcl">
    <xsl:template match="/">
    <ns0:OracleRoot>
    <ns0:OracleMappedOut>
    <ns0:ExpType>
    <xsl:value-of select="orcl:query-database('select cdmb_bpel_utils_pkg.get_coa(null) from dual',false(),false(),'eis/JNDI/GDB2')"/>
    </ns0:ExpType>
    </ns0:OracleMappedOut>
    =========But I get the following error when testing the same===========
    oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an XML tag name
    ========================================================
    I guess I need to use escape characters to pass ( . I tried using &quot; and &apos; but in vain. Any help is appreciated to resolve this issue.

    Siva,
    version: 10.1.3.4
    Your inputs may be of high use for me as well.
    I have similar requirement. I have to execute the following sql query
    select sum(salary) from emp. When I run this query using ora:orcl:query-database, I got the same exception what you have got. So do you mean if i use an alias for this, it would solve my pbm?
    select sum(salary) sal from emp+
    rgds,
    sen

  • [OT] User-Defined string Functions  Oracle PL/SQL

    Ladies and Gentlemen,
    I am pleased to offer the following string functions Oracle PL/SQL:
    GETALLWORDS(): Inserts the words from a string into the table.
    GETWORDCOUNT(): Counts the words in a string.
    GETWORDNUM(): Returns a specified word from a string.
    OCCURS(): Returns the number of times a character expression occurs within another character expression (including overlaps).
    OCCURS2(): Returns the number of times a character expression occurs within another character expression (excluding overlaps).
    PADC(): Returns a string from an expression, padded with spaces or characters to a specified length on the both sides.
    STRTRAN(): Searches a character expression for occurrences of a second character expression, and then replaces each occurrence with a third character expression. Unlike a built-in function Replace, STRTRAN has three additional parameters.
    STRFILTER(): Removes all characters from a string except those specified.
    RAT(): Returns the numeric position of the last (rightmost) occurrence of a character string within another character string (including overlaps). The search performed by RAT() is case-sensitive. RAT similar to the PL/SQL function INSTR.
    ATC(): Returns the beginning numeric position of the first occurrence of a character expression within another character expression, counting from the leftmost character (including overlaps). The search performed by ATC() is case-insensitive. ATC similar to the PL/SQL function INSTR.
    RATC(): Returns the numeric position of the last (rightmost) occurrence of a character string within another character string (including overlaps). The search performed by RATC() is case-insensitive. RATC similar to the PL/SQL function INSTR.
    AT2(): Returns the beginning numeric position of the first occurrence of a character expression within another character expression, counting from the leftmost character (excluding overlaps). The search performed by AT2() is case-sensitive. AT2 similar to the PL/SQL function INSTR.
    REPLICATE(): Returns a character string that contains a specified character expression repeated a specified number of times.
    ROMANTOARAB(): Returns the number equivalent of a specified character Roman numeral expression (from I to MMMCMXCIX).
    Plus, there are versions for MS SQL SERVER, SYBASE ASA, DB2, MS SQL SERVER 2005 SQLCLR.
    More than 8000 people have already downloaded my functions. I hope you will find them useful as well.
    For more information about string UDFs Oracle PL/SQL please visit the
    http://www.universalthread.com/wconnect/wc.dll?LevelExtreme~2,54,33,29233
    Please, download the file
    http://www.universalthread.com/wconnect/wc.dll?LevelExtreme~2,2,29233
    With the best regards.

    >
    I am using the Oracle Data Provider in vs2012. I am having trouble calling a function that returns an object type defined.
    >
    Returning a collection like that is a bad idea to begin with. That isn't scaleable and wastes memory.
    Either return a REF CURSOR and let the client FETCH the rows or use a PIPELINED function and let the client query it like they would a table.
    Here is an example similar to yours that uses a PIPELINED function.
    create or replace
        package pkg2
          as
            CURSOR emp_cur is (SELECT empno, ename, job, mgr, deptno FROM emp);
            type pkg_emp_table_type is table of emp_cur%rowtype;
            function get_emp(
                             p_deptno number
              return pkg_emp_table_type
              pipelined;
      end;
    create or replace
        package body pkg2
          as
            function get_emp(
                             p_deptno number
              return pkg_emp_table_type
              pipelined
              is
              begin
                  for v_emp_rec in (SELECT empno, ename, job, mgr, deptno
                                    FROM emp where deptno = p_deptno) loop
                    pipe row(v_emp_rec);
                  end loop;
              end;
      end;
    select * from table(pkg2.get_emp(20));
           EMPNO ENAME      JOB              MGR     DEPTNO
            7369 DALLAS     CLERK2          7902         20
            7566 DALLAS     MANAGER         7839         20
            7788 DALLAS     ANALYST         7566         20
            7876 DALLAS     CLERK           7788         20
            7902 DALLAS     ANALYST         7566         20

Maybe you are looking for