Make that:
<clients>
<logs>%(geronimo-terracotta.home)/client-logs</logs>
<modules>
<repository>file:/%(geronimo.repo.dir)/org/terracotta/modules</repository>
</modules>
</clients>
----- Original Message -----
*From:* Gary Keim <mailto:[EMAIL PROTECTED]>
*To:* [email protected] <mailto:[email protected]>
*Sent:* Friday, September 28, 2007 5:21 PM
*Subject:* Re: [tc-dev] BootJarFile throwing exception and need some
pointers
Presumably under repoDir exists org/terracotta/modules. You need to
have:
<clients>
<logs>%(geronimo-terracotta.home)/client-logs</logs>
<modules>
<repository>%(geronimo.repo.dir)/org/terracotta/modules</repository>
</modules>
</clients>
The Knopflerfish framework was failing to be created and a message
to that effect is probably in the log at
>%(geronimo-terracotta.home)/client-logs.
----- Original Message -----
*From:* Jeff Genender <mailto:[EMAIL PROTECTED]>
*To:* [email protected]
<mailto:[email protected]>
*Sent:* Friday, September 28, 2007 4:42 PM
*Subject:* [tc-dev] BootJarFile throwing exception and need some
pointers
Hi,
I am getting further on the client side of the Geronimo plugin.
We now do our rc.d files with groovy. One of the things I am
trying to do, is the first time the Geronimo server is run with
Terracotta(TC) client, I want to check for the boot jar and if
it doesn't exist, create it before launching Geronimo. So I
have the following script:
def installRoot = new File(command.geronimoHome, 'var/terracotta')
def bootJar = new File(installRoot, 'var/terracotta/boot.jar')
if (!bootJar.exists()){
def ant = new AntBuilder()
def repoDir = new File(command.geronimoHome, 'repository')
def tcConfig = new File(installRoot, 'tc-config-geronimo.xml')
ant.java(classname: 'com.tc.object.tools.BootJarTool') {
classpath {
pathelement(location: new File(repoDir,
'org/terracotta/terracotta/2.5-SNAPSHOT/terracotta-2.5-SNAPSHOT.jar'))
pathelement(location: new File(repoDir,
'commons-cli/commons-cli/1.0/commons-cli-1.0.jar'))
pathelement(location: new File(repoDir,
'commons-io/commons-io/1.2/commons-io-1.2.jar'))
pathelement(location: new File(repoDir,
'commons-lang/commons-lang/2.2/commons-lang-2.2.jar'))
pathelement(location: new File(repoDir,
'org/apache/xmlbeans/xmlbeans/2.3.0/xmlbeans-2.3.0.jar'))
pathelement(location: new File(repoDir,
'log4j/log4j/1.2.14/log4j-1.2.14.jar'))
pathelement(location: new File(repoDir,
'concurrent/concurrent/1.3.4/concurrent-1.3.4.jar'))
pathelement(location: new File(repoDir,
'org/terracotta/tcconfig2/2.0/tcconfig2-2.0.jar'))
pathelement(location: new File(repoDir,
'org/terracotta/tcconfig1/1.0/tcconfig1-1.0.jar'))
pathelement(location: new File(repoDir,
'org/terracotta/tcconfig/2.5-SNAPSHOT/tcconfig-2.5-SNAPSHOT.jar'))
pathelement(location: new File(repoDir,
'stax/stax-api/1.0.1/stax-api-1.0.1.jar'))
pathelement(location: new File(repoDir,
'trove/trove/1.1-beta-5/trove-1.1-beta-5.jar'))
pathelement(location: new File(repoDir,
'knopflerfish-tc/knopflerfish-tc/2.0.1/knopflerfish-tc-2.0.1.jar'))
}
arg(value: '-v')
arg(value: '-o')
arg(value: bootJar)
arg(value: '-f')
arg(value: tcConfig)
sysproperty(key:"geronimo-terracotta.home", value:tcConfig)
}
}
But when I run it, I am getting a NullPointerException at
com.tc.plugins.ModulesLoader.shutdown(ModulesLoader.java:122).
It appears the osgiRuntime is null.
The verbose output is below. Any incite on how to fix this and
get the boot.jar to spit out would be great! Thanks.
2007-09-28 17:33:23,105 INFO - Terracotta trunk-nightly-rev5385,
as of 20070901-180917 (Revision 5385 by [EMAIL PROTECTED] from trunk)
2007-09-28 17:33:23,297 INFO - Attempting to load configuration
from the file at
'/Users/jeffgenender/Projects/geronimo/assemblies/geronimo-tomcat6-javaee5/target/geronimo-tomcat6-javaee5-2.1-SNAPSHOT/var/terracotta/tc-config-geronimo.xml'...
2007-09-28 17:33:23,298 INFO - Successfully loaded configuration
from the file at
'/Users/jeffgenender/Projects/geronimo/assemblies/geronimo-tomcat6-javaee5/target/geronimo-tomcat6-javaee5-2.1-SNAPSHOT/var/terracotta/tc-config-geronimo.xml'.
Config is:
<?xml version="1.0" encoding="UTF-8"?>
<!--
All content copyright (c) 2003-2007 Terracotta, Inc.,
except as may otherwise be noted in a separate copyright notice.
All rights reserved.
-->
<!-- This is a Terracotta configuration file that has been
pre-configured
for use with Tomcat.
For more information, please see the product documentation.
-->
<tc:tc-config xmlns:tc="http://www.terracotta.org/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-4.xsd">
<!-- Tell DSO where the Terracotta server can be found -->
<servers>
<server host="localhost">
<data>%(geronimo-terracotta.home)/server-data</data>
<logs>%(geronimo-terracotta.home)/server-logs</logs>
</server>
</servers>
<!-- Tell DSO where to put the generated client logs -->
<clients>
<logs>%(geronimo-terracotta.home)/client-logs</logs>
</clients>
<application>
<dso>
<!-- The following declarations tells DSO which classes
should be instrumented to
allow sharing. When the app runs under DSO, shared
instances of these classes will
broadcast changes in their state.
A good idiom when writing an app that you intend to
cluster via TC DSO is to group the
classes you wish to share under a single package (although
if you follow the MVC pattern
this tends to happen naturally) - this way the list of
classes you wish to instrument
can be concise -->
<instrumented-classes>
<!-- Start by including all classes for instrumentation.
It's more efficient to instrument only those classes that
hold shared roots or are part of a shared root's graph -->
<include>
<class-_expression_>*..*</class-_expression_>
</include>
<!-- Exclude tomcat internals to improve performance of
webapp loading -->
<exclude>org.apache.coyote..*</exclude>
<exclude>org.apache.catalina..*</exclude>
<exclude>org.apache.jasper..*</exclude>
<exclude>org.apache.tomcat..*</exclude>
</instrumented-classes>
<!-- Declare which web application context names should
use DSO sessions -->
<web-applications>
<web-application>MyWebApp</web-application>
</web-applications>
</dso>
</application>
</tc:tc-config>
2007-09-28 17:33:23,445 INFO - Configuration loaded from the
file at
'/Users/jeffgenender/Projects/geronimo/assemblies/geronimo-tomcat6-javaee5/target/geronimo-tomcat6-javaee5-2.1-SNAPSHOT/var/terracotta/tc-config-geronimo.xml'.
[java] java.lang.NullPointerException
[java] at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194)
[java] at
org.apache.tools.ant.taskdefs.Java.run(Java.java:747)
[java] at
org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:201)
[java] at
org.apache.tools.ant.taskdefs.Java.execute(Java.java:104)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at
groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:171)
[java] at
groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:154)
[java] at
groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:132)
[java] at
groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:65)
[java] at
org.codehaus.groovy.runtime.Invoker.invokePogoMethod(Invoker.java:119)
[java] at
org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:81)
[java] at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:85)
[java] at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:158)
[java] at Script2.run(Script2.groovy:7)
[java] at
groovy.lang.GroovyShell.evaluate(GroovyShell.java:455)
[java] at
groovy.lang.GroovyShell.evaluate(GroovyShell.java:442)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at
org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:52)
[java] at
org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:714)
[java] at
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:583)
[java] at
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:476)
[java] at
org.codehaus.groovy.runtime.Invoker.invokePogoMethod(Invoker.java:115)
[java] at
org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:81)
[java] at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:85)
[java] at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:158)
[java] at
org.apache.geronimo.commands.StartServerCommand.processScripts(StartServerCommand.groovy:296)
[java] at
org.apache.geronimo.commands.StartServerCommand.this$3$processScripts(StartServerCommand.groovy)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at
org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:52)
[java] at
org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:714)
[java] at
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:583)
[java] at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:66)
[java] at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrent0(ScriptBytecodeAdapter.java:99)
[java] at
org.apache.geronimo.commands.StartServerCommand.doExecute(StartServerCommand.groovy:169)
[java] at
org.apache.geronimo.gshell.command.CommandSupport.execute(CommandSupport.java:83)
[java] at
org.apache.geronimo.gshell.DefaultCommandExecutor.execute(DefaultCommandExecutor.java:144)
[java] at
org.apache.geronimo.gshell.ExecutingVisitor.visit(ExecutingVisitor.java:96)
[java] at
org.apache.geronimo.gshell.parser.ASTExpression.jjtAccept(ASTExpression.java:17)
[java] at
org.apache.geronimo.gshell.parser.SimpleNode.childrenAccept(SimpleNode.java:57)
[java] at
org.apache.geronimo.gshell.ExecutingVisitor.visit(ExecutingVisitor.java:79)
[java] at
org.apache.geronimo.gshell.parser.ASTCommandLine.jjtAccept(ASTCommandLine.java:17)
[java] at
org.apache.geronimo.gshell.CommandLineBuilder$1.execute(CommandLineBuilder.java:89)
[java] at
org.apache.geronimo.gshell.DefaultCommandExecutor.execute(DefaultCommandExecutor.java:72)
[java] at
org.apache.geronimo.gshell.DefaultShell.execute(DefaultShell.java:109)
[java] at
org.apache.geronimo.gshell.GShell.execute(GShell.java:134)
[java] at
org.apache.geronimo.gshell.cli.Main.boot(Main.java:240)
[java] at
org.apache.geronimo.gshell.cli.Main.main(Main.java:260)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
[java] at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[java] at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
[java] at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
[java] at
org.apache.geronimo.gshell.bootstrap.Launcher.main(Launcher.java:59)
* [java] Caused by: java.lang.NullPointerException
[java] at
com.tc.plugins.ModulesLoader.shutdown(ModulesLoader.java:122)
[java] at
com.tc.plugins.ModulesLoader.initModules(ModulesLoader.java:109)
[java] at
com.tc.object.tools.BootJarTool.<init>(BootJarTool.java:202)
[java] at
com.tc.object.tools.BootJarTool.main(BootJarTool.java:2291)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at
org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
[java] at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
[java] ... 66 more
* [java] --- Nested Exception ---
[java] java.lang.NullPointerException
[java] at
com.tc.plugins.ModulesLoader.shutdown(ModulesLoader.java:122)
[java] at
com.tc.plugins.ModulesLoader.initModules(ModulesLoader.java:109)
[java] at
com.tc.object.tools.BootJarTool.<init>(BootJarTool.java:202)
[java] at
com.tc.object.tools.BootJarTool.main(BootJarTool.java:2291)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at
org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
[java] at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
[java] at
org.apache.tools.ant.taskdefs.Java.run(Java.java:747)
[java] at
org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:201)
[java] at
org.apache.tools.ant.taskdefs.Java.execute(Java.java:104)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at
groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:171)
[java] at
groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:154)
[java] at
groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:132)
[java] at
groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:65)
[java] at
org.codehaus.groovy.runtime.Invoker.invokePogoMethod(Invoker.java:119)
[java] at
org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:81)
[java] at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:85)
[java] at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:158)
[java] at Script2.run(Script2.groovy:7)
[java] at
groovy.lang.GroovyShell.evaluate(GroovyShell.java:455)
[java] at
groovy.lang.GroovyShell.evaluate(GroovyShell.java:442)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at
org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:52)
[java] at
org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:714)
[java] at
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:583)
[java] at
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:476)
[java] at
org.codehaus.groovy.runtime.Invoker.invokePogoMethod(Invoker.java:115)
[java] at
org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:81)
[java] at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:85)
[java] at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:158)
[java] at
org.apache.geronimo.commands.StartServerCommand.processScripts(StartServerCommand.groovy:296)
[java] at
org.apache.geronimo.commands.StartServerCommand.this$3$processScripts(StartServerCommand.groovy)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at
org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:52)
[java] at
org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:714)
[java] at
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:583)
[java] at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:66)
[java] at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrent0(ScriptBytecodeAdapter.java:99)
[java] at
org.apache.geronimo.commands.StartServerCommand.doExecute(StartServerCommand.groovy:169)
[java] at
org.apache.geronimo.gshell.command.CommandSupport.execute(CommandSupport.java:83)
[java] at
org.apache.geronimo.gshell.DefaultCommandExecutor.execute(DefaultCommandExecutor.java:144)
[java] at
org.apache.geronimo.gshell.ExecutingVisitor.visit(ExecutingVisitor.java:96)
[java] at
org.apache.geronimo.gshell.parser.ASTExpression.jjtAccept(ASTExpression.java:17)
[java] at
org.apache.geronimo.gshell.parser.SimpleNode.childrenAccept(SimpleNode.java:57)
[java] at
org.apache.geronimo.gshell.ExecutingVisitor.visit(ExecutingVisitor.java:79)
[java] at
org.apache.geronimo.gshell.parser.ASTCommandLine.jjtAccept(ASTCommandLine.java:17)
[java] at
org.apache.geronimo.gshell.CommandLineBuilder$1.execute(CommandLineBuilder.java:89)
[java] at
org.apache.geronimo.gshell.DefaultCommandExecutor.execute(DefaultCommandExecutor.java:72)
[java] at
org.apache.geronimo.gshell.DefaultShell.execute(DefaultShell.java:109)
[java] at
org.apache.geronimo.gshell.GShell.execute(GShell.java:134)
[java] at
org.apache.geronimo.gshell.cli.Main.boot(Main.java:240)
[java] at
org.apache.geronimo.gshell.cli.Main.main(Main.java:260)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
[java] at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[java] at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
[java] at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
[java] at
org.apache.geronimo.gshell.bootstrap.Launcher.main(Launcher.java:59)
---------------------------------------------------
------------------------------------------------------------------------
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev
------------------------------------------------------------------------
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev
------------------------------------------------------------------------
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev