Re: [JBoss-dev] java.io.NotSerializableException: org.jboss.jetty.JBossUserRealm

2002-01-14 Thread Jules Gosnell

If you had run the testsuite today, you would have noticed the absence of this
problem :-)

I am using a suggestion of Anatoly's to simply :

SecurityAssociation.setPrincipal(new SimplePrincipal(this.getName()));

instead of :

SecurityAssociation.setPrincipal(this);

in my JBossUserPrincipal.

SimplePrincipals are Serializable, whereas JBossUserPrincipals is not.

This should be OK - shouldn't it, Scott ?


Jules



Ignacio Coloma wrote:

 Jules, please post whatever you decide to do to the mailing list. I'm
 implementing an app on RH and need the security stuff. I can use local
 interfaces to workaround the problem, but would prefer to wait for
 serialization/optimization (both solutions solve my problem)

 (the conclusion: pliz could you keep the world informed? ;))

 Thanks in advance.

 Ignacio.

  -Mensaje original-
  De: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]En nombre de Jules
  Gosnell
  Enviado el: sabado, 12 de enero de 2002 13:55
  Para: [EMAIL PROTECTED]
  Asunto: [JBoss-dev] java.io.NotSerializableException:
  org.jboss.jetty.JBossUserRealm
 
 
 
  Marc,
 
  My understanding of this Exception popping up in the web testsuite was
  that serialisation was occuring because optimisation was not. Therefore
  I have not invested time in the alterations to JBossUserRealm to make it
  Serializable.
 
  What is the situation here? Is this still the case - or does it have to
  be Serialisable ?
 
 
  Jules
 
  13:50:14,485 INFO  [Jetty] SecureEJBServlet: init
  13:50:14,628 ERROR [StatelessSessionContainer] invoke returned an
  exception
  java.io.NotSerializableException: org.jboss.jetty.JBossUserRealm
   at
  java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
   at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
   at
  java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1827)
 
   at
  java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
 
   at
  java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
   at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
   at java.rmi.MarshalledObject.init(MarshalledObject.java:95)
   at
  org.jboss.invocation.MarshalledInvocation.writeExternal(Marshalled
  Invocation.java:312)
 
   at
  java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1172)
   at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
   at java.rmi.MarshalledObject.init(MarshalledObject.java:95)
   at org.jboss.ejb.Container.invoke(Container.java:648)
   at
  com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
 
   at
  com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 
   at
  org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:113)
   at
  org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPI
  nvokerProxy.java:149)
 
   at org.jboss.proxy.ejb.GenericProxy.invoke(GenericProxy.java:182)
   at org.jboss.proxy.ejb.HomeProxy.invoke(HomeProxy.java:194)
   at $Proxy17.create(Unknown Source)
   at
  org.jboss.test.web.servlets.SecureEJBServlet.processRequest(Secure
  EJBServlet.java:51)
 
   at
  org.jboss.test.web.servlets.SecureEJBServlet.doGet(SecureEJBServle
  t.java:79)
 
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
  org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:291)
   at
  org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:542)
 
   at org.mortbay.http.HttpContext.handle(HttpContext.java:1265)
   at org.mortbay.http.HttpContext.handle(HttpContext.java:1219)
   at org.mortbay.http.HttpServer.service(HttpServer.java:725)
   at org.mortbay.http.HttpConnection.service(HttpConnection.java:745)
   at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:918)
   at org.mortbay.http.HttpConnection.handle(HttpConnection.java:760)
   at
  org.mortbay.http.SocketListener.handleConnection(SocketListener.java:138)
 
   at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:287)
   at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:715)
   at java.lang.Thread.run(Thread.java:484)
  13:50:14,632 WARN  [Jetty] WARNING: Servlet Exception for
  /jbosstest/restricted/SecureEJBAccess
  java.lang.reflect.UndeclaredThrowableException:
  java.io.NotSerializableException: org.jboss.jetty.JBossUserRealm
   no stack trace available
 
  13:50:19,504 INFO  [JBossUserRealm#JBossTest Servlets]
  JBossUserPrincipal: jduke
 
 
  _
  Do You Yahoo!?
  Get your free @yahoo.com address at http://mail.yahoo.com
 
 
  ___
  Jboss-development mailing list
  [EMAIL PROTECTED]
  https://lists.sourceforge.net/lists/listinfo/jboss-development
 
 


_
Do You Yahoo!?
Get your free @yahoo.com address

Re: [JBoss-dev] java.io.NotSerializableException: org.jboss.jetty.JBossUserRealm

2002-01-14 Thread Scott M Stark


That's fine, the security context of a call is stateless.

- Original Message -
From: Jules Gosnell [EMAIL PROTECTED]
To: Ignacio Coloma [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, January 14, 2002 2:28 PM
Subject: Re: [JBoss-dev] java.io.NotSerializableException:
org.jboss.jetty.JBossUserRealm


 If you had run the testsuite today, you would have noticed the absence of
this
 problem :-)

 I am using a suggestion of Anatoly's to simply :

 SecurityAssociation.setPrincipal(new SimplePrincipal(this.getName()));

 instead of :

 SecurityAssociation.setPrincipal(this);

 in my JBossUserPrincipal.

 SimplePrincipals are Serializable, whereas JBossUserPrincipals is not.

 This should be OK - shouldn't it, Scott ?


 Jules




___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] java.io.NotSerializableException: org.jboss.jetty.JBossUserRealm

2002-01-12 Thread Anatoly Akkerman


Jules, the fix is very easy, you don't have to make JBossUserRealm
serializable, instead, when you do
SecurityAssociation.setPrincipal() don't pass it 'this' which is
JBossUserPrincipal, rather pass along a new SimplePrincipal() which
corresponds to the name stored in JBossUserPrincipal. The JBoss security
infrastructure only checks the name, the Principal object does not have to
be the same everytime. Doublecheck with Scott but this fix worked nicely
for me.

-
Anatoly Akkerman
Computer Science Dept.
Courant Institute of Mathematical Sciences, NYU
715 Broadway, #719  Tel: 212 998-3493
New York, NY 10003  Fax: 212 995-4123
-

On Sat, 12 Jan 2002, Jules Gosnell wrote:

 
 Marc,
 
 My understanding of this Exception popping up in the web testsuite was
 that serialisation was occuring because optimisation was not. Therefore
 I have not invested time in the alterations to JBossUserRealm to make it
 Serializable.
 
 What is the situation here? Is this still the case - or does it have to
 be Serialisable ?
 
 
 Jules
 
 13:50:14,485 INFO  [Jetty] SecureEJBServlet: init
 13:50:14,628 ERROR [StatelessSessionContainer] invoke returned an
 exception
 java.io.NotSerializableException: org.jboss.jetty.JBossUserRealm
  at
 java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
  at
 java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1827)
 
  at
 java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
 
  at
 java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
  at java.rmi.MarshalledObject.init(MarshalledObject.java:95)
  at
 
org.jboss.invocation.MarshalledInvocation.writeExternal(MarshalledInvocation.java:312)
 
  at
 java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1172)
  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
  at java.rmi.MarshalledObject.init(MarshalledObject.java:95)
  at org.jboss.ejb.Container.invoke(Container.java:648)
  at
 com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
 
  at
 com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 
  at
 org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:113)
  at
 
org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:149)
 
  at org.jboss.proxy.ejb.GenericProxy.invoke(GenericProxy.java:182)
  at org.jboss.proxy.ejb.HomeProxy.invoke(HomeProxy.java:194)
  at $Proxy17.create(Unknown Source)
  at
 org.jboss.test.web.servlets.SecureEJBServlet.processRequest(SecureEJBServlet.java:51)
 
  at
 org.jboss.test.web.servlets.SecureEJBServlet.doGet(SecureEJBServlet.java:79)
 
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:291)
  at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:542)
 
  at org.mortbay.http.HttpContext.handle(HttpContext.java:1265)
  at org.mortbay.http.HttpContext.handle(HttpContext.java:1219)
  at org.mortbay.http.HttpServer.service(HttpServer.java:725)
  at org.mortbay.http.HttpConnection.service(HttpConnection.java:745)
  at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:918)
  at org.mortbay.http.HttpConnection.handle(HttpConnection.java:760)
  at
 org.mortbay.http.SocketListener.handleConnection(SocketListener.java:138)
 
  at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:287)
  at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:715)
  at java.lang.Thread.run(Thread.java:484)
 13:50:14,632 WARN  [Jetty] WARNING: Servlet Exception for
 /jbosstest/restricted/SecureEJBAccess
 java.lang.reflect.UndeclaredThrowableException:
 java.io.NotSerializableException: org.jboss.jetty.JBossUserRealm
  no stack trace available
 
 13:50:19,504 INFO  [JBossUserRealm#JBossTest Servlets]
 JBossUserPrincipal: jduke
 
 
 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com
 
 
 ___
 Jboss-development mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-development
 


___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] java.io.NotSerializableException: org.jboss.jetty.JBossUserRealm

2002-01-12 Thread Scott M Stark

A user may disable optimization through configuration if they
choose to ensure RMI pass by value semantics and this requires
that the call context be Serializable. Any java.security.Principal
implementation should be Serializable.

- Original Message -
From: Jules Gosnell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, January 12, 2002 5:55 AM
Subject: [JBoss-dev] java.io.NotSerializableException:
org.jboss.jetty.JBossUserRealm



 Marc,

 My understanding of this Exception popping up in the web testsuite was
 that serialisation was occuring because optimisation was not. Therefore
 I have not invested time in the alterations to JBossUserRealm to make it
 Serializable.

 What is the situation here? Is this still the case - or does it have to
 be Serialisable ?


 Jules

 13:50:14,485 INFO  [Jetty] SecureEJBServlet: init
 13:50:14,628 ERROR [StatelessSessionContainer] invoke returned an
 exception
 java.io.NotSerializableException: org.jboss.jetty.JBossUserRealm
  at
 java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
  at
 java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1827)

  at
 java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)

  at
 java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
  at java.rmi.MarshalledObject.init(MarshalledObject.java:95)
  at

org.jboss.invocation.MarshalledInvocation.writeExternal(MarshalledInvocation
.java:312)

  at
 java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1172)
  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
  at java.rmi.MarshalledObject.init(MarshalledObject.java:95)
  at org.jboss.ejb.Container.invoke(Container.java:648)
  at
 com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)

  at
 com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)

  at
 org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:113)
  at

org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProx
y.java:149)

  at org.jboss.proxy.ejb.GenericProxy.invoke(GenericProxy.java:182)
  at org.jboss.proxy.ejb.HomeProxy.invoke(HomeProxy.java:194)
  at $Proxy17.create(Unknown Source)
  at

org.jboss.test.web.servlets.SecureEJBServlet.processRequest(SecureEJBServlet
.java:51)

  at

org.jboss.test.web.servlets.SecureEJBServlet.doGet(SecureEJBServlet.java:79)

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:291)
  at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:542)

  at org.mortbay.http.HttpContext.handle(HttpContext.java:1265)
  at org.mortbay.http.HttpContext.handle(HttpContext.java:1219)
  at org.mortbay.http.HttpServer.service(HttpServer.java:725)
  at org.mortbay.http.HttpConnection.service(HttpConnection.java:745)
  at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:918)
  at org.mortbay.http.HttpConnection.handle(HttpConnection.java:760)
  at
 org.mortbay.http.SocketListener.handleConnection(SocketListener.java:138)

  at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:287)
  at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:715)
  at java.lang.Thread.run(Thread.java:484)
 13:50:14,632 WARN  [Jetty] WARNING: Servlet Exception for
 /jbosstest/restricted/SecureEJBAccess
 java.lang.reflect.UndeclaredThrowableException:
 java.io.NotSerializableException: org.jboss.jetty.JBossUserRealm
  no stack trace available

 13:50:19,504 INFO  [JBossUserRealm#JBossTest Servlets]
 JBossUserPrincipal: jduke


 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com


 ___
 Jboss-development mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-development



___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development