Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not start the result from 'warble war' in jetty9 or tomcat #460

Open
thebravoman opened this issue Sep 1, 2019 · 3 comments
Open

Can not start the result from 'warble war' in jetty9 or tomcat #460

thebravoman opened this issue Sep 1, 2019 · 3 comments

Comments

@thebravoman
Copy link

thebravoman commented Sep 1, 2019

I have jruby-9.2.8.0,
Warbler version 2.0.5
App is run successfully with 'rails s' and could be accessed on localhost:3000

Packing with warbler with

warble war

Putting the file in Jetty9 webapps folder

The following error occurs.

exit from org/jruby/RubyKernel.java:744:in `exit' from org/jruby/RubyKernel.java:707:in `exit' from /tmp/jetty-0.0.0.0-8080-fllcasts.war-_fllcasts-any-18319710333246186364.dir/webapp/WEB-INF/gems/gems/bundler-2.0.2/lib/bundler/setup.rb:17:in `<main>' from org/jruby/RubyKernel.java:987:in `require' from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1:in `(root)' from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54:in `<main>' from org/jruby/RubyKernel.java:987:in `require' from /tmp/jetty-0.0.0.0-8080-fllcasts.war-_fllcasts-any-18319710333246186364.dir/webapp/WEB-INF/config/boot.rb:3:in `<main>' from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1:in `(root)' from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54:in `require' from uri:classloader:/jruby/rack/rails/environment3.rb:23:in `<main>'

Am I missing something. I will try with other containers also.

@thebravoman
Copy link
Author

Tried with tomcat. Same error

@thebravoman thebravoman changed the title Can not start the result from 'warble war' in jetty9 Can not start the result from 'warble war' in jetty9 or tomcat Sep 1, 2019
@thebravoman
Copy link
Author

Tried with a another, different gem
Got


Request Method: | GET
-- | --
http://localhost:8080/dummy/

no such file to load -- rails/railtie from org/jruby/RubyKernel.java:987:in `require' from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54:in `require' from uri:classloader:/jruby/rack/rails/railtie.rb:9:in `<main>' from org/jruby/RubyKernel.java:987:in `require' from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1:in `(root)' from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54:in `require' from uri:classloader:/jruby/rack/rails/environment3.rb:24:in `load_environment' from uri:classloader:/jruby/rack/rails_booter.rb:83:in `<main>'

Probably all of our gems are missing something. I tried creating a brand new gem with rails new and managed to create a war and to start it on tomcat. But all the other gems I can not successfully warble into a war

@thebravoman
Copy link
Author

Fulls error from .log

01-Sep-2019 21:38:54.865 INFO [Catalina-utility-2] org.apache.catalina.core.ApplicationContext.log INFO: jruby 9.2.8.0 (2.5.3) 2019-08-12 a1ac7ff OpenJDK 64-Bit Server VM 11.0.4+11-post-Ubuntu-1ubuntu219.04 on 11.0.4+11-post-Ubuntu-1ubuntu219.04 +jit [linux-x86_64]
01-Sep-2019 21:38:54.866 INFO [Catalina-utility-2] org.apache.catalina.core.ApplicationContext.log INFO: using a shared (threadsafe!) runtime
01-Sep-2019 21:38:58.751 INFO [Catalina-utility-2] org.apache.catalina.core.ApplicationContext.log An exception happened during JRuby-Rack startup
no such file to load -- rails/railtie
--- System
jruby 9.2.8.0 (2.5.3) 2019-08-12 a1ac7ff OpenJDK 64-Bit Server VM 11.0.4+11-post-Ubuntu-1ubuntu219.04 on 11.0.4+11-post-Ubuntu-1ubuntu219.04 +jit [linux-x86_64]
Time: 2019-09-01 21:38:58 +0300
Server: Apache Tomcat/9.0.24
jruby.home: uri:classloader://META-INF/jruby.home

--- Context Init Parameters:
jruby.max.runtimes = 1
jruby.min.runtimes = 1
public.root = /
rails.env = production

--- Backtrace
LoadError: no such file to load -- rails/railtie
           require at org/jruby/RubyKernel.java:987
           require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54
            <main> at uri:classloader:/jruby/rack/rails/railtie.rb:9
           require at org/jruby/RubyKernel.java:987
            (root) at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
           require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54
  load_environment at uri:classloader:/jruby/rack/rails/environment3.rb:24
            <main> at uri:classloader:/jruby/rack/rails_booter.rb:83

--- RubyGems
Gem.dir: /opt/tomcat/webapps/dummy/WEB-INF/gems
Gem.path:
/opt/tomcat/.gem/jruby/2.5.0
uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared
/opt/tomcat/webapps/dummy/WEB-INF/gems
Activated gems:
  did_you_mean-1.2.0

--- Bundler
undefined method `bundle_path' for Bundler:Module

--- JRuby-Rack Config
compat_version = 
default_logger = org.jruby.rack.logging.StandardOutLogger@4a9fdc3f
equals = <error: >
err = org.apache.tomcat.util.log.SystemLogHandler@487d2380
filter_adds_html = true
filter_verifies_resource = false
ignore_environment = false
initial_memory_buffer_size = 
initial_runtimes = 1
jms_connection_factory = 
jms_jndi_properties = 
logger = org.jruby.rack.logging.ServletContextLogger@625db9cb
logger_class_name = servlet_context
logger_name = jruby.rack
maximum_memory_buffer_size = 
maximum_runtimes = 1
num_initializer_threads = 
out = org.apache.tomcat.util.log.SystemLogHandler@1bee5d67
rackup = 
rackup_path = 
rewindable = true
runtime_arguments = 
runtime_environment = 
runtime_timeout_seconds = 
serial_initialization = false
servlet_context = org.apache.catalina.core.ApplicationContextFacade@3511aa68
throw_init_exception = false

--- $LOAD_PATH:
/opt/tomcat/webapps/lib
uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/did_you_mean-1.2.0/lib
uri:classloader:/META-INF/jruby.home/lib/ruby/2.5/site_ruby
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib

01-Sep-2019 21:38:58.751 SEVERE [Catalina-utility-2] org.apache.catalina.core.ApplicationContext.log ERROR: initialization failed
	org.jruby.rack.RackInitializationException: no such file to load -- rails/railtie
	from org/jruby/RubyKernel.java:987:in `require'
	from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54:in `require'
	from uri:classloader:/jruby/rack/rails/railtie.rb:9:in `<main>'
	from org/jruby/RubyKernel.java:987:in `require'
	from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1:in `(root)'
	from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54:in `require'
	from uri:classloader:/jruby/rack/rails/environment3.rb:24:in `load_environment'
	from uri:classloader:/jruby/rack/rails_booter.rb:83:in `<main>'

		at org.jruby.rack.RackInitializationException.wrap(RackInitializationException.java:29)
		at org.jruby.rack.RackApplicationFactoryDecorator.init(RackApplicationFactoryDecorator.java:104)
		at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:50)
		at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4685)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5146)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
		at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
		at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
		at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:773)
		at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
		at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1620)
		at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:305)
		at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
		at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1151)
		at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1353)
		at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1357)
		at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1335)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
		at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
		at java.base/java.lang.Thread.run(Thread.java:834)
	Caused by: org.jruby.exceptions.LoadError: (LoadError) no such file to load -- rails/railtie
		at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:987)
		at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54)
		at RUBY.<main>(uri:classloader:/jruby/rack/rails/railtie.rb:9)
		at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:987)
		at RUBY.(root)(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1)
		at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54)
		at RUBY.load_environment(uri:classloader:/jruby/rack/rails/environment3.rb:24)
		at RUBY.<main>(uri:classloader:/jruby/rack/rails_booter.rb:83)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant