On 17/05/11 11:37, Boivin, Peter wrote:
> Could someone either show me how my code is failing or give me a simple
> ant file that will start a sf-startdaemon and do a sf-deploy?  My code
> and error message is below.
>
> <project>
>      <property environment="env"/>
>      <property name="base" value="${env.SFHOME}"/>
>
>   <property name="smartfrog.dir" value="${base}"/>
>   <property name="smartfrog-tasks-jar"
> value="${smartfrog.dir}/lib/sf-tasks-3.18.010.jar"/>
>
>   <taskdef resource="org/smartfrog/tools/ant/tasks.properties">
>     <classpath>
>       <pathelement location="${smartfrog-tasks-jar}"/>
>     </classpath>
>   </taskdef>
>
> <target name="run-test">
>   <sf-functionaltest shutdowntime="10" testtimeout="600">
>
>    <application>
>     <sf-startdaemon />
>    </application>
>    <probe>
>           <socket port="3800" server="localhost"/>
>    </probe>
>    <teardown>
>     <sf-stopdaemon failonerror="false"/>
>    </teardown>
>    <test>
>     <sf-deploy>
>      <application name="Counter"
> descriptor="/org/smartfrog/examples/counter/example.sf" />
>     </sf-deploy>
>    </test>
>   </sf-functionaltest>
> </target>
>
> </project>
>
>
> run-test:
> [sf-startdaemon] Error occurred during initialization of VM
> [sf-startdaemon] java.lang.InternalError: Could not create
> SecurityManager: org.smartfrog.sfcore.security.ExitTrappingSecurityMana
> ger
> [sf-startdaemon]        at sun.misc.Launcher.<init>(Launcher.java:90)
> [sf-deploy] Error occurred during initialization of VM
> [sf-deploy] java.lang.InternalError: Could not create SecurityManager:
> org.smartfrog.sfcore.security.ExitTrappingSecurityManager
> [sf-startdaemon]        at sun.misc.Launcher.<clinit>(Launcher.java:43)
> [sf-startdaemon]        at
> java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1338)
> [sf-deploy]     at sun.misc.Launcher.<init>(Launcher.java:90)
> [sf-startdaemon]        at
> java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1320)
> [sf-startdaemon]
> [sf-deploy]     at sun.misc.Launcher.<clinit>(Launcher.java:43)
> [sf-deploy]     at
> java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1338)
> [sf-deploy]     at
> java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1320)
> [sf-deploy]
> [sf-stopdaemon] Error occurred during initialization of VM
> [sf-stopdaemon] java.lang.InternalError: Could not create
> SecurityManager: org.smartfrog.sfcore.security.ExitTrappingSecurityManag
> er
> [sf-stopdaemon]         at sun.misc.Launcher.<init>(Launcher.java:90)
> [sf-stopdaemon]         at sun.misc.Launcher.<clinit>(Launcher.java:43)
> [sf-stopdaemon]         at
> java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1338)
> [sf-stopdaemon]         at
> java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1320)
> [sf-stopdaemon]
> [sf-functionaltest] Application
> Exception:C:\iCollaborate\SmartFrogProject\build.xml:25: Failed to start
> the smartfrog daemon

That's interesting. We're trying to install a security manager that 
exists to stop random bits of code calling System.exit() when they feel 
like -these get turned into Throwables that get passed up.

http://jira.smartfrog.org/jira/browse/SFOS-1137
http://jira.smartfrog.org/jira/browse/SFOS-1168

it's something that can be tweaked in the shell scripts as an 
environment variable, though that wont' change ant.

http://jira.smartfrog.org/jira/browse/SFOS-1187


I think what is possibly happening is that the classpath only contains 
the ant tasks jar, and not smartfrog.jar, so the security manager isn't 
there. The sfDaemon task sets up the command line to fork a new JVM, 
with the security manager, and that happens so early in the boot process 
that it's the first sign of failure.

1. Can you do an ant -v of the run, and tell me what you see?

I've created a new JIRA issue, though it's so low-level in the JVM I 
don't see any easy way to handle it
http://jira.smartfrog.org/jira/browse/SFOS-1594

What might be good would be if the sfDaemon doesn't start, the code at 
the bottom of the run doesn't just say "Failed to start...", it includes 
the command line and classpath. That way problems would be easier to 
track down.

-Steve

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Smartfrog-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/smartfrog-users

Reply via email to