File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes while deploying Spring-Hibernate-Sip Enterprise Application getting NoClassDefFoundError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "while deploying Spring-Hibernate-Sip Enterprise Application getting NoClassDefFoundError" Watch "while deploying Spring-Hibernate-Sip Enterprise Application getting NoClassDefFoundError" New topic
Author

while deploying Spring-Hibernate-Sip Enterprise Application getting NoClassDefFoundError

alp carsikarsi
Ranch Hand

Joined: Dec 27, 2005
Posts: 40
Hi,

I am trying to deploy .ear to GlassFish Sailfin Application Server. While deployment phase application server throws following exception.
There are all required .jars in Application server's lib directory.
(i can compile my application successfully in Eclipse and can build .ear succesfully.)
I could not resolve this problem.

Thanks for your helps.

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.springframework.util.ClassUtils.<clinit>(ClassUtils.java:65)
at org.springframework.core.io.DefaultResourceLoader.<init>(DefaultResourceLoader.java:53)
at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:179)
at org.springframework.context.support.AbstractRefreshableApplicationContext.<init>(AbstractRefreshableApplicationContext.java:78)
at org.springframework.context.support.AbstractXmlApplicationContext.<init>(AbstractXmlApplicationContext.java:58)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:90)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:68)
at tr.com.argela.wiphone.cc.Init.init(Init.java:130)
at com.ericsson.ssa.container.sim.SipServletFacade.init(SipServletFacade.java:73)
at com.ericsson.ssa.container.sim.SipServletWrapper.initialize(SipServletWrapper.java:373)
at com.ericsson.ssa.container.sim.SipServletWrapper.doLoad(SipServletWrapper.java:320)
at com.ericsson.ssa.container.sim.SipServletWrapper.allocate(SipServletWrapper.java:167)
at com.ericsson.ssa.container.sim.ServletDispatcher.loadServletsMarkedOnStartup(ServletDispatcher.java:459)
at com.ericsson.ssa.config.ConvergedContextImpl.loadOnStartupSip(ConvergedContextImpl.java:258)
at com.ericsson.ssa.config.ConvergedContextImpl.loadOnStartup(ConvergedContextImpl.java:250)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5324)
at com.sun.enterprise.web.WebModule.start(WebModule.java:353)
at com.ericsson.ssa.config.ConvergedContextImpl.start(ConvergedContextImpl.java:139)
at com.sun.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:58)
at com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:304)
at com.sun.appserv.management.util.misc.RunnableBase.run(RunnableBase.java:341)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Eclipse has one classpath and the app server has their own classpath.

So in Eclipse you have your project setup to include the required jars in the compiling, but you do not have those jars in your GlassFish App Server. You need to put it there too, or include them in your ear file.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
alp carsikarsi
Ranch Hand

Joined: Dec 27, 2005
Posts: 40
Thanks for your answer Mark Spritzler.

I put all required jars into GlassFish App Server's lib directory but the problem didn't resolve.
I am getting same exception




Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

alp carsikarsi wrote:Thanks for your answer Mark Spritzler.

I put all required jars into GlassFish App Server's lib directory but the problem didn't resolve.
I am getting same exception






Which lib directory? There might be two, one for the app server, and one for apps. Also, there might already be a different version of Apache Commons in the app server, and you might need to either include the jar in your ear/war file, and you might have to tell Glassfish to load it in an app specific classloader if there is a conflict with another version out there.

Mark
alp carsikarsi
Ranch Hand

Joined: Dec 27, 2005
Posts: 40
I put all .jars into C:\sailfin\domains\myapplicationdomain\lib directory.
I didn't put project specific jars into Sailfin lib directory. (C:\sailfin\lib)
You can be right about conflict .jars . My problem may rise because the conflict of some .jars.
I will retrace .jars again.

Thanks.

Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

alp carsikarsi wrote:I put all .jars into C:\sailfin\domains\myapplicationdomain\lib directory.
I didn't put project specific jars into Sailfin lib directory. (C:\sailfin\lib)
You can be right about conflict .jars . My problem may rise because the conflict of some .jars.
I will retrace .jars again.

Thanks.



Good luck. Once you get outside the , include the jar in your classpath issue, classpath loader issues can be a big pain in the you know what. I could have helped with the JBoss way of making a specific class loader for your app, but not in Glassfish.

Mark
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: while deploying Spring-Hibernate-Sip Enterprise Application getting NoClassDefFoundError
 
Similar Threads
Getting Http 404 Error while running Strut Application
Problem while creating Struts application
Web module deployment in Glassfish not able to find log4j classes
Error regeristering Bean (Restlets+Spring)
Getting an Exception in Struts application