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/01/08 15:04:39 UTC

[jira] Commented: (MPCHECKSTYLE-1) Checkstyle Error - "Got an exception - java.lang.ClassCastException "

The following comment has been added to this issue:

     Author: fabrizio giustina
    Created: Thu, 8 Jan 2004 8:03 AM
       Body:
Still having this problem using maven rc-1 and checkstyle plugin 2.2.

The checkstyle report works if running alone (maven checkstyle). It doesn't work using more goals.
This happens on different project, you can try using pom from displaytag
http://cvs.sourceforge.net/viewcvs.py/displaytag/displaytag2/project.xml
or jtidy
http://cvs.sourceforge.net/viewcvs.py/jtidy/jtidy2/project.xml.

Running on Windows JDK 1.4 version "1.4.1_03".

In the log you get the following message for each class "Can't find/access AST Node typecom.puppycrawl.tools.checkstyle.api.DetailAST". And the report is filled with: "Got an exception - java.lang.ClassCastException ".

Tryed removing report or goals: the ceckstyle plugin seem to work only if the checkstyle goal is run alone.

---------------------------------------------------------------------
View the issue:

  http://jira.codehaus.org/secure/ViewIssue.jspa?key=MPCHECKSTYLE-1


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MPCHECKSTYLE-1
    Summary: Checkstyle Error - "Got an exception - java.lang.ClassCastException "
       Type: New Feature

     Status: Closed
   Priority: Major
 Resolution: FIXED

 Original Estimate: 0 minutes
 Time Spent: Unknown
  Remaining: 0 minutes

    Project: maven-checkstyle-plugin
   Fix Fors:
             2.0
   Versions:
             1.1

   Assignee: Emmanuel Venisse
   Reporter: Nick Minutello

    Created: Sat, 14 Jun 2003 6:05 AM
    Updated: Thu, 8 Jan 2004 8:03 AM
Environment: JDK1.4.1_01 on Win2K

Description:

I have the latest HEAD build of Maven (built late 13th June GMT) and I am seeing this error 100s of times over in the checkstyle report.


Error                                                 Line  
Got an exception - java.lang.ClassCastException       0  


Mailing list conversations:

On Fri, Jun 13, 2003 at 04:40:44PM +0800, Willie Vu wrote:
>> > Vincent,
>> >
>> > After I changed antlr plugin to use 2.7.2, I run into this problem:
>> >
>> > XXX.java: 0: Got an exception - java.lang.ClassCastException
>> >
>> > What is the problem?
>> >
>> > Willie
>> >
>> >
>> I think, I've ran into the same problem - and nothing to do with
>> the new checkstyle jar in my case. You cab check this by looking at
>> the checkstyle reports in target - they are all right at me.
>> 
>> The problem is that in my project.xml I'm using the
>> 
>> <sourceDirectory>${basedir}/src/java</sourceDirectory>
>> 
>> convention, and in the checkstyle jsl, that formats the raw checkstyle
>> report expects the sourceDirectory as a ${baseDir} relative value (line 56):
>> 
>> <j:set var="fullSrcDir" value="${basedir}/${pom.build.sourceDirectory}"/>

>> And the whole jsl processing is went wrog from this, as the  transformer
>> would be working with a ${basedir}/ ${basedir}/<basedir_relative_filename>
>> from here. Sometimes it causes exception, sometimes simply wrong.
>> 
>> A dirty/quick cure to modify project.xml not to use ${basedir} (altough
>> if you use reactor you may get troubles with that). I'm thinking how to
>> patch the jsl script, just wrote this, maybe more knowledgeable jelliers
>> are faster at fix than I am.
>> 
>> incze


However, my Project.xml uses relative "src/java" and I still have the same problem.




---------------------------------------------------------------------
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