You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dian Aditya <di...@meruvian.org> on 2012/06/26 13:23:18 UTC

JasperReport Weblogic 11g NPE Problem

Hi,

I've deployed my struts2 application which uses jasperreports plugin. When
deploying
in Glassfish3 and Tomcat, the reports working fine. But when I deploy to
Weblogic 11g
the following NPE is given.

java.lang.NullPointerException
at
weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:645)
at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:819)
at
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:519)
at
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
at
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
at
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

Anyone know how to solve this issue?
I'm using struts 2.2.3 and struts2-jasper-reports plugin 2.2.3.

Re: How to string concatenate listValue in struts (radio) tag?

Posted by Mounir Benzid <mb...@meetingmasters.de>.
Fair question... it's because the right label which is the localised 
name of the current TicketDescription will be determined only by the 
choosen locale during  runtime and is not knowm during
compile time. For instance German clients will be presented with German 
translations. Someone in France wants to see the French translation and 
so forth.


This's what I  do now which is pretty lame imo.

/***********************************************************************************************/
     public String getTicketLabel(Long id) {
         if (id == null) {
             throw new NullArgumentException("id");
         }
         List<TicketDescription> list = 
bookingTransactionBean.getEventProductCatalog().getTicketDescriptionsWithFirstAsPrimary();

         for (TicketDescription description : list) {
             if (!id.equals(description.getId()) {
                 continue;
             }
             String name = 
description.getTicketNameByLocale(**getLocale()**);
             String price = 
description.getPrice().getAmount().toPlainString();
             String symbol = 
description.getPrice().getCurrencyUnit().getSymbol();

             return name + " (" + price + " " + symbol + ")";
         }

         // given id doesn't match any ticketdescription
         return "";

     }



Am 6/27/2012 2:14 PM, schrieb Dave Newton:
> Why not just build the list with the right label already in it?
>
> Dave
>
> On Wed, Jun 27, 2012 at 8:01 AM, Mounir Benzid <mb...@meetingmasters.de> wrote:
>
>> Can I do something along the lines of this?
>>
>>
>>                         <s:radio name="ticket"
>>                                  list="ticketDescriptions"
>>                                  listKey="id"
>> listValue="%{getTicketLabel(#**this)}"
>>                                  />
>>
>> using #this as a reference for the current TicketDescription instance.
>>
>> Am 6/27/2012 1:41 PM, schrieb Mounir Benzid:
>>
>>
>>> Like this?
>>>
>>> String getTicketLabelById(Long id) {
>>>    TicketDescription td = lookupTicketDescriptionBy(id);
>>> ....
>>> }
>>>
>>>                        <s:radio name="ticket"
>>>                                 list="ticketDescriptions"
>>>                                 listKey="id"
>>> listValue="%{**getTicketLabelById(id)}"
>>>                                 />
>>>
>>> The only downside I see is the lookup that has to be carried out every
>>> time the method is called, since in theory I'm already iterating through
>>> the appropriate instance.
>>>
>>>
>>>
>>>
>>> Am 6/27/2012 1:14 PM, schrieb Dave Newton:
>>>
>>>> My idea would be to create presentation layer data outside of the JSP.
>>>>
>>>> Dave
>>>>
>>>> On Wed, Jun 27, 2012 at 6:38 AM, Mounir Benzid <mb...@meetingmasters.de>
>>>> wrote:
>>>>
>>>>   Hi
>>>>>
>>>>> here's the deal.
>>>>>
>>>>> Suppose I want to display a <s:radio> tag showing a list of
>>>>> TicketDescriptions where each has the property ticketName, i.e. a method
>>>>> getTicketName()).
>>>>> getTicketName itself returns an instance of type LocalizedString for
>>>>> which
>>>>> I wrote a custom struts conversion.
>>>>> LocalizedString  is basically an enhanced java.util.String object which
>>>>> contains the TicketDescription's name.
>>>>> After the conversion ticketName will be of type java.lang.String.
>>>>>
>>>>> So this is what I use so far:
>>>>>
>>>>>                         <s:radio name="ticket"
>>>>>                                  list="ticketDescriptions"
>>>>>                                  listKey="id"
>>>>>                                  listValue="ticketName"
>>>>>                                  />
>>>>>
>>>>>
>>>>> and as an example results in
>>>>> [ ] student ticket
>>>>> [ ] VIP ticket
>>>>> [ ]...
>>>>>
>>>>>
>>>>>
>>>>> BUT what I really would like to see is
>>>>>
>>>>> [ ] student ticket (10 Euro)
>>>>> [ ] VIP ticket (100 Euro)
>>>>> [ ]...
>>>>>
>>>>>
>>>>>
>>>>> This is what I tried so far but with no avail
>>>>>
>>>>>
>>>>>                         <s:radio name="ticket"
>>>>>                                  list="ticketDescriptions"
>>>>>                                  listKey="id"
>>>>>                                  listValue="%{ticketName +  ' (100
>>>>> Euro)' }"
>>>>>                                  />
>>>>>
>>>>>
>>>>> The output is
>>>>>
>>>>> [ ] xx.xx.LocalizedString@1bb8d3e[****ID=373,Locale=en,Title="****
>>>>> student
>>>>> ticket"] (100 Euro)
>>>>> [ ] xx.xx.LocalizedString@1bb8d3e[****ID=374,Locale=en,Title="VIP
>>>>> ticket"]
>>>>> (100 Euro)
>>>>>
>>>>> Any ideas? thanks!
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------****----------------------------**--**---------
>>>>>
>>>>> To unsubscribe, e-mail: user-unsubscribe@struts.**apac**he.org<http://apache.org>
>>>>> <us...@struts.apache.org>
>>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>>
>>>>>
>>>>>
>>>
>> --
>> Mounir Benzid
>> Systementwickler / EDV
>>
>> meetingmasters.de
>> meetings meisterhaft managen
>>
>> · Unabhängige Vermittlung von Tagungshotels
>> · Online-**Hotelreservierungssystem zur Integration in die
>> Veranstaltungs-Webseite
>> · Webbasiertes Veranstaltungs- und Teilnehmermanagement
>> · E-Procurement für den MICE-Einkauf
>> · Webbasierte Anfrage und Verhandlung von Firmenraten
>>
>> Max-Planck-Straße 22
>> D-54296 Trier
>>
>> fon +49 (0)651-145789-38
>> fax +49 (0)651-145789-20
>>
>> www.meetingmasters.de
>> mb@meetingmasters.de
>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: user-unsubscribe@struts.**apache.org<us...@struts.apache.org>
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>


-- 
Mounir Benzid
Systementwickler / EDV

meetingmasters.de
meetings meisterhaft managen

· Unabhängige Vermittlung von Tagungshotels
· Online-Hotelreservierungssystem zur Integration in die Veranstaltungs-Webseite
· Webbasiertes Veranstaltungs- und Teilnehmermanagement
· E-Procurement für den MICE-Einkauf
· Webbasierte Anfrage und Verhandlung von Firmenraten

Max-Planck-Straße 22
D-54296 Trier

fon +49 (0)651-145789-38
fax +49 (0)651-145789-20

www.meetingmasters.de
mb@meetingmasters.de


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: How to string concatenate listValue in struts (radio) tag?

Posted by Dave Newton <da...@gmail.com>.
Why not just build the list with the right label already in it?

Dave

On Wed, Jun 27, 2012 at 8:01 AM, Mounir Benzid <mb...@meetingmasters.de> wrote:

>
> Can I do something along the lines of this?
>
>
>                        <s:radio name="ticket"
>                                 list="ticketDescriptions"
>                                 listKey="id"
> listValue="%{getTicketLabel(#**this)}"
>                                 />
>
> using #this as a reference for the current TicketDescription instance.
>
> Am 6/27/2012 1:41 PM, schrieb Mounir Benzid:
>
>
>> Like this?
>>
>> String getTicketLabelById(Long id) {
>>   TicketDescription td = lookupTicketDescriptionBy(id);
>> ....
>> }
>>
>>                       <s:radio name="ticket"
>>                                list="ticketDescriptions"
>>                                listKey="id"
>> listValue="%{**getTicketLabelById(id)}"
>>                                />
>>
>> The only downside I see is the lookup that has to be carried out every
>> time the method is called, since in theory I'm already iterating through
>> the appropriate instance.
>>
>>
>>
>>
>> Am 6/27/2012 1:14 PM, schrieb Dave Newton:
>>
>>> My idea would be to create presentation layer data outside of the JSP.
>>>
>>> Dave
>>>
>>> On Wed, Jun 27, 2012 at 6:38 AM, Mounir Benzid <mb...@meetingmasters.de>
>>> wrote:
>>>
>>>  Hi
>>>>
>>>>
>>>> here's the deal.
>>>>
>>>> Suppose I want to display a <s:radio> tag showing a list of
>>>> TicketDescriptions where each has the property ticketName, i.e. a method
>>>> getTicketName()).
>>>> getTicketName itself returns an instance of type LocalizedString for
>>>> which
>>>> I wrote a custom struts conversion.
>>>> LocalizedString  is basically an enhanced java.util.String object which
>>>> contains the TicketDescription's name.
>>>> After the conversion ticketName will be of type java.lang.String.
>>>>
>>>> So this is what I use so far:
>>>>
>>>>                        <s:radio name="ticket"
>>>>                                 list="ticketDescriptions"
>>>>                                 listKey="id"
>>>>                                 listValue="ticketName"
>>>>                                 />
>>>>
>>>>
>>>> and as an example results in
>>>> [ ] student ticket
>>>> [ ] VIP ticket
>>>> [ ]...
>>>>
>>>>
>>>>
>>>> BUT what I really would like to see is
>>>>
>>>> [ ] student ticket (10 Euro)
>>>> [ ] VIP ticket (100 Euro)
>>>> [ ]...
>>>>
>>>>
>>>>
>>>> This is what I tried so far but with no avail
>>>>
>>>>
>>>>                        <s:radio name="ticket"
>>>>                                 list="ticketDescriptions"
>>>>                                 listKey="id"
>>>>                                 listValue="%{ticketName +  ' (100
>>>> Euro)' }"
>>>>                                 />
>>>>
>>>>
>>>> The output is
>>>>
>>>> [ ] xx.xx.LocalizedString@1bb8d3e[****ID=373,Locale=en,Title="****
>>>> student
>>>> ticket"] (100 Euro)
>>>> [ ] xx.xx.LocalizedString@1bb8d3e[****ID=374,Locale=en,Title="VIP
>>>> ticket"]
>>>> (100 Euro)
>>>>
>>>> Any ideas? thanks!
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------****----------------------------**--**---------
>>>>
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.**apac**he.org<http://apache.org>
>>>> <us...@struts.apache.org>
>>>> >
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>>
>>
>>
>
> --
> Mounir Benzid
> Systementwickler / EDV
>
> meetingmasters.de
> meetings meisterhaft managen
>
> · Unabhängige Vermittlung von Tagungshotels
> · Online-**Hotelreservierungssystem zur Integration in die
> Veranstaltungs-Webseite
> · Webbasiertes Veranstaltungs- und Teilnehmermanagement
> · E-Procurement für den MICE-Einkauf
> · Webbasierte Anfrage und Verhandlung von Firmenraten
>
> Max-Planck-Straße 22
> D-54296 Trier
>
> fon +49 (0)651-145789-38
> fax +49 (0)651-145789-20
>
> www.meetingmasters.de
> mb@meetingmasters.de
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: user-unsubscribe@struts.**apache.org<us...@struts.apache.org>
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: How to string concatenate listValue in struts (radio) tag?

Posted by Mounir Benzid <mb...@meetingmasters.de>.
Can I do something along the lines of this?

                         <s:radio name="ticket"
                                  list="ticketDescriptions"
                                  listKey="id"
listValue="%{getTicketLabel(#this)}"
                                  />

using #this as a reference for the current TicketDescription instance.

Am 6/27/2012 1:41 PM, schrieb Mounir Benzid:
>
> Like this?
>
> String getTicketLabelById(Long id) {
>    TicketDescription td = lookupTicketDescriptionBy(id);
> ....
> }
>
>                        <s:radio name="ticket"
>                                 list="ticketDescriptions"
>                                 listKey="id"
> listValue="%{getTicketLabelById(id)}"
>                                 />
>
> The only downside I see is the lookup that has to be carried out every 
> time the method is called, since in theory I'm already iterating 
> through the appropriate instance.
>
>
>
>
> Am 6/27/2012 1:14 PM, schrieb Dave Newton:
>> My idea would be to create presentation layer data outside of the JSP.
>>
>> Dave
>>
>> On Wed, Jun 27, 2012 at 6:38 AM, Mounir Benzid <mb...@meetingmasters.de> 
>> wrote:
>>
>>> Hi
>>>
>>>
>>> here's the deal.
>>>
>>> Suppose I want to display a <s:radio> tag showing a list of
>>> TicketDescriptions where each has the property ticketName, i.e. a 
>>> method
>>> getTicketName()).
>>> getTicketName itself returns an instance of type LocalizedString for 
>>> which
>>> I wrote a custom struts conversion.
>>> LocalizedString  is basically an enhanced java.util.String object which
>>> contains the TicketDescription's name.
>>> After the conversion ticketName will be of type java.lang.String.
>>>
>>> So this is what I use so far:
>>>
>>>                         <s:radio name="ticket"
>>>                                  list="ticketDescriptions"
>>>                                  listKey="id"
>>>                                  listValue="ticketName"
>>>                                  />
>>>
>>>
>>> and as an example results in
>>> [ ] student ticket
>>> [ ] VIP ticket
>>> [ ]...
>>>
>>>
>>>
>>> BUT what I really would like to see is
>>>
>>> [ ] student ticket (10 Euro)
>>> [ ] VIP ticket (100 Euro)
>>> [ ]...
>>>
>>>
>>>
>>> This is what I tried so far but with no avail
>>>
>>>
>>>                         <s:radio name="ticket"
>>>                                  list="ticketDescriptions"
>>>                                  listKey="id"
>>>                                  listValue="%{ticketName +  ' (100 
>>> Euro)' }"
>>>                                  />
>>>
>>>
>>> The output is
>>>
>>> [ ] xx.xx.LocalizedString@1bb8d3e[**ID=373,Locale=en,Title="**student
>>> ticket"] (100 Euro)
>>> [ ] xx.xx.LocalizedString@1bb8d3e[**ID=374,Locale=en,Title="VIP 
>>> ticket"]
>>> (100 Euro)
>>>
>>> Any ideas? thanks!
>>>
>>>
>>>
>>>
>>> ------------------------------**------------------------------**--------- 
>>>
>>> To unsubscribe, e-mail: 
>>> user-unsubscribe@struts.**apache.org<us...@struts.apache.org>
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>
>


-- 
Mounir Benzid
Systementwickler / EDV

meetingmasters.de
meetings meisterhaft managen

· Unabhängige Vermittlung von Tagungshotels
· Online-Hotelreservierungssystem zur Integration in die Veranstaltungs-Webseite
· Webbasiertes Veranstaltungs- und Teilnehmermanagement
· E-Procurement für den MICE-Einkauf
· Webbasierte Anfrage und Verhandlung von Firmenraten

Max-Planck-Straße 22
D-54296 Trier

fon +49 (0)651-145789-38
fax +49 (0)651-145789-20

www.meetingmasters.de
mb@meetingmasters.de


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: How to string concatenate listValue in struts (radio) tag?

Posted by Mounir Benzid <mb...@meetingmasters.de>.
Like this?

String getTicketLabelById(Long id) {
    TicketDescription td = lookupTicketDescriptionBy(id);
....
}

                        <s:radio name="ticket"
                                 list="ticketDescriptions"
                                 listKey="id"
                                 listValue="%{getTicketLabelById(id)}"
                                 />

The only downside I see is the lookup that has to be carried out every 
time the method is called, since in theory I'm already iterating through 
the appropriate instance.




Am 6/27/2012 1:14 PM, schrieb Dave Newton:
> My idea would be to create presentation layer data outside of the JSP.
>
> Dave
>
> On Wed, Jun 27, 2012 at 6:38 AM, Mounir Benzid <mb...@meetingmasters.de> wrote:
>
>> Hi
>>
>>
>> here's the deal.
>>
>> Suppose I want to display a <s:radio> tag showing a list of
>> TicketDescriptions where each has the property ticketName, i.e. a method
>> getTicketName()).
>> getTicketName itself returns an instance of type LocalizedString for which
>> I wrote a custom struts conversion.
>> LocalizedString  is basically an enhanced java.util.String object which
>> contains the TicketDescription's name.
>> After the conversion ticketName will be of type java.lang.String.
>>
>> So this is what I use so far:
>>
>>                         <s:radio name="ticket"
>>                                  list="ticketDescriptions"
>>                                  listKey="id"
>>                                  listValue="ticketName"
>>                                  />
>>
>>
>> and as an example results in
>> [ ] student ticket
>> [ ] VIP ticket
>> [ ]...
>>
>>
>>
>> BUT what I really would like to see is
>>
>> [ ] student ticket (10 Euro)
>> [ ] VIP ticket (100 Euro)
>> [ ]...
>>
>>
>>
>> This is what I tried so far but with no avail
>>
>>
>>                         <s:radio name="ticket"
>>                                  list="ticketDescriptions"
>>                                  listKey="id"
>>                                  listValue="%{ticketName +  ' (100 Euro)' }"
>>                                  />
>>
>>
>> The output is
>>
>> [ ] xx.xx.LocalizedString@1bb8d3e[**ID=373,Locale=en,Title="**student
>> ticket"] (100 Euro)
>> [ ] xx.xx.LocalizedString@1bb8d3e[**ID=374,Locale=en,Title="VIP ticket"]
>> (100 Euro)
>>
>> Any ideas? thanks!
>>
>>
>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: user-unsubscribe@struts.**apache.org<us...@struts.apache.org>
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>


-- 
Mounir Benzid
Systementwickler / EDV

meetingmasters.de
meetings meisterhaft managen

· Unabhängige Vermittlung von Tagungshotels
· Online-Hotelreservierungssystem zur Integration in die Veranstaltungs-Webseite
· Webbasiertes Veranstaltungs- und Teilnehmermanagement
· E-Procurement für den MICE-Einkauf
· Webbasierte Anfrage und Verhandlung von Firmenraten

Max-Planck-Straße 22
D-54296 Trier

fon +49 (0)651-145789-38
fax +49 (0)651-145789-20

www.meetingmasters.de
mb@meetingmasters.de


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: How to string concatenate listValue in struts (radio) tag?

Posted by Dave Newton <da...@gmail.com>.
My idea would be to create presentation layer data outside of the JSP.

Dave

On Wed, Jun 27, 2012 at 6:38 AM, Mounir Benzid <mb...@meetingmasters.de> wrote:

> Hi
>
>
> here's the deal.
>
> Suppose I want to display a <s:radio> tag showing a list of
> TicketDescriptions where each has the property ticketName, i.e. a method
> getTicketName()).
> getTicketName itself returns an instance of type LocalizedString for which
> I wrote a custom struts conversion.
> LocalizedString  is basically an enhanced java.util.String object which
> contains the TicketDescription's name.
> After the conversion ticketName will be of type java.lang.String.
>
> So this is what I use so far:
>
>                        <s:radio name="ticket"
>                                 list="ticketDescriptions"
>                                 listKey="id"
>                                 listValue="ticketName"
>                                 />
>
>
> and as an example results in
> [ ] student ticket
> [ ] VIP ticket
> [ ]...
>
>
>
> BUT what I really would like to see is
>
> [ ] student ticket (10 Euro)
> [ ] VIP ticket (100 Euro)
> [ ]...
>
>
>
> This is what I tried so far but with no avail
>
>
>                        <s:radio name="ticket"
>                                 list="ticketDescriptions"
>                                 listKey="id"
>                                 listValue="%{ticketName +  ' (100 Euro)' }"
>                                 />
>
>
> The output is
>
> [ ] xx.xx.LocalizedString@1bb8d3e[**ID=373,Locale=en,Title="**student
> ticket"] (100 Euro)
> [ ] xx.xx.LocalizedString@1bb8d3e[**ID=374,Locale=en,Title="VIP ticket"]
> (100 Euro)
>
> Any ideas? thanks!
>
>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: user-unsubscribe@struts.**apache.org<us...@struts.apache.org>
> For additional commands, e-mail: user-help@struts.apache.org
>
>

How to string concatenate listValue in struts (radio) tag?

Posted by Mounir Benzid <mb...@meetingmasters.de>.
Hi


here's the deal.

Suppose I want to display a <s:radio> tag showing a list of 
TicketDescriptions where each has the property ticketName, i.e. a method 
getTicketName()).
getTicketName itself returns an instance of type LocalizedString for 
which I wrote a custom struts conversion.
LocalizedString  is basically an enhanced java.util.String object which 
contains the TicketDescription's name.
After the conversion ticketName will be of type java.lang.String.

So this is what I use so far:

                         <s:radio name="ticket"
                                  list="ticketDescriptions"
                                  listKey="id"
                                  listValue="ticketName"
                                  />


and as an example results in
[ ] student ticket
[ ] VIP ticket
[ ]...



BUT what I really would like to see is

[ ] student ticket (10 Euro)
[ ] VIP ticket (100 Euro)
[ ]...



This is what I tried so far but with no avail


                         <s:radio name="ticket"
                                  list="ticketDescriptions"
                                  listKey="id"
                                  listValue="%{ticketName +  ' (100 
Euro)' }"
                                  />


The output is

[ ] xx.xx.LocalizedString@1bb8d3e[ID=373,Locale=en,Title="student 
ticket"] (100 Euro)
[ ] xx.xx.LocalizedString@1bb8d3e[ID=374,Locale=en,Title="VIP ticket"] 
(100 Euro)

Any ideas? thanks!




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: JasperReport Weblogic 11g NPE Problem

Posted by Martin Gainty <mg...@hotmail.com>.
check the URL for spaces or other unencoded special characters..keep in mind the encoded URL must match what you have in weblogic <source-path> in config/config.xmlhttp://grokbase.com/t/struts/issues/101b7rv0s9/jira-created-ww-3373-weblogic-11g-throwing-java-lang-nullpointerexception
it appears your exception starts here:weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
 have you setup username and password in the SerializedSystemIni.dat according to your Weblogic admin guide?http://books.google.com/books?id=3cG7jRC53sIC&q=Weblogic+Subject&dq=Weblogic+Subject&hl=en&sa=X&ei=-6PpT7-APcOI6AHP_7mlDQ&ved=0CHUQ6AEwCQ does anyone see anything obvious here?
Martin ...
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
 > Date: Tue, 26 Jun 2012 18:23:18 +0700
> Subject: JasperReport Weblogic 11g NPE Problem
> From: dian.aditya@meruvian.org
> To: user@struts.apache.org
> 
> Hi,
> 
> I've deployed my struts2 application which uses jasperreports plugin. When
> deploying
> in Glassfish3 and Tomcat, the reports working fine. But when I deploy to
> Weblogic 11g
> the following NPE is given.
> 
> java.lang.NullPointerException
> at
> weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:645)
> at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:819)
> at
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:519)
> at
> org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
> at
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
> at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
> at
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
> at
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
> at
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
> at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
> at
> weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
> at
> weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
> at
> weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
> at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
> at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
> 
> Anyone know how to solve this issue?
> I'm using struts 2.2.3 and struts2-jasper-reports plugin 2.2.3.
 		 	   		  

Re: JasperReport Weblogic 11g NPE Problem

Posted by Łukasz Lenart <lu...@gmail.com>.
I've added a note about that to the docs [1]

[1] https://cwiki.apache.org/confluence/display/WW/WebLogic

Thanks for helping and testing!


Regards
-- 
Łukasz
mobile +48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: JasperReport Weblogic 11g NPE Problem

Posted by Dian Aditya <di...@meruvian.org>.
Great! You're right...

Thanks so much.

On Wed, Jun 27, 2012 at 4:29 PM, Ankit Sangoi <nj...@gmail.com> wrote:

> I had encountered a similar NPE but that was due to
> servletContext.getRealPath(finalLocation) used in JasperReportsResult.java
> to determine the report directory.
> I solved it by enabling the "Archived Real Path" global property in
> Weblogic admin console > configuration > Web Applications.
>
> Doing same might help you.
>
> On Tue, Jun 26, 2012 at 4:53 PM, Dian Aditya <dian.aditya@meruvian.org
> >wrote:
>
> > Hi,
> >
> > I've deployed my struts2 application which uses jasperreports plugin.
> When
> > deploying
> > in Glassfish3 and Tomcat, the reports working fine. But when I deploy to
> > Weblogic 11g
> > the following NPE is given.
> >
> > java.lang.NullPointerException
> > at
> >
> >
> weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:645)
> > at
> org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:819)
> > at
> >
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:519)
> > at
> >
> >
> org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
> > at
> >
> >
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
> > at
> >
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
> > at
> >
> >
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> > at
> >
> >
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> > at
> >
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
> > at
> >
> >
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
> > at
> >
> >
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
> > at
> > weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
> > at
> >
> >
> weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
> > at
> >
> >
> weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
> > at
> >
> >
> weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
> > at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
> > at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
> >
> > Anyone know how to solve this issue?
> > I'm using struts 2.2.3 and struts2-jasper-reports plugin 2.2.3.
> >
>

Re: JasperReport Weblogic 11g NPE Problem

Posted by Ankit Sangoi <nj...@gmail.com>.
I had encountered a similar NPE but that was due to
servletContext.getRealPath(finalLocation) used in JasperReportsResult.java
to determine the report directory.
I solved it by enabling the "Archived Real Path" global property in
Weblogic admin console > configuration > Web Applications.

Doing same might help you.

On Tue, Jun 26, 2012 at 4:53 PM, Dian Aditya <di...@meruvian.org>wrote:

> Hi,
>
> I've deployed my struts2 application which uses jasperreports plugin. When
> deploying
> in Glassfish3 and Tomcat, the reports working fine. But when I deploy to
> Weblogic 11g
> the following NPE is given.
>
> java.lang.NullPointerException
> at
>
> weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:645)
> at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:819)
> at
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:519)
> at
>
> org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
> at
>
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
> at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
> at
>
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> at
>
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
> at
>
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
> at
>
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
> at
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
> at
>
> weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
> at
>
> weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
> at
>
> weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
> at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
> at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
>
> Anyone know how to solve this issue?
> I'm using struts 2.2.3 and struts2-jasper-reports plugin 2.2.3.
>