Hi, again!

I have checked that you recommended:

1/ check that you have a target/classes dir and that it has suitable .class
files in it. If not then you need to compile your source using ant compile.

That´s right. The directory exists and the .class files, too.

2/ check that the ant target you are using to run the sample (run-classes)
references the target/classes directory on the classpath.

That's right, too. My build.xml is:

============================================================================
=========
<?xml version="1.0" ?>
<project name="InformationService" default="compile">
    <property name="test.class" value="Client.isClient" />
    <property name="test.jar"   value="informationservice.jar" />

    <target name="init">
        <mkdir dir="target/classes"/>
    </target>

    <target name="compile" depends="init">
        <javac srcdir="src/main/java"
               destdir="target/classes"
               debug="on"
               source="1.5"
               target="1.5">
            <classpath>
                <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
            </classpath>
        </javac>
        <copy todir="target/classes">
            <fileset dir="src/main/resources"/>
        </copy>
        <jar destfile="target/${test.jar}" basedir="target/classes">
            <manifest>
                <attribute name="Main-Class" value="${test.class}" />
            </manifest>
        </jar>
    </target>

    <target name="run-classes">
        <java classname="${test.class}"
              fork="true">
            <classpath>
                <pathelement path="target/classes"/>
                <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
            </classpath>
        </java>
    </target>

    <target name="run">
        <java classname="${test.class}"
              fork="true">
            <classpath>
                <pathelement path="target/${test.jar}"/>
                <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
            </classpath>
        </java>
    </target>

    <target name="clean">
        <delete quiet="true" includeemptydirs="true">
            <fileset dir="target"/>
        </delete>
    </target>
</project>

============================================================================
====

And I get: 

Buildfile: build.xml

run-classes:
     [java] Starting ...
     [java] Exception in thread "main" org.osoa.sca.ServiceRuntimeException:
org.osoa.sca.ServiceRuntimeException:
org.apache.tuscany.sca.contribution.service.ContributionResolveException:
java.lang.ClassNotFoundException:
eu.services.information.rh.InformationServiceImpl
     [java]     at
org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.j
ava:264)
     [java]     at
org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:69
)
     [java]     at Client.isClient.main(isClient.java:13)
     [java] Caused by: org.osoa.sca.ServiceRuntimeException:
org.apache.tuscany.sca.contribution.service.ContributionResolveException:
java.lang.ClassNotFoundException:
eu.services.information.rh.InformationServiceImpl
     [java]     at
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCA
Domain.java:127)
     [java]     at
org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.j
ava:230)
     [java]     ... 2 more
     [java] Caused by:
org.apache.tuscany.sca.contribution.service.ContributionResolveException:
java.lang.ClassNotFoundException:
eu.services.information.rh.InformationServiceImpl
     [java]     at
org.apache.tuscany.sca.implementation.java.xml.JavaImplementationProcessor.r
esolve(JavaImplementationProcessor.java:114)
     [java]     at
org.apache.tuscany.sca.implementation.java.xml.JavaImplementationProcessor.r
esolve(JavaImplementationProcessor.java:58)
     [java]     at
org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorEx
tensionPoint$LazyStAXArtifactProcessor.resolve(DefaultStAXArtifactProcessorE
xtensionPoint.java:211)
     [java]     at
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcesso
r.resolve(ExtensibleStAXArtifactProcessor.java:97)
     [java]     at
org.apache.tuscany.sca.assembly.xml.BaseAssemblyProcessor.resolveImplementat
ion(BaseAssemblyProcessor.java:236)
     [java]     at
org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(CompositeProc
essor.java:730)
     [java]     at
org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(CompositeProc
essor.java:71)
     [java]     at
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcesso
r.resolve(ExtensibleStAXArtifactProcessor.java:97)
     [java]     at
org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolve(Compo
siteDocumentProcessor.java:114)
     [java]     at
org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolve(Compo
siteDocumentProcessor.java:45)
     [java]     at
org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor
.resolve(ExtensibleURLArtifactProcessor.java:86)
     [java]     at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.pro
cessResolvePhase(ContributionServiceImpl.java:397)
     [java]     at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.add
Contribution(ContributionServiceImpl.java:327)
     [java]     at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.con
tribute(ContributionServiceImpl.java:152)
     [java]     at
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCA
Domain.java:125)
     [java]     ... 3 more
     [java] Caused by: java.lang.ClassNotFoundException:
eu.services.information.rh.InformationServiceImpl
     [java]     ... 18 more


Thanks,

Ana Belen



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to