AnsweredAssumed Answered

How to deal with ServiceRegistry

Question asked by robobot on Dec 14, 2009
Latest reply on Dec 16, 2009 by robobot
i can't help myself. I dont have any glue how i can use the alfresco services. also i could not get a hint from similar topics :-(
when i try to run simple example i get the followig error:

package org.alfresco.sample.jcr;
import org.alfresco.service.ServiceRegistry;
public class SimpleExample

    public static void main(String[] args) throws Exception
        ServiceRegistry registry = (ServiceRegistry )java.rmi.Naming.lookup("ServiceRegistry");

Exception in thread "main" java.rmi.ConnectException: Connection refused to host:; nested exception is: Connection refused: connect
   at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
   at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
   at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
   at sun.rmi.server.UnicastRef.newCall(Unknown Source)
   at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
   at java.rmi.Naming.lookup(Unknown Source)
   at org.alfresco.sample.jcr.SimpleExample.main(
Caused by: Connection refused: connect
   at Method)
   at Source)
   at Source)
   at Source)
   at Source)
   at Source)
   at Source)
   at<init>(Unknown Source)
   at<init>(Unknown Source)
   at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
   at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
   … 7 more

is there a step by step guide available ? i rember that i spent a lots of time in the past to get the spring services work :-/

please help, santa claus will thank you.