当前位置: 首页 > 知识库问答 >
问题:

我在控制台中打印了这种错误

鞠边浩
2023-03-14

我从昨天开始就试图解决这个问题,但没有解决。请帮我解决。我该怎么解决这个?我正在尝试部署我的第一个springboot web应用程序

你想知道什么我在控制台出错了。我从各个方面尝试了整个应用程序。我想是服务器问题

    .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.3.RELEASE)

    2019-03-14 14:22:33.105  INFO 4640 --- [  restartedMain] 
    com.application.StudentApplication       : Starting StudentApplication on A- 
    PC with PID 4640 
    (C:\Users\A\Desktop\sushovan_java\apringhibernatejpademo\target\classes 
    started by A in C:\Users\A\Desktop\sushovan_java\apringhibernatejpademo)
    2019-03-14 14:22:33.115  INFO 4640 --- [  restartedMain] 
    com.application.StudentApplication       : No active profile set, falling 
    back to default profiles: default
    2019-03-14 14:22:33.246  INFO 4640 --- [  restartedMain] 
    .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults 
    active! Set 'spring.devtools.add-properties' to 'false' to disable
2019-03-14 14:22:33.246  INFO 4640 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2019-03-14 14:22:35.509  INFO 4640 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
2019-03-14 14:22:35.549  INFO 4640 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 26ms. Found 0 repository interfaces.
2019-03-14 14:22:36.717  INFO 4640 --- [  restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$6f75cc55] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-03-14 14:22:37.776  INFO 4640 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2019-03-14 14:22:37.846  INFO 4640 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-03-14 14:22:37.853  INFO 4640 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.16]
2019-03-14 14:22:37.878  INFO 4640 --- [  restartedMain] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\JAVA\jre1.8.0_202\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_202/bin/server;C:/Program Files/Java/jre1.8.0_202/bin;C:/Program Files/Java/jre1.8.0_202/lib/amd64;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\eclipse;;.]
2019-03-14 14:22:38.553  INFO 4640 --- [  restartedMain] org.apache.jasper.servlet.TldScanner     : At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2019-03-14 14:22:38.565  INFO 4640 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-03-14 14:22:38.567  INFO 4640 --- [  restartedMain] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 5320 ms
2019-03-14 14:22:39.148  INFO 4640 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2019-03-14 14:22:39.529  INFO 4640 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2019-03-14 14:22:39.668  INFO 4640 --- [  restartedMain] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
    name: default
    ...]
2019-03-14 14:22:39.834  INFO 4640 --- [  restartedMain] org.hibernate.Version                    : HHH000412: Hibernate Core {5.3.7.Final}
2019-03-14 14:22:39.837  INFO 4640 --- [  restartedMain] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
2019-03-14 14:22:40.215  INFO 4640 --- [  restartedMain] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
2019-03-14 14:22:40.524  INFO 4640 --- [  restartedMain] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2019-03-14 14:22:41.156  INFO 4640 --- [  restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2019-03-14 14:22:41.200  INFO 4640 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2019-03-14 14:22:41.812  INFO 4640 --- [  restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2019-03-14 14:22:41.933  WARN 4640 --- [  restartedMain] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2019-03-14 14:22:42.154  WARN 4640 --- [  restartedMain] ion$DefaultTemplateResolverConfiguration : Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf configuration)
2019-03-14 14:22:42.698 ERROR 4640 --- [  restartedMain] org.apache.catalina.util.LifecycleBase   : Failed to start component [Connector[HTTP/1.1-8080]]

org.apache.catalina.LifecycleException: Protocol handler start failed
    at org.apache.catalina.connector.Connector.startInternal(Connector.java:1008) ~[catalina.jar:9.0.16]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:9.0.16]
    at org.apache.catalina.core.StandardService.addConnector(StandardService.java:226) [catalina.jar:9.0.16]
    at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:259) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
    at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:197) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:311) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:164) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) [spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
    at com.application.StudentApplication.main(StudentApplication.java:13) [classes/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_202]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_202]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_202]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_202]
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.1.3.RELEASE.jar:2.1.3.RELEASE]
Caused by: java.net.BindException: Address already in use: bind
    at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_202]
    at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.8.0_202]
    at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.8.0_202]
    at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) ~[na:1.8.0_202]
    at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) ~[na:1.8.0_202]
    at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:236) ~[tomcat-coyote.jar:9.0.16]
    at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210) ~[tomcat-coyote.jar:9.0.16]
    at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1085) ~[tomcat-coyote.jar:9.0.16]
    at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1171) ~[tomcat-coyote.jar:9.0.16]
    at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:568) ~[tomcat-coyote.jar:9.0.16]
    at org.apache.catalina.connector.Connector.startInternal(Connector.java:1005) ~[catalina.jar:9.0.16]
    ... 19 common frames omitted

2019-03-14 14:22:42.723  INFO 4640 --- [  restartedMain] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2019-03-14 14:22:42.747  INFO 4640 --- [  restartedMain] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-03-14 14:22:42.751 ERROR 4640 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured.

Action:

Verify the connector's configuration, identify and stop any process that's listening on port 8080, or configure this application to listen on another port.

2019-03-14 14:22:42.762  INFO 4640 --- [  restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'
2019-03-14 14:22:42.766  INFO 4640 --- [  restartedMain] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2019-03-14 14:22:42.771  INFO 4640 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2019-03-14 14:22:42.789  INFO 4640 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.

共有1个答案

金嘉
2023-03-14

根据您的异常stacktrace,

Caused by: java.net.BindException: Address already in use: bind

计算机上的端口8080已被另一个进程使用。

解决方案

    null
 类似资料:
  • 我试图使用TDD(测试驱动开发)与。当我使用时,不会到控制台。 我正在使用来运行它。 似乎说默认情况下它应该工作:http://pytest.org/latest/capture.html 但是: 没有任何东西被打印到我的标准输出控制台(只是正常的进度和多少测试通过/失败)。 我正在测试的脚本包含打印: 在模块中,默认情况下打印所有内容,这正是我所需要的。但是,出于其他原因,我希望使用。 有人知道

  • 由来 编码中我们常常需要调试输出一些信息,除了打印日志,最长用的要数System.out和System.err 比如我们打印一个Hello World,可以这样写: System.out.println("Hello World"); 但是面对纷杂的打印需求,System.out.println无法满足,比如: 不支持参数,对象打印需要拼接字符串 不能直接打印数组,需要手动调用Arrays.to

  • 问题内容: 我的配置:Win7 + Python 2.6 + eclipse + PyDev 如何在以下位置启用Unicode打印语句: Eclipse中的PyDev控制台 空闲的Python GUI 打印语句示例: 结果如下: 问题答案: 对于Eclipse Unicode控制台支持: 添加到eclipse安装目录中。 在日食中-确保选择UTF-8 在日食中-确保选择了UTF-8 从-更改为 确

  • 控制台日志是一个强大的方法,用来检查您的页面或应用程序。让我们从console.log()开始,探索其他高级用法。 TL;DR 使用console.log()进行基本日志记录 使用console.erroe()和console.warn()获取醒目的内容 使用console.group()和console.groupEnd()来分组相关消息,避免混乱 使用console.assert()显示条件语

  • 打印是不属于 JavaScript 语言标准的功能。但是,我们在这里进行的所有操作,浏览器和 Node.js 都是支持的。 打印意味着“在控制台上显示内容”,其中“控制台”是浏览器控制台或运行 Node.js 的终端。 完整的console.* API 在 MDN 的网页 以及 Node.js 官网都有相关文档。接下来我们将快速浏览以下两个操作: console.log() console.err

  • 问题内容: 我的C程序粘贴在下面。在bash中,程序打印“ char is”,不打印Ω。我的语言环境均为en_US.utf8。 问题答案: 这很有趣。显然,编译器将omega从UTF-8转换为UNICODE,但libc某种程度上将其弄乱了。 首先:-format说明符期望一个(即使在wprintf -version 中也是如此),因此您必须指定(并因此指定字符串)。 其次,如果您像这样将语言环境设