Menu

#125 StringIndexOutOfBoundsException running nicec

closed-fixed
None
5
2004-10-06
2004-09-29
No

I just read the Nice user's manual, and tried to
compile the "Coin" enumeration example.

Nice compiler version 0.9.9 (build 2004.09.22, 00:40:25
UTC)
Compiled using JDK 1.4.2_04

I created an empty directory, and created Coin.nice
(attached).

Then I ran cd'ed into this directory and ran "nicec ."

The OS is Windows XP Home SP1, and I tried two versions
of the JDK:
Java(TM) 2 Runtime Environment, Standard Edition (build
1.4.2_05-b04)
Java(TM) 2 Runtime Environment, Standard Edition (build
1.5.0-rc-b63)

Exception in thread "main"
java.lang.StringIndexOutOfBoundsException: String index
out of range: -1
at java.lang.String.substring(String.java:1444)
at
nice.tools.repository.fun.parseRepoURL(main.nice:95)
at
nice.tools.repository.dispatch.parseRepoURL(dispatch.nice)
at
nice.tools.repository.fun.openConnection(main.nice:69)
at
nice.tools.repository.VersionTracker.openConnection(main.nice)
at java.net.URL.openConnection(URL.java:896)
at nice.tools.locator.fun.get(locator.nice:26)
at nice.tools.locator.Locator.get(main.nice)
at bossa.modules.Locator.find(Locator.java:64)
at bossa.modules.Package.<init>(Package.java:75)
at bossa.modules.Package.make(Package.java:58)
at
bossa.modules.fun.setMainPackage(Compilation.nice:89)
at
bossa.modules.Compilation.setMainPackage(Compilation.nice)
at
nice.tools.compiler.fun.compile(interface.nice:38)
at
bossa.modules.Compilation.compile(Compilation.nice)
at
nice.tools.compiler.console.fun.compile(main.nice:165)
at
nice.tools.compiler.console.dispatch.compile(dispatch.nice)
at
nice.tools.compiler.console.fun.main(main.nice:181)
at
nice.tools.compiler.console.dispatch.main(dispatch.nice)

Discussion

  • Daniel Serodio

    Daniel Serodio - 2004-09-29
     
  • Arjan Boeijink

    Arjan Boeijink - 2004-09-30

    Logged In: YES
    user_id=688815

    Nicec shouldn't crash on this but give an error message
    instead.

    Nice doesn't work on individual source files but on packages.
    So when you have created a directory with the sourcefiles
    don't cd into it. Run nicec as "nicec packagename" where the
    packagename must the same as the directory.
    See also: http://nice.sourceforge.net/compilation.html

     
  • Daniel Serodio

    Daniel Serodio - 2004-09-30

    Logged In: YES
    user_id=58637

    Ok, running nicec on the parent directory works ok. I had
    read compilation.html, but I assumed that (package ==
    directory) so "." (this directory) meant "this package".
    Do you need help fixing this bug? Nice seems like a great
    language, I'd be glad to help where I can!

     
  • Daniel Bonniot

    Daniel Bonniot - 2004-10-06

    Logged In: YES
    user_id=88952

    Hi Daniel!

    Thanks for your offer to help. This was a quick fix, so I
    did it myself, but we'll be glad if you can help out in the
    future. You can look at
    http://nice.sourceforge.net/cgi-bin/twiki/view/Doc/GetInvolved
    for ideas. Also, don't hesitate to use nice-info, meet us on
    the IRC channel, ...

    Daniel

     
  • Daniel Bonniot

    Daniel Bonniot - 2004-10-06
    • assigned_to: nobody --> bonniot
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB