我想使用WicketTester。但是第一行已经引发了一个例外:
WicketTester tester = new WicketTester();
例外是:
java.lang.IncompatibleClassChangeError: class net.sf.cglib.core.DebuggingClassWriter has interface org.objectweb.asm.ClassVisitor as super class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at net.sf.cglib.core.DefaultGeneratorStrategy.getClassVisitor(DefaultGeneratorStrategy.java:30)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:24)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:144)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:116)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
at org.apache.wicket.jmx.Initializer.createProxy(Initializer.java:256)
at org.apache.wicket.jmx.Initializer.register(Initializer.java:249)
at org.apache.wicket.jmx.Initializer.init(Initializer.java:192)
at org.apache.wicket.Application.initInitializers(Application.java:741)
at org.apache.wicket.Application.initializeComponents(Application.java:643)
at org.apache.wicket.Application.initApplication(Application.java:949)
at org.apache.wicket.util.tester.BaseWicketTester.<init>(BaseWicketTester.java:336)
at org.apache.wicket.util.tester.BaseWicketTester.<init>(BaseWicketTester.java:266)
at org.apache.wicket.util.tester.BaseWicketTester.<init>(BaseWicketTester.java:239)
at org.apache.wicket.util.tester.BaseWicketTester.<init>(BaseWicketTester.java:209)
at org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:181)
at com.lemcke.c.web.date.HalDateTest.setUp(HalDateTest.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
根据maven存储库,cglib 3.1正在工作(并且需要)asm 5.1。这是我使用的版本。我可以构建,部署和启动我的wicket应用程序。它功能齐全,只有WicketTester无法正常工作。以下是来自WebContent / WEB-INF / lib
的库Verzeichnis von D:\ workspace \ halsolweb \ WebContent \ WEB-INF \ lib
26.08.2015 10:10 53.468 asm-5.1.jar
07.12.2013 18:30 283.080 cglib-3.1.jar
09.07.2016 12:37 751.238 commons-collections4-4.1.jar
09.07.2016 12:37 70.282 commons-fileupload-1.3.2.jar
20.10.2015 02:01 284.220 commons-lang-2.6.jar
09.07.2016 12:37 319.050 jsoup-1.9.2.jar
17.07.2016 20:30 60.584 wicket-atmosphere-0.27.jar
17.07.2016 20:30 50.983 wicket-auth-roles-7.4.0.jar
17.07.2016 20:30 29.676 wicket-bean-validation-7.4.0.jar
17.07.2016 20:30 37.434 wicket-cdi-1.1-7.4.0.jar
17.07.2016 20:30 35.780 wicket-cdi-7.4.0.jar
17.07.2016 20:30 2.230.332 wicket-core-7.4.0.jar
17.07.2016 20:30 239.345 wicket-datetime-7.4.0.jar
17.07.2016 20:30 113.027 wicket-devutils-7.4.0.jar
17.07.2016 20:30 1.274.705 wicket-extensions-7.4.0.jar
17.07.2016 20:30 18.422 wicket-guice-7.4.0.jar
17.07.2016 20:30 28.509 wicket-ioc-7.4.0.jar
17.07.2016 20:30 31.029 wicket-jmx-7.4.0.jar
19.06.2016 17:09 490.728 wicket-jquery-ui-7.3.0.jar
19.06.2016 17:11 176.403 wicket-jquery-ui-calendar-7.3.0.jar
19.06.2016 17:11 84.375 wicket-jquery-ui-core-7.3.0.jar
19.06.2016 17:12 165.323 wicket-jquery-ui-plugins-7.3.0.jar
17.07.2016 20:30 7.509 wicket-js-tests-7.4.0.jar
17.07.2016 20:30 32.544 wicket-metrics-0.2.jar
17.07.2016 20:30 81.404 wicket-native-websocket-core-7.4.0.jar
17.07.2016 20:30 30.366 wicket-native-websocket-javax-7.4.0.jar
17.07.2016 20:30 13.250 wicket-native-websocket-jetty-7.4.0.jar
17.07.2016 20:30 15.407 wicket-native-websocket-jetty9-7.4.0.jar
17.07.2016 20:30 14.315 wicket-native-websocket-tomcat-7.4.0.jar
17.07.2016 20:30 11.499 wicket-objectsizeof-agent-7.4.0.jar
17.07.2016 20:30 88.109 wicket-request-7.4.0.jar
17.07.2016 20:30 31.427 wicket-spring-7.4.0.jar
17.07.2016 20:30 378.683 wicket-util-7.4.0.jar
09.07.2016 12:37 44.927 wicket-webjars-0.5.4.jar
任何提示都受到高度赞赏
答案 0 :(得分:0)
在ASM 4之前,任何ClassVisitor都是一个接口,而不是一个类。您似乎在路径上有另一个旧版本的ASM,而不是ASM 5.1。