Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [riena-dev] Riena remote failure

Hi Eugen,

ok so first a little theory. Since Riena is about running Equinino on client and server it provides a remote service implementation, that is some code that allows you on the client to call a OSGi Service hat sits on the server (I just explain the whole thing, even some of it might be clear already).

So when the client wants to call the remote service CustomerService (and that is a remote service), you need to have two JVM started from Eclipse. One is the server bit that hosts the service and exposes it as remote service. The second is the client that connects to the server and makes the remote call.

So start the server (make sure that you pressed add required bundles). The thing should start and log out them log info statements to the console saying that its the Jetty server, that its listing on Port 8080 and stuff like that.

If that does not work, dont get further. Rather print out the status of the server and post it here. You get this with "SS" and with "status". The first lists the bundles with their state. Its good to look their for bundles that didnt start. If there is a bundle that didnt start (and its not a fragment) you can try to start it manually with start xx where xx is the number of the bundle  (like start 5). Sometimes when bundles are started and an exception is thrown in the Activator, that exception is not shown but only when you do that the second time.

"Status" lists the running OSGi Service and you should see many Equinox Services but also somewhere the ICustomerService.

maybe that helps.....but as I said, just post the output and we are able to help

christian


Am 09.05.2009 um 18:49 schrieb Eugen Reiswich:

Hi Christian,

hmm, that didn't help. I've followed the instructions on: http://wiki.eclipse.org/Riena_Getting_started#Install_the_Riena_Sample_App_Server to install the sample app server (also I don't really get what this sample server is good for) but I still get the same exception.

How can I make sure that the server started correct? All bundles are  "active" but I didn't get any log info.

Regards,
Eugen

Am May 9, 2009 um 17:04  schrieb Christian Campo:

Hi Eugen,

pretty simple (once you know it) :-)

you are missing the server that the client wants to call. Riena comes with an OSGI Launch Configuration "Riena Sample App Server". Start that one (dont forget add required bundles) and the client can connect and they rest is easy.

Make sure that the Sample App Server is coming up correctly and actually can open the listen port 8080. (It cant for example if you still have the ping pong communication sample server running).

But then it should work. Let me know if you have more problems....

christian

Am 09.05.2009 um 15:45 schrieb Eugen Reiswich:

I'm trying to get the Riena "CustomerService" example run. When I start my client I only see the log: 

osgi> calling customer search

but nothing happens at all. So I've told the client to use a ServiceTracker:

public void start(final BundleContext context) throws Exception {
// register hessian proxy for riena remote service
RemoteServiceFactory rsf = new RemoteServiceFactory();
Class<?> serviceInterface = ICustomerService.class;
String protocol = "hessian";

customerServiceReg = rsf.createAndRegisterProxy(serviceInterface, url,
protocol, context);

customerServiceTracker = new ServiceTracker(context,
ICustomerService.class.getName(), null) {
@Override
public Object addingService(ServiceReference reference) {
// TODO Auto-generated method stub
ICustomerService service = (ICustomerService) super
.addingService(reference);
bind(service);
return service;

}
};
customerServiceTracker.open();

}

Now I get the exception below. What am I doing wrong?

Cheers,
Eugen

!ENTRY org.riena.client 4 0 2009-05-09 15:23:48.864
!MESSAGE 
!STACK 0
org.osgi.framework.BundleException: Exception in org.riena.client.Activator.start() of bundle org.riena.client.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:805)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:220)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:330)
Caused by: org.eclipse.riena.communication.core.RemoteFailure: 
at org.eclipse.riena.internal.communication.core.factory.CallHooksProxy.invoke(CallHooksProxy.java:71)
at $Proxy11.findCustomer(Unknown Source)
at org.riena.client.Activator.bind(Activator.java:60)
at org.riena.client.Activator$1.addingService(Activator.java:47)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)
at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:184)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:339)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:273)
at org.riena.client.Activator.start(Activator.java:52)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773)
... 10 more
Caused by: com.caucho.hessian.client.HessianRuntimeException: java.net.ConnectException: Connection refused
at com.caucho.hessian.client.HessianProxy.sendRequest(HessianProxy.java:263)
at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:151)
at $Proxy10.findCustomer(Unknown Source)
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:597)
at org.eclipse.riena.communication.core.hooks.AbstractHooksProxy.invoke(AbstractHooksProxy.java:95)
at org.eclipse.riena.internal.communication.core.factory.CallHooksProxy.invoke(CallHooksProxy.java:59)
... 22 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:788)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:729)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:654)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:832)
at com.caucho.hessian.client.HessianProxy.sendRequest(HessianProxy.java:261)
... 30 more
Root exception:
org.eclipse.riena.communication.core.RemoteFailure: 
at org.eclipse.riena.internal.communication.core.factory.CallHooksProxy.invoke(CallHooksProxy.java:71)
at $Proxy11.findCustomer(Unknown Source)
at org.riena.client.Activator.bind(Activator.java:60)
at org.riena.client.Activator$1.addingService(Activator.java:47)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)
at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:184)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:339)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:273)
at org.riena.client.Activator.start(Activator.java:52)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:220)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:330)
Caused by: com.caucho.hessian.client.HessianRuntimeException: java.net.ConnectException: Connection refused
at com.caucho.hessian.client.HessianProxy.sendRequest(HessianProxy.java:263)
at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:151)
at $Proxy10.findCustomer(Unknown Source)
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:597)
at org.eclipse.riena.communication.core.hooks.AbstractHooksProxy.invoke(AbstractHooksProxy.java:95)
at org.eclipse.riena.internal.communication.core.factory.CallHooksProxy.invoke(CallHooksProxy.java:59)
... 22 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:788)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:729)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:654)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:832)
at com.caucho.hessian.client.HessianProxy.sendRequest(HessianProxy.java:261)
... 30 more

<ATT00001.c>

_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev

<ATT00001.c>


Back to the top