[ http://issues.apache.org/jira/browse/BEEHIVE-486?page=history ]
David Read updated BEEHIVE-486:
-------------------------------
Attachment: aptOnTomcat.zip
attached is a simple app that includes two scenarios:
ControlImpl->ControlBean (different type)
ControlImpl->ControlBean (same type)
The files from web-inf/lib have beeen removed and build.properties will have to
be updated.
> NPE in APT when Control references another Control via Control Bean
> -------------------------------------------------------------------
>
> Key: BEEHIVE-486
> URL: http://issues.apache.org/jira/browse/BEEHIVE-486
> Project: Beehive
> Type: Bug
> Components: Controls
> Versions: V1Beta
> Environment: Window NT, Java 1.5
> Reporter: David Read
> Assignee: Kyle Marvin
> Fix For: V1
> Attachments: aptOnTomcat.zip
>
> Scenario is Control->AnotherControl in the same webapp and package. If the
> reference is via the Control's public interface, it works fine. If the
> reference is via the generated Control Bean, then the build fails. It looks
> like it might be a problem with the order of generation. If I comment out
> the reference and run the build again, then everything is generated. If I
> then uncomment the reference, the build works fine and the application runs.
> At the point of failure, I can see in the generated tmp dir that the
> referenced Control Bean source file has not yet been created.
> StackTrace:
> [apt] Compiling 4 source files to
> C:\data\workspaces\aptOnTomcat\WEB-INF\classes
> [apt]
> C:\data\workspaces\aptOnTomcat\WEB-INF\src\controls\CustomControlImpl.java:15:
> cannot find symbol
> [apt] symbol : class AnotherCustomControlBean
> [apt] location: class controls.CustomControlImpl
> [apt] protected AnotherCustomControlBean customControlBean;
> [apt] ^
> [apt] Problem encountered during annotation processing;
> [apt] see stacktrace below for more information.
> [apt] java.lang.NullPointerException
> [apt] at
> org.apache.beehive.controls.runtime.generator.AptEventField.initTypeParameterBindings(AptEventField.java:61)
> [apt] at
> org.apache.beehive.controls.runtime.generator.AptEventField.getControlInterface(AptEventField.java:108)
> [apt] at
> org.apache.beehive.controls.runtime.generator.AptControlField.<init>(AptControlField.java:50)
> [apt] at
> org.apache.beehive.controls.runtime.generator.AptControlImplementation.initControls(AptControlImplementation.java
> :161)
> [apt] at
> org.apache.beehive.controls.runtime.generator.AptControlImplementation.<init>(AptControlImplementation.java:71)
> [apt] at
> org.apache.beehive.controls.runtime.generator.apt.ControlAnnotationProcessor.check(ControlAnnotationProcessor.jav
> a:80)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira