Connection nullpointerexception on reload of applet

I have the following sqlj code in an applet to retrive data from an oracle database. After this the code goes onto draw the data in the applet using AWT (that code isn't shown here).
My trouble is that when I get to the following line Connection con = Oracle.connect("jdbc:oracle:thin:@ebalpha:1525:ORCL", "flowmanager", "xxxxx").getConnection(); I get a Null Pointer exception, but only after refreshing the applet.
Is there something in need to add to close or null the conntection?
So to overcap I get a NullPointerException only when I refresh the applet. It runs perfectly the first time. The applet need to be refreshed because the data in the table gets updated and the applet needs to be refreshed to show the data changes.
public void getFlowSpaceData() throws SQLException {
// MyIter iter;
String strUserName = getParameter("paramUserName");
String strFlowName = new String();
Connection con = Oracle.connect("jdbc:oracle:thin:@ebalpha:1525:ORCL", "flowmanager", "xxxxx").getConnection();
strQuery = "select FLOWNAME FROM FLOWMANAGER.TMP_FLOWNAMES WHERE USERNAME ='" + strUserName +"'";
PreparedStatement pstmt0 = con.prepareStatement(strQuery);
ResultSet rs0 = pstmt0.executeQuery();
while (rs0.next()) {
strFlowName = rs0.Long postings are being truncated to ~1 kB at this time.

Just wanted to update the post that I came up with a solution. I created a sepreate thread and it now works fine, but the sqlj code does take some time to load. I was wondering if somone could take a quick look at my code and see if their is anyway I could extact the data faster.
String strUserName = getParameter("paramUserName");
strQuery = "select FLOWNAME FROM FLOWMANAGER.TMP_FLOWNAMES WHERE USERNAME ='" + strUserName +"'";
Connection con = Oracle.connect("jdbc:oracle:thin:@ebalpha2.us.oracle.com:1525:ORCL", "flowmanager", "ur2c001").getConnection();
PreparedStatement pstmt0 = con.prepareStatement(strQuery);
ResultSet rs0 = pstmt0.executeQuery();
while (rs0.next()) {
strFlowName = rs0.getString(1);
rs0.close();
pstmt0.close();
strQuery = "select FLOWNAME, USERNAME, PANELROW, PANELCOL, RELATEROW, RELATECOL, OBJTYPE, BASECODE, INDUSTRYID, PANELNUM, BUSINESSPROCESSID FROM flows WHERE flowname ='" + strFlowName + "' ORDER BY PANELNUM";
PreparedStatement pstmt1 = con.prepareStatement(strQuery);
ResultSet rs1 = pstmt1.executeQuery();
int r = 0;
int c = 0;
while (rs1.next()) {
intObjType[r][c]= rs1.getInt(7);
strID[r][c] = rs1.getString(11);
Long postings are being truncated to ~1 kB at this time.

Similar Messages

  • Reloading an Applet

    Anyone know how to reload an applet in IE after changing the class files without having to close the browser window?

    It should reload if you refresh IE - either <F5> or menu View/Refresh or right-click/Refresh

  • Reload an applet

    how do i reload an applet, i have a button "newgame" and an actionlistener coding : stop();
                   destroy();
                   init();
                   start();
                   repaint();     
    doesnt seem to work.....

    well.....those are methods of class applet....the init is the only method i wrote and it adds to the applet some panels and buttons...do i need to overlap stop?..what do i put in stop?...(im new to java)

  • Reload Java applet

    I need to create an applet that is able to reload itself as many times as the user inputs or infinately(untill they turn off thier computer). Is there any way that this is possible?

    If I understand you correctly, you should be able to do that without reloading the applet.
    Just keep some state that says how many times the message has been shown. Before you show the message, check that state. If it's over some value, don't show the message.

  • How to connect my access database using applet?

    hi all,
    i need to connect my access database in my applet program which should work like an atm machine..I dont know how to connect it. Im new to applet same thing in JDBC application. Please help i terribly need it, our deadline in our case study is fast approaching and i still dont know how to do it. I tried the tutorial but i received some sql exception error. thanks!

    Try this link
    http://java.sun.com/docs/books/tutorial/jdbc/basics/

  • LookAndFeel issue reloading an Applet in a Web page

    Hey all,
    I have an Applet that runs on a web page (loaded by servlets and JSP's using Tomcat 3.2.1 and Apache). I created my own LookAndFeel class and have a static function in the applet that sets the LookAndFeel to my new class. Everything works fine when the Applet is first loaded. However, when you exit the applet and then reload it, the custom LookAndFeel is gone and all I get is the default Metal. If I load the applet with appletviewer, I can reload it as much as I want and it always loads my LookAndFeel class.
    The static function is as follows
    /** Static initializer to set the LookAndFeel
    static {
    try {
    UIManager.setLookAndFeel(new MyNewLookAndFeel());
    catch (Exception e) {}
    I do not get any exceptions and like I said, everything works great when loaded with appletviewer.
    I have tried adding the SwingUtilities.updateComponentTreeUI(this); in either the start(), init(), or my own createGUI() function and it still does not work.
    Any ideas? Could this be a problem with the browser caching the applet? I am using IE 5.50.

    I have the same problem
    putting them in static doesn't keep the look and feel
    putting them in the applet constructor does'nt keep it
    putting them in init() doesn't keep it
    putting them in start() doesn't keep it
    heck, even putting them in all 4 of them together doesn't keep the look and feel, it always reverts back to metal

  • Reloading an applet closes Netscape 7.0 browser

    I'm loading an applet that loads an image web cam with JMF api. Everything works o.k. But after using the applet, if i go to another html page, loads it but the Netscape browser closes. I've looked at the Netscape java console and it gives me all these errors. Could anybody help me please, it's very urgent?
    I don't know how to solve this problem. Here's the code of my applet.
    import java.applet.*;
    import java.awt.*;
    import java.net.*;
    import javax.media.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class AppletSound extends JApplet {  
         MediaLocator mySound=null;
         Player soundPlayer=null;
    Component auControlComponent = null;
         String audio=null;
         public void init()
              audio=getParameter("audio");
              getContentPane().setLayout(null);
              setSize(300,50);          
         // Check that we have a valid URL and create URL object to hold it.
              if(audio.equals(""))
                   System.out.println("*Please specify one URL to play*");
              else     
                   mySound=new MediaLocator(audio);     
    try {
              soundPlayer=Manager.createRealizedPlayer(mySound);
              catch(javax.media.CannotRealizeException cre){}
              catch(javax.media.NoPlayerException npe){}
              catch (java.io.IOException e) {
    System.out.println("IOException...exiting.");
    //System.exit(1);
    if (soundPlayer == null) {
    System.out.println("soundPlayer is null...exiting.");
    // System.exit(1);
              auControlComponent=soundPlayer.getControlPanelComponent();          
              if (auControlComponent!=null)
              getContentPane().add(auControlComponent);
              auControlComponent.setBounds(5,5,295,40);
    validate();
         public void start()
              if(soundPlayer!=null)
              soundPlayer.start();
    public void stop()
    soundPlayer.stop();
         soundPlayer.deallocate();
    Here are the errors that I get from the Java Console:
    java.lang.NullPointerException
         at com.sun.media.rtp.RTCPTransmitter.makereports(RTCPTransmitter.java:225)
         at com.sun.media.rtp.RTCPTransmitter.report(RTCPTransmitter.java:129)
         at com.sun.media.rtp.RTCPReporter.run(RTCPReporter.java:215)
         at java.lang.Thread.run(Unknown Source)
    java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
         at java.util.Vector.elementAt(Unknown Source)
         at com.sun.media.rtp.RTPEventHandler.dispatchEvents(RTPEventHandler.java:114)
         at com.sun.media.rtp.RTPEventHandler.run(RTPEventHandler.java:137)
    java.lang.InterruptedException
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Unknown Source)
         at com.sun.media.rtp.SSRCCacheCleaner.run(SSRCCacheCleaner.java:157)
         at java.lang.Thread.run(Unknown Source)
    Timer: timeLoop() wait interrupted java.lang.InterruptedException
    Timer: timeLoop() wait interrupted java.lang.InterruptedException
    MediaNode event thread java.lang.InterruptedException
    MediaNode event thread java.lang.InterruptedException
    MediaNode event thread java.lang.InterruptedException

    It's me again altairforodigital, as you can see in the source code of the applet I load sound not a web image. Sorry for that.

  • Background image/reloading/closing applet

    2 questions:
    1) How do I put a background gif/jpg image on a frame window?
    2) Is there a method or command that can restart or reload the current applet?
    3) What's the best normal way to kill/exit the applet? (System.exit() ?)
    What about browser, how do I close the applet in the browser.
    Appreciate any help.
    Regards,
    Helix
    http://www27.brinkster.com/helixical

    I think if you understand Applet's life cycle clearly you'll find answers to questions 2 and 3:
    init() - initializes the applet for the first time.
    start() - starts the applet after initialization and after every time it was stopped. (answer for your Q2)
    paint() - does the actual painting of the applet.
    stop() - stops the applet (kind of temporary), can be restarted anytime.
    destroy() - kills the applet once for all. (answer for your Q3, call this whenever you want the applet to be destroyed).
    answer to Q1, try the following:
    in init():
    MediaTracker tracker = new MediaTracker (this);
    bgImage = getImage (new URL(getCodeBase(), getParameter("bgImage")));
    tracker.addImage (bgImage, 0);
    tracker.waitForAll();
    public void update( Graphics g) {
    paint(g);
    public void paint(Graphics g) {
    if(bgImage != null) {
    int x = 0, y = 0;
    while(y < size().height) {
    x = 0;
    while(x< size().width) {
    g.drawImage(bgImage, x, y, this);
    x=x+bgImage.getWidth(null);
    y=y+bgImage.getHeight(null);
    else {
    g.clearRect(0, 0, size().width, size().height);
    happy trying...
    iDriZ

  • Reloading an Applet Window

    Hi all,
    I have an applet running inside a browser. Users login and do some work and then logout.
    This is what I want:
    When users logout I want to reload my url so that users will be presented with the applet login screen again.
    Basically, I want to call the same url from my applet when some one exits my applet.
    how would I do this ??
    Your help is very much appreciated in advance.
    Ramesh

    try
    getAppletContext().showDocument(url, "_self");

  • "Software caused connection abort: recv failed" from Applet in IE to JBoss

    Hi
    We have an application hosted as applets on our web-site, but offer the
    same application to customers as a "standalone" off-line version. This
    off-line version is the same code-base, deploy and HTML but run from the
    local file system (in the absence of a web-server).
    I have a J2EE Jasper Reporting framework running in JBoss. On the off-line
    product JBoss runs on the same machine.
    The on-line version works perfectly in both IE and FireFox.
    The off-line version works perfectly in FireFox, but alas, NOT in IE!
    First, here's some code:
    private JasperPrint generateReport() {
              Hashtable enva = new Hashtable();
              System.out.println("enva.put(\"java.naming.factory.initial\", \"org.jnp.interfaces.NamingContextFactory\");");
              enva.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
              System.out.println("enva.put(\"java.naming.factory.url.pkgs\", \"org.jboss.naming:org.jnp.interfaces\");");
              enva.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
              int port = 1099;
              String host = "127.0.0.1";
              System.out.println("enva.put(\"java.naming.provider.url\", \"jnp:// " + host + ":" + port);
              enva.put("java.naming.provider.url", "jnp:// " + host + ":" + port);
              try {
                   System.out.println("Context ictx = new InitialContext(enva);");
                   Context ictx = new InitialContext(enva);
                   System.out.println("Object o = ictx.lookup(\"java:/SessionReport\");");
                   Object o = ictx.lookup("java:/SessionReport");
                   System.out.println("SessionReportControllerHome home = (SessionReportControllerHome) PortableRemoteObject.narrow(o, SessionReportControllerHome.class);");
                   SessionReportControllerHome home = (SessionReportControllerHome) PortableRemoteObject.narrow(o, SessionReportControllerHome.class);
                   System.out.println("SessionReportController remote = home.create();");
                   SessionReportController remote = home.create();
                   PSIberRDSParameterSEIFSAPensionProvidendFund rVO = new PSIberRDSParameterSEIFSAPensionProvidendFund();
                   //call the function on remote
                   try {
                        JasperPrint jasperPrint = new JasperPrint();
                        JasperVO jasperVO = remote.generateMyJasperReport(rVO);
                        jasperPrint = jasperVO.getJasperPrint();
                        return jasperPrint;
                   } catch (Exception re) {
                        System.err.println("remote exception is " + re.getMessage());
              } catch (Exception e) {
                   e.printStackTrace();
              return null;
         }This function returns a net.sf.jasperreports.engine.JasperPrint object wich I
    feed to the JasperViewer.
    Here's the output in my Java console:
    enva.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
    enva.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
    enva.put("java.naming.provider.url", "jnp:// 127.0.0.1:1099
    Context ictx = new InitialContext(enva);
    Object o = ictx.lookup("java:/SessionReport");
    javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
         java.net.SocketException: Software caused connection abort: recv failed]
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:707)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at psiber.v2.pp.psiberworks.server.MessageRouter_PAY.callSEIFSAPensionProvidentFundReport(MessageRouter_PAY.java:15159)
         at psiber.v2.pp.psiberworks.server.MessageRouter_PAY.getPayAppletDataImpl(MessageRouter_PAY.java:14895)
         at psiber.v2.pp.psiberworks.server.MessageRouter_PAY.getAppletDataImpl(MessageRouter_PAY.java:14228)
         at psiber.v2.pp.psiberworks.server.MessageRouter.getAppletData(MessageRouter.java:135)
         at psiber.v2.pp.psiberworks.server.RemoteSessionImpl.getAppletDataImpl(RemoteSessionImpl.java:734)
         at psiber.v2.pp.psiberworks.server.RemoteSessionImpl.access$0(RemoteSessionImpl.java:710)
         at psiber.v2.pp.psiberworks.server.RemoteSessionImpl$1.exec(RemoteSessionImpl.java:668)
         at psiber.v2.pp.psiberworks.server.SynchronizedAccessController.doExecuteQuery(SynchronizedAccessController.java:61)
         at psiber.v2.pp.psiberworks.server.SynchronizedAccessController.executeQuery(SynchronizedAccessController.java:137)
         at psiber.v2.pp.psiberworks.server.RemoteSessionImpl.getAppletData(RemoteSessionImpl.java:690)
         at psiber.v2.pp.psiberworks.client.RemoteSessionProxy.getAppletData(RemoteSessionProxy.java:109)
         at psiber.v2.pp.psiberworks.client.hr.psiberpay.PsiberPayReportWizardApplet.getAppletData(PsiberPayReportWizardApplet.java:7094)
         at psiber.v2.pp.psiberworks.client.hr.psiberpay.PsiberPayReportWizardApplet.callSEIFSAPensionProvidentFundReport(PsiberPayReportWizardApplet.java:14492)
         at psiber.v2.pp.psiberworks.client.hr.psiberpay.PsiberPayReportWizardApplet.processSelectedReport(PsiberPayReportWizardApplet.java:14091)
         at psiber.v2.pp.psiberworks.client.hr.psiberpay.PsiberPayReportWizardApplet.onNextButtonPressed(PsiberPayReportWizardApplet.java:13229)
         at psiber.v2.pp.psiberworks.client.hr.psiberpay.PsiberPayReportWizardApplet.actionPerformed(PsiberPayReportWizardApplet.java:361)
         at java.awt.Button.processActionEvent(Unknown Source)
         at java.awt.Button.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
         java.net.SocketException: Software caused connection abort: recv failed
         at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
         at sun.rmi.server.UnicastRef.invoke(Unknown Source)
         at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
         ... 28 more
    Caused by: java.net.SocketException: Software caused connection abort: recv failed
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(Unknown Source)
         at java.io.BufferedInputStream.fill(Unknown Source)
         at java.io.BufferedInputStream.read(Unknown Source)
         at java.io.DataInputStream.readByte(Unknown Source)
         ... 32 more
    remote exception is null
    You'll see just as the InitialContext.lookup is executed a
    javax.naming.CommunicationException is thrown.
    I have re-tried changing hostnames, ip addresses etc.
    Port 1099 is allowed on Personal Firewall and I even diabled it to be sure.
    Like I said, it works fine in FireFox.
    I'm running Windows XP Version 5.1 (Build 2600.xpsp_sp2_gdr.050501-1519 : Service Pack 2)
    and IE Version 6.0.2900.2180.xpsp_sp2_gdr.050501-1519
    and SUN JAVA Version 1.4.2_06 (build 1.4.2_06-b03)
    I have tested this on 1.5.0 (build 15.0_02-b09) with the same result.
    Please help! F1! F1! F1!
    Thanks in advance :D

    Hello again
    I have discovered more info. I'm not realy enthusiastic about these latests
    findings and I realy hope someone can help me figure a work around.
    Intermittently I get this stack trace in the java console:
    enva.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
    enva.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
    enva.put("java.naming.provider.url", "jnp://localhost:1099
    Context ictx = new InitialContext(enva);
    Object o = ictx.lookup("java:/SessionReport");
    javax.naming.CommunicationException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
         java.net.MalformedURLException: no protocol: Files/psiberworks/lib/pcl.jar]
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:707)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at psiber.v2.pp.psiberworks.server.MessageRouter_PAY.callSEIFSAPensionProvidentFundReport(MessageRouter_PAY.java:15160)
         at psiber.v2.pp.psiberworks.server.MessageRouter_PAY.getPayAppletDataImpl(MessageRouter_PAY.java:14895)
         at psiber.v2.pp.psiberworks.server.MessageRouter_PAY.getAppletDataImpl(MessageRouter_PAY.java:14228)
         at psiber.v2.pp.psiberworks.server.MessageRouter.getAppletData(MessageRouter.java:135)
         at psiber.v2.pp.psiberworks.server.RemoteSessionImpl.getAppletDataImpl(RemoteSessionImpl.java:734)
         at psiber.v2.pp.psiberworks.server.RemoteSessionImpl.access$0(RemoteSessionImpl.java:710)
         at psiber.v2.pp.psiberworks.server.RemoteSessionImpl$1.exec(RemoteSessionImpl.java:668)
         at psiber.v2.pp.psiberworks.server.SynchronizedAccessController.doExecuteQuery(SynchronizedAccessController.java:61)
         at psiber.v2.pp.psiberworks.server.SynchronizedAccessController.executeQuery(SynchronizedAccessController.java:137)
         at psiber.v2.pp.psiberworks.server.RemoteSessionImpl.getAppletData(RemoteSessionImpl.java:690)
         at psiber.v2.pp.psiberworks.client.RemoteSessionProxy.getAppletData(RemoteSessionProxy.java:109)
         at psiber.v2.pp.psiberworks.client.hr.psiberpay.PsiberPayReportWizardApplet.getAppletData(PsiberPayReportWizardApplet.java:7094)
         at psiber.v2.pp.psiberworks.client.hr.psiberpay.PsiberPayReportWizardApplet.callSEIFSAPensionProvidentFundReport(PsiberPayReportWizardApplet.java:14492)
         at psiber.v2.pp.psiberworks.client.hr.psiberpay.PsiberPayReportWizardApplet.processSelectedReport(PsiberPayReportWizardApplet.java:14091)
         at psiber.v2.pp.psiberworks.client.hr.psiberpay.PsiberPayReportWizardApplet.onNextButtonPressed(PsiberPayReportWizardApplet.java:13229)
         at psiber.v2.pp.psiberworks.client.hr.psiberpay.PsiberPayReportWizardApplet.actionPerformed(PsiberPayReportWizardApplet.java:361)
         at java.awt.Button.processActionEvent(Unknown Source)
         at java.awt.Button.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
         java.net.MalformedURLException: no protocol: Files/psiberworks/lib/pcl.jar
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
         at sun.rmi.transport.Transport$1.run(Transport.java:148)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:534)
         at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
         at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
         at sun.rmi.server.UnicastRef.invoke(Unknown Source)
         at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
         ... 28 more
    Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
         java.net.MalformedURLException: no protocol: Files/psiberworks/lib/pcl.jar
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:249)
         at sun.rmi.transport.Transport$1.run(Transport.java:148)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.net.MalformedURLException: no protocol: Files/psiberworks/lib/pcl.jar
         at java.net.URL.<init>(URL.java:537)
         at java.net.URL.<init>(URL.java:434)
         at java.net.URL.<init>(URL.java:383)
         at sun.rmi.server.LoaderHandler.pathToURLs(LoaderHandler.java:747)
         at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:147)
         at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631)
         at org.jboss.system.JBossRMIClassLoader.loadClass(JBossRMIClassLoader.java:79)
         at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257)
         at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:200)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
         at javax.naming.CompoundName.readObject(CompoundName.java:554)
         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:324)
         at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
         at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:297)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:246)
         ... 6 more
    remote exception is null
    So why would I get a java.net.MalformedURLException?!?! And why is the
    classloader having problems loading on of the referenced jars?!
    It's that space in "Program Files"......
    So I copied the folder to D:\Temp and.... volla!! the off-line deploy of the
    application now works fine in Internet Explorer. It's that space!
    So this is my theory, when the initialcontext.lookup is called the classnames specified are reflected, instanciated etc. So when the applet gets the
    document base from the browser IE gives it "C:\Program Files\" and not an
    encoded "file://C:\Program%20Files\" and the spaces causes the classloader
    (or something) to not parse the path correctly and causes a bad URL.
    If I type the encoded URL in IE's address bar it finds the HTML, displayes it and changes the address bar contents back to "C:\Program Files".
    FireFox doen't do this, and therefore works.
    Does anyone know if their is a patch for IE, or if there is another way to
    connect to JBoss?
    How frustrating!! IE Stuffs up the encoded URLS!!!

  • Cannot create/maintain JCO connection : NullPointerException in SLD

    When I want to create a new JCO connection in SLD (via WebDynpro->Content Administrator) , I get an exception :
    java.lang.NullPointerException
         at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.checkStatus(SystemLandscapeFactory.java:991)
         at com.sap.tc.webdynpro.services.sal.sl.api.WDSystemLandscape.checkStatus(WDSystemLandscape.java:469)
         at com.sap.tc.webdynpro.tools.sld.NameDefinition.updateJCODestinations(NameDefinition.java:285)
         at com.sap.tc.webdynpro.tools.sld.NameDefinition.updateNavigation(NameDefinition.java:250)
         at com.sap.tc.webdynpro.tools.sld.NameDefinition.wdDoInit(NameDefinition.java:157)
    Because the following document "[Adaptive RFC Troubleshooting Guide|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0019b1a-775f-2910-beb8-d81f27d0d8d0]" suggests that the problem could be an incomplete JCO connection definition, I removed all other existing connections (it's a sandbox system), but this action has not solved the problem.
    I also get the message "Exception while getting JCo Clients Failed to get list of defined JCO clients for deployable object 'sap.com/spider_search' " when the Content Administrator screen is displayed.
    Any idea of what is missing ?
    Thanks,
    Eric.

    Hi Eric,
    Check this forum link using this similar problem got resolved.
    can not create jco destination  500   Internal Server Error  after sp 13
    Thanks
    Anup

  • How to write an ObjectOutputStream to URL connection and rx via an applet

    Hi, i am final year Bsc student from portsmouth England struggling to write an object to a servlet response stream.
    applet code:
    URLConnection connection;
    ObjectInputStream in = null;
    DataCarrier today = null;
    try{
    //connect to url
         URL url = new URL("http://localhost:8080/myapp/getObjectives");
         connection = url.openConnection();
         connection.setDoInput(true);
    // create in object to read from connection response
    /* using print statements i can confirm that this line is not completing */
    ObjectInputStream ois = new ObjectInputStream(connection.getInputStream());
    //print line here does not print
    //type cast incoming object
    today = (DataCarrier)ois.readObject();
         ois.close();     
    catch (Exception e) { }
    Servlet Code:
    //declare DataCarrier class variables
    DataCarrier test;
    test = new DataCarrier();
    test.x = 100;
    test.s = "hello";
    //create output stream from response output stream
    ObjectOutputStream oos = new ObjectOutputStream(new BufferedOutputStream(resp.getOutputStream()));
    //write object
    oos.writeObject(test);
         oos.flush();
         oos.close();
    the code compiles and runs ok, with the only error being a nullpointer exception when trying to type cast response object in applet.
    This is because the ObjectInputStream isnt being created.
    I have spent the last week seeking help from lecturers trying to solve this problem with no success what so ever.
    So if any one can offer any advise or comments they will be welcomed with open arms.
    Many thanks in advance.
    dthom

    Do you still need help with this?

  • Connecting to MySQL from an Applet

    Hi !
    I have some serious Problem connecting from within my Applet to a MySQL-DB. Everything is fine until i try to establish a Connection ( I use mm.mysql-driver ). The Driver seems to be correctly loaded, but when it comes to connection I get the following Error : Connection failed, Are you sure, that there is a MySQL-Database running at the specified target bla bla bla .....
    I guess, that it is some Problem with the Applet not beeing certified, but as it is only intended for INTRAnet use, I don't really care about security. Has anybody a quick workaroud for my Problem ?
    Thanx in advance
    Regards
    Markward Schubert

    i would try to connect to that database with application, if that fails as well then there is no applet certification problem
    usually this kind of error is printed when you try to connect to some database that is not there
    and with an applet you need to put applets binaries and database in the same server, because applet can connect only to the host where from it was loaded
    i hope that some of it helped
    L.

  • Oracle Web Publisher: NullPointerException when starting Java Applet

    Hi there,
    I'm using Express Server 6.3.4 and Web Publisher 6.3.2 and have created a very simple web briefing -- just a basic web page to see whether it works.
    Now when browsing the sample page, an applet is loaded and tells me that several Oracle java classes are loaded. But in the end it fails:
    java.lang.NullPointerException at oracle.olap.webAgent.express.Express.execute(Unknown Source) at ....
    Does anybody know any solution?
    Stefan

    Yes, I tried a sample "application" -- the same error. I'm using IE5.5. To locate the "bug", I did the following:
    I saved the generated HTML code (including the applet tag and all parameters) and loaded that "static" page using SUN's appletviewer. After a short error message (something like "Error in xwd_init: you provided extra input '\'") the applet was loaded and displayed properly. So I know that there's neither a classpath problem nor classes are missing.
    Thank you for your help.
    Stefan

  • JDBC connection to derby from an applet

    I'm doing the JDBC tutorial at java.sun.com
    Everything runs fine from the Netbeans IDE. I'm not sure whether the applet is supposed to work inside the IDE or not, I figure that's meant for the web.
    Within Netbeans, the following URL works:
    String url = "jdbc:derby:C:\\Documents and Settings\\HP_Administrator\\.netbeans-derby\\helpme";
    When I load a webpage with the applet, I get:
    java.SQLException: No suitable driver found for jdbc:derby:C:\Documents and Settings\HP_Administrator\.netbeans-derby\helpme.
    Now, I know it found the driver Class, otherwise I would have gotten Class Not Found -- so I assume its just not making the connect to the database from the applet.
    I have tried many formats for the url --
    String url = "jdbc:derby://localhost:1527/C:\\Documents and Settings\\HP_Administrator\\.netbeans-derby\\helpme";
    String url = "jdbc:derby://localhost:1527/helpme";
    String url = "jdbc:derby:helpme";
    Nothing I've tried has worked. Can someone point me in the right direction please?
    Everything is running on the same machine.

    "No suitable driver" is an error message which can indicate an improper URL. And in your case, you will want to avoid including any reference to the C: drive in your url. The format for the url can also depend upon the database you are using. So for example an mysql url would begin with
    jdbc:mysql://localhost:3306
    String url = "jdbc:derby://localhost:1527/helpme";This suggestions that you may be using a database server called derby which utilizes port 1527 and that your particular database is called helpme.
    In any case you will want to look at documentation for your particular database software ( MSAccess, MySQL, Oracle etc ) to determine how to construct the url.

Maybe you are looking for