struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Obinna <obi...@gmail.com>
Subject NPE in embeddedJsp plugin
Date Thu, 24 Sep 2009 13:44:55 GMT
I'm getting a NPE in the embeddedJsp plugin.

It seems to originate from JSPLoader.getJarURL(clazz) at URL loc =
codeSource.getLocation() because codeSource is null.
(protectionDomain.getCodeSource() returns null).

Not sure why this is happening for me (it is occurring when clazz =
interface javax.servlet.Servlet), but the API docs say that
protectionDomain.getCodeSource() can be null, so there should probably be a
check here or another way of getting the jar url.

 -Eric



On Wed, Aug 26, 2009 at 8:07 AM, Obinna <obinna@gmail.com> wrote:

> Nope. I tried that.
> Strangely, It builds without error (but without including resources
> package) if I build from the plugin pom, but tests error
> if I try to build entire struts2 root pom. (seems related b/c
> testEmbeddd/testEmbeddedAbsolutePath throw NPE on Localizer line 150 :
> bundle must be null)
> I suspect I'm doing something wrong with Maven...
>
>
>
>
>
> On Tue, Aug 25, 2009 at 7:23 PM, Musachy Barroso <musachy@gmail.com>wrote:
>
>> that's pretty weird. Did you do try a 'mvn clean' first?
>>
>> On Tue, Aug 25, 2009 at 8:53 AM, Obinna<obinna@gmail.com> wrote:
>> > When I build the embedded jsp plugin, maven doesn't include the
>> > org.apache.struts2.jasper.resources package (doesn't create in 'target')
>> > which is causing some errors. Any ideas why?
>> >
>> > - Eric
>> >
>> > On Fri, Aug 14, 2009 at 6:58 PM, Musachy Barroso <musachy@gmail.com>
>> wrote:
>> >
>> >> As long as they are in the classpath, embedded or not embedded the
>> >> plugin will find them, which goes to show that 'embedded' is a
>> >> terrible name. There are junits for the plugin itself that read the
>> >> jsps from the file system(not compressed/embedded).
>> >>
>> >> musachy
>> >>
>> >> On Fri, Aug 14, 2009 at 7:58 AM, Brian Pontarelli<brian@pontarelli.com
>> >
>> >> wrote:
>> >> > Does this plugin provide for executing the JSPs in unit tests?
>> Embedding
>> >> is
>> >> > really nice, but unit testing is even better.
>> >> >
>> >> > -bp
>> >> >
>> >> >
>> >> > On Aug 13, 2009, at 12:27 PM, Wes Wannemacher wrote:
>> >> >
>> >> >> I think it is a good idea, as much as I dislike JSP (because it
is
>> so
>> >> >> non-portable, which this very plugin addresses), it is ubiquitous.
>> >> >>
>> >> >> -Wes
>> >> >>
>> >> >> On Thu, Aug 13, 2009 at 2:16 PM, Musachy Barroso<musachy@gmail.com>
>> >> wrote:
>> >> >>>
>> >> >>> The JSP plugin turned out to work better than I expected(tags
and
>> >> >>> includes work), so I would like to bring it out of the sandbox
and
>> >> >>> label it as "experimental" until we get more people to try
it out.
>> Any
>> >> >>> objections/comments (this is not a vote thread, that will be
later
>> if
>> >> >>> there are no objections)?
>> >> >>>
>> >> >>> musachy
>> >> >>> --
>> >> >>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>> >> >>>
>> >> >>>
>> ---------------------------------------------------------------------
>> >> >>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> >> >>> For additional commands, e-mail: dev-help@struts.apache.org
>> >> >>>
>> >> >>>
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Wes Wannemacher
>> >> >>
>> >> >> Head Engineer, WanTii, Inc.
>> >> >> Need Training? Struts, Spring, Maven, Tomcat...
>> >> >> Ask me for a quote!
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> >> >> For additional commands, e-mail: dev-help@struts.apache.org
>> >> >>
>> >> >
>> >> >
>> >> > ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> >> > For additional commands, e-mail: dev-help@struts.apache.org
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> "Hey you! Would you help me to carry the stone?" Pink Floyd
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> >> For additional commands, e-mail: dev-help@struts.apache.org
>> >>
>> >>
>> >
>>
>>
>>
>> --
>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message