Home » Eclipse Projects » Plugin Development Environment (PDE) » Plug-in compiles and exports, but throws NPE when accessed
Plug-in compiles and exports, but throws NPE when accessed [message #35984] |
Thu, 04 December 2008 17:09  |
Eclipse User |
|
|
|
Hi all,
I'm trying to extend a plug-in that works with my company's Eclipse v3.2
base. Before writing any new code, I'm trying to verify my build
environment setup.
I created a plug-in using Ganymede, v3.4, from the existing jar and
rebuilt it, then exported it. I set all the dependencies to the jars we
ship with our product, which are all v3.2 based. I can get our product to
load and resolve the new jar just fine. However, when I access any part
of the code in the jar (i.e. preference page, etc.) Eclipse pops up errors
about null pointer exceptions. Remember, I haven't touched a line of
working code.
I went through my jar and the original jar and my newly compiled classes
are all a little bigger (100-200 bytes) than the originals.
If I remove my version and replace the original version everything is back
to normal, so it's definitely something in my jar, although it
compiles,exports, and resolves successfully.
Am I running into a versioning issue? Should I be compiling with a
certain version of the compiler with certain compatibility flags set? All
I want to do at this point is rebuild some working code. Once I can
reliably do that I'll know any new problems are MY doing ;-).
Thanks in advance for any insights.
Rgds,
Bret
|
|
|
Re: Plug-in compiles and exports, but throws NPE when accessed [message #36125 is a reply to message #35984] |
Fri, 05 December 2008 10:57   |
Eclipse User |
|
|
|
You should set your target environment to point to a 3.2 install to
compile against. (Window->Preferences->Plug-in Development->Target
Platform).
A bundle compiled against 3.2 will be different than one compiled
against 3.4. Whether or not those differences matter depends on what
changed between 3.2 and 3.4. It is quite likely that there are changes
that are not binary compatible.
-Andrew
Bret Schuhmacher wrote:
> Hi all,
>
> I'm trying to extend a plug-in that works with my company's Eclipse v3.2
> base. Before writing any new code, I'm trying to verify my build
> environment setup.
>
> I created a plug-in using Ganymede, v3.4, from the existing jar and
> rebuilt it, then exported it. I set all the dependencies to the jars we
> ship with our product, which are all v3.2 based. I can get our product
> to load and resolve the new jar just fine. However, when I access any
> part of the code in the jar (i.e. preference page, etc.) Eclipse pops up
> errors about null pointer exceptions. Remember, I haven't touched a
> line of working code.
>
> I went through my jar and the original jar and my newly compiled classes
> are all a little bigger (100-200 bytes) than the originals.
>
> If I remove my version and replace the original version everything is
> back to normal, so it's definitely something in my jar, although it
> compiles,exports, and resolves successfully.
>
> Am I running into a versioning issue? Should I be compiling with a
> certain version of the compiler with certain compatibility flags set?
> All I want to do at this point is rebuild some working code. Once I can
> reliably do that I'll know any new problems are MY doing ;-).
>
> Thanks in advance for any insights.
>
> Rgds,
>
> Bret
>
>
>
|
|
| | |
Re: Plug-in compiles and exports, but throws NPE when accessed [message #586537 is a reply to message #35984] |
Fri, 05 December 2008 10:57  |
Eclipse User |
|
|
|
You should set your target environment to point to a 3.2 install to
compile against. (Window->Preferences->Plug-in Development->Target
Platform).
A bundle compiled against 3.2 will be different than one compiled
against 3.4. Whether or not those differences matter depends on what
changed between 3.2 and 3.4. It is quite likely that there are changes
that are not binary compatible.
-Andrew
Bret Schuhmacher wrote:
> Hi all,
>
> I'm trying to extend a plug-in that works with my company's Eclipse v3.2
> base. Before writing any new code, I'm trying to verify my build
> environment setup.
>
> I created a plug-in using Ganymede, v3.4, from the existing jar and
> rebuilt it, then exported it. I set all the dependencies to the jars we
> ship with our product, which are all v3.2 based. I can get our product
> to load and resolve the new jar just fine. However, when I access any
> part of the code in the jar (i.e. preference page, etc.) Eclipse pops up
> errors about null pointer exceptions. Remember, I haven't touched a
> line of working code.
>
> I went through my jar and the original jar and my newly compiled classes
> are all a little bigger (100-200 bytes) than the originals.
>
> If I remove my version and replace the original version everything is
> back to normal, so it's definitely something in my jar, although it
> compiles,exports, and resolves successfully.
>
> Am I running into a versioning issue? Should I be compiling with a
> certain version of the compiler with certain compatibility flags set?
> All I want to do at this point is rebuild some working code. Once I can
> reliably do that I'll know any new problems are MY doing ;-).
>
> Thanks in advance for any insights.
>
> Rgds,
>
> Bret
>
>
>
|
|
|
Re: Plug-in compiles and exports, but throws NPE when accessed [message #586588 is a reply to message #36125] |
Sun, 07 December 2008 20:17  |
Eclipse User |
|
|
|
Thanks for the tip, Andrew. I have done what you suggested, as well as
played with all the options the PDE options allow, and I cannot seem to
affect the size of the compiled classes at all. No matter what I do the
classes come out larger than the original ones and fail to load with
NullPointerExceptions.
Is there any way to cause Eclipse to log *everything* it's doing as it
loads my plugin? A log file would help SO much more than a popup showing
me an NPE.
Thanks again,
Bret
|
|
| |
Goto Forum:
Current Time: Sun Jul 27 11:26:03 EDT 2025
Powered by FUDForum. Page generated in 0.05901 seconds
|