Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6528247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:31:01+00:00 2026-05-25T09:31:01+00:00

I’m using junit 4.8.1 and I run all jUnit test of the 6 Projects

  • 0

I’m using junit 4.8.1 and I run all jUnit test of the 6 Projects from the eclipse project called AllTests, which looks like this

package ch.mct.jdyna.tests;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

@RunWith(Suite.class)
@SuiteClasses({ 
    ch.mct.jdyna.core.duplicatechecking.AllTests.class,
    ch.mct.jdyna.core.matching.AllTests.class,
    ch.mct.jdyna.core.matchingoptimization.AllTests.class,
    ch.mct.jdyna.core.textanalysis.testing.AllTests.class,
    ch.mct.jdyna.dataaccesslayer.testing.AllTests.class,
    ch.mct.jdyna.dataacquisition.testing.AllTests.class,
})
public class AllTests {

}

In the projects I also have a file in the same style calling all jUnit tests of the project itself.
The Problem is, when I call the test method testCreateProfiles() from the global context, there is an error, from the class AllTests in the Project itself everything is green.

The Method to test:

/**
 * Test method for
 * {@link ch.mct.jdyna.dataacquisition.CvPreprocessing#createProfiles(java.util.List)}
 * .
 */
@Test
public final void testCreateProfiles() {
    List<Cv> cvs = new LinkedList<Cv>();
    for (int i = 0; i < 10; ++i)
        cvs.add(testingCv);
    List<CurriculumVitae> actualList = CvPreprocessing.createProfiles(cvs);
    assertEquals(cvs.size(), actualList.size());
}

The Method under test:

/**
 * Creates CurriculumVitae from the given data in CV.
 * 
 * @param cvList
 *            the CVs data
 * @return the list of CurriculumVitae
 */
public static List<CurriculumVitae> createProfiles(List<Cv> cvList) {
    if (cvList == null)
        return null;

    List<CurriculumVitae> cvProfileList = new ArrayList<CurriculumVitae>();
    for (Cv cv : cvList) {
        String title = cv.getTitle();
        if (title != null)
            title = title.substring(0,
                    Math.min(title.length(), MAXIMAL_TITLE_LENGTH - 1));
        String body = mergeBody(cv);
        Date date = cv.getLastUpdate();
        Calendar cal = Calendar.getInstance();
        if (date != null)
            cal.setTime(date);
        BigDecimal externalId = cv.getId();
        CurriculumVitae cvProfile = new CurriculumVitae(title, body, cal,
                externalId);
        cvProfileList.add(cvProfile);
    }
    return cvProfileList;

}

The error is:

java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at ch.mct.jdyna.dataacquisition.CvPreprocessing.createProfiles(CvPreprocessing.java:71)
at ch.mct.jdyna.dataacquisition.testing.CvPreprocessingTest.testCreateProfiles(CvPreprocessingTest.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Does anyone have experience with this kind of problem?

Thanks in advance.
Manu

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:31:01+00:00Added an answer on May 25, 2026 at 9:31 am

    Most often those verify error signal some problem with different libraries: like you use one version of library to compile the classes and another one to run or test the application.

    A compiler won’t allow subclassing a final class. So if you see this problem at runtime, you probably subclassed an external non-final class (which is ok) but added a different version of this class (now a final class) to the classpath. This will create this type of VerifyError at runtime.

    So double check your classpaths. Make sure, the classpaths you use for building and testing include the same libraries. Investigate in the offending class (the one that now subclasses a final class) and try to locate the superclass(es).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to run a str_replace or preg_replace which looks for certain words
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a text area in my form which accepts all possible characters from
For some reason, after submitting a string like this Jack’s Spindle from a text
I have an autohotkey script which looks up a word in a bilingual dictionary
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.