Re: javaspace error - transaction
John McClain <[email protected]> Wed, 25 Mar 2009 16:07:03 -0400
| Newsgroups | gmane.comp.java.sun.javaspaces |
|---|---|
| Message-ID | <[email protected]> |
harikriii wrote:
> hi..
>
> The command line I used is as follows..
>
> java -cp
> "c:\ProgramFiles\jini2_1\lib\reggie.jar";"c:\ProgramFiles\jini2_1\lib\o=
utrigger.jar";"c:\ProgramFiles\jini2_1\lib\reggie.jar";"c:\ProgramFiles\j=
ini2_1\lib\jini-core.jar";"c:\ProgramFiles\jini2_1\lib\jini-ext.jar";"c:\=
ProgramFiles\jini2_1\lib\mahalo.jar";
> myxml
>
> //myxml.java is filename
> =20
I assume this is the command line you are using to start your client?=20
You really shouldn't have reggie.jar, outrigger.jar, and mahalo.jar in=20
the client's classpath. You can use jini-core.jar and jini-ext.jar, but=20
with 2.1 the idea is to use jsk-platform.jar. This proably also explains=20
why you aren't using the preferred classloader - if you switch to using=20
jsk-platform.jar then you should get the preferred classloader by default.
What command line are you using to start outrigger/mahalo/reggie/etc.
> I do'nt know on what codebase the mahalo is running. My configuration f=
iles
> are as follows: =20
>
>
> startAll.config
> =20
> import com.sun.jini.start.NonActivatableServiceDescriptor;
> import com.sun.jini.start.ServiceDescriptor;
> import com.sun.jini.config.ConfigUtil;
>
> com.sun.jini.start {
> private static policy =3D "C:\\Program
> Files\\jini2_1\\installverify\\support\\jsk-all.policy";
> private static host =3D ConfigUtil.getHostName();
> private static port =3D "8081";
> private static jskdl =3D " http://" + host + ":" + port + "/jsk-dl.=
jar";
>
> serviceDescriptors =3D new ServiceDescriptor[]{
> new NonActivatableServiceDescriptor(
> "",
> policy,
> "C:\\Program Files\\jini2_1\\lib\\classserver.jar",
> "com.sun.jini.tool.ClassServer",
> new String[]{"-port", port, "-dir",=20
> "C:\\Program Files\\jini2_1\\lib-dl",=20
> "-verbose"}),
>
> new NonActivatableServiceDescriptor(
> "http://" + host + ":" + port + "/browser-dl.jar" + jskdl,
> policy,
> "C:\\Program Files\\jini2_1\\lib\\browser.jar",
> "com.sun.jini.example.browser.Browser",
> new String[] { "C:\\Program
> Files\\jini2_1\\installverify\\support\\browser.config" }),
>
> new NonActivatableServiceDescriptor(
> "http://" + host + ":" + port + "/reggie-dl.jar" + jskdl,
> policy,
> "C:\\Program Files\\jini2_1\\lib\\reggie.jar",
> "com.sun.jini.reggie.TransientRegistrarImpl",
> new String[] { "C:\\Program
> Files\\jini2_1\\installverify\\support\\reggie.config" }),
>
> new NonActivatableServiceDescriptor(
> "http://" + host + ":" + port + "/fiddler-dl.jar" + jskdl,
> policy,
> "C:\\Program Files\\jini2_1\\lib\\fiddler.jar",
> "com.sun.jini.fiddler.TransientFiddlerImpl",
> new String[] { "C:\\Program
> Files\\jini2_1\\installverify\\support\\fiddler.config" }),
>
> new NonActivatableServiceDescriptor(
> "http://" + host + ":" + port + "/mahalo-dl.jar" + jskdl,
> policy,
> "C:\\Program Files\\jini2_1\\lib\\mahalo.jar",
> "com.sun.jini.mahalo.TransientMahaloImpl",
> new String[] { "C:\\Program
> Files\\jini2_1\\installverify\\support\\mahalo.config" }),
>
> new NonActivatableServiceDescriptor(
> "http://" + host + ":" + port + "/mercury-dl.jar" + jskdl,
> policy,
> "C:\\Program Files\\jini2_1\\lib\\mercury.jar",
> "com.sun.jini.mercury.TransientMercuryImpl",
> new String[] { "C:\\Program
> Files\\jini2_1\\installverify\\support\\mercury.config" }),
>
> new NonActivatableServiceDescriptor(
> "http://" + host + ":" + port + "/norm-dl.jar" + jskdl,
> policy,
> "C:\\Program Files\\jini2_1\\lib\\norm.jar",
> "com.sun.jini.norm.TransientNormServerImpl",
> new String[] { "C:\\Program
> Files\\jini2_1\\installverify\\support\\norm.config" }),
>
> new NonActivatableServiceDescriptor(
> "http://" + host + ":" + port + "/outrigger-dl.jar" + jskdl=
,
> policy,
> "C:\\Program Files\\jini2_1\\lib\\outrigger.jar",
> "com.sun.jini.outrigger.TransientOutriggerImpl",
> new String[] { "C:\\Program
> Files\\jini2_1\\installverify\\support\\outrigger.config" })
> };
> }
>
>
> Mahalo.config
>
>
> com.sun.jini.mahalo {
> initialLookupGroups =3D new String[] { System.getProperty("user.nam=
e") +
> "InstallVerifyGroup" };
> }
>
>
> Outrigger.config
>
> com.sun.jini.outrigger {
> initialLookupGroups =3D new String[] { System.getProperty("user.nam=
e") +
> "InstallVerifyGroup" };
> }
>
>
> Is this information enough=85.?
>
> I guess the mahalo=92s codebase is =91http://192.168.38.202:1408/mahal=
o.jar=92
> (looking at startAll.config-I felt like that..). So I tried on command
> prompt the below things too.
> =20
The above configuration files should be setting a reasonable codebase=20
for Mahalo (as well as the rest of the services). Assuming the local=20
host is 192.168.38.202, mahalo codebase will be something like=20
"http://192.168.38.202:8081/mahalo-dl.jar=20
http://192.168.38.202:8081/jsk-dl.jar".
> java =96Djava.rmi.server.codebase=3D =93http://192.168.38.202:1408/maha=
lo.jar
> http://192.168.38.202:1408 /reggie.jar =20
> http://192.168.38.202:1408/ouutrigger.jar myxml
>
>
> But still errors=85=09
>
> =20
If myxml is your client, setting the client vm's=20
java.rmi.server.codebase property will have no effect on Mahalo's codebas=
e.
> =20
>>> =93if you have jsk-platform.jar in your client's classpath and
>>> =20
> jsk-resources.jar is in the *'right place' relative to jsk-platfor=
m.jar
> then you should be using PreferredClassLoader=94
>
> What u meant by =91right place=92*?
> I did=92nt get u?..
> =20
jsk-resources.jar needs to be in the same directory as jsk-platform.jar.=20
You might want to read=20
jini2_1/doc/release-notes/index.html#platform_jars for more details.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
To unsubscribe, send email to [email protected] and include in the bo=
dy
of the message "signoff JAVASPACES-USERS". For general help, send email =
to
[email protected] and include in the body of the message "help".
To view past JAVASPACES-USERS postings, please see:
http://archives.java.sun.com/archives/javaspaces-users.html