开战战争部署

时间:2014-04-28 04:01:21

标签: openshift

这是一个OPENSHIFT问题!我安装了一个将war文件复制到Tomcat EWS 3.0实例的jenkins服务器,我可以看到构建完成并成功并且war被复制到目标并且目标tomcat是远程启动的。但我看不到我的应用程序出现,日志文件没有错误???

以下是一些细节;

[jbossews-xxxxxxxx.rhcloud.com app-deployments]\> tree
.
├── 2014-04-27_23-48-23.365
│   ├── build-dependencies
│   ├── dependencies
│   │   └── jbossews
│   │       └── webapps
│   │           └── xxxxxx.war
│   ├── metadata.json
│   └── repo
├── by-id
│   └── 2021c27d -> ../2014-04-27_23-48-23.365
└── current -> 2014-04-27_23-48-23.365

9 directories, 2 files

==> app-root/logs/jbossews.log <==
Apr 27, 2014 11:49:38 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/openshift/XXXXXXXXX/app-root/runtime/dependencies/jbossews/webapps/xxxxxx.war
Apr 27, 2014 11:49:49 PM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
INFO: No global web.xml found
Apr 27, 2014 11:51:32 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Apr 27, 2014 11:51:32 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-XXX.XXX.XXX.XXX-8080"]
Apr 27, 2014 11:51:32 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 114109 ms

没有错误消息???并根据日志部署战争!我不确定我在这里做错了什么?提前感谢您的回复。

更新#1(2014年4月28日) 我已经能够更改日志记录级别能够看到一些错误

INFO: Starting ProtocolHandler ["http-bio-127.7.239.129-8080"]
Apr 26, 2014 9:45:58 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5176 ms
Apr 27, 2014 1:50:54 AM org.apache.catalina.startup.Catalina addClusterRuleSet
INFO: Cluster RuleSet not found due to [java.lang.ClassNotFoundException: org.apache.catalina.ha.ClusterRuleSet]. Cluster configuration disabled.
Apr 27, 2014 1:50:54 AM org.apache.catalina.startup.Catalina addClusterRuleSet
INFO: Cluster RuleSet not found due to [java.lang.ClassNotFoundException: org.apache.catalina.ha.ClusterRuleSet]. Cluster configuration disabled.
Apr 27, 2014 1:50:55 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386:/opt/rh/mysql55/root/usr/lib64:/usr/java/packages/lib/i386:/lib:/usr/lib
Apr 27, 2014 1:50:56 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-127.7.239.129-8080"]
Apr 27, 2014 1:50:57 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3105 ms
...skipping...
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1654)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NoClassDefFoundError: org/apache/catalina/filters/CorsFilter
        at com.aug70.redrum.config.AppInitializer.onStartup(AppInitializer.java:26)
        at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:174)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5370)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 10 more
Caused by: java.lang.ClassNotFoundException: org.apache.catalina.filters.CorsFilter
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
        ... 14 more
Apr 28, 2014 12:06:59 PM org.apache.catalina.startup.HostConfig deployWAR
SEVERE: Error deploying web application archive /var/lib/openshift/535c61315973ca75e10000b6/app-root/runtime/dependencies/jbossews/webapps/redrum.war
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/redrum]]
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1654)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
Apr 28, 2014 12:06:59 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-127.7.239.129-8080"]
Apr 28, 2014 12:06:59 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 132197 ms

1 个答案:

答案 0 :(得分:0)

在我的代码中嵌入Tomcat CorsFilter解决了我的问题...