NutzCN Logo
问答 nutz在idea中编译报错
发布于 2360天前 作者 zxfa 1740 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ wk-nb-web-api ---
[INFO] Surefire report directory: C:\Users\Administrator\Desktop\NutzWk-nutzboot-dubbo\NutzWk-nutzboot-dubbo\wk-app\wk-nb-web-api\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------



.WebAppContext@7a362b6b{/,[],AVAILABLE}
[ERROR] 17:40:54.897 org.nutz.boot.NbApp.execute(NbApp.java:218) - something happen!!
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:340)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:308)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:244)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:398)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.nutz.boot.starter.jetty.JettyStarter.start(JettyStarter.java:124)
at org.nutz.boot.AppContext.startServers(AppContext.java:306)
at org.nutz.boot.NbApp.execute(NbApp.java:204)
at org.nutz.boot.test.junit4.NbJUnit4Runner.runChild(NbJUnit4Runner.java:59)
at org.nutz.boot.test.junit4.NbJUnit4Runner.runChild(NbJUnit4Runner.java:20)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
[DEBUG] 17:40:54.922 org.nutz.ioc.impl.NutIoc.g

```

11 回复

这是nutzwk吧

大神,怎么解决???

不是写着端口被占用吗?

我就启动这个,怎么会端口被占用呢?这个端口在哪改啊?

先把单元测试跳过吧

怎么跳?给个代码呗

把testcase注释掉

或者删掉

要是你熟悉idea操作的话,maven知道的地方配一下也ok

启动Tomcat报错?

[WARN ] 18:10:19.919 org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1162) - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141)
[DEBUG] 18:10:19.927 org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:203) - Ignoring exception during shutdown input
java.nio.channels.ClosedChannelException
	at sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:780)
	at sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:399)
	at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:200)
	at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1246)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1170)
[DEBUG] 18:10:19.927 org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:210) - Ignoring exception during shutdown output
java.nio.channels.ClosedChannelException
	at sun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:797)
	at sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:407)
	at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:207)
	at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1246)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1170)
[INFO ] 18:10:21.030 org.apache.zookeeper.ClientCnxn$SendThread.logStartConnect(ClientCnxn.java:1032) - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
[WARN ] 18:10:22.034 org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1162) - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141)
[DEBUG] 18:10:22.034 org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:203) - Ignoring exception during shutdown input
java.nio.channels.ClosedChannelException
	at sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:780)
	at sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:399)
	at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:200)
	at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1246)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1170)
[DEBUG] 18:10:22.035 org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:210) - Ignoring exception during shutdown output
java.nio.channels.ClosedChannelException
	at sun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:797)
	at sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:407)
	at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:207)
	at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1246)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1170)
[INFO ] 18:10:23.135 org.apache.zookeeper.ClientCnxn$SendThread.logStartConnect(ClientCnxn.java:1032) - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
[WARN ] 18:10:24.138 org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1162) - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141)

缺zk,下载,按官网要求启动之

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