1

我想将 appfuse 部署到 cloudfoundry 中。当我运行这些 un​​ix 命令时:

mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-spring-archetype -DarchetypeVersion=2.2.1 -DgroupId=se.ova -DartifactId=artpage -DarchetypeRepository=http://oss.sonatype.org/content/repositories/appfuse
cd artpage
mvn clean install -Ppostgresql
vmc push
more ~/.vmc/crash

我收到这条消息:

Time of crash:
  2013-02-12 11:24:26 +0100

CFoundry::AppInvalid: 300: Invalid application description

cfoundry-0.4.21/lib/cfoundry/v1/base.rb:113:in `handle_response'
cfoundry-0.4.21/lib/cfoundry/baseclient.rb:146:in `block in request_uri'
/usr/lib/ruby/1.9.1/net/http.rb:745:in `start'
cfoundry-0.4.21/lib/cfoundry/baseclient.rb:127:in `request_uri'
cfoundry-0.4.21/lib/cfoundry/baseclient.rb:48:in `request'
cfoundry-0.4.21/lib/cfoundry/baseclient.rb:44:in `request_path'
cfoundry-0.4.21/lib/cfoundry/baseclient.rb:193:in `request_with_options'
cfoundry-0.4.21/lib/cfoundry/baseclient.rb:205:in `post'
cfoundry-0.4.21/lib/cfoundry/v1/model_magic.rb:34:in `block (2 levels) in define_client_methods'
cfoundry-0.4.21/lib/cfoundry/v1/model.rb:72:in `create!'
vmc-0.4.7/lib/vmc/cli/app/push/create.rb:59:in `block in create_app'
interact-0.5.2/lib/interact/progress.rb:98:in `with_progress'
vmc-0.4.7/lib/vmc/cli/app/push/create.rb:58:in `create_app'
vmc-0.4.7/lib/vmc/cli/app/push.rb:95:in `setup_new_app'
vmc-0.4.7/lib/vmc/cli/app/push.rb:82:in `push'
mothership-0.3.5/lib/mothership/base.rb:61:in `run'
mothership-0.3.5/lib/mothership/command.rb:68:in `block in invoke'
manifests-vmc-plugin-0.4.19/lib/manifests-vmc-plugin/plugin.rb:113:in `call'
manifests-vmc-plugin-0.4.19/lib/manifests-vmc-plugin/plugin.rb:113:in `block (2 levels) in <class:Manifests>'
mothership-0.3.5/lib/mothership/callbacks.rb:74:in `with_filters'
manifests-vmc-plugin-0.4.19/lib/manifests-vmc-plugin/plugin.rb:112:in `block in <class:Manifests>'
mothership-0.3.5/lib/mothership/command.rb:78:in `instance_exec'
mothership-0.3.5/lib/mothership/command.rb:78:in `block (2 levels) in invoke'
mothership-0.3.5/lib/mothership/command.rb:82:in `instance_exec'
mothership-0.3.5/lib/mothership/command.rb:82:in `invoke'
mothership-0.3.5/lib/mothership/base.rb:50:in `execute'
vmc-0.4.7/lib/vmc/cli.rb:106:in `execute'
mothership-0.3.5/lib/mothership.rb:45:in `start'
vmc-0.4.7/bin/vmc:11:in `<top (required)>'
/usr/local/bin/vmc:23:in `load'
/usr/local/bin/vmc:23:in `<main>'

有人知道出了什么问题或我如何在其他 PaaS 上部署 appfuse 吗?我已经将 roo 应用程序部署到 cloudfoundry 并且效果很好,但是我很难进一步开发 roo 应用程序,例如添加图像上传和电子邮件配置,所以我认为 appfuse 会更容易,但我喜欢以某种方式将它部署到 PaaS 服务。

4

2 回答 2

3

vmc push假设您要从当前目录进行部署。这在您的示例中失败了,因为没有可交付成果应用程序,而是它的来源。

任何一个

  • 转到target/<the_exploded_app>目录并执行vmc push
  • 或使用vmc push --path target/<the_exploded_app_or_the_dot_war>

应该这样做。

于 2013-02-12T11:39:19.460 回答
1

如果您查看根本原因,它在堆栈中很远,您会看到一条错误消息,

无法创建索引目录:/nonexistent/artpage-1.0-SNAPSHOT/index for index org.appfuse.model.User

这意味着在磁盘上创建索引时没有写权限。这是一个不错的博客,可以帮助您解决问题:

http://appfuse.547863.n4.nabble.com/Preparing-for-the-2-2-Release-td4655656.html

还要记住,创建的文件只会在应用程序实例运行期间持续存在。

于 2013-02-12T22:40:53.967 回答