My java web application cookbook


#1

Hi all,

I’m creating a java web application cookbook which deploys a my webapp (war).
My war doesn’t use a database and so I’m following the “USAGE” at link
(https://github.com/poise/application_java).

I’ve downloaded the application_java cookbook and I’ve added my default.rb file
in the recipes folder.
I’m using chef-solo. I’ve resolved all cookbooks dependencies.

When I try to run the chef-solo command I’ve got this error:

Recipe Compile Error in /var/chef/cookbooks/tomcat/recipes/default.rb
SyntaxError

compile error
/var/chef/cookbooks/tomcat/recipes/default.rb:30: syntax error, unexpected ‘)’
/var/chef/cookbooks/tomcat/recipes/default.rb:39: syntax error, unexpected ‘)’
/var/chef/cookbooks/tomcat/recipes/default.rb:119: syntax error, unexpected
$end, expecting kEND

Cookbook Trace:

/var/chef/cookbooks/tomcat/recipes/default.rb:119:in `from_file’

Could you help me?
Thank you
pasqwuy73


#2

I’ve seen some reports that the current ‘application_java’ cookbook has some problems with chef versions 11.6 or more recent. I’ve also personally had difficulty using it with jar files rather than war files, or with two different ruby stanzas calling two different war files from the same directory. I’m therefore not personally using it until these issues are resolved, and instead use other tools to download relevant war or jar files, and create my own symlinks as needed, with a version check and a checksum of the downloaded file to verify if it’s been changed and to trigger a restart of the relevant daemon.


Nico Kadel-Garcia
Senior Systems Consultant
Email: nkadelgarcia-consultant@scholastic.com
Cell Phone: +1.339.368.2428

-----Original Message-----
From: pasquale.vitale@eng.it [mailto:pasquale.vitale@eng.it]
Sent: Monday, July 07, 2014 12:36 PM
To: chef-dev@lists.opscode.com
Subject: [chef-dev] My java web application cookbook

Hi all,

I’m creating a java web application cookbook which deploys a my webapp (war).
My war doesn’t use a database and so I’m following the “USAGE” at link (https://github.com/poise/application_java).

I’ve downloaded the application_java cookbook and I’ve added my default.rb file in the recipes folder.
I’m using chef-solo. I’ve resolved all cookbooks dependencies.

When I try to run the chef-solo command I’ve got this error:

Recipe Compile Error in /var/chef/cookbooks/tomcat/recipes/default.rb
SyntaxError

compile error
/var/chef/cookbooks/tomcat/recipes/default.rb:30: syntax error, unexpected ‘)’
/var/chef/cookbooks/tomcat/recipes/default.rb:39: syntax error, unexpected ‘)’
/var/chef/cookbooks/tomcat/recipes/default.rb:119: syntax error, unexpected $end, expecting kEND

Cookbook Trace:

/var/chef/cookbooks/tomcat/recipes/default.rb:119:in `from_file’

Could you help me?
Thank you
pasqwuy73


#3

You have a ruby syntax error in your recipe code. You can run ruby -c FILENAME to check the syntax.


Daniel DeLeo

On Monday, July 7, 2014 at 9:35 AM, pasquale.vitale@eng.it wrote:

Hi all,

I’m creating a java web application cookbook which deploys a my webapp (war).
My war doesn’t use a database and so I’m following the “USAGE” at link
(https://github.com/poise/application_java).

I’ve downloaded the application_java cookbook and I’ve added my default.rb file
in the recipes folder.
I’m using chef-solo. I’ve resolved all cookbooks dependencies.

When I try to run the chef-solo command I’ve got this error:

Recipe Compile Error in /var/chef/cookbooks/tomcat/recipes/default.rb
SyntaxError

compile error
/var/chef/cookbooks/tomcat/recipes/default.rb:30: syntax error, unexpected ‘)’
/var/chef/cookbooks/tomcat/recipes/default.rb:39: syntax error, unexpected ‘)’
/var/chef/cookbooks/tomcat/recipes/default.rb:119: syntax error, unexpected
$end, expecting kEND

Cookbook Trace:

/var/chef/cookbooks/tomcat/recipes/default.rb:119:in `from_file’

Could you help me?
Thank you
pasqwuy73