[jira] Commented: (MAVEN-489) Checkstyle Error - Got an exception - java.lang.ClassCastException

2003-06-29 Thread jira
The following comment has been added to this issue:

 Author: Steve Ovens
Created: Sun, 29 Jun 2003 8:03 PM
   Body:
Don't know if this helps narrow it down, but if I run a checkstyle report as part of 
the site or dist goals, then I get the same problem - each source file reports a 
Class Cast Exception on line 0, and in the System error output I see the message 
Can't find/access AST Node typecom.puppycrawl.tools.checkstyle.api.DetailAST.

However, if I subsequently run a maven checkstyle by itself, the checkstyle executes 
correctly and the checkstyle-raw-report (and xml version of the report) are full of 
the expected checkstyle errors.

My build source code is under src/java as specified in my project.xml file. 
(sourceDirectorysrc/java/sourceDirectory)
-
View the issue:

  http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-489


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

 Status: Unassigned
   Priority: Major

 Time Spent: Unknown
   Estimate: 0 minutes

Project: maven
 Components: 
 plugin-other
   Versions:
 1.0-beta-10

   Assignee: 
   Reporter: Nick Minutello

Created: Sat, 14 Jun 2003 6:05 AM
Updated: Mon, 23 Jun 2003 1:40 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/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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (MAVEN-489) Checkstyle Error - Got an exception - java.lang.ClassCastException

2003-06-29 Thread jira
The following comment has been added to this issue:

 Author: Steve Ovens
Created: Sun, 29 Jun 2003 8:11 PM
   Body:
I should note that swapping the order of reports (jdepend and checkstyle) (as 
suggested above by Incze Lajos [ 16/Jun/03 07:19 PM ]) did not have any effect - I get 
the ClassCastException reported either way.


-
View the issue:

  http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-489


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

 Status: Unassigned
   Priority: Major

 Time Spent: Unknown
   Estimate: 0 minutes

Project: maven
 Components: 
 plugin-other
   Versions:
 1.0-beta-10

   Assignee: 
   Reporter: Nick Minutello

Created: Sat, 14 Jun 2003 6:05 AM
Updated: Mon, 23 Jun 2003 1:40 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/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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jira] Commented: (MAVEN-489) Checkstyle Error - Got an exception- java.lang.ClassCastException

2003-06-16 Thread Brian Ewins
This diagnosis doesn't seem right.

 And this is the bad news: apos; is good for html but bad for
 XML. So, the result file is not well formed. And yes, now
 I tested that this was the real problem, you can do it, too:
This isn't correct. see http://www.w3.org/TR/REC-xml#sec-predefined-ent
All XML processors must recognize these entities whether they are 
declared or not. (the next sentence - that XML documents should declare 
them anyway - is intended for interop with legacy SGML processors, the 
MUST in the first sentence applies to all conforming XML parsers). So 
the checkstyle xml is ok; the problem must be elsewhere.

Since Maven ships with Xerces, and the only other parser you're likely 
to be using is Crimson, and both of these handle amp; correctly, it 
seems incredibly unlikely that the parser is at fault (though I do 
remember some talk ages ago about shipping jelly/maven with a 'mini' xml 
parser?) It seems far more likely to be a bug in whatever is being used 
as the EntityResolver.

-Baz

[EMAIL PROTECTED] wrote:

The following comment has been added to this issue:

 Author: Incze Lajos
Created: Sat, 14 Jun 2003 6:26 PM
   Body:
OK. My previous diagnosis was all right (I've caught a real bug),
but the main disease was different. And it's not maven. Studying
the target/checkstyle-raw-report.xml which is produced by the
ant:checkstyle target and especially the ant:formatter target
inside, you can find lines like this one:
error line=87 column=5 severity=error message=Method apos;setLanguagueapos; is not designed for extension - needs to be abstract, final or empty. source=com.puppycrawl.tools.checkstyle.checks.DesignForExtensionCheck/

And this is the bad news: apos; is good for html but bad for
XML. So, the result file is not well formed. And yes, now
I tested that this was the real problem, you can do it, too:
1. Run site:generate
2. Edit target/checkstyle-raw-report.xml and chacge all
   apos; to '.
3. Run xdoc
4. Run site:fsdeploy or site:sshdeploy: and viola: you'll
   get a good checkstyle report.
So we have two issues:
1. maven checkstyle plugin's formatting jsl can't handle the
   ${basedir}/src/java construct in project.xml.
2. ant:checkstyle/ant:formatter produces ill XML.
-
View the issue:
  http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-489

Here is an overview of the issue:
-
Key: MAVEN-489
Summary: Checkstyle Error - Got an exception - java.lang.ClassCastException 
   Type: New Feature
 Status: Unassigned
   Priority: Major
 Time Spent: Unknown
   Estimate: 0 minutes
Project: maven
 Components: 
 plugin-other
   Versions:
 1.0-beta-10

   Assignee: 
   Reporter: Nick Minutello

Created: Sat, 14 Jun 2003 6:05 AM
Updated: Sat, 14 Jun 2003 6:05 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/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

RE: [jira] Commented: (MAVEN-489) Checkstyle Error - Got an exception- java.lang.ClassCastException

2003-06-16 Thread nick . minutello


Vincent,

 This error is a know error due to some Antlr version 2.7.1 present in
 the classpath. Checkstyle 3.1 requires Antlr 2.7.2.

I think that was one error.
When rebuilt Maven after your patch, I then got a different error.
(With antlr 2.7.1, it was Got an exception - java.lang.NoSuchFieldError:
tokenTypeToASTClassMap  (Line 0))

Its in the issue history in Jira
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-489



-Nick






This message and any attachments (the message) is
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and 
immediately notify the sender. Any use not in accord with 
its purpose, any dissemination or disclosure, either whole 
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message. 
BNP PARIBAS (and its subsidiaries) shall (will) not 
therefore be liable for the message if modified. 

-

Ce message et toutes les pieces jointes (ci-apres le 
message) sont etablis a l'intention exclusive de ses 
destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le detruire et d'en avertir 
immediatement l'expediteur. Toute utilisation de ce 
message non conforme a sa destination, toute diffusion 
ou toute publication, totale ou partielle, est interdite, sauf 
autorisation expresse. L'internet ne permettant pas 
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce 
message, dans l'hypothese ou il aurait ete modifie.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]