java.io.IOException: APN is not specified

Hello

I saw that this topic was opened at other times, but I don't know if I understand what I have to do.

First of all, I got this code:

String url1 = "www.myurl.com;

con = (HttpConnection), Connector.open (url1).

is = con.openInputStream ();

But when I try it in my BB device, I got java.io.IOException: APN is not specified. (Try the code with the blackberry MDS services simmulators email in the works of eclipse Simulator)

So, as I read somewhere there, I tried this code:

TransportDetective td =new TransportDetective();

if ( TransportDetective.isCoverageAvailable (TransportDetective. TRANSPORT_BIS_B) | TransportDetective.isCoverageAvailable (TransportDetective. TRANSPORT_MDS) | TransportDetective.isCoverageAvailable (TransportDetective. TRANSPORT_TCP_CELLULAR) | TransportDetective.isCoverageAvailable (TransportDetective. TRANSPORT_TCP_WIFI) | TransportDetective.isCoverageAvailable (TransportDetective. TRANSPORT_WAP) | TransportDetective.isCoverageAvailable (TransportDetective. TRANSPORT_WAP2))

{

String url2 = 'www.myurl.com;

URLFactory urlFactory =new URLFactory(url2);

final ServiceRecord defaultTCPSR = td.getDefaultTcpCellularServiceRecord ();

final String connectionURL = urlFactory.getHttpDefaultTcpCellularUrl (defaultTCPSR);

HttpConnection conn = (HttpConnection), Connector.open (connectionURL);

}

But when I paste in my code, I wonder to create classes of URLFactory and also TransportDetective.

I looked on the net and I found codes for the class here: http://ecuadorblackberry.ec/?p=425

But when I try, I get that td.getDefaultTcpCellularServiceRecord () returns a null value, so it does not work.

The only thing I want, is to connect to a web service from my application, how can I do?

Thank you

Sorry one thing yet.

You have discovered, you can specify the options of AFN directly on the URL.

Because you are in Spain and will sell to people in Spain only, then you can check the network and provide the correct APN information for this network.  Watch RadioInfo.  You can use

getCurrentNetworkName()

and try to match the name, or

getMNC (RadioInfo.getCurrentNetworkIndex ())

and look for the associated MNC code and match from there.

Once you know the network, you can specify the AFN on the URL.

Who help me?

Tags: BlackBerry Developers

Similar Questions

  • WAP2 connection error: APN is not specified

    Hi all

    I hope you can help me with this problem. I have a storm that runs on the Vodafone network. I am trying to connect WAP2 and immediately, I got an ioexception

    java.io.IOException: APN is not specified

    I have read several post on WAP2 and I added to my url "deviceside = true; WAP2 = xxx' where

    XXX = getWap2Uid();

    My getWap2Uid() code is

    public static String getWap2Uid() {}
           
    Reviews [ServiceRecord] is ServiceBook.getSB () .findRecordsByCid ("WPTCP");.
    for (int i = 0; i)< records.length;="">
    {
    ServiceRecord serviceRecord = records [i];
    String recordName = serviceRecord.toString () .toUpperCase ();
    If (serviceRecord.isValid () &! serviceRecord.isDisabled () &)
    serviceRecord.getUid ()! null = & serviceRecord.getUid () .length ()! = 0 &&
    recordName.indexOf("WAP2")! = - 1).
                   
    {
    String uid = serviceRecord.getUid ();
    EventLogger.logEvent (EventLogID, new String ("getWap2Uid, UID =" + uid) .getBytes ());
    Returns the uid;
    }
    }
    Returns a null value.
          
    }

    The event log from the print, I am able to see that xxx = WAP2 trans

    I'd appreciate very much any help on this, because I'm totally stuck

    The suffix should look like this:

    « ; deviceside = true; ConnectionUID =' + uid;

  • BlackBerry Smartphones APN is not specified

    Hey all. I am presented with a weird problem with the App World in my bold 9700. Sometimes when I try to open App world I get the error:

    APN is not specified

    However sometimes restart the phone works and sometimes it doesn't. Has something to do with the availability of the mobile network or it is exclusively a question of APP World?

    Any light on the matter would be greatly appreciated!

    My phone: Bold 9700

    Carrier: Orange UK with interent plan unlimited blackberry

    Concerning

    Ash

    Hello JSanders! After a lot of chit chat with the Orange (UK) support, they were able to set the APN settings. The parameters are the following:

    The APN settings must be enabled.

    APN authentication box must be ticked.

    APN: orangeinternet

    User name: user

    Password: pass

    Would be a lot of help to the people, if the list of the APN settings have been updated to include as well the Orange (UK).

    Concerning

    Ash

  • APN not specified on some operators

    Hi all

    I have an application which give me a different answer for some operators. Let's say I have 2 operator, A and B. When I try my app using A, this works well. But when I use it on B, I get a message like: "The Tunnel is not open", or another type of blackberry: 'the APN is not specified. As I read on a document, to solve this problem, I have to enter information to the AFN on my Blackberry setting, but on the same document, I also read that if I use the AFN, it means that I have to pay for internet services (GPRS).

    What should I do if I can use the application on B without APN?

    Can someone help me?

    Thanks in advance.

    Kind regards

    Novan Ananda

    Hello

    According to what you target OS is that I would suggest that you use the ConnectionFactory .

    IF the user does not connect you can point to maybe configure the APN. but with the score could cost him extra.

  • IOException: error = 12, not enough space when the duplication of external process

    Hi all

    I've encountered the question as:

    java.io.IOException: cannot run program "/ usr/local/bin/sudo ': error = 12, not enough space
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
    at java.lang.Runtime.exec(Runtime.java:593)
    at java.lang.Runtime.exec(Runtime.java:466)
    ...
    Caused by: java.io.IOException: error = 12, not enough space
    at java.lang.UNIXProcess.forkAndExec (Native Method)
    to java.lang.UNIXProcess. < init > (UNIXProcess.java:53)
    at java.lang.ProcessImpl.start(ProcessImpl.java:65)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)

    When I tried to call an external script by Runtime.exec. I checked the physical memory and swap, two of them were more than 2 GB at the point where the exception was thrown. The same exception was thrown by the other processes external duplication of wire...

    Everyone please throw me some lights on this issue? I have seen no exception OutOfMemoryError either from my application.

    Thank you and best regards.

    You're out of swap space. Nothing to do with local memory, heap, OutOfMemoryErrors, etc.

  • Problem with HttpConnection when it connects only not to wifi - java.io.IOException: Tunnel failed

    Hi all

    I develop an application that communicates with a database MySQL via PHP stored on the server scripts. Until today I've developed using the Simulator, and everything has been fine. I now started to test on a device and, while being connected to wifi, everything is still fine. However, the minute I turn off wifi and let the network provider, O2 UK, I get:

    "Request failed: reason: java.io.IOException: Tunnel failed".

    The source of the connection code is as follows:

       public void run() {
           // The following code will only build under JDE 4.5 and later
    
           try {
               String connectionParameters = "";
               // JDE 4.3 is required to get WLANInfo
               if (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED) {
                   // Connected to a WiFi access point
                   connectionParameters = ";interface=wifi";
               } else {
                   int coverageStatus = CoverageInfo.getCoverageStatus();
                   ServiceRecord record = getWAP2ServiceRecord();
                   if (record != null
                           // In JDE 4.5 CoverageInfo changed the name of
    COVERAGE_CARRIER to COVERAGE_DIRECT
                           // The constant value for both is the same,
    '1', so you can use that to avoid any
                           // dependency on JDE 4.5
                           && (coverageStatus & CoverageInfo.COVERAGE_DIRECT) ==
                           CoverageInfo.COVERAGE_DIRECT) {
                       // Have network coverage and a WAP 2.0 service book record
                       connectionParameters = ";deviceside=true;ConnectionUID="
                               + record.getUid();
                   } else if ((coverageStatus & CoverageInfo.COVERAGE_MDS) ==
                           CoverageInfo.COVERAGE_MDS) {
                       // Have an MDS service book and network coverage
                       connectionParameters = ";deviceside=false";
                   } else if ((coverageStatus & CoverageInfo.COVERAGE_DIRECT) ==
                           CoverageInfo.COVERAGE_DIRECT) {
                       // Have network coverage but no WAP 2.0 service book record
                       connectionParameters = ";deviceside=true";
                   }
               }
    
               // Pop up a dialog showing the parameters chosen
               UiApplication.getUiApplication().invokeLater(
                       new DialogRunner("Connection Params: "
                               + connectionParameters));
    
               HttpConnection connection = (HttpConnection) Connector.open(url
                       + connectionParameters);
    
               connection.setRequestMethod(method);
               if (method.equals("POST") && postData != null) {
                   connection.setRequestProperty("Content-type",
                           "application/x-www-form-urlencoded");
                   OutputStream requestOutput = connection.openOutputStream();
                   requestOutput.write(postData);
                   requestOutput.close();
               }
               int responseCode = connection.getResponseCode();
               if (connection instanceof HttpsConnection) {
                   HttpsConnection secureConnection = (HttpsConnection) connection;
                   String issuer = secureConnection.getSecurityInfo()
                           .getServerCertificate().getIssuer();
                   UiApplication.getUiApplication().invokeLater(new
    DialogRunner("Secure Connection! Certificate issued by: " + issuer));
    
               }
               // Really you should check for more than just HTTP_OK
               if (responseCode != HttpConnection.HTTP_OK) {
                   screen.requestFailed("Unexpected response code: "
                           + responseCode);
                   connection.close();
                   return;
               }
    
               String contentType = connection.getHeaderField("Content-type");
               ByteArrayOutputStream baos = new ByteArrayOutputStream();
    
               InputStream responseData = connection.openInputStream();
               byte[] buffer = new byte[10000];
               int bytesRead = responseData.read(buffer);
               while (bytesRead > 0) {
                   baos.write(buffer, 0, bytesRead);
                   bytesRead = responseData.read(buffer);
               }
               baos.close();
               connection.close();
    
               screen.requestSucceeded(baos.toByteArray(), contentType);
           } catch (IOException ex) {
               screen.requestFailed(ex.toString());
           }
       }
    

    I scoured these forums and tried everything I can find. I tried different settings, including changing the APN settings both wap and mobile options for O2. Nothing seems to solve this problem.

    Any help would be appreciated!

    Thank you

    Jack

    OK, good news. Fixed. Thanks a lot for your answers. I would have understood the connection settings as they appear to have been the problem.

    I don't remember exactly which it generated, but I decided to try replacing it with the generator of connectionParameter above with the snippet connSuffix here:
    http://supportforums.BlackBerry.com/T5/Java-development/connecting-your-BlackBerry-http-and-socket-c...

    Worked like a dream, so I'm very indebted to all those who contributed to this. It now seems to work little matter the type of connection is available including BES.

    In case anyone is interested, however, I tried all combinations of settings APN bloody O2, but it came to nothing. I am disappointed that it was the connection settings I developed that a book by Apress, and I followed this particular part, Word for Word.

    Thank you all for the world of useful information here!

  • Curve 8320 java.io.IOException: connection not writable

    Hey guys,.

    Does anyone know of specific problems with the connections involving 8320 to the images? It seems to me this error:

    java.io.IOException: connection not writable

    When I try to upload an image. I know that the code is correct, because I got it runnning on the 8830, 8900, 9000 and 9530.

    Anyone know of a particular way of dealing with that on this version?

    Thanks for your help and your time

    EDIT: It is also worth noting that I have a series of other connections to Web pages using the formats the https and http which work perfectly well with the 8320. It only occurs with the download of images.

    Apparently he has developed before, for example,

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&thread.ID=16200

    You can view the code? At least that anyone happen to know of a bug that would cause this, at least consider a timing

    or weird problem because they may appear only in certain configurations.

  • persistent "not specified" errors java script when you try to print from Web sites...

    Windows 7 64 - bit OS, HP Photosmart C4780 printer, HP Pavilion dv6 Laptop.Recently meet persistent "not specified" errors java script when you try to print from Web sites, please help.

    Try cleaning your cache. Here's a link below that will help you with this problem.
    http://goo.GL/wE6gL

  • Can not run the program "keytool": java.io.IOException

    Hello

    I would like to follow the procedure to change the password
    glassfish server hosting APEX earphone
    using the change key word subcommand of past, but the keytool utility
    not found:

    GlassFish@ahost:/opt/glassfish3/GlassFish/Domains/mydom01/config >/opt/glassfish3/bin/asadmin
    / opt/glassfish3/bin/asadmin
    Use "exit" to exit and online 'help' for help.
    asadmin > change of master-password mydom01
    Enter the current password > changeit

    Enter the new password > changedit

    Re-enter the new password > changedit

    Can not run the program "keytool": java.io.IOException: error = 2, no such file or directory
    Past change key word command failed.
    asadmin >
    Multimode command failed.
    GlassFish@ahost:/opt/glassfish3/GlassFish/Domains/mydom01/config > what java
    / usr/bin/Java
    GlassFish@ahost:/opt/glassfish3/GlassFish/Domains/mydom01/config >

    Glassfish entire works well outside it.

    keytool could be found in/usr/java/latest/bin/keytool.

    We need to have that in the path? There is no requirement in the
    Installation Guide for this, nor did the RPM installation adjust the system
    path accordingly.

    I hope someone can tell my how things should be in regards to keytool?

    Thank you, Tom

    Hi Tom,

    the procedure to change the password for the listener of glassfish server hosting APEX

    ... more like a topic related to GlassFish for me. I guess you will get the best answers to these questions in a GlassFish related forum...

    For what it's worth, I'll try my best even when:

    Can not run the program "keytool": java.io.IOException: error = 2, no such file or directory

    This seems to be a pretty clear error message: keytool , which probably is used to manage keys for users of GlassFish, was not found. This means, you are either running on an operating system that is not officially certified for GlassFish, or you GlassFish has not been configured correctly.
    You have run

    GlassFish@ahost:/opt/glassfish3/GlassFish/Domains/mydom01/config > which java
    / usr/bin/Java

    ... which means that you assume your GlassFish runs without being set JAVA_HOME. If that's true, I'm install you GlassFish correctly from this setting.
    Anyway, you have also discovered that

    keytool could be found in/usr/java/latest/bin/keytool.

    ... that is not + / usr / bin + and probably not in the way of global search of the user on whose behalf your GlassFish is running. Then, you can either create a link [*] for c++ / usr/bin/keytool + do (finally) to + / usr/java/more late/bin/keytool +, or you setup JAVA_HOME to be + / usr/java/last +.
    [*] Note that depending on your operating system, there may be more than one stage of indirection, for example my Ubuntu a + / usr/bin/java + pointing on + / etc/alternatives/java + which points on + / usr/lib/jvm/java-6-Sun/jre/bin/java + where + / usr/lib/jvm/java-6-Sun / + points to the directory containing the real JDK to use. You will probably find something like this on your system. My Ubuntu box has a link for + / usr/bin/keytool +, so I get when running "what keytool.

    We need to have that in the path? There is no requirement in the installation guide for that, nor the RPM installation has adjusted the path system accordingly.

    Again, this is not a forum of GlassFish.

    I hope my advice helps you solve your problem. If they are not, please choose the appropriate forum for your next post on this topic. And I guess, giving additional information about your OS and how you manage your JDK (and which version you use) help people here to help you.

    Thank you

    Udo

  • Error when trying to create a collection of Solr (java.io.IOException: the device is not ready)

    Hello, everyone.

    I am trying to create a .cfm document which delete and then re-create a specific collection of Solr, index and optimize it.

    The removal works perfectly.

    Unfortunately, creation it doesn't, at all.  I get the following message:

    Cannot create the collection publicsearch - an error occurred during the creation of the collection: java.io.IOException: the device is not ready.

    This is a server of Windows 7 under Apache and CFServer 9.0.1 (the version before Verity was cut).  I get no more detail than an error message.  Any idea what could be the cause?  I googled this and I see a lot of similar questions, but not quite what I have going on.

    Thank you

    ^_^

    So much worse... someone didn't bother to inform the proponent that the access to the collection AND the path to the directory that contains the collection for are different on this other server.

    Fixed.

  • java.io.IOException: schema of Transport NOT recognized: [tcp]

    Hi all, I have developed a Java class that allow me to connect, create, send and receive information to an ActiveMQ queues.
    However, when I loaded this java class Oracle 11 GR 2 (11.2), the java class has failed error message (its status is active and without errors. Is the output I got in SqlDeveloper

    * java.io.IOException: schema of Transport NOT recognized: [tcp]. * When I called this Jdeveloper 11g Java class it worked but PL/SQL does not.

    This is the Java class, I've been using



    Import javax.jms.JMSException;
    Javax.jms import. *;

    to import javax.naming.Context;
    Import javax.naming.InitialContext;
    Import javax.naming.NamingException;

    Import org.apache.activemq.ActiveMQConnectionFactory.


    public class ActiveMQRequest {
    URL of the JMS server. DEFAULT_BROKER_URL will just mean
    This JMS server is on localhost

    Name of the queue, that send messages
    private static String destMameReq = "QueueIN"; request
    private static String destNameResp = "QueueOUT"; response



    public static String Request (String urlMQ,
    String destNameReq,
    String destNameResp,
    OperationType string,
    String XMLmessage) throws JMSException {}
    int JMSDeliveryMode = 2; for PERMANENT
    ConnectionFactory Factory = null;
    Context jndiContext = null;
    Queue destRequ = null;
    Queue destResp = null;
    QueueSession session = null;
    QueueConnection connection = null;
    String messageID = null;
    QueueReceiver queueReceiver = null;
    QueueSender queueSender = null;
    String replyString = null;
    Traded Boolean = false;
    TextMessage outMessage = null;

    try {}
    jndiContext = new world;
    } catch (NamingException e) {}
    System.out.println ("could not create JNDI API context:" + try ());
    System.Exit (1);
    return "error: failure of Initial context."
    }

    try {}
    connectionFactory = new ActiveMQConnectionFactory (urlMQ);

    connectionFactory = jndiContext.lookup ("connectionFactory") (Factory);
    destRequ = jndiContext.lookup (destNameReq) (tail); Queue the request
    destResp = jndiContext.lookup (destNameResp) (tail); Response queue
    } catch (Exception e) {}
    System.out.println ("JNDI API lookup failed:" + try ());
    System.Exit (1);
    return "error: factory of MqConnection failed:"+ try (); ".
    }

    Start
    try {}
    connection = connectionFactory.createQueueConnection ();
    Connection.Start ();


    } catch (JMSException ycsms) {}
    System.out.println ("error: JMS Exception occurred:" + jmse.toString ());
    return "error: JMS Exception occurred to create a queue of connection:"+ jmse.toString ();.
    } catch (Exception e) {}
    System.out.println ("JNDI API lookup failed:" + try ());
    e.printStackTrace ();
    return "error search: JNDI API could not create Connectio queue:"+ try (); ".

    }
    try {}
    session = connection.createQueueSession (transacted, Session.AUTO_ACKNOWLEDGE);
    Check this box to instead of using JNDI
    destRequ = session.createQueue (destNameReq);
    destResp = session.createQueue (destNameResp);
    } catch (JMSException ycsms) {}
    System.out.println ("error: JMS Exception occurred:" + jmse.toString ());
    return "error: JMS Exception occurred createQueueSession:"+ jmse.toString ();.
    } catch (Exception e) {}
    System.out.println ("JNDI API lookup failed:" + try ());
    e.printStackTrace ();
    return "error search: JNDI API has no createQueueSession:"+ try (); ".

    }
    ///
    try {}
    queueSender = session.createSender (destRequ);
    outMessage = session.createTextMessage (XMLmessage);
    Sets other properties of the message
    outMessage.setJMSPriority (7);
    outMessage.setJMSReplyTo (destResp);
    outMessage.setJMSDeliveryMode (JMSDeliveryMode);
    outMessage.setJMSType ("Interval"); Interval of
    outMessage.setJMSType (OperationType); ODR, meantime, Ping
    System.out.println ("sending message.:" + outMessage.getText ());
    } catch (JMSException ycsms) {}
    System.out.println ("error: JMS Exception occurred:" + jmse.toString ());
    return "error: JMS Exception occurred createSender:"+ jmse.toString ();.
    } catch (Exception e) {}
    System.out.println ("JNDI API lookup failed:" + try ());
    e.printStackTrace ();
    return "error search: JNDI API failed: createSender"+ try (); ".

    }
    Here, we send the message!
    try {}
    queueSender.send (outMessage);


    System.out.println ("sent... Message:" + outMessage.getText () + "'");

    Receiving

    messageID = outMessage.getJMSMessageID ();


    Channel selector = "JMSCorrelationID = '" + messageID + ' "';
    System.out.println ("JMSCorrelationID = '" + messageID + "'");
    queueReceiver = session.createReceiver (destResp, selector);

    System.out.println ("received Message.");
    Message inMessage = queueReceiver.receive (2000);


    If (inMessage instanceof TextMessage) {}
    replyString = (inMessage) .getText ((text));
    System.out.println ("message:" + replyString + "'");
    }
    on the other
    replyString = "error: text is empty";
    } catch (JMSException ycsms) {}
    System.out.println ("error: JMS Exception occurred:" + jmse.toString ());
    return "error: JMS Exception occurred received:"+ jmse.toString ();.
    } catch (Exception e) {}
    System.out.println ("JNDI API lookup failed:" + try ());
    e.printStackTrace ();
    return "error search: JNDI API could not receive:"+ try (); ".

    } {Finally
    queueReceiver.close ();
    queueSender.close ();
    session. Close();
    Connection.Close;
    }
    Return replyString;
    }
    }


    This is encapsulation of pl/sql of th

    create or replace
    function ActiveMQRequest (url in varchar2,
    destNameReq in varchar2,
    destNameResp in varchar2,
    OperationType in varchar2,
    XMLmessage in varchar2) return varchar2
    like java language
    name 'ActiveMQRequest.Request (java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) return java.lang.String ';


    and that is the release of JDeveloper

    Sending message. :
    < message >
    < header >
    SourceID < SourceID > < / SourceID >
    < > 11111111111 TransactionID < / TransactionID > < MeterID > VIEN < / MeterID > < REPID > 41679178 < / REPID > < TransactionDate > 2010 - 10 - 08T 02: 00:00 < / TransactionDate > < Sensus UserID > < / UserID > < customer CustomerID > < / CustomerID > < / header > < body > < StarDate > 2010 - 10-01 T 14: 00:00 < / StartDate > < EndDate > 2010 - 10 - 06 T 14: 00:00 < / EndDate > < IntervalFlag > Y < / IntervalFlag > < MeterFlag > Y < / MeterFlag > < / Body >

    JMSCorrelationID = ' ID:W05834007 - 3793-1286901259437 - 0:0:1:1:1'
    Message is received.
    Message received: < Message >
    < header >
    < > 11111111111 TransactionID < / TransactionID >
    SourceID < SourceID > < / SourceID >
    < / header >
    < body >
    Acknowledge < TransactionStatus > < / TransactionStatus >
    < TransactionMessage > interval indicator null is not o or N < / TransactionMessage >
    < / body >
    < / message > '
    Result: < Message >
    < header >
    < > 4444444444444444 TransactionID < / TransactionID >
    < SourceID > NRT < / SourceID >
    < / header >
    < body >
    Acknowledge < TransactionStatus > < / TransactionStatus >
    < TransactionMessage > interval indicator null is not o or N < / TransactionMessage >
    < / body >
    < / message >


    When I run in Oracle Sqldeveloper output has been

    Error: JMS Exception occurred to create a queue of connection: javax.jms.JMSException: not able to create transport. Reason: java.io.IOException: schema of Transport NOT recognized: [tcp]


    Do you know what I'm doing in the configuration of Oracle 11 g 2 to do this work. I would appreciate your help.

    Thank you

    Do you have activemq.jar or activemq-Core loadjava in the database with your class? Looks like some ActiveMQ classes lack.

  • Consume Webservice - java.io.IOException: General socket error

    Hey,.

    I'm trying to consume a webservice ( www.webservicex.net, but also tried other forecasts) with a smart blackberry phone, but I still have a java.io.IOException.

    I generated stubs with the Java Wireless Toolkit 2.5.2. Now, I call the heel of the Java application.

    My MDS is running and are configured for use with my proxy. I can view each page with the built-in browser.

    The call of the stub works like this:

    public class BB_WeatherStart extends MainScreen {
    
       public BB_WeatherStart() throws RemoteException {
        com.weather.WeatherForecasts weather = null;
        WeatherForecastSoap_Stub stub = new WeatherForecastSoap_Stub();
        weather = stub.getWeatherByZipCode("10024");
    
        LabelField longi = new LabelField();
        longi.setText("Longitüde" + weather.getLongitude());
        add(longi);
    
        LabelField status = new LabelField();
        status.setText("Status" + weather.getStatus());
        add(status);
       }
    
    }
    

    The instantiation of the stub works, but the call of the method getWeatherByZipCode returns this exception.

    This is the code for the method:

    public com.weather.WeatherForecasts getWeatherByZipCode(java.lang.String zipCode) throws java.rmi.RemoteException {
    
       Object[] inputObject = new Object[1];
       inputObject[0] = zipCode;
    
       Operation op = Operation.newInstance(_qname_GetWeatherByZipCode, _type_GetWeatherByZipCode, _type_GetWeatherByZipCodeResponse);
       _prepOperation(op);
       op.setProperty(Operation.SOAPACTION_URI_PROPERTY, "http://209.162.186.60/GetWeatherByZipCode;deviceSide=true");
    
       Object resultObj;
       try {
          resultObj = op.invoke(inputObject);
       } catch (JAXRPCException e) {
        throw e;
       }
    
    //Snip.. the Rest of the method is never reached ;)
    
    }
    

    The Exception is thrown in the call to op.invoke (inputObject);

    I also tried the hostname instead of IP address, but then I get a j "" ava.io.IOException: bad DNS address "and if I try without the"; " deviceSide = true' I get the message "Local port: 19780 APN:"rim.net.gprs"APN username: password 'null' AFN: there is no connection"null"

    Thanks for your help

    Tina

    After watching a little I don't think that the original problem was with the connection I think it is related to a null value returned by the web service.  I generated a set of stubs from the web service, you were using and tried with the same result as you.  I got a version of 4.5 and made some settings (I don't specifically know who he was) and the error has become ' java.rmi.MarshalException: nillable not element of array in response type is not met. ".  Went up to version 4.7 and here it works very well.  If you run this with a test tool web service call, you see a null of WeatherData to the bottom element which is the likely culprit.  I read somewhere that BB do not have NULL values in some earlier versions.

    hope that helps.

    T

  • Java.io.ioException: Tunnel Timed out received

    Hello

    We have developed a Java ME application that has been evaluated for fine fonctinner on Blackberry 9000 using the Wifi Interface. Downloaded the application on our server and the application installed on the device using OTA. The cod was signed through Blackberry. Application installs correctly and when it is launched, he's trying to connect to our server by using the HTTP connection. We use the direct TCP with Vodafone (India) APN setting (I tried www, portalnmms and blackberry.net) but with all 3 APNs, the error is the same:

    java.io.IOException: Tunnel Timed Out

    With the URL '; deviceside = true' is specified for a direct TCP connection. Default browser to HTTP is configured for the Internet browser.

    HTTPDemo installed JDE, device samples and it also gives the same error.

    Tried to contact the service provider for the mistake of tunnel... but no help.

    Can someone help pls on this issue? Are there network tools to diagnose problems of tunnel on blackberry?

    Model: Blackberry 8310

    Version: 4.5.0.55 (Platform 2.7.0.68)

    Thank you

    Bennett

    Try the NetworkDiagnostics tool of the RIM. In addition, look at the log of events to see if the right NPP (those that you set in the Options-> advanced-> TCP) is actually used by the operating system - sometimes WAP 2.0 TCP is used instead.

    Another thing you could try is to take the this BlackBerry SIM card and insert it in a non-BlackBerry phone, say, a Nokia. Then you can check if this unit can connect to the Internet and you might also find what NPC he uses.

  • ADF InputFile java.io.IOException during download

    Hello

    I want to develop a download using JDev 10 with ADF Faces. To this end, I add after my web.xml:
    <context-param>
        <!-- Maximum memory per request (in bytes) -->
        <param-name>oracle.adf.view.faces.UPLOAD_MAX_MEMORY</param-name>
        <!-- Use 5MB -->
        <param-value>5242880</param-value>
    </context-param>
    <context-param>
        <!-- Maximum disk space per request (in bytes) -->
        <param-name>oracle.adf.view.faces.UPLOAD_MAX_DISK_SPACE</param-name>
        <!-- Use 10MB -->
        <param-value>10485760</param-value>
    </context-param>
    <context-param>
        <!-- directory to store temporary files -->
        <param-name>oracle.adf.view.faces.UPLOAD_TEMP_DIR</param-name>
        <!-- Use an ADFUploads subdirectory of /tmp -->
        <param-value>/tmp/ADFUploads/</param-value>
    </context-param>
    In addition, I have a < af:inputFile > element with a valueChangeListener. If I press the button of my upload, I performs an action, which becomes the InputStream of a the UploadedFile of the file input element.

    However, due to the setting that I put in the web.xml file, I can not download files more than 5 MB. Everything works normally, but if I try to download a larger file, I get this exception:
    500 Internal Server Error
    
    java.io.IOException: The system cannot find the path specified
            at java.io.WinNTFileSystem.createFileExclusively(Native Method)
         at java.io.File.checkAndCreate(File.java:1345)
         at java.io.File.createTempFile(File.java:1434)
         at oracle.adfinternal.view.faces.webapp.UploadedFileImpl._createOutputStream(UploadedFileImpl.java:257)
         at oracle.adfinternal.view.faces.webapp.UploadedFileImpl.loadFile(UploadedFileImpl.java:190)
         at oracle.adfinternal.view.faces.webapp.UploadedFileProcessorImpl.processFile(UploadedFileProcessorImpl.java:92)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doUploadFile(AdfFacesFilterImpl.java:244)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:164)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].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:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
         at java.lang.Thread.run(Thread.java:595)
    Is it possible to catch the exception and print a normal error message? I want to check the file size before he was transferred, but I don't know how.

    Concerning

    Majo

    The exception below,

    >

    500 Internal Server Error
    
    java.io.IOException: The system cannot find the path specified
    at java.io.WinNTFileSystem.createFileExclusively(Native Method)
         at java.io.File.checkAndCreate(File.java:1345)
         at java.io.File.createTempFile(File.java:1434)
    

    >

    My guess is that if the file size is more than 5 MB, it tries to store in the specified temporary disk space ' / tmp/ADFUploads /' and this directory does not exist. Can you make sure that this directory exists and try... ?

    To check the size of the file, you can use uploadedFile.getLength () which returns the size of the file in bytes.

    To catch this exception, you might have try catch around the code where you get the inputstream of the file and process the stream and in the catch block, add FacesMessage error and the value facesContext.

    Kind regards
    ~ Ahmed

  • can browse same APN is not defined?

    Hello

    If the AFN is not defined then by HttpCoonection, my application survey exception IOException: AFN is not defined. At the same time I can browse a different site through browser. How is it possible? Do I have to add more parameters for this.

    My url is

    URL + "deviceside = true";

    Thank you

    To understand your question, you have reading to do:

    Start here:

    http://supportforums.BlackBerry.com/T5/Java-development/networking-transports-II/Ta-p/446742

    and then watch this:

    http://supportforums.BlackBerry.com/T5/Java-development/different-ways-to-make-an-HTTP-or-socket-con...

    Once you've experienced all this, can you please consult your quesition and maybe ask a different way.

Maybe you are looking for

  • Last updated ioS 9.3.2 broke my mail ap.  How can I fix?

    I installed the latest ioS 9.3.2 update and now my mail that ap will not work.  It opens and stops immediately.  How can I solve this problem?

  • Speakers are disabled if Satellite Pro is used without connection to the sector.

    Could someone help. Recently I unplugged my computer to use just the battery mode. When I switched it on it took awhile to load my settings but also the speakers have been disabled. I had 3 hours of remaining battery life. When I connected to the Soc

  • HP5643: HP 5643 All in One - how scan you multiple pages

    I can scan my wireless printer unique pages, but for the life of me I can't understand how to scan multiple pages.   I read the other posts on other threads on by clicking on the sign (+) sign to the left of the display after scanning one page, but I

  • HP 6710 b

    Hello I have a laptop HP 6710 b (Windows 7 Professional 64 bit) and I have a few questions about his material. I want to upgrade the RAM and I'm confused about the maximum memory allowed; What is 4G or 8G? I saw on some forums that the max could be 8

  • How to remove firefox don't forget user ID?

    How to remove firefox don't forget user ID? whenever I have connection to gmail to its shows the information.how user can remove that. Actually problem is by mistake that I gave my password in place and place the username... so after every time I log