Bug 1061392
| Summary: | Can't create Java Application using Tomcat7 with existing sources | ||
|---|---|---|---|
| Product: | OpenShift Online | Reporter: | Gaspar Rajoy <gaspo53> |
| Component: | Image | Assignee: | Ben Parees <bparees> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 2.x | CC: | chunchen |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-02-26 19:11:07 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Gaspar Rajoy
2014-02-04 18:22:38 UTC
I believe the issue is that your repository does not include the .openshift template configuration files that would normally exist for a new tomcat application. Create a new tomcat application from scratch and copy the .openshift directory/contents from that application's repository into this repository and then this should work properly. I've made a change that will provide template config files in the case that the sourced application does not provide them. https://github.com/openshift/origin-server/pull/4694 Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/668291d0b858809eccb926089afb236d35d9d73b Bug 1061392 - Can't create Java Application using Tomcat7 with existing sources https://bugzilla.redhat.com/show_bug.cgi?id=1061392 If the existing source does not include a populated .openshift/config directory, deployment will fail. It's fixed, verified on devenv_4356, please refer to the following results: 1. Create a jbossews-2.0 app with the existing sources (https://github.com/gaspo53/twitter-api.git) $ rhc app create cews20 jbossews-2.0 --from-code https://github.com/gaspo53/twitter-api.git 2. Make some changes and perform git push cd cews20; touch test.txt; git add . && git commit -amp && git push [master 4073257] p 0 files changed create mode 100644 test.txt Counting objects: 3, done. Delta compression using up to 4 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 247 bytes, done. Total 2 (delta 1), reused 0 (delta 0) remote: Stopping jbossews cartridge remote: Sending SIGTERM to jboss:10813 ... remote: kill -9 10975 remote: kill -9 10813 remote: Building git ref 'master', commit 4073257 remote: Using Maven mirror /var/lib/openshift/52f98c6eacda611f1500001b/jbossews//usr/versions/shared/configuration/settings.rhcloud.xml remote: Apache Maven 3.0.3 (r1075437; 2011-06-20 13:22:37-0400) remote: Maven home: /etc/alternatives/maven-3.0 remote: Java version: 1.6.0_30, vendor: Sun Microsystems Inc. remote: Java home: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre remote: Default locale: en_US, platform encoding: ANSI_X3.4-1968 remote: OS name: "linux", version: "2.6.32-431.3.1.el6oso.bz844450v4.x86_64", arch: "i386", family: "unix" remote: Found pom.xml... attempting to build with 'mvn --global-settings /var/lib/openshift/52f98c6eacda611f1500001b/jbossews//usr/versions/shared/configuration/settings.rhcloud.xml clean package -Popenshift -DskipTests' remote: [INFO] Scanning for projects... remote: [WARNING] remote: [WARNING] Some problems were encountered while building the effective model for com.gaspar.twitter:twitter-api:war:1.0-SNAPSHOT remote: [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 147, column 12 remote: [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-war-plugin is missing. @ line 194, column 12 remote: [WARNING] remote: [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. remote: [WARNING] remote: [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. remote: [WARNING] remote: [INFO] remote: [INFO] ------------------------------------------------------------------------ remote: [INFO] Building SpringMVC Maven Webapp 1.0-SNAPSHOT remote: [INFO] ------------------------------------------------------------------------ remote: [INFO] remote: [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ twitter-api --- remote: [INFO] remote: [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ twitter-api --- remote: [WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent! remote: [INFO] Copying 12 resources remote: [INFO] remote: [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ twitter-api --- remote: [WARNING] File encoding has not been set, using platform encoding ANSI_X3.4-1968, i.e. build is platform dependent! remote: [INFO] Compiling 19 source files to /var/lib/openshift/52f98c6eacda611f1500001b/app-root/runtime/repo/target/classes remote: [INFO] remote: [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ twitter-api --- remote: [WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent! remote: [INFO] skip non existing resourceDirectory /var/lib/openshift/52f98c6eacda611f1500001b/app-root/runtime/repo/src/test/resources remote: [INFO] remote: [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ twitter-api --- remote: [INFO] No sources to compile remote: [INFO] remote: [INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ twitter-api --- remote: [INFO] Tests are skipped. remote: [INFO] remote: [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ twitter-api --- remote: [INFO] Packaging webapp remote: [INFO] Assembling webapp [twitter-api] in [/var/lib/openshift/52f98c6eacda611f1500001b/app-root/runtime/repo/target/twitter-api] remote: [INFO] Processing war project remote: [INFO] Copying webapp resources [/var/lib/openshift/52f98c6eacda611f1500001b/app-root/runtime/repo/src/main/webapp] remote: [INFO] Webapp assembled in [272 msecs] remote: [INFO] Building war: /var/lib/openshift/52f98c6eacda611f1500001b/app-root/runtime/repo/target/twitter-api.war remote: [INFO] WEB-INF/web.xml already added, skipping remote: [INFO] ------------------------------------------------------------------------ remote: [INFO] BUILD SUCCESS remote: [INFO] ------------------------------------------------------------------------ remote: [INFO] Total time: 5.924s remote: [INFO] Finished at: Mon Feb 10 21:40:21 EST 2014 remote: [INFO] Final Memory: 12M/29M remote: [INFO] ------------------------------------------------------------------------ remote: [WARNING] The requested profile "openshift" could not be activated because it does not exist. remote: Preparing build for deployment remote: Deployment id is 09b08042 remote: Activating deployment remote: + tmp=/var/lib/openshift/52f98c6eacda611f1500001b/jbossews//tmp remote: + '[' -d /var/lib/openshift/52f98c6eacda611f1500001b/jbossews//tmp ']' remote: + for d in '$tmp/*' remote: + '[' -d '/var/lib/openshift/52f98c6eacda611f1500001b/jbossews//tmp/*' ']' remote: + '[' -d /var/lib/openshift/52f98c6eacda611f1500001b/jbossews//work/ ']' remote: + rm -rf /var/lib/openshift/52f98c6eacda611f1500001b/jbossews//work/ remote: ++ ls /var/lib/openshift/52f98c6eacda611f1500001b/app-root/runtime/repo//webapps remote: + '[' '' ']' remote: Starting jbossews cartridge remote: Found 127.1.244.129:8080 listening port remote: ------------------------- remote: Git Post-Receive Result: success remote: Activation status: success remote: Deployment completed with status: success To ssh://52f98c6eacda611f1500001b.rhcloud.com/~/git/cews20.git/ 60eb98c..4073257 master -> master Thank you for considering my report. I'll try it tomorrow morning and tell you how it goes. Gaspar, this was verified by our internal QE team, the change will not be pushed to OpenShift Online until early next week, based on our normal 3 week release cycle, so you'll want to wait for that. If you're doing your testing in Origin, then of course you can pull down the fix. |