cookbooks / java Goto Github PK
View Code? Open in Web Editor NEWA Chef cookbook for java
Home Page: http://cookbooks.github.com/java
A Chef cookbook for java
Home Page: http://cookbooks.github.com/java
Hi, I'm trying to install java oracle 7 on ubuntu but i receive an error.
I receive the same error on opscode-ubuntu-1204 and precise64.
If I try the same code on Berkshelf-CentOS-6.3-x86_64-minimal it works fine.
Here is the installation log:
[2013-07-11T14:37:44+00:00] INFO: Processing directory[/etc/profile.d] action create (java::set_java_home line 26)
[2013-07-11T14:37:44+00:00] INFO: Processing file[/etc/profile.d/jdk.sh] action create (java::set_java_home line 30)
[2013-07-11T14:37:44+00:00] INFO: Processing java_ark[jdk] action install (java::oracle line 47)
[2013-07-11T14:37:44+00:00] FATAL: set alternative failed
================================================================================
Error executing action `install` on resource 'java_ark[jdk]'
================================================================================
SystemExit
----------
exit
Cookbook Trace:
---------------
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/java/providers/ark.rb:218:in `block (3 levels) in class_from_file'
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/java/providers/ark.rb:214:in `block (2 levels) in class_from_file'
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/java/providers/ark.rb:204:in `each'
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/java/providers/ark.rb:204:in `block in class_from_file'
Resource Declaration:
---------------------
# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/java/recipes/oracle.rb
47: java_ark "jdk" do
48: url tarball_url
49: checksum tarball_checksum
50: app_home java_home
51: bin_cmds bin_cmds
52: alternatives_priority 1062
53: action :install
54: end
55:
Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/java/recipes/oracle.rb:47:in `from_file'
java_ark("jdk") do
action [:install]
updated true
updated_by_last_action true
supports {:report=>true, :exception=>true}
retries 0
retry_delay 2
cookbook_name :java
recipe_name "oracle"
url "http://download.oracle.com/otn-pub/java/jdk/7u25-b15/jdk-7u25-linux-i586.tar.gz"
checksum "dd89b20afa939992bb7fdc44837fa64f0a98d7ee1e5706fe8a2d9e2247ba6de7"
app_home "/opt/app/dcim/java/jdk7"
bin_cmds ["appletviewer", "apt", "ControlPanel", "extcheck", "idlj", "jar", "jarsigner", "java", "javac", "javadoc", "javafxpackager", "javah", "javap", "javaws", "jcmd", "jconsole", "jcontrol", "jdb", "jhat", "jinfo", "jmap", "jps", "jrunscript", "jsadebugd", "jstack", "jstat", "jstatd", "jvisualvm", "keytool", "native2ascii", "orbd", "pack200", "policytool", "rmic", "rmid", "rmiregistry", "schemagen", "serialver", "servertool", "tnameserv", "unpack200", "wsgen", "wsimport", "xjc"]
alternatives_priority 1062
default true
end
[2013-07-11T14:37:44+00:00] INFO: Running queued delayed notifications before re-raising exception
[2013-07-11T14:37:44+00:00] ERROR: Running exception handlers
[2013-07-11T14:37:44+00:00] ERROR: Exception handlers complete
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
The Berksfile.lock
{
"sources": {
"somc-java": {
"path": "."
},
"java": {
"locked_version": "1.12.0"
},
"windows": {
"locked_version": "1.10.0"
},
"chef_handler": {
"locked_version": "1.1.4"
}
}
}
I'm using both config.berkshelf.enabled = true and config.omnibus.chef_version = :latest in vagrant.
Vagrant version 1.1.4
Chef version 11.4.4
On CentOS 6 or RHEL 6, the "/etc/profile.d/jdk.sh" file sourced by local users lacks an end-of-line character. The result is not deadly, but confusing if you try to 'cat' the file on a normal terminal.
Using:
:java => {
:install_flavor => 'oracle'
},
I get:
[Tue, 17 Apr 2012 15:51:48 +0000] INFO: Adding jdk to /usr/lib/jvm/jdk1.6.0_30
[Tue, 17 Apr 2012 15:51:48 +0000] INFO: remote_file[/tmp/chef-solo/cache/jdk-6u30-linux-x64.bin] updated
[Tue, 17 Apr 2012 15:51:48 +0000] INFO: remote_file[/tmp/chef-solo/cache/jdk-6u30-linux-x64.bin] mode changed to 755
[Tue, 17 Apr 2012 15:51:48 +0000] FATAL: Failed to extract file jdk-6u30-linux-x64.bin!
[Tue, 17 Apr 2012 15:51:48 +0000] ERROR: Running exception handlers
[Tue, 17 Apr 2012 15:51:48 +0000] ERROR: Exception handlers complete
Seeing what the file is I get:
$ file /tmp/chef-solo/cache/jdk-6u30-linux-x64.bin
/tmp/chef-solo/cache/jdk-6u30-linux-x64.bin: HTML document text
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.