Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Null-pointer exception during rebuild
Null-pointer exception during rebuild [message #578891] Tue, 20 April 2004 21:52
Michael Moser is currently offline Michael MoserFriend
Messages: 914
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_000A_01C42732.8E76E0A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,
I am suddenly getting a null-pointer exception (i.e. an alert-box poping =
up that I have to acknowledge [OK]) each type I trigger a rebuild of the =
project.

The log contains the following:
-----%<-----%<-----%<-----%<-----%<-----%<-----%<-----% <-----
....
!SESSION Apr 20, 2004 23:32:05.798 =
---------------------------------------------
java.version=3D1.4.2_03
java.vendor=3DSun Microsystems Inc.
BootLoader constants: OS=3Dwin32, ARCH=3Dx86, WS=3Dwin32, NL=3Den_US
!ENTRY org.eclipse.ajdt.ui 4 0 Apr 20, 2004 23:34:17.180
!MESSAGE NullPointerException thrown: null
!STACK 0
java.lang.NullPointerException
at =
org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.r esolveTypesFo=
r(SourceTypeBinding.java:837)
at =
org.aspectj.ajdt.internal.compiler.ast.InterTypeConstructorD eclaration.bu=
ild(InterTypeConstructorDeclaration.java:190)
at =
org.aspectj.ajdt.internal.compiler.ast.AspectDeclaration.bui ldInterTypeAn=
dPerClause(AspectDeclaration.java:763)
at =
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironmen t.buildInterT=
ypeAndPerClause(AjLookupEnvironment.java:214)
at =
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironmen t.completeTyp=
eBindings(AjLookupEnvironment.java:95)
at =
org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Co mpiler.java:3=
24)
at =
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler. java:341)
at =
org.aspectj.ajdt.internal.core.builder.AjBuildManager.perfor mCompilation(=
AjBuildManager.java:600)
at =
org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuil d(AjBuildMana=
ger.java:160)
at =
org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchB uild(AjBuildM=
anager.java:94)
at =
org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAd apter.java:10=
8)
at =
org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread .run(AspectJB=
uildManager.java:165)
-----%<-----%<-----%<-----%<-----%<-----%<-----%<-----% <-----

It seems reproducible, i.e. the null-pointer seems to come and go =
depending on the presence of the following code snippet in my aspect:
....
private Correlator.new(IEngine engine, IParser parser, IPersistentStore =
persistence) {
this(engine, parser);
this.persistence =3D persistence;
}
....



What I was doing here was to experiment and trying to add an additional =
constructor for class Correlator that takes an additional parameter.

I have no idea whether the above code is correct (actually the purpose =
of my experiment was trying to find just that out...) but I guess a =
null-pointer is not the expected behaviour to tell the user "oops, there =
is an error in your code...".
Can I do anything further to help you identify and fix the problem?

Michael

------=_NextPart_000_000A_01C42732.8E76E0A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I am suddenly getting a null-pointer =
exception=20
(i.e. an alert-box poping up that I have to acknowledge [OK]) each type =
I=20
trigger a rebuild of the project.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The log contains the =
following:</FONT></DIV>
<DIV>
<DIV><FONT face=3DArial=20
size=3D2> -----%&lt;-----%&lt;-----%&lt;-----%&lt;---- -%&lt;-----%&lt;----=
-%&lt;-----%&lt;-----</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>...</FONT></DIV><FONT =
face=3DArial><FONT=20
size=3D2><FONT face=3DCourier>!SESSION Apr 20, 2004 23:32:05.798=20
---------------------------------------------<BR>java.version=3D1.4.2_03 <=
BR>java.vendor=3DSun=20
Microsystems Inc.<BR>BootLoader constants: OS=3Dwin32, ARCH=3Dx86, =
WS=3Dwin32,=20
NL=3Den_US<BR>!ENTRY org.eclipse.ajdt.ui 4 0 Apr 20, 2004 =
23:34:17.180<BR>!MESSAGE=20
NullPointerException thrown: null<BR>!STACK=20
0<BR>java.lang.NullPointerException<BR>&nbsp;at=20
org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.r esolveTypesFo=
r(SourceTypeBinding.java:837)<BR>&nbsp;at=20
org.aspectj.ajdt.internal.compiler.ast.InterTypeConstructorD eclaration.bu=
ild(InterTypeConstructorDeclaration.java:190)<BR>&nbsp;at=20
org.aspectj.ajdt.internal.compiler.ast.AspectDeclaration.bui ldInterTypeAn=
dPerClause(AspectDeclaration.java:763)<BR>&nbsp;at=20
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironmen t.buildInterT=
ypeAndPerClause(AjLookupEnvironment.java:214)<BR>&nbsp;at=20
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironmen t.completeTyp=
eBindings(AjLookupEnvironment.java:95)<BR>&nbsp;at=20
org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Co mpiler.java:3=
24)<BR>&nbsp;at=20
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler. java:341) <BR>=
&nbsp;at=20
org.aspectj.ajdt.internal.core.builder.AjBuildManager.perfor mCompilation(=
AjBuildManager.java:600)<BR>&nbsp;at=20
org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuil d(AjBuildMana=
ger.java:160)<BR>&nbsp;at=20
org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchB uild(AjBuildM=
anager.java:94)<BR>&nbsp;at=20
org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAd apter.java:10=
8)<BR>&nbsp;at=20
org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread .run(AspectJB=
uildManager.java:165)<BR></FONT>-----%&lt;-----%&lt;-----%&lt;-----%&lt;-=
----%&lt;-----%&lt;-----%&lt;-----%&lt;----- </FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>It seems reproducible, i.e. the =
null-pointer seems=20
to come and go depending on the presence of the following code snippet=20
in&nbsp;my aspect:</FONT></DIV>
<DIV>
<P><FONT face=3DCourier size=3D2>...<BR></FONT><FONT face=3DCourier =
size=3D2>private=20
Correlator.new(IEngine engine, IParser parser, IPersistentStore =
persistence)=20
{<BR></FONT><FONT face=3DCourier size=3D2>&nbsp;&nbsp;&nbsp; =
this(engine,=20
parser);<BR></FONT><FONT face=3DCourier=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;this.persistence =3D =
persistence;<BR></FONT><FONT=20
face=3DCourier size=3D2>}<BR>...</FONT></P>
<P><FONT face=3DCourier size=3D2></FONT>&nbsp;</P>
<P><FONT face=3DArial size=3D2><FONT face=3DArial size=3D2>What I was =
doing&nbsp;here=20
</FONT><FONT face=3DArial size=3D2>was to experiment&nbsp;and trying to =
add an=20
additional constructor for&nbsp;class <FONT face=3DCourier>Correlator=20
</FONT>that&nbsp;takes an additional&nbsp;parameter.</FONT></P>
<DIV></FONT><FONT face=3DArial size=3D2>I have no idea whether the above =
code is=20
correct (actually the purpose of my experiment&nbsp;was trying to find =
just that=20
out...) but I guess&nbsp;a null-pointer is not the expected behaviour to =
tell=20
the user "oops, there is an error in your code...".</FONT></DIV>
<P><FONT face=3DArial size=3D2>Can I do anything further to help you =
identify and=20
fix the problem?</FONT></P></DIV>
<DIV><FONT face=3DArial size=3D2>Michael</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_000A_01C42732.8E76E0A0--
Previous Topic:ajdt 117 on M8 - no colored syntax in editor ?
Next Topic:Null-pointer exception during rebuild
Goto Forum:
  


Current Time: Tue Mar 19 09:57:16 GMT 2024

Powered by FUDForum. Page generated in 0.02343 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top