Notifications
Clear all

How to fix EPT "ant server-test" failing due to missing class?

1 Posts
1 Users
0 Reactions
1,234 Views
0
Topic starter

In my EPT, I run "ant server-test"
It errors on every class with:

     [echo] USN

setup-tests:

base-server-test:
    [junit] Testsuite: com.onenetwork.usn.allowance.AllowanceServerTest
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
    [junit] 
    [junit]     Caused an ERROR
    [junit] org/aspectj/lang/Signature
    [junit] java.lang.NoClassDefFoundError: org/aspectj/lang/Signature
    [junit]     at org.apache.cactus.internal.AbstractCactusTestCase.<clinit>(AbstractCactusTestCase.java:53)
    [junit]     at java.lang.Class.forName0(Native Method)
    [junit]     at java.lang.Class.forName(Class.java:264)
    [junit] Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.Signature
    [junit]     at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    [junit]     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    [junit]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    [junit]     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    [junit] 
    [junit] TEST com.onenetwork.usn.allowance.AllowanceServerTest FAILED

This class is external to ONE code, org/aspectj/lang/Signature

How can I fix this error.

1 Answer
0
Topic starter

Open your EPT's build.xml

The fileset definition needs to be added to:

    <path id="compile.class.path">
        <pathelement path="${platform-api.jar.dir}" />
    <!--<fileset dir="${studio.plugin.home}" includes="*.jar" excludes="dvce.jar,dvce-web.jar,one-web.jar,distance-server.jar,edge.jar,integ-client.jar,integ.jar,ixm.jar,one-util.jar" />-->
    <fileset dir="${studio.plugin.home}" includes="OBOE.jar,json.jar,cactus.jar,spring-core.jar,spring-tx.jar,jsr311.jar,spring-context.jar,log*.jar" />
    <path path="${deploy.app.jar.dir}" />
  </path>

Add entries to match the missing jar from Workspace root: studiouildstudioeclipsepluginscom.onenetwork.platform.sdk_1.0.0

Then retry ant server-test. Repeat until no more errors.

I added ,aspectj*.jar,commons-*.jar to solve this.

Result

    <path id="compile.class.path">
        <pathelement path="${platform-api.jar.dir}" />
    <!--<fileset dir="${studio.plugin.home}" includes="*.jar" excludes="dvce.jar,dvce-web.jar,one-web.jar,distance-server.jar,edge.jar,integ-client.jar,integ.jar,ixm.jar,one-util.jar" />-->
    <fileset dir="${studio.plugin.home}" includes="OBOE.jar,json.jar,cactus.jar,spring-core.jar,spring-tx.jar,jsr311.jar,spring-context.jar,log*.jar,aspectj*.jar,commons-*.jar" />
    <path path="${deploy.app.jar.dir}" />
  </path>