Git Product home page Git Product logo

Comments (13)

cowboyd avatar cowboyd commented on August 30, 2024

Can you upgrade your jenkins-plugin-runtime to 0.2.0 and try again?

from jenkins.rb.

rauhryan avatar rauhryan commented on August 30, 2024

Updated my gem file to 0.2.0 ran bundle update then jpi server I still
get the same error

To reproduce.

  • freshly install jruby with rvm
  • gem install jpi
  • jpi new myproj
  • bundle install
  • jpi generate builder test
  • jpi server

On Mon, Apr 2, 2012 at 10:54 AM, Charles Lowell <
[email protected]

wrote:

Can you upgrade your jenkins-plugin-runtime to 0.2.0 and try again?


Reply to this email directly or view it on GitHub:
https://github.com/cowboyd/jenkins.rb/issues/38#issuecomment-4881448

from jenkins.rb.

cowboyd avatar cowboyd commented on August 30, 2024

I followed your exact steps and here's the result:

Things we should check next:

version of jruby
version of jenkins-war

Using /Users/cowboyd/.rvm/gems/jruby-1.6.7
legolas:~ cowboyd$ jpi -v
0.3.4
legolas:~ cowboyd$ jpi new myproj
      create  myproj/Gemfile
      create  myproj/myproj.pluginspec
legolas:~ cowboyd$ cd myproj/
legolas:myproj cowboyd$ ls
Gemfile         myproj.pluginspec
legolas:myproj cowboyd$ jpi g builder test
      create  models/test_builder.rb
legolas:myproj cowboyd$ jpi server
Listening for transport dt_socket at address: 8000
Running from: /Users/cowboyd/.rvm/gems/jruby-1.6.7/gems/jenkins-war-1.447/lib/jenkins/jenkins.war
webroot: System.getProperty("JENKINS_HOME")
[Winstone 2012/04/02 11:19:24] - Beginning extraction from war file
Jenkins home directory: /Users/cowboyd/myproj/work found at: System.getProperty("JENKINS_HOME")
[Winstone 2012/04/02 11:19:32] - HTTP Listener started: port=8080
[Winstone 2012/04/02 11:19:32] - AJP13 Listener started: port=8009
[Winstone 2012/04/02 11:19:32] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled
Apr 2, 2012 11:19:32 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Apr 2, 2012 11:19:36 AM hudson.PluginManager$1$3$1 isDuplicate
INFO: Ignoring /Users/cowboyd/myproj/work/plugins/myproj.hpl because /Users/cowboyd/myproj/work/plugins/myproj.hpl is already loaded
Apr 2, 2012 11:19:44 AM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Apr 2, 2012 11:19:44 AM ruby.RubyRuntimePlugin start
INFO: Injecting JRuby into XStream
Trying to load models from /Users/cowboyd/myproj/models
Loading /Users/cowboyd/myproj/models/test_builder.rb
Apr 2, 2012 11:19:52 AM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Apr 2, 2012 11:19:58 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
Apr 2, 2012 11:19:58 AM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
Apr 2, 2012 11:19:58 AM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Apr 2, 2012 11:19:58 AM org.jenkinsci.main.modules.sshd.SSHD start
INFO: Started SSHD at port 51678
Apr 2, 2012 11:19:58 AM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Apr 2, 2012 11:19:58 AM hudson.TcpSlaveAgentListener <init>
INFO: JNLP slave agent listener started on TCP port 51679
Apr 2, 2012 11:20:08 AM hudson.WebAppMain$2 run
INFO: Jenkins is fully up and running

from jenkins.rb.

rauhryan avatar rauhryan commented on August 30, 2024
    ➜  sabatoast  gem list

    *** LOCAL GEMS ***

    bouncy-castle-java (1.5.0146.1)
    bundler (1.1.3 ruby)
    jenkins-plugin-runtime (0.2.0, 0.1.27)
    jenkins-war (1.447)
    jpi (0.3.4)
    jruby-launcher (1.0.12 java)
    jruby-openssl (0.7.6.1)
    json (1.6.6 java)
    rake (0.9.2, 0.8.7)
    rubyzip (0.9.6.1)
    slop (3.0.4)
    thor (0.14.6)

    ➜  sabatoast  ruby -v
    jruby 1.6.5.1 (ruby-1.8.7-p330) (2011-12-27 1bf37c2) (OpenJDK 64-Bit Server VM 1.6.0_23) [linux-amd64-java]

from jenkins.rb.

rauhryan avatar rauhryan commented on August 30, 2024

I'm using Ubuntu latest??? Any issues there?

from jenkins.rb.

cowboyd avatar cowboyd commented on August 30, 2024

Hmm, before we try anything else, let's also make sure you have a good version of the ruby runtime on the Java side.

You can update the dependency in your .pluginspec

 # This is a required dependency for every ruby plugin.
  plugin.depends_on 'ruby-runtime', '0.9'

from jenkins.rb.

rauhryan avatar rauhryan commented on August 30, 2024

Listening for transport dt_socket at address: 8000
Running from: /home/rauhryan/.rvm/gems/jruby-1.6.5.1/gems/jenkins-war-1.447/lib/jenkins/jenkins.war
webroot: System.getProperty("JENKINS_HOME")
[Winstone 2012/04/02 15:15:58] - Beginning extraction from war file
Jenkins home directory: /home/rauhryan/lecode/ruby/sabatoast/work found at: System.getProperty("JENKINS_HOME")
[Winstone 2012/04/02 15:16:01] - HTTP Listener started: port=8080
[Winstone 2012/04/02 15:16:01] - AJP13 Listener started: port=8009
[Winstone 2012/04/02 15:16:01] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled
Apr 2, 2012 3:16:01 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Apr 2, 2012 3:16:02 PM hudson.PluginManager$1$3$1 isDuplicate
INFO: Ignoring /home/rauhryan/lecode/ruby/sabatoast/work/plugins/sabatoast.hpl because /home/rauhryan/lecode/ruby/sabatoast/work/plugins/sabatoast.hpl is already loaded
Apr 2, 2012 3:16:03 PM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Apr 2, 2012 3:16:03 PM ruby.RubyRuntimePlugin start
INFO: Injecting JRuby into XStream
Trying to load models from /home/rauhryan/lecode/ruby/sabatoast/models
Loading /home/rauhryan/lecode/ruby/sabatoast/models/mongo_builder.rb
ArgumentError: wrong number of arguments (2 for 1)
/home/rauhryan/.rvm/gems/jruby-1.6.5.1/gems/jenkins-plugin-runtime-0.2.0/lib/jenkins/plugin.rb:116:in register_extension' /home/rauhryan/.rvm/gems/jruby-1.6.5.1/gems/jenkins-plugin-runtime-0.2.0/lib/jenkins/plugin.rb:135:inregister_describable'
org/jruby/RubyProc.java:258:in call' /home/rauhryan/.rvm/gems/jruby-1.6.5.1/gems/jenkins-plugin-runtime-0.2.0/lib/jenkins/plugin.rb:250:incallback'
/home/rauhryan/.rvm/gems/jruby-1.6.5.1/gems/jenkins-plugin-runtime-0.2.0/lib/jenkins/plugin.rb:245:in fire' org/jruby/RubyArray.java:1612:ineach'
/home/rauhryan/.rvm/gems/jruby-1.6.5.1/gems/jenkins-plugin-runtime-0.2.0/lib/jenkins/plugin.rb:244:in fire' /home/rauhryan/.rvm/gems/jruby-1.6.5.1/gems/jenkins-plugin-runtime-0.2.0/lib/jenkins/plugin.rb:148:instart'
Apr 2, 2012 3:16:10 PM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins

Updated ruby-runtime still getting error

from jenkins.rb.

cowboyd avatar cowboyd commented on August 30, 2024

It seems very likely that it is related to the ruby-runtime version, because there was very recently introduced a second method for addExtension() to take ordinal values.

https://github.com/cowboyd/jenkins.rb/blob/master/java-runtime/src/main/java/ruby/RubyPlugin.java#L101-118

I would also try upgrading jruby to latest and see if that solves it.

from jenkins.rb.

rauhryan avatar rauhryan commented on August 30, 2024

Hmm its strange that no one else is having the issue

I will try it later tonight on my mac book and see if its an environment issue

from jenkins.rb.

rauhryan avatar rauhryan commented on August 30, 2024

what should I upgrade jruby to?

I'm on the latest stable

1.6.5.1

from jenkins.rb.

cowboyd avatar cowboyd commented on August 30, 2024

Latest stable is 1.6.7. Maybe you need to upgrade rvm?

from jenkins.rb.

rauhryan avatar rauhryan commented on August 30, 2024

Updated rvm and jruby and still the same error

from jenkins.rb.

rauhryan avatar rauhryan commented on August 30, 2024

SUCCESS!

The latest version of ruby-runtime is required which is 0.10

    #this is a required dependency for every plugin
    plugin.depends_on "ruby_runtime", "0.10"

from jenkins.rb.

Related Issues (20)

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.