Eclipse - java.lang.ClassNotFoundException -


When trying to start my JUnit-test out of eclipse, I get "ClassNotFoundException" from the console "MVN testing" from the console.

  • Flex Project
  • Configuration Project

  • P > Edit: How can not get the class? This is a simple HelloWalk-application There is no special library in which there is no special library.

    Here is the run-configuration of my JUnit:


    Test class (but as I said, this is a simple work Does not hello either ...):

      import org.junit.After; Import org.junit.Assert; import org.junit.Before; import org.junit.Test ; Import org.springframework.context.ApplicationContext; Import org.springframework.context.support.ClassPathXmlApplicationContext; Import biz.prognoserechnung.domain.User; Import biz.prognoserechnung.domain.UserRepository; Import biz.prognoserechnung.domain.hibernate.UserHibernateDao; Public class UserDaoTest {/ ** * applicationcontext * / private applicationcontax ctx = null; / ** * user * record of private user / faucet; / ** * user interface * / personal user repository dao = faucet; Exception {String [] path = {"WEB-INF / applicationContext.xml"} throws up @public zero setup (); CTX = new classpath XMLAPPCContext (path); Dao = (UsherHiberNet Dow) ctx.getBean ("User Repository"); } After the public zero tiredown () throws exception {Dao = null; } @Test Public Final Zero Examination (IUser) throws an exception {Assert.assertTrue (dao.isUser ("John", "Doe")); } @Test Public Final Zero Examination (UIUUU) (throws an exception) {Assert.assertFalse (dao.isUser ("No", "Existing")); Assurance Conditional Flashe (Dao.Ususer (empty, null)); Denote Ashtflays (Dao User ("", "")); }}  

    Help the Carlos approach!

    Try checking the class path of the Joint Run Configuration:

    1. Open your run configuration
    2. You want to start click on jUnit-test
    3. Go to classpath tab
    4. Try adding a folder (click on user entries, click on advanced, click on add folders, right click and test your Find Output Folders for Categories. Ject properties meet under the Java Build Path, source)) is

    work for me.


    Comments

    Popular posts from this blog

    c++ - Linux and clipboard -

    What is expire header and how to achive them in ASP.NET and PHP? -

    sql server - How can I determine which of my SQL 2005 statistics are unused? -