You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Abhishake Agarwal <ab...@ibaazar.com> on 2008/03/09 12:19:48 UTC

problem using session.getAttribute("userLogin")

Hello,

I am getting following error if I try to get userLogin from session in
orderStatus.bsh. please let me know what might be the problem.

[java] Message: Error rendering screen
[component://eshop/widget/EmailOrderScreens.xml#OrderCompleteNotice]:
org.ofbiz.base.util.GeneralException: Error running BSH script at location
[component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh]
(Error running BSH script at
[component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh],
line [40]: Sourced file:
component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
: Attempt to resolve method: getAttribute() on undefined variable or class
name: session : at Line: 40 : in file:
component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
: session .getAttribute ( "userLogin" )
     [java]  (Sourced file:
component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
:* Attempt to resolve method: getAttribute() on undefined variable or class
name: session))*
     [java] ---- stack trace
---------------------------------------------------------------
     [java] java.lang.Exception: Error rendering screen
[component://eshop/widget/EmailOrderScreens.xml#OrderCompleteNotice]:
org.ofbiz.base.util.GeneralException: Error running BSH script at location
[component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh]
(Error running BSH script at
[component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh],
line [40]: Sourced file:
component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
: Attempt to resolve method: getAttribute() on undefined variable or class
name: session : at Line: 40 : in file:
component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
: session .getAttribute ( "userLogin" )
     [java]  (Sourced file:
component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
: Attempt to resolve method: getAttribute() on undefined variable or class
name: session))

Regards,
Abhishake

Re: problem using session.getAttribute("userLogin")

Posted by Abhishake Agarwal <ab...@gmail.com>.
Just brief description why I am trying getting userLogin from session:

when I click on *quick Entire shipping* for a order created using *anonymous
checkout*, the order completion mail sent to user contain a message

 *Order Complete Notice*

*NOTE: This is a DEMO store-front. Orders placed here will NOT be billed,
and will NOT be fulfilled.*
*Order not found with ID [IBGO10062], or not allowed to view.*when I further
investigated this, I found userLogin variable used in orderStatus.bsh is
null. also session and request variable is void. please let me know how can
I get userLogin in orderStatus.bsh when order is created using anonymous
checkout(when I click on quick ship entire order).




Regards,
Abhishake


On Sun, Mar 9, 2008 at 4:49 PM, Abhishake Agarwal <ab...@ibaazar.com>
wrote:

> Hello,
>
> I am getting following error if I try to get userLogin from session in
> orderStatus.bsh. please let me know what might be the problem.
>
> [java] Message: Error rendering screen
> [component://eshop/widget/EmailOrderScreens.xml#OrderCompleteNotice]:
> org.ofbiz.base.util.GeneralException: Error running BSH script at location
> [component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh]
> (Error running BSH script at
> [component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh],
> line [40]: Sourced file:
> component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
> : Attempt to resolve method: getAttribute() on undefined variable or class
> name: session : at Line: 40 : in file:
> component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
> : session .getAttribute ( "userLogin" )
>      [java]  (Sourced file:
> component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
> :* Attempt to resolve method: getAttribute() on undefined variable or
> class name: session))*
>      [java] ---- stack trace
> ---------------------------------------------------------------
>      [java] java.lang.Exception: Error rendering screen
> [component://eshop/widget/EmailOrderScreens.xml#OrderCompleteNotice]:
> org.ofbiz.base.util.GeneralException: Error running BSH script at location
> [component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh]
> (Error running BSH script at
> [component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh],
> line [40]: Sourced file:
> component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
> : Attempt to resolve method: getAttribute() on undefined variable or class
> name: session : at Line: 40 : in file:
> component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
> : session .getAttribute ( "userLogin" )
>      [java]  (Sourced file:
> component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
> : Attempt to resolve method: getAttribute() on undefined variable or class
> name: session))
>
> Regards,
> Abhishake
>

Re: problem using session.getAttribute("userLogin")

Posted by Abhishake Agarwal <ab...@gmail.com>.
Yes Raj is right this store is configure for production.

On Sun, Mar 9, 2008 at 11:04 PM, Raj Saini <ra...@gmail.com> wrote:

> This is not a demo store problem. This problem is similar to
> https://issues.apache.org/jira/browse/OFBIZ-1533. This happens for the
> production store when a order is created by anonymous user and when
> order confirmation mail is sent. I remember looked at it before and will
> try to find a fix.
>
> Raj
>
> BJ Freeman wrote:
> > demo stores are setup not to process orders,
> > this is set in the Product store.
> > You have to set up your payment methods.
> > it is best to created you own store and leave the demo store for
> practice.
> > see
> > http://docs.ofbiz.org/display/~jacopoc/Quick+Start+Guides<http://docs.ofbiz.org/display/%7Ejacopoc/Quick+Start+Guides>
> >
> http://docs.ofbiz.org/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide
> >
> http://docs.ofbiz.org/display/OFBENDUSER/Apache+OFBiz+Business+Setup+Guide
> >
> >
> > Abhishake Agarwal sent the following on 3/9/2008 6:03 AM:
> >
> >> Just brief description why I am trying getting userLogin from session:
> >>
> >> when I click on *quick Entire shipping* for a order created using
> *anonymous
> >> checkout*, the order completion mail sent to user contain a message
> >>
> >>  *Order Complete Notice*
> >>
> >> *NOTE: This is a DEMO store-front. Orders placed here will NOT be
> billed,
> >> and will NOT be fulfilled.*
> >> *Order not found with ID [IBGO10062], or not allowed to view.*when I
> further
> >> investigated this, I found userLogin variable used in orderStatus.bshis
> >> null. also session and request variable is void. please let me know how
> can
> >> I get userLogin in orderStatus.bsh when order is created using
> anonymous
> >> checkout(when I click on quick ship entire order).
> >>
> >>
> >>
> >>
> >> Regards,
> >> Abhishake
> >>
> >>
> >
> >
> >
>
>

Re: problem using session.getAttribute("userLogin")

Posted by Raj Saini <ra...@gmail.com>.
This is not a demo store problem. This problem is similar to 
https://issues.apache.org/jira/browse/OFBIZ-1533. This happens for the 
production store when a order is created by anonymous user and when 
order confirmation mail is sent. I remember looked at it before and will 
try to find a fix.

Raj

BJ Freeman wrote:
> demo stores are setup not to process orders,
> this is set in the Product store.
> You have to set up your payment methods.
> it is best to created you own store and leave the demo store for practice.
> see
> http://docs.ofbiz.org/display/~jacopoc/Quick+Start+Guides
> http://docs.ofbiz.org/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide
> http://docs.ofbiz.org/display/OFBENDUSER/Apache+OFBiz+Business+Setup+Guide
>
>
> Abhishake Agarwal sent the following on 3/9/2008 6:03 AM:
>   
>> Just brief description why I am trying getting userLogin from session:
>>
>> when I click on *quick Entire shipping* for a order created using *anonymous
>> checkout*, the order completion mail sent to user contain a message
>>
>>  *Order Complete Notice*
>>
>> *NOTE: This is a DEMO store-front. Orders placed here will NOT be billed,
>> and will NOT be fulfilled.*
>> *Order not found with ID [IBGO10062], or not allowed to view.*when I further
>> investigated this, I found userLogin variable used in orderStatus.bsh is
>> null. also session and request variable is void. please let me know how can
>> I get userLogin in orderStatus.bsh when order is created using anonymous
>> checkout(when I click on quick ship entire order).
>>
>>
>>
>>
>> Regards,
>> Abhishake
>>
>>     
>
>
>   


Re: problem using session.getAttribute("userLogin")

Posted by BJ Freeman <bj...@free-man.net>.
demo stores are setup not to process orders,
this is set in the Product store.
You have to set up your payment methods.
it is best to created you own store and leave the demo store for practice.
see
http://docs.ofbiz.org/display/~jacopoc/Quick+Start+Guides
http://docs.ofbiz.org/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide
http://docs.ofbiz.org/display/OFBENDUSER/Apache+OFBiz+Business+Setup+Guide


Abhishake Agarwal sent the following on 3/9/2008 6:03 AM:
> Just brief description why I am trying getting userLogin from session:
> 
> when I click on *quick Entire shipping* for a order created using *anonymous
> checkout*, the order completion mail sent to user contain a message
> 
>  *Order Complete Notice*
> 
> *NOTE: This is a DEMO store-front. Orders placed here will NOT be billed,
> and will NOT be fulfilled.*
> *Order not found with ID [IBGO10062], or not allowed to view.*when I further
> investigated this, I found userLogin variable used in orderStatus.bsh is
> null. also session and request variable is void. please let me know how can
> I get userLogin in orderStatus.bsh when order is created using anonymous
> checkout(when I click on quick ship entire order).
> 
> 
> 
> 
> Regards,
> Abhishake
> 


Re: problem using session.getAttribute("userLogin")

Posted by Abhishake Agarwal <ab...@gmail.com>.
Sorry for sending multiple times due to some confusion in my email client.

On Sun, Mar 9, 2008 at 7:34 PM, Abhishake Agarwal <ab...@ibaazar.com>
wrote:

> Just brief description why I am trying getting userLogin from session:
>
> when I click on *quick Entire shipping* for a order created using *anonymous
> checkout*, the order completion mail sent to user contain a message
>
>  *Order Complete Notice*
>
> *NOTE: This is a DEMO store-front. Orders placed here will NOT be billed,
> and will NOT be fulfilled.*
> *Order not found with ID [IBGO10062], or not allowed to view.*when I
> further investigated this, I found userLogin variable used in
> orderStatus.bsh is null. also session and request variable is void. please
> let me know how can I get userLogin in orderStatus.bsh when order is
> created using anonymous checkout(when I click on quick ship entire order).
>
>
>
>
> Regards,
> Abhishake
>

Re: problem using session.getAttribute("userLogin")

Posted by Abhishake Agarwal <ab...@ibaazar.com>.
Just brief description why I am trying getting userLogin from session:

when I click on *quick Entire shipping* for a order created using *anonymous
checkout*, the order completion mail sent to user contain a message

 *Order Complete Notice*

*NOTE: This is a DEMO store-front. Orders placed here will NOT be billed,
and will NOT be fulfilled.*
*Order not found with ID [IBGO10062], or not allowed to view.*when I further
investigated this, I found userLogin variable used in orderStatus.bsh is
null. also session and request variable is void. please let me know how can
I get userLogin in orderStatus.bsh when order is created using anonymous
checkout(when I click on quick ship entire order).




Regards,
Abhishake

Re: problem using session.getAttribute("userLogin")

Posted by Abhishake Agarwal <ab...@gmail.com>.
Just brief description why I am trying getting userLogin from session:

when I click on *quick Entire shipping* for a order created using *anonymous
checkout*, the order completion mail sent to user contain a message

 *Order Complete Notice*

*NOTE: This is a DEMO store-front. Orders placed here will NOT be billed,
and will NOT be fulfilled.*
*Order not found with ID [IBGO10062], or not allowed to view.*when I further
investigated this, I found userLogin variable used in orderStatus.bsh is
null. also session and request variable is void. please let me know how can
I get userLogin in orderStatus.bsh when order is created using anonymous
checkout(when I click on quick ship entire order).




Regards,
Abhishake

Re: problem using session.getAttribute("userLogin")

Posted by Jacques Le Roux <ja...@les7arts.com>.
Please use rather user ML for such questions :
http://docs.ofbiz.org/display/OFBADMIN/Mailing+Lists#MailingLists-DeveloperList:dev@ofbiz.apache.org

Looks like you did not define a session var. You might try something like 
session = request.getSession();

Don't forget the import 
import javax.servlet.http.*;

Jacques


From: "Abhishake Agarwal" <ab...@ibaazar.com>
> Hello,
> 
> I am getting following error if I try to get userLogin from session in
> orderStatus.bsh. please let me know what might be the problem.
> 
> [java] Message: Error rendering screen
> [component://eshop/widget/EmailOrderScreens.xml#OrderCompleteNotice]:
> org.ofbiz.base.util.GeneralException: Error running BSH script at location
> [component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh]
> (Error running BSH script at
> [component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh],
> line [40]: Sourced file:
> component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
> : Attempt to resolve method: getAttribute() on undefined variable or class
> name: session : at Line: 40 : in file:
> component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
> : session .getAttribute ( "userLogin" )
>     [java]  (Sourced file:
> component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
> :* Attempt to resolve method: getAttribute() on undefined variable or class
> name: session))*
>     [java] ---- stack trace
> ---------------------------------------------------------------
>     [java] java.lang.Exception: Error rendering screen
> [component://eshop/widget/EmailOrderScreens.xml#OrderCompleteNotice]:
> org.ofbiz.base.util.GeneralException: Error running BSH script at location
> [component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh]
> (Error running BSH script at
> [component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh],
> line [40]: Sourced file:
> component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
> : Attempt to resolve method: getAttribute() on undefined variable or class
> name: session : at Line: 40 : in file:
> component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
> : session .getAttribute ( "userLogin" )
>     [java]  (Sourced file:
> component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
> : Attempt to resolve method: getAttribute() on undefined variable or class
> name: session))
> 
> Regards,
> Abhishake
>