jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • groovy
  • GROOVY-2211

unable to resolve class by directorynames with blanks eg: "Eigene Dateien"

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1-rc-1
  • Fix Version/s: 1.5
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows XP

Description

unable to resolve class by directorynames with blanks eg: "Eigene Dateien"

I make a directory
C:\Dokumente und Einstellungen\Nagy\Eigene Dateien\BlankTest
next I create a groovy file

------------------------ 8< -------------------------
//
//
// Dieses Skript dient zum Klären des Problems
// beim aufrufen von Klassen in "Eigene Datein"
// Es scheint Probleme bei der Verwendung von Blanks
// in Verzeichnisnamen zu geben
//
// .-update-.
// – wann----wer- was -------------------------------------
// 01.10.2007 | ny | erstellt

import pckUtil.ClMyUtil

def oUtil = new ClMyUtil()
println oUtil.Any()
------------------------ 8< -------------------------

Afterwards: create directory
pckUtil
in this directory I create a testclass ClMyUtil

------------------------ 8< -------------------------
package pckUtil

// ---- Classe ----------------------------------------------------
class ClMyUtil {
// ----------------------------------------------------------------
//
// Dies ist eine Klasse um das Problem bei
// "Eigene Dateien" zu klaeren.
//
//
// .-update-.
// – wann----wer- was -------------------------------------
// 01.10.2007 | ny | erstellt
// | |
// | |
// | |

def Any = { return "pong" }
}
------------------------ 8< -------------------------

Back to Applicationroot
cd ..

Now I run with following error:

$ groovy BlankTest.groovy
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed,
BlankTest.groovy: 15: unable to resolve class pckUtil.ClMyUtil
@ line 15, column 1.
import pckUtil.ClMyUtil
^

1 error

When I copy this application to eg. "c:\temp" its run trouble-free

------------------------ 8< -------------------------
$ cd
C:\temp\BlankTest

$ groovy BlankTest.groovy
pong
------------------------ 8< -------------------------
Strange!

In "Eigene Dateien" I used a old trick from MS-DOS

subst M: "%cd%"
M:
groovy BlankTest.groovy

this run also ok.

I assume this problems is hidden by blanks in directoryname.

Issue Links

duplicates

Bug - A problem which impairs or prevents the functions of the product. GROOVY-1659 Compiler cant find groovy scripts in same directory if path (on windows) has a space

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
relates to

Bug - A problem which impairs or prevents the functions of the product. GROOVY-2260 Wrong install : Exception in thread "Main Thread" java.lang.NoClassDefFoundError: Files\Groovy

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Andres Almiray added a comment - 27/Nov/07 12:59 AM

I tested with 1.1-final-SNAPSHOT (jdk 1.6.0_03, winxp) with the following setup

---- Caller.groovy -----
import inner.Util
def util = new Util()
println util.any()
----------------------------

----Util.groovy --------
package inner

class Util {
def any() { "any" }
}
--------------------------

then on C:\tmp\bug2271 I copied Caller.groovy and C:\tmp\bug2771\inner Util.groovy
c:\tmp\bug2271> groovy Caller.groovy
any

then on "C:\tmp\bug 2271" I copied Caller.groovy and "C:\tmp\bug 2771\inner" Util.groovy
c:\tmp\bug 2271> groovy Caller.groovy
any

Can you please check again with your setup to see if the problem persists?

Show
Andres Almiray added a comment - 27/Nov/07 12:59 AM I tested with 1.1-final-SNAPSHOT (jdk 1.6.0_03, winxp) with the following setup ---- Caller.groovy ----- import inner.Util def util = new Util() println util.any() ---------------------------- ----Util.groovy -------- package inner class Util { def any() { "any" } } -------------------------- then on C:\tmp\bug2271 I copied Caller.groovy and C:\tmp\bug2771\inner Util.groovy c:\tmp\bug2271> groovy Caller.groovy any then on "C:\tmp\bug 2271" I copied Caller.groovy and "C:\tmp\bug 2771\inner" Util.groovy c:\tmp\bug 2271> groovy Caller.groovy any Can you please check again with your setup to see if the problem persists?
Hide
Permalink
Paul King added a comment - 27/Apr/08 5:02 AM

Example works for me too. I believe this was fixed with other issues. Please reopen if you still have problems.

Show
Paul King added a comment - 27/Apr/08 5:02 AM Example works for me too. I believe this was fixed with other issues. Please reopen if you still have problems.

People

  • Assignee:
    Unassigned
    Reporter:
    Wilhelm Nagy
Vote (0)
Watch (1)

Dates

  • Created:
    15/Oct/07 8:14 AM
    Updated:
    27/Apr/08 5:03 AM
    Resolved:
    27/Apr/08 5:02 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.