Hi,

I'm back to working on Altrmi and I am able to retrieve a remote component
via Altrmi lookup. I even can use methods of the published interface that
use only standard Java types such as String etc. But as soon as a I use a
method of one of the additional facades, that is methods that return or
take a other custom interface it failes at runtime with a
NullPointerException.

Setup: Latest and greatest incubator-altri 0.9.2
Pre-compiled proxy classes in jar, on server side altrmi-server-0.9.2.jar
on client-side additionally altrmi-client-0.9.2.jar and the proxy classes
jar.

For testing purpose I added only those additional facades that are
absolutely necessary because there was then someone mentioning that the
order in which the facades have to be specified when generating the Altrmi
proxies might have an influence. But I tried both orders, putting
inherited interfaces first or last, no difference.

Interface: SIMONDataSource
Thus I have 3 additional facades:
  SIMONObject
  SIMONConnection
  SIMONMessageGroup (inheriting from SIMONObject)

These are used in two function that I use in the SIMONDataSource interface.

First interesting a method

  SIMONConnection SIMONDataSource::connect(String user, String passwd)

is called that works!
The second method in the interface is also simple but does not work:

  SIMONMessageGroup[] SIMONDataSource::getMessageGroups()

Ok it is a array but that works in another case like String[] already.
Only the combination of Array and custom facade does not work.

Note that the SIMONMessageGroup as well as the SIMONConnection interfaces
only contain void method() methods so simplizissimo.

The exception follows, please note that is called from Cocoon so some
non-Altrmi stuff around:
---
Caused by: java.lang.NullPointerException: Null pointer exception,
processing methodgetMessageGroups()
        at
org.apache.altrmi.server.impl.adapters.InvocationHandlerAdapter.handleInvocation(InvocationHandlerAdapter.java:232)
        at
org.apache.altrmi.server.impl.AbstractServer.handleInvocation(AbstractServer.java:184)
        at
org.apache.altrmi.server.impl.rmi.RmiInovcationAdapter.handleInvocation(RmiInovcationAdapter.java:102)
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
        at sun.rmi.transport.Transport$1.run(Transport.java:148)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
        at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
        at java.lang.Thread.run(Thread.java:536)
        at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
        at
org.apache.altrmi.server.impl.rmi.RmiInovcationAdapter_Stub.handleInvocation(Unknown
Source)
        at
org.apache.altrmi.client.impl.rmi.RmiClientInvocationHandler.handleInvocation(RmiClientInvocationHandler.java:206)
        at
org.apache.altrmi.client.impl.DefaultProxyHelper.processObjectRequestGettingFacade2(DefaultProxyHelper.java:192)
        at
org.apache.altrmi.client.impl.DefaultProxyHelper.processObjectRequestGettingFacade(DefaultProxyHelper.java:161)
        at
AltrmiGeneratedsimonserver_Main.getMessageGroups(AltrmiGeneratedsimonserver_Main.java:200)
        at com.vodafone.simon.cocoon.SIMONSource.refresh(SIMONSource.java:393)
        at com.vodafone.simon.cocoon.SIMONSource.toSAX(SIMONSource.java:1097)
        at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:143)
---


A build.xml snipplet:

<altrmiproxies genname="simonserver" ...
interface="com.vodafone.simon.comp.SIMONDataSource"
additionalfacades="com.vodafone.simon.api.SIMONObject,
com.vodafone.simon.api.SIMONConnection,
com.vodafone.simon.api.SIMONMessageGroup">




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

Reply via email to