Today, the Weka source code into Eclipse, intends to learn the Weka source code, encountered some problems, insufficient online information, their own summary, hope for Yimeimei paving.
1) New Java project, name Weka3-6
2) Unzip the Weka-src.jar and drag the Src\main\java\weka file to the SRC directory of the project.
3) Introduction of three jar packages from the Weka-src\lib directory
Run the main function with a Verifyerror exception, as follows:
Java.lang.VerifyError:Expecting a stackmap frame at branch target in inchMethod Com.abc.domain.mypackage.myclass$jaxbaccessorm_getdescription_setdescription_java_lang_string.Get(ljava/lang/object;) ljava/lang/object; at offset -At Java.lang.Class.getDeclaredConstructors0 (Native Method) at Java.lang.Class.privateGetDeclaredConstructors (C Lass.java:2413) at Java.lang.Class.getConstructor0 (Class.java:2723) at Java.lang.Class.newInstance0 (Class.java:345) at Java.lang.Class.newInstance (Class.java:327) at Com.sun.xml.Internal. Bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.instanciate (Optimizedaccessorfactory.java:184) at Com.sun.xml.Internal. bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.Get(Optimizedaccessorfactory.java:129) at Com.sun.xml.Internal. Bind.v2.runtime.reflect.accessor$gettersetterreflection.optimize (Accessor.java:384) at Com.sun.xml.Internal.bind.v2.runtime.property.singleelementleafproperty.<init> (Singleelementleafproperty.java: the) at Sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method) at Sun.reflect.NativeConstructorAcce Ssorimpl.newinstance (Nativeconstructoraccessorimpl.java: $) at Sun.reflect.DelegatingConstructorAccessorImpl.newInstance (Delegatingconstructoraccessorimpl.java: $) at Java.lang.reflect.Constructor.newInstance (Constructor.java:525) at Com.sun.xml.Internal. Bind.v2.runtime.property.PropertyFactory.create (Propertyfactory.java:113) at Com.sun.xml.Internal.bind.v2.runtime.classbeaninfoimpl.<init> (Classbeaninfoimpl.java:166) at Com.sun.xml.Internal. Bind.v2.runtime.JAXBContextImpl.getOrCreate (Jaxbcontextimpl.java:494) at Com.sun.xml.Internal.bind.v2.runtime.jaxbcontextimpl.<init> (Jaxbcontextimpl.java:311) at Com.sun.xml.Internal.bind.v2.runtime.jaxbcontextimpl.<init> (Jaxbcontextimpl.java:126) at Com.sun.xml.Internal. Bind.v2.runtime.jaxbcontextimpl$jaxbcontextbuilder.build (Jaxbcontextimpl.java:1148) at Com.sun.xml.Internal. Bind.v2.ContextFactory.createContext (Contextfactory.java: the) at Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at Sun.reflect.NativeMethodAccessorImpl.invoke (Nativemethodaccessorimpl.java: $) at Sun.reflect.DelegatingMethodAccessorImpl.invoke (Delegatingmethodaccessorimpl.java: +) at Java.lang.reflect.Method.invoke (Method.java:601) at Javax.xml.bind.ContextFinder.newInstance (Contextfinder.java:248) at Javax.xml.bind.ContextFinder.newInstance (Contextfinder.java:235) at Javax.xml.bind.ContextFinder.find (Contextfinder.java:445) at Javax.xml.bind.JAXBContext.newInstance (Jaxbcontext.java:637) at Javax.xml.bind.JAXBContext.newInstance (Jaxbcontext.java:584) at Com.abc.domain.myPackage.MyClass.marshalFacetsTest (Myclass.java: the) at Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at Sun.reflect.NativeMethodAccessorImpl.invoke (Nativemethodaccessorimpl.java: $) at Sun.reflect.DelegatingMethodAccessorImpl.invoke (Delegatingmethodaccessorimpl.java: +) at Java.lang.reflect.Method.invoke (Method.java:601) at org.testng.Internal. Methodinvocationhelper.invokemethod (Methodinvocationhelper.java: the) at org.testng.Internal. Invoker.invokemethod (Invoker.java:714) at org.testng.Internal. Invoker.invoketestmethod (Invoker.java:901) at org.testng.Internal. Invoker.invoketestmethods (Invoker.java:1231) at org.testng.Internal. Testmethodworker.invoketestmethods (Testmethodworker.java: -) at org.testng.Internal. Testmethodworker.run (Testmethodworker.java:111) at Org.testng.TestRunner.privateRun (Testrunner.java:767) at Org.testng.TestRunner.run (Testrunner.java:617) at Org.testng.SuiteRunner.runTest (Suiterunner.java:334) at org.testng.SuiteRunner.runSequentially (Suiterunner.java:329) at Org.testng.SuiteRunner.privateRun (Suiterunner.java:291) at Org.testng.SuiteRunner.run (Suiterunner.java: -) at Org.testng.SuiteRunnerWorker.runSuite (Suiterunnerworker.java: the) at Org.testng.SuiteRunnerWorker.run (Suiterunnerworker.java: the) at org.testng.TestNG.runSuitesSequentially (Testng.java:1203) at org.testng.TestNG.runSuitesLocally (Testng.java:1128) at Org.testng.TestNG.run (Testng.java:1036) at Org.testng.remote.RemoteTestNG.run (Remotetestng.java:111) at Org.testng.remote.RemoteTestNG.initAndRun (Remotetestng.java:204) at Org.testng.remote.RemoteTestNG.main (Remotetestng.java:175)
Solution: Change the Jdk7 to Jdk6 and change the complier Jdk7 compiler to 6
Weka source code in Eclipse Configuration and Verifyerror exception resolution