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 6385177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:52:00+00:00 2026-05-25T02:52:00+00:00

I am getting following error while running junit test file with maven: Caused by:java.lang.NoClassDefFoundError:IllegalName:com/home/app/LoginDetailsTest

  • 0

I am getting following error while running junit test file with maven:

Caused
by:java.lang.NoClassDefFoundError:IllegalName:com/home/app/LoginDetailsTest

all my test class files are located at target\ test-classes and java class files are located at target\ classes directory.

since LoginDetailsTest located at target\ test-classes, it couldnot identify class files. how to solve this error?

spring xml file:

<bean id="loginDetails" class="com/home/app/LoginDetailsTest">
    <property name="loginDetailsService" ref="loginService" />
</bean>

I am running junit test file through eclipse by right click and run as junit test.

<error message="Cannot find class [/com/home/app/LoginDetailsTest] for bean with name &apos;loginDetails&apos; defined in class path resource [com/home/app/LoginDetails-ctx.xml]; nested exception is java.lang.ClassNotFoundException: /com/home/app/LoginDetailsTest" type="org.springframework.beans.factory.CannotLoadBeanClassException">org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [/com/home/app/LoginDetailsTest] for bean with name &apos;loginDetails&apos; defined in class path resource [com/home/app/LoginDetails-ctx.xml]; nested exception is java.lang.ClassNotFoundException: /com/home/app/LoginDetailsTest
    at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1250)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1319)
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:885)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:562)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:139)
    at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:93)
    at com.home.app.LoginDetailsTest.testLoginDetails(LoginDetailsTest.java:27)
Caused by: java.lang.ClassNotFoundException: /com/home/app/LoginDetailsTest
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    at org.springframework.util.ClassUtils.forName(ClassUtils.java:257)
    at org.springframework.bea
  • 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-25T02:52:01+00:00Added an answer on May 25, 2026 at 2:52 am

    You have to give the class name this way in Spring : “com.home.app.LoginDetailsTest”, not this way “com/home/app/LoginDetailsTest”

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

Sidebar

Related Questions

While running the following code i am getting the error java.lang.OutOfMemoryException : java heap
I am getting the following error while running my MVC application, which uses the
I have done simple java app for blackberry, while building am getting following error.
Im getting following error while running the query. org.hibernate.hql.ast.QuerySyntaxException: expecting CLOSE, found 'LIMIT' near
I am getting the following error message while running .net 3.5 applciation Your step-into
I am getting following error while running a JSP page: org.apache.jasper.JasperException: jsp:getProperty for bean
I am getting the following error while running my android project in which I
I am getting following error while running my application which is asp.net. Server Error
I'm getting the following error while running the android application. Currently i'm using Windows
I am getting following error while running the application on the device: Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2

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.