You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@river.apache.org by Timothy C Haas <ha...@uwm.edu> on 2017/02/17 16:06:38 UTC

3.0.0 javaspaces example?

Folks;

I copied start-hello-service.config and hello-service.config in the
3.0.0 distribution and replaced com.sun.jini with org.apache.river.
I was surprised that I had to do that.  Anyway, I tried to start a
lookup service with those files using the script below and received
the following error.  I looked in /lib and there is indeed no hello-api.jar.

Is it possible for you to post a working example of starting a javaspace
with river 3.0.0?

Regards,
-Tim Haas

------------------------------------------------------------------------

[haas@tscc-2-60 jsutils]$ sh jstest.shl
[Deleting jinitmp directory]
[Creating jinitmp directory]
- HTTP Server Running -
Feb 17, 2017 7:52:29 AM org.apache.river.start.HTTPDStatus httpdWarning
WARNING: Problem accessing desired URL[http://132.249.107.66:8080/hello-api.jar]
: java.io.FileNotFoundException: http://132.249.107.66:8080/hello-api.jar.
Feb 17, 2017 7:52:29 AM org.apache.river.start.ServiceStarter checkResultFailure
s
WARNING: Exception creating service.
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:45)
...

-----------------------------------------------------------------------

rm -f -r /home/haas/jinitmp/
echo [Deleting jinitmp directory]
#
mkdir /home/haas/jinitmp
echo [Creating jinitmp directory]
#
rh="/projects/builder-group/jpg/apache-river"
myconfigs="/home/haas/jsutils"
cd ${rh}/examples/home/src/main/home
#
# Start an http server.  Was 4160
#
java -jar ${rh}/lib/classserver.jar -port 8080 \
 -dir lib:${rh}/lib-dl $* \
> /home/haas/jinitmp/http.out \
2> /home/haas/jinitmp/http.err &
echo - HTTP Server Running -
#
# Activation daemon
#
#java -Djava.security.manager= \
#    -Djava.security.policy=policy/all.policy \
#    -Djava.rmi.server.codebase="http://$host:8080/phoenix-dl.jar http://$host:8080/jsk-dl.jar" \
#    -DserverHost=$host \
#    -jar ${rh}/lib/phoenix.jar  \
#    configs/jeri/phoenix/phoenix.config
rmid -J-Djava.security.policy=${rh}/qa/harness/policy/all.policy \
   -log /home/haas/jinitmp &
#
# Start a reggie lookup service.
#
java -Djava.security.policy=${rh}/qa/harness/policy/all.policy \
-Djava.ext.dirs=${rh}/lib-ext:${rh}/lib-dl:${rh}/lib:${rh}/dep-libs/groovy \
    -jar ${rh}/lib/start.jar ${myconfigs}/start-hello-service.config
exit
echo - Lookup Service Running
#
# Start the JavaSpace.
#
java -Djava.security.policy=policy/all.policy \
   -jar ${rh}/lib/start.jar \
    configs/jeri/outrigger/outrigger.config
echo - JavaSpace Running -



Re: 3.0.0 javaspaces example?

Posted by Peter <ji...@zeus.net.au>.
Hi Tim,

The examples aren't included in River 3.0.0, they were broken out into a 
separate project release cycle before River 3.0.0 was released, they 
haven't been released for River 3.0.0 at this time.

The examples, including the hello service have been updated to use River 
3.0.0 and modern build practises here:

https://github.com/dreedyman/apache-river-example

Note that at this time there are no River 3.0.0 artifacts on Maven Central.

N.B. You actually successfully started Javaspaces, clearly the hello 
service didn't, as it's jar is missing.

Regards,

Peter.

On 18/02/2017 2:06 AM, Timothy C Haas wrote:
> Folks;
>
> I copied start-hello-service.config and hello-service.config in the
> 3.0.0 distribution and replaced com.sun.jini with org.apache.river.
> I was surprised that I had to do that.  Anyway, I tried to start a
> lookup service with those files using the script below and received
> the following error.  I looked in /lib and there is indeed no hello-api.jar.
>
> Is it possible for you to post a working example of starting a javaspace
> with river 3.0.0?
>
> Regards,
> -Tim Haas
>
> ------------------------------------------------------------------------
>
> [haas@tscc-2-60 jsutils]$ sh jstest.shl
> [Deleting jinitmp directory]
> [Creating jinitmp directory]
> - HTTP Server Running -
> Feb 17, 2017 7:52:29 AM org.apache.river.start.HTTPDStatus httpdWarning
> WARNING: Problem accessing desired URL[http://132.249.107.66:8080/hello-api.jar]
> : java.io.FileNotFoundException: http://132.249.107.66:8080/hello-api.jar.
> Feb 17, 2017 7:52:29 AM org.apache.river.start.ServiceStarter checkResultFailure
> s
> WARNING: Exception creating service.
> java.lang.reflect.InvocationTargetException
>          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
> orAccessorImpl.java:57)
>          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
> onstructorAccessorImpl.java:45)
> ...
>
> -----------------------------------------------------------------------
>
> rm -f -r /home/haas/jinitmp/
> echo [Deleting jinitmp directory]
> #
> mkdir /home/haas/jinitmp
> echo [Creating jinitmp directory]
> #
> rh="/projects/builder-group/jpg/apache-river"
> myconfigs="/home/haas/jsutils"
> cd ${rh}/examples/home/src/main/home
> #
> # Start an http server.  Was 4160
> #
> java -jar ${rh}/lib/classserver.jar -port 8080 \
>   -dir lib:${rh}/lib-dl $* \
>> /home/haas/jinitmp/http.out \
> 2>  /home/haas/jinitmp/http.err&
> echo - HTTP Server Running -
> #
> # Activation daemon
> #
> #java -Djava.security.manager= \
> #    -Djava.security.policy=policy/all.policy \
> #    -Djava.rmi.server.codebase="http://$host:8080/phoenix-dl.jar http://$host:8080/jsk-dl.jar" \
> #    -DserverHost=$host \
> #    -jar ${rh}/lib/phoenix.jar  \
> #    configs/jeri/phoenix/phoenix.config
> rmid -J-Djava.security.policy=${rh}/qa/harness/policy/all.policy \
>     -log /home/haas/jinitmp&
> #
> # Start a reggie lookup service.
> #
> java -Djava.security.policy=${rh}/qa/harness/policy/all.policy \
> -Djava.ext.dirs=${rh}/lib-ext:${rh}/lib-dl:${rh}/lib:${rh}/dep-libs/groovy \
>      -jar ${rh}/lib/start.jar ${myconfigs}/start-hello-service.config
> exit
> echo - Lookup Service Running
> #
> # Start the JavaSpace.
> #
> java -Djava.security.policy=policy/all.policy \
>     -jar ${rh}/lib/start.jar \
>      configs/jeri/outrigger/outrigger.config
> echo - JavaSpace Running -
>
>
>