Coder Social home page Coder Social logo

torquebox's Introduction

No Longer Maintained

The TorqueBox project is no longer actively developed nor maintained. Do not use it for development or production usage unless you are willing and able to fix issues as they come up.

TorqueBox

This is TorqueBox 4 and represents a substantial change in direction from previous TorqueBox releases. We're moving to a lightweight, embedded model that runs without any Java application server, at the expense of a few of the more enterprisy features. For users that want to run in a Java application server or need those enterprisy features, we'll provide a way to take your TorqueBox application and run it unmodified on a stock WildFly installation.

Documentation

We have various guides available to help with installation, migration, usage, and deployment of TorqueBox 4.

Quickstart for running TorqueBox

Requirements

TorqueBox requires JRuby 1.7.x (in 1.9 or 2.0 mode) or JRuby 9.x.x running on Java 7+. The code has only been tested on JRuby 1.7.6 and higher but should work on earlier versions.

Installation

Read the Installation Guide for installation details.

Running directly

From inside your Rack application's root directory:

torquebox run

Rails

Ensure torquebox is in your Gemfile, then:

rails s torquebox

Rack

rackup -s torquebox

Motivation

We want a smaller, more modular TorqueBox that is easier to get started with, embeddable, and lets users bring in additional functionality as-needed. More details of our motivation and community feedback are expressed in an email thread from the torquebox-user mailing list.

Technology

TorqueBox runs on JRuby and sits on top of a new lightweight, pluggable, polyglot server codenamed WunderBoss (at least for now). All the new features of TorqueBox will be implemented in WunderBoss then exposed via a Ruby API in the TorqueBox project. This lets other projects, in other languages, reuse the same functionality by creating small language-specific API wrappers.

The web portion of WunderBoss uses JBoss Undertow, which is also the same web server used in WildFly (the successor to JBoss Application Server).

We aim to reuse the same underlying components as WildFly so that TorqueBox applications can run on top of WildFly in addition to running without it, to give users an option between a full-blown Java application server and a very lightweight, minimal server.

Current status

Right now TorqueBox 4 provides a high-performance Rack implementation for web applications and basic APIs for messaging, caching, and scheduled jobs. The Rack support is considered production-ready, but the messaging, caching, and scheduling implementations are still in a bit more flux.

Roadmap

We're developing TorqueBox 4 while also maintaining TorqueBox 3, and we expect it to take some time before TorqueBox 4 comes out of alpha and betas and into a final release.

Building TorqueBox

bundle install
rake build

Running specs

rake spec

Running integration tests

Make sure phantomjs is available on your $PATH - http://phantomjs.org/download.html.

The first time you run the integration tests may take longer as bundler gets invoked for each test application to install its dependencies. Subsequent runs with the same JRuby installation should be faster.

cd integration-tests
rake spec

Running a single integration test

cd integration-tests
SPEC=spec/basic_sinatra_spec.rb rake spec

Running specs with more verbose output

DEBUG=true rake spec

Running all integration test variants (disk, jar, wildfly)

There are several variants of integration tests. Each runs the same applications and same specs, but packaged in different ways. This takes quite a bit longer, but is what CI runs.

rake spec:all

Installing from source

rake install

Releasing

Preparation

TorqueBox 4 is released from the master branch of torquebox/torquebox-release.

Set up this repository as an additional remote for your workspace:

git remote add release [email protected]:torquebox/torquebox-release.git

Ensure that the master branch has the contents you wish to release. Using the -f flag to force is allowed in this case, since the torquebox-release repository is not a public-facing human-cloneable repository.

git push release master:master -f

Perform the build

Using the build system, select the torquebox4-release job, entering in the branch to release from (usually 'master'), the version to release, and the next version after release.

If something goes wrong in the release job and it needs to run again, be sure to reset the torquebox-release repository with the correct code first:

git push release master:master -f

Deploy RubyGems

After the job complete successfully, the generated RubyGems will need to be manually deployed. Download them from the job and push each using:

gem push <gem_name>.gem

You'll have to be an owner of the gems to do this. Bug bbrowning, bobmcw, or tcrawley if you are not.

Publish the release API documentation

The release API docs are built by the release job on CI. Download those and put them a _4x_docs//yardoc folder in the torquebox.org git repo.

Push changes from the release repository to the official repository

git fetch release --tags
git merge release/master
git push origin master
git push origin <release_tag>

Release the project in JIRA

Announce it

Post it on torquebox.org

Notify the torquebox-users@ list

Tweet it.

Set the /topic in #torquebox IRC channel using ChanServ (if you can).

torquebox's People

Contributors

abstractj avatar aemadrid avatar agerauer avatar bandwagon avatar bbrowning avatar bobmcwhirter avatar carlhoerberg avatar ciaranarcher avatar craigmcnamara avatar cschneid avatar davidglassborow avatar dbroeglin avatar deruelle avatar dobozysaurus avatar dwbutler avatar etehtsea avatar goldmann avatar hubertlepicki avatar jcrossley3 avatar jkutner avatar johnae avatar lance avatar mareknovotny avatar nirvdrum avatar projectodd-ci avatar rafmagana avatar razenha avatar rkive avatar th3hunt avatar tobias avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

torquebox's Issues

[Torquebox 4] Integration Testing

Is there a simple way to boot up our Rack app, which utilizes Torquebox 4, in order to perform Integration tests using rspec and capybara?

The app uses some of Torquebox's messaging capabilities

Option for Wunderboss unpacking directory?

I'm deploying a torquebox4 app as a war file onto a Wildfly 8.2 server.
The problem I'm encountering is that the /tmp space on each of of Wildfly servers is capped at 512mb, and the torquebox app exploded is taking up 230mb in /tmp/wunderbossXXX. So two apps won't be able to run concurrently on the same server. If the apps were unpacked into /tmp/wunderboss/XXXXX I could at least do some linking around the filesystem to get them to a more spacious area.

Is there a configuration option I'm missing?
Or is there a better (standard) way to deploy a torquebox4 app for production?

Thanks in advance!

[Torquebox4] 200 OK instead of 500 on server error

run ->(_) { [200, {"Content-Type" => "text/html"}, "Hello Rack!"] }

rackup:

~  ⚡ curl -i 0.0.0.0:9292/
HTTP/1.1 500 Internal Server Error
Content-Type: text/html; charset=ISO-8859-1
Transfer-Encoding: chunked
Server: WEBrick/1.3.1 (Ruby/1.9.3/2014-04-15)
Date: Fri, 30 May 2014 11:59:15 GMT
Content-Length: 312
Connection: close

torquebox (torqbox HEAD):

torquebox run sample.ru -p 9292
~  ⚡ curl -i 0.0.0.0:9292/
HTTP/1.1 200 OK
Connection: keep-alive
Server: undertow
Content-Type: text/html
Content-Length: 0
Date: Fri, 30 May 2014 12:00:11 GMT

[Torquebox4] error deploying plain rails 4.2 war to wildfly

I'm testing TorqueBox 4.0.0.alpha1 with a plain rails 4.2 app.
running:

rails new testwar
cd testwar
bundle install
torquebox war --destination wildfly-8.1.0.Final/standalone/deployments -v

I get the following error in wildly

service jboss.undertow.deployment.default-server.default-host./testwar: Failed to start service
...
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.jruby.exceptions.RaiseException: (LoadError) load error: nokogiri/nokogiri -- java.lang.NoClassDefFoundError: com/sun/org/apache/xpath/internal/VariableStack

Since the problem seemed to be missing jars for nokogiri, I added serializer.jar, xalan.jar, xercesImpl.jar and xml-apis.jar to ~/.rvm/rubies/jruby-1.7.18/lib, but I keep getting the same error.

Diving into the war, I noticed that in WEB-INF/lib/testwar.jar, I found the above files in the jars folder, but the file MET-INF/app.properties seems to ignore them:

classpath=${extract_root}/jars/wunderboss-ruby-1.x.incremental.174.jar:${extract_root}/jars/wunderboss-rack.jar:${extract_root}/jars/jruby.jar

Is there a way to explicitly add to the classpath the missing files?

My setup is:

OSX 10.10.1
Java SE (build 1.8.0_25-b17) - Java HotSpot 64-Bit Server VM (build 25.25-b02, mixed mode)
rvm 1.26.7
jruby-1.7.18
wildfly 8.1.0.Final

Had this issue with 3.0.1 on gem install rails Not installing gems..

Can you help..
Torquebox install instructions:
I am following:
http://torquebox.org/getting-started/3.0.1/first-steps.html#first-steps-mac-linux

  1. Running torquebox-3.0.1 on Linux trying to install Rails...
  2. Jruby installed
  3. running gem install rails
  4. stops with IOError permissions denied ( I am root everything is chmod 777)
  5. I get about 4 gems installed the get the below error starting with minitest but not limited to just that gem.
  6. dowloaded gem locally to see if I could install it..
    e.g.
    gem install --local /home/aw9578/minitest-4.7.5.gem -V --debug
    gem install --local /home/aw9578/minitest-5.2.0.gem -V --debug
  7. I get the same error for both versions
  8. search the below for the Permissions denied.
  9. please be aware I am sudo root here and when I go back to 3.0.0 everything installs fine..
  10. Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
    Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
  11. Red hat linux : Linux bltd006 2.6.18-274.7.1.el5 #1 SMP Mon Oct 17 11:57:14 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
  12. Really not sure what I did incorrectly.. with 3.0.1

Error:
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:121)
at org.jruby.Ruby.runInterpreter(Ruby.java:838)
at org.jruby.Ruby.loadFile(Ruby.java:2727)
at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:959)
at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:573)
at org.jruby.runtime.load.LoadService.requireCommon(LoadService.java:457)
at org.jruby.runtime.load.LoadService.require(LoadService.java:421)
at org.jruby.RubyKernel.requireCommon(RubyKernel.java:1090)
at org.jruby.RubyKernel.require19(RubyKernel.java:1084)
at org.jruby.RubyKernel$INVOKER$s$1$0$require19.call(RubyKernel$INVOKER$s$1$0$require19.gen)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
at rubyjit.Kernel$$require_3DF639EECD034ECD6A4437F10F83634659C9A865210687626.chained_2_ensure_2$RUBY$ensure(/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55)
at rubyjit.Kernel$$require_3DF639EECD034ECD6A4437F10F83634659C9A865210687626.chained_1_rescue_1$RUBY$SYNTHETIC__file__(/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53)
at rubyjit.Kernel$$require_3DF639EECD034ECD6A4437F10F83634659C9A865210687626.chained_0_ensure_1$RUBY$ensure(/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb)
at rubyjit.Kernel$$require_3DF639EECD034ECD6A4437F10F83634659C9A865210687626.file(/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb)
at rubyjit.Kernel$$require_3DF639EECD034ECD6A4437F10F83634659C9A865210687626.file(/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb)
at org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:181)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:121)
at org.jruby.Ruby.runInterpreter(Ruby.java:838)
at org.jruby.Ruby.loadFile(Ruby.java:2727)
at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:959)
at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:573)
at org.jruby.runtime.load.LoadService.requireCommon(LoadService.java:457)
at org.jruby.runtime.load.LoadService.require(LoadService.java:421)
at org.jruby.RubyKernel.requireCommon(RubyKernel.java:1090)
at org.jruby.RubyKernel.require19(RubyKernel.java:1084)
at org.jruby.RubyKernel$INVOKER$s$1$0$require19.call(RubyKernel$INVOKER$s$1$0$require19.gen)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
at rubyjit.Kernel$$require_3DF639EECD034ECD6A4437F10F83634659C9A865210687626.chained_2_ensure_2$RUBY$ensure(/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55)
at rubyjit.Kernel$$require_3DF639EECD034ECD6A4437F10F83634659C9A865210687626.chained_1_rescue_1$RUBY$SYNTHETIC__file__(/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53)
at rubyjit.Kernel$$require_3DF639EECD034ECD6A4437F10F83634659C9A865210687626.chained_0_ensure_1$RUBY$ensure(/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb)
at rubyjit.Kernel$$require_3DF639EECD034ECD6A4437F10F83634659C9A865210687626.file(/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb)
at rubyjit.Kernel$$require_3DF639EECD034ECD6A4437F10F83634659C9A865210687626.file(/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb)
at org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:181)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:121)
at org.jruby.Ruby.runInterpreter(Ruby.java:838)
at org.jruby.Ruby.loadFile(Ruby.java:2727)
at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:959)
at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:573)
at org.jruby.runtime.load.LoadService.requireCommon(LoadService.java:457)
at org.jruby.runtime.load.LoadService.require(LoadService.java:421)
at org.jruby.RubyKernel.requireCommon(RubyKernel.java:1090)
at org.jruby.RubyKernel.require19(RubyKernel.java:1084)
at org.jruby.RubyKernel$INVOKER$s$1$0$require19.call(RubyKernel$INVOKER$s$1$0$require19.gen)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
at rubyjit.Kernel$$require_3DF639EECD034ECD6A4437F10F83634659C9A865210687626.chained_2_ensure_2$RUBY$ensure(/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55)
at rubyjit.Kernel$$require_3DF639EECD034ECD6A4437F10F83634659C9A865210687626.chained_1_rescue_1$RUBY$SYNTHETIC__file__(/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53)
at rubyjit.Kernel$$require_3DF639EECD034ECD6A4437F10F83634659C9A865210687626.chained_0_ensure_1$RUBY$ensure(/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb)
at rubyjit.Kernel$$require_3DF639EECD034ECD6A4437F10F83634659C9A865210687626.file(/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb)
at rubyjit.Kernel$$require_3DF639EECD034ECD6A4437F10F83634659C9A865210687626.file(/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb)
at org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:181)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
at org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
at org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:198)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.OpElementOneArgOrAsgnNode.interpret(OpElementOneArgOrAsgnNode.java:68)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:198)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:198)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.CaseNode.interpret(CaseNode.java:137)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:225)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:214)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:346)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:204)
at org.jruby.ast.FCallTwoArgNode.interpret(FCallTwoArgNode.java:38)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
at org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:225)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:214)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:346)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:204)
at org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:198)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
at org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:121)
at org.jruby.Ruby.runInterpreter(Ruby.java:838)
at org.jruby.Ruby.loadFile(Ruby.java:2727)
at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
at org.jruby.runtime.load.LoadService.load(LoadService.java:359)
at org.jruby.RubyKernel.loadCommon(RubyKernel.java:1111)
at org.jruby.RubyKernel.load19(RubyKernel.java:1103)
at org.jruby.RubyKernel$INVOKER$s$0$1$load19.call(RubyKernel$INVOKER$s$0$1$load19.gen)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:210)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
at opt.app.t1idp1m1.torquebox_minus_3_dot_0_dot_1.jruby.bin.gem.file(/opt/app/t1idp1m1/torquebox-3.0.1/jruby/bin/gem:4)
at opt.app.t1idp1m1.torquebox_minus_3_dot_0_dot_1.jruby.bin.gem.load(/opt/app/t1idp1m1/torquebox-3.0.1/jruby/bin/gem)
at org.jruby.Ruby.runScript(Ruby.java:811)
at org.jruby.Ruby.runScript(Ruby.java:804)
at org.jruby.Ruby.runNormally(Ruby.java:673)
at org.jruby.Ruby.runFromMain(Ruby.java:522)
at org.jruby.Main.doRunFromMain(Main.java:395)
at org.jruby.Main.internalRun(Main.java:290)
at org.jruby.Main.run(Main.java:217)
at org.jruby.Main.main(Main.java:197)
ERROR: While executing gem ... (IOError)
Permission denied
org/jruby/RubyFile.java:359:in initialize' org/jruby/RubyIO.java:1178:inopen'
org/jruby/RubyKernel.java:347:in open' /opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/package.rb:350:inextract_tar_gz'
/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/package/tar_reader.rb:64:in each' /opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/package.rb:341:inextract_tar_gz'
/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/package.rb:423:in open_tar_gz' org/jruby/ext/zlib/RubyGzipFile.java:108:inwrap'
/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/package.rb:420:in open_tar_gz' /opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/package.rb:340:inextract_tar_gz'
/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/package.rb:321:in extract_files' /opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/package/tar_reader.rb:64:ineach'
/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/package.rb:318:in extract_files' org/jruby/RubyIO.java:1182:inopen'
org/jruby/RubyKernel.java:347:in open' /opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/package.rb:315:inextract_files'
/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/installer.rb:686:in extract_files' /opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/installer.rb:222:ininstall'
/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/request_set.rb:75:in install' org/jruby/RubyArray.java:1613:ineach'
/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/request_set.rb:62:in install' /opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/dependency_installer.rb:363:ininstall'
/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/commands/install_command.rb:180:in install_gem' /opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/commands/install_command.rb:194:ininstall_gems'
org/jruby/RubyArray.java:1613:in each' /opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/commands/install_command.rb:190:ininstall_gems'
/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/commands/install_command.rb:146:in execute' /opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/command.rb:305:ininvoke_with_build_args'
/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/command_manager.rb:167:in process_args' /opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/command_manager.rb:137:inrun'
/opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/gem_runner.rb:54:in run' /opt/app/t1idp1m1/torquebox-3.0.1/jruby/bin/jgem:21:in(root)'
org/jruby/RubyKernel.java:1103:in load' /opt/app/t1idp1m1/torquebox-3.0.1/jruby/bin/gem:4:in(root)'
Exception `Gem::SystemExitException' at /opt/app/t1idp1m1/torquebox-3.0.1/jruby/lib/ruby/shared/rubygems/user_interaction.rb:342 - Exiting RubyGems with exit_code 1

Messaging statistics API

It would be nice to get message counts somehow, eg how many messages have been processed, queue length, number of clients.

This is probably exposed via JMX or something like that, coming from the ruby community that is just scary.. if not a public TB API then maybe some notes in the docs and/or links to relevant information where one can start to dig

Rails.root returns path with backslashes on Windows on upgrade to 3.1.2 from 3.1.1

Torquebox 3.1.2 seems to have introduced a breaking change for Windows users. For some reason that I'm still not 100% sure about, Rails.root returns a path with backslashes instead of forward slashes. For example:

Torquebox 3.1.1 with JRuby 1.7.13 (2.0.0p195)
Rails.root = <Pathname:C:/Users/jacollins/RubymineProjects/ViewPoint>

Torquebox 3.1.2 with JRuby 1.7.19 (2.0.0p598)
Rails.root = <Pathname:C:\Users\jacollins\RubymineProjects\ViewPoint>

I was running Rails 4.1.1 both times, so I am thinking it was TorqueBox that somehow caused this changed. I searched through the code and couldn't find a good reason why this happened.

To fix this, I added this line to our application.rb file:
config.root = Pathname.new(Rails.root.to_s.gsub(/\\/, '/'))

That will return a path with forward slashes for Windows and Unix users. I'm happy to dig into this more if someone can help point me in the right direction.

War does not run in Tomee

Hey folks, I'm attempting to run Torquebox 4.0.0.beta1 on jruby-9.0.0.0 and I'm getting errors when deploying to TomEE. Are the generated wars meant to be runnable on other J2EE servers than Wildfly? Is there any way to configure the listener in web.xml to be generic instead of relying on Wildfly? (other than unzipping, editing, and rezipping, of course)

Relevant error:

2015-08-18 05:28:33,931 [localhost-startStop-1] INFO  OpenEJB.startup- Deployed Application(path=/opt/tomee/webapps/ROOT)
2015-08-18 05:28:34,022 [localhost-startStop-1] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/]- Error configuring application listener of class org.projectodd.wunderboss.wildfly.ServletListener
java.lang.ClassNotFoundException: org.projectodd.wunderboss.wildfly.ServletListener
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
    at org.apache.tomee.catalina.LazyStopWebappClassLoader.loadClass(LazyStopWebappClassLoader.java:129)
    at org.apache.tomee.catalina.JavaeeInstanceManager.newInstance(JavaeeInstanceManager.java:66)
    at org.apache.tomee.catalina.JavaeeInstanceManager.newInstance(JavaeeInstanceManager.java:61)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4907)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
2015-08-18 05:28:34,031 [localhost-startStop-1] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/]- Skipped installing application listeners due to previous error(s)

Torquebox 3.1.2 - Load error on VariableStack Java class

I am getting a load error on startup using torquebox 3.1.2: missing class name (`com.sun.org.apache.xpath.internal.VariableStack')

Opening the torquebox console and trying to load that class leads to the following:

>> com.sun.org.apache.xpath.internal.VariableStack
=> Error: missing class name (`com.sun.org.apache.xpath.internal.VariableStack')

However, if I downcase VariableStack the class loads:

>> com.sun.org.apache.xpath.internal.variablestack
=> Java::ComSunOrgApacheXpathInternalVariablestack

The same first command in jirb works fine in the same environment:

irb(main):001:0> com.sun.org.apache.xpath.internal.VariableStack
=> Java::ComSunOrgApacheXpathInternal::VariableStack

ERROR Undertow request failed HttpServerExchange / java.io.IOException: Broken pipe

I'm testing out torquebox 4.beta1 on jruby 1.7.20 (1.9.3p551) 2015-05-04 3086e6a on Java HotSpot(TM) 64-Bit Server VM 1.8.0-b132 +jit [darwin-x86_64]

But I get these errors:

08:02:50.994 ERROR Undertow request failed HttpServerExchange{ GET /about}
org.jruby.exceptions.RaiseException: (NativeException) java.io.IOException: Protocol wrong type for socket
    at sun.nio.ch.FileDispatcherImpl.writev0(Native Method) ~[na:1.8.0]
    at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51) ~[na:1.8.0]
    at sun.nio.ch.IOUtil.write(IOUtil.java:148) ~[na:1.8.0]
    at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:499) ~[na:1.8.0]
    at org.xnio.nio.NioSocketConduit.write(NioSocketConduit.java:161) ~[xnio-nio-3.3.0.Final.jar:3.3.0.Final]
    at io.undertow.server.protocol.http.HttpResponseConduit.write(HttpResponseConduit.java:609) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.conduits.ChunkedStreamSinkConduit.doWrite(ChunkedStreamSinkConduit.java:162) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.conduits.ChunkedStreamSinkConduit.write(ChunkedStreamSinkConduit.java:126) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.conduits.ChunkedStreamSinkConduit.write(ChunkedStreamSinkConduit.java:209) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at org.xnio.conduits.ConduitStreamSinkChannel.write(ConduitStreamSinkChannel.java:158) ~[xnio-api-3.3.0.Final.jar:3.3.0.Final]
    at io.undertow.channels.DetachableStreamSinkChannel.write(DetachableStreamSinkChannel.java:178) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.HttpServerExchange$WriteDispatchChannel.write(HttpServerExchange.java:1815) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at org.xnio.channels.Channels.writeBlocking(Channels.java:152) ~[xnio-api-3.3.0.Final.jar:3.3.0.Final]
    at io.undertow.io.UndertowOutputStream.write(UndertowOutputStream.java:138) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at org.projectodd.wunderboss.rack.UndertowRackAdapter.write(UndertowRackAdapter.java:169) ~[wunderboss-rack.jar:na]
    at org.projectodd.wunderboss.rack.RackResponder.write(RackResponder.java:92) ~[wunderboss-rack.jar:na]
    at org.projectodd.wunderboss.rack.RackResponder$INVOKER$i$1$0$write.call(RackResponder$INVOKER$i$1$0$write.gen) ~[na:na]
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168) ~[na:na]
    at rubyjit.WunderBoss::Rack::ResponseHandler$$handle_ff76de065a79653e7571e33a5bca5d19507321b41639705018.block_1$RUBY$__file__(.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/torquebox-web-4.0.0.beta1-java/lib/wunderboss_rack_response_handler.rb:39) ~[na:na]
    at rubyjit$WunderBoss::Rack::ResponseHandler$$handle_ff76de065a79653e7571e33a5bca5d19507321b41639705018$block_1$RUBY$__file__.call(rubyjit$WunderBoss::Rack::ResponseHandler$$handle_ff76de065a79653e7571e33a5bca5d19507321b41639705018$block_1$RUBY$__file__) ~[na:na]
    at org.jruby.runtime.CompiledBlock19.yield(CompiledBlock19.java:135) ~[na:na]
    at org.jruby.runtime.Block.yield(Block.java:142) ~[na:na]
    at org.jruby.RubyArray.eachCommon(RubyArray.java:1606) ~[na:na]
    at org.jruby.RubyArray.each(RubyArray.java:1613) ~[na:na]
    at org.jruby.RubyArray$INVOKER$i$0$0$each.call(RubyArray$INVOKER$i$0$0$each.gen) ~[na:na]
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:316) ~[na:na]
    at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:145) ~[na:na]
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149) ~[na:na]
    at org.jruby.runtime.callsite.CachingCallSite.callVarargs(CachingCallSite.java:112) ~[na:na]
    at rubyjit.Rack::BodyProxy$$each_2fa0eb7a7812280060ea5b6f8f7b2aeef0d2016a1639705018.__file__(.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/rack-1.5.3/lib/rack/body_proxy.rb:31) ~[na:na]
    at rubyjit.Rack::BodyProxy$$each_2fa0eb7a7812280060ea5b6f8f7b2aeef0d2016a1639705018.__file__(.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/rack-1.5.3/lib/rack/body_proxy.rb) ~[na:na]
    at org.jruby.ast.executable.AbstractScript.__file__(AbstractScript.java:38) ~[na:na]
    at org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:161) ~[na:na]
    at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143) ~[na:na]
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149) ~[na:na]
    at org.jruby.runtime.callsite.CachingCallSite.callVarargs(CachingCallSite.java:112) ~[na:na]
    at rubyjit.Rack::BodyProxy$$each_2fa0eb7a7812280060ea5b6f8f7b2aeef0d2016a1639705018.__file__(.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/rack-1.5.3/lib/rack/body_proxy.rb:31) ~[na:na]
    at rubyjit.Rack::BodyProxy$$each_2fa0eb7a7812280060ea5b6f8f7b2aeef0d2016a1639705018.__file__(.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/rack-1.5.3/lib/rack/body_proxy.rb) ~[na:na]
    at org.jruby.ast.executable.AbstractScript.__file__(AbstractScript.java:38) ~[na:na]
    at org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:161) ~[na:na]
    at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143) ~[na:na]
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149) ~[na:na]
    at org.jruby.runtime.callsite.CachingCallSite.callVarargs(CachingCallSite.java:112) ~[na:na]
    at rubyjit.Rack::BodyProxy$$each_2fa0eb7a7812280060ea5b6f8f7b2aeef0d2016a1639705018.__file__(.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/rack-1.5.3/lib/rack/body_proxy.rb:31) ~[na:na]
    at rubyjit.Rack::BodyProxy$$each_2fa0eb7a7812280060ea5b6f8f7b2aeef0d2016a1639705018.__file__(.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/rack-1.5.3/lib/rack/body_proxy.rb) ~[na:na]
    at org.jruby.ast.executable.AbstractScript.__file__(AbstractScript.java:38) ~[na:na]
    at org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:161) ~[na:na]
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:316) ~[na:na]
    at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:145) ~[na:na]
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149) ~[na:na]
    at org.jruby.runtime.callsite.CachingCallSite.callVarargs(CachingCallSite.java:112) ~[na:na]
    at rubyjit.Rack::BodyProxy$$each_2fa0eb7a7812280060ea5b6f8f7b2aeef0d2016a1639705018.__file__(.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/rack-1.5.3/lib/rack/body_proxy.rb:31) ~[na:na]
    at rubyjit.Rack::BodyProxy$$each_2fa0eb7a7812280060ea5b6f8f7b2aeef0d2016a1639705018.__file__(.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/rack-1.5.3/lib/rack/body_proxy.rb) ~[na:na]
    at org.jruby.ast.executable.AbstractScript.__file__(AbstractScript.java:38) ~[na:na]
    at org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:161) ~[na:na]
    at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143) ~[na:na]
    at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154) ~[na:na]
    at rubyjit.WunderBoss::Rack::ResponseHandler$$handle_ff76de065a79653e7571e33a5bca5d19507321b41639705018.chained_1_rescue_1$RUBY$SYNTHETIC__file__(.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/torquebox-web-4.0.0.beta1-java/lib/wunderboss_rack_response_handler.rb:36) ~[na:na]
    at rubyjit.WunderBoss::Rack::ResponseHandler$$handle_ff76de065a79653e7571e33a5bca5d19507321b41639705018.chained_0_ensure_1$RUBY$__ensure__(.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/torquebox-web-4.0.0.beta1-java/lib/wunderboss_rack_response_handler.rb) ~[na:na]
    at rubyjit.WunderBoss::Rack::ResponseHandler$$handle_ff76de065a79653e7571e33a5bca5d19507321b41639705018.__file__(.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/torquebox-web-4.0.0.beta1-java/lib/wunderboss_rack_response_handler.rb:24) ~[na:na]
    at rubyjit.WunderBoss::Rack::ResponseHandler$$handle_ff76de065a79653e7571e33a5bca5d19507321b41639705018.__file__(.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/torquebox-web-4.0.0.beta1-java/lib/wunderboss_rack_response_handler.rb) ~[na:na]
    at org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:261) ~[na:na]
    at org.jruby.RubyClass.finvoke(RubyClass.java:780) ~[na:na]
    at org.jruby.runtime.Helpers.invoke(Helpers.java:509) ~[na:na]
    at org.projectodd.wunderboss.rack.RackApplication.call(RackApplication.java:55) ~[wunderboss-rack.jar:na]
    at org.projectodd.wunderboss.rack.RackHandler.handleRequest(RackHandler.java:36) ~[wunderboss-rack.jar:na]
    at io.undertow.server.session.SessionAttachmentHandler.handleRequest(SessionAttachmentHandler.java:68) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0]
    at java.lang.Thread.run(Thread.java:744) [na:1.8.0]
08:02:50.996 DEBUG UT005013: An IOException occurred
java.io.IOException: Broken pipe
    at sun.nio.ch.FileDispatcherImpl.writev0(Native Method) ~[na:1.8.0]
    at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51) ~[na:1.8.0]
    at sun.nio.ch.IOUtil.write(IOUtil.java:148) ~[na:1.8.0]
    at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:499) ~[na:1.8.0]
    at org.xnio.nio.NioSocketConduit.write(NioSocketConduit.java:161) ~[xnio-nio-3.3.0.Final.jar:3.3.0.Final]
    at io.undertow.server.protocol.http.HttpResponseConduit.write(HttpResponseConduit.java:609) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.conduits.ChunkedStreamSinkConduit.doWrite(ChunkedStreamSinkConduit.java:168) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.conduits.ChunkedStreamSinkConduit.writeFinal(ChunkedStreamSinkConduit.java:230) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at org.xnio.conduits.ConduitStreamSinkChannel.writeFinal(ConduitStreamSinkChannel.java:104) ~[xnio-api-3.3.0.Final.jar:3.3.0.Final]
    at io.undertow.channels.DetachableStreamSinkChannel.writeFinal(DetachableStreamSinkChannel.java:194) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.HttpServerExchange$WriteDispatchChannel.writeFinal(HttpServerExchange.java:1829) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.io.UndertowOutputStream.writeBufferBlocking(UndertowOutputStream.java:268) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.io.UndertowOutputStream.close(UndertowOutputStream.java:311) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.HttpServerExchange$DefaultBlockingHttpExchange.close(HttpServerExchange.java:1701) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1444) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:221) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) ~[undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0]
    at java.lang.Thread.run(Thread.java:744) [na:1.8.0]

[Torquebox 4] queue.stop nil error

I am running into an issue when I try to stop my queue.

Here is my queue: #<TorqueBox::Messaging::Queue:0x5d4d1093 @default_options={:connection=>nil}, @internal_destination=#<Java::OrgProjectoddWunderbossMessagingHornetq::HornetQQueue:0x6b4fb71e>>

Now when I run queue.stop I get this error:
NoMethodError: undefined methodstop' for nil:NilClass`

I examined the source code and noticed the functionality relied on @internal_endpoint. I noticed that in my case queue.instance_variable_get(:@internal_endpoint) returned nil.

Also, this only happens in my testing environment without booting the torquebox server. This may also play into it.

Long running jobs cause redeployments to fail with runaway runtimes

After a lot of searching and head scratching I can't seem to find a way around this problem, hope I'm putting this in the right place...

If there are long running scheduled jobs executing when a redeployment is attempted the redeploy fails. Also the jobs runtime is left running without being 'registered' (i.e. can't find it via Backstage) so the whole process has to be killed outright (trying to shutdown JBoss after the failed redeploy still leaves the runtime AWOL and executing). This makes frequent deployments tricky.

As a workaround I made it possible to cancel any running jobs (calling #on_timeout) by evaling code against the jobs runtime which I would do via pry or Backstage before deploying but I think it would be great if there were a hook of some sort on redeployments that this could be wired up to for automatic cancellation.

Here's the output:

12:50:53,414 INFO  [org.jboss.web] (ServerService Thread Pool -- 58) JBAS018224: Unregister web context:
12:50:53,423 INFO  [org.jboss.as.messaging] (pool-9-thread-2) JBAS011605: Unbound messaging object to jndi name java:/queues/torquebox/sam/tasks/torquebox_backgroundable
12:50:53,420 INFO  [org.torquebox.core.runtime.SharedRubyRuntimePool] (MSC service thread 1-1) Stopped runtime pool messaging
12:50:53,420 INFO  [org.quartz.core.QuartzScheduler] (MSC service thread 1-9) Scheduler jboss.deployment.unit."sam-knob.yml".job_scheduler_$_NON_CLUSTERED shutting down.
12:50:53,445 INFO  [org.quartz.core.QuartzScheduler] (MSC service thread 1-9) Scheduler jboss.deployment.unit."sam-knob.yml".job_scheduler_$_NON_CLUSTERED paused.
12:50:53,486 INFO  [org.torquebox.core.runtime] (MSC service thread 1-15) Destroyed ruby runtime (ruby_version: RUBY1_9, compile_mode: JIT, app: sam, context: web)
12:50:53,487 INFO  [org.torquebox.core.runtime.SharedRubyRuntimePool] (MSC service thread 1-15) Stopped runtime pool web
13:10:53,390 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) JBAS014612: Operation ("full-replace-deployment") failed - address: ([]): java.util.concurrent.CancellationException: JBAS014770: Service install was cancelled
        at org.jboss.as.controller.OperationContextImpl$ContextServiceBuilder.install(OperationContextImpl.java:976) [jboss-as-controller-7.2.x.slim.incremental.16.jar:7.2.x.slim.incremental.16]
        at org.jboss.as.server.deployment.PathContentServitor.addService(PathContentServitor.java:53) [jboss-as-server-7.2.x.slim.incremental.16.jar:7.2.x.slim.incremental.16]
        at org.jboss.as.server.deployment.DeploymentHandlerUtil.doDeploy(DeploymentHandlerUtil.java:161) [jboss-as-server-7.2.x.slim.incremental.16.jar:7.2.x.slim.incremental.16]
        at org.jboss.as.server.deployment.DeploymentHandlerUtil$4.execute(DeploymentHandlerUtil.java:270) [jboss-as-server-7.2.x.slim.incremental.16.jar:7.2.x.slim.incremental.16]
        at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:440) [jboss-as-controller-7.2.x.slim.incremental.16.jar:7.2.x.slim.incremental.16]
        at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:322) [jboss-as-controller-7.2.x.slim.incremental.16.jar:7.2.x.slim.incremental.16]
        at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:229) [jboss-as-controller-7.2.x.slim.incremental.16.jar:7.2.x.slim.incremental.16]
        at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:224) [jboss-as-controller-7.2.x.slim.incremental.16.jar:7.2.x.slim.incremental.16]
        at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:142) [jboss-as-controller-7.2.x.slim.incremental.16.jar:7.2.x.slim.incremental.16]
        at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:112) [jboss-as-controller-7.2.x.slim.incremental.16.jar:7.2.x.slim.incremental.16]
        at org.jboss.as.controller.ModelControllerImpl$2$1.run(ModelControllerImpl.java:399) [jboss-as-controller-7.2.x.slim.incremental.16.jar:7.2.x.slim.incremental.16]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_21]
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_21]
        at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_21]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [rt.jar:1.7.0_21]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [rt.jar:1.7.0_21]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_21]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_21]
        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
        at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final.jar:2.1.0.Final]

13:10:53,398 WARN  [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) JBAS014626: Operation was interrupted before stability could be reached

Better gem description in rubygems

Hi,
I am packaging torquebox-no-op gem for Debian as part of GitLab packaging. I'm having trouble describing the use of gem and couldn't get any decent description from rubygems (It just states "TorqueBox No-Op Gem" ). Can you please add a more sensible description to the gem file (and also post it as a reply to this issue so that I can use it now itself, without waiting for a new version). It would be very much appreciated.

Thanks

Rack hijack not available(Tubesock)

Im using Tubesock for creating websocket connections.
Under Torquebox 4.0.alpha1 I get the error: Tubesock::HijackNotAvailable - Tubesock::HijackNotAvailable:

Setting port with rackup fails

Using torquebox-web (= 4.0.0.beta1)

$ bundle exec rackup -s torquebox
[...]
11:59:08.101 INFO  [org.projectodd.wunderboss.web.Web] (main) Registered web context /
11:59:08.107 INFO  [TorqueBox::Web::Server] (main) Starting TorqueBox::Web::Server 'default'
11:59:08.661 INFO  [TorqueBox::Web::Server] (main) Listening for HTTP requests on localhost:9292

$ bundle exec rackup -p 8080 -s torquebox
[...]
TypeError: cannot convert instance of class org.jruby.RubyString to int
    builder at /home/bruno/.rbenv/versions/jruby-1.7.11/lib/ruby/gems/shared/gems/torquebox-web-4.0.0.beta1-java/lib/torquebox/web/server.rb:325
 initialize at /home/bruno/.rbenv/versions/jruby-1.7.11/lib/ruby/gems/shared/gems/torquebox-web-4.0.0.beta1-java/lib/torquebox/web/server.rb:281
     server at /home/bruno/.rbenv/versions/jruby-1.7.11/lib/ruby/gems/shared/gems/torquebox-web-4.0.0.beta1-java/lib/torquebox/web/server.rb:121
        run at /home/bruno/.rbenv/versions/jruby-1.7.11/lib/ruby/gems/shared/gems/torquebox-web-4.0.0.beta1-java/lib/torquebox/web/server.rb:106
        run at /home/bruno/.rbenv/versions/jruby-1.7.11/lib/ruby/gems/shared/gems/torquebox-web-4.0.0.beta1-java/lib/rack/handler/torquebox.rb:38
      start at /home/bruno/.rbenv/versions/jruby-1.7.11/lib/ruby/gems/shared/gems/rack-1.6.1/lib/rack/server.rb:286
      start at /home/bruno/.rbenv/versions/jruby-1.7.11/lib/ruby/gems/shared/gems/rack-1.6.1/lib/rack/server.rb:147
     (root) at /home/bruno/.rbenv/versions/jruby-1.7.11/lib/ruby/gems/shared/gems/rack-1.6.1/bin/rackup:4
       load at org/jruby/RubyKernel.java:1101
     (root) at /home/bruno/.rbenv/versions/jruby-1.7.11/bin/rackup:23

Error deploying rails4.2 app on TorquBox4 on WildFly

Running empty rails4 application on torquebox 4.x.incremental.304 on wildfly-9.0.0.Beta2 (wared together with jruby and gems) and getting

"{\"WFLYCTL0080: Failed services\" => {\"jboss.undertow.deployment.default-server.default-host./railsapp\" => \"org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./railsapp: Failed to start service
    Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.io.FileNotFoundException: \\\\Users\\\\USERX\\\\AppData\\\\Local\\\\Temp\\\\wunderboss5916673557745020008\\\\jars\\\\wunderboss-ruby-1.x.incremental.175.jar (The system cannot find the path specified)

win7 sp1 64
java 32 build 1.8.0_31-b13
jruby (tried both - 1.7.19 and 9.0.0.0.pre1)
torquebox 4.x.incremental.304
wildfly (tried both - 8.2.0 and 9.0.0.Beta2)

Torqbox: Could not create self contained JAR

Hello,
While creating self contained JAR I get following errors:

bundle exec torquebox jar -v
16:49:22.723 DEBUG Creating jar with options {:destination=>".", :jar_name=>"meta-store.jar", :include_jruby=>true, :bundle_gems=>true, :bundle_without=>["development", "test", "assets"], :rackup=>"config.ru"}
16:49:22.730 DEBUG Shading jar /Users/ernest.bursa/.rvm/gems/jruby-1.7.16@meta-offer/gems/torquebox-core-4.x.incremental.255-java/lib/wunderboss-jars/jboss-logging-3.1.4.GA.jar
16:49:22.733 DEBUG Shading jar /Users/ernest.bursa/.rvm/gems/jruby-1.7.16@meta-offer/gems/torquebox-core-4.x.incremental.255-java/lib/wunderboss-jars/logback-classic-1.1.2.jar

...

Installing ruby-maven-libs 3.1.1
Installing rack 1.5.2
Installing kramdown 1.5.0
Bundler::InstallError: An error occurred while installing builder (3.2.2), and Bundler cannot continue.
Make sure that `gem install builder -v '3.2.2'` succeeds before bundling.
  install_gem_from_spec at /Users/ernest.bursa/.rvm/gems/jruby-1.7.16@global/gems/bundler-1.7.3/lib/bundler/installer.rb:139
    install_in_parallel at /Users/ernest.bursa/.rvm/gems/jruby-1.7.16@global/gems/bundler-1.7.3/lib/bundler/installer.rb:282
                   call at org/jruby/RubyProc.java:271
        prepare_workers at /Users/ernest.bursa/.rvm/gems/jruby-1.7.16@global/gems/bundler-1.7.3/lib/bundler/parallel_workers/thread_worker.rb:19
                   loop at org/jruby/RubyKernel.java:1501
        prepare_workers at /Users/ernest.bursa/.rvm/gems/jruby-1.7.16@global/gems/bundler-1.7.3/lib/bundler/parallel_workers/thread_worker.rb:15

So I tried installing builder gem in my current gemset and global one:

 rvm jruby-1.7.16@global exec gem install builder -v '3.2.2'
Fetching: builder-3.2.2.gem (100%)
Successfully installed builder-3.2.2
1 gem installed

Unfortunately, the 'bundler' error still occurs. Thanks in advantage for any hints.

[Torquebox 4] Partial Rack hijack (silently) not working

I have a server which works via 'rack.hijack' response header containing a lambda. On torquebox-web4.0.0.beta2 the hijack proc never gets called and the server returns an empty response body. Not even an error message gets presented.

I return an empty Array as a fake body, I think it is by convention.

STDOUT:

11:52:33.952 INFO  Registered web context /
11:52:33.958 INFO  Starting TorqueBox::Web::Server 'default'
11:52:33.975 INFO  XNIO version 3.3.0.Final
11:52:34.093 INFO  XNIO NIO Implementation Version 3.3.0.Final
11:52:34.203 INFO  Listening for HTTP requests on localhost:9292

Puma works fine albeit with a few socket management quirks.

Graceful shutdown

Is there a way to gracefully shut down a process started with torquebox run? (completing existing requests but rejecting new ones, then shutting down). If so, could it be put into the documentation?

Jarred rails app with recent sprockets can't serve precompiled assets

Sprockets, which powers Rails' asset pipeline, changed an important filename to be a dotfile in version 3.0. See issue.

The presence of this file convinces Rails to serve the precompiled asset, which has a content hash appended to the file name. Without this file, Rails tries to serve "stylesheets/application.css" and "javascripts/application.js" which 404s.

I believe the issue is with torquebox itself, adds the app files to the jar by traversing Dir.glob("**/*"), which excludes all dotfiles.

The workaround for now is to downgrade sprockets to 2.12.4, which still uses the non-dotfile manifest.json file.

Create API for shutting down TorqueBox

We need something like TorqueBox.halt, TorqueBox.stop, TorqueBox.shutdown to shut everything down cleanly when embedded.

When running inside WildFly should this be a no-op? Or attempt to stop and/or undeploy the appication?

jruby-win32ole GEM not loading

Hi,

I have the following setup:

  • TorqueBox 3.1 installed as GEM
  • JRuby 1.7.12
  • Rails 3.2.17
  • Windows Server 2008

I've loaded jruby-win32ole' version '0.8.5' in my Gemfile. When running jruby directly from the Windows command line everything works as expected.

When trying to deploy the Rails App via TorqueBox, I get the following error:

16:22:13,711 ERROR [org.torquebox.core.runtime] (pool-1-thread-2) Error during execution: ENV['RAILS_ROOT']=RACK_ROOT
ENV['RAILS_ENV']=RACK_ENV
require %q(org/torquebox/web/rails/boot)
: org.jruby.exceptions.RaiseException: (LoadError) load error: win32ole/win32ole -- java.lang.NoClassDefFoundError: Could not initialize class org.racob.com.IUnknown
    at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1065) [jruby.jar:]
    at ActiveSupport::Dependencies::Loadable.require(C:/Program Files/TOWER ONE/TARMAC/vendor/bundle/jruby/1.9/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251)    at ActiveSupport::Dependencies::Loadable.load_dependency(C:/Program Files/TOWER ONE/TARMAC/vendor/bundle/jruby/1.9/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236)    at ActiveSupport::Dependencies::Loadable.require(C:/Program Files/TOWER ONE/TARMAC/vendor/bundle/jruby/1.9/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251)    at RUBY.(root)(C:/Program Files/TOWER ONE/TARMAC/vendor/bundle/jruby/1.9/gems/jruby-win32ole-0.8.5/lib/jruby-win32ole.rb:10)    at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1065) [jruby.jar:]
    at RUBY.(root)(C:/Program Files/TOWER ONE/TARMAC/deployment/jruby/lib/ruby/gems/shared/gems/bundler-1.6.2/lib/bundler/runtime.rb:1) at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613) [jruby.jar:]
    at RUBY.require(C:/Program Files/TOWER ONE/TARMAC/deployment/jruby/lib/ruby/gems/shared/gems/bundler-1.6.2/lib/bundler/runtime.rb:76)   at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613) [jruby.jar:]
    at RUBY.require(C:/Program Files/TOWER ONE/TARMAC/deployment/jruby/lib/ruby/gems/shared/gems/bundler-1.6.2/lib/bundler/runtime.rb:72)   at RUBY.require(C:/Program Files/TOWER ONE/TARMAC/deployment/jruby/lib/ruby/gems/shared/gems/bundler-1.6.2/lib/bundler/runtime.rb:61)   at RUBY.require(C:/Program Files/TOWER ONE/TARMAC/deployment/jruby/lib/ruby/gems/shared/gems/bundler-1.6.2/lib/bundler.rb:132)  at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1065) [jruby.jar:]
    at RUBY.(root)(C:/Program Files/TOWER ONE/TARMAC/config/application.rb:9)   at org.jruby.RubyKernel.load(org/jruby/RubyKernel.java:1081) [jruby.jar:]
    at RUBY.(root)(C:/Program Files/TOWER ONE/TARMAC/config/environment.rb:1)   at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1065) [jruby.jar:]
    at RUBY.(root)(C:/Program Files/TOWER ONE/TARMAC/config/environment.rb:2)
16:22:13,727 ERROR [org.torquebox.core.runtime] (pool-1-thread-2) Failed to initialize runtime: : org.jruby.exceptions.RaiseException: (LoadError) load error: win32ole/win32ole -- java.lang.NoClassDefFoundError: Could not initialize class org.racob.com.IUnknown
    at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1065) [jruby.jar:]
    at ActiveSupport::Dependencies::Loadable.require(C:/Program Files/TOWER ONE/TARMAC/vendor/bundle/jruby/1.9/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251)    at ActiveSupport::Dependencies::Loadable.load_dependency(C:/Program Files/TOWER ONE/TARMAC/vendor/bundle/jruby/1.9/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236)    at ActiveSupport::Dependencies::Loadable.require(C:/Program Files/TOWER ONE/TARMAC/vendor/bundle/jruby/1.9/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251)    at RUBY.(root)(C:/Program Files/TOWER ONE/TARMAC/vendor/bundle/jruby/1.9/gems/jruby-win32ole-0.8.5/lib/jruby-win32ole.rb:10)    at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1065) [jruby.jar:]
    at RUBY.(root)(C:/Program Files/TOWER ONE/TARMAC/deployment/jruby/lib/ruby/gems/shared/gems/bundler-1.6.2/lib/bundler/runtime.rb:1) at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613) [jruby.jar:]
    at RUBY.require(C:/Program Files/TOWER ONE/TARMAC/deployment/jruby/lib/ruby/gems/shared/gems/bundler-1.6.2/lib/bundler/runtime.rb:76)   at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613) [jruby.jar:]
    at RUBY.require(C:/Program Files/TOWER ONE/TARMAC/deployment/jruby/lib/ruby/gems/shared/gems/bundler-1.6.2/lib/bundler/runtime.rb:72)   at RUBY.require(C:/Program Files/TOWER ONE/TARMAC/deployment/jruby/lib/ruby/gems/shared/gems/bundler-1.6.2/lib/bundler/runtime.rb:61)   at RUBY.require(C:/Program Files/TOWER ONE/TARMAC/deployment/jruby/lib/ruby/gems/shared/gems/bundler-1.6.2/lib/bundler.rb:132)  at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1065) [jruby.jar:]
    at RUBY.(root)(C:/Program Files/TOWER ONE/TARMAC/config/application.rb:9)   at org.jruby.RubyKernel.load(org/jruby/RubyKernel.java:1081) [jruby.jar:]
    at RUBY.(root)(C:/Program Files/TOWER ONE/TARMAC/config/environment.rb:1)   at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1065) [jruby.jar:]
    at RUBY.(root)(C:/Program Files/TOWER ONE/TARMAC/config/environment.rb:2)

I've also reproduced this error with JRuby 1.7.11

PermissionError when loading existing Rails app

Hello,

I've a Rails app, version 4.2.4 and am trying to get it running with the latest release of Torquebox, 3.1.2. In my development environment, I'm running RVM, so I've decided to install TB as a gem.

I'm getting a PermissionError when trying to load anything from the app/assets directory. This includes an SCSS stylesheet, a local JS file application.js and an image.

I'm attaching a screenshot for posterity. I've checked directory permissions and I am the owner of the entire directory and all files in it. TB is run using bundle exec and it shows up in the process list as my process. There are no search results around this.

Thanks.

permerror

Having trouble with 'torquebox exec' command on Windows server

We have a windows server hosted with AWS on which we are running a production TorqueBox deployment. We have a .knob file that was packaged with gems, and we were hoping to use torquebox exec path/to/myapp.knob 'rake db:migrate' to run database migrations. However, running that command results in the error 'unzip' is not recognized as an internal or external command, operable program or batch file.

I believe this is due to the way that the torquebox exec command was changed during this commit a year ago.

extract_cmd = begin
                   `jar > /dev/null 2>&1`
                   $?.success? && "jar -xf" || "unzip -q"
              rescue
                    "unzip -q"
              end

The block of added code above is not conducive to Windows machines. jar > /dev/null 2>&1 will always return The system cannot find the path specified since Windows handles /dev/null/ differently. That means the next line will fail, and we will always hit the rescue condition of unzip -q. Unfortunately, that command is also not supported on Windows and gives rise to the first error I mentioned: 'unzip' is not recognized as an internal or external command.

I'm not sure what the best way to handle this is across different systems. We could do additional windows checking here similar to pieces of the DeployUtils file. If you have suggestions I'd be happy to make a pull request.

Plans for rake task support from packaged jar in 4.x?

Hey y'all,

Are there any plans to support the ability to run rake tasks from within a packaged torquebox 4 application? Before I go down the path of duplicating what warbler does with -S (unpack the jar to a tmp dir, run tasks from there) I wanted to see if any of you have any better ideas.

Thanks!
-Scott

To delete

Hi there,
Let's say I have two different stacks - A and B, both set within a cluster.
Since A and B are not in the same cluster, they don't share the same HornetQ.
I'd like them to be able to communicate themselves with queues.
What would be the easiest way to do this ?
Thanks

https connections?

I'd like to have my development version of torquebox accept https connections. I don't currently see a way to do this. Is this something that's planned, or should I hack thin to replace torquebox-web when I start up the server? (I'd like to keep the background jobs running.)

New Torquebox 3.1.2 Release to pickup JRuby 1.7.19

There is a bug fix in JRuby 1.7.19 that we are waiting on to upgrade to Rails 4.2. It looks like the pom.xml in Torquebox has already been updated to JRuby 1.7.19 so hopefully this just means pushing out a new release.

[Torquebox4] port redirection bug

If docker redirection port and torqbox port differs this leads to 404 on any request.

Steps to reproduce:

ID=$(sudo docker run -d -p 8888 etehtsea/torquebox-bug)
ADDR=$(sudo docker port $ID 8888)
curl -i $ADDR/ololo

HTTP/1.1 404 Not Found
Connection: keep-alive
Server: undertow
X-Cascade: pass
Content-Type: text/plain
Content-Length: 17
Date: Sun, 11 May 2014 15:47:08 GMT

If app bound to the same port everything works fine.

$ sudo docker run -d -p 8888:8888 etehtsea/torquebox-bug
$ curl -i 0.0.0.0:8888/ololo
HTTP/1.1 200 OK
Connection: keep-alive
Server: undertow
Content-Length: 527
Date: Sun, 11 May 2014 16:08:27 GMT

Hello. The env is {"PATH_INFO"=>"", "SCRIPT_NAME"=>"/ololo", "HTTP_HOST"=>"0.0.0.0:8888", "SERVER_NAME"=>"0.0.0.0", "SERVER_PORT"=>"8888", "QUERY_STRING"=>"", "rack.run_once"=>false, "REMOTE_ADDR"=>"172.17.42.1", "REQUEST_METHOD"=>"GET", "rack.multithread"=>true, "CONTENT_TYPE"=>"null", "rack.input"=>#<WunderBoss::RackChannel:0x74e07abd>, "rack.url_scheme"=>"http", "rack.multiprocess"=>true, "rack.version"=>[1, 1], "REQUEST_URI"=>"/ololo", "rack.errors"=>#<IO:fd 29>, "HTTP_ACCEPT"=>"*/*", "HTTP_USER_AGENT"=>"curl/7.35.0"}

Bug shows up no matter app is running directly in docker container or request was redirected through haproxy to app's internal port and host (:8888). So I think the problem is somewhere inside torquebox's rack implementation.

So to summarize:
docker 8888 -> torquebox 8888 (works)
docker 8889 -> torquebox 8888 (404)
docker haproxy (8888 -> 80 internal) -> torquebox 8888 (works)
docker haproxy (8889 -> 80 internal) -> torquebox 8888 (404)

Demo repository: https://github.com/etehtsea/torquebox-bug

does torqbox support Rack::Deflater

I've been trying to get torqbox to serve up a compressed html/text response (over localhost) and it doesn't seem to work. When spawning the same code using WEBrick, I am able to see my simple response coming back as gzip chunked. Any pointers on getting torqbox 4 to work with Rack::Deflater?

Here is how I am starting the torqbox server => torqbox -E development -p 8000 -q config.ru
Here is how I start with WEBrick (which works) => rackup -e development -p 8000 config.ru
I am running jruby 1.7.12

Here is my simple request headers from chrome:

GET /hello/ HTTP/1.1
Host: localhost:8000
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8

Response headers:

HTTP/1.1 200 OK
Server: undertow
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Date: Thu, 18 Sep 2014 05:15:31 GMT
Connection: keep-alive
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
Content-Type: text/html
Content-Length: 245

Just for completeness here is the req/response via WEBrick:

GET /hello/ HTTP/1.1
Host: localhost:8000
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8

response:
HTTP/1.1 200 OK
Content-Type: text/html
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Vary: Accept-Encoding
Content-Encoding: gzip
Transfer-Encoding: chunked
Server: WEBrick/1.3.1 (Ruby/1.9.3/2014-04-15)
Date: Thu, 18 Sep 2014 05:20:48 GMT
Content-Length: 105
Connection: Keep-Alive

Thanks!

Bundled bundler does not ship with a .bat file for windows users

Hi Just started with torquebox and I noticed that the download package does not have a bundle.bat file in it. While the fix for most windows users would be to do a gem install bundler it almost always guarantees that windows users will never use the bundled version of bundler directly from the command line.

SockJS server doesn't fire on_close callback when clients disappear

torquebox 4.0.0.beta2 on the server, sockjs-client 1.0.3 on the client.

Steps to reproduce:

  • Start a SockJS server that prints "something" in the on_close callback
  • Connect with a client (observe heartbeat messages every 25 seconds)
  • Use some tool to simulate 100% packet loss on client (Network Link Conditioner on OS X in this case)
  • Wait 25+ seconds

Expected result: The server prints "something"

Actual result: The server prints nothing

Analysis:
I looked into the SockJS server code, and it appears that there is a timeout handler installed on connection, however, it is overwritten once the server starts it's heartbeat timer loop. It seems like there should be some code that waits for the heartbeat response and calls didTimeout if the response is not received within the disconnectDelay.

My production system needs to recover from disconnecting clients through logging and informing other clients, so everyone can wait & re-synchronize. For now, my workaround is to layer a ping/pong protocol on top of my existing protocol, but it would be nice to get this for free.

no such file to load rack/handler/torquebox

Hi,

I am getting:

bundle exec rails s torquebox
file:/home/pills/.rvm/rubies/jruby-9.0.0.0.pre1/lib/jruby.jar!/jruby/kernel/kernel.rb:28: warning: unsupported exec option: close_others
NOTE: ActiveRecord 4.2 is not (yet) fully supported by AR-JDBC, please help us finish 4.2 support - check http://bit.ly/jruby-42 for starters
Exiting
LoadError: no such file to load -- rack/handler/torquebox
                 require at org/jruby/RubyKernel.java:954
                 require at /home/pills/.rvm/gems/jruby-9.0.0.0.pre1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274
              __script__ at /home/pills/.rvm/gems/jruby-9.0.0.0.pre1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240
                 require at /home/pills/.rvm/gems/jruby-9.0.0.0.pre1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274
             try_require at /home/pills/.rvm/gems/jruby-9.0.0.0.pre1/gems/rack-1.6.0/lib/rack/handler.rb:78
                     get at /home/pills/.rvm/gems/jruby-9.0.0.0.pre1/gems/rack-1.6.0/lib/rack/handler.rb:16
                  server at /home/pills/.rvm/gems/jruby-9.0.0.0.pre1/gems/rack-1.6.0/lib/rack/server.rb:290
  print_boot_information at /home/pills/.rvm/gems/jruby-9.0.0.0.pre1/gems/railties-4.2.1/lib/rails/commands/server.rb:125
                   start at /home/pills/.rvm/gems/jruby-9.0.0.0.pre1/gems/railties-4.2.1/lib/rails/commands/server.rb:75
                  server at /home/pills/.rvm/gems/jruby-9.0.0.0.pre1/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:80
                     tap at org/jruby/RubyKernel.java:1762
                  server at /home/pills/.rvm/gems/jruby-9.0.0.0.pre1/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75
            run_command! at /home/pills/.rvm/gems/jruby-9.0.0.0.pre1/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39
                  (root) at /home/pills/.rvm/gems/jruby-9.0.0.0.pre1/gems/railties-4.2.1/lib/rails/commands.rb:17
                 require at org/jruby/RubyKernel.java:954
              __script__ at bin/rails:4

My Gemfile:

...
gem 'torquebox'
gem 'torquebox-server'

Any ideas?

I tried with torquebox run I got this.

Listing jobs

Being able to list jobs added to the Scheduler.

[Torquebox 4] Some files are missing in bundled git gems of war files

jruby 9.0.4.0
wildfly 9.0.2.FINAL
torquebox 4x build 377

This (nasty) problem seems to appears if :

  • using a gem with bundler Gemfile "git:" or "github:"
  • and the gemspec refers to a file beginning with a dot (eg. .gitignore) or a file which doesn't exist
16:59:15,825 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 68) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./: java.lang.RuntimeException: java.lang.RuntimeException: Initialization failed                                                                                                                                                                                                                                                                                          

        at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Initialization failed
        at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:224)
        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
        ... 6 more
Caused by: java.lang.RuntimeException: Initialization failed
        at org.projectodd.wunderboss.wildfly.ServletListener.contextInitialized(ServletListener.java:100)
        at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
        at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:195)
        ... 8 more
Caused by: org.jruby.exceptions.RaiseException: (SystemCallError) Unknown error - Unknown Error (0) - 
.gitignore
        at org.jruby.RubyFile.stat(org/jruby/RubyFile.java:901)
        at RUBY.block in validate_permissions(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/stdlib/rubygems/specification.rb:2716)
        at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1560)
        at RUBY.validate_permissions(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/stdlib/rubygems/specification.rb:2715)
        at RUBY.validate(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/stdlib/rubygems/specification.rb:2582)
        at RUBY.block in validate(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/rubygems_integration.rb:51)
        at RUBY.silence(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/ui/silent.rb:40)
        at RUBY.validate(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/rubygems_integration.rb:51)
        at RUBY.block in load_gemspec_uncached(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler.rb:346)
        at org.jruby.RubyDir.chdir(org/jruby/RubyDir.java:327)
        at RUBY.block in chdir(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/shared_helpers.rb:53)
        at RUBY.mon_synchronize(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/stdlib/monitor.rb:211)
        at RUBY.chdir(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/shared_helpers.rb:52)
        at RUBY.load_gemspec_uncached(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler.rb:339)
        at RUBY.load_gemspec(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler.rb:329)
        at RUBY.block in load_spec_files(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/source/path.rb:135)
        at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1560)
        at RUBY.load_spec_files(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/source/path.rb:134)
        at RUBY.load_spec_files(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/source/git.rb:188)
        at RUBY.local_specs(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/source/path.rb:92)
        at RUBY.specs(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/source/git.rb:159)
        at RUBY.block in index(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/definition.rb:209)
        at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1560)
        at RUBY.block in index(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/definition.rb:207)
        at RUBY.build(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/index.rb:9)
        at RUBY.index(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/definition.rb:204)
        at RUBY.resolve(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/definition.rb:198)
        at RUBY.specs(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/definition.rb:137)
        at RUBY.specs_for(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/definition.rb:182)
        at RUBY.requested_specs(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/definition.rb:171)
        at RUBY.requested_specs(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/environment.rb:18)
        at RUBY.setup(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/runtime.rb:13)
        at RUBY.setup(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler.rb:92)
        at RUBY.<top>(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/setup.rb:8)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:937)
        at RUBY.(root)(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1)
        at RUBY.<top>(/tmp/wunderboss8215384550760604451/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:128)

Problem with jruby -S rake torquebox:rails:deploy

 deldagorin:[dmilith:~/Src/blog ]:(11:21) → jr rake torquebox:rails:deploy
(in /Volumes/Users/dmilith/Src/blog)
TorqueBox Server OK: /Volumes/Users/dmilith/Bin/torquebox/jboss/server/default
Deployed blog

Works ok (almost - but more will tell my next issue)

but:

 deldagorin:[dmilith:~/Src/blog ]:(11:21) → jr rake torquebox:rails:deploy['/somedir']
zsh: no matches found: torquebox:rails:deploy[/somedir]
zsh: exit 1 jruby -S rake torquebox:rails:deploy['/somedir']

isn't. But on torquebox site it's written that it should work?

bug with web.yml

 deldagorin:[dmilith:~/Src/blog2 ]:(11:23) → cat config/web.yml
host: localhost
context: /blog234

then I did:

 deldagorin:[dmilith:~/Src/blog2 ]:(11:23) → jr rake torquebox:rails:deploy
(in /Volumes/Users/dmilith/Src/blog2)
TorqueBox Server OK: /Volumes/Users/dmilith/Bin/torquebox/jboss/server/default
Deployed blog2

Looks ok.. but: (log from jboss)

11:24:39,904 INFO [RailsGemVersionDeployer] Version spec [2.3.4]
11:24:47,136 INFO [RubyRackApplicationFactoryDeployer] deploying rack app factory: torquebox.rack.app.factory.blog2
11:24:47,182 INFO [SharedRackApplicationPool-anonymous] creating instance for SharedPool
11:24:47,423 WARN [AbstractDeploymentContext] Unable to register deployment mbean jboss.web.deployment:war=/
javax.management.InstanceAlreadyExistsException: jboss.deployment:id="jboss.web.deployment:war=/",type=Component already registered.
at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:756)
at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:233)
at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1431)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:1030)
at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.addComponent(AbstractDeploymentContext.java:722)
at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit.addComponent(AbstractDeploymentUnit.java:251)
at org.jboss.system.deployers.ServiceDeploymentDeployer.addServiceComponent(ServiceDeploymentDeployer.java:62)
at org.jboss.system.deployers.ServiceDeploymentDeployer$ServiceMetaDataVisitor.deploy(ServiceDeploymentDeployer.java:150)
at org.jboss.system.deployers.ServiceDeploymentDeployer$ServiceMetaDataVisitor.deploy(ServiceDeploymentDeployer.java:141)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployerWithInput.deploy(AbstractRealDeployerWithInput.java:125)
at org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer.deployComponents(AbstractComponentDeployer.java:102)
at org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer.internalDeploy(AbstractComponentDeployer.java:82)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.torquebox.rails.core.deployers.AppRailsYamlParsingDeployer.performDeploy(AppRailsYamlParsingDeployer.java:114)
at org.torquebox.rails.core.deployers.AppRailsYamlParsingDeployer.parse(AppRailsYamlParsingDeployer.java:85)
at org.torquebox.rails.core.deployers.AppRailsYamlParsingDeployer.parse(AppRailsYamlParsingDeployer.java:48)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:256)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:239)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:355)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:322)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:294)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:234)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
11:24:47,601 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/Volumes/Users/dmilith/Src/blog2/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error deploying: jboss.web.deployment:war=/
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:118)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.torquebox.rails.core.deployers.AppRailsYamlParsingDeployer.performDeploy(AppRailsYamlParsingDeployer.java:114)
at org.torquebox.rails.core.deployers.AppRailsYamlParsingDeployer.parse(AppRailsYamlParsingDeployer.java:85)
at org.torquebox.rails.core.deployers.AppRailsYamlParsingDeployer.parse(AppRailsYamlParsingDeployer.java:48)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:256)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:239)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:355)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:322)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:294)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:234)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java

Torquebox logger and tagged logging

I have a Rails 3.2 app running on TB 3.0.0 and it has been working fine with the tagged logging feature.

I recently upgraded the app to Rails4 and TB 3.1.0, and the tagged logging stopped working. The log entries did appear but without the tags. In investigating this further, specifically the TB Logger class, I cant see how tagged logging ever worked in the first place. There is an accessor for the formatter to be set, but it is never used. I assume the org.jboss.logging::Logger doesnt know anything about a formatter, so it is up to us to call the formatter before sending the message on to the jboss logger.

So, I restructured the class to behave more like the standard Ruby logger, where the methods all call add, which takes care of calling the formatter. Also, even though jboss has its own logging level, it makes sense to be able to set the Rails level and have things work accordingly (i.e. not executing log messages passed as a &block if below the current log level).

The class is here and I would love some feedback on this and if I am on the right track or did I miss something?

[Torquebox4] Can't run fat jar on non-developer machine

I have a very basic Rails app running on the alpha Torquebox server. My Gemfile looks like this:

source 'https://rubygems.org'

gem 'rails', '4.1.8'
gem 'activerecord-jdbcsqlite3-adapter'
gem 'uglifier', '>= 1.3.0'
gem 'torquebox', '4.0.0.alpha1', platform: :jruby

I am able to run the compiled jar produced via torquebox jar locally, but it failed to run when I copied the jar to another, non-developer machine. The machine happened to be a Windows 7 box VM.

C:\>java -jar E:\Developer\Work\cohesion\cohesion.jar
08:55:35.928 INFO  [org.projectodd.wunderboss] (main) Initializing application a
s ruby
Exception in thread "main" org.jruby.exceptions.RaiseException: (LoadError) no s
uch file to load -- bundler/setup
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1082)
        at RUBY.require(C:/Users/IEUser/AppData/Local/Temp/wunderboss44766829169
71493318/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55)
        at RUBY.(root)(<script>:1)

It looks like bundler itself is not vendored into the jar. I confirmed that by unzipping the jar and looking in app/vendor/bundle. I suspect the jar ran on my dev machine because bundler was in the Ruby LOAD_PATH.

Please advise if I am missing an important step, or if I can provide more information.

[Torquebox 4] Empty 304 Response gets Transfer-Encoding Header added (or: Wunderboss Upgrade)

torquebox-web seems to have the same issue a wildfly user described here: https://github.com/wildfly/wildfly/issues/8560

The solution seems to be to upgrade undertow to a current version. I added a spec and verified the upgrade solves the issue here:

https://github.com/helle/torquebox/tree/wunderboss_upgrade

Unfortunately one of the caching specs fails after the upgrade and I don't anything about that part. So no pull request for now. We are going to run the upgraded torquebox-web in our staging environment for a few days to see if there are any other unforeseen problems.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.