You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Laborie Alexandre <al...@ca-sits.com> on 2008/04/03 12:02:53 UTC

ServerException unmarshalling : unknown protocol felix (RMI and ExtensionManager?)

Hello,

I have a problem in a remote call by RMI of an EJB in JOnAS with Felix, which
involves as far as I can say the ExtensionManager. I think I could solve my 
problem by disabling the "addURLToURLClassLoader" call in its static 
initialization block, but I did not find any "public" way to do it 
(configuration, arguments, etc.)

The error I get is "<code>java.io.IOException: unknown protocol: felix</code>"
The stack trace is below
<pre>
java.net.URL.readObject(URL.java:1217)
sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:290)
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:279)
sun.rmi.transport.Transport$1.run(Transport.java:153)
java.security.AccessController.doPrivileged(Native Method)
sun.rmi.transport.Transport.serviceCall(Transport.java:149)
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
java.lang.Thread.run(Thread.java:595)
</pre>

This exception is nested in "<code>java.rmi.UnmarshalException: error
unmarshalling arguments</code>" which itself is nested in a 
"<code>java.rmi.ServerException</code>"
<pre>
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:325)
sun.rmi.transport.Transport$1.run(Transport.java:153)
java.security.AccessController.doPrivileged(Native Method)
sun.rmi.transport.Transport.serviceCall(Transport.java:149)
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
java.lang.Thread.run(Thread.java:595)
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
org.objectweb.carol.cmi.RegistryImpl_Stub.lookup(Unknown Source)
org.objectweb.carol.cmi.RegistryClient.lookup(RegistryClient.java:89)
org.objectweb.carol.cmi.jndi.FlatCtx.lookup(FlatCtx.java:219)
org.objectweb.carol.cmi.jndi.FlatCtx.lookup(FlatCtx.java:250)
javax.naming.InitialContext.lookup(InitialContext.java:351)
org.objectweb.carol.jndi.spi.AbsContext.lookup(AbsContext.java:140)
org.objectweb.carol.jndi.spi.AbsContext.lookup(AbsContext.java:150)
javax.naming.InitialContext.lookup(InitialContext.java:347)
javax.naming.InitialContext.lookup(InitialContext.java:347)
...
</pre>

This happens when I try to invoke a service by its name "indexFinder" through
the Carol RMI client of ObjectWeb. I am no expert in RMI, nor do I have 
control on the server's classpath, so I have limited options.

Is there anyone who faced the problem and found a way around it ? I would
welcome any explanation too on what's happening in RMI (how the server's 
unmarshalling method is aware of the "felix" URL in my client's JVM ?)

I use an embedded Felix (1.0.3), in Sun's JRE 1.4.2, with the following config
map :
<pre>
FelixConstants.LOG_LEVEL_PROP, "4"
FelixConstants.EMBEDDED_EXECUTION_PROP, "true"
FelixConstants.SERVICE_URLHANDLERS_PROP, "false"  <-- I hoped that could help
me, but this does not appears to be so
Constants.FRAMEWORK_SYSTEMPACKAGES, "org.osgi.framework; version=1.3.0,
org.osgi.service.packageadmin; version=1.2.0, org.osgi.service.startlevel;
version=1.0.0, org.osgi.service.url; version=1.0.0, org.osgi.util.tracker;
version=1.3.2"
BundleCache.CACHE_PROFILE_DIR_PROP, MYCACHEDIR
</pre>

I am of course available for further questions, but please note that I reside in
France so there could be a 6 to 8 hours delay between your message and my reply.

-- 
Alexandre LABORIE - Crédit Agricole Asset Management - SITS/EGE/GA/TEC
Think before you print - Réfléchissez avant d'imprimer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ServerException unmarshalling : unknown protocol felix (RMI and ExtensionManager?)

Posted by james yong <i_...@yahoo.com.sg>.
Yes. the server doesn't use felix. I have also raised the issue at JIRA.

Regards,
James


Karl Pauls wrote:
> 
> I assume the exception is happening on the server  which doesn't use
> felix, right?
> 
> regards,
> 
> Karl
> 
> 

-- 
View this message in context: http://www.nabble.com/ServerException-unmarshalling-%3A-unknown-protocol-felix-%28RMI-and-ExtensionManager-%29-tp16471435p20876225.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ServerException unmarshalling : unknown protocol felix (RMI and ExtensionManager?)

Posted by Karl Pauls <ka...@gmail.com>.
Additionally, could you please raise a JIRA at
http://issues.apache.org/jira/browse/FELIX about this issue?

regards,

Karl

On Thu, Dec 4, 2008 at 5:21 PM, Karl Pauls <ka...@gmail.com> wrote:
> I assume the exception is happening on the server  which doesn't use
> felix, right?
>
> regards,
>
> Karl
>
> On Thu, Dec 4, 2008 at 4:22 PM, james yong <i_...@yahoo.com.sg> wrote:
>>
>> Hi,
>>
>> Is there a way to disable the extension manager or a solution?
>> i am facing similar exception as the topic starter, when retrieving workitem
>> from openwfe via rmi.
>> The client application is using felix 1.2. Tried equinox without problem.
>> Below is the stack trace.
>>
>> regards,
>> james
>>
>> java.rmi.ServerException: RemoteException occurred in server thread; nested
>> exception is:
>>        java.rmi.UnmarshalException: error unmarshalling arguments; nested
>> exception is:
>>        java.net.MalformedURLException: unknown protocol: felix
>>        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:325)
>>        at sun.rmi.transport.Transport$1.run(Transport.java:153)
>>        at java.security.AccessController.doPrivileged(Native Method)
>>        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
>>        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
>>        at
>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
>>        at java.lang.Thread.run(Thread.java:595)
>>        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown
>> Source)
>>        at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
>>        at sun.rmi.server.UnicastRef.invoke(Unknown Source)
>>        at openwfe.org.worklist.impl.RmiWorkSession_Stub.get(Unknown Source)
>>
>>
>> --
>> View this message in context: http://www.nabble.com/ServerException-unmarshalling-%3A-unknown-protocol-felix-%28RMI-and-ExtensionManager-%29-tp16471435p20835602.html
>> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
>
>
> --
> Karl Pauls
> karlpauls@gmail.com
>



-- 
Karl Pauls
karlpauls@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ServerException unmarshalling : unknown protocol felix (RMI and ExtensionManager?)

Posted by Karl Pauls <ka...@gmail.com>.
I assume the exception is happening on the server  which doesn't use
felix, right?

regards,

Karl

On Thu, Dec 4, 2008 at 4:22 PM, james yong <i_...@yahoo.com.sg> wrote:
>
> Hi,
>
> Is there a way to disable the extension manager or a solution?
> i am facing similar exception as the topic starter, when retrieving workitem
> from openwfe via rmi.
> The client application is using felix 1.2. Tried equinox without problem.
> Below is the stack trace.
>
> regards,
> james
>
> java.rmi.ServerException: RemoteException occurred in server thread; nested
> exception is:
>        java.rmi.UnmarshalException: error unmarshalling arguments; nested
> exception is:
>        java.net.MalformedURLException: unknown protocol: felix
>        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:325)
>        at sun.rmi.transport.Transport$1.run(Transport.java:153)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
>        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
>        at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
>        at java.lang.Thread.run(Thread.java:595)
>        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown
> Source)
>        at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
>        at sun.rmi.server.UnicastRef.invoke(Unknown Source)
>        at openwfe.org.worklist.impl.RmiWorkSession_Stub.get(Unknown Source)
>
>
> --
> View this message in context: http://www.nabble.com/ServerException-unmarshalling-%3A-unknown-protocol-felix-%28RMI-and-ExtensionManager-%29-tp16471435p20835602.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
Karl Pauls
karlpauls@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ServerException unmarshalling : unknown protocol felix (RMI and ExtensionManager?)

Posted by james yong <i_...@yahoo.com.sg>.
Hi,

Is there a way to disable the extension manager or a solution?
i am facing similar exception as the topic starter, when retrieving workitem
from openwfe via rmi.
The client application is using felix 1.2. Tried equinox without problem.
Below is the stack trace.

regards,
james

java.rmi.ServerException: RemoteException occurred in server thread; nested
exception is: 
	java.rmi.UnmarshalException: error unmarshalling arguments; nested
exception is: 
	java.net.MalformedURLException: unknown protocol: felix
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:325)
	at sun.rmi.transport.Transport$1.run(Transport.java:153)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
	at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
	at java.lang.Thread.run(Thread.java:595)
	at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown
Source)
	at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
	at sun.rmi.server.UnicastRef.invoke(Unknown Source)
	at openwfe.org.worklist.impl.RmiWorkSession_Stub.get(Unknown Source)


-- 
View this message in context: http://www.nabble.com/ServerException-unmarshalling-%3A-unknown-protocol-felix-%28RMI-and-ExtensionManager-%29-tp16471435p20835602.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ServerException unmarshalling : unknown protocol felix (RMI and ExtensionManager?)

Posted by Karl Pauls <ka...@gmail.com>.
You are right, there is no public way to disable the extensionmanager
(perhaps there should be). Could you try to enable the URLHandlers
service and/or try to use the latest trunk version of felix (i.e.,
1.1.0-SNAPSHOT)? That might fix your issue. If not please let us know
then I add a way to disable the extension manager.

regards,

Karl

> Hello,
>
>  I have a problem in a remote call by RMI of an EJB in JOnAS with Felix, which
>  involves as far as I can say the ExtensionManager. I think I could solve my
>  problem by disabling the "addURLToURLClassLoader" call in its static
>  initialization block, but I did not find any "public" way to do it
>  (configuration, arguments, etc.)
>
>  The error I get is "<code>java.io.IOException: unknown protocol: felix</code>"
>  The stack trace is below
>  <pre>
>  java.net.URL.readObject(URL.java:1217)
>  sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)
>  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  java.lang.reflect.Method.invoke(Method.java:585)
>  java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
>  java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
>  java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
>  java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>  java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
>  java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
>  java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
>  sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:290)
>  sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:279)
>  sun.rmi.transport.Transport$1.run(Transport.java:153)
>  java.security.AccessController.doPrivileged(Native Method)
>  sun.rmi.transport.Transport.serviceCall(Transport.java:149)
>  sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
>  sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
>  java.lang.Thread.run(Thread.java:595)
>  </pre>
>
>  This exception is nested in "<code>java.rmi.UnmarshalException: error
>  unmarshalling arguments</code>" which itself is nested in a
>  "<code>java.rmi.ServerException</code>"
>  <pre>
>  sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:325)
>  sun.rmi.transport.Transport$1.run(Transport.java:153)
>  java.security.AccessController.doPrivileged(Native Method)
>  sun.rmi.transport.Transport.serviceCall(Transport.java:149)
>  sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
>  sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
>  java.lang.Thread.run(Thread.java:595)
>  sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
>  sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
>  sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
>  org.objectweb.carol.cmi.RegistryImpl_Stub.lookup(Unknown Source)
>  org.objectweb.carol.cmi.RegistryClient.lookup(RegistryClient.java:89)
>  org.objectweb.carol.cmi.jndi.FlatCtx.lookup(FlatCtx.java:219)
>  org.objectweb.carol.cmi.jndi.FlatCtx.lookup(FlatCtx.java:250)
>  javax.naming.InitialContext.lookup(InitialContext.java:351)
>  org.objectweb.carol.jndi.spi.AbsContext.lookup(AbsContext.java:140)
>  org.objectweb.carol.jndi.spi.AbsContext.lookup(AbsContext.java:150)
>  javax.naming.InitialContext.lookup(InitialContext.java:347)
>  javax.naming.InitialContext.lookup(InitialContext.java:347)
>  ...
>  </pre>
>
>  This happens when I try to invoke a service by its name "indexFinder" through
>  the Carol RMI client of ObjectWeb. I am no expert in RMI, nor do I have
>  control on the server's classpath, so I have limited options.
>
>  Is there anyone who faced the problem and found a way around it ? I would
>  welcome any explanation too on what's happening in RMI (how the server's
>  unmarshalling method is aware of the "felix" URL in my client's JVM ?)
>
>  I use an embedded Felix (1.0.3), in Sun's JRE 1.4.2, with the following config
>  map :
>  <pre>
>  FelixConstants.LOG_LEVEL_PROP, "4"
>  FelixConstants.EMBEDDED_EXECUTION_PROP, "true"
>  FelixConstants.SERVICE_URLHANDLERS_PROP, "false"  <-- I hoped that could help
>  me, but this does not appears to be so
>  Constants.FRAMEWORK_SYSTEMPACKAGES, "org.osgi.framework; version=1.3.0,
>  org.osgi.service.packageadmin; version=1.2.0, org.osgi.service.startlevel;
>  version=1.0.0, org.osgi.service.url; version=1.0.0, org.osgi.util.tracker;
>  version=1.3.2"
>  BundleCache.CACHE_PROFILE_DIR_PROP, MYCACHEDIR
>  </pre>
>
>  I am of course available for further questions, but please note that I reside in
>  France so there could be a 6 to 8 hours delay between your message and my reply.
>
>  --
>  Alexandre LABORIE - Crédit Agricole Asset Management - SITS/EGE/GA/TEC
>  Think before you print - Réfléchissez avant d'imprimer
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>  For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
Karl Pauls
karlpauls@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org