IBM Support

NoClassDefFoundError when starting BPM on linux

Technical Blog Post


Abstract

NoClassDefFoundError when starting BPM on linux

Body

Have you ever tried to start a BPM server on linux only to be greeted by the following incomprehensible error?

java.lang.NoClassDefFoundError: org.eclipse.emf.ecore.EFactory          
        at java.lang.ClassLoader.defineClassImpl(Native Method)         
        at java.lang.ClassLoader.defineClass(ClassLoader.java:275)      
        at java.security.SecureClassLoader.defineClass                  
(SecureClassLoader.jav4)                                                
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:540)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:451)
        at java.net.URLClassLoader.access$300(URLClassLoader.java:79)   
        at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:
1038)                                                                   
        at java.security.AccessController.doPrivileged(AccessController.
java2)                                                                  
        at java.net.URLClassLoader.findClass(URLClassLoader.java:429)   
        at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.
java4)                                                                  
        at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:703)  
        at java.lang.ClassLoader.loadClass(ClassLoader.java:682)        
        at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.
java0)                                                                  
        at java.lang.ClassLoader.loadClass(ClassLoader.java:665)        
        at java.lang.J9VMInternals.verifyImpl(Native Method)            
        at java.lang.J9VMInternals.verify(J9VMInternals.java:94)        
        at java.lang.J9VMInternals.verify(J9VMInternals.java:92)        
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:171)   
        at org.eclipse.hyades.logging.events.cbe.impl.                  
EventFactoryContext.<i>(EventFactoryContext.java:82)                    
        at org.eclipse.hyades.logging.events.cbe.impl.                  
EventFactoryContext.gestance(EventFactoryContext.java:122)              
        at com.ibm.ejs.ras.Tr.<clinit>(Tr.java:316)                     
        at java.lang.J9VMInternals.initializeImpl(Native Method)        
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:237)   
        at com.ibm.ws.management.tools.AdminTool.<clinit>(AdminTool.    
java:66)                                                                
        at java.lang.J9VMInternals.initializeImpl(Native Method)        
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:237)   
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:204)   
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:204)   
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
        at sun.reflect.NativeMethodAccessorImpl.invoke                  
(NativeMethodAccessorI.java:60)                                         
        at sun.reflect.DelegatingMethodAccessorImpl.invoke              
(DelegatingMethodAssorImpl.java:37)                                     
        at java.lang.reflect.Method.invoke(Method.java:611)             
        at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:280)    
Caused by: java.lang.ClassNotFoundException: org.eclipse.emf.ecore.     
EFactory                                                                
        at java.net.URLClassLoader.findClass(URLClassLoader.java:434)   
        at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.
java4)                                                                  
        at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:703)  
        at java.lang.ClassLoader.loadClass(ClassLoader.java:682)        
        at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.
java0)                                                                  
        at java.lang.ClassLoader.loadClass(ClassLoader.java:665)        
        ... 33 more 

 

Well the good news is, it's a really trivial fix. Your ulimit is set too low!

DOH!

Try ulimit -n 8196

And then re-run startServer, startNode, startManager, BPMConfig or however your normally start BPM.

To stop this happening again you could consider changing the default setting, this will depend on which particular distribution of linux or flavour of unix your using.

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSWSR9","label":"IBM InfoSphere Master Data Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

UID

ibm11142218