Preparedstatement with multiple parameters on joined tables w/ (AND,OR)??

Ihave a Query that reads a list of materials (1 to many) and a string of delimited numbers. I am currently going through a couple of loops to build my Query string. For example:
WHERE (materials.material = '?' OR materials.material = '?' )........ AND (materials.ONE = '?' "; OR materials.ONE = '?' "; )........
It also involves reading data from two tables: See Query String below:
Query = "Select transactions.control,transactions.date_sent, transactions.date_received, transactions.sender,transactions.recipient,materials.control,materials.material,materials.R,materials.ONE,materials.parent_item,materials.sub_ctrl,materials.quanity FROM transactions LEFT JOIN materials ON transactions.control = materials.control WHERE (LOOP) materials.material = '?' AND (LOOP)materials.ONE = '?' ";
Is it possible to use a preparedstatement with parameters when the number of parameters is unknown until the user selects them?

Is it possible to use a preparedstatement withparameters when the number of parameters is unknown
until the user selects them?
masuda1967 is being too Japanese. The answer to your
question is "No".Actually, I would take masuda-san's suggestion--sort of.
You can do the incremental query construction he suggested, but with prepared statements. Something like this. (Note: Probably doesn't match your code exactly, but you should get the idea.)StringBuffer query = new StringBuffer("select ... whatever ...");
for (int ix = 0; ix < numParams; ix++) {
    if (x > 0) {
        query.append(", ")
    query.append(" ? ");
ps = con.prepareStatement(query.toString());
for (int ix = 0; ix < numParams; ix++) {
    set the param
} You won't get the performance benefit that can come from using PreparedStatement, but you still avoid the headache of escaping strings, formatting dates, etc.
&#12472;

Similar Messages

  • How to call stored procedure with multiple parameters in an HTML expression

    Hi, Guys:
    Can you show me an example to call stored procedure with multiple parameters in an HTML expression? I need to rewrite a procedure to display multiple pictures of one person stored in database by clicking button.
    The orginal HTML expression is :
    <img src="#OWNER#.dl_sor_image?p_offender_id=#OFFENDER_ID#" width="75" height="75">which calls a procedure as:
    procedure dl_sor_image (p_offender_id IN NUMBER)now I rewrite it as:
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number)could anyone tell me the format for the html expression to pass multiple parameters?
    Thanks a lot.
    Sam

    Hi:
    Thanks for your help! Your question is what I am trying hard now. Current procedure can only display one picture per person, however, I am supposed to write a new procedure which displays multiple pictures for one person. When user click a button on report, APEX should call this procedure and returns next picture of the same person. The table is SOR_image. However, I rewrite the HTML expression as follows to test to display the second image.
    <img src="#OWNER#.Sor_Display_Current_Image?p_n_Offender_id=#OFFENDER_ID#&p_n_image_Count=2" width="75" height="75"> The procedure code is complied OK as follows:
    create or replace
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number) AS
        v_mime_type VARCHAR2(48);
        v_length NUMBER;
        v_name VARCHAR2(2000);
        v_image BLOB;
        v_counter number:=0;
        cursor cur_All_Images_of_Offender is
          SELECT 'IMAGE/JPEG' mime_type, dbms_lob.getlength(image) as image_length, image
          FROM sor_image
          WHERE offender_id = p_n_Offender_id;
        rec_Image_of_Offender cur_All_Images_of_Offender%ROWTYPE;
    BEGIN
        open cur_All_Images_of_Offender;
        loop
          fetch cur_All_Images_of_Offender into rec_Image_of_Offender;
          v_counter:=v_counter+1;
          if (v_counter=p_n_image_Count) then
            owa_util.mime_header(nvl(rec_Image_of_Offender.mime_type, 'application/octet'), FALSE);
            htp.p('Content-length: '||rec_Image_of_Offender.image_length);
            owa_util.http_header_close;
            wpg_docload.download_file (rec_Image_of_Offender.image);
          end if;
          exit when ((cur_All_Images_of_Offender%NOTFOUND) or (v_counter>=p_n_image_Count));
        end loop;
        close cur_All_Images_of_Offender;
    END Sor_Display_Current_Image; The procedure just open a cursor to fetch the images belong to the same person, and use wpg_docload.download_file function to display the image specified. But it never works. It is strange because even I use exactly same code as before but change procedure name, Oracle APEX cannot display an image. Is this due to anything such as make file configuration in APEX?
    Thanks
    Sam

  • New to Apple products (finally) - can I use my Itunes account with multiple products e.g. Iphone and Ipad?

    New to Apple products (finally) - can I use my Itunes account with multiple products e.g. Iphone and Ipad?

    Oh yes! Apple will be happy for you to buy as many Apple products as you can afford.
    As and when needed, each can be given its own selections of content to sync with.
    tt2

  • Spatial Query with multiple geometries from 2 tables

    Hi,
    I'm using Oracle 8.1.7. I am trying to do a spatial query on two tables with multiple geometries. There are two spatial tables. One made up of points and one made up of polygons. There are 829551 rows in the table of points and 1817795 rows in the table with polygons...
    I want to find all polygons where one of this points is within it...
    This query is pretty intensive querying two large spatial tables against each other and so I need to find the most efficient way of running this query. I've been running variations of my query for the last two week and every time it's bombed out with various errors after 12-24 hrs processing like out of memory, out of tablespace, out of processing, invalid index etc etc etc. I need to get this query run asap... Any tips would be gratefully appreciated..
    For the session running the query I've allocated 16M sort area with
    ALTER SESSION SET SORT_AREA_SIZE=16777216;
    Below is the query I'm running... How can I improve this please? BTW PARCEL_OVERLAPS contains the points and TP$_PARCEL_AREAS the polygons.
    SELECT lu.LNU_PARCEL_ID
         FROM
              seventy.PARCEL_OVERLAPS po,
              imap_topol.TP$_PARCEL_AREAS pa,
              TP$_PARCEL_CENTROID_AREA pca,
              TDCR_LAND_UNIT lu
         WHERE
              SDO_FILTER(po.geometry, pa.area,
              'querytype=WINDOW') = ’TRUE’ and
              sdo_within_distance(po.geometry,pa.area,'distance=0')='TRUE' and
              pa.delete_date is null and
              Lu.LNU_LAND_UNIT_UNIQUE_NUM = pca.CENTROID_ID and
              pa.AREA_ID = pca.AREA_ID and
              pca.DELETE_DATE IS NULL and
              pa.DELETE_DATE IS NULL;

    Albert,
    Thanks for your reply and the tips you've given. The tp$_parcel_areas table will always be bigger so I've changed the order to sdo_within_distance(pa.area,po.geometry,'distance=0')='TRUE'. The requested counts for those queries are
    12:26:29 [email protected]:SQL> select count(*)
    13:46:22 2 from seventy.PARCEL_OVERLAPS;
    COUNT(*)
    612
    13:48:12 [email protected]:SQL> select count(*)
    13:48:17 2 from imap_topol.TP$_PARCEL_AREAS pa,
    13:48:21 3 TP$_PARCEL_CENTROID_AREA pca
    13:48:21 4 where pca.DELETE_DATE IS NULL
    13:48:21 5 and pa.DELETE_DATE IS NULL
    13:48:21 6 and pa.AREA_ID = pca.AREA_ID;
    COUNT(*)
    1310665
    There was no reason for both filter and within_distance. I did try use the anyinteract but for some reason that does not return the desired results(I've added one id row as a test to make sure it returns desired results). Plus Oracle have recomended using the within distance for better performance..
    so the explan plan for
    14:38:37 [email protected]:SQL> EXPLAIN PLAN FOR
    14:38:50 2 SELECT lu.LNU_PARCEL_ID
    14:38:50 3 FROM
    14:38:50 4 seventy.PARCEL_OVERLAPS po,
    14:38:50 5 imap_topol.TP$_PARCEL_AREAS pa,
    14:38:50 6 TP$_PARCEL_CENTROID_AREA pca,
    14:38:50 7 TDCR_LAND_UNIT lu
    14:38:50 8 WHERE
    14:38:50 9 sdo_within_distance(pa.area,po.geometry,'distance=0')='TRUE' and
    14:38:50 10 pa.delete_date is null and
    14:38:50 11 Lu.LNU_LAND_UNIT_UNIQUE_NUM = pca.CENTROID_ID and
    14:38:50 12 pa.AREA_ID = pca.AREA_ID and
    14:38:50 13 pca.DELETE_DATE IS NULL and
    14:38:50 14 pa.DELETE_DATE IS NULL;
    is
    Plan Table
    | Operation | Name | Rows | Bytes| Cost | Pstart| Pstop |
    | SELECT STATEMENT | | 4G|32920G| 547M| | |
    | NESTED LOOPS | | 4G|32920G| 547M| | |
    | MERGE JOIN | | 547M| 2029G| 230124 | | |
    | SORT JOIN | | 1M| 36M| 85014 | | |
    | MERGE JOIN | | 1M| 36M| 50019 | | |
    | SORT JOIN | | 1M| 17M| 21650 | | |
    | TABLE ACCESS FULL |TP$_PARCE | 1M| 17M| 485 | | |
    | SORT JOIN | | 1M| 22M| 28369 | | |
    | TABLE ACCESS FULL |TDCR_LAND | 1M| 22M| 2127 | | |
    | SORT JOIN | | 42K| 160M| 145111 | | |
    | TABLE ACCESS FULL |TP$_PARCE | 42K| 160M| 12697 | | |
    | TABLE ACCESS FULL |PARCEL_OV | 817 | 3M| 1 | | |
    14:43:14 [email protected]:SQL> explain plan for
    14:43:23 2 SELECT pa.AREA_ID
    14:43:23 3 FROM seventy.PARCEL_OVERLAPS po,
    14:43:23 4 imap_topol.TP$_PARCEL_AREAS pa
    14:43:23 5 WHERE SDO_RELATE(po.geometry, pa.area,'mask=ANTINTERACT querytype=WINDOW') = 'TRUE'
    14:43:23 6 and pa.DELETE_DATE IS NULL;
    Plan Table
    | Operation | Name | Rows | Bytes| Cost | Pstart| Pstop |
    | SELECT STATEMENT | | 6M| 50G| 10M| | |
    | NESTED LOOPS | | 6M| 50G| 10M| | |
    | TABLE ACCESS FULL |PARCEL_OV | 817 | 3M| 1 | | |
    | TABLE ACCESS FULL |TP$_PARCE | 850K| 3G| 12697 | | |
    14:45:03 [email protected]:SQL> explain plan for
    14:45:04 2 SELECT pa.AREA_ID
    14:45:05 3 FROM seventy.PARCEL_OVERLAPS po,
    14:45:05 4 imap_topol.TP$_PARCEL_AREAS pa
    14:45:05 5 WHERE SDO_RELATE(pa.area, po.geometry,'mask=ANTINTERACT querytype=WINDOW') = 'TRUE'
    14:45:05 6 and pa.DELETE_DATE IS NULL;
    Plan Table
    | Operation | Name | Rows | Bytes| Cost | Pstart| Pstop |
    | SELECT STATEMENT | | 6M| 50G| 863554 | | |
    | NESTED LOOPS | | 6M| 50G| 863554 | | |
    | TABLE ACCESS FULL |TP$_PARCE | 850K| 3G| 12697 | | |
    | TABLE ACCESS FULL |PARCEL_OV | 817 | 3M| 1 | | |
    --------------------------------------------------------------------------------

  • MDM ABAP API: Query with Multiple Parameters

    I would like to query MDM repository passing multiple parameters. I used the following code, however, it didn't work.
    If I pass only one parameter, it works fine.
    DATA lt_query                  TYPE mdm_query_table.
    DATA ls_query                 TYPE mdm_query.
    DATA lv_search_text       TYPE string.
    DATA lt_result_set            TYPE mdm_search_result_table.
    DATA ls_result_set           LIKE LINE OF lt_result_set.
    * Fill query structure with FIRST parameter
        ls_query-parameter_code  = 'Name'.
        ls_query-operator        = 'CS'. 
        ls_query-dimension_type  = mdmif_search_dim_field.    
        ls_query-constraint_type = mdmif_search_constr_text.
        lv_search_text = 'BMW'.
        GET REFERENCE OF lv_search_text INTO ls_query-value_low.
        APPEND ls_query TO lt_query.
    * Fill query structure with SECOND parameter
        ls_query-parameter_code  = 'Model'.
        ls_query-operator        = 'CS'. 
        ls_query-dimension_type  = mdmif_search_dim_field.    
        ls_query-constraint_type = mdmif_search_constr_text.
        lv_search_text = '2009'.
        GET REFERENCE OF lv_search_text INTO ls_query-value_low.
        APPEND ls_query TO lt_query.
    * Query on records (search for value 'BMW' model '2009' in table Products)
        CALL METHOD lr_api->mo_core_service->query
          EXPORTING
            iv_object_type_code = 'Products'                  
            it_query            = lt_query
          IMPORTING
            et_result_set       = lt_result_set.

    Hi,
    I see you are not clearing your local structure "ls_query".  This could be reason of problem,  try this and let us know the result:
    DATA lt_query                  TYPE mdm_query_table.
    DATA ls_query                 TYPE mdm_query.
    DATA lv_search_text       TYPE string.
    DATA lt_result_set            TYPE mdm_search_result_table.
    DATA ls_result_set           LIKE LINE OF lt_result_set.
    Fill query structure with FIRST parameter
        ls_query-parameter_code  = 'Name'.
        ls_query-operator        = 'CS'. 
        ls_query-dimension_type  = mdmif_search_dim_field.    
        ls_query-constraint_type = mdmif_search_constr_text.
        lv_search_text = 'BMW'.
        GET REFERENCE OF lv_search_text INTO ls_query-value_low.
        APPEND ls_query TO lt_query.
    CLEAR ls_query.
    Fill query structure with SECOND parameter
        ls_query-parameter_code  = 'Model'.
        ls_query-operator        = 'CS'. 
        ls_query-dimension_type  = mdmif_search_dim_field.    
        ls_query-constraint_type = mdmif_search_constr_text.
        lv_search_text = '2009'.
        GET REFERENCE OF lv_search_text INTO ls_query-value_low.
        APPEND ls_query TO lt_query.
    CLEAR ls_query.
    Query on records (search for value 'BMW' model '2009' in table Products)
        CALL METHOD lr_api->mo_core_service->query
          EXPORTING
            iv_object_type_code = 'Products'                  
            it_query            = lt_query
          IMPORTING
            et_result_set       = lt_result_set.

  • Web service URL with multiple parameters

    Hi all,
    I'm trying to make use of a web service that takes multiple parameters without the use of a proxy (we're using NW 7/7.1 and  proxies aren't supported -  i.e. i'm getting the same thing as described here: Proxy object to consume web service)
    So instead I'm trying to follow a method similar to what is done [here|http://sample-code-abap.blogspot.com/2009/05/simple-code-consume-web-service-using.html]
    When I put the web service url into a browser and click on the operation it comes up with
    http://portLocation/company/webservice.asmx?op=operation
    and comes up with the sample SOAP request and response as normal.
    Now with most web services with one parameter, the url translates to something like: http://www.webservicex.net/globalweather.asmx/GetCitiesByCountry?CountryName=australia
    Which works fine.
    However, the web service i'm using has 4 parameters and when I try and translate my url to be like this (http://portLocation/Company/WebService.asmx/Operation?parameter1=XX&parameter2=XX&parameter3=XX&parameter4=XX) I get, "The page cannot be displayed"
    Can anyone suggest a way that I might be able to get around this or what I'm doing wrong.
    Thanks in advance.

    Hi,
    are you sure that your Operation is valid? So for example in your [example|http://www.webservicex.net/globalweather.asmx] there are just two operations: [GetCitiesByCountry|http://www.webservicex.net/globalweather.asmx/GetCitiesByCountry] and [GetWeather|http://www.webservicex.net/globalweather.asmx/GetWeather]. You are right about passing multiple parameters. You need to put ? after valid URL and then pairs <name>=<value> separated by &. Don't forget that you need to encode <name> and <value> to avoid problems.
    Cheers

  • Building Contextual Events with multiple parameters

    I am working in JDeveloper 11.1.1.4 and trying to build a contextual event, but ran into a issue that I find unclear. When building the Subscribers on my page definition, in the Property Inspector, how do I define multiple parameters in the customPayLoad element? In all the examples I've found, they reference putting ${payLoad} as the value and they only show one parameter. I need each value to be unique for each parameter. How do I accomplish this?

    for this you can use attributes
    say suppose if you are using table then you can pass values from producer like
                Map attributes = table.getAttributes();
                attributes.put("param1", param1);
                attributes.put("param2", param2);
                attributes.put("param3", param3);
                attributes.put("param4", param4);and consume it like
        public void handleBusinessChkListEvent(Object payload) {
            SelectionEvent selectionEvent = (SelectionEvent)payload;
            UIComponent component = (UIComponent)selectionEvent.getSource();
            String param1=
                (String)component.getAttributes().get("param1");
            String param2= (String)component.getAttributes().get("param2");
            Boolean param3=
                (Boolean)component.getAttributes().get("param3");
            String param4=
                (String)component.getAttributes().get("param4");
    }

  • Trouble invoking Axis service with multiple parameters

    Hallo Java experts,
    I have a problem with Axis 1.2RC2 (and Tomcat 5.0.19, JDK 1.5, Win XP) that might be quite simple, but I'm not so experienced and running out of ideas.
    Everything works fine as long as I use a single Parameter. But I can't invoke service methods with more parameters, independent of the parameters' (simple) types! Different exceptions are thrown, depending on the way I invoke the service. It's either ...
    - a java.lang.IllegalArgumentException (case 1)
    "Tried to invoke method public java.lang.String test.server.TestSoapBindingImpl.printLongs(long,long) with arguments java.lang.Long,null. The arguments do not match the signature."
    - or an org.xml.sax.SAXException (case 2)
    "SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize."
    Here's an example of a simple web service, that takes two longs and should return a string. In case 1 the service is invoked using a service locator in case 2 with a 'Call' object and explicitly set parameter types.
    Thanks in advance for your help!
    Dave
    service[b]
    public class TestSoapBindingImpl implements test.server.Test{
      public String printLongs(long long_1, long long_2){
        return "long_1 = " +long_1 +", long_2 = " +long_2;
    [b]case 1
    client
    public class TestClient {
      public static void main (String[] args) throws Exception {     
        TestService service = new TestServiceLocator();
        Test testProxy = service.gettest();     
        long longVal = 1L; 
        response = testProxy.printLongs(longVal, longVal);
        System.out.println(response);
    SOAP messsage
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <soapenv:Body>
          <in6 xmlns="urn:TestNS">1</in6>
          <in7 xmlns="urn:TestNS">1</in7>
       </soapenv:Body>
    </soapenv:Envelope>
    Axis' log file
    Part of the log, where only the first argument of 'printLongs' is properly converted before the exception is thrown.
    17886  org.apache.axis.utils.JavaUtils
            - Trying to convert java.lang.Long to long
    17886  org.apache.axis.i18n.ProjectResourceBundle
            - org.apache.axis.i18n.resource::handleGetObject(value00)
    17886  org.apache.axis.providers.java.RPCProvider
            -   value:  1
    17886  org.apache.axis.i18n.ProjectResourceBundle
            - org.apache.axis.i18n.resource::handleGetObject(dispatchIAE00)
    17986  org.apache.axis.providers.java.RPCProvider
            - Tried to invoke method public java.lang.String test.server.TestSoapBindingImpl.printLongs(long,long) with arguments java.lang.Long,null.  The arguments do not match the signature.
    java.lang.IllegalArgumentException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:384)
          at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:281)
         at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:450)
         at org.apache.axis.server.AxisServer.invoke(AxisServer.java:285)
         at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:653)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:301)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    case 2
    client
    public class TestClient2
      public static void main(String [] args) {
        try {
           String endpoint =
             "http://localhost:1234/axis1.2rc2/services/test";
           Service  service = new Service();
           Call     call    = (Call) service.createCall();
           call.setTargetEndpointAddress( new java.net.URL(endpoint) );
           call.setOperationName(new QName("urn:TestNS", "printLongs") );
           call.addParameter("in6",
                             org.apache.axis.Constants.XSD_LONG,
                             javax.xml.rpc.ParameterMode.IN);
           call.addParameter("in7",
                             org.apache.axis.Constants.XSD_LONG,
                             javax.xml.rpc.ParameterMode.IN);
           call.setReturnType(org.apache.axis.Constants.XSD_STRING);
           String response = (String) call.invoke( new Object[] { 1L, 1L } );
           System.out.println(response);
        } catch (Exception e) {
           System.err.println(e.toString());
    SOAP messsage
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <soapenv:Body>
          <ns1:printLongs soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:TestNS">
             <in6 href="#id0"/>
             <in7 href="#id0"/>
          </ns1:printLongs>
          <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:long" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">1</multiRef>
       </soapenv:Body>
    </soapenv:Envelope>
    Exception
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
    faultActor:
    faultNode:
    faultDetail:
         {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
      at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:143)
      at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1031)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1140)
      at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:238)
      at org.apache.axis.message.RPCElement.getParams(RPCElement.java:386)
      at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:148)
      at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
      at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
      at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
      at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
      at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:450)
      at org.apache.axis.server.AxisServer.invoke(AxisServer.java:285)
      at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:653)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
      at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:301)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
      ....

    Dave, not sure if you still are looking for an answer but i hate seeing unreplied posts so i felt i needed to post something. I'm just beginning with this stuff as well so take my suggestions with a grain of salt....or a beer. Anyways, case 2 would show that you are getting your parameters through properly because the "deserialization" errror is targetted towards the soap reply. Most likely you are trying to receive back a none primitive type. :-D i.e. such as the problem that i'm having.
    hope that helps somewhat.
    graeme.

  • Problem with ORA-19025 when joining tables

    I am querying a table that stores xml datata in an xml column. I an query this column without problems. If I join the table with another table (not xml). I get the error below.
    ORA-19025: EXTRACTVALUE returns value of only one node
    19025. 00000 - "EXTRACTVALUE returns value of only one node"
    *Cause:    Given XPath points to more than one node.
    *Action:   Rewrite the query so that exactly one node is returned.
    I don't seem to have any subnodes in the fields I am querying and I dont know how joining to the second table introduces the problem.
    This produces the error I mentioned before
    SELECT a.NAME,
    EXTRACTVALUE(xmltype(a.DOCUMENTATION), '/metadata//idinfo/citation/citeinfo/title') TITLE,
    EXTRACTVALUE(xmltype(a.DOCUMENTATION), '/metadata//idinfo/citation/citeinfo/origin') ORIGIN,
    EXTRACTVALUE(xmltype(a.DOCUMENTATION), '/metadata//idinfo/citation/citeinfo/pubdate') PUBLICATION_DATE,
    GDB_ITEMTYPES.NAME
    FROM GDB_ITEMS_vw a, GDB_ITEMTYPES b
    where a.UUID = b.UUID
    This one gives no error
    SELECT a.NAME,
    EXTRACTVALUE(xmltype(a.DOCUMENTATION), '/metadata//idinfo/citation/citeinfo/title') TITLE,
    EXTRACTVALUE(xmltype(a.DOCUMENTATION), '/metadata//idinfo/citation/citeinfo/origin') ORIGIN,
    EXTRACTVALUE(xmltype(a.DOCUMENTATION), '/metadata//idinfo/citation/citeinfo/pubdate') PUBLICATION_DATE,
    FROM GDB_ITEMS_vw a
    I am using 11g 2
    Any suggestions are welcome
    Thanks
    Edited by: user3444035 on Mar 18, 2011 1:43 PM

    Hi,
    Could you give some sample data from GDB_ITEMS_vw and GDB_ITEMTYPES?

  • How to search data with multiple parameters =SESSION

    Dear Günter Schenk
    Please help
    I have two Tables with many fields
    1.       tbl_users
    2.       tbl_transection
    Now problem is that I want when user login he make search in " tbl_usr_transection " related its own Transactions other then he view all user data
    I have one column about user in transaction table i.e. "fld_transection_by"
    I am using SESSION to filter all transaction its related user and its working fine.
    <?php echo $_SESSION['login_id']; ?>=<?php echo $row_rstbl_transections[' fld_transection_by ']; ?>
    Now how to make search from filter rows in many field
    Please explain in detail
    Thanks in Advance

    Hi, It sounds like you need to carry those variables into your mySQL statement.

  • FlatFile import with multiple formats to single table

    I need to import a Flatfile which can have varying number of columns eg row1 7 x cols, row2 15 x columns, row3 12 x columns.
    The file needs to be added to a single table.
    Any thoughts on best way to approach this. 

    What version of SSIS are you using? If you're using 2012 or later, you can most likely do this in the data flow without scripting.
    You'll configure your flat file source with the maximum number of columns you'll expect in any data row, and each column's data type would need to be configured to accommodate the largest/widest value expected in any row for that column. In SSIS 2012 or
    2014, the flat file source will interpret any missing columns as NULLs. Then just load the output of the flat file source to your destination table with the appropriate mappings. Any missing values will be NULL.
    The behavior was different in SSIS 2005 and 2008. If you had fewer than expected columns in any row, the flat file source would continue to read data from the file until it got all of the columns it expected - even if that meant reading data from the next
    line of text. For those versions, scripting the source was the easier solution.
    Tim Mitchell | TimMitchell.net | @tim_mitchell

  • How do I use Aggregate formulas with multiple measures from different tables?

    I have three measures:
    Cash - this sums the £ column in my 'Cash' table.
    Online - this sums the £ column in my 'Online'
    table
    Phone - this sums the £ column in my 'Phone'
    table
    How do I now do aggregate formulas that combine this three measures, for example:
    Find the MIN or MAX of the three measures
    Average the three measures
    I have worked out how to use simple aggregation like add, subtract etc through the CALCULATION formula, but doing the average or MIN/MAX does not work.
    Thanks.

    Hi, thanks for the suggestions.
    Re: Julian
    I had thought about this method, unfortunately it is not always three measures so this doesn't work.
    Re: Tim
    I was not aware of the APPEND formula however I will definitely give it a try and report back - I can see this one working.
    Re: Michael
    Apologies, I have never found a an easy way of simulating some of my issues since it would mean creating a new power model and establishing quite a number of relationships. I definitely see the benefit when posting on the forum since it makes my issue far more
    accessible, unfortunately when I've posted before I've generally been racing against time and not had time to prepare this anonymised data. Is there a quick way of  doing it?

  • How to use different parameters for two tables(chart and Table) in one report in SSRS?

    Hi,
    Here is my requirement, i have 7 parameters in my report(Site,Account,LOB,year,Month,WeekDay and Date_Filter),
    and in my report i have one table and one Chart,
    my requirement is the table in the report has to show the data for 6 parameters only i.e(Site,Account,LOB,year,Month and WeekDay).so the table has to consider only 6 parameters, and it has ignore the 7th parameter, table should not consider Date_Filter parameter.
    And Chart has to consider all 7 parameters.
    so, when we preview the report table has to show the data for only 6 parameters and chart has to show the data for all 7 parameters.
    if there is a way to get this Please reply me ASAP, it is an urgent requirement.
    Thanks in Advance,
    Naveen

    Hi Naveen,
    Refer below link to create multiple datasets as suggested by Gnanadurai
    http://technet.microsoft.com/en-us/library/ff714047(v=sql.105).aspx
    Thanks
    Swapna

  • Berkeley DB XML crash with multiple readers (dbxml-2.5.16 and db-4.8.26)

    I am using Berkeley DB XML (v. 2.5.16 and the bundled underlying Berkeley DB 4.8.26, which I suppose is now fairly old) to manage an XML database which is read by a large number (order 100) of independent worker processes communicating via MPI. These processes only read from the database; a single master process performs writes.
    Everything works as expected with one or two worker processes. But with three or more, I am experiencing database panics with the error
    pthread lock failed: Invalid argument
    PANIC: Invalid argument
    From searching with Google I can see that issues arising from incorrectly setting up the environment to support concurrency are are fairly common. But I have not been able to find a match for this problem, and as far as I can make out from the documentation I am using the correct combination of flags; I use DB_REGISTER and DB_RECOVER to handle the fact that multiple processes join the environment independently. Each process uses on a single environment handle, and joins using
    DB_ENV* env;
    db_env_create(&env, 0);
    u_int32_t env_flags = DB_INIT_LOG | DB_INIT_MPOOL | DB_REGISTER | DB_RECOVER | DB_INIT_TXN | DB_CREATE;
    env->open(env, path to environment, env_flags, 0);
    Although the environment requests DB_INIT_TXN, I am not currently using transactions. There is an intention to implement this later, but my understanding was that concurrent reads would function correctly without the full transaction infrastructure.
    All workers seem to join the environment correctly, but then fail when an attempt is made to read from the database. They will all try to access the same XML document in the same container (because it gives them instructions about what work to perform). However, the worker processes open each container setting the read-only flag:
    DbXml::XmlContainerConfig models_config;
    models_config.setReadOnly(true);
    DbXml::XmlContainer models = this->mgr->openContainer(path to container, models_config);
    Following the database panic, the stack trace is
    [lcd-ds283:27730] [ 0] 2   libsystem_platform.dylib            0x00007fff8eed35aa _sigtramp + 26
    [lcd-ds283:27730] [ 1] 3   ???                                 0x0000000000000000 0x0 + 0
    [lcd-ds283:27730] [ 2] 4   libsystem_c.dylib                   0x00007fff87890bba abort + 125
    [lcd-ds283:27730] [ 3] 5   libc++abi.dylib                     0x00007fff83aff141 __cxa_bad_cast + 0
    [lcd-ds283:27730] [ 4] 6   libc++abi.dylib                     0x00007fff83b24aa4 _ZL25default_terminate_handlerv + 240
    [lcd-ds283:27730] [ 5] 7   libobjc.A.dylib                     0x00007fff89ac0322 _ZL15_objc_terminatev + 124
    [lcd-ds283:27730] [ 6] 8   libc++abi.dylib                     0x00007fff83b223e1 _ZSt11__terminatePFvvE + 8
    [lcd-ds283:27730] [ 7] 9   libc++abi.dylib                     0x00007fff83b21e6b _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception + 0
    [lcd-ds283:27730] [ 8] 10  libdbxml-2.5.dylib                  0x000000010f30e4de _ZN5DbXml18DictionaryDatabaseC2EP8__db_envPNS_11TransactionERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERKNS_15ContainerConfigEb + 1038
    [lcd-ds283:27730] [ 9] 11  libdbxml-2.5.dylib                  0x000000010f2f348c _ZN5DbXml9Container12openInternalEPNS_11TransactionERKNS_15ContainerConfigEb + 1068
    [lcd-ds283:27730] [10] 12  libdbxml-2.5.dylib                  0x000000010f2f2dec _ZN5DbXml9ContainerC2ERNS_7ManagerERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS_11TransactionERKNS_15ContainerConfigEb + 492
    [lcd-ds283:27730] [11] 13  libdbxml-2.5.dylib                  0x000000010f32a0af _ZN5DbXml7Manager14ContainerStore13findContainerERS0_RKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS_11TransactionERKNS_15ContainerConfigEb + 175
    [lcd-ds283:27730] [12] 14  libdbxml-2.5.dylib                  0x000000010f329f75 _ZN5DbXml7Manager13openContainerERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPNS_11TransactionERKNS_15ContainerConfigEb + 101
    [lcd-ds283:27730] [13] 15  libdbxml-2.5.dylib                  0x000000010f34cd46 _ZN5DbXml10XmlManager13openContainerERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_18XmlContainerConfigE + 102
    Can I ask if it's clear to anyone what I am doing wrong?

    Is it possible that the root problem to this is in the MPI code or usage?  Because if the writer process crashes while holding an active transaction or open database handles, it could leave the environment in an inconsistent state that would result in the readers throwing a PANIC error when they notice the inconsistent environment.
    Thanks for looking into this.
    It looks like there was a small typo in the code I quoted, and I think it was this which caused the segmentation fault or memory corruption. Although I checked a few times that the code snippet produced expected results before posting it, I must have been unlucky that it just happened not to cause a segfault on those attempts.
    This is a corrected version:
    #include <iostream>
    #include <vector>
    #include "dbxml/db.h"
    #include "dbxml/dbxml/DbXml.hpp"
    #include "boost/mpi.hpp"
    static std::string envname = std::string("test");
    static std::string pkgname = std::string("packages.dbxml");
    static std::string intname = std::string("integrations.dbxml");
    int main(int argc, char *argv[])
        boost::mpi::environment  mpi_env;
        boost::mpi::communicator mpi_world;
        if(mpi_world.rank() == 0)
            std::cerr << "-- Writer creating environment" << std::endl;
            DB_ENV *env;
            int dberr = ::db_env_create(&env, 0);
            std::cerr << "**   creation response = " << dberr << std::endl;
            if(dberr > 0) std::cerr << "**   " << ::db_strerror(dberr) << std::endl;
            std::cerr << "-- Writer opening environment" << std::endl;
            u_int32_t env_flags = DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_REGISTER | DB_RECOVER | DB_INIT_TXN | DB_CREATE;
            dberr = env->open(env, envname.c_str(), env_flags, 0);
            std::cerr << "**   opening response = " << dberr << std::endl;
            if(dberr > 0) std::cerr << "**   " << ::db_strerror(dberr) << std::endl;
            // set up XmlManager object
            DbXml::XmlManager *mgr = new DbXml::XmlManager(env, DbXml::DBXML_ADOPT_DBENV | DbXml::DBXML_ALLOW_EXTERNAL_ACCESS);
            // create containers - these will be used by the workers
            DbXml::XmlContainerConfig pkg_config;
            DbXml::XmlContainerConfig int_config;
            pkg_config.setTransactional(true);
            int_config.setTransactional(true);
            std::cerr << "-- Writer creating containers" << std::endl;
            DbXml::XmlContainer packages       = mgr->createContainer(pkgname.c_str(), pkg_config);
            DbXml::XmlContainer integrations   = mgr->createContainer(intname.c_str(), int_config);
            std::cerr << "-- Writer instructing workers" << std::endl;
            std::vector<boost::mpi::request> reqs(mpi_world.size() - 1);
            for(unsigned int                 i = 1; i < mpi_world.size(); i++)
                reqs[i - 1] = mpi_world.isend(i, 0); // instruct workers to open the environment
            // wait for all messages to be received
            boost::mpi::wait_all(reqs.begin(), reqs.end());
            std::cerr << "-- Writer waiting for termination responses" << std::endl;
            // wait for workers to advise successful termination
            unsigned int outstanding_workers = mpi_world.size() - 1;
            while(outstanding_workers > 0)
                boost::mpi::status stat = mpi_world.probe();
                switch(stat.tag())
                    case 1:
                        mpi_world.recv(stat.source(), 1);
                        outstanding_workers--;
                        break;
            delete mgr; // exit, closing database and environment
        else
            mpi_world.recv(0, 0);
            std::cerr << "++ Reader " << mpi_world.rank() << " beginning work" << std::endl;
            DB_ENV *env;
            ::db_env_create(&env, 0);
            u_int32_t env_flags = DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_REGISTER | DB_RECOVER | DB_INIT_TXN | DB_CREATE;
            env->open(env, envname.c_str(), env_flags, 0);
            // set up XmlManager object
            DbXml::XmlManager *mgr = new DbXml::XmlManager(env, DbXml::DBXML_ADOPT_DBENV | DbXml::DBXML_ALLOW_EXTERNAL_ACCESS);
            // open containers which were set up by the master
            DbXml::XmlContainerConfig pkg_config;
            DbXml::XmlContainerConfig int_config;
            pkg_config.setTransactional(true);
            pkg_config.setReadOnly(true);
            int_config.setTransactional(true);
            int_config.setReadOnly(true);
            DbXml::XmlContainer packages     = mgr->openContainer(pkgname.c_str(), pkg_config);
            DbXml::XmlContainer integrations = mgr->openContainer(intname.c_str(), int_config);
            mpi_world.isend(0, 1);
            delete mgr; // exit, closing database and environment
        return (EXIT_SUCCESS);
    This repeatably causes the crash on OS X Mavericks 10.9.1. Also, I have checked that it repeatably causes the crash on a virtualized OS X Mountain Lion 10.8.5. But I do not see any crashes on a virtualized Ubuntu 13.10. My full code likewise works as expected with a large number of readers under the virtualized Ubuntu. I am compiling with clang and libc++ on OS X, and gcc 4.8.1 and libstdc++ on Ubuntu, but using openmpi in both cases. Edit: I have also compiled with clang and libc++ on Ubuntu, and it works equally well.
    Because the virtualized OS X experiences the crash, I hope the fact that it works on Ubuntu is not just an artefact of virtualization. (Unfortunately I don't currently have a physical Linux machine with which to check.) In that case the implication would seem to be that it's an OS X-specific problem. 2nd edit (14 Feb 2014): I have now managed to test on a physical Linux cluster, and it appears to work as expected. Therefore it does appear to be an OS X-specific issue.
    In either OS X 10.8 or 10.9, the crash produces this result:
    -- Writer creating environment
    **   creation response = 0
    -- Writer opening environment
    **   opening response = 0
    -- Writer creating containers
    ++ Reader 7 beginning work
    -- Writer instructing workers
    -- Writer waiting for termination responses
    ++ Reader 1 beginning work
    ++ Reader 2 beginning work
    ++ Reader 3 beginning work
    ++ Reader 4 beginning work
    ++ Reader 5 beginning work
    ++ Reader 6 beginning work
    pthread lock failed: Invalid argument
    PANIC: Invalid argument
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    libc++abi.dylib: terminate called throwing an exception
    [mountainlion-test-rig:00319] *** Process received signal ***
    [mountainlion-test-rig:00319] Signal: Abort trap: 6 (6)
    [mountainlion-test-rig:00319] Signal code:  (0)
    David
    Message was edited by: ds283

  • Joining Tables OWDD and ODRF

    Hi all,
    How do i join OWDD and ODRF tables? I would like to query out those SO that and the status of the approval. Aside to that, the SO No., Cust Code, Cust Name, Qty, Sales Value & etc. How can it be achieve?
    Appreciate your assistant.
    Thanks.
    Harith
    Malaysia.

    Hi,
    Try like this,
    SELECT T0.[DocNum], T0.[CardCode], T0.[CardName], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[Price] FROM ODRF T0  INNER JOIN DRF1 T1 ON T0.[DocEntry] = T1.[DocEntry] inner join OWDD T2 on T2.DocEntry=T1.DocEntry WHERE T2.[Status] ='Y' and  T0.[ObjType] ='17'
    Hope this helps.
    Thanks,
    Parvatha Solai.N

Maybe you are looking for

  • Ipod 3g and itunes 10.5.3.

    I am trying to sync my VOD (very old device) on iTunes 10.5.3., but it doesn't show up, neither on my deskop nor in iTunes. I know that it's still alive, it works fine with his original adapter, even if the battery has a life of something between 10

  • Removing usage rights

    Hi, I am looking for a way to remove usage rights from a pdf with the adobe reader. My scenario: I made a form to be filled out by our receptionist using acrobat pro 8.0 and live designer. She fills it out (its an order ack. form) by opening it in th

  • Need to know ,how SAP is Posting wrong Enrtry at the Table level for Same .

    Hello SAP Experts , Good Morning Gems!!! I have a Typical Issue here , SAP Is Posting In wrong tables .  Production  is currently processed everything that it should process.  This works as designed.             PO = 7800507594 (From Plant  5400 to P

  • Snoop doesn't work as manual says

    I installed Solaris 8/07 and "man snoop" says it can display vlan-tagged packets, particularly, it supports the following expressions: ethertype number True if the Ethernet type field has value number. If number is not 0x8100 (VLAN) and the packet is

  • @DatePart formula produces constant result

    Currently using an @datapart formula and it consistently produces the same result regardless of date. Here is my member formula: @datepart("Lease date",DP_Year) The result is always 1970 Another member formula for month @datepart("lease date",DP_Mont