Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting NoClassDefFoundError  RSS feed

peter aerts
Ranch Hand
Posts: 32
MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[size=18]Hi Dears,

I have created a simple EJB project as a sample in MyElipse but i am getting below error when i am runing it , please advice me what to do to fix it.

I should mention that i have added below jar files to the Java Biuld Path but still i am getting below error.


public class ClientApplicationTest {

public static void main(String[] args) {

try {
Context jndi = new InitialContext();

EmployeeManagementService service = (EmployeeManagementService) jndi.lookup("com.virtualpairprogrammers.staffmanagement.EmployeeManagemanetService");
List<Employee> listEmployee = service.getAllEmployee();
for (Employee employee : listEmployee) {


} catch (NamingException e) {



Apr 1, 2013 12:00:02 AM com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl findDerbyClient
INFO: Cannot find javadb client jar file, derby jdbc driver will not be available by default.
Exception in thread "main" java.lang.NoClassDefFoundError: org/glassfish/api/naming/NamedNamingObjectProxy
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClassOrNull(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at com.sun.hk2.component.LazyInhabitant.loadClass(
at com.sun.hk2.component.LazyInhabitant.fetch(
at com.sun.hk2.component.EventPublishingInhabitant.get(
at com.sun.hk2.component.AbstractInhabitantImpl.get(
at org.jvnet.hk2.component.Habitat$5.get(
at java.util.AbstractList$
at com.sun.enterprise.naming.impl.NamedNamingObjectManager.checkAndLoadProxies(
at com.sun.enterprise.naming.impl.SerialContext.lookup(
at com.sun.enterprise.naming.impl.SerialContext.lookup(
at javax.naming.InitialContext.lookup(
at com.virtualpairprogrammers.client.ClientApplicationTest.main(

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!