gem command throws exception on all uses of it
----------------------------------------------

                 Key: JRUBY-4234
                 URL: http://jira.codehaus.org/browse/JRUBY-4234
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules, IBM/Other VM, Ruby 1.8.7
    Affects Versions: JRuby 1.4
         Environment: Windows XP SP3, 32 bit

java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pwi32devifx-20090327 
(SR9-SSU ))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 
j9vmwi3223-20081129 (JIT enabled)
J9VM - 20081126_26240_lHdSMr
JIT  - 20081112_1511ifx1_r8
GC   - 200811_07)
JCL  - 20090327

            Reporter: Jonas T
            Priority: Minor
             Fix For: JRuby 1.4


When executing gem from jruby-complete-1.4.0.jar a stack trace is loaded before 
rubygems initializes which means it's thrown for any use of the command.

I classified this problem as minor since I'm uncertain whether that exception 
is just cosmetic or is related to the errors I get when actually using rubygems.

Command invoked:
java -jar jruby-complete-1.4.0.jar --command gem

Complete output:

java.net.MalformedURLException: no !/ in spec
        at java.net.URL.<init>(URL.java:635)
        at java.net.URL.<init>(URL.java:498)
        at java.net.URL.<init>(URL.java:447)
        at java.net.JarURLConnection.parseSpecs(JarURLConnection.java:181)
        at java.net.JarURLConnection.<init>(JarURLConnection.java:164)
        at 
sun.net.www.protocol.jar.JarURLConnection.<init>(JarURLConnection.java:93)
        at sun.net.www.protocol.jar.Handler.openConnection(Handler.java:42)
        at java.net.URL.openConnection(URL.java:977)
        at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:857)
        at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:814)
        at sun.misc.URLClassPath$3.rtJarLoader(URLClassPath.java:589)
        at sun.misc.URLClassPath$3.run(URLClassPath.java:520)
        at 
java.security.AccessController.doPrivileged(AccessController.java:246)
        at sun.misc.URLClassPath.getLoader(URLClassPath.java:509)
        at sun.misc.URLClassPath.getLoader(URLClassPath.java:474)
        at sun.misc.URLClassPath.getResource(URLClassPath.java:323)
        at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1032)
        at 
java.security.AccessController.doPrivileged(AccessController.java:279)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:491)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:631)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:597)
        at 
org.jruby.internal.runtime.methods.InvocationMethodFactory.tryClass(InvocationMethodFactory.java:1242)
        at 
org.jruby.internal.runtime.methods.InvocationMethodFactory.getAnnotatedMethodClass(InvocationMethodFactory.java:722)
        at 
org.jruby.internal.runtime.methods.InvocationMethodFactory.getAnnotatedMethod(InvocationMethodFactory.java:685)
        at org.jruby.RubyModule.defineAnnotatedMethod(RubyModule.java:794)
        at org.jruby.RubyModule.defineAnnotatedMethod(RubyModule.java:762)
        at 
org.jruby.anno.TypePopulator$DefaultTypePopulator.populate(TypePopulator.java:50)
        at 
org.jruby.RubyModule.defineAnnotatedMethodsIndividually(RubyModule.java:679)
        at org.jruby.RubyModule.defineAnnotatedMethods(RubyModule.java:581)
        at YechtService.basicLoad(YechtService.java:21)
        at 
org.jruby.runtime.load.ClassExtensionLibrary.load(ClassExtensionLibrary.java:50)
        at 
org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:629)
        at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:308)
        at org.jruby.runtime.load.LoadService.require(LoadService.java:319)
        at 
org.jruby.runtime.load.LoadService.lockAndRequire(LoadService.java:283)
        at org.jruby.RubyKernel.require(RubyKernel.java:920)
        at 
org.jruby.RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.call(org/jruby/RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.gen)
        at 
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:312)
        at 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:310)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149)
        at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
        at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
        at org.jruby.ast.RootNode.interpret(RootNode.java:129)
        at org.jruby.Ruby.loadFile(Ruby.java:2419)
        at org.jruby.util.BuiltinScript.load(BuiltinScript.java:56)
        at 
org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:629)
        at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:308)
        at org.jruby.runtime.load.LoadService.require(LoadService.java:319)
        at 
org.jruby.runtime.load.LoadService.lockAndRequire(LoadService.java:283)
        at org.jruby.RubyKernel.require(RubyKernel.java:920)
        at 
org.jruby.RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.call(org/jruby/RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.gen)
        at 
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:312)
        at 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:310)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149)
        at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
        at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
        at org.jruby.ast.RootNode.interpret(RootNode.java:129)
        at org.jruby.Ruby.loadFile(Ruby.java:2419)
        at org.jruby.util.BuiltinScript.load(BuiltinScript.java:56)
        at 
org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:629)
        at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:308)
        at org.jruby.runtime.load.LoadService.require(LoadService.java:319)
        at 
org.jruby.runtime.load.LoadService.lockAndRequire(LoadService.java:283)
        at org.jruby.RubyKernel.require(RubyKernel.java:920)
        at 
org.jruby.RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.call(org/jruby/RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.gen)
        at 
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:312)
        at 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:310)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149)
        at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
        at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
        at org.jruby.ast.RootNode.interpret(RootNode.java:129)
        at org.jruby.Ruby.loadFile(Ruby.java:2419)
        at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:64)
        at 
org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:629)
        at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:308)
        at org.jruby.runtime.load.LoadService.require(LoadService.java:319)
        at 
org.jruby.runtime.load.LoadService.lockAndRequire(LoadService.java:283)
        at org.jruby.RubyKernel.require(RubyKernel.java:920)
        at 
org.jruby.RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.call(org/jruby/RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.gen)
        at 
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:312)
        at 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:310)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149)
        at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
        at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
        at org.jruby.ast.RootNode.interpret(RootNode.java:129)
        at org.jruby.Ruby.loadFile(Ruby.java:2419)
        at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:64)
        at 
org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:629)
        at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:308)
        at org.jruby.runtime.load.LoadService.require(LoadService.java:319)
        at 
org.jruby.runtime.load.LoadService.lockAndRequire(LoadService.java:283)
        at org.jruby.RubyKernel.require(RubyKernel.java:920)
        at 
org.jruby.RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.call(org/jruby/RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.gen)
        at 
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:312)
        at 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:310)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149)
        at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
        at org.jruby.ast.RescueNode.executeBody(RescueNode.java:225)
        at 
org.jruby.ast.RescueNode.interpretWithoutJavaExceptions(RescueNode.java:121)
        at org.jruby.ast.RescueNode.interpret(RescueNode.java:112)
        at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
        at org.jruby.ast.IfNode.interpret(IfNode.java:117)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
        at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
        at org.jruby.ast.RootNode.interpret(RootNode.java:129)
        at org.jruby.Ruby.loadFile(Ruby.java:2419)
        at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:64)
        at 
org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:629)
        at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:308)
        at org.jruby.runtime.load.LoadService.require(LoadService.java:319)
        at 
org.jruby.runtime.load.LoadService.lockAndRequire(LoadService.java:283)
        at org.jruby.RubyKernel.require(RubyKernel.java:920)
        at 
org.jruby.RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.call(org/jruby/RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.gen)
        at 
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:312)
        at 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:310)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149)
        at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
        at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
        at org.jruby.ast.RootNode.interpret(RootNode.java:129)
        at org.jruby.Ruby.loadFile(Ruby.java:2419)
        at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:64)
        at org.jruby.runtime.load.LoadService.load(LoadService.java:249)
        at org.jruby.RubyKernel.load(RubyKernel.java:932)
        at 
org.jruby.RubyKernel$s_method_0_1$RUBYFRAMEDINVOKER$load.call(org/jruby/RubyKernel$s_method_0_1$RUBYFRAMEDINVOKER$load.gen)
        at 
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:180)
        at 
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:176)
        at 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:310)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:149)
        at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
        at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
        at 
org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:317)
        at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:305)
        at org.jruby.runtime.BlockBody.call(BlockBody.java:72)
        at org.jruby.runtime.BlockBody.call(BlockBody.java:78)
        at org.jruby.runtime.Block.call(Block.java:89)
        at org.jruby.RubyProc.call(RubyProc.java:221)
        at 
org.jruby.internal.runtime.methods.ProcMethod.call(ProcMethod.java:63)
        at 
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:172)
        at 
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:168)
        at 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:290)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:109)
        at gem.__file__(gem:1)
        at gem.load(gem)
        at org.jruby.Ruby.runScript(Ruby.java:628)
        at org.jruby.Ruby.runNormally(Ruby.java:550)
        at org.jruby.Ruby.runFromMain(Ruby.java:396)
        at org.jruby.Main.run(Main.java:272)
        at org.jruby.Main.run(Main.java:117)
        at org.jruby.Main.main(Main.java:97)

RubyGems is a sophisticated package manager for Ruby.  This is a
basic help message containing pointers to more information.

  Usage:
    gem -h/--help
    gem -v/--version
    gem command [arguments...] [options...]

  Examples:
    gem install rake
    gem list --local
    gem build package.gemspec
    gem help install

  Further help:
    gem help commands            list all 'gem' commands
    gem help examples            show some examples of usage
    gem help platforms           show information about platforms
    gem help <COMMAND>           show help on COMMAND
                                   (e.g. 'gem help install')
    gem server                   present a web page at
                                 http://localhost:8808/
                                 with info about installed gems
  Further information:
    http://rubygems.rubyforge.org


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to