Re: getClass().getResource("...") returns null?
Eivind Waaler <[email protected]>
| Newsgroups | gmane.comp.java.ejb.middlegen.user |
|---|---|
| Message-ID | <[email protected]> |
Hmm, sounds like some kind of classloader issue. Are you sure your plugin
class is not found multiple places in the classpath? For instance if
there's an old version of your jar file without the .vm file somewhere?
Try a clean build of everything. Compare your jar file with one that
works, see if there are any differences.
BTW: Your Spring plugin sounds interesting, what are you generating? A
DAO? Hibernate support?
Cheers
.eivind
On Wed, 29 Sep 2004, Joel Hillacre wrote:
> My plugin is having trouble finding it's resources in the jar file.
> I am trying to add a fileproducer with:
> <code>
> addConfiguredFileproducer(new FileProducer(getDestinationDir(),
> "{0}SpringServiceImpl.java",
> getClass().getResource("SpringServiceImpl.vm")));
> </code>
> However, when this code executes (built using the middlegen build.xml and
> executed using a custom project build.xml), I receive a <code>template can't
> be null</code> error message from the file producer constructor.
> I checked my middlegen-spring-plugin-2.1.jar, and the SpringServiceImpl.vm is
> sitting beside my SpringPlugin.class. What did i miss here? :s
> Thank you for any help,
> Joel Hillacre
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> middlegen-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/middlegen-user
>
>
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl