ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Lamey <cla...@localmatters.com>
Subject Re: NoClassDefFoundError Resources
Date Wed, 09 May 2007 19:09:12 GMT
Did you declare that jar in the ear deployment descriptor?

On Wed, 2007-05-09 at 14:52 -0400, Steve Wooten wrote:
> I am attempting to use ibatis in a Session bean with JBoss.  
> 
> I have a helper class that load the ibatis config with the following
> code
> 
>            try {
> 
>                  ibatisConfigReader =
> com.ibatis.common.resources.Resources
> 
>                               .getResourceAsReader("SqlMapConfig.xml");
> 
>                  ibatisSqlMap = SqlMapClientBuilder
> 
>                               .buildSqlMapClient(ibatisConfigReader);
> 
>             } catch (Exception ex) {
> 
>                  log.fatal("Exception reading ibatis config file",
> ex);
> 
>             }
> 
>  
> 
> If I run this with my IDE (Eclipse) it works fine. 
> 
> I have all the ibatis jar file deploying with my ear so I know the
> file “com/ibatis/common/resources/Resources exist.”
> 
> My application is able to find all other classes deployed in other jar
> files however once it is deployed on the server I get the following
> error:
> 
> java.lang.NoClassDefFoundError: com/ibatis/common/resources/Resources
> 
>  
> 
> Please Help!
> 
>  
> 
> Stack trace is below
> 
> java.lang.NoClassDefFoundError: com/ibatis/common/resources/Resources
> 
>       at com.nc4.athena.QueryHelper.init(QueryHelper.java:42)
> 
>       at com.nc4.athena.QueryHelper.<init>(QueryHelper.java:58)
> 
>       at
> com.nc4.athena.dao.PartyRelationTypeDAO.<init>(PartyRelationTypeDAO.java:51)
> 
>       at
> com.nc4.athena.dao.PartyRelationTypeDAO.getInstance(PartyRelationTypeDAO.java:61)
> 
>       at
> com.nc4.athena.session.TypeTableManagerEJB.getPartyRelationTypeList(TypeTableManagerEJB.java:892)
> 
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
>       at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 
>       at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 
>       at java.lang.reflect.Method.invoke(Method.java:585)
> 
>       at
> org.jboss.invocation.Invocation.performCall(Invocation.java:359)
> 
>       at org.jboss.ejb.StatelessSessionContainer
> $ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
> 
>       at
> org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
> 
>       at
> org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
> 
>       at
> org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
> 
>       at
> org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
> 
>       at
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)
> 
>       at
> org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
> 
>       at
> org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
> 
>       at
> org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
> 
>       at
> org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
> 
>       at
> org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
> 
>       at org.jboss.ejb.Container.invoke(Container.java:954)
> 
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
>       at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 
>       at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 
>       at java.lang.reflect.Method.invoke(Method.java:585)
> 
>       at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
> 
>       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> 
>       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
> 
>       at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
> 
>       at
> org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> 
>       at org.jboss.invocation.local.LocalInvoker
> $MBeanServerAction.invoke(LocalInvoker.java:169)
> 
>       at
> org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
> 
>       at
> org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
> 
>       at
> org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
> 
>       at
> org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
> 
>       at
> org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
> 
>       at
> org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
> 
>       at
> org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
> 
>       at $Proxy148.getPartyRelationTypeList(Unknown Source)
> 
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
>       at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 
>       at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 
>       at java.lang.reflect.Method.invoke(Method.java:585)
> 
>       at
> com.nc4.athena.session.TypeTableManagerDynamicBusinessDelegate.invoke(TypeTableManagerDynamicBusinessDelegate.java:77)
> 
>       at $Proxy155.getPartyRelationTypeList(Unknown Source)
> 
>       at
> com.nc4.athena.action.PartyRelationTypeAction.list(PartyRelationTypeAction.java:48)
> 
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
>       at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 
>       at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 
>       at java.lang.reflect.Method.invoke(Method.java:585)
> 
>       at
> com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:399)
> 
>       at
> com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:262)
> 
>       at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:224)
> 
>       at
> com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
> 
>       at com.opensymphony.xwork2.DefaultActionInvocation
> $2.doProfiling(DefaultActionInvocation.java:219)
> 
>       at com.opensymphony.xwork2.DefaultActionInvocation
> $2.doProfiling(DefaultActionInvocation.java:218)
> 
>       at
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
> 
>       at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)
> 
>       at
> com.opensymphony.xwork2.interceptor.ParametersInterceptor.intercept(ParametersInterceptor.java:161)
> 
>       at com.opensymphony.xwork2.DefaultActionInvocation
> $2.doProfiling(DefaultActionInvocation.java:219)
> 
>       at com.opensymphony.xwork2.DefaultActionInvocation
> $2.doProfiling(DefaultActionInvocation.java:218)
> 
>       at
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
> 
>       at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)
> 
>       at
> org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)
> 
>       at com.opensymphony.xwork2.DefaultActionInvocation
> $2.doProfiling(DefaultActionInvocation.java:219)
> 
>       at com.opensymphony.xwork2.DefaultActionInvocation
> $2.doProfiling(DefaultActionInvocation.java:218)
> 
>       at
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
> 
>       at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)
> 
>       at
> com.opensymphony.xwork2.interceptor.PrepareInterceptor.intercept(PrepareInterceptor.java:115)
> 
>       at com.opensymphony.xwork2.DefaultActionInvocation
> $2.doProfiling(DefaultActionInvocation.java:219)
> 
>       at com.opensymphony.xwork2.DefaultActionInvocation
> $2.doProfiling(DefaultActionInvocation.java:218)
> 
>       at
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
> 
>       at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)
> 
>       at
> org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)
> 
>       at com.opensymphony.xwork2.DefaultActionInvocation
> $2.doProfiling(DefaultActionInvocation.java:219)
> 
>       at com.opensymphony.xwork2.DefaultActionInvocation
> $2.doProfiling(DefaultActionInvocation.java:218)
> 
>       at
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
> 
>       at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)
> 
>       at
> com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
> 
>       at com.opensymphony.xwork2.DefaultActionInvocation
> $2.doProfiling(DefaultActionInvocation.java:219)
> 
>       at com.opensymphony.xwork2.DefaultActionInvocation
> $2.doProfiling(DefaultActionInvocation.java:218)
> 
>       at
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
> 
>       at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)
> 
>       at
> org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
> 
>       at
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:507)
> 
>       at
> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)
> 
>       at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> 
>       at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 
>       at
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> 
>       at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> 
>       at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 
>       at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> 
>       at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> 
>       at
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
> 
>       at
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
> 
>       at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> 
>       at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> 
>       at
> org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
> 
>       at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> 
>       at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> 
>       at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> 
>       at org.apache.coyote.http11.Http11BaseProtocol
> $Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
> 
>       at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> 
>       at
> org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
> 
>       at java.lang.Thread.run(Thread.java:595)
> 
>  
> 
>  
> 
> 

Mime
View raw message