我正在使用springboot 1.2.7进行新项目,并且在启动过程中很难找到配置错误。 每次我有错误,它都不会显示在控制台中,我只有:
2015-11-20 14:36:38.533 ERROR 5200 --- [ main] o.a.coyote.http11.Http11NioProtocol : Failed to destroy end point associated with ProtocolHandler ["http-nio-8080"]
java.lang.NullPointerException: null
at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:307)
at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:482)
at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:795)
at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:531)
at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:588)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:850)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
2015-11-20 14:36:38.538 ERROR 5200 --- [ main] o.a.coyote.http11.Http11NioProtocol : Failed to destroy end point associated with ProtocolHandler ["http-nio-8443"]
java.lang.NullPointerException: null
at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:307)
at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:482)
at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:795)
at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:531)
at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:588)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:850)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
我尝试放置一些断点,但找不到真正导致此错误的内容。
在这种情况下,当我在服务中添加“@Transactional”时出现此错误... 如果我删除@Transactional,则正常启动springboot。
对于所有conf问题都有这个问题,它使我的调试需要很长时间才能找到初始错误。
我正在使用logback,日志级别设置为DEBUG。
谢谢!
答案 0 :(得分:0)
找到解决方案:我需要在我的tomcat启动命令中添加-Ddebug,它会在启动过程中显示错误。