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 22:09 |
Bret Schuhmacher Messages: 26 Registered: July 2009 |
Junior Member |
|
|
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 15:57 |
Andrew Niefer Messages: 990 Registered: July 2009 |
Senior Member |
|
|
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 15:57 |
Andrew Niefer Messages: 990 Registered: July 2009 |
Senior Member |
|
|
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
>
>
>
|
|
| | |
Goto Forum:
Current Time: Tue Sep 24 19:12:54 GMT 2024
Powered by FUDForum. Page generated in 0.04644 seconds
|