NutzCN Logo
问答 关于调用dll类库的问题
发布于 2615天前 作者 shuxinyun 1648 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk

加载类库:

package cn.wizzer.app.doc.monitor;

import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Lang;

@IocBean
public class ControllCan {
    public native int initDeviceCAN();    
    static{
        String property = System.getProperty("os.name");
        if(property.toLowerCase().indexOf("win")>=0){
            //判断操作系统的位数
            System.loadLibrary("JAVAControlCAN");
        }else{
            System.loadLibrary("libJAVAControlCAN");
        }
    }
}

调用方式:

ControllCan controllCAN=new ControllCan();
controllCAN.initDeviceCAN();

出错了:

[WARN ] 2017-09-25 14:54:44,886 org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:28) - Error@/platform/login :
java.lang.UnsatisfiedLinkError: cn.wizzer.app.doc.monitor.ControllCan.initDeviceCAN()I
	at cn.wizzer.app.doc.monitor.ControllCan.initDeviceCAN(Native Method)
	at cn.wizzer.app.web.modules.controllers.platform.sys.SysLoginController.login(SysLoginController.java:62)
	at cn.wizzer.app.web.modules.controllers.platform.sys.SysLoginController$FM$login$a35f6ebc0a1eef31c8dcd6e1bc480f01.invoke(SysLoginController.java)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:30)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at cn.wizzer.app.web.commons.processor.XssSqlFilterProcessor.process(XssSqlFilterProcessor.java:35)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at cn.wizzer.app.web.commons.processor.NutShiroProcessor.process(NutShiroProcessor.java:52)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at cn.wizzer.app.web.commons.processor.GlobalsSettingProcessor.process(GlobalsSettingProcessor.java:44)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at cn.wizzer.app.web.commons.processor.LogTimeProcessor.process(LogTimeProcessor.java:21)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621)
	at cn.wizzer.app.web.commons.filter.RouteFilter.doFilter(RouteFilter.java:28)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1613)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:541)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1592)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1239)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:481)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1561)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1141)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:118)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:564)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
	at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:122)
	at org.eclipse.jetty.util.thread.strategy.ExecutingExecutionStrategy.invoke(ExecutingExecutionStrategy.java:58)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:201)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:133)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
	at java.lang.Thread.run(Thread.java:745)
10 回复

dll所在位置都正确,上面代码在非框架下的idea环境下运行无误!

搞不定就拼出绝对路径

加载绝对路径也不行呀!这里,我把路径放到全局变量了!可能这个变量在框架里不识别?
换成如下加载方式也不行

static{
        String property = System.getProperty("os.name");
        if(property.toLowerCase().indexOf("win")>=0){
            //判断操作系统的位数
            System.load("D:\\git\\JAVAControlCAN\\x64\\Debug\\JAVAControlCAN.dll");
        }else{
            System.loadLibrary("libJAVAControlCAN");
        }
    }

话说,加载库失败的话,应该先抛出库文件不存在呢,加载顺序错了吧

真搞不明白呀,就一个的dll文件!

我是说, 你的static根本没执行吧?

String property = System.getProperty("os.name");
// 这里打印一下东西, 看看有没有执行

加载代码:

 static {
        String property = System.getProperty("os.name");
        if(property.toLowerCase().indexOf("win")>=0){
            //判断操作系统的位数
            System.out.println("准备加载JAVAControlCAN");
            System.loadLibrary("JAVAControlCAN");
            System.out.println("加载JAVAControlCAN完毕");
            //System.load("D:/git/JAVAControlCAN/x64/Debug/JAVAControlCAN.dll");
        }else{
            System.loadLibrary("libJAVAControlCAN");
        }
    }

执行结果:

[DEBUG] 2017-09-25 15:58:58,197 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) - Load class cn.wizzer.app.doc.monitor.ControllCan without AOP
准备加载JAVAControlCAN
加载JAVAControlCAN完毕
[INFO ] 2017-09-25 15:58:58,282 cn.wizzer.app.doc.monitor.services.impl.MonitorServiceImpl.init(MonitorServiceImpl.java:23) - Farshine monitor starting...
[DEBUG] 2017-09-25 15:58:58,283 cn.wizzer.app.web.commons.processor.LogTimeProcessor.process(LogTimeProcessor.java:26) - [GET ]URI=/platform/login 861ms
[WARN ] 2017-09-25 15:58:58,286 org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:28) - Error@/platform/login :
java.lang.UnsatisfiedLinkError: cn.wizzer.app.doc.monitor.ControllCan.initDeviceCAN()I
	at cn.wizzer.app.doc.monitor.ControllCan.initDeviceCAN(Native Method)
	at cn.wizzer.app.doc.monitor.services.impl.ControllCanServiceImpl.initDeviceCAN(ControllCanServiceImpl.java:19)
	at cn.wizzer.app.doc.monitor.services.impl.MonitorServiceImpl.init(MonitorServiceImpl.java:24)
	at cn.wizzer.app.web.modules.controllers.platform.sys.SysLoginController.login(SysLoginController.java:64)
	at cn.wizzer.app.web.modules.controllers.platform.sys.SysLoginController$FM$login$a35f6ebc0a1eef31c8dcd6e1bc480f01.invoke(SysLoginController.java)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:30)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)

以上同样错误是我换了一种调用方式,利用@Inject方式引用实例的

换一种方式执行出现如下错误:

CacheManager cacheManager = ioc.get(CacheManager.class);
            log.debug("Ehcache CacheManager = " + cacheManager);
            log.info("\n _  _ _   _ _____ ______      ___  __\n" +
                    "| \\| | | | |_   _|_  /\\ \\    / / |/ /\n" +
                    "| .` | |_| | | |  / /  \\ \\/\\/ /| ' < \n" +
                    "|_|\\_|\\___/  |_| /___|  \\_/\\_/ |_|\\_\\");

            ControllCan controllCAN=new ControllCan();
            controllCAN.initDeviceCAN();
        } catch (Exception e) {
            e.printStackTrace();
        }

错误信息:

准备加载JAVAControlCAN
[DEBUG] 2017-09-25 16:12:23,721 org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3198) - Found 0 triggers that missed their scheduled fire-time.
加载JAVAControlCAN完毕
[INFO] Started ServerConnector@19eea77c{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
[INFO] Jetty server exiting.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 49.782 s
[INFO] Finished at: 2017-09-25T16:12:23+08:00
[INFO] Final Memory: 56M/698M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.jetty:jetty-maven-plugin:9.4.2.v20170220:run (default-cli) on project wk-web: Execution default-cli of goal org.eclipse.jetty:jetty-maven-plugin:9.4.2.v20170220:run failed: An API incompatibility was encountered while executing org.eclipse.jetty:jetty-maven-plugin:9.4.2.v20170220:run: java.lang.UnsatisfiedLinkError: cn.wizzer.app.doc.monitor.ControllCan.initDeviceCAN()I
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.eclipse.jetty:jetty-maven-plugin:9.4.2.v20170220
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/jetty-maven-plugin/9.4.2.v20170220/jetty-maven-plugin-9.4.2.v20170220.jar
[ERROR] urls[1] = file:/C:/Users/shufu_000/.m2/repository/org/sonatype/sisu/sisu-inject-bean/2.1.1/sisu-inject-bean-2.1.1.jar
[ERROR] urls[2] = file:/C:/Users/shufu_000/.m2/repository/org/sonatype/sisu/sisu-guice/2.9.4/sisu-guice-2.9.4-no_aop.jar
[ERROR] urls[3] = file:/C:/Users/shufu_000/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.6/plexus-utils-2.0.6.jar
[ERROR] urls[4] = file:/C:/Users/shufu_000/.m2/repository/org/sonatype/aether/aether-util/1.11/aether-util-1.11.jar
[ERROR] urls[5] = file:/C:/Users/shufu_000/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[6] = file:/C:/Users/shufu_000/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[7] = file:/C:/Users/shufu_000/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[8] = file:/C:/Users/shufu_000/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[9] = file:/C:/Users/shufu_000/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-tools-api/3.4/maven-plugin-tools-api-3.4.jar
[ERROR] urls[10] = file:/C:/Users/shufu_000/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[11] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/jetty-util/9.4.2.v20170220/jetty-util-9.4.2.v20170220.jar
[ERROR] urls[12] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/jetty-webapp/9.4.2.v20170220/jetty-webapp-9.4.2.v20170220.jar
[ERROR] urls[13] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/jetty-xml/9.4.2.v20170220/jetty-xml-9.4.2.v20170220.jar
[ERROR] urls[14] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/jetty-servlet/9.4.2.v20170220/jetty-servlet-9.4.2.v20170220.jar
[ERROR] urls[15] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/jetty-quickstart/9.4.2.v20170220/jetty-quickstart-9.4.2.v20170220.jar
[ERROR] urls[16] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/jetty-jaas/9.4.2.v20170220/jetty-jaas-9.4.2.v20170220.jar
[ERROR] urls[17] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/jetty-security/9.4.2.v20170220/jetty-security-9.4.2.v20170220.jar
[ERROR] urls[18] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/jetty-plus/9.4.2.v20170220/jetty-plus-9.4.2.v20170220.jar
[ERROR] urls[19] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/jetty-jndi/9.4.2.v20170220/jetty-jndi-9.4.2.v20170220.jar
[ERROR] urls[20] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/jetty-server/9.4.2.v20170220/jetty-server-9.4.2.v20170220.jar
[ERROR] urls[21] = file:/C:/Users/shufu_000/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar
[ERROR] urls[22] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/jetty-http/9.4.2.v20170220/jetty-http-9.4.2.v20170220.jar
[ERROR] urls[23] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/jetty-io/9.4.2.v20170220/jetty-io-9.4.2.v20170220.jar
[ERROR] urls[24] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/jetty-jmx/9.4.2.v20170220/jetty-jmx-9.4.2.v20170220.jar
[ERROR] urls[25] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/jetty-annotations/9.4.2.v20170220/jetty-annotations-9.4.2.v20170220.jar
[ERROR] urls[26] = file:/C:/Users/shufu_000/.m2/repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar
[ERROR] urls[27] = file:/C:/Users/shufu_000/.m2/repository/org/ow2/asm/asm/5.1/asm-5.1.jar
[ERROR] urls[28] = file:/C:/Users/shufu_000/.m2/repository/org/ow2/asm/asm-commons/5.1/asm-commons-5.1.jar
[ERROR] urls[29] = file:/C:/Users/shufu_000/.m2/repository/org/ow2/asm/asm-tree/5.1/asm-tree-5.1.jar
[ERROR] urls[30] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/websocket/javax-websocket-server-impl/9.4.2.v20170220/javax-websocket-server-impl-9.4.2.v20170220.jar
[ERROR] urls[31] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/websocket/javax-websocket-client-impl/9.4.2.v20170220/javax-websocket-client-impl-9.4.2.v20170220.jar
[ERROR] urls[32] = file:/C:/Users/shufu_000/.m2/repository/javax/websocket/javax.websocket-api/1.0/javax.websocket-api-1.0.jar
[ERROR] urls[33] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/websocket/websocket-server/9.4.2.v20170220/websocket-server-9.4.2.v20170220.jar
[ERROR] urls[34] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/websocket/websocket-common/9.4.2.v20170220/websocket-common-9.4.2.v20170220.jar
[ERROR] urls[35] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/websocket/websocket-api/9.4.2.v20170220/websocket-api-9.4.2.v20170220.jar
[ERROR] urls[36] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/websocket/websocket-client/9.4.2.v20170220/websocket-client-9.4.2.v20170220.jar
[ERROR] urls[37] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/jetty-client/9.4.2.v20170220/jetty-client-9.4.2.v20170220.jar
[ERROR] urls[38] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/websocket/websocket-servlet/9.4.2.v20170220/websocket-servlet-9.4.2.v20170220.jar
[ERROR] urls[39] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/apache-jsp/9.4.2.v20170220/apache-jsp-9.4.2.v20170220.jar
[ERROR] urls[40] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/toolchain/jetty-schemas/3.1/jetty-schemas-3.1.jar
[ERROR] urls[41] = file:/C:/Users/shufu_000/.m2/repository/org/mortbay/jasper/apache-jsp/8.5.9.1/apache-jsp-8.5.9.1.jar
[ERROR] urls[42] = file:/C:/Users/shufu_000/.m2/repository/org/mortbay/jasper/apache-el/8.5.9.1/apache-el-8.5.9.1.jar
[ERROR] urls[43] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2.jar
[ERROR] urls[44] = file:/C:/Users/shufu_000/.m2/repository/org/eclipse/jetty/apache-jstl/9.4.2.v20170220/apache-jstl-9.4.2.v20170220.jar
[ERROR] urls[45] = file:/C:/Users/shufu_000/.m2/repository/org/apache/taglibs/taglibs-standard-spec/1.2.5/taglibs-standard-spec-1.2.5.jar
[ERROR] urls[46] = file:/C:/Users/shufu_000/.m2/repository/org/apache/taglibs/taglibs-standard-impl/1.2.5/taglibs-standard-impl-1.2.5.jar
[ERROR] urls[47] = file:/C:/Users/shufu_000/.m2/repository/javax/transaction/javax.transaction-api/1.2/javax.transaction-api-1.2.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
Exception in thread "Thread-1" java.lang.NoClassDefFoundError: org/eclipse/jetty/io/ManagedSelector$CloseEndPoints
	at org.eclipse.jetty.io.ManagedSelector.doStop(ManagedSelector.java:135)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:142)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:160)
	at org.eclipse.jetty.io.SelectorManager.doStop(SelectorManager.java:257)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:142)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:160)
	at org.eclipse.jetty.client.AbstractHttpClientTransport.doStop(AbstractHttpClientTransport.java:87)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:142)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:160)
	at org.eclipse.jetty.client.HttpClient.doStop(HttpClient.java:254)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:142)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:160)
	at org.eclipse.jetty.websocket.client.WebSocketClient.doStop(WebSocketClient.java:376)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:142)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:160)
	at org.eclipse.jetty.websocket.jsr356.ClientContainer.doStop(ClientContainer.java:214)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
	at org.eclipse.jetty.util.thread.ShutdownThread.run(ShutdownThread.java:138)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.io.ManagedSelector$CloseEndPoints
	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
	... 23 more

是不是有多个dll,版本冲突了

同样的代码,我新建一个纯净的idea项目,把代码放进去执行是没有问题的,我是想用nutz这个框架装这个就出问题了!

添加回复
请先登陆
回到顶部