hi,
  I am writing a helloworld sample for sca groovy service, but encountered
a problem here:

    java.lang.NoClassDefFoundError: groovy/lang/GroovyObject
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java
:124)
   at groovy.lang.GroovyClassLoader.access$300(GroovyClassLoader.java:92)
   at groovy.lang.GroovyClassLoader$ClassCollector.createClass(
GroovyClassLoader.java:457)
   at groovy.lang.GroovyClassLoader$ClassCollector.onClassNode(
GroovyClassLoader.java:475)
   at groovy.lang.GroovyClassLoader$ClassCollector.call(
GroovyClassLoader.java:479)
   at org.codehaus.groovy.control.CompilationUnit$9.call(
CompilationUnit.java:757)
   at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(
CompilationUnit.java:947)
   at org.codehaus.groovy.control.CompilationUnit.compile(
CompilationUnit.java:478)
   at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:306)
   at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:275)
   at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:270)
   at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:242)
   at org.apache.tuscany.container.groovy.GroovyComponentBuilder.build(
GroovyComponentBuilder.java:80)
   at org.apache.tuscany.core.builder.BuilderRegistryImpl.build(
BuilderRegistryImpl.java:106)
   at
org.apache.tuscany.core.implementation.composite.CompositeBuilder.build(
CompositeBuilder.java:56)
   at org.apache.tuscany.core.builder.BuilderRegistryImpl.build(
BuilderRegistryImpl.java:106)
   at org.apache.tuscany.core.deployer.DeployerImpl.build(DeployerImpl.java
:142)
   at org.apache.tuscany.core.deployer.DeployerImpl.deploy(
DeployerImpl.java:97)
   at org.apache.tuscany.core.launcher.LauncherImpl.bootApplication(
LauncherImpl.java:215)
   at org.apache.tuscany.test.SCATestCase.setUp(SCATestCase.java:88)
   at test.tuscany.groovy.HelloWorldTest.setUp(HelloWorldTest.java:35)
   at junit.framework.TestCase.runBare(TestCase.java:125)
   at junit.framework.TestResult$1.protect(TestResult.java:106)
   at junit.framework.TestResult.runProtected(TestResult.java:124)
   at junit.framework.TestResult.run(TestResult.java:109)
   at junit.framework.TestCase.run(TestCase.java:118)
   at junit.framework.TestSuite.runTest(TestSuite.java:208)
   at junit.framework.TestSuite.run(TestSuite.java:203)
   at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(
JUnit3TestReference.java:128)
   at org.eclipse.jdt.internal.junit.runner.TestExecution.run(
TestExecution.java:38)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
RemoteTestRunner.java:460)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
RemoteTestRunner.java:673)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
RemoteTestRunner.java:386)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
RemoteTestRunner.java:196)

 I gave an investigation on this issue, What I found is,
GroovyClassLoader's parent class loader is Null (pls see in
GroovyComponentBuilder.java) , in addition, the parent classloader for
GroovyClassLoader is obtained from DeploymentContext,  actually this
DeploymentContext will always be constructed without specify a classloader.
(pls see line 90 in DeployerImpl.java).

 Does anybody can tell me that this problem is caused by usage error or
product issue?
--
Thanks & Best Wishes
-----------------------------------
[EMAIL PROTECTED]

Reply via email to