I think you need to double the backslashes in the config file if you're
going to use absolute pathnames.  For example ,
    private static policy = "D:\policy.all";
should be 
        private static policy ="D:\\policy.all";

This is because the backslash character is used for escaping in Java
string literals, and the config file implementation duplicates this
behaviour.

Usually people just use relative paths, and 'cd' into the application
directory before starting, but I think absolute paths will work if you
need to do that.

Cheers,

Greg.


On Mon, 2012-01-16 at 03:13, Girbea Alina wrote:
> Hi,
> 
> This is the site from which I haven taken the previous instructions:
> http://www.javacoffeebreak.com/books/extracts/jini/LookupDiscovery.html
> 
> Now I?m trying to start the reggie service as specified in the API 
> of the reggie class 
> (http://river.apache.org/doc/api/com/sun/jini/reggie/package-summary.html#start_transient_jrmp_config).
> I?ve taken the instructions from the section ?Starting Transient 
> Reggie using Jini ERI? and I have used the following command line 
> instruction:
> 
> Unfortunately I get the following error:
> 
> D:\>java -Djava.security.policy=D:\policy.all -jar 
> D:\apache-river-2.2.0-bin\ap
> ache-river-2.2.0\lib\start.jar D:\start-transient-reggie.config
> Jan 16, 2012 10:02:08 AM 
> com.sun.jini.start.NonActivatableServiceDescriptor crea
> te
> SEVERE: classloader.problem
> Jan 16, 2012 10:02:08 AM com.sun.jini.start.ServiceStarter 
> checkResultFailures
> WARNING: Exception creating service.
> java.io.IOException: The filename, directory name, or volume label 
> syntax is inc
> orrect
>         at java.io.WinNTFileSystem.canonicalize0(Native Method)
>         at java.io.Win32FileSystem.canonicalize(Unknown Source)
>         at java.io.File.getCanonicalPath(Unknown Source)
>         at java.io.File.getCanonicalFile(Unknown Source)
>         at 
> com.sun.jini.start.ClassLoaderUtil.getClasspathURLs(ClassLoaderUtil.j
> ava:77)
>         at 
> com.sun.jini.start.ClassLoaderUtil.getImportCodebaseURLs(ClassLoaderU
> til.java:135)
>         at 
> com.sun.jini.start.NonActivatableServiceDescriptor.create(NonActivata
> bleServiceDescriptor.java:598)
>         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 16, 2012 10:02:08 AM com.sun.jini.start.ServiceStarter 
> checkResultFailures
> WARNING: Associated service descriptor [0]: 
> [http://RO1CVPFC.ww300.siemens.net:8
> eggie.jar, com.sun.jini.reggie.TransientRegistrarImpl, [D:      
> ransient-reggie.
> config], com.sun.jini.start.NonActivatableServiceDescriptor$1@c4aad3, 
> BasicProxy
> Preparer[]]
> 
> 
> All files specified in the instructions are in the correct place. This 
> is the content of the file
> ?start-transient-reggie.config?:
> 
> import com.sun.jini.start.ServiceDescriptor;
> import com.sun.jini.start.NonActivatableServiceDescriptor;
> 
> 
> com.sun.jini.start {
> 
>     private static codebase ="http://localhost:8080/reggie-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 NonActivatableServiceDescriptor(
>             codebase, policy, classpath,
>            "com.sun.jini.reggie.TransientRegistrarImpl",
>             new String[] { config })
>     };
> }
> 
> and of the file ?transient-reggie.config?:
> 
> com.sun.jini.reggie {
>    initialMemberGroups = new String[] {};
> }
> 
> In the example explained in the API, it was ?initialMemberGroups = 
> new String[] { "your.group" };?, but I don?t think that this 
> matters.
> 
> Thank you!
> Alina

Reply via email to