You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ji...@codehaus.org on 2004/09/21 14:19:14 UTC

[jira] Updated: (MAVEN-1404) ClassCastException in the debug log when inheriting an undefined property

The following issue has been updated:

    Updater: Brett Porter (mailto:brett@codehaus.org)
       Date: Tue, 21 Sep 2004 8:17 AM
    Changes:
             Fix Version changed to 1.1
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://jira.codehaus.org/browse/MAVEN-1404?page=history

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/browse/MAVEN-1404

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MAVEN-1404
    Summary: ClassCastException in the debug log when inheriting an undefined property
       Type: Bug

     Status: Open
   Priority: Critical

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven
 Components: 
             inheritance
   Fix Fors:
             1.1
   Versions:
             1.0

   Assignee: Brett Porter
   Reporter: Julien Kirch

    Created: Mon, 26 Jul 2004 3:04 AM
    Updated: Tue, 21 Sep 2004 8:17 AM

Description:
It's a behavior that appears when using maven with -X property in an unherited project, I can't know if it's a real problem or only a bad log.

1) Make a project
2) In it's project.properties, put a property that uses an undefined property, as an exemple

my.foo.property=${undefined.property}

3) Execute a maven goal : all goes well

4) Make a new project inheriting this one

5) Call maven in debug mode, in the log I have a  :

####
Unexpected error evaluating expression
java.lang.ClassCastException
        at org.apache.maven.MavenUtils.integrateMapInContext(MavenUtils.java:820)
        at org.apache.maven.MavenUtils.getNonJellyProject(MavenUtils.java:240)
        at org.apache.maven.MavenUtils.getProject(MavenUtils.java:144)
        at org.apache.maven.MavenUtils.getProject(MavenUtils.java:123)
        at org.apache.maven.MavenSession.initializeRootProject(MavenSession.java:235)
        at org.apache.maven.MavenSession.initialize(MavenSession.java:175)
        at org.apache.maven.cli.App.doMain(App.java:473)
        at org.apache.maven.cli.App.main(App.java:1215)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.werken.forehead.Forehead.run(Forehead.java:551)
        at com.werken.forehead.Forehead.main(Forehead.java:581)
####
with no detail about the expression that causes the problem

In MavenUtils, the line says :

 String literalValue = (String) value;

and (after a quick look) the /value/ (it's the value of ${undefined.property}),  in this case is not a String but a 
org.apache.commons.jelly.expression.jexl.JexlExpressionFactory$ExpressionSupportLocal@15bdc50[expression:undefined.property]

It sounds like in this (inherited) case the property value is not evaluated as it should be.

I don't know if it's a real problem or simply a log issue, but if it's simply a log problem it should be removed or the log should be cleaner.



---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org