Sorry, I've not even looked at them yet!  I've been very busy with work and
family commitments.

I'm going to try and have a look towards the end if this week, maybe
Thursday.

Cheers,

Tom

Sent via mobile device, please forgive typos and spacing errors.

On 30 Jan 2012 18:31, "Girbea Alina" <[email protected]> wrote:

> Hi,
>
> Have you discovered the cause of my error:)?
> I hope you received the two projects that I sent you on your personal
> email.
> Thank you very much again!
>
> Best regards,
> Alina
>
>
>
>
> Tom Hobbs wrote:
>
>> Sorry you're still stuck.
>>
>> Can you paste your service's java code as well?  I'm drawing a blank on
>> why
>> you're seeing this, the configs look fine.
>>
>> Sent via mobile device, please forgive typos and spacing errors.
>>
>> On 26 Jan 2012 07:44, "Girbea Alina" <[email protected]> wrote:
>>
>>
>>
>>> Hi,
>>>
>>> I haven't figured out which is the cause of my error. Do you have any
>>> idea?
>>>
>>> Thank you!
>>> Alina
>>>
>>>
>>>
>>> On Thursday 19/01/2012 at 10:55:50, Tom Hobbs  wrote:
>>>
>>>
>>>
>>>> Can you include the contents of your services config files, if any,
>>>> please?
>>>>
>>>> Both services should be able to run quite happily on the same server.
>>>>  The
>>>> port in use error can, off the top of my head, either be the HTTP port
>>>> or
>>>> the port that River uses for discovery (reggies port).  So the first
>>>> thing
>>>> I would look for would be to make sure you're not accidentally
>>>> attempting
>>>> to start a second HTTP service.
>>>>
>>>> Sent via mobile device, please forgive typos and spacing errors.
>>>>
>>>> On 18 Jan 2012 19:50, "Girbea Alina" <[email protected]> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> I'm working on my very first jini application and I want to develop a
>>>>> "fat" service (where the work is done on the server and the client
>>>>> uses a
>>>>> proxy).
>>>>> Hence, I want to setup a nonactivatable jini service (the
>>>>> implementation
>>>>> must be Remote and must be able to create a proxy) as described in Jan
>>>>> Newmarch's book in chapter 21 using the ServiceDescription interface.
>>>>>
>>>>> These are the steps that I followed:
>>>>> 1) Start Jini HttpServer:
>>>>>    D:\jini\apache-river-2.2.0\******lib>java -jar tools.jar -port 8080
>>>>> -dir
>>>>> D:\jini\apache-river-2.2.0\******lib-dl
>>>>>
>>>>>  and I have obtained the following message:
>>>>>    Jan 16, 2012 10:11:28 PM com.sun.jini.tool.ClassServer run
>>>>>    INFO: ClassServer started [[D:\jini\apache-river-2.2.0\***
>>>>> ***lib-dl\],
>>>>> port
>>>>> 8080]
>>>>>
>>>>> 2) Start Reggie service using the following instruction (I'm using
>>>>> reggie
>>>>> because I want to register my service with the reggie lookup service):
>>>>>
>>>>>    D:\>java  -Djava.security.policy=D:\******policy.all -jar
>>>>> D:\jini\apache-river-2.2.0\******lib\start.jar
>>>>> D:\start-transient-reggie.**
>>>>> config
>>>>>
>>>>>  and I have obtained the following message:
>>>>>      Jan 16, 2012 10:23:12 PM com.sun.jini.reggie.******RegistrarImpl
>>>>> init
>>>>>    INFO: started Reggie: c704a7fa-0540-46a4-93b1-******a321bc8c50a8,
>>>>> [],
>>>>> ConstrainableLookupLocator[[******jini://pc-nume/], [null]]
>>>>>
>>>>>  (2.1)Where the start-transient-reggie.config looks as follows:
>>>>>
>>>>>    import com.sun.jini.start.******ServiceDescriptor;
>>>>>    import com.sun.jini.start.******NonActivatableServiceDescripto**
>>>>> ****r;
>>>>>    import com.sun.jini.config.******ConfigUtil;
>>>>>
>>>>>    com.sun.jini.start {
>>>>>
>>>>>          private static codebase = ConfigUtil.concat(new Object[] {
>>>>>                              "http://";,
>>>>>                              "localhost",
>>>>>                              ":8080/reggie-dl.jar"+" http://
>>>>> ","localhost",":8080/**
>>>>> jsk-dl.jar"
>>>>>                              }
>>>>>                                    );
>>>>>
>>>>>            private static policy = "D:\\policy.all";
>>>>>    private static classpath = "D:\\jini\\apache-river-2.2.0\******
>>>>> \lib\\reggie.jar";
>>>>>    private static config = "D:\\transient-reggie.config";
>>>>>    static serviceDescriptors = new ServiceDescriptor[] {new
>>>>> NonActivatableServiceDescripto******r(
>>>>>                                                  codebase, policy,
>>>>> classpath, "com.sun.jini.reggie.
>>>>> **TransientRegistrarImpl",new String[] { config }) };
>>>>>    }
>>>>>
>>>>>
>>>>>  (2.2)transient-reggie.config
>>>>>
>>>>>    com.sun.jini.reggie {
>>>>>                    initialMemberGroups = new String[] {} }
>>>>>
>>>>>
>>>>> 3) Afterwards I have developed the service and I have created the jar
>>>>> "ServiceDescription-dl.jar", which I have put at
>>>>> D:\jini\apache-river-2.2.0\
>>>>> **lib-dl\classes where the http server is started and which contains
>>>>> the
>>>>> classes needed by the client.
>>>>>  The thing is that if reggie is started then I get the following error
>>>>> message:
>>>>>
>>>>> java.net.BindException: Address already in use: Cannot bind
>>>>>    at java.net.******PlainDatagramSocketImpl.bind0(******Native
>>>>> Method)
>>>>>    at java.net.******PlainDatagramSocketImpl.bind(******Unknown
>>>>> Source)
>>>>>    at java.net.DatagramSocket.bind(******Unknown Source)
>>>>>    at java.net.MulticastSocket.<******init>(Unknown Source)
>>>>>    at java.net.MulticastSocket.<******init>(Unknown Source)
>>>>>    at net.jini.discovery.******LookupDiscovery$****
>>>>> AnnouncementListener.<init>(**
>>>>> LookupDiscovery.java:1030)
>>>>>    at net.jini.discovery.******LookupDiscovery$7.run(**
>>>>> LookupDiscovery.java:3091)
>>>>>    at java.security.******AccessController.doPrivileged(******Native
>>>>> Method)
>>>>>    at net.jini.security.Security$5.******run(Security.java:543)
>>>>>    at java.security.******AccessController.doPrivileged(******Native
>>>>> Method)
>>>>>    at net.jini.security.Security.******doPrivileged(Security.java:****
>>>>> **
>>>>> 540)
>>>>>    at net.jini.discovery.******LookupDiscovery.******beginDiscovery(**
>>>>> LookupDiscovery.java:3089)
>>>>>    at net.jini.discovery.******LookupDiscovery.<init>(**
>>>>> LookupDiscovery.java:1946)
>>>>>    at net.jini.discovery.******LookupDiscoveryManager.****
>>>>> beginDiscovery(**
>>>>> LookupDiscoveryManager.java:******1549)
>>>>>    at net.jini.discovery.******LookupDiscoveryManager.<init>(******
>>>>> LookupDiscoveryManager.java:******902)
>>>>>    at starter.ServiceDescription.******advertiseService(**
>>>>> ServiceDescription.java:160)
>>>>>    at starter.ServiceDescription.<******init>(ServiceDescription.**
>>>>> java:**
>>>>> **76)
>>>>>    at starter.ServiceDescription.******main(ServiceDescription.java:**
>>>>> ***
>>>>> *36)
>>>>>
>>>>>    If reggie is not started, then I get no error and the service works.
>>>>>
>>>>>  Otherwise, if I try to start reggie after my service is started I get
>>>>> a
>>>>> similar error.
>>>>>
>>>>>    Jan 18, 2012 6:48:13 PM com.sun.jini.reggie.******RegistrarImpl
>>>>> <init>
>>>>> SEVERE: Reggie initialization failed
>>>>> java.net.BindException: Address already in use: Cannot bind
>>>>>            at java.net.******PlainDatagramSocketImpl.bind0(**
>>>>> ****Native
>>>>> Method)
>>>>>            at java.net.******PlainDatagramSocketImpl.bind(***
>>>>> ***Unknown
>>>>> Source)
>>>>>            at java.net.DatagramSocket.bind(******Unknown Source)
>>>>>            at java.net.MulticastSocket.<******init>(Unknown Source)
>>>>>            at java.net.MulticastSocket.<******init>(Unknown Source)
>>>>>            at net.jini.discovery.******LookupDiscovery$**
>>>>> AnnouncementListener.<init>(******Lookup
>>>>> Discovery.java:1030)
>>>>>            at net.jini.discovery.******LookupDiscovery$7.run(**
>>>>> LookupDiscovery.java:3091)
>>>>>            at java.security.******AccessController.doPrivileged(**
>>>>> ****Native
>>>>> Method)
>>>>>            at net.jini.security.Security$5.***
>>>>> ***run(Security.java:543)
>>>>>            at java.security.******AccessController.doPrivileged(**
>>>>> ****Native
>>>>> Method)
>>>>>            at net.jini.security.Security.******
>>>>> doPrivileged(Security.java:******540)
>>>>>            at net.jini.discovery.******LookupDiscovery.****
>>>>> beginDiscovery(**
>>>>> LookupDiscovery.jav
>>>>> a:3089)
>>>>>            at net.jini.discovery.******LookupDiscovery.<init>(**
>>>>> LookupDiscovery.java:1946)
>>>>>            at net.jini.discovery.******LookupDiscoveryManager.**
>>>>> beginDiscovery(LookupDiscov
>>>>> eryManager.java:1549)
>>>>>            at net.jini.discovery.******LookupDiscoveryManager.<init>(*
>>>>> *****
>>>>> LookupDiscoveryManag
>>>>> er.java:966)
>>>>>            at com.sun.jini.reggie.******RegistrarImpl.init(**
>>>>> RegistrarImpl.java:4557)
>>>>>            at com.sun.jini.reggie.******RegistrarImpl.access$000(**
>>>>> RegistrarImpl.java:143)
>>>>>            at com.sun.jini.reggie.******RegistrarImpl$1.run(**
>>>>> RegistrarImpl.java:448)
>>>>>            at com.sun.jini.reggie.******RegistrarImpl.loginAndRun(**
>>>>> RegistrarImpl.java:461)
>>>>>
>>>>>            at com.sun.jini.reggie.******RegistrarImpl.<init>(**
>>>>> RegistrarImpl.java:396)
>>>>>            at com.sun.jini.reggie.******TransientRegistrarImpl.<init>(
>>>>> ****
>>>>> **
>>>>> TransientRegistrarI
>>>>> mpl.java:39)
>>>>>            at sun.reflect.******NativeConstructorAccessorImpl.****
>>>>> **newInstance0(Native
>>>>> Method)
>>>>>
>>>>>            at sun.reflect.******NativeConstructorAccessorImpl.****
>>>>> **newInstance(Unknown
>>>>> Source)
>>>>>
>>>>>            at sun.reflect.******DelegatingConstructorAccessorI****
>>>>> **mpl.newInstance(Unknown
>>>>> Sou
>>>>> rce)
>>>>>            at java.lang.reflect.Constructor.******newInstance(Unknown
>>>>> Source)
>>>>>            at com.sun.jini.start.******NonActivatableServiceDescripto*
>>>>> *****
>>>>> r.create(NonActivata
>>>>> bleServiceDescriptor.java:674)
>>>>>            at com.sun.jini.start.******ServiceStarter.create(**
>>>>> ServiceStarter.java:287)
>>>>>            at com.sun.jini.start.******ServiceStarter.****
>>>>> processServiceDescriptors(*
>>>>> *ServiceSt
>>>>> arter.java:445)
>>>>>            at com.sun.jini.start.******ServiceStarter.main(**
>>>>> ServiceStarter.java:476)
>>>>> Jan 18, 2012 6:48:13 PM com.sun.jini.start.******ServiceStarter
>>>>> checkResultFailures
>>>>> WARNING: Exception creating service.
>>>>> java.lang.reflect.******InvocationTargetException
>>>>>            at sun.reflect.******NativeConstructorAccessorImpl.****
>>>>> **newInstance0(Native
>>>>> Method)
>>>>>
>>>>>            at sun.reflect.******NativeConstructorAccessorImpl.****
>>>>> **newInstance(Unknown
>>>>> Source)
>>>>>
>>>>>            at sun.reflect.******DelegatingConstructorAccessorI****
>>>>> **mpl.newInstance(Unknown
>>>>> Sou
>>>>> rce)
>>>>>            at java.lang.reflect.Constructor.******newInstance(Unknown
>>>>> Source)
>>>>>            at com.sun.jini.start.******NonActivatableServiceDescripto*
>>>>> *****
>>>>> r.create(NonActivata
>>>>> bleServiceDescriptor.java:674)
>>>>>            at com.sun.jini.start.******ServiceStarter.create(**
>>>>> ServiceStarter.java:287)
>>>>>            at com.sun.jini.start.******ServiceStarter.****
>>>>> processServiceDescriptors(*
>>>>> *ServiceSt
>>>>> arter.java:445)
>>>>>            at com.sun.jini.start.******ServiceStarter.main(**
>>>>> ServiceStarter.java:476)
>>>>> Caused by: java.net.BindException: Address already in use: Cannot bind
>>>>>            at java.net.******PlainDatagramSocketImpl.bind0(**
>>>>> ****Native
>>>>> Method)
>>>>>            at java.net.******PlainDatagramSocketImpl.bind(***
>>>>> ***Unknown
>>>>> Source)
>>>>>            at java.net.DatagramSocket.bind(******Unknown Source)
>>>>>            at java.net.MulticastSocket.<******init>(Unknown Source)
>>>>>            at java.net.MulticastSocket.<******init>(Unknown Source)
>>>>>            at net.jini.discovery.******LookupDiscovery$**
>>>>> AnnouncementListener.<init>(******Lookup
>>>>> Discovery.java:1030)
>>>>>            at net.jini.discovery.******LookupDiscovery$7.run(**
>>>>> LookupDiscovery.java:3091)
>>>>>            at java.security.******AccessController.doPrivileged(**
>>>>> ****Native
>>>>> Method)
>>>>>            at net.jini.security.Security$5.***
>>>>> ***run(Security.java:543)
>>>>>            at java.security.******AccessController.doPrivileged(**
>>>>> ****Native
>>>>> Method)
>>>>>            at net.jini.security.Security.******
>>>>> doPrivileged(Security.java:******540)
>>>>>            at net.jini.discovery.******LookupDiscovery.****
>>>>> beginDiscovery(**
>>>>> LookupDiscovery.jav
>>>>> a:3089)
>>>>>            at net.jini.discovery.******LookupDiscovery.<init>(**
>>>>> LookupDiscovery.java:1946)
>>>>>            at net.jini.discovery.******LookupDiscoveryManager.**
>>>>> beginDiscovery(LookupDiscov
>>>>> eryManager.java:1549)
>>>>>            at net.jini.discovery.******LookupDiscoveryManager.<init>(*
>>>>> *****
>>>>> LookupDiscoveryManag
>>>>> er.java:966)
>>>>>            at com.sun.jini.reggie.******RegistrarImpl.init(**
>>>>> RegistrarImpl.java:4557)
>>>>>            at com.sun.jini.reggie.******RegistrarImpl.access$000(**
>>>>> RegistrarImpl.java:143)
>>>>>            at com.sun.jini.reggie.******RegistrarImpl$1.run(**
>>>>> RegistrarImpl.java:448)
>>>>>            at com.sun.jini.reggie.******RegistrarImpl.loginAndRun(**
>>>>> RegistrarImpl.java:461)
>>>>>
>>>>>            at com.sun.jini.reggie.******RegistrarImpl.<init>(**
>>>>> RegistrarImpl.java:396)
>>>>>            at com.sun.jini.reggie.******TransientRegistrarImpl.<init>(
>>>>> ****
>>>>> **
>>>>> TransientRegistrarI
>>>>> mpl.java:39)
>>>>>            ... 8 more
>>>>> Jan 18, 2012 6:48:13 PM com.sun.jini.start.******ServiceStarter
>>>>> checkResultFailures
>>>>> WARNING: Associated service descriptor [0]: [
>>>>> http://localhost:8080/reggie-
>>>>> **dl.jar 
>>>>> <http://localhost:8080/reggie-****dl.jar<http://localhost:8080/reggie-**dl.jar>
>>>>> <http://localhost:**8080/reggie-dl.jar<http://localhost:8080/reggie-dl.jar>
>>>>> >
>>>>>        
>>>>> http://localhost:8080/jsk-dl.******jar<http://localhost:8080/jsk-dl.****jar>
>>>>> <http://localhost:8080/**jsk-dl.**jar<http://localhost:8080/jsk-dl.**jar>
>>>>> ><
>>>>> http://localhost:8080/jsk-dl.****jar<http://localhost:8080/jsk-dl.**jar><
>>>>> http://localhost:8080/jsk-dl.**jar <http://localhost:8080/jsk-dl.jar>
>>>>> >>,
>>>>> D:\policy.all, D:\jini\apache-river-2.2.0\lib
>>>>> \reggie.jar, com.sun.jini.reggie.******TransientRegistrarImpl, [D:\
>>>>> transient-reggie.co
>>>>> nfig], com.sun.jini.start.******NonActivatableServiceDescripto****
>>>>> **r$1@a470b8,
>>>>> BasicProxyPr
>>>>> eparer[]]
>>>>>
>>>>>
>>>>>
>>>>>    Shouldn't both services be able to run on the same server?
>>>>>    What have I done wrong?? I really dont't have any clue, I think I
>>>>> got
>>>>> the concept wrong somewhere!
>>>>>
>>>>>  Best regards!
>>>>>  Alina
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>
>>
>
>

Reply via email to