Orbeon-Servlet

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Orbeon-Servlet

Cherif Oueslati
Hi,

I have developed a servlet that interact with an applet and exchange a
java object.
I send and get the object correctly when i deploy the project into tomcat.
a problem occurs when I integrate them with an existent application
that works with Orbeon: the object seems to be lost
or not allowed to be passed when sent from servlet to applet knowing
that I tried to replace this object with a String and it's working.
I would like to know if there is an Orbeon configuration to allow the
exchange of java object or have I to specify a special "ContentType".
I'm using : response.setContentType("application/x-java-serialized-object");
into my servlet.

Thank you for your help.
With all my gratitude.
Cherif OUESLATI.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon-Servlet

Alessandro Vernet
Administrator
Cherif,

Cherif Oueslati wrote
I have developed a servlet that interact with an applet and exchange a
java object.
I send and get the object correctly when i deploy the project into tomcat.
a problem occurs when I integrate them with an existent application
that works with Orbeon: the object seems to be lost
or not allowed to be passed when sent from servlet to applet knowing
that I tried to replace this object with a String and it's working.
I would like to know if there is an Orbeon configuration to allow the
exchange of java object or have I to specify a special "ContentType".
I'm using : response.setContentType("application/x-java-serialized-object");
into my servlet.
How is your Java object returned in the case you have Orbeon Forms deployed? Is it the same servlet, deployed along Orbeon Forms that returns the data with the content type application/x-java-serialized-object? Or are you using the Java processor?

Alex
Reply | Threaded
Open this post in threaded view
|

Re: Re: Orbeon-Servlet

Cherif Oueslati
Hi,

I'm using the same servlet that returns the data with the content
type: "application/x-java-serialized-object".

I return my object using:
response.setContentType("application/x-java-serialized-object");

and an ObjectOutputStream  in witch I put my object :
ObjectOutputStream oos = new ObjectOutputStream(outstr);
oos.writeObject(td);

Thank you for your help.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Orbeon-Servlet

Cherif Oueslati
Recently I've got the following in my java console:

Exception in thread "thread applet-MyApplet.class-1" java.lang.ClassFormatError: Incompatible magic value 1013478509 in class file com/ext/portlet/ecom/utils/MyObject
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.io.ObjectInputStream.resolveClass(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at MyApplet.onGetData(MyApplet.java:320)
at MyApplet.init(MyApplet.java:89)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Have you any idea about this "Incompatible magic value 1013478509" ?

With all my gratitudes.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Orbeon-Servlet

Cherif Oueslati
Is the fact of that I'm using a Vista as OS could produce such a problem knowing that
when I tested both of servlet and applet successfully, it was in XP machines but without Orbeon.

Thank you for your help.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Orbeon-Servlet

Alessandro Vernet
Administrator
In reply to this post by Cherif Oueslati
Cherif,

Cherif Oueslati wrote
I'm using the same servlet that returns the data with the content
type: "application/x-java-serialized-object".

I return my object using:
response.setContentType("application/x-java-serialized-object");

and an ObjectOutputStream  in witch I put my object :
ObjectOutputStream oos = new ObjectOutputStream(outstr);
oos.writeObject(td);
So this is your servlet, deployed along Orbeon Forms. And your applet is talking to your servlet. So if code from Orbeon Forms is running, I am not sure how we can help here.

Alex
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Orbeon-Servlet

Cherif Oueslati
I solved the problem this way:
In fact, the applet and servlet are not in the same project and each one have the class that represent the object transfered between the two entities. I solved the problem when I put the class unsing the same name of package under the two projects.
Until now I don't understand the meaning of such a modification.

Thank you for your interest.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws