groovy

Groovy embeddable JAR contains outdated version of Commons CLI causing problems with Gant/Grails

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.1-rc-2
  • Fix Version/s: 1.1-rc-3
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot
cast object 'org.apache.commons.cli.PosixParser@79ab0' with
class 'org.apache.commons.cli.PosixParser' to class
'groovyjarjarcommonscli.CommandLineParser'
at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:328)
at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:1925)
at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2483)
at groovy.lang.MetaClassImpl.setProperties(MetaClassImpl.java:1218)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1195)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1112)
at org.codehaus.groovy.runtime.Invoker.invokeConstructorOf(Invoker.java:126)
at org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:95)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNewN(ScriptBytecodeAdapter.java:245)
at gant.Gant.process(Gant.groovy:185)

Activity

Hide
Russel Winder added a comment -

I don't think this JIRA issue is actually an issue. Certainly the problem is not versions of Commons CLI since 1.0 is used throughout Groovy.

There is clearly a real problem, but it is to do with Gant, Common CLI jars in Grails and Groovy lib directories and the embedding of Commons CLI using JarJar in groovy-all.

I am therefore closing this issue.

We should perhaps raise an issue in the Gant JIRA to cover the problem.

Show
Russel Winder added a comment - I don't think this JIRA issue is actually an issue. Certainly the problem is not versions of Commons CLI since 1.0 is used throughout Groovy. There is clearly a real problem, but it is to do with Gant, Common CLI jars in Grails and Groovy lib directories and the embedding of Commons CLI using JarJar in groovy-all. I am therefore closing this issue. We should perhaps raise an issue in the Gant JIRA to cover the problem.
Hide
Graeme Rocher added a comment -

Ok the problem is however critical as it currently blocks me from upgrading Grails to Groovy 1.1 final snapshots. I am stuck on RC2 (where the problem didn't exist) until this is resolved

Show
Graeme Rocher added a comment - Ok the problem is however critical as it currently blocks me from upgrading Grails to Groovy 1.1 final snapshots. I am stuck on RC2 (where the problem didn't exist) until this is resolved
Hide
Russel Winder added a comment -

Are you sure you mean RC-2. The current hypothesis is that the problem is one that occurred in the RC-1 -> RC-2 change. If this is not the case then we are barking up the wrong tree.

Show
Russel Winder added a comment - Are you sure you mean RC-2. The current hypothesis is that the problem is one that occurred in the RC-1 -> RC-2 change. If this is not the case then we are barking up the wrong tree.
Hide
Russel Winder added a comment -

It is confirmed that this is an RC1 -> RC-2 issue, and that the problem centres on the inclusion via JarJar of Commons CLI as a consequence of fixing GROOVY-2149.

Show
Russel Winder added a comment - It is confirmed that this is an RC1 -> RC-2 issue, and that the problem centres on the inclusion via JarJar of Commons CLI as a consequence of fixing GROOVY-2149.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: