Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

while deploying Spring-Hibernate-Sip Enterprise Application getting NoClassDefFoundError

 
alp carsikarsi
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
alp carsikarsi
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic