2012-10-31 66 views
0

我已經閱讀了很多有關這個錯誤,原因是:的Jboss 5.1.0:java.lang.LinkageError的:裝載機約束違規類的javax.sql.DataSource

  1. 不止一個罐子含有這種類已經包括到類路徑,
  2. 包括JAR兩次或更多次,

但對我來說,這個類是JDK類,我也沒有搜索這個類已經被我的應用程序下找到。

任何線索都會非常有幫助。

異常堆棧:

2012-10-31 14:09:58,319 WARN [org.jboss.detailed.classloader.ClassLoaderManager] (http-0.0.0.0-8080-1:) Unexpected error during load of:javax.sql.DataSource 
java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) previously initiated loading for a different type with name "javax/sql/DataSource" 
     at java.lang.ClassLoader.defineClass1(Native Method) 
     at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) 
     at java.lang.ClassLoader.defineClass(ClassLoader.java:615) 
     at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:67) 
     at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:633) 
     at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:592) 
     at java.security.AccessController.doPrivileged(Native Method) 
     at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:591) 
     at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:568) 
     at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:135) 
     at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:131) 
     at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:455) 
     at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:267) 
     at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:166) 
     at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:287) 
     at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1163) 
     at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:862) 
     at org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:502) 
     at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:447) 
     at java.lang.ClassLoader.loadClass(ClassLoader.java:247) 
     at com.lombardrisk.webgui.dwr.ajax_search.UmbrellaNettingFundsSearch.getBranchesByAgreementId(UmbrellaNettingFundsSearch.java:199) 
     at com.lombardrisk.webgui.dwr.ajax_search.UmbrellaNettingFundsSearch.buildConditionOfPrinAndCpty(UmbrellaNettingFundsSearch.java:177) 
     at com.lombardrisk.webgui.dwr.ajax_search.UmbrellaNettingFundsSearch.getFunds(UmbrellaNettingFundsSearch.java:58) 
     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:597) 
     at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilter.java:34) 
     at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428) 
     at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:431) 
     at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:283) 
     at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:52) 
     at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101) 
     at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
     at com.lombardrisk.webgui.filter.ValidRequestFilter.doFilter(ValidRequestFilter.java:41) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235) 
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 
     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183) 
     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) 
     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95) 
     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) 
     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) 
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) 
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
     at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74) 
     at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47) 
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) 
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) 
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599) 
     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451) 
     at java.lang.Thread.run(Thread.java:662) 

回答

0

這個問題得到解決

那裏確實有含該類另一個罐子(jdbc2_0-stdext.jar),並帶來由我們來應用程序。

B類是OK,因爲con = ds.getConnection是在另一個X.jar中調用的,而A類是在它內部調用自己的Y.war,並且這個jdbc2_0-stdext.jar是Y.war中的包

相關問題