Hi all,

    When am running java cookbook it shows the below error:

Chef::Exceptions::Env: env[Path] (java-SE::default line 53) had an error: Chef::Exceptions::Env: Cannot modify env[Path] - key does not exist!

my code is here:

env “JAVA_HOME” do
value node[‘java’][‘java_home’]
not_if { ENV[“JAVA_HOME”].include?node[‘java’][‘java_home’] }
end

#add java value in path variable

env “Path” do
action :modify
delim ::File::PATH_SEPARATOR
value node[‘java’][‘path’]
not_if { ENV[“Path”].include?node[‘java’][‘path’] }
end

Thanks,
Indra

On Wed, Aug 6, 2014 at 8:51 AM, Indra k indra.k@cloudenablers.com wrote:

Chef::Exceptions::Env: env[Path] (java-SE::default line 53) had an error:
Chef::Exceptions::Env: Cannot modify env[Path] - key does not exist!

This is a bug in Chef 11.14.2. It will be fixed in the next patch release.
You can downgrade to 11.12.8 in the interim.

Bryan