Exception when using JAX - RPC

Hi all!
I'm developing a web service client for society (pearls running 4.3) BB devices. Got the file from the server (generated gSOAP) WSDL, generated high heels using Sun WTK s 2.5.1' wscompile, started the MDS Simulator, wrote a main program, an input screen (for input parameters) and an output screen (for results), began the JDE 4.3 debugger and obtained
javax.xml.rpc.JAXRPCException - java.lang.StringIndexOutOfBoundsException: Index 0 > = 0
from the line of calling the operation.

Using NetBeans, I created then a midlet to Web Services client using the WSDL file which worked immediately. Taking the source (essentially generated) files and pushing them into the JDE gave the same exception as shown above.

Someone at - he seen this before?

TIA,
Martin

OK, so never mind...

I've implemented my Web Service client using kSOAP.

Tags: BlackBerry Developers

Similar Questions

  • make exception when using BUlk collect

    Hi all

    version of DB 10 g

    I've written a procedure as below
    create or replace procedure test_proc2 is
    
    type v_emp_rec is record 
    (empno number,
    ename varchar2 (200));
    
    type v_emp_tab is table of v_emp_rec index by binary_integer;
    
    v_tab v_emp_tab;
    
    begin
    
    select empno,ename
    into v_tab(0)
    from emp
    where empno = 7369;
    
    dbms_output.put_line (v_tab(0).ename);
    
    exception 
    when no_data_found then
    dbms_output.put_line ('I am in no data found exception');
    end;
    now, I tried to perform the procedure below
    begin
    test_proc2;
    end;
    the foregoing is works well, but I want to use the functionality of collection in bulk so I use as below
    create or replace procedure test_proc2 is
    
    type v_emp_rec is record 
    (empno number,
    ename varchar2 (200));
    
    type v_emp_tab is table of v_emp_rec index by binary_integer;
    
    v_tab v_emp_tab;
    
    begin
    
    select empno,ename bulk collect
    into v_tab
    from emp
    where empno = 7369;
    
    dbms_output.put_line (v_tab(0).ename);
    
    exception 
    when no_data_found then
    dbms_output.put_line ('I am in no data found exception');
    end;
    the foregoing gives me exception, please someone can explain why it is not in the exception block.

    Thanks in advance.

    The obvious answer is because an exception no_data_found is raised.
    The question is there.

    It's either select it because there is no data where empno = 7369.

    Or is the .ename of v_tab (0), because there is no element 0. Automatic collection of indexing starts at 1.

    for example

    SQL>  declare
      2    type t1 is table of pls_integer index by pls_integer;
      3    v1 t1;
      4   begin
      5    v1(1) := 1;
      6    dbms_output.put_line(v1(0));
      7   end;
      8  /
     declare
    *
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at line 6
    
    SQL> 
    

    If you catch the exceptions and do not spread them properly, then hide you all information kind of useful as a line number, etc..

  • exceptions when using dynamic instructions

    Friends

    In my monthly script, I need to drop 24 months old partitions and create the new partition for the coming months. I wrote the following procedure for the same thing:
    DECLARE
       v_msg_type    VARCHAR2 (100);
       v_msg_desc    VARCHAR2 (100);
       v_sql1        VARCHAR2 (1000);
       v_sql2        VARCHAR2 (1000);
       except_acct   EXCEPTION;
       except_vntg   EXCEPTION;
    BEGIN
    
    /* Remove 24 months old partition */ 
       SELECT    'alter table table1 drop partition p_acct_'
              || TO_CHAR (ADD_MONTHS (SYSDATE, -24), 'mmyyyy')
              || ' update global indexes'
         INTO v_sql1
         FROM DUAL;
    
       EXECUTE IMMEDIATE v_sql1;
    
       v_msg_desc := 'SUCCESS: Old partitions removed from table1';
    
        package.procedure('information',v_msg_desc);
    
       /* Add new partition */
       SELECT    'alter table table1 add partition p_acct_'
              || TO_CHAR (ADD_MONTHS (SYSDATE, 1), 'mmyyyy')
              || CHR (10)
              || ' values less than (to_date('''
              || TO_CHAR (LAST_DAY (ADD_MONTHS (SYSDATE, 1)) + 1, 'yyyy-mm-dd')
              || ''' ,'''
              || 'YYYY-MM-DD'
              || ''')) '
         INTO v_sql2
         FROM DUAL;
    
       EXECUTE IMMEDIATE v_sql2;
    
       v_msg_desc := 'SUCCESS: New parition added in table1';
        package.procedure('information',v_msg_desc);
    EXCEPTION
       WHEN OTHERS
       THEN
          DBMS_OUTPUT.put_line (SQLERRM);
    END;
    In this script, how can I add exception given for each EXECUTE IMMEDIATE statement?

    You wrap them with begin / end

    BEGIN
       EXECUTE IMMEDIATE --stuff and or things
    EXCEPTION WHEN --something
    THEN
       --more stuff
    END;
    
  • Application crashes with the Exception when using javax.microedition.media.Player

    Hello

    I have an application that processes data from bluetooth and send it to the web service. Recently, there was a request to add sounds to the request. Now when the application processes lots of data and the player plays constantly after a few seconds I get exception "Application is not responding. And then the treatment is finished. In the newspapers, I see many connected after this exception ForcedStackTrace exception.

    The sounds are played in the separate thread. If the app is not play sounds or short sounds - everything works fine. Is it possible to avoid what happens an exception? Why this is happening?

    Thanks in advance,

    Viktor.

    Solved by implementing my own PlayerManager, which running in a separate thread would point the way to the queue rather then the number of threads by using the internal player application.

  • Exception when using tnsnames AND ezconnect resolution methods with managed Oracle ODP 12 c rel.3

    We are looking at upgrading to a web service to connect to Oracle using the unmanaged to the ODP ODP managed (12 c module 3).

    We use tnsnames and have the following configuration in the sqlnet.ora file: NAMES. DIRECTORY_PATH = (TNSNAMES, EZConnect).

    The resolver EZConnect is necessary because we use an OracleDependency object for database update notifications.

    When moving to the managed driver, a SocketException exception is thrown when you try to open a new connection. Looking at the call stack, I can see that the managed Oracle driver, actually a 'OracleInternal.Network.EZConnect' object, calls System.Net.Dns.GetAddrInfo to get an IP address, but with the alias tns as a parameter. Of course, it fails with this exception "unknown host".

    So it seems to me that there is a problem combining tnsnames, ezconnect manned ODP managed!

    Someone else who has experienced this and found a solution, or it could be an error in the driver?

    This problem seems to have been fixed in the version of 12 c 4.

  • Exception when using setWhereClause()

    Hello

    I use JDeveloper 11.1.2.3

    I need to get a row in the Dattabse table.

    To do this, I put the WHERE clause in the VO using the setWhereClause (String) method.

    Where clause looks almost like

    setWhereClause("Companyid = '"+getCompanyId()+"' and CustomerGroupName like 'Elite' ");
    

    while I try to run the application, his throw and error as:

    oracle.jbo.SQLStmtException: Houston-29114 ADFContext is not configured to process this exception messages. Use the code of exception stack trace and error to investigate the root cause of this exception. Root cause error code is Houston-27122. Are parameters of error message {0 = SELECT * FROM (SELECT * FROM OFFERRULE) QRSLT WHERE (Companyid = "01616C8F-4430-4F11-9257-B23626C50E99") and CustomerGroupName as 'élite'}

    Why is this happening?

    Kind regards

    Nigel.

    Nigel,

    the error you got is only the analytical error. There is an error detailed in the journal a place that tells you exactly what the problem is (for example table or view does not exist). The summary shows you the statement sql has a problem, so an action you should do is copy the statement and run it from a sql inside jdev worksheet. See is the instruction

    SELECT * FROM (SELECT * FROM OFFERRULE) QRSLT WHERE (Companyid = "01616C8F-4430-4F11-9257-B23626C50E99") and CustomerGroupName as 'élite'

    runs without problem.

    Next step is that you must not build your own where clause. To do this, you must use a ViewCriteria and apply the criteria of the vo, when you need to get the data.

    Timo

  • getting exception when using JavaFX SDK/JRE bundled in Netbeans

    When I try to put my JavaFX SDK/JRE to use Java SE and run my application I get an exception ClassLoader (java.lang.NoClassDefFoundError: javafx/application/application).

    I still have to get my Netbeans to use properly the bundled JavaFX SDK/JRE that come with JRE/SDK to the Java SE. I am referring to Java for JavaFX platform properties (in a project-> properties-> library-> manage-> tab JavaFX platforms).

    Here's what I have my JavaFX platform settings the value:
    JavaFX SDK--> C:\Program Files (x86)\Java\jdk1.7.0_10
    JRE JavaFX--> C:\Program Files (x86)\Java\jdk1.7.0_10\jre

    I am currently using 7u10 7.2 Netbeans and Java (the problem also occurs with 7u7 and 7u6).

    For those who using Java7u6 and later, can you tell me what your platform setting manage is the JavaFX tab?

    Thank you
    Jose

    OK its fixed. I noticed that the word hellow JavaFX netbeans 7.2 contains the following pots as part of its compilation libraries, jfxrt, deploy, plugin and javaws. In my project of problem I just add them to my library of compilation and it worked.

    Thanks for the help Igor.
    Jose

  • Exception when using weblogic datasource in app ADF - BC

    Hello
    I want to use the data source for weblogic [JNDI name] as the source of data for my ADF BC application.
    I'm following the "your Application Module connection database configuration" in the link
    http://download.Oracle.com/docs/CD/E14571_01/Web.1111/b31974/bcservices.htm#CHDJDBJB.

    I did the following steps.

    1 started weblogic server and configured a data source [ex: testbcDS]
    2. in JDeveloper, sailed to the 'Configuration' Panel, under the direction of the ' * ModuleLocal' and changed the connection type "JDBC Data Source.
    and the name of the data source to the java: comp/env/jdbc/testbcDS '.
    3. in JDeveloper, wrote a client Java stand alone with the following code snippet.
    Public Shared Sub main (String [] args) {}
    try {}
    String amDef = "oracle.communications.platform.bcapp.poc.app.AppModule";
    Config = "AppModuleLocal";
    ApplicationModule m = Configuration.createRootApplicationModule (amDef, config);
    ViewObject rscGroupVo = am.findViewObject("IfwRscGroupView1");
    rscGroupVo.executeQuery ();
    }
    }

    4. on the implementation of the present the following exception is displayed in the console

    oracle.jbo.DMLException: Houston-27200: failure JNDI. Unable to search data in the context of jdbc/testbcDS Source
    at oracle.jbo.server.DBTransactionImpl.lookupDataSource(DBTransactionImpl.java:1418)
    at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:309)


    Please let me know if I followed the correct steps and let me know the missing steps / wrongs I've done.

    The same works very well when the connection type is "JDBC URL".

    Please suggest.

    Thank you
    Praveen

    The stand-alone client runs as a J2SE application, so there is no container for application server and therefore no data sources. If you want to use a stand-alone client for testing purposes, then use a JDBC URL in the local configuration of the AOS and set another configuration of AM who will use data sources and which will be used when deploying to an application server.

    Dimitar

  • How can I change the prefix to namespace for the JAX - RPC client request?

    I create a JAX - RPC client to call an RPC/encoded web service. The service has been generated in a program of ColdFusion and for some reason when the SOAP namespace prefix is anything but "soapenv" it returns text/html instead of text/xml. Currently, the client sends requests with the prefix "env" and I would like to change it to "soapenv".

    I've created a type of javax.xml.rpc.handler.GenericHandler and tried to follow up:

    @Override public boolean handleRequest(MessageContext p1) {

         SOAPMessage msg = ((SOAPMessageContext) p1).getMessage(); 


         try {

              SOAPPart part = msg.getSOAPPart();

              SOAPEnvelope envelope = part.getEnvelope(); 

              envelope.setPrefix("soapenv"); 

              msg.saveChanges(); 

         } catch(SOAPException ex) {

              // TODO

              return false;

         } 


         return true;

    }

    However, I get the following exception:

    java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}Server] FaultString [UNIMPLEMENTED ] FaultActor [null] Detail [<detail><bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">java.lang.AssertionError: UNIMPLEMENTED

    at weblogic.xml.domimpl.NodeImpl.setPrefix(NodeImpl.java:173)

    at test.MyHandler.handleRequest(MyHandler.java:33)

    at weblogic.wsee.handler.JaxrpcHandlerChain.handleRequest(JaxrpcHandlerChain.java:58)

    at weblogic.wsee.ws.dispatch.server.JaxrpcChainHandler.handleRequest(JaxrpcChainHandler.java:102)

    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)

    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:107)

    at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:132)

    at weblogic.wsee.ws.WsStub.invoke(WsStub.java:87)

    at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:341)

    at test.Approvedsuppliers_Wrap_Stub.echo(Approvedsuppliers_Wrap_Stub.java:31)

    at test.Approvedsuppliers_WrapPortClient.echo(Approvedsuppliers_WrapPortClient.java:130)

    at test.Approvedsuppliers_WrapPortClient.main(Approvedsuppliers_WrapPortClient.java:43)

    Is there a solution? I appreciate all the comments.

    Thank you, Bill

    What I ended up doing is converting the SOAP message to a string, replace the namespace prefix and convert it to a SOAP message.

    @Override
       public boolean handleRequest(MessageContext messageContext) {
          SOAPMessageContext soapMessageContext = (SOAPMessageContext) messageContext;
          SOAPMessage soapMessage = soapMessageContext.getMessage();
    
          String soapString = convertSOAPToString(soapMessage);
    
          soapString = soapString.replaceAll("env:", "soapenv:");
          soapString = soapString.replaceAll("xmlns:env", "xmlns:soapenv");
    
          SOAPMessage newSoapMessage = convertStringToSOAP(soapString);
    
          MimeHeaders mimeHeader = newSoapMessage.getMimeHeaders();
          mimeHeader.setHeader("SOAPAction", "");
    
          soapMessageContext.setMessage(newSoapMessage);
    
          return true;
       }
    
       private String convertSOAPToString(SOAPMessage soapMessage) {
          StringWriter stringWriter = null;
    
          try {
             stringWriter = new StringWriter();
             StreamResult streamResult = new StreamResult(stringWriter);
    
             TransformerFactory transformFactory = TransformerFactory.newInstance();
             Transformer transformer = transformFactory.newTransformer();
             transformer.transform(new DOMSource(soapMessage.getSOAPPart()), streamResult);
    
          } catch (TransformerException e) {
             throw new RuntimeException(e);
          } finally {
             close(stringWriter);
          }
    
          return stringWriter.toString();
       }
    
       private SOAPMessage convertStringToSOAP(String soapString) {
          SOAPMessage soapMessage = null;
          ByteArrayInputStream byteInputStream = null;
    
          try {
             MessageFactory msgFactory = MessageFactory.newInstance();
             soapMessage = msgFactory.createMessage();
             SOAPPart soapPart = soapMessage.getSOAPPart();
    
             // Load the SOAP text into a stream source
             byte[] buffer = soapString.getBytes();
             byteInputStream = new ByteArrayInputStream(buffer);
    
             StreamSource source = new StreamSource(byteInputStream);
    
             // Set contents of message
             soapPart.setContent(source);        
    
          } catch (SOAPException e) {
             throw new RuntimeException(e);
          } finally {
             close(byteInputStream);
          }   
    
          return soapMessage;
       }
    
       private void close(Closeable closeable) {
          if(closeable != null) {
             try {
                closeable.close();
             } catch (IOException e) {
                // TODO
             }
          }
       }
    
  • Firefox locked up with YouTube when using Dragon NaturallySpeaking

    I use Dragon NaturallySpeaking to get all my data into the computer as I am paralyzed from the shoulders down, incapable of any other way to the data. When I click on a link that would be for YouTube or other types of media devices, Firefox and Dragon NaturallySpeaking will lock leaving me place the Creek without a paddle. Short of abolishing the use of Firefox as my default browser, I am open to all suggestions that you may have because Microsoft Internet Explorer is a program that I can't stand using and I use Firefox since its inception and I like except when it crashes.

    Thank you very much and I am open to any suggestions you might have before uninstall DNS because it is a must.

    Bruce

    I noticed a similar problem, which began occurring only recently. If I'm dictating in Firefox use Dragon NaturallySpeaking 8, if it consists in the search bar or in a Gmail e-mail window, Firefox can lock up without warning. The only way I found to recover the problem is to close with force Firefox using Windows Task Manager.

    EDIT: this error message titled 'dd10edit' might be relevant - "COM returned an unexpected error code: details are HOOKERR_CONNOTINJECT.

  • Disk activity constant when using vista home

    Original title: I am running Vista Home premium and am sick of the constant disk activity slowing things down. I canceled the programs start and automatic indexing, but again the thing vibrates far. Does anyone have constructive ideas?

    Constant disk activity when using vista home. Any ideas how to stop it?

    Hello

    What antivirus/antispyware/security products do you have on the machine? Be one you have NEVER
    on this machine, including those you have uninstalled (they leave leftovers behind which can cause
    strange problems).

    ----------------------------------------------------

    Follow these steps:

    Start - type this in the search box-> find COMMAND at the top and RIGHT CLICK – RUN AS ADMIN

    Enter this at the command prompt - sfc/scannow

    How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
    generates in Windows Vista cbs.log
    http://support.Microsoft.com/kb/928228

    Also run CheckDisk, so we cannot exclude as much as possible of the corruption.

    How to run the check disk at startup in Vista
    http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html

    ==========================================

    After the foregoing:

    How to troubleshoot a problem by performing a clean boot in Windows Vista
    http://support.Microsoft.com/kb/929135
    How to troubleshoot performance issues in Windows Vista
    http://support.Microsoft.com/kb/950685

    Optimize the performance of Microsoft Windows Vista
    http://support.Microsoft.com/kb/959062
    To see everything that is in charge of startup - wait a few minutes with nothing to do - then right-click
    Taskbar - the Task Manager process - take a look at stored by - Services - this is a quick way
    reference (if you have a small box at the bottom left - show for all users, then check that).

    How to check and change Vista startup programs
    http://www.Vistax64.com/tutorials/79612-startup-programs-enable-disable.html

    A quick check to see that load method 2 is - using MSCONFIG then put a list of
    those here.
    --------------------------------------------------------------------

    Tools that should help you:

    Process Explorer - free - find out which files, key of registry and other objects processes have opened.
    What DLLs they have loaded and more. This exceptionally effective utility will show you even who has
    each process.
    http://TechNet.Microsoft.com/en-us/Sysinternals/bb896653.aspx

    Autoruns - free - see what programs are configured to start automatically when you start your system
    and you log in. Autoruns also shows you the full list of registry and file locations where applications can
    Configure auto-start settings.
    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902.aspx
    Process Monitor - Free - monitor the system files, registry, process, thread and DLL real-time activity.
    http://TechNet.Microsoft.com/en-us/Sysinternals/bb896645.aspx

    There are many excellent free tools from Sysinternals
    http://TechNet.Microsoft.com/en-us/Sysinternals/default.aspx

    -Free - WhatsInStartUP this utility displays the list of all applications that are loaded automatically
    When Windows starts. For each request, the following information is displayed: Type of startup (registry/Startup folder), Command - Line String, the product name, Version of the file, the name of the company;
    Location in the registry or the file system and more. It allows you to easily disable or remove unwanted
    a program that runs in your Windows startup.
    http://www.NirSoft.NET/utils/what_run_in_startup.html

    There are many excellent free tools to NirSoft
    http://www.NirSoft.NET/utils/index.html

    Window Watcher - free - do you know what is running on your computer? Maybe not. The window
    Watcher says it all, reporting of any window created by running programs, if the window
    is visible or not.
    http://www.KarenWare.com/PowerTools/ptwinwatch.asp

    Many excellent free tools and an excellent newsletter at Karenware
    http://www.KarenWare.com/

    ===========================================

    Vista and Windows 7 updated drivers love then here's how update the most important.

    This is my generic how updates of appropriate driver:

    This utility, it is easy see which versions are loaded:

    -Free - DriverView utility displays the list of all device drivers currently loaded on your system.
    For each driver in the list, additional useful information is displayed: load address of the driver,
    Description, version, product name, company that created the driver and more.
    http://www.NirSoft.NET/utils/DriverView.html

    For drivers, visit manufacturer of emergency system and of the manufacturer of the device that are the most common.
    Control Panel - device - Graphics Manager - note the brand and complete model
    your video card - double - tab of the driver - write version information. Now, click on update
    Driver (this can do nothing as MS is far behind the certification of drivers) - then right-click.
    Uninstall - REBOOT it will refresh the driver stack.

    Repeat this for network - card (NIC), Wifi network, sound, mouse, and keyboard if 3rd party
    with their own software and drivers and all other main drivers that you have.

    Now in the system manufacturer (Dell, HP, Toshiba as examples) site (in a restaurant), peripheral
    Site of the manufacturer (Realtek, Intel, Nvidia, ATI, for example) and get their latest versions. (Look for
    BIOS, Chipset and software updates on the site of the manufacturer of the system here.)

    Download - SAVE - go to where you put them - right click - RUN AD ADMIN - REBOOT after
    each installation.

    Always check in the Device Manager - drivers tab to be sure the version you actually install
    presents itself. This is because some restore drivers before the most recent is installed (sound card drivers
    in particular that) so to install a driver - reboot - check that it is installed and repeat as
    necessary.

    Repeat to the manufacturers - BTW in the DO NOT RUN THEIR SCANNER device - check
    manually by model.

    Look at the sites of the manufacturer for drivers - and the manufacturer of the device manually.
    http://pcsupport.about.com/od/driverssupport/HT/driverdlmfgr.htm

    How to install a device driver in Vista Device Manager
    http://www.Vistax64.com/tutorials/193584-Device-Manager-install-driver.html

    If you update the drivers manually, then it's a good idea to disable the facilities of driver under Windows
    Updates, that leaves about Windows updates but it will not install the drivers that will be generally
    older and cause problems. If updates offers a new driver and then HIDE it (right click on it), then
    get new manually if you wish.

    How to disable automatic driver Installation in Windows Vista - drivers
    http://www.AddictiveTips.com/Windows-Tips/how-to-disable-automatic-driver-installation-in-Windows-Vista/
    http://TechNet.Microsoft.com/en-us/library/cc730606 (WS.10) .aspx

    ===========================================

    Refer to these discussions because many more excellent advice however don't forget to check your antivirus
    programs, the main drivers and BIOS update and also solve the problems with the cleanboot method
    first.

    Problems with the overall speed of the system and performance
    http://support.Microsoft.com/GP/slow_windows_performance/en-us

    Performance and Maintenance Tips
    http://social.answers.Microsoft.com/forums/en-us/w7performance/thread/19e5d6c3-BF07-49ac-a2fa-6718c988f125

    Explorer Windows stopped working
    http://social.answers.Microsoft.com/forums/en-us/w7performance/thread/6ab02526-5071-4DCC-895F-d90202bad8b3

    Hope these helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • Get exceptions when a blackberry file downloading

    I updated my jboss server in place Upload(basically a photo upload) file to blackberry.

    I wanted to use the phonegap API to download the file, but it is limited. (even if phonegap has a lot)

    It must be the full path of the file that we cannot get a file of the form field. (Name of file is accessible)

    Also, his example is also very poor, because it downloads only the files whose paths are known.

    So I used a simple, this form with request for multipart/form-data and here is the code on the client side:

    function uploadProfilePicToServer() {}
    parent.pop.popOut ("Loading...");
    var xhrObj = false;
    var self = this;
      
    var file = document.getElementById ("CIPP");
    file = file.files [0];
    xhrObj = new XMLHttpRequest();
    try {}
           
         
    xhrObj.open ("POST", URL + "service", true);
    xhrObj.setRequestHeader ("Content-type", "multipart/form-data");
    xhrObj.onreadystatechange = function() {}
    If (xhrObj.readyState == 4 & xhrObj.status == 200) {}
    Alert (xhrObj.ResponseText);
    }
    }
    formData var = new FormData();
           
    formData.append ("cfs", "imgup");
    formData.append ("cfa", "pi");
    formData.append ("ppic", file);
           
    xhrObj.send (formData);
    } catch (e) {}
    Alert (e.message);
    }
    }

    I used the common Apache of the FileUpload library on the server side. (the one shown in their doc)

    In addition, have set the maxsize and timeout parameters correctly.

    Problems that are coming on intranet

    When used in intranet, small sizes like 50-100 KB it works fine, but for larger files i.e. > 500Ko, I get following exception on the server:

    2011-09-23 10:49:10, ERROR 640 [http - 127.0.0.1 - 8080-2] [com.spidoss.cityfan.controller.CityFanController:89] org.apache.commons.fileupload.FileUploadBase$ IOFileUploadException: multipart/form-data request processing failed. Stream ended unexpectedly

    Problems that are coming on internal

    When I use an external server to download the files, I keep getting the above exception

    I thought about building an extension for downloading files, but Java also requires the full path of the file, and we can get the javascriptcolon; NO.

    Someone at - he got the download of a file to an external server with BrowserField

    Help, please

    We just had a post the other day about this... My guess is that you have the same problem they have...

    Make sure your paths are exactly as they are specified in step (6) of the instructions... the other developer forgot the directory 'src '.

  • BlackBerry signing key IO exception when you save the new key to the file

    I have blackberry signing key IO exception when you save the new key file when trying to get my keys. I read the other post - I do not use Windows Vista and JDE component package is installed on my machine. What now?

    It was a windows 7 resolved permission problem

  • JAX - RPC, Webservice and the dateTime type elusive everything

    I need to interface with a web service. I have no control over it, so I can't change the WSDL, the server, or something similar.

    One of the types of data used is xsd: DateTime, a guy who according to it (table 1, JAX - RPC support for data types), is not supported on J2ME. Of my research (on this forum and on the Internet), person doesn't use any date/time/dateTime any form or is ordered to change their WSDL so it it does not use if they intend to use a client on J2ME.

    If anyone has a clue on how to use it, because I said, I have no control over the server or the WSDL. Would be his replacement formatted by a string in the work in an appropriate manner or the JAX - RPC system would say it's the wrong type?

    I used wscompile to get static stubs for the service, I can't compile without figure this (Type has only primitive types, 'UNKNOWN' what wscompile replaces the unsupported types is not cutting it for obvious reasons). Temporarily, I've replaced 'UNKNOWN' with Type.STRING but I don't know if it will work (that's why I asked).

    OK, the base64Binary Type I used was Type.STRING. Then I just ran through the Base64InputStream.decode that does the job. I realized that two types do not work (wscompile is good for a general idea of how a web service must be implemented but horrible to the actual implementation) so I need to rewrite much of the code and decided to rewrite it so that it works better and is more clean.

    Thanks for the help.

    EDIT:

    It was also the help function, I used to convert a string to a timetable so that it works with the web service:

    public static String toSOAPString(Calendar cal)
    {
        if(cal == null)
        {
            return null;
        }
        StringBuffer buf = new StringBuffer();
    
        //Get format
        new SimpleDateFormat("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'SSS").format(cal, buf, null);
        buf.append("0000");
    
        //Timezone
        String zoneID = cal.getTimeZone().getID();
        int index = zoneID.indexOf('-');
        if(index == -1)
        {
            index = zoneID.indexOf('+');
            /* If no timezone offset exists, it isn't needed
            if(index == -1)
            {
                buf.append("+00:00");
            }
            */
        }
        if(index != -1)
        {
            buf.append(zoneID.substring(index + 1));
        }
        return buf.toString();
    }
    
  • Uncaught exception when you are not debugging

    I have an application that analyzes XML and uses threads to display a progress bar while it analyzes the data. It works without a hitch, when the unit runs in debug mode on a simulator, but when I select run as... and select a simulator during the analysis, the application closes with error

    "Eception Exception: Application BBRitis (162) does not; process is completed.

    There are no exceptions when debugging, and without breaks. How am I to determine and correct the cause of the error? Anyone know what this could be?

    Thank you!

    OK the theory number two, this one seems more likely given the stack trace.

    You update the screen using invokeLater?  How often do you do that.

    If you do this frequently, then treatment to generate updates may in fact take less time than processing for updating the screen.  In this case, you are invading the event queue.  This will be acknowledged by the Dispatcher that assumes that you have blocked the thread of events.  Where, as in fact the problem is that the thread of events cannot process quickly enough.

    Can you make sure there is at least 0.1 seconds between your ' of invokeLater?  You can also use "invokeAndWait", or synchronize the lock of the event.  However I do not think that you need to update the screen as frequently, so I woould go with some sort of delay between updates, then use the lock of the event because it is the most effective (and does not imply the queue of flooding).

    This seems reasonable?

Maybe you are looking for