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 Christian,

I don't mind to create a Wiki page for "Getting started with Riena" but I am still fighting some problems while using Riena. Therefore I would like to solve this problems first and create afterwards the wiki page. I just have to keep this in mind.

Regards,
Eugen

Am May 12, 2009 um 10:33  schrieb Christian Campo:

Hi Eugen,

this is a great idea. Dont you feel compelled to write down your experience in setting up a sample for yourself in the Eclipse Wiki ? You know this is a community effort and we would be really great if you have some spare minutes for that.

We as long times users of Remote Services of Riena are sometimes really blind what it takes and what hurdle exists in order to set it up.

If you need help to find a proper location and link it to the Riena wiki pages, let me know...

christian


Am 12.05.2009 um 09:59 schrieb Eugen Reiswich:

YES! You were right, I was missing jetty as well as the VM arguments. It works now, thanks a lot!!! 

It would be great to have a hint on the Riena wiki which bundles one has to start (server and client side) in order to user Riena for remote communication.

Regards,
Eugen


Am May 11, 2009 um 22:51  schrieb Christian Campo:

hi eugen,

you are missing a webcontainer....Since Hessian is served by a servlet, you need a Webcontainer. The easiest is Jetty. To get all dependencies right, click the bundle org.eclipse.equinox.http.jetty. That will then (on add required bundles) also pull in org.mortbay.jetty.

It also a idea to specify a port in the VM Arguments -Dorg.eclipse.equinox.http.jetty.http.port=8080

You can look at the communication.sample.pingpong.server or the Riena Sample App server. Both have launch configs, where you find the arguments the bundles selected.

hope that gets you further

christian


Am 11.05.2009 um 18:36 schrieb Eugen Reiswich:

Hi Christian,

these are my server bundles:

id State       Bundle
0 ACTIVE      org.eclipse.osgi_3.5.0.v20090429-1630
91 ACTIVE      org.eclipse.equinox.log_1.1.0.v20090108
92 ACTIVE      org.riena.server_1.0.0.qualifier <-- THIS BUNDLE PROVIDES MY REMOTE SERVICE
93 RESOLVED    org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800
            Master=107
94 ACTIVE      org.eclipse.riena.server_1.0.0
95 ACTIVE      org.eclipse.equinox.app_1.2.0.v20090429-1630
96 ACTIVE      org.eclipse.riena.communication.core_1.0.0
97 ACTIVE      com.caucho.hessian_3.1.3
98 ACTIVE      org.eclipse.core.variables_3.2.200.v20090428
99 ACTIVE      org.eclipse.equinox.http.registry_1.0.200.v20090429-1630
100 ACTIVE      org.eclipse.equinox.preferences_3.2.300.v20090429-1630
101 ACTIVE      org.eclipse.core.runtime_3.5.0.v20090429-1800
102 ACTIVE      org.eclipse.equinox.http.servlet_1.0.200.v20090429-1630
103 ACTIVE      org.eclipse.riena.communication.publisher.hessian_1.0.0
104 ACTIVE      org.riena.common_1.0.0
105 ACTIVE      javax.servlet_2.5.0.v200806031605
106 ACTIVE      org.eclipse.equinox.common_3.5.0.v20090429-1630
107 ACTIVE      org.eclipse.equinox.registry_3.4.100.v20090429-1630
            Fragments=93
108 ACTIVE      org.eclipse.riena.core_1.0.0
109 ACTIVE      org.eclipse.osgi.services_3.2.0.v20090429-1630
110 ACTIVE      org.eclipse.riena.communication.factory.hessian_1.0.0
111 ACTIVE      org.eclipse.core.jobs_3.4.100.v20090429-1800
112 ACTIVE      org.eclipse.riena.communication.console_1.0.0
113 ACTIVE      org.eclipse.core.contenttype_3.4.0.v20090429-1800
114 ACTIVE      org.eclipse.riena.communication.publisher_1.0.0
115 ACTIVE      org.eclipse.riena.monitor.common_1.0.0
116 ACTIVE      org.eclipse.riena.sample.app.common_1.0.0
117 ACTIVE      org.eclipse.riena.sample.app.server_1.0.0 // IF I GOT IT RIGHT I HAD TO INCLUDE THIS BUNDLE
118 ACTIVE      org.eclipse.riena.security.common_1.0.0

As you can see all my bundles are active. What I don't know is whether I start all required bundles or am I missing some important bundles? I also do not get any log infos when I start my server.

Regards,
Eugen

Am May 10, 2009 um 10:58  schrieb Christian Campo:

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>

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

<ATT00001.c>

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

<ATT00001.c>

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


Back to the top