【发布时间】:2017-02-06 13:09:13
【问题描述】:
我正在尝试运行我的 Springboot 应用程序。我需要连接到我的 Oracle 数据库,但我收到与安装它的端口相关的错误。这是一个 Oracle 11g Express Edition 安装。然后我应该更改我的 Oracle 安装的端口吗?如果是,如何更改?
***************************
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.
2017-02-06 13:58:27.402 INFO 6432 --- [ main] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@45a48c09: startup date [Mon Feb 06 13:58:15 CET 2017]; root of context hierarchy
2017-02-06 13:58:27.404 INFO 6432 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
2017-02-06 13:58:27.406 INFO 6432 --- [ main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2017-02-06 13:58:27.406 INFO 6432 --- [ main] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed drop of schema as part of SessionFactory shut-down'
Hibernate: drop table tmt.users cascade constraints
2017-02-06 13:58:27.516 ERROR 6432 --- [ main] .SchemaDropperImpl$DelayedDropActionImpl : HHH000478: Unsuccessful: drop table tmt.users cascade constraints
Hibernate: drop sequence tmt.id_seq
2017-02-06 13:58:27.528 ERROR 6432 --- [ main] .SchemaDropperImpl$DelayedDropActionImpl : HHH000478: Unsuccessful: drop sequence tmt.id_seq
[WARNING]
java.lang.reflect.InvocationTargetException
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.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:527)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.boot.context.embedded.tomcat.ConnectorStartFailedException: Connector configured to listen on port 8080 failed to start
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.checkThatConnectorsHaveStarted(TomcatEmbeddedServletContainer.java:213)
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:189)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:297)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:145)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:784)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:329)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1235)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1224)
at cz.nnit.TmtApplication.main(TmtApplication.java:14)
... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.689 s
[INFO] Finished at: 2017-02-06T13:58:27+01:00
[INFO] Final Memory: 56M/482M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.0.BUILD-SNAPSHOT:run (default-cli) on project tmt: An exception occurred while running. null: InvocationTargetException: Connector configured to listen on port 8080 failed to start -> [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/MojoExecutionException
Process finished with exit code 1
【问题讨论】:
-
你读过异常吗?您正在默认端口 8080 上启动 tomcat,显然某些东西已经在端口 8080 上侦听。
-
是的,这就是我的问题的标题和摘要所说的......我不确定如何强制更改我的 Oracle 数据库的端口。
-
您再次阅读堆栈跟踪和错误...从您的评论来看,您没有...不是在抱怨您的 oracle db,而是在抱怨您的 tomcat 启动... . 我非常怀疑你的 OracleDB 是在 8080 端口上运行的......
-
对不起,我应该提供证据。我会更新的。我的 OracleDB 实际上是在 8080 上运行的。
标签: oracle spring-boot