2014년 11월 26일 수요일

Cookbook application_java and workaround to the error - undefined method 'create' for nil:NilClass

These days, I developed cookbooks to deploy java web applications. To do this efficiently, need to combine some cookbooks: java, tomcat and application_java. As what they intend to do by their names, they certainly install and configure software related to java (JDK, java container server and java application).

Developing java and tomcat cookbook wasn't a big deal, but, I encountered problem with an error in case of application_java. My code was follows:
include_recipe 'java'

application 'shop-admin' do
    path '/var/shop-admin'
    repository 'http://192.168.56.170/zabbix/shop.admin.war'
    revision '1.0'
    scm_provider Chef::Provider::RemoteFile::Deploy

    java_webapp
    tomcat
end
My error message was:
...
================================================================================
Error executing action `deploy` on resource 'deploy_revision[shop-admin]'
================================================================================

NoMethodError
-------------
undefined method `create' for nil:NilClass

Cookbook Trace:
---------------
/var/chef/cache/cookbooks/application_java/libraries/provider_remote_file_deploy.rb:53:in `action_sync'
...
The solution was to change application_java cookbook. By default, Chef Supermarket links to https://github.com/poise/application_java.

Other people who had same issue already posted and someone recommended to clone from https://github.com/jamiely/application_java
I replaced with "jamiely/application_java". After that, my war deployed well.

댓글 1개:


  1. cheap windows and office product keys , buy server 2013 r2 keys , window 7 ultimate product key , klucz do win 7 home premium , windows 7 ultimate product key , windows 7 product key purchase , windows 10 activation status , windows 7 enterprise activation key download for sale , lp100V

    windows 7 ult key sale online

    buy office pro plus 2016 keys

    cheap windows 10 pro keys for sale

    windows server 2016 standard key sale and download

    buy windows 7 ult keys online

    답글삭제