Error occured when trying to pass object from Jsp to Applet

I am trying to pass a serialized object(ie, object class implements java.io.Serializable...so that is not a problem) from a Jsp to an Applet.
My jsp(Jsp_RMI.jsp) page is:-
<%@ page import="java.io.*" %>
<%@ page import="com.itlinfosys.syslab.mfasys.scm.*" %>
<%@ page import="java.util.*" %>
<applet code="com/itlinfosys/syslab/mfasys/scm/Applet_RMI" width=200 height=100>
</applet>
<%! ObjectOutputStream outputToApplet=null;
PrintWriter out=null;
BufferedReader inTest=null;
%> <% Student student=new Student();
Vector students=new Vector();
students.addElement(student);
outputToApplet=new ObjectOutputStream(response.getOutputStream());
outputToApplet.writeObject(students);
out.println(student);
outputToApplet.flush();
outputToApplet.close();
%> <html> <head> <title>My Page</title> </head> <body> </body> </html>
My Applet Applet_RMI.java is:-
package com.itlinfosys.syslab.mfasys.scm;
import java.applet.*;
import java.net.*;
import java.io.*;
import com.itlinfosys.syslab.mfasys.scm.Student;
import java.util.*;
public class Applet_RMI extends Applet{
Vector aStudent=null;
ObjectInputStream inputFromServlet=null;
String location="<URL>";
public void init(){
getConnection(location);
public void getConnection(String location) {
try{
URL testJsp=new URL(location);
URLConnection jspConnection=testJsp.openConnection();
jspConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
jspConnection.setDoInput(true);
jspConnection.setDoOutput(true);
jspConnection.setUseCaches(false);
jspConnection.setDefaultUseCaches(false);
inputFromServlet=new ObjectInputStream(jspConnection.getInputStream());
aStudent=(Vector)inputFromServlet.readObject();
}catch(MalformedURLException e){ System.out.println(e);
catch(IOException e){
System.out.println(e);
catch(ClassNotFoundException e){ System.out.println(e);
I am using netscape-4.73 on weblogic server. On server when I try to view Jsp page it gives netscape.security.AppletSecurity Exception.
When I am trying to call this Jsp from IE-5 on my client machine, I am getting error:-"java.io.StreamCorruptedException: InputStream does not contain a serialized" Pl help me out.

You should probably change your implementation to use a servlet rather than JSP. There may be extra stuff being put in by the JSP. Besides, servlets run faster. Here is some code that may help.
From the Servlet:
  public void doPost(
      HttpServletRequest               httpServletRequest,
      HttpServletResponse              httpServletResponse )
      throws ServletException, IOException {
    ObjectInputStream in = new ObjectInputStream(new GZIPInputStream(httpServletRequest.getInputStream()));
    requestObject = in.readObject() ;
    ObjectOutputStream out = new ObjectOutputStream(new GZIPOutputStream(httpServletResponse.getOutputStream()));
    out.writeObject(responseObject);
    out.close();
  } //end doPost()And from the Applet:
  public Object doServletCall(
      Object                           sendObject ) {
    try {
      HttpURLConnection con = (HttpURLConnection)servlet.openConnection() ;
      con.setRequestMethod("POST");
      con.setDoInput(true);
      con.setDoOutput(true);
      con.setUseCaches(false);
      con.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
      ObjectOutputStream out = new ObjectOutputStream(new GZIPOutputStream(con.getOutputStream()));
      out.writeObject(sendObject);
      out.flush();
      out.close();
      ObjectInputStream in = new ObjectInputStream(new GZIPInputStream(con.getInputStream()));
      Object returnObject = in.readObject() ;
      in.close();
      return returnObject ;
    } catch (IOException e) {
      e.printStackTrace();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } //end try
    return null ;
  } //end doServletCall()Of course you can remove the ZIP and send object if you don't need them

Similar Messages

  • Error occuring when trying to download movie from apple tv

    When ever I rent a movie from apple tv an error occurs when I go to downlaod it. The error just says that the movie cant download right now, try again later. Even after numerous attempts the movie still wont download. This had been happening for months and I've just been watching movies from netflix. I'm being charged for movies I can't even watch! How can I fix this problem?

    First, what is your internet speed? www.speedtest.net
    iTunes HD content requires 6mbps (SD would be 3mbps)
    Netflix uses variable bit-rate so it simply degrades on slower connections
    iTunes content waits to play until enough has buffered for playback without interupption

  • Unknown error occurred when trying to buy music from iTunes

    Whenever I try to buy a song or album from iTunes it says an unknown error has occurred (-405054) and can't be completed.

    I had this problem just recently.
    I discovered that the problem was located here: ROOT / Users / Shared  -- if you open that and the "adi" folder has a little red minus symbol in its corner, your permissions have somehow been lost. (If you can't see your root directory, open Finder Preferences and, under sidebar, check "Hard disks." That will make your root drive visible.)
    If the "adi" folder has the red minus symbol, right-click the folder and select GET INFO.
    Sharing & Permissions is probably set to "System: Read & Write | wheel: Read Only | everyone: No Access"
    If so, your user account has no permissions, and that means iTunes can't use the folder properly.
    To fix this, first unlock the folder using the padlock icon in the bottom-right corner of "get info." You will have to supply your admin password to do this.
    Then click the little + sign in the bottom left corner to add a user, and select your user ID from the list of choices. Give yourself Read & Write permissions. (Alternatively, you could change the permissions of "everyone" to Read & Write; others have done that, but I was leery of doing it).
    Re-lock the folder when you're done.
    Hopefully that will solve it.

  • I am getting this message when trying to upload an album to Apple from iPhoto - An error occurred when trying to contact the Apple on-line Store. Please try again later!!!

    I am getting this message when trying to upload an album to Apple from iPhoto - An error occurred when trying to contact the Apple on-line Store. Please try again later!!!

    Do you mean trying to purchase an iPhoto book?  Try rebooting and ordering again.  If that fails Boot into Safe Mode, Mac OS X: Starting up in Safe Mode, and try ordering from there.
    OT

  • ORA-04052: error occurred when looking up remote object SYS.DBMS_UTILITY@..

    Hello,
    I'm trying to import data van 10XE version to new 11XE version over db_link.
    When using the method I run into following error:
    ORA-04052: error occurred when looking up remote object SYS.DBMS_UTILITY@<<db_link_name>>
    This seems to be a bug in 10.2.0.1 fixed in later 10.2 versions, according to the database general forum. "upgrade to newer version"
    But how do i fix this bug in 10XE? Or is the only way around to use the 'old-fashioned' way of exporting data from 10XE to a file, transfer the file and import it in 11XE?
    Best regards,
    Jan.

    No, you cannot apply a patch to XE. Basically the XE internal code is the same as for any other edition. That means is there a bug, you have it in XE,too. To get patches you need a licence for metalink/My Oracle Support. But even you would have one, it wouldn't help you, because Oracle does not provide patches for XE.
    That's the 'price' you have to pay for this free edition.
    Werner

  • ORA-04052: error occurred when looking up remote object SYS.DBMS_SNAPSHOT

    Hello everyone,
    When I tried to create a materialized view with refresh fast mode, I encountered following error message.
    The MV log has been created on my_table like this:
    create materialized view log on my_table
    tablespace data3
    with rowid, sequence
    including new values;
    The database link has been created like this:
    CREATE PUBLIC DATABASE LINK my_db
    CONNECT TO myname
    IDENTIFIED BY mypassword
    USING 'my_db';
    Could anybody please let me know why I can not create MV with refresh fast? What I did wrong?
    Thanks in advance!!!
    MYDB>select count(*) from my_table@my_db;
    COUNT(*)
    5
    Elapsed: 00:00:00.01
    MYDB>create materialized view my_mv
    2 tablespace data4
    3 build immediate
    4 refresh fast with rowid
    5 as
    6 select * from my_table@my_db
    select * from my_table@my_db
    ERROR at line 6:
    ORA-04052: error occurred when looking up remote object SYS.DBMS_SNAPSHOT@my_db
    ORA-00604: error occurred at recursive SQL level 2
    ORA-06544: PL/SQL: internal error, arguments: [55916], [], [], [], [], [], [], []
    ORA-06553: PLS-801: internal error [55916]
    ORA-02063: preceding 2 lines from my_db
    Elapsed: 00:00:00.29
    MYDB>create materialized view my_mv
    2 tablespace data4
    3 build immediate
    4 as
    5 select * from my_table@my_db;
    Materialized view created.
    Elapsed: 00:00:00.20

    No, you cannot apply a patch to XE. Basically the XE internal code is the same as for any other edition. That means is there a bug, you have it in XE,too. To get patches you need a licence for metalink/My Oracle Support. But even you would have one, it wouldn't help you, because Oracle does not provide patches for XE.
    That's the 'price' you have to pay for this free edition.
    Werner

  • PL/SQL: ORA-04052: error occurred when looking up remote object.

    Hi All,
    I'm getting the following error message while executing a PL/SQL Block.
    PL/SQL: ORA-04052: error occurred when looking up remote object UPLDUSER.filestatushistory@FTS
    ORA-00604: error occurred at recursive SQL level 1
    ORA-03106: fatal two-task communication protocol error
    ORA-02063: preceding line from FTSStatement
    declare
    v_coun number;
    begin
    select count(*) into v_coun
    from updluser.filestatushistory@fts;
    end;Back ground of the situation as follows,
    My DataBase version 10.2.0.3 DB Name :DB1
    Table Owner : UPLDUSER
    Table Name : FILESTATUSHISTORY
    I have a report user on the same database and I have grant all on the above table to report user
    Report User : RPT_FTS
    SQL> GRANT ALL ON FILESTATUSHISTORY_V TO RPT_FTS;Now Please find the below database details where I'm getting subjected error.
    Database version : 9.2.0.8
    DB Name : DB2
    User Name : RPT_REPORTS
    I Have create a dblink from RPT_REPORTS to RPT_FTS on DB1 and the dblink works fine. But getting the above error while running it.
    but When I do the same other 10.2.0.3 db , the above PL/SQL block works fine without any problem.
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Now the strange about this is that I have Created a new table on DB1 db like below;
    SQL> CREATE TABLE UPLDUSER.ABC AS SELECT * FROM FILESTATUSHISTORY;and retry my code on DB2 (9.2.0.8) after changing the table to ABC and it worked. Now I don't know whats wrong with a original table(FILESTATUSHISTORY).
    To over come the problem and a work-a-round method I create a view on the DB1 (RPT_FTS) like the below
    SQL> CREATE VIEW FILESTATUSHISTORY AS SELECT * FROM UPLDUSER.FILESTATUSHISTORY;and was able to run the PL/SQL block Remotely.
    Just wants To know what whould have been the cause for this .
    Cheers
    Kanchana

    Hi Kanchana,
    Perhaps following link of google search has answer to your query
    ORA-04052. The search result contains some useful articles whose URLs I shan't post in the forums.
    HTH!
    *009*

  • "an error occurred when trying to change modules"

    When I switch repeatedly between Library and Develop with the R and E keys, I always sooner or later run into a problem where nothing happens when I press R. Really that should go the Develop module and enter crop mode -- what I'm usually trying to do, when this happens, is crop a bunch of photos. So I'll be using Library mode to identify the photos that need cropping, stepping through photos with the arrow keys, then when I find one that I want to crop, I press R, enter develop+crop mode, crop the photo, press E to return to library+loupe view, and continue.
    Sometimes this works 10 times, sometimes it only works twice, but always, relatively soon, when I press R, "nothing" will happen. Actually what's happening is an error dialog appears saying "an error occurred when trying to change modules", then the error dialog immediately disappears before I can read it. I know what it says, because if I click the Develop module with the mouse, I get the same message but it sticks around until I press OK.
    Once this happens, I'm entirely unable to use the Develop module until I quit the program. I had to quit and restart LR about 20 times during an hour of working with it last night, and this morning, in the first 15 minutes, I'm already on the 3rd restart.
    Anyone else see this?
    Details: LR 1.1 on Mac OS 10.4.10, 4-core Mac Pro, images are a mix of JPG from a pocket camera and NEF from a Nikon D40. I don't think it is related to the specific images, as it strikes apparently at random, and after exit and restart, I can crop that same photo, but a different one will eventually cause the same problem again.

    Sean, thanks for the Return key tip. I knew about that at one point, but lately I was trying to use Enter (the one on the numeric keypad, at the very lower right corner of the keyboard, which is really easy to hit with my thumb even when my hand is on the mouse! And Enter doesn't invoke the crop, so I forgot that Return did). That is a better way.
    I don't see the RE problem on my MacBook, only on my desktop computer, and that one is also experiencing other flakiness (
    metamatt, "missing text / thumbnails / many Lightroom UI elements disappeared" #, 18 Aug 2007 3:08 pm) so I think I'm going to try a complete reinstall there.

  • Getting "error occurred when looking up remote object" During IMPDP

    Hi
    I am doing a migration from one server to another server. I am on testing period. I am working on this setup
    SALESDB - RHEL 5.2(64bit) and Oracle Database 10.2.0.4
    It has schemas: SALESMGR, TARGET, REPORT and FINANCE
    These schemas will be migration to another database with the same name (we will be shutting down SALESDB 10g after the migration)
    SALESDB - RHEL 5.5(64bit) and Oracle Database 11.2.0.2
    ====================================
    The EXPDP process of the schemas in 10g DB are good and no errors where encountered. But during the IMPDP process of the schemas in 11g DB, I got the follwing erorrs:
    IMP-00017: following statement failed with ORACLE error 4052:
    *"ALTER PACKAGE "BEGINNING_BALANCE_PKG" COMPILE REUSE SETTINGS TIMESTAMP '200"*
    *"9-05-11:09:26:16'"*
    IMP-00003: ORACLE error 4052 encountered
    ORA-04052: error occurred when looking up remote object [email protected]
    ORA-00604: error occurred at recursive SQL level 1
    ORA-12154: TNS:could not resolve the connect identifier specified
    IMP-00017: following statement failed with ORACLE error 4052:
    *"ALTER PACKAGE "PKG_FAULT_CODES" COMPILE REUSE SETTINGS TIMESTAMP '2009-05-1"*
    *"0:02:49:13'"*
    IMP-00003: ORACLE error 4052 encountered
    ORA-04052: error occurred when looking up remote object SALESMGR.SALESPRD_DETAIL@SALESPRD_LINK
    ORA-00604: error occurred at recursive SQL level 1
    ORA-12154: TNS:could not resolve the connect identifier specified
    IMP-00017: following statement failed with ORACLE error 4052:
    *"ALTER PACKAGE "PKG_IFACE_SALESPRD_DATA" COMPILE REUSE SETTINGS TIMESTAMP '20"*
    *"11-09-22:10:33:12'"*
    IMP-00003: ORACLE error 4052 encountered
    ORA-04052: error occurred when looking up remote object SALESMGR.SALESMGR@SALESPRD_LINK
    ORA-00604: error occurred at recursive SQL level 1
    ORA-12154: TNS:could not resolve the connect identifier specified
    IMP-00017: following statement failed with ORACLE error 4052:
    *"ALTER PACKAGE "PKG_COPY_TC_RECPT_TO_ITEM_RECPT" COMPILE REUSE SETTINGS TIMESTAM"*
    *"P '2009-05-10:06:07:09'"*
    IMP-00003: ORACLE error 4052 encountered
    ORA-04052: error occurred when looking up remote object SALESMGR.SALESPRD@SALESPRD_LINK
    ORA-00604: error occurred at recursive SQL level 1
    ORA-12154: TNS:could not resolve the connect identifier specified
    IMP-00017: following statement failed with ORACLE error 4052:
    *"ALTER PACKAGE "PKG_SALES_INVOICE_CREATE_XML_TR" COMPILE REUSE SETTINGS TIMESTAM"*
    *"P '2009-05-10:06:07:23'"*
    IMP-00003: ORACLE error 4052 encountered
    ORA-04052: error occurred when looking up remote object SALESMGR.SALESPRD_TR_DETAIL@SALESPRD_LINK
    ORA-00604: error occurred at recursive SQL level 1
    ORA-12154: TNS:could not resolve the connect identifier specified
    IMP-00017: following statement failed with ORACLE error 4052:
    *"ALTER PACKAGE "PKG_SALES_INVOICE_CREATE_XML" COMPILE REUSE SETTINGS TIMESTAMP '"*
    *"2009-05-10:06:03:01'"*
    IMP-00003: ORACLE error 4052 encountered
    ORA-04052: error occurred when looking up remote object SALESMGR.SALESPRD_DETAIL@SALESPRD_LINK
    ORA-00604: error occurred at recursive SQL level 1
    ORA-12154: TNS:could not resolve the connect identifier specified
    IMP-00017: following statement failed with ORACLE error 4052:
    *"ALTER PACKAGE "PKG_PARSE_GRAPHIC" COMPILE REUSE SETTINGS TIMESTAMP '2009-05"*
    *"-10:06:07:23'"*
    IMP-00003: ORACLE error 4052 encountered
    ORA-04052: error occurred when looking up remote object SALESMGR.SALESPRD_DETAIL@SALESPRD_LINK
    ORA-00604: error occurred at recursive SQL level 1
    ORA-12154: TNS:could not resolve the connect identifier specified
    *. importing SALESMGR's objects into SALESMGR*
    *. importing SALESMGR's objects into SALESMGR*
    I have not created the complete TNS entries in the TNSNAMES.ORA file in the new Oracle 11g. We will be updating this on the actual migration process. Is this the root cause of the problem? I am sure that all database links are existing but upon validating it, it says "ORA-02019: connection description for remote database not found."
    Any ideas or feedback on this?
    Thanks!

    Hello,
    Yes, this is the root cause : Oracle can not compile your packages if it can not connect to remote tables.
    You have to create those entries in your tnsnames, but may be you can reference some test databases in your tnsnames instead of the real production databases, to avoid mistakes.
    Regards,
    Sylvie

  • ORA-04052: error occurred when looking up remote object REPADMIN.SYS@CEL2.W

    Hi,
    on 10gR2 , on WIN 2003 server :
    C:\>sqlplus repadmin/***@CEL2.WORLD
    SQL*Plus: Release 10.2.0.4.0 - Production on Tue Jun 22 09:54:18 2010
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing optionsAnd then :
    CONNECT repadmin/******@CEL1.WORLD
    BEGIN
       DBMS_REPCAT.ADD_MASTER_DATABASE (
          gname => 'REPG',
          master => 'CEL2.WORLD',
          use_existing_objects => TRUE,
          copy_rows => FALSE,
          propagation_mode => 'ASYNCHRONOUS');
    END;
    BEGIN
    ERROR at line 1:
    ORA-04052: error occurred when looking up remote object [email protected]
    ORA-00604: error occurred at recursive SQL level 2
    ORA-12545: Connect failed because target host or object does not exist
    ORA-06512: at "SYS.DBMS_REPCAT_UTL", line 4271
    ORA-06512: at "SYS.DBMS_REPCAT_MAS", line 2156
    ORA-06512: at "SYS.DBMS_REPCAT", line 146
    ORA-06512: at line 2Thank for help.

    Thank you. I think it is a problem with dB_LINK.
    SQL> select db_link from dba_db_links;
    DB_LINK
    CEL2.WORLD
    CEL2.WORLD
    SQL> select count(*) from [email protected];
    select count(*) from [email protected]
    ERROR at line 1:
    ORA-12505: TNS:listener does not currently know of SID given in connect
    descriptor
    SQL> select count(*) from SCOTT.EMP@CEL2;
    select count(*) from SCOTT.EMP@CEL2
    ERROR at line 1:
    ORA-02019: connection description for remote database not foundI can not see how to correct it ?
    Thanks.

  • Get error message when trying to launch bridge from CC 64 bit.

    Get error message when trying to launch Bridge from Photoshop CC 64 bit.  "Cannot complete command because extension cannot be loaded."  Need fix.  Thanks.

    Hi Adobe Bubba,
    Please uninstall the software, run the cleaner tool, restart your machine and install again.
    Cleaner tool: http://www.adobe.com/support/contact/cscleanertool.html .
    Regards,
    Romt Sinha

  • From an iPhone 5, I receive the following error message when trying to download content from a radio show app:  "Alert Could not parse feed."   How do I fix?

    From an iPhone 5, I receive the following error message when trying to download content from a radio show app:  "Alert Could not parse feed."   How do I fix?

    Since you're using a 3rd party app, suggest contacting the app developer or looking at their support site for help.

  • An error occurred when trying to access the service

    I'm asking myself why I purchased a one year subscription to Adobe Reader to convert PDF files to Doc files, when it NEVER WORKS and no one seems to be able to help me!!! I am on a Mac Book Pro with Yosemite (don't upgrade it slows your Mac badly) and whenever I try to convert a pdf to a doc I get 'an error occurred when trying to access the service', can anybody help me please?

    Hi Cedric,
    The customer service number is 800833687
    The direct link for chat support is: http://adobe.ly/19llvMN
    You need to click on 'Still need help' to initiate the chat session.
    Are you getting this error: "an error occurred when trying to access the service" while trying to access the service via Reader.
    Try using the link: https://cloud.acrobat.com/exportpdf sign in with your Adobe ID and try to convert a pdf to doc and check if that works for you.
    Reards,
    Rave

  • When I click Convert to Word docx, I receive the error message -- "An error occured when trying to access the service." This has been happening for about a week.

    Export PDF will not convert a pdf to MS Word. This failure has been going on for about a week. The error message is "An error occurred when trying to access the service." What can I do to get this working again?

    Hi,
    It seems it was working fine earlier.
    Is this happening with all files?
    You can try using different browser.
    Regards,
    Florence

  • I get an error message when trying to download apps from the app store.  "safari can not open the page because the address is invalid".  Please help!!

    i get an error message when trying to download apps from the app store.  "Safari can not oprn the page because the address is invalid"

    You can't use Safari to download iPad apps. Only use iTunes/App Store.
     Cheers, Tom

Maybe you are looking for

  • When I receive an email, I get a message that says delivery failure

    Every time I receive an email for the last 2 days, I get another email saying this: This report relates to a message you sent with the following header fields: Message-id: <[email protected]> Date: Thu, 07 Mar 20

  • LG Enlighten disk full error

    My LG enlighten keeps getting a disk space full message and it looks like it is due to my emails.  Is there anyway to save the emails to the SD Card? Thanks, Behram

  • OfficeJet Pro 8500 A909a - trouble installing software and drivers

    I am trying to re-install my Software and Drivers for OfficeJet Pro 8500 A909a. My operating system is Windows 7. I get an error message every time. "Runtime Error! This application has requested the Runtime to termnated it in an unusual way. Please

  • Elements 9 upgrade

    Trying to upgrade my photoshop elements 9, keeps coming up-Patch cannot be applied" Any suggestions

  • Ipad Air and itunes

    I have connected my ipad air with itunes several times before. Now when I plug my ipad into the computer, itunes comes up but then it locks up??????????????