[jboss-remoting-issues] [JBoss JIRA] Commented: (JBREM-1072) Synchronize access to static maps in MarshalFactory

roirex (JIRA) jira-events at lists.jboss.org
Fri Feb 6 02:57:44 EST 2009


    [ https://jira.jboss.org/jira/browse/JBREM-1072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12451446#action_12451446 ] 

roirex commented on JBREM-1072:
-------------------------------

This is not solved completly, at least I still get the error with 2.2.2.SP11 (from svn). 

However I think I can see the reason (or maybe I created my client wrong?). 

In org.jboss.remoting.MicroRemoteClientInvoker the method:

private String getDataType()

changes a member variable "dataType", but if MicroRemoteClientInvoker is shared between threads (which it is in my client) the method can some times return "null". The exception might still say "Can not find a valid marshaller for data type: serializable" because getDataType() is then called again, this time returning the correct value.

At least, stop caching the value, fixed my client.

> Synchronize access to static maps in MarshalFactory
> ---------------------------------------------------
>
>                 Key: JBREM-1072
>                 URL: https://jira.jboss.org/jira/browse/JBREM-1072
>             Project: JBoss Remoting
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 2.2.2.SP10, 2.5.0.SP2 (Flounder) 
>            Reporter: Ron Sigal
>            Assignee: Ron Sigal
>             Fix For: 2.2.2.SP11, 2.5.0.SP3 (Flounder)
>
>         Attachments: jboss-remoting.jar
>
>
> Users have experienced the exception 
> org.jboss.remoting.marshal.InvalidMarshallingResource: Can not find a valid marshaller for data type: serializable
> 	at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:79)
> 	at org.jboss.remoting.Client.invoke(Client.java:1634)
> 	at org.jboss.remoting.Client.invoke(Client.java:548)
> 	at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
> 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> 	at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
> 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> 	at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
> 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> 	at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
> 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> 	at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
> This is strange, since a marshaller for the datatype "serializable" is hardcoded in org.jboss.remoting.marshal.MarshalFactory.  However, access to the static Map marshallers is not synchronized, so it's possible that one subsystem is adding a marshaller (e.g., EJB2, JBossMessaging) at the same time that EJB3 is trying to extract a marshaller.  The same observation applies to unmarshallers.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-remoting-issues mailing list