[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Before I forget
|
Seems like no one else is doing this kind of thing, which is strange
to me because I find it really useful. Those interfaces each
represent a CRUD type action that can be taken on an entity from a web
app. When I put the controller class together I just tag it with the
proper interfaces, fill in a few missing details like the query to
perform, and the ITDs take care of the rest in a standard way.
Without ITDs I'd have to have a huge superclass that contained all the
action methods, even the ones I don't want, or a ton of smaller
actions which would have a lot more trouble sharing state and couldn't
as easily be introspected by the view components to do cool things
like automatically display the proper buttons for each available
action. I guess I could also simulate multiple inheritance but that
takes a lot more code and makes referring to "this" a lot more
complicate than it should be.
But I digress.....
I created bug #292429. Let me know if you need anything else.
On Oct 15, 2009, at 12:28 PM, Andy Clement wrote:
Now *thats* what I call a type declaration :)
Can you raise a bug for this Dave? With your diagnostics I may be
able to get to the bottom of it - I know I certainly don't have a
testcase with a declaration like that!
Andy
2009/10/14 Dave Whittaker <dave@xxxxxxxxxx>:
I spoke too soon, it just happened again. I checked the eclipse
log file
and I think I've found the additional information you were
expecting. This
time it is a generic class being woven:
public class JobManagementAction implements SearchAction<JobListing>,
SelectAction<JobListing, Long>, CreateAction<JobListing>,
UpdateAction<JobListing>, DeleteAction<JobListing>,
SuppressAction<JobListing, JobListingSuppression>
And here is the info from the log:
!STACK 0
org.aspectj.weaver.BCException: assertion failed: asked
mhc.jobbank.JobManagementAction for occurrence of
h2.actions.CreateAction in
its hierarchy??
when weaving intertype declarations JobManagementAction
when completing type bindings
when incrementally building with classpath:
/Users/dave/Workspace/mhc/mhc-ejb/target/classes:/System/Library/
Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar:/
System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/
ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/
Classes/la
f.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/
Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/
Versions/1.6.0/Classes/jce.jar:/System/Library/Frameworks/
JavaVM.framework/Versions/1.6.0/Classes/charsets.jar:/System/
Library/Java/Extensions/AppleScriptEngine.jar:/System/Library/Java/
Ext
ensions/CoreAudio.jar:/System/Library/Java/Extensions/dns_sd.jar:/
System/Library/Java/Extensions/j3daudio.jar:/System/Library/Java/
Extensions/j3dcore.jar:/System/Library/Java/Extensions/
j3dutils.jar:/System/Library/Java/Extensions/jai_codec.jar:/System/
Library/Java/Extensions/jai_core.jar:/System/Library/Java/Exte
nsions/mlibwrapper_jai.jar:/System/Library/Java/Extensions/
MRJToolkit.jar:/System/Library/Java/Extensions/QTJava.zip:/System/
Library/Java/Extensions/vecmath.jar:/System/Library/Frameworks/
JavaVM.framework/Versions/1.6.0/Home/lib/ext/apple_provider.jar:/
System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
/lib/ext/dnsns.jar:/System/Library/Frameworks/JavaVM.framework/
Versions/1.6.0/Home/lib/ext/localedata.jar:/System/Library/
Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/
sunjce_provider.jar:/System/Library/Frameworks/JavaVM.framework/
Versions/1.6.0/Home/lib/ext/sunpkcs11.jar:/Users/dave/.m2/
repository/comm
ons-logging/commons-logging/1.1/commons-logging-1.1.jar:/Users/
dave/.m2/repository/log4j/log4j/1.2.13/log4j-1.2.13.jar:/Users/
dave/.m2/repository/h2/h2-core/1.0.0-SNAPSHOT/h2-core-1.0.0-
SNAPSHOT.jar:/Users/dave/.m2/repository/jboss-seam/jboss-seam/
2.1.1.GA/jboss-seam-2.1.1.GA.jar:/Users/dave/.m2/repository/commons
-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar:/
Users/dave/.m2/repository/commons-digester/commons-digester/1.6/
commons-digester-1.6.jar:/Users/dave/.m2/repository/commons-
collections/commons-collections/3.1/commons-collections-3.1.jar:/
Users/dave/.m2/repository/commons-lang/commons-lang/2.1/common
s-lang-2.1.jar:/Users/dave/.m2/repository/jboss-el/jboss-el/
1.0_02.CR2/jboss-el-1.0_02.CR2.jar:/Users/dave/.m2/repository/jboss-
seam/jboss-seam-ui/2.1.1.GA/jboss-seam-ui-2.1.1.GA.jar:/Users/
dave/.m2/repository/jsf-facelets/jsf-facelets/1.1.15.B1/jsf-
facelets-1.1.15.B1.jar:/Users/dave/.m2/repository/lucene-core/luc
ene-core/2.3.2/lucene-core-2.3.2.jar:/Users/dave/.m2/repository/
hibernate-validator/hibernate-validator/3.0.0.GA/hibernate-
validator-3.0.0.GA.jar:/Users/dave/.m2/repository/hibernate-commons-
annotations/hibernate-commons-annotations/3.0.0.GA/hibernate-
commons-annotations-3.0.0.GA.jar:/Users/dave/.m2/repository/hib
ernate-search/hibernate-search/3.0.0.GA/hibernate-
search-3.0.0.GA.jar:/Users/dave/.m2/repository/aspectj/aspectjrt/
1.6.1/aspectjrt-1.6.1.jar:/Users/dave/.m2/repository/javacsv/
javacsv/2.0/javacsv-2.0.jar:/Users/dave/.m2/repository/commons-
codec/commons-codec/1.3/commons-codec-1.3.jar:/Users/dave/.m2/
repository/h2/
h2-onet/1.0.0-SNAPSHOT/h2-onet-1.0.0-SNAPSHOT.jar:/Users/dave/.m2/
repository/h2/h2-seam/1.0.0-SNAPSHOT/h2-seam-1.0.0-SNAPSHOT.jar:/
Users/dave/.m2/repository/h2/h2-web/1.0.0-SNAPSHOT/h2-web-1.0.0-
SNAPSHOT.jar:/Users/dave/.m2/repository/h2/h2-actions/1.0.0-
SNAPSHOT/h2-actions-1.0.0-SNAPSHOT.jar:/Users/dave/.m2/repos
itory/richfaces/richfaces-ui/3.3.1.GA/richfaces-ui-3.3.1.GA.jar:/
Users/dave/.m2/repository/richfaces/richfaces-api/3.3.1.GA/
richfaces-api-3.3.1.GA.jar:/Users/dave/.m2/repository/richfaces/
richfaces-impl/3.3.1.GA/richfaces-impl-3.3.1.GA.jar:/Users/dave/.m2/
repository/jee-api/jee-api/5/jee-api-5.jar:/Users/dave/.m2/
repository/jboss/jboss-annotations-ejb3/4.2.2.GA/jboss-annotations-
ejb3-4.2.2.GA.jar:/Users/dave/.m2/repository/hibernate/hibernate/
3.2.2.GA/hibernate-3.2.2.GA.jar:/Users/dave/.m2/repository/cglib/
cglib/2.1_3/cglib-2.1_3.jar:/Users/dave/.m2/repository/asm/asm/
1.3.4/asm-1.3.4.jar:/Users/dave/.m2/repository/asm-util
/asm-util/1.3.4/asm-util-1.3.4.jar:/Users/dave/.m2/repository/dom4j/
dom4j/1.6.1/dom4j-1.6.1.jar:/Users/dave/.m2/repository/antlr/antlr/
2.7.6/antlr-2.7.6.jar:/Users/dave/.m2/repository/ehcache/ehcache/
1.2.3/ehcache-1.2.3.jar:/Users/dave/.m2/repository/jaxen/jaxen/1.1-
beta-7/jaxen-1.1-beta-7.jar:/Users/dave/.m2/repo
sitory/hibernate-annotations/hibernate-annotations/3.3.0.GA/
hibernate-annotations-3.3.0.GA.jar:/Users/dave/.m2/repository/
hibernate-annotations/hibernate-commons-annotations/3.3.0.GA/
hibernate-commons-annotations-3.3.0.GA.jar:/Users/dave/.m2/
repository/jakarta-oro/jakarta-oro/2.0.8/jakarta-oro-2.0.8.jar:/
Users/dav
e/.m2/repository/fop/fop/0.95/fop-0.95.jar:/Users/dave/.m2/
repository/avalon-framework/avalon-framework/4.2.0/avalon-
framework-4.2.0.jar:/Users/dave/.m2/repository/batik/batik/1.7/
batik-1.7.jar:/Users/dave/.m2/repository/commons-io/commons-io/
1.3.2/commons-io-1.3.2.jar:/Users/dave/.m2/repository/serializer/
seriali
zer/2.7.0/serializer-2.7.0.jar:/Users/dave/.m2/repository/
xmlgraphics-commons/xmlgraphics-commons/1.3.1/xmlgraphics-
commons-1.3.1.jar:/Users/dave/.m2/repository/jbosscache-core/
jbosscache-core/2.2.0.GA/jbosscache-core-2.2.0.GA.jar:/Users/
dave/.m2/repository/jgroups/jgroups-all/2.2.0.GA/jgroups-
all-2.2.0.GA.jar:/Us
ers/dave/.m2/repository/jboss-aop/jboss-aop/1.5.6.GA/jboss-
aop-1.5.6.GA.jar:/Users/dave/.m2/repository/iradix-gis/iradix-gis/
1.0/iradix-gis-1.0.jar:/Users/dave/.m2/repository/nekohtml/nekohtml/
1.9.6.1/nekohtml-1.9.6.1.jar:/Users/dave/.m2/repository/jboss-seam/
jboss-seam-pdf/2.1.1.GA/jboss-seam-pdf-2.1.1.GA.jar:/Us
ers/dave/.m2/repository/itext/itext/2.1.7/itext-2.1.7.jar:/Users/
dave/.m2/repository/itext/itext-rtf/2.1.7/itext-rtf-2.1.7.jar:/
Users/dave/.m2/repository/jboss-seam/jboss-seam-excel/2.1.1.GA/
jboss-seam-excel-2.1.1.GA.jar:/Users/dave/.m2/repository/jxl/jxl/
2.6.10/jxl-2.6.10.jar:/Applications/Eclipse/Eclipse-3.5/plu
gins/org.aspectj.runtime_1.6.6.20090930185500/aspectjrt.jar:/System/
Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/
apple_provider.jar:/System/Library/Frameworks/JavaVM.framework/
Versions/1.5.0/Home/lib/ext/dnsns.jar:/System/Library/Frameworks/
JavaVM.framework/Versions/1.5.0/Home/lib/ext/localedata
.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
Home/lib/ext/sunjce_provider.jar:/System/Library/Frameworks/
JavaVM.framework/Versions/1.5.0/Home/lib/ext/sunpkcs11.jar:/
Applications/Eclipse/Eclipse-3.5/Eclipse.app/Contents/
MacOS/../../../plugins/
org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.ja
r:
at
org
.aspectj
.weaver.ResolvedType.fillInAnyTypeParameters(ResolvedType.java:1436)
at
org
.aspectj.weaver.ResolvedType.addInterTypeMunger(ResolvedType.java:
1476)
at
org
.aspectj
.ajdt
.internal
.compiler
.lookup
.AjLookupEnvironment
.weaveInterTypeDeclarations(AjLookupEnvironment.java:687)
at
org
.aspectj
.ajdt
.internal
.compiler
.lookup
.AjLookupEnvironment.weaveIntertypes(AjLookupEnvironment.java:395)
at
org
.aspectj
.ajdt
.internal
.compiler
.lookup
.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:
240)
at
org
.aspectj
.org
.eclipse
.jdt
.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:616)
at
org
.aspectj
.org
.eclipse
.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:357)
at
org
.aspectj
.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:
371)
at
org
.aspectj
.ajdt
.internal
.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:
1007)
at
org
.aspectj
.ajdt
.internal
.core.builder.AjBuildManager.performBuild(AjBuildManager.java:304)
at
org
.aspectj
.ajdt
.internal
.core.builder.AjBuildManager.incrementalBuild(AjBuildManager.java:
186)
at
org
.aspectj
.ajde
.core
.internal
.AjdeCoreBuildManager.performBuild(AjdeCoreBuildManager.java:127)
at org.aspectj.ajde.core.AjCompiler.build(AjCompiler.java:88)
at
org.eclipse.ajdt.core.builder.AJBuilder.build(AJBuilder.java:245)
at
org.eclipse.core.internal.events.BuildManager
$2.run(BuildManager.java:627)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org
.eclipse
.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
at
org
.eclipse
.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
at
org.eclipse.core.internal.events.BuildManager
$1.run(BuildManager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org
.eclipse
.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
at
org
.eclipse
.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:
309)
at
org
.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
341)
at
org
.eclipse
.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
at
org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:
238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
On Oct 13, 2009, at 8:15 PM, Andy Clement wrote:
The exception would appear to occur for an ITD on a generic type
where
the ITD is sharing a type variable with the target.
It is attempting to identify the actual occurrence of
parameterization
in the target type so it knows what the type variable should bind
to.
If the ITD is
List<Z> SomeInterface<Z>.foo;
and the generic declaration is
class Clazz implements SomeInterface<String> {
}
then it is looking for SomeInterface in the Clazz hierarchy - so it
knows Z is String for the new member in Clazz. For some reason it
doesn't find SomeInterface in the Clazz hierarchy (is it perhaps
being
declare'd parents'd in? that would be pretty advanced)
The exception is thrown with some text to give us more
information, I
wonder why you don't see it...
Andy
2009/10/13 Dave Whittaker <dave@xxxxxxxxxx>:
Just had this pop up in Eclipse while doing some refactoring today:
org.aspectj.weaver.BCException
at
org
.aspectj
.weaver.ResolvedType.fillInAnyTypeParameters(ResolvedType.java:
1436)
at
org
.aspectj.weaver.ResolvedType.addInterTypeMunger(ResolvedType.java:
1476)
at
org
.aspectj
.ajdt
.internal
.compiler
.lookup
.AjLookupEnvironment
.weaveInterTypeDeclarations(AjLookupEnvironment.java:687)
at
org
.aspectj
.ajdt
.internal
.compiler
.lookup
.AjLookupEnvironment
.weaveInterTypeDeclarations(AjLookupEnvironment.java:559)
at org.as ...
/sunpkcs11.jar:/Applications/Eclipse/Eclipse-3.5/Eclipse.app/
Contents/MacOS/../../../plugins/
org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar:
Version: 2.0.1.e35x-20091001-1600
I don't expect that it will be a continual problem, but thought
you'd
like
to take a look into the cause.
I've also noticed that incremental compilation often seems to not
update
the
markers in the IDE until I've done a full rebuild. Several times
I've
deployed code from a project with no markers only to have it fail
with an
exception when running that is equivalent to what the build error
was.
After a clean/rebuild the appropriate error shows up in
Eclipse. Any
recommended steps for debugging that?
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users