Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 访问网页时出现问题(在wildfly上上载)_Java_Docker_Spring Boot_Wildfly_War - Fatal编程技术网

Java 访问网页时出现问题(在wildfly上上载)

Java 访问网页时出现问题(在wildfly上上载),java,docker,spring-boot,wildfly,war,Java,Docker,Spring Boot,Wildfly,War,使用以下命令创建docker容器: docker run -p 8080:8080 -p 9990:9990 --name wildfly -d -it jboss/wildfly `/opt/jboss/wildfly/bin/standalone.sh -bmanagement 0.0.0.0` 当我创建docker容器时,我通过管理员页面上传war文件,我可以在端口9990上访问该页面。从日志文件中可以看到,war文件的上载 成功结束,上下文路径为/TestProject,但当我尝试访问

使用以下命令创建docker容器:

docker run -p 8080:8080 -p 9990:9990 --name wildfly -d -it jboss/wildfly `/opt/jboss/wildfly/bin/standalone.sh -bmanagement 0.0.0.0`
当我创建docker容器时,我通过管理员页面上传war文件,我可以在
端口9990上访问该页面。从日志文件中可以看到,war文件的上载
成功结束,上下文路径为
/TestProject
,但当我尝试访问broswer()时,收到的消息是
“此页面不工作”
。 war文件在本地安装的wildfly上进行了测试,并且运行正常

日志文件:

 12:24:01,974 WARN  [org.jboss.as.ee] (MSC service thread 1-1) WFLYEE0007: Not installing optional component org.springframework.web.context.request.async.StandardServletAsyncWebRequest due to an exception (enable DEBUG log level to see the cause)
12:24:02,135 INFO  [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-4) ISPN000128: Infinispan version: Infinispan 'Chakra' 8.2.8.Final
12:24:02,464 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 62) WFLYCLINF0002: Started client-mappings cache from ejb container
12:24:02,580 INFO  [io.undertow.servlet] (ServerService Thread Pool -- 66) 2 Spring WebApplicationInitializers detected on classpath
12:24:03,175 INFO  [stdout] (ServerService Thread Pool -- 66)
12:24:03,176 INFO  [stdout] (ServerService Thread Pool -- 66)   .   ____          _            __ _ _
12:24:03,176 INFO  [stdout] (ServerService Thread Pool -- 66)  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
12:24:03,176 INFO  [stdout] (ServerService Thread Pool -- 66) ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
12:24:03,176 INFO  [stdout] (ServerService Thread Pool -- 66)  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
12:24:03,177 INFO  [stdout] (ServerService Thread Pool -- 66)   '  |____| .__|_| |_|_| |_\__, | / / / /
12:24:03,177 INFO  [stdout] (ServerService Thread Pool -- 66)  =========|_|==============|___/=/_/_/_/
12:24:03,179 INFO  [stdout] (ServerService Thread Pool -- 66)  :: Spring Boot ::        (v1.4.2.RELEASE)
12:24:03,180 INFO  [stdout] (ServerService Thread Pool -- 66)
12:24:03,252 INFO  [com.musala.test.project.TestProjectApplication] (ServerService Thread Pool -- 66) Starting TestProjectApplication on 18aafab37ce1 with PID 53 (started by jboss in /opt/jboss)
12:24:03,253 INFO  [com.musala.test.project.TestProjectApplication] (ServerService Thread Pool -- 66) No active profile set, falling back to default profiles: default
12:24:03,296 INFO  [org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext] (ServerService Thread Pool -- 66) Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@4750038e: startup date [Wed Nov 08 12:24:03 UTC 2017]; root of context hierarchy
12:24:04,106 INFO  [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor] (ServerService Thread Pool -- 66) JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
12:24:04,134 INFO  [io.undertow.servlet] (ServerService Thread Pool -- 66) Initializing Spring embedded WebApplicationContext
12:24:04,135 INFO  [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 66) Root WebApplicationContext: initialization completed in 840 ms
12:24:04,581 INFO  [org.springframework.boot.web.servlet.ServletRegistrationBean] (ServerService Thread Pool -- 66) Mapping servlet: 'dispatcherServlet' to [/]
12:24:04,585 INFO  [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 66) Mapping filter: 'errorPageFilter' to: [/*]
12:24:04,588 INFO  [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 66) Mapping filter: 'characterEncodingFilter' to: [/*]
12:24:04,588 INFO  [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 66) Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
12:24:04,589 INFO  [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 66) Mapping filter: 'httpPutFormContentFilter' to: [/*]
12:24:04,589 INFO  [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 66) Mapping filter: 'requestContextFilter' to: [/*]
12:24:04,766 INFO  [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter] (ServerService Thread Pool -- 66) Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@4750038e: startup date [Wed Nov 08 12:24:03 UTC 2017]; root of context hierarchy
12:24:04,808 INFO  [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] (ServerService Thread Pool -- 66) Mapped "{[/hello]}" onto public java.lang.String com.musala.test.project.TestController.test()
12:24:04,813 INFO  [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] (ServerService Thread Pool -- 66) Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
12:24:04,813 INFO  [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] (ServerService Thread Pool -- 66) Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
12:24:04,853 INFO  [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] (ServerService Thread Pool -- 66) Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
12:24:04,853 INFO  [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] (ServerService Thread Pool -- 66) Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
12:24:04,877 INFO  [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] (ServerService Thread Pool -- 66) Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
12:24:04,986 INFO  [org.springframework.jmx.export.annotation.AnnotationMBeanExporter] (ServerService Thread Pool -- 66) Registering beans for JMX exposure on startup
12:24:04,997 INFO  [com.musala.test.project.TestProjectApplication] (ServerService Thread Pool -- 66) Started TestProjectApplication in 2.33 seconds (JVM running for 1132.907)
12:24:05,044 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 66) Initializing Mojarra 2.2.13.SP4  for context '/TestProject'
12:24:05,911 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 66) WFLYUT0021: Registered web context: '/TestProject' for server 'default-server'
12:24:05,986 INFO  [org.jboss.as.server] (External Management Request Threads -- 6) WFLYSRV0010: Deployed "TestProject.war" (runtime-name : "TestProject.war")
12:24:01974警告[org.jboss.as.ee](MSC服务线程1-1)WFLYEE0007:由于异常,未安装可选组件org.springframework.web.context.request.async.StandardServletAsyncWebRequest(启用调试日志级别以查看原因)
12:24:02135信息[org.infinispan.factories.GlobalComponentRegistry](MSC服务线程1-4)ISPN000128:infinispan版本:infinispan'Chakra'8.2.8.Final
12:24:02464 INFO[org.jboss.as.clustering.infinispan](服务器服务线程池--62)WFLYCLINF0002:已从ejb容器启动客户端映射缓存
12:24:02580信息[io.undertow.servlet](服务器服务线程池--66)在类路径上检测到2个Spring WebApplicationInitializers
12:24:03175信息[stdout](服务器服务线程池--66)
12:24:03176信息[stdout](服务器服务线程池--66)。\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuu_
12:24:03176信息[stdout](服务器服务线程池--66)/\\\\/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
12:24:03176信息[stdout](服务器服务线程池--66)(()\\\\\\\\\\\\\\\\\\\\\\'\\\\\\\'\\\\\\'\\\\\\\\\\\\\\\\\\\\\\\\\'\
12:24:03176信息[stdout](服务器服务线程池--66)\\/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
12:24:03177信息[stdout](服务器服务线程池--66)| | | | | | | | | | | | | | | | | |///
12:24:03177信息[stdout](服务器服务线程池--66)=========|_|==============|___/=/_/_/_/
12:24:03179信息[stdout](服务器服务线程池--66)::Spring启动::(v1.4.2.RELEASE)
12:24:03180信息[stdout](服务器服务线程池--66)
12:24:03252信息[com.musala.test.project.TestProjectApplication](ServerService线程池--66)在18aafab37ce1上以PID 53启动TestProjectApplication(由jboss在/opt/jboss中启动)
12:24:03253信息[com.musala.test.project.TestProjectApplication](ServerService线程池--66)未设置活动配置文件,返回默认配置文件:默认
12:24:03296信息[org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext](服务器服务线程池--66)刷新org.springframework.boot.context.embedded。AnnotationConfigEmbeddedWebApplicationContext@4750038e:启动日期[2017年11月8日星期三12:24:03 UTC];上下文层次结构的根
12:24:04106信息[org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor](ServerService线程池--66)找到并支持JSR-330“javax.inject.inject”注释以进行自动连接
12:24:04134信息[io.undertow.servlet](服务器服务线程池--66)初始化Spring嵌入式WebApplicationContext
12:24:04135信息[org.springframework.web.context.ContextLoader](ServerService线程池--66)根WebApplicationContext:初始化在840毫秒内完成
12:24:04581信息[org.springframework.boot.web.servlet.ServletRegistrationBean](ServerService线程池--66)将servlet:'dispatcherServlet'映射到[/]
12:24:04585信息[org.springframework.boot.web.servlet.FilterRegistrationBean](ServerService线程池--66)将筛选器:“errorPageFilter”映射到:[/*]
12:24:04588信息[org.springframework.boot.web.servlet.FilterRegistrationBean](ServerService线程池--66)将筛选器:“characterEncodingFilter”映射到:[/*]
12:24:04588信息[org.springframework.boot.web.servlet.FilterRegistrationBean](服务器服务线程池--66)将筛选器:“hiddenHttpMethodFilter”映射到:[/*]
12:24:04589信息[org.springframework.boot.web.servlet.FilterRegistrationBean](服务器服务线程池--66)将筛选器:“httpPutFormContentFilter”映射到:[/*]
12:24:04589信息[org.springframework.boot.web.servlet.FilterRegistrationBean](ServerService线程池--66)将筛选器:“requestContextFilter”映射到:[/*]
12:24:04766 INFO[org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter](服务器服务线程池--66)正在查找@ControllerAdvice:org.springframework.boot.context.embedded。AnnotationConfigEmbeddedWebApplicationContext@4750038e:启动日期[2017年11月8日星期三12:24:03 UTC];上下文层次结构的根
12:24:04808 INFO[org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping](ServerService线程池--66)将“{[/hello]}”映射到公共java.lang.String.com.musala.test.project.TestController.test()上
12:24:04813 INFO[org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping](ServerService线程池--66)将“{[/error],products=[text/html]}”映射到public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
12:24:04813 INFO[org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping](ServerService线程池--66)将“{[/error]}”映射到public org.springframework.http.ResponseEntity org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
12:24:04853 INFO[org.springframework.web.servlet.handler.SimpleUrlHandlerMapping](ServerService线程池--66)将URL路径[/webjars/**]映射到[class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]类型的处理程序上
12:24:04853 INFO[org.springframework.web.servlet.handler.SimpleUrlHandlerMapping](ServerService线程池--66)将URL路径[/**]映射到[class或
docker run -p 8080:8080 -p 9990:9990 --name wildfly -d -it jboss/wildfly `/opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0`