Problem with servlet connection

Hi guys,
Im gettin an nullpointer exception when connect to a servlet. Some "abstract" code:
public void connect()
servletConnection = servletURL.openConnection();
servletConnection.setDoOutput(true);
servletConnection.setUseCaches(false);
servletConnection.setDefaultUseCaches (false);
servletConnection.setDoInput(true);
servletConnection.connect();     
servletInput = new ObjectInputStream(servletConnection.getInputStream());
public codeThatWorks()
while(true)
connect()
usereceivedvalues();
public codeThatDontWorks()
connect()
while(true)
usereceivedvalues();
I dont know why I have to reconnect to the servlet or renew the ObjectInputStream everytime I need to get values from it. Im using a ObjectInputStream to get the values from the servlet.
Some ideas ? Thankss.

I think your problem is in servlet. You can try the servlet without midlet in a IExplorer browser.
ps1=con.prepareStatement("SELECT * FROM userLogin where uID=?");
ps1.setString(1,uID);
ResultSet re=ps1.executeQuery(); It is posible that re will be null.

Similar Messages

  • Problem with JCo Connection Pool

    Hi,
    I have a problem with using an RFC Model in my WebApplication. So sometimes the access to the function block works, and sometimes it doesn't work. Now I know, that there is a problem with the connection pool. Look at this message:
    com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Connection pool WD_X24_MODELDATA_DEST_CPIC_REKTO_DE_useDefinedUser is exhausted. The current pool size limit (max connections) is 10 connections.
    So it looks like a problem with closing the JCo Connections after using. Do know where the problem is? Because I'm using many other function blocks with no problems.

    Hello,
    You need to increase the pool size via Visual Administrator.
    Server 0 -> Services -> JCO RFC Connections.
    Change the pool size from there. I believe a restart is in order.
    Regards,
    Jan

  • Problems with ipod connection.

    Problems with ipod connection.
    I have problems to connect my ipod to computer windows 7.
    When I connect I get the following error:
    "We encountered an ipod, but could not be identified correctly. Disconnect and reconnect the ipod and try again."
    And it recognizes the ipod when trying to go play music or videos make me the following error:
    "Error while trying to copy on disk. The device is not connected."
    I've uninstalled all apple applications and re-installing, as I formatted the ipod and continues to set the same error.
    What else can I do?

    Hello,
    While your symptoms don't exactly match the descriotion, this article may be usefull in discovering if there is a setting on your computer that is causing this to happen.
    iPod not recognized in 'My Computer' and in iTunes for Windows
    http://support.apple.com/kb/ts1369
    -Griff W.

  • Every time I try and update my iphone 4 to ios 7.1 in iTunes 11.1.5 it says "connection reset" even when there is no problem with my connection

    I have an iPhone 4. I use iTunes 11.1.5 on my Mac. I am trying to update to ios 7.1 through iTunes, but every time I do that, I get a "connection reset" error, even when I know there has been no problem with my connection.
    The exact error message is as follows:
    "There was a problem downloading the software for the iPhone "Anne's iPhone". The network connection was reset.
    Make sure your network settings are correct and your network connection is active, or try again later."
    I have checked several times. There is no problem with the connection, and I have tried to download the software several times today.
    Any help you can give me would be appreciated.

    Just managed to successfully download the update, having retried five or six times. I did unplug my phone while the download was taking place (had asked iTunes to download only, not to update) -- suspect this had no bearing on it whatsoever, and that persistence is the only way here.

  • Exchange Server 2010 SP3 - Rollup 8 - Issue - Problems with client connections - MS Outlook 2013

    Exchange Server 2010 SP3 - Rollup 8 - Issue - Problems with client connections - MS Outlook 2013
    Detected Problems:
    - Access denied for attached mailbox (department mailbox)
    - Access denied for delete or move messages on own mailbox
    - Can't send new messages with error (Error: [0x80004005-00000000-00000000])
    Solution:
    - Rollback to Exchange 2010 SP3 - Rollup 7
    - You can rollback to Exchange 2010 SP3 - RollUp 7 in 30 min
    Algunos de los destinatarios no recibieron su mensaje.
    Asunto:     Hola
    Enviado el: 11/12/2014 8:35
    No se puede localizar a los destinatarios siguientes:
    '[email protected]' en 11/12/2014 8:35
    Este mensaje no se pudo enviar. Inténtelo de nuevo más tarde, o póngase en contacto con el administrador de red. 
    Error: [0x80004005-00000000-00000000].

    See the following forum thread: 
    https://social.technet.microsoft.com/Forums/en-US/1be9b816-b0ab-40ea-a43a-446239f8eae3/outlook-client-issues-following-exchange-2010-rollup-8

  • My station is listed on Itunes Radio stations, but there's a problem with the connection. Does any body help us regarding this issue? The station name is KRAL FM under the Top 40 / Pop category

    My station is listed on Itunes Radio stations, but there's a problem with the connection. Does any body help us regarding this issue? The station name is KRAL FM under the Top 40 / Pop category

    My station is listed on Itunes Radio stations, but there's a problem with the connection. Does any body help us regarding this issue? The station name is KRAL FM under the Top 40 / Pop category

  • I can't make a purchase with iTunes because it says there's a problem with the connection. How do I fix this?

    I can't make a purchase with iTunes because it says there's a problem with the connection. How do I fix this?

    Morning Gjakleinmark,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at this article:
    Can't connect to the iTunes Store
    http://support.apple.com/kb/ts1368
    Best of luck,
    Mario

  • Problems with Document Connect

    I have a problem with Document Connect. I am unable access office live workspace.
    I have been on the help line with microsoft but they were unable to help.
    Then I went to an apple store and was informed by one of the sales assistance that Document Connect never worked with the apple. Well what was the point in having it then?

    I wish I knew what Document Connect is. I'd bet I could fix it. Not really, but what is it?

  • I have an Ipad mini with IOS7. A few days ago I began to have problems with wifi connectivity. I can connect to wifi with Google but cannot navigate in Safari nor any of my aps are able to acess wifi. Very strange. Not sure what to do!

    I have an Ipad mini with IOS7. A few days ago I began to have problems with wifi connectivity. I can connect to wifi with Google but cannot navigate in Safari nor any of my aps are able to acess wifi. Very strange. Not sure what to do!

    Hi ..
    Reset the device:
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    If that doesn't help, tap Settings > General > Reset > Reset All Settings
    If that doesn't help, tap Settings > General > Reset > Reset Network Settings
    You may have to re enter your Wi-Fi password.
    If nothing above has helped, try here >  iOS: Troubleshooting Wi-Fi networks and connections

  • There is a problem with this connection's security certificate The remote computer cannot be authenticated due to problems with its security certificate. Security certificate problems might indicate an attempt to fool you or intercept any data you send

    Hi,
    I have this Windows 2008 R2 on which I installed remoteapp some years ago.
    Now the certificate expired and I get the message
    "There is a problem with this connection's security certificate
    The remote computer cannot be authenticated due to problems with its security certificate.
    Security certificate problems might indicate an attempt to fool you or intercept any data you send to the remote computer."
    How should I renew the certificate? I already went to certification store and tried to renew certificate with same key but then it says "the request contains nor certificate template information".
    Please advise.
    J.
    J.
    Jan Hoedt

    Does the computer account have Enroll permission to the certificate template?
    From the Server running your CA, run mmc, click File then Add/Remove Snap-in...
    Add Certificate Templates and click OK.
    Find the certificate template, then right click and select properties.  On my CA its call ed RemoteDesktopComputers but might be called something different depending on what what template your certificate is based on.
    On the security tab, click Oblect types, check Computers then OK. Enter the Computername and click OK.  Then give your computer account Enroll permisssion.
    HTH,
    JB

  • I'm trying to update my ipod touch but every time it downloads its fine until it processes it and it says it has a problem with my connection but my firewall is off?? Please help.

    but every time i try to its fine until it processes it and then it says it has a problem with my connection but my firewall is off?? Please help.

    I'm having the same problem trying to update my iphone 4(Just got a replacement), I also have firewall off...Hopefully someone can help. Mine says error -3259

  • Problem with database connectivity

    Hi guys,
    I'm having a problem with database connectivity . I'm using the mySQL database & org.gjt.mm.mysql driver.
    I've kept the org folder under the directory where the Database.java program is residing .
    My program is as follows:
    import java.sql.*;
    public class Database
         Connection con;
         public void connect()
              System.out.println("In connect.");
         public Connection connectDB(String username,String password,String database)
              try
                   Class.forName("org.gjt.mm.mysql.jdbc.Driver");
                   String url="jdbc:mysql:"+database;
                   con=DriverManager.getConnection(url,username,password);
              catch(SQLException e)
                   System.out.println("SQL Exception caught:"+e);     
              catch(Exception e)
                   System.out.println("Exception e caught:"+e);     
              return con;
         public static void main(String args[])
              try
              Connection c;
              Database db=new Database();
              c=db.connectDB("root","","//192.168.0.2/squid");
              System.out.println("Connection created.");
              c.close();
              catch(Exception e)
                   System.out.println("Exception caught:"+e);     
    It gets compiled but gives the following error when run.
    Exception e caught:java.lang.ClassNotFoundException: org.gjt.mm.mysql.jdbc.Driver
    Connection created.
    Exception caught:java.lang.NullPointerException
    I don't know why the class is not found.Pl . help me rectify my mistake.Is there any other path to be set?
    Thanks.

    You need to run it with the JDBC driver in the classpath
    java -classpath .;[mySqlJdbcDriver.jar] Database

  • I have problem with Access Connections on L412 after that utilyty upgrade

    I have problem with Access Connections on L412 after that utilyty upgrade in early August. Windows 7 Ultimate/x64.
    It stops connecting to WPA2 Enterprise (AES-CCMP), Microsoft PEAP, no server cert, with any credentials I try to use. The same account(s) works with native Intel manager on other notebooks and on mobile devices. I lost the wireless connectivity to enterprise WiFi network.
    And, after deinstallation of Access Connections, the inability to connect keeped intact with native Win7 WiFi management.
    I think, something was broken in Access Connections 5.83 Build 83C753WW and some registry settings/ dll modules were altered but not returned to normal after deinstall.

    Access Connections is definitely broken for WPA encryption.  Both versions 5.02 and 5.84 fail for me.  If I use the Windows XP wireless configuration instead of Access Connections, everything works.
    Does anyone know how to report this to Lenovo?  I chased links around the web site but couldn't find a place.

  • Problem with Internet connection sharing between eMac and Powerbook G3

    Hi,
    I seem to be having a slight problem with internet connection sharing.
    My eMac is the main machine with the internet connection, and its running 10.4.6, the Powerbook G3 is running 10.2.8.
    I can connect them all up and get online with both, but I the problem I am having is when I turn the Firewall on on the eMac, the powerbook can't connect.
    Is there anyway I can keep the Firewall enabled and still use internet connection sharing?

    How do I know which ports the Powerbook is using?
    Also I had web sharing enabled on the eMac and it made no difference at all.
    Plus I don't know if this means anything to you, trying to decipher it myself, all I can make out myself on there is port 80.
    May 31 21:26:30 Craigs-Macintosh ipfw: 12190 Deny TCP 10.0.2.2:49743 67.15.24.40:80 in via en1
    May 31 21:26:34 Craigs-Macintosh ipfw: Stealth Mode connection attempt to UDP 10.0.2.1:192 from 10.0.2.2:49531
    May 31 21:26:34 Craigs-Macintosh ipfw: Stealth Mode connection attempt to UDP 10.0.2.1:192 from 10.0.2.2:49532
    May 31 21:26:39 Craigs-Macintosh ipfw: Stealth Mode connection attempt to UDP 10.0.2.1:192 from 10.0.2.2:49533
    May 31 21:26:39 Craigs-Macintosh ipfw: Stealth Mode connection attempt to UDP 10.0.2.1:192 from 10.0.2.2:49534
    May 31 21:26:42 Craigs-Macintosh ipfw: 12190 Deny TCP 10.0.2.2:49743 67.15.24.40:80 in via en1
    May 31 21:26:44 Craigs-Macintosh ipfw: Stealth Mode connection attempt to UDP 10.0.2.1:192 from 10.0.2.2:49535
    May 31 21:26:44 Craigs-Macintosh ipfw: Stealth Mode connection attempt to UDP 10.0.2.1:192 from 10.0.2.2:49536
    May 31 21:29:12 Craigs-Macintosh ipfw: 12190 Deny TCP 10.0.2.2:49746 17.254.0.91:80 in via en1
    May 31 21:29:15 Craigs-Macintosh ipfw: 12190 Deny TCP 10.0.2.2:49746 17.254.0.91:80 in via en1

  • SAP Screen Personas error "A problem with network connectivity has been detected"

    Hi,
    We just installed Personas release 100 SP02 and performed the
    configuration steps necessary. But when we acces the url and logon to
    personas we get the following erre
    A problem with network connectivity has been detected.
    Please check you connection and refresh your browser.
    Any help to solve this issue would be appreciated.
    Best Regards.

    Please use this checklist to see if everything is correct:
    1. restgui service handler class has CL_HTTP_EXT_ITS_BASIC
    2. SPRO -> Sap screen Personas -> Maintain system has
           - 3 letter system id
           - "Server.Url" without typo and value in http(s)://<SERVER>:<PORT>/ format 
           - "Service.Uri" without typo and value as /restgui
    3, Note 2026487 is installed
    4. If target system is different from source system then you are able to access the following
             - http(s)://<TARGETSERVER>:<PORT>/clientaccesspolicy.xml
             - http(s)://<TARGETSERVER>:<PORT>/crossdomain.xml
    5. role is assigned to user under /n/persos/admin_ui -> User Maintenance -> Search -> Show user -> Role
    If you still get error, then if you are using SSO, please check if you have configured login/create_sso2_ticket parameter correctly.
    Thanks
    Chinthan

Maybe you are looking for

  • In Pages 5.2, some fonts "not available", yet present in Font Book and working in other apps

    Using Pages 5.2, I open a document created in a previous version, and I get error messages about certain fonts within a font family being "not available" in OS X.  However, these supposedly unavailable fonts are present in Font Book and work just fin

  • Shared devices not showing up in finder

    Shared devices on my network are not showing up in Finder on my MacBook Air. Problem just began in the last 24 hours, and is limited to just this computer. Have done usual things -- checking, unchecking shared devices in Finder; relaunching Finder; r

  • Cannot Complete My Album

    Hey. So I want to complete my album for the new Coldplay album, however, when i click purchase album, then complete my album option, nothing happens. I've tried this a hundred times, restarted itunes and everything. I can purchase indavidual tracks,

  • Is there any way to pass value  to a trigger

    while deleting a record by procedure .. with help of trigger i m inserting that deleted record in another table , but i need user_id wihch is passed to procedure

  • Using dynamic sql in triggers with :OLD values

    i need to record all deleted rows from an entire schema in a single table. for that matter i created a function that receives a table name and generate an insert command according to it's primary key columns. i call this function in the table trigger