Serialization issue

2004-03-03 Thread Sean Campbell
I'm trying to grab the current session ID and the request parameter map  
from the current request and serialize them into a base64 string to  
pass to a PHP application.  Problem is, I keep running into the  
following exception everytime I try to serialize anything imlementing  
the Map interface:

java.io.NotSerializableException: org.apache.coyote.tomcat5.CoyoteWriter
at  
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
at  
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:13 
32)
at  
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
at  
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1 
247)
at  
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at  
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:13 
32)
at  
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
at  
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1 
247)
at  
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at  
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at com.enertiasoft.util.Base64.encodeObject(Base64.java:348)
at  
com.enertiasoft.session.SessionServlet$SessionProxy.toString(SessionServ 
let.java:125)
at  
com.enertiasoft.session.SessionServlet.service(SessionServlet.java:50)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica 
tionFilterChain.java:284)
at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt 
erChain.java:204)
at  
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv 
e.java:256)
at  
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo 
ntext.java:151)
at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 
63)
at  
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon 
textValve.java:245)
at  
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv 
e.java:199)
at  
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo 
ntext.java:151)
at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 
63)
at  
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java 
:195)
at  
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo 
ntext.java:151)
at  
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java 
:164)
at  
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo 
ntext.java:149)
at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 
63)
at  
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. 
java:156)
at  
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo 
ntext.java:151)
at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 
63)
at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at  
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209)
at  
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:78 
1)
at  
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC 
onnection(Http11Protocol.java:549)
at  
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58 
9)
at  
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool 
.java:666)
at java.lang.Thread.run(Thread.java:534)

What is the CoyoteWriter object I keep running inot, and how can I mark  
it as transient?

Thanks

Sean

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Serialization issue

2004-03-03 Thread Sean Campbell
Right now I get the exception even when I try to serialize a HashMap I 
just created, without any data in it.  I would guess that any request 
parameters stored in the map returned by request.getParameterMap() 
should be serializable right?

I don't understand how, f I'm serializing a new serializable object, 
the CyoteWriter get's involved.

Sean

On Wednesday, March 3, 2004, at 03:03 PM, Shapira, Yoav wrote:

Hi,

What is the CoyoteWriter object I keep running inot, and how can I 
mark
it as transient?
It's the HTTP connector's writer, and you can't mark it as transient.
You would have to manually remove non-serializable attributes from a
copy of the Map before you try to serialize the copy.
Yoav Shapira



This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, 
proprietary and/or privileged.  This e-mail is intended only for the 
individual(s) to whom it is addressed, and may not be saved, copied, 
printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your 
computer system and notify the sender.  Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


JMX questions

2004-02-21 Thread Sean Campbell
Background:

I'm trying to implement a custom MBean to be accessable through the 
/manager/jmxproxy application.  I've read the mbeans-descriptor-howto 
document, and have put together what I believe is a correct descriptor, 
and don't get any errors when tomcat (version 5 is what we're using) 
starts up.  Problem is, I don't see my MBean through the proxy 
interface.

Question:

Does jmxproxy support custom MBeans?  If so, does it support only Model 
MBeans?  I ask this because my MBean is a simple one, not dynamic or 
model.  Is there any way to test that my MBean is loaded and 
accessable, short of putting together a seperate JMX agent or client to 
access it?  If I wanted to use an external client to manage all of 
tomcat's MBeans, inclusing my custom one, how would i go about that?

Thanks in advance for any help.

Sincerely,

Sean Campbell
Developer
Enertiasoft
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]