- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我试图将我的项目推送到 openshift 服务器,在服务器上进行 Maven 构建时最终出现此错误:
[INFO] Packaging webapp
[INFO] Assembling webapp [sani3ee] in [/var/lib/openshift/54f479214382ec83330000bd/app-root/runtime/repo/target/sani3ee]
[INFO] Processing war project
[INFO] Copying webapp resources [/var/lib/openshift/54f479214382ec83330000bd/app-root/runtime/repo/src/main/webapp]
[INFO] Webapp assembled in [112 msecs]
[INFO] Building war: /var/lib/openshift/54f479214382ec83330000bd/app-root/runtime/repo/webapps/ROOT.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31.677s
[INFO] Finished at: Sat Mar 07 14:01:05 EST 2015
[INFO] Final Memory: 9M/139M
[INFO] ------------------------------------------------------------------------
Preparing build for deployment
Deployment id is c2062771
Activating deployment
Starting PHPMyAdmin cartridge
Starting MySQL 5.5 cartridge
Stopping jbossews cartridge
Sending SIGTERM to jboss:514412 ...
Stopping PHPMyAdmin cartridge
Waiting for stop to finish
Waiting for stop to finish
Stopping MySQL 5.5 cartridge
Repairing links for 1 deployments
Building git ref 'master', commit 0d1853f
Using Maven mirror /var/lib/openshift/54f479214382ec83330000bd/app-root/runtime/repo//.openshift/config/settings.rhcloud.xml
Apache Maven 3.0.4 (r1232336; 2012-12-18 14:36:37-0500)
Maven home: /usr/share/java/apache-maven-3.0.4
Java version: 1.7.0_75, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "2.6.32-504.3.3.el6.x86_64", arch: "i386", family: "unix"
Found pom.xml... attempting to build with 'mvn --global-settings /var/lib/openshift/54f479214382ec83330000bd/app-root/runtime/repo//.openshift/config/settings.rhcloud.xml clean package -Popenshift -DskipTests'
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Sani3ee 1.0.0-BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ sani3ee ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ sani3ee ---
[debug] execute contextualize
[WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ sani3ee ---
[WARNING] File encoding has not been set, using platform encoding ANSI_X3.4-1968, i.e. build is platform dependent!
[INFO] Compiling 58 source files to /var/lib/openshift/54f479214382ec83330000bd/app-root/runtime/repo/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] bootstrap class path not set in conjunction with -source 1.6
/var/lib/openshift/54f479214382ec83330000bd/app-root/runtime/repo/src/main/java/com/itworx/sani3ee/dao/favorite/FavoriteDaoImpl.java:[84,51] error: diamond operator is not supported in -source 1.6
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.823s
[INFO] Finished at: Sat Mar 07 14:35:34 EST 2015
[INFO] Final Memory: 8M/113M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "openshift" could not be activated because it does not exist.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project sani3ee: Compilation failure
[ERROR] bootstrap class path not set in conjunction with -source 1.6
[ERROR] /var/lib/openshift/54f479214382ec83330000bd/app-root/runtime/repo/src/main/java/com/itworx/sani3ee/dao/favorite/FavoriteDaoImpl.java:[84,51] error: diamond operator is not supported in -source 1.6
[ERROR] -> [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/MojoFailureException
An error occurred executing 'gear postreceive' (exit code: 1)
Error message: CLIENT_ERROR: Failed to execute: 'control build' for /var/lib/openshift/54f479214382ec83330000bd/jbossews
For more details about the problem, try running the command again with the '--trace' option.
我不知道这里出了什么问题,我已经尝试修复这个问题有一段时间了,它在我的本地计算机上构建得很好,而且 openshift 也认识到它应该使用 JDK 7 构建,提前感谢大家:)
编辑:这是 tomcat 日志,它表明我猜应用程序部署正确。
Mar 08, 2015 11:01:07 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-127.7.36.1-8080"]
Mar 08, 2015 11:01:07 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-127.7.36.1-8080"]
Mar 08, 2015 11:02:29 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.
Mar 08, 2015 11:02:29 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.
Mar 08, 2015 11:02:30 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: /opt/rh/mysql55/root/usr/lib64:/usr/java/packages/lib/i386:/lib:/usr/lib
Mar 08, 2015 11:02:31 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-127.7.36.1-8080"]
Mar 08, 2015 11:02:31 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1867 ms
Mar 08, 2015 11:02:31 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 08, 2015 11:02:31 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.54
Mar 08, 2015 11:02:31 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/openshift/54f479214382ec83330000bd/app-root/runtime/dependencies/jbossews/webapps/ROOT.war
INFO : org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
INFO : org.springframework.web.context.support.XmlWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Sun Mar 08 11:02:50 EDT 2015]; root of context hierarchy
INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/config/BeanLocations.xml]
INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/database/DataSource.xml]
INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/database/Hibernate.xml]
INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/database/hibernate.cfg.xml]
INFO : org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from ServletContext resource [/WEB-INF/properties/database.properties]
WARN : org.hibernate.mapping.RootClass - HHH000038: Composite-id class does not override equals(): com.itworx.sani3ee.model.Favorite
WARN : org.hibernate.mapping.RootClass - HHH000039: Composite-id class does not override hashCode(): com.itworx.sani3ee.model.Favorite
INFO : org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 24507 ms
Mar 08, 2015 11:03:14 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Mar 08, 2015 11:03:14 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [] startup failed due to previous errors
log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.XmlWebApplicationContext).
log4j:WARN Please initialize the log4j system properly.
Mar 08, 2015 11:03:14 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Mar 08, 2015 11:03:14 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak.
Mar 08, 2015 11:03:14 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Resource Destroyer in BasicResourcePool.close()] but has failed to stop it. This is very likely to create a memory leak.
Mar 08, 2015 11:03:14 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /var/lib/openshift/54f479214382ec83330000bd/app-root/runtime/dependencies/jbossews/webapps/ROOT.war has finished in 43,453 ms
Mar 08, 2015 11:03:14 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-127.7.36.1-8080"]
Mar 08, 2015 11:03:14 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 43689 ms
Mar 09, 2015 12:03:22 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-127.7.36.1-8080"]
Mar 09, 2015 12:03:22 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Mar 09, 2015 12:03:22 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-127.7.36.1-8080"]
Mar 09, 2015 12:03:22 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-127.7.36.1-8080"]
Mar 14, 2015 4:41:16 PM org.apache.catalina.startup.Catalina addClusterRuleSet
INFO: Cluster RuleSet not found due to [java.lang.ClassNotFoundException: org.apache.catalina.ha.ClusterRuleSet]. Cluster configuration disabled.
Mar 14, 2015 4:41:16 PM org.apache.catalina.startup.Catalina addClusterRuleSet
INFO: Cluster RuleSet not found due to [java.lang.ClassNotFoundException: org.apache.catalina.ha.ClusterRuleSet]. Cluster configuration disabled.
Mar 14, 2015 4:41:17 PM 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: /opt/rh/mysql55/root/usr/lib64:/usr/java/packages/lib/i386:/lib:/usr/lib
Mar 14, 2015 4:41:18 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-127.7.36.1-8080"]
Mar 14, 2015 4:41:18 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2071 ms
Mar 14, 2015 4:41:18 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 14, 2015 4:41:18 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.54
Mar 14, 2015 4:41:18 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/openshift/54f479214382ec83330000bd/app-root/runtime/dependencies/jbossews/webapps/ROOT.war
INFO : org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
INFO : org.springframework.web.context.support.XmlWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Sat Mar 14 16:41:38 EDT 2015]; root of context hierarchy
INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/config/BeanLocations.xml]
INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/database/DataSource.xml]
INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/database/Hibernate.xml]
INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/database/hibernate.cfg.xml]
INFO : org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from ServletContext resource [/WEB-INF/properties/database.properties]
WARN : org.hibernate.mapping.RootClass - HHH000038: Composite-id class does not override equals(): com.itworx.sani3ee.model.Favorite
WARN : org.hibernate.mapping.RootClass - HHH000039: Composite-id class does not override hashCode(): com.itworx.sani3ee.model.Favorite
INFO : org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 6553 ms
Mar 14, 2015 4:41:45 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Mar 14, 2015 4:41:45 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [] startup failed due to previous errors
log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.XmlWebApplicationContext).
log4j:WARN Please initialize the log4j system properly.
Mar 14, 2015 4:41:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Mar 14, 2015 4:41:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak.
Mar 14, 2015 4:41:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Resource Destroyer in BasicResourcePool.close()] but has failed to stop it. This is very likely to create a memory leak.
Mar 14, 2015 4:41:45 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /var/lib/openshift/54f479214382ec83330000bd/app-root/runtime/dependencies/jbossews/webapps/ROOT.war has finished in 26,168 ms
Mar 14, 2015 4:41:45 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-127.7.36.1-8080"]
Mar 14, 2015 4:41:45 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 26418 ms
最佳答案
看起来您的 pom.xml 文件中可能缺少“openshift”配置文件。您可以在这里查看它的示例: https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-jbossas/versions/7/template/pom.xml
如果您使用 git Push 从源代码进行部署,则需要在 pom.xml 中包含该内容,否则 openshift 将不知道如何部署它构建的 .war 文件。
<profiles>
<profile>
<!-- When built in OpenShift the 'openshift' profile will be used when invoking mvn. -->
<!-- Use this profile for any OpenShift specific customization your app will need. -->
<!-- By default that is to put the resulting archive into the 'deployments' folder. -->
<!-- http://maven.apache.org/guides/mini/guide-building-for-different-environments.html -->
<id>openshift</id>
<build>
<finalName>{APP_NAME}</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<outputDirectory>deployments</outputDirectory>
<warName>ROOT</warName>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
关于java - 将更改推送到 openshift 服务器时构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28919181/
我是 devops 的新手,并且正在阅读有关此的 openshift 文档。似乎 buildconfig 和 pipeline(openshift 4.6 中的 tekton)都可以实现 source
我正在寻找 OpenShift Origin 和 OpenShift Enterprise 之间的主要区别。我知道第一个是开源的,后者是商业版。与开源版本相比,OpenShift Enterprise
在 Openshift 上部署应用程序后,收集应用程序的 1) CPU、2) 网络、3) 内存、4) 磁盘存储使用情况的推荐方法/最佳实践是什么?基本上是为了监控应用程序。 如果它们能够以时间序列格式
几天来,我一直在尝试通过 Openshift 连接到我的应用程序,但仍然没有运气。 我现在不确定该去哪个论坛,因为我在任何地方都没有得到帮助。 1) 我通过终端运行sudo rhc setup (我之
Spinnaker 是否可以作为云提供商在 Red Hat 的 Openshift 上运行和部署应用程序? 如果没有,需要什么才能使之成为现实? 谢谢。 最佳答案 首先,您需要为 Openshift
我目前正在使用 Red Had 提供的免费培训来学习 Openshift 作为开发人员和管理员。你知道我可以用来获得“刺激”经验的任何其他地方吗?提前致谢。 :) 最佳答案 红帽提供的免费培训是一个良
我在 openshift 中创建应用程序时不小心选择了大齿轮。有没有办法在不重新创建我的应用程序的情况下降级齿轮类型?比如从大到中,甚至从大到小。highcpu。 提前谢谢各位 最佳答案 您确实必须重
我创建了一个 Web 应用程序,我想在 Openshift 上进行部署。 最简单的方法是什么?我正在使用 Openshift Eclipse 客户端。 我应该创建一个新的 openshift,然后从我
我想在 Openshift 中定义一条具有多条路径的路由,每条路径转发到不同的服务。例如/pathA 会将请求转发到 ServiceA ,而/pathB 会将请求转发到 ServiceB。 这在 Op
我想创建一个构建器图像 app_name:latest这将采用多个源输入,例如,另一个图像和二进制源,然后将输出创建到 app_name:latest . 示例 - { "kind": "Bu
我有一个 openshift 应用程序,我在本地彻底重新设计了该应用程序,并希望在 openshift 服务器上重新开始。 我可以删除所有齿轮并重做它们,但是有没有一种优雅的方法或任何方法可以将 op
大约一周以来,它说: Queued for provisioning Due to an increase in OpenShift Online Starter popularity, please
我希望我的部署配置使用作为构建配置输出的镜像。 我目前正在使用这样的东西: - apiVersion: v1 kind: DeploymentConfig metadata: anno
与 OpenShift Container Platform(以前的 Enterprise)相比,OpenShift Origin 是否有任何强制限制?我的意思是,像 Origin 这样的东西,你最多
一个 openshift 应用程序可以有多个域吗? Heroku 允许这样做。完全不同的域(app.abc.com、app.xyz.com)或子域(*.abc.com、*.xyz.com)。 open
我想开发一种新的墨盒供我自己使用。我使用 OpenShift Cartridge Development Kit 开始我的工作。我的构建脚本写在.openshift/action_hooks/buil
我正在使用 flask 。我安装了 Flask-migrate 并一直在使用它来迁移我的 postgresql 数据库。它在我的本地盒子上工作正常。但是,当我在 openshift 上运行它时出现错误
当我尝试在打开的类次项目中推送一些更改时,我在尝试构建项目时遇到了这个错误: remote: Found pom.xml... attempting to build with 'mvn --glob
在不可扩展的奇异齿轮中,齿轮空闲多长时间没有流量。我看过 https://access.redhat.com/site/documentation/en-US/OpenShift_Online/2.0
我试图在 OpenShift 中更新图像时触发部署。该图像托管在私有(private)外部 docker 注册表中。我创建了一个 ImageStream映射到这个外部图像。当我将新图像推送到注册表时,
我是一名优秀的程序员,十分优秀!