Thread: [apt-jelly-users] getting closer to the jaxb problem
Brought to you by:
stoicflame
|
From: Brian G. <br...@st...> - 2007-01-28 05:14:17
|
So this is a segment of the output from running apt when using one of =
the
JAXB annotations. Just got it to appear (turned off forking the apt =
exec
task =96 yes still in ant 1.6.x). Haven=92t dissected it yet, but I=92m =
hoping it
will be more meaningful to a user on the list or Ryan.
=20
symbol : class XmlAttribute
[exec] location: class com.bob.corp.scn.model.SourceCustomer
[exec] @XmlAttribute(name=3D"foo")
[exec] ^
[exec] error: Could not create declaration for annotation type
XmlAttribute
[exec] Problem encountered during annotation processing;
[exec] see stacktrace below for more information.
[exec] java.lang.ClassCastException:
com.sun.tools.apt.mirror.type.ClassTypeImpl
[exec] at
com.sun.tools.apt.mirror.declaration.AnnotationMirrorImpl.getAnnotationTy=
pe(
AnnotationMirrorImpl.java:82)
[exec] at
net.sf.jelly.apt.decorations.declaration.DecoratedAnnotationMirror.<init>=
(De
coratedAnnotationMirror.java:47)
=20
Thanks,
=20
Brian
--=20
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.12/654 - Release Date: =
1/27/2007
5:02 PM
=20
|
|
From: Ryan H. <sto...@gm...> - 2007-01-29 16:44:41
|
I've looked into this a bit more, but I'm still stumped. My suspicions lea= n towards something awry in your environment, but I'm about as far as I can g= o without more information. If you can reproduce it in a test case (or give me a way to reproduce it in a test case), I'd be able to figure out what's going on. More information about your environment might also be helpful: -It's a long shot, but do you happen to have another class that is named "XmlAttribute" in either your source base or your classpath? -What's does the executable look like when executing APT? (try ant -v) Ar= e you sure the jaxb-2.0-api.jar is on the classpath when invoking APT? -Ryan On 1/28/07, Ryan Heaton <sto...@us...> wrote: > > Thanks for the report, Brian. > > It's an elusive one. I can tell you that I'm using JAXB 2.0 annotations > with APT-Jelly, and I've never seen this one. There really shouldn't be > anything special about JAXB 2.0 annotations; they're the same as any othe= r > annotation. > > I'd really like to be able to reproduce it in a test. Can you send me > more of the stack trace? > > -Ryan > > > > On 1/27/07, Brian Greene <br...@st...> wrote: > > > So this is a segment of the output from running apt when using one of > > the JAXB annotations. Just got it to appear (turned off forking the ap= t > > exec task =96 yes still in ant 1.6.x). Haven't dissected it yet, but I= 'm > > hoping it will be more meaningful to a user on the list or Ryan. > > > > > > > > symbol : class XmlAttribute > > > > [* exec*] location: class com.bob.corp.scn.model.SourceCustomer > > > > [* exec*] @XmlAttribute(name=3D"foo") > > > > [* exec*] ^ > > > > [* exec*] error: Could not create declaration for annotation type > > XmlAttribute > > > > [* exec*] Problem encountered during annotation processing; > > > > [* exec*] see stacktrace below for more information. > > > > [* exec*] * java.lang.ClassCastException*: > > com.sun.tools.apt.mirror.type.ClassTypeImpl > > > > [* exec*] at > > com.sun.tools.apt.mirror.declaration.AnnotationMirrorImpl.getAnnotation= Type > > (*AnnotationMirrorImpl.java:82 *) > > > > [*exec* ] at > > net.sf.jelly.apt.decorations.declaration.DecoratedAnnotationMirror > > .<init>(*DecoratedAnnotationMirror.java:47 *) > > > > > > > > Thanks, > > > > > > > > Brian > > > > -- > > No virus found in this outgoing message. > > Checked by AVG Free Edition. > > Version: 7.5.432 / Virus Database: 268.17.12/654 - Release Date: > > 1/27/2007 5:02 PM > > > > > > -----------------------------------------------------------------------= -- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share > > your > > opinions on IT & business topics through brief surveys - and earn cash > > > > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID= =3DDEVDEV > > > > _______________________________________________ > > Apt-jelly-users mailing list > > Apt...@li... > > https://lists.sourceforge.net/lists/listinfo/apt-jelly-users > > > > > > > |
|
From: Ryan H. <sto...@gm...> - 2007-01-29 16:46:25
|
A quick google search on the error found this: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=3D6432333 Sounds a lot like what you're encountering. This would imply that the jaxb-2.0-api.jar isn't on your APT classpath when you invoke APT. -Ryan On 1/29/07, Ryan Heaton <sto...@gm...> wrote: > > I've looked into this a bit more, but I'm still stumped. My suspicions > lean towards something awry in your environment, but I'm about as far as = I > can go without more information. If you can reproduce it in a test case = (or > give me a way to reproduce it in a test case), I'd be able to figure out > what's going on. More information about your environment might also be > helpful: > > -It's a long shot, but do you happen to have another class that is named > "XmlAttribute" in either your source base or your classpath? > -What's does the executable look like when executing APT? (try ant -v) > Are you sure the jaxb-2.0-api.jar is on the classpath when invoking APT? > > -Ryan > > > > On 1/28/07, Ryan Heaton < sto...@us...> wrote: > > > > Thanks for the report, Brian. > > > > It's an elusive one. I can tell you that I'm using JAXB 2.0 annotation= s > > with APT-Jelly, and I've never seen this one. There really shouldn't b= e > > anything special about JAXB 2.0 annotations; they're the same as any > > other annotation. > > > > I'd really like to be able to reproduce it in a test. Can you send me > > more of the stack trace? > > > > -Ryan > > > > > > > > On 1/27/07, Brian Greene <br...@st...> wrote: > > > > > So this is a segment of the output from running apt when using one o= f > > > the JAXB annotations. Just got it to appear (turned off forking the = apt > > > exec task =96 yes still in ant 1.6.x). Haven't dissected it yet, but > > > I'm hoping it will be more meaningful to a user on the list or Ryan. > > > > > > > > > > > > symbol : class XmlAttribute > > > > > > [* exec*] location: class com.bob.corp.scn.model.SourceCustomer > > > > > > [* exec*] @XmlAttribute(name=3D"foo") > > > > > > [* exec*] ^ > > > > > > [* exec*] error: Could not create declaration for annotation typ= e > > > XmlAttribute > > > > > > [* exec*] Problem encountered during annotation processing; > > > > > > [* exec*] see stacktrace below for more information. > > > > > > [* exec*] * java.lang.ClassCastException*: > > > com.sun.tools.apt.mirror.type.ClassTypeImpl > > > > > > [* exec*] at > > > com.sun.tools.apt.mirror.declaration.AnnotationMirrorImpl.getAnnotati= onType > > > (*AnnotationMirrorImpl.java:82 *) > > > > > > [*exec* ] at > > > net.sf.jelly.apt.decorations.declaration.DecoratedAnnotationMirror > > > .<init>(*DecoratedAnnotationMirror.java:47 *) > > > > > > > > > > > > Thanks, > > > > > > > > > > > > Brian > > > > > > -- > > > No virus found in this outgoing message. > > > Checked by AVG Free Edition. > > > Version: 7.5.432 / Virus Database: 268.17.12/654 - Release Date: > > > 1/27/2007 5:02 PM > > > > > > > > > ---------------------------------------------------------------------= ---- > > > Take Surveys. Earn Cash. Influence the Future of IT > > > Join SourceForge.net's Techsay panel and you'll get the chance to > > > share your > > > opinions on IT & business topics through brief surveys - and earn cas= h > > > > > > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CI= D=3DDEVDEV > > > > > > _______________________________________________ > > > Apt-jelly-users mailing list > > > Apt...@li... > > > https://lists.sourceforge.net/lists/listinfo/apt-jelly-users > > > > > > > > > > > > |
|
From: Ryan H. <sto...@us...> - 2007-01-30 14:28:39
|
Awesome. I'm glad we found the problem. Hopefully, Sun will fix that bug so that the error handling will be less obscure in the future. Much appreciation for your glowing feedback for the project. I'm just glad I'm able to contribute something that others like to use, since I wrote it in the first place just to scratch a personal itch. And I agree that I might get a bit too obsessive-compulsive on the code structure. It might be more difficult to pick up what's going on, but I ca= n tell you it makes big pay-offs later in terms of refactoring and enhancements. I do monitor the dev list, and I'd be thrilled to entertain any thoughts yo= u might have for enhancements or improvements. It's there for that purpose, but it hasn't ever been used. I don't know if that's a good thing or a bad thing ;-). -Ryan On 1/29/07, Brian Greene <br...@st...> wrote: > > Got it =96 that was it. Long story, but I'm actually running a shared s= et > of templates over multiple projects so I have a project (and a build file= ) > that is called from each of them (I've got it down to an antcall with 4 > params rather than the rather long apt task I'd have to repeat otherwise)= . > I wasn't passing the classpath reference and as such was getting the erro= r > described as the task in the default location was using a different > classpath. > > > > As an aside =96 what a wonderful piece of code apt-jelly is. I've blogge= d > about it a bit and will continue to do so as it works quite nicely. It's > really clean (too clean sometimes =96 takes a long time to grok with all = the > inheritance and generics) and I'm trying to work out a few extensions=85 > we'll see. I've managed to do some interesting things with my own > annotations though, and overall am having a blast with it. > > > > Do you monitor the dev list? I have some thoughts I'd like to chat about > that would be better captured there. I'm a big fan of code generation, a= nd > would like to see apt-jelly become the defacto standard that XDoclet once > was, and would love to chat on that more. > > > > At any rate, thanks again for the project and the quick tip. > > > > -Brian > > > ------------------------------ > > *From:* apt...@li... [mailto: > apt...@li...] *On Behalf Of *Ryan Heaton > *Sent:* Monday, January 29, 2007 10:46 AM > *To:* apt...@li... > *Subject:* Re: [apt-jelly-users] getting closer to the jaxb problem > > > > A quick google search on the error found this: > > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=3D6432333 > > Sounds a lot like what you're encountering. This would imply that the > jaxb-2.0-api.jar isn't on your APT classpath when you invoke APT. > > -Ryan > > On 1/29/07, *Ryan Heaton* < sto...@gm...> wrote: > > I've looked into this a bit more, but I'm still stumped. My suspicions > lean towards something awry in your environment, but I'm about as far as = I > can go without more information. If you can reproduce it in a test case = (or > give me a way to reproduce it in a test case), I'd be able to figure out > what's going on. More information about your environment might also be > helpful: > > -It's a long shot, but do you happen to have another class that is named > "XmlAttribute" in either your source base or your classpath? > -What's does the executable look like when executing APT? (try ant -v) > Are you sure the jaxb-2.0-api.jar is on the classpath when invoking APT? > > -Ryan > > > > > On 1/28/07, *Ryan Heaton* < sto...@us...> wrote: > > Thanks for the report, Brian. > > It's an elusive one. I can tell you that I'm using JAXB 2.0 annotations > with APT-Jelly, and I've never seen this one. There really shouldn't be > anything special about JAXB 2.0 annotations; they're the same as any othe= r > annotation. > > I'd really like to be able to reproduce it in a test. Can you send me > more of the stack trace? > > -Ryan > > > On 1/27/07, *Brian Greene* <br...@st...> wrote: > > So this is a segment of the output from running apt when using one of > the JAXB annotations. Just got it to appear (turned off forking the apt > exec task =96 yes still in ant 1.6.x). Haven't dissected it yet, but I'm > hoping it will be more meaningful to a user on the list or Ryan. > > > > symbol : class XmlAttribute > > [* exec*] location: class com.bob.corp.scn.model.SourceCustomer > > [* exec*] @XmlAttribute(name=3D"foo") > > [* exec*] ^ > > [* exec*] error: Could not create declaration for annotation type > XmlAttribute > > [* exec*] Problem encountered during annotation processing; > > [* exec*] see stacktrace below for more information. > > [* exec*] *java.lang.ClassCastException*: > com.sun.tools.apt.mirror.type.ClassTypeImpl > > [* exec*] at > com.sun.tools.apt.mirror.declaration.AnnotationMirrorImpl.getAnnotationTy= pe > (*AnnotationMirrorImpl.java:82 *) > > [*exec* ] at > net.sf.jelly.apt.decorations.declaration.DecoratedAnnotationMirror.<init>= ( > *DecoratedAnnotationMirror.java:47 *) > > > > Thanks, > > > > Brian > > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.432 / Virus Database: 268.17.12/654 - Release Date: 1/27/200= 7 > 5:02 PM > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > > _______________________________________________ > Apt-jelly-users mailing list > Apt...@li... > https://lists.sourceforge.net/lists/listinfo/apt-jelly-users > > > > > > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.432 / Virus Database: 268.17.14/657 - Release Date: 1/29/200= 7 > 9:04 AM > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.432 / Virus Database: 268.17.14/657 - Release Date: 1/29/200= 7 > 9:04 AM > |