I am getting a NoClassDefFoundError when running the clustered-ehcache
tests with Maven. The NoClassDefFoundError originates from some
XMLBeans generated class, and since I am far from being an XMLBeans
expert, I'm hoping someone can help me figure this one out.
Here is the error:
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.013
sec <<< FAILURE!
test(com.tctest.CacheEvictor130Test) Time elapsed: 0.001 sec <<<
ERROR!
java.lang.NoClassDefFoundError
» at
com.tc.config.schema.setup.TestTVSConfigurationSetupManagerFactory.<init>(TestTVSConfigurationSetupManagerFactory.java:163)
» at
com.tc.object.BaseDSOTestCase.createDistributedConfigFactory(BaseDSOTestCase.java:54)
» at
com.tc.object.BaseDSOTestCase.configFactory(BaseDSOTestCase.java:47)
» at
com.tctest.TransparentTestBase.setUp(TransparentTestBase.java:112)
» at junit.framework.TestCase.runBare(TestCase.java:125)
» at com.tc.test.TCTestCase.runBare(TCTestCase.java:158)
» at com.tc.object.BaseDSOTestCase.runBare(BaseDSOTestCase.java:37)
The origin of the exception is line 163 of
TestTVSConfigurationSetupManagerFactory, which is this:
private Enum persistenceMode = PersistenceMode.TEMPORARY_SWAP_ONLY;
When I comment out the initializer, I do not get the exception, so it
must be something to do with the PersistenceMode.TEMPORARY_SWAP_ONLY
part.
I have verified that the classpath contains the requisite JAR file
(which in this case is tcconfig-2.5-SNAPSHOT.jar). Furthermore, javap
indicates that the class file for PersistenceMode does indeed have a
TEMPORARY_SWAP_ONLY static field of type PersistenceMode.Enum (see
attached for javap output).
What is especially strange is that all of the tests were running and
passing a couple of days ago, and I can't see anything that has changed
since then as being relevant.
Does anyone have any ideas?
--
Jason Voegele
A computer scientist is someone who fixes things that aren't broken.
Compiled from "PersistenceMode.java"
public interface com.terracottatech.config.PersistenceMode extends
org.apache.xmlbeans.XmlToken{
public static final org.apache.xmlbeans.SchemaType type;
public static final com.terracottatech.config.PersistenceMode$Enum
TEMPORARY_SWAP_ONLY;
public static final com.terracottatech.config.PersistenceMode$Enum
PERMANENT_STORE;
public static final int INT_TEMPORARY_SWAP_ONLY;
public static final int INT_PERMANENT_STORE;
public abstract org.apache.xmlbeans.StringEnumAbstractBase enumValue();
public abstract void set(org.apache.xmlbeans.StringEnumAbstractBase);
static {};
Code:
0: getstatic #1; //Field
com/terracottatech/config/PersistenceMode$1.class$com$terracottatech$config$PersistenceMode:Ljava/lang/Class;
3: ifnonnull 18
6: ldc #2; //String com.terracottatech.config.PersistenceMode
8: invokestatic #3; //Method
com/terracottatech/config/PersistenceMode$1.class$:(Ljava/lang/String;)Ljava/lang/Class;
11: dup
12: putstatic #1; //Field
com/terracottatech/config/PersistenceMode$1.class$com$terracottatech$config$PersistenceMode:Ljava/lang/Class;
15: goto 21
18: getstatic #1; //Field
com/terracottatech/config/PersistenceMode$1.class$com$terracottatech$config$PersistenceMode:Ljava/lang/Class;
21: invokevirtual #4; //Method
java/lang/Class.getClassLoader:()Ljava/lang/ClassLoader;
24: ldc #5; //String
schemaorg_apache_xmlbeans.system.s860B3FFF35D1DDE96A0E0609B3F910DE
26: invokestatic #6; //Method
org/apache/xmlbeans/XmlBeans.typeSystemForClassLoader:(Ljava/lang/ClassLoader;Ljava/lang/String;)Lorg/apache/xmlbeans/SchemaTypeSystem;
29: ldc #7; //String persistencemode7093type
31: invokeinterface #8, 2; //InterfaceMethod
org/apache/xmlbeans/SchemaTypeSystem.resolveHandle:(Ljava/lang/String;)Lorg/apache/xmlbeans/SchemaComponent;
36: checkcast #9; //class org/apache/xmlbeans/SchemaType
39: putstatic #10; //Field type:Lorg/apache/xmlbeans/SchemaType;
42: ldc #11; //String temporary-swap-only
44: invokestatic #12; //Method
com/terracottatech/config/PersistenceMode$Enum.forString:(Ljava/lang/String;)Lcom/terracottatech/config/PersistenceMode$Enum;
47: putstatic #13; //Field
TEMPORARY_SWAP_ONLY:Lcom/terracottatech/config/PersistenceMode$Enum;
50: ldc #14; //String permanent-store
52: invokestatic #12; //Method
com/terracottatech/config/PersistenceMode$Enum.forString:(Ljava/lang/String;)Lcom/terracottatech/config/PersistenceMode$Enum;
55: putstatic #15; //Field
PERMANENT_STORE:Lcom/terracottatech/config/PersistenceMode$Enum;
58: return
}
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev