Re: problem with remote class loading

Steve Loughran <[email protected]>
Newsgroups gmane.comp.java.smartfrog.user
Message-ID <[email protected]>
Andreas Unterkircher wrote:
> Hello,
> 
> I'm using SmartFrog 3.06.0011rc1 under Linux. There is a problem with 
> remote class loading. I'd like to load 2 classes remotely, thus 
> setSFDynamicClassLoadingProperties looks as follows:
> 
> export SERVER=http://grid-deployment.web.cern.ch
> export 
> CODEBASE="$SERVER/grid-deployment/distribution/RpmBuild/ia64-sl3-Andreas/downloadConf/smartfrog/sfLCGinstall.jar 
> $SERVER/grid-deployment/distribution/RpmBuild/ia64-sl3-Andreas/downloadConf/smartfrog/commons-io-1.0.jar"
>                                                                                 
> export SFCODEBASE=-Dorg.smartfrog.codebase="$CODEBASE"
> 
> But sfDaemon yields:
> 
> 
>>sfDaemon java 
> 
> -Dorg.smartfrog.iniFile=/opt/SmartFrog.3.06.011rc1/dist/bin/default.ini 
> -Dorg.smartfrog.sfcore.processcompound.sfDefault.sfDefault=/opt/SmartFrog.3.06.011rc1/dist/bin/default.sf 
> -Dorg.smartfrog.codebase=http://grid-deployment.web.cern.ch/grid-deployment/distribution/RpmBuild/ia64-sl3-Andreas/downloadConf/smartfrog/sfLCGinstall.jar 
> http://grid-deployment.web.cern.ch/grid-deployment/distribution/RpmBuild/ia64-sl3-Andreas/downloadConf/smartfrog/commons-io-1.0.jar 
> -Dorg.smartfrog.sfcore.processcompound.sfProcessName=rootProcess 
> org.smartfrog.SFSystem
> java.lang.NoClassDefFoundError: 
> http://grid-deployment/web/cern/ch/grid-deployment/distribution/RpmBuild/ia64-sl3-Andreas/downloadConf/smartfrog/commons-io-1/0/jar
> 
> Note how in the second URL to the jar the "." got transformed into "/". I 
> tried to place escapes in various ways but never succeeded. Also, just 
> loading one jar works fine. Clould you test on your Linux machine if 
> multiple classloading works ? I'm not sure whether the error stems from 
> the shell script level or if it has to do with the way some SF java class 
> reads the options.

This is something we have to test more.

1. I think in the past there was trouble with multi-JAR loading

2. I had dynamic classloading working on my laptop until 24 hours before 
a public demo of smartfrog, then a forced reboot and it never came back.

because of (2) I am not sure that dynamic loading is working properly.

At the same time, the error message NoClassDefFound implies that java is 
trying to load the class commons-io-1/0/jar, and that it is the Java 
runtime that is doing the package to resource directory mapping. This 
would be the case if the $SFCODEBASE env variable wasnt being enclosed 
in quotes properly, and so the jvm is trying to run commons-io rather 
than sfSystem as the entry point.

Looks to me like a quoting bug in sfDaemon.

-steve


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.