Quantcast

new beanshell serializable problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

new beanshell serializable problem

Ryan Wexler
I have been using beanshell scripts for years now.  The way I use them
is that I have a set of scripts that each do some auditing procedure
in my application.  Each user can select which scripts to use when
running their audit.

My application is a java/spring/hibernate app with a swing front end.
I have been using the spring lightweight remoting RMIInvoker to let
the client talk to the server.  The scripts are executed on the server
side.  I am migrating from the RMIInvokers to using tomcat with the
spring HTTPInvokers.  After I made the configuration changes
everything in my application works except executing the bean scripts.

Now when I execute them I get the serialization error below.  It is
odd because the RMIInvokers depend on serialization as well so I don't
see why that change would cause such an issue but apparently the
mechanism works differently.  Any ideas for solutions?  I am totally
stuck right now because I need to redeploy this app very soon using
the httpinvokers.
much thanks
-ryan

java.io.NotSerializableException: bsh.CallStack
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
        at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:391)
        at java.lang.Throwable.writeObject(Throwable.java:649)
        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:585)
        at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
        at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:391)
        at java.lang.Throwable.writeObject(Throwable.java:649)
        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:585)
        at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
        at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.doWriteRemoteInvocationResult(HttpInvokerServiceExporter.java:309)
        at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.writeRemoteInvocationResult(HttpInvokerServiceExporter.java:258)
        at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.writeRemoteInvocationResult(HttpInvokerServiceExporter.java:234)
        at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.handleRequest(HttpInvokerServiceExporter.java:118)
        at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:49)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:819)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:754)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:399)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:364)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:595)

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Loading...