1

当我调用在 WebLogic 10.3.5 上使用 Sybase DB 的 rest web 服务时,我遇到了错误。我定义了一个 JNDI 数据源,我测试了连接并且它是成功的。

    java.lang.NoClassDefFoundError: com/sybase/jdbcx/SybConnection
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:630)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343)
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:302)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at weblogic.utils.classloaders.GenericClassLoader.defineCodeGenClass(GenericClassLoader.java:523)
    at weblogic.utils.classfile.utils.CodeGenerator.generateClass(CodeGenerator.java:73)
    at weblogic.utils.wrapper.WrapperFactory.generateWrapperClass(WrapperFactory.java:340)
    at weblogic.utils.wrapper.WrapperFactory.getWrapperClass(WrapperFactory.java:244)
    at weblogic.utils.wrapper.WrapperFactory.getWrapperClass(WrapperFactory.java:190)
    at weblogic.jdbc.wrapper.JDBCWrapperFactory$1.run(JDBCWrapperFactory.java:164)
    at java.security.AccessController.doPrivileged(Native Method)
    at weblogic.jdbc.wrapper.JDBCWrapperFactory.getWrapper(JDBCWrapperFactory.java:161)
    at weblogic.jdbc.pool.Driver.allocateConnection(Driver.java:251)
    at weblogic.jdbc.pool.Driver.connect(Driver.java:164)
    at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:651)
    at weblogic.jdbc.jts.Driver.connect(Driver.java:127)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:364)
    at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
    at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
    at org.mybatis.spring.SqlSessionUtils.getSqlSession(SqlSessionUtils.java:116)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:333)
    at $Proxy102.selectOne(Unknown Source)
    at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:154)
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:75)
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:38)
    at $Proxy103.getAssetMap(Unknown Source)
    at com.pbc.service.AssetController.GetHashMap(AssetController.java:38)
    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.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
    at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
    at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3717)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.lang.ClassNotFoundException: com.sybase.jdbcx.SybConnection
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
    ... 61 more

jconn3.jar 在类路径中,而且我看到它在服务器启动时被加载。我很无助,我到处寻找,但徒劳无功。

4

0 回答 0