Re: [jira] Commented: (GERONIMO-1674) Daytrader gets NullPointerException attempting to log in a user

2006-06-29 Thread Radoslava Bakalova
Hi Joe,

My name is Slava and I work with Trade on a daily
basis.  Recently, I started to look into Daytrader
because I would like to start contributing to the
Daytrader development.

When I first attempted to run Daytrader1.1 on
Geronimo1.1, I ran into the same NPE problem.  I agree
with you that the Daytrader code needs to be fixed.

Actually, I’ve already looked into the code and I
think that the problem is not in the marketSummary.jsp
itself but rather in the TradeBean that builds the
Market Summary object.  I am going to try a couple of
fixes.  I will keep you posted on my progress.

Slava


--- Matt Hogstrom [EMAIL PROTECTED] wrote:

 
 
 J. Stan Cox wrote:
  
  So, at the very least the code needs to be fixed
 to support a smaller 
  quote population.  Perhaps we could also provide 2
 basic settings on the 
  configuration page:
  
  1) Default, out of box sample application (low
 number of users quotes)
 
 Agreed...200 users and 400 quotes is acceptable for
 our internal testing and those using Derby.  I 
 think this is a fair number to kick the tires.
 
  2) Performance test,  larger default values (e.g.
 1000 quotes, 500 users)
 
 Performance testing is so dependent on the
 configuration being tested I think we're better to
 offer 
 guidance in a FAQ rather than specifying a value.  
 I'd never recommend people simply compare 
 numbers based on population.   I think that is
 inviting trouble.
 
  
  It would be good to settle on specific values for
 performance testing so 
  results will be comparable.
  
  Stan.
  
  Dain Sundstrom wrote:
  Chris,
 
  DayTrader has two uses to us.  One is clearly as
 a performance 
  benchmark, but DayTrader is also a very useful
 sample (test) 
  application that touches most parts of the J2EE
 specification.  We 
  dropped the default population sizes because
 Derby is so slow at 
  inserts it would take several minutes to
 repopulate.  Also, the 
  performance of Derby is so bad that you don't
 need much data to get 
  reliable results.  If you switch to a real
 database, you need a much 
  bigger data set.
 
  -dain
 
  On Jun 28, 2006, at 7:56 AM, Christopher Blythe
 wrote:
 
  Joe...
 
  I've worked on Trade for quite some time and am
 slowly starting to 
  dig into DayTrader. Anyway, just wanted to
 respond to your question 
  since I think I know what the problem is.
 
  In order for the MarketSummary to be display, at
 least 200 quotes 
  need to be populated in the database. If you
 look at the queries the 
  MarketSummary uses (either the EJBQL or SQL in
 TradeDirect.java) you 
  will see something like this...
 
  ejb-qlSELECT OBJECT(q) FROM Quote q WHERE
 q.symbol LIKE 's:1__' 
  ORDER BY q.change DESC/ejb-ql
 
  This indicates that the MarketSummary needs
 quotes between 100 and 
  199. If we are only populating 10 quotes by
 default, this query will 
  return 0 results and I imagine the MarketSummary
 will throw an 
  exception (as indicated by the stack traces).
 
  To get you up and running, I would re-populate
 your database with at 
  least 200 quotes. The default for Trade was
 actually 1000.
 
  I also suggest that the default be changed from
 10 to something more 
  realistic for performance testing ( i.e. 1000 or
 even higher).
 
  Hope this helps...
 
  Chris Blythe
 
  On 6/27/06, Joe Bohn (JIRA)
 dev@geronimo.apache.org  wrote:[ 
 

http://issues.apache.org/jira/browse/GERONIMO-1674?page=comments#action_12418036
 
  ]
 
  Joe Bohn commented on GERONIMO-1674:
  
 
  I still get this error.  I get it with tomcat as
 well as jetty.   I 
  think I may very well be doing something wrong. 
 Here is my scenario 
  after successfully deploying daytrader.
 
  1)  select configuration-configure Daytrader
 runtime paramenters 
  ...  and change the max users and max quotes to
 10 each.   Note, I'm 
  not really running daytrader for performance
 stats ... I was just 
  using it to verify geronimo functions after
 making some substantial 
  changes as a way to verify that I hadn't broken
 things too radically.
  2)  from confirguration select (Re)-populate
 Daytrader Database.  
  This appears to be successful.
  3)  Next, from under Configuration utilities I
 select Test DayTrader 
  Scenario and I get this attached exception.  
 It does seem strange 
  that if I do this a number of time eventually
 things seem to start 
  working.
 
  Here is another stack trace (unfortunately from
 jetty again but I do 
  get it with tomcat as well) from a recent
 attempt on 1.1.
 
  ## Trade configuration update. Current
 config:
 
  RunTimeMode:Direct
  OrderProcessingMode:   
 Synchronous
  AcessMode:  Standard
  Workload Mix:   Standard
  Web Interface:  JSP
  CachingType:No
 Caching
  #Trade  Users:  10
  #Trade Quotes:  

Re: [jira] Commented: (GERONIMO-1674) Daytrader gets NullPointerException attempting to log in a user

2006-06-28 Thread Joe Bohn

Thanks for your response Chris.

So are you saying that even the defaults for Daytrader are insufficient? 
What's confusing is that it always returns a login error even 
though it appears that login succeeds and this is really related to the 
initial display(s).  I get the same error if I select Trade  
Portfolios and then log in.


I also noticed that even if I return the settings to the defaults of 50 
users and 100 max quotes I still get the error.   You are correct that 
making the max quotes 1000 resolves the problem.


So, I guess the next question is what needs to change?.   It seems 
that we should not ship the sample with default values that don't work 
well with the application.  We also should not allow the user to set 
values that can cause a failure.


However, I'm not clear if the correct fix should be changing the 
defaults (and validating settings to ensure they are not too small) or 
changing the display code to deal with the range of values that can be 
set.  What is the recommendation of the Daytrader experts?


Joe

Christopher Blythe wrote:

Joe...

I've worked on Trade for quite some time and am slowly starting to dig 
into DayTrader. Anyway, just wanted to respond to your question since I 
think I know what the problem is.


In order for the MarketSummary to be display, at least 200 quotes need 
to be populated in the database. If you look at the queries the 
MarketSummary uses (either the EJBQL or SQL in TradeDirect.java) you 
will see something like this...


ejb-qlSELECT OBJECT(q) FROM Quote q WHERE q.symbol LIKE 's:1__' ORDER 
BY q.change DESC/ejb-ql


This indicates that the MarketSummary needs quotes between 100 and 199. 
If we are only populating 10 quotes by default, this query will return 0 
results and I imagine the MarketSummary will throw an exception (as 
indicated by the stack traces).


To get you up and running, I would re-populate your database with at 
least 200 quotes. The default for Trade was actually 1000.


I also suggest that the default be changed from 10 to something more 
realistic for performance testing ( i.e. 1000 or even higher).


Hope this helps...

Chris Blythe

On 6/27/06, *Joe Bohn (JIRA)* dev@geronimo.apache.org 
mailto:dev@geronimo.apache.org wrote:


[

http://issues.apache.org/jira/browse/GERONIMO-1674?page=comments#action_12418036
]

Joe Bohn commented on GERONIMO-1674:


I still get this error.  I get it with tomcat as well as jetty.   I
think I may very well be doing something wrong.  Here is my scenario
after successfully deploying daytrader.

1)  select configuration-configure Daytrader runtime paramenters
...  and change the max users and max quotes to 10 each.   Note, I'm
not really running daytrader for performance stats ... I was just
using it to verify geronimo functions after making some substantial
changes as a way to verify that I hadn't broken things too radically.
2)  from confirguration select (Re)-populate Daytrader
Database.  This appears to be successful.
3)  Next, from under Configuration utilities I select Test
DayTrader Scenario and I get this attached exception.   It does
seem strange that if I do this a number of time eventually things
seem to start working.

Here is another stack trace (unfortunately from jetty again but I do
get it with tomcat as well) from a recent attempt on 1.1.

## Trade configuration update. Current config:

RunTimeMode:Direct
OrderProcessingMode:Synchronous
AcessMode:  Standard
Workload Mix:   Standard
Web Interface:  JSP
CachingType:No Caching
#Trade  Users:  10
#Trade Quotes:  10
Long Run Enabled:   true

10:47:43,984 ERROR [Log] Error: TradeDirect:login -- error logging
in user
java.lang.NullPointerException
java.lang.NullPointerException
at

org.apache.geronimo.samples.daytrader.util.FinancialUtils.computeGainPercent(FinancialUtils.java:43)
at
org.apache.geronimo.samples.daytrader.MarketSummaryDataBean
.init(MarketSummaryDataBean.java:54)
at

org.apache.geronimo.samples.daytrader.direct.TradeDirect.getMarketSummary(TradeDirect.java:152)
at
org.apache.geronimo.samples.daytrader.TradeAction.getMarketSummary
(TradeAction.java:100)
at jsp.marketSummary_jsp._jspService(marketSummary_jsp.java:55)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service (HttpServlet.java:688)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at


Re: [jira] Commented: (GERONIMO-1674) Daytrader gets NullPointerException attempting to log in a user

2006-06-28 Thread Dain Sundstrom

Chris,

DayTrader has two uses to us.  One is clearly as a performance  
benchmark, but DayTrader is also a very useful sample (test)  
application that touches most parts of the J2EE specification.  We  
dropped the default population sizes because Derby is so slow at  
inserts it would take several minutes to repopulate.  Also, the  
performance of Derby is so bad that you don't need much data to get  
reliable results.  If you switch to a real database, you need a much  
bigger data set.


-dain

On Jun 28, 2006, at 7:56 AM, Christopher Blythe wrote:


Joe...

I've worked on Trade for quite some time and am slowly starting to  
dig into DayTrader. Anyway, just wanted to respond to your question  
since I think I know what the problem is.


In order for the MarketSummary to be display, at least 200 quotes  
need to be populated in the database. If you look at the queries  
the MarketSummary uses (either the EJBQL or SQL in  
TradeDirect.java) you will see something like this...


ejb-qlSELECT OBJECT(q) FROM Quote q WHERE q.symbol LIKE 's:1__'  
ORDER BY q.change DESC/ejb-ql


This indicates that the MarketSummary needs quotes between 100 and  
199. If we are only populating 10 quotes by default, this query  
will return 0 results and I imagine the MarketSummary will throw an  
exception (as indicated by the stack traces).


To get you up and running, I would re-populate your database with  
at least 200 quotes. The default for Trade was actually 1000.


I also suggest that the default be changed from 10 to something  
more realistic for performance testing ( i.e. 1000 or even higher).


Hope this helps...

Chris Blythe

On 6/27/06, Joe Bohn (JIRA) dev@geronimo.apache.org  wrote: 
[ http://issues.apache.org/jira/browse/GERONIMO-1674? 
page=comments#action_12418036 ]


Joe Bohn commented on GERONIMO-1674:


I still get this error.  I get it with tomcat as well as jetty.   I  
think I may very well be doing something wrong.  Here is my  
scenario after successfully deploying daytrader.


1)  select configuration-configure Daytrader runtime  
paramenters ...  and change the max users and max quotes to 10  
each.   Note, I'm not really running daytrader for performance  
stats ... I was just using it to verify geronimo functions after  
making some substantial changes as a way to verify that I hadn't  
broken things too radically.
2)  from confirguration select (Re)-populate Daytrader Database.   
This appears to be successful.
3)  Next, from under Configuration utilities I select Test  
DayTrader Scenario and I get this attached exception.   It does  
seem strange that if I do this a number of time eventually things  
seem to start working.


Here is another stack trace (unfortunately from jetty again but I  
do get it with tomcat as well) from a recent attempt on 1.1.


## Trade configuration update. Current config:

RunTimeMode:Direct
OrderProcessingMode:Synchronous
AcessMode:  Standard
Workload Mix:   Standard
Web Interface:  JSP
CachingType:No Caching
#Trade  Users:  10
#Trade Quotes:  10
Long Run Enabled:   true

10:47:43,984 ERROR [Log] Error: TradeDirect:login -- error logging  
in user

java.lang.NullPointerException
java.lang.NullPointerException
at  
org.apache.geronimo.samples.daytrader.util.FinancialUtils.computeGainP 
ercent(FinancialUtils.java:43)
at  
org.apache.geronimo.samples.daytrader.MarketSummaryDataBean .init 
(MarketSummaryDataBean.java:54)
at  
org.apache.geronimo.samples.daytrader.direct.TradeDirect.getMarketSumm 
ary(TradeDirect.java:152)
at  
org.apache.geronimo.samples.daytrader.TradeAction.getMarketSummary  
(TradeAction.java:100)
at jsp.marketSummary_jsp._jspService(marketSummary_jsp.java: 
55)
at org.apache.jasper.runtime.HttpJspBase.service 
(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service (HttpServlet.java: 
688)
at org.mortbay.jetty.servlet.ServletHolder.handle 
(ServletHolder.java:428)
at org.apache.geronimo.jetty.JettyServletHolder.handle 
(JettyServletHolder.java:97)
at org.mortbay.jetty.servlet.WebApplicationHandler 
$CachedChain.doFilter (WebApplicationHandler.java:830)
at org.mortbay.jetty.servlet.JSR154Filter.doFilter 
(JSR154Filter.java:170)
at org.mortbay.jetty.servlet.WebApplicationHandler 
$CachedChain.doFilter(WebApplicationHandler.java :821)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch 
(WebApplicationHandler.java:471)
at  
org.apache.geronimo.jetty.JettyWebApplicationHandler.dispatch 
(JettyWebApplicationHandler.java:58)
at org.mortbay.jetty.servlet.Dispatcher.dispatch 
(Dispatcher.java:283)
at 

Re: [jira] Commented: (GERONIMO-1674) Daytrader gets NullPointerException attempting to log in a user

2006-06-28 Thread J. Stan Cox


So, at the very least the code needs to be fixed to support a smaller 
quote population.  Perhaps we could also provide 2 basic settings on the 
configuration page:


1) Default, out of box sample application (low number of users quotes)
2) Performance test,  larger default values (e.g. 1000 quotes, 500 users)

It would be good to settle on specific values for performance testing so 
results will be comparable.


Stan.

Dain Sundstrom wrote:

Chris,

DayTrader has two uses to us.  One is clearly as a performance 
benchmark, but DayTrader is also a very useful sample (test) 
application that touches most parts of the J2EE specification.  We 
dropped the default population sizes because Derby is so slow at 
inserts it would take several minutes to repopulate.  Also, the 
performance of Derby is so bad that you don't need much data to get 
reliable results.  If you switch to a real database, you need a much 
bigger data set.


-dain

On Jun 28, 2006, at 7:56 AM, Christopher Blythe wrote:


Joe...

I've worked on Trade for quite some time and am slowly starting to 
dig into DayTrader. Anyway, just wanted to respond to your question 
since I think I know what the problem is.


In order for the MarketSummary to be display, at least 200 quotes 
need to be populated in the database. If you look at the queries the 
MarketSummary uses (either the EJBQL or SQL in TradeDirect.java) you 
will see something like this...


ejb-qlSELECT OBJECT(q) FROM Quote q WHERE q.symbol LIKE 's:1__' 
ORDER BY q.change DESC/ejb-ql


This indicates that the MarketSummary needs quotes between 100 and 
199. If we are only populating 10 quotes by default, this query will 
return 0 results and I imagine the MarketSummary will throw an 
exception (as indicated by the stack traces).


To get you up and running, I would re-populate your database with at 
least 200 quotes. The default for Trade was actually 1000.


I also suggest that the default be changed from 10 to something more 
realistic for performance testing ( i.e. 1000 or even higher).


Hope this helps...

Chris Blythe

On 6/27/06, Joe Bohn (JIRA) dev@geronimo.apache.org  wrote:[ 
http://issues.apache.org/jira/browse/GERONIMO-1674?page=comments#action_12418036 
]


Joe Bohn commented on GERONIMO-1674:


I still get this error.  I get it with tomcat as well as jetty.   I 
think I may very well be doing something wrong.  Here is my scenario 
after successfully deploying daytrader.


1)  select configuration-configure Daytrader runtime paramenters 
...  and change the max users and max quotes to 10 each.   Note, I'm 
not really running daytrader for performance stats ... I was just 
using it to verify geronimo functions after making some substantial 
changes as a way to verify that I hadn't broken things too radically.
2)  from confirguration select (Re)-populate Daytrader Database.  
This appears to be successful.
3)  Next, from under Configuration utilities I select Test DayTrader 
Scenario and I get this attached exception.   It does seem strange 
that if I do this a number of time eventually things seem to start 
working.


Here is another stack trace (unfortunately from jetty again but I do 
get it with tomcat as well) from a recent attempt on 1.1.


## Trade configuration update. Current config:

RunTimeMode:Direct
OrderProcessingMode:Synchronous
AcessMode:  Standard
Workload Mix:   Standard
Web Interface:  JSP
CachingType:No Caching
#Trade  Users:  10
#Trade Quotes:  10
Long Run Enabled:   true

10:47:43,984 ERROR [Log] Error: TradeDirect:login -- error logging in 
user

java.lang.NullPointerException
java.lang.NullPointerException
at 
org.apache.geronimo.samples.daytrader.util.FinancialUtils.computeGainPercent(FinancialUtils.java:43) 

at 
org.apache.geronimo.samples.daytrader.MarketSummaryDataBean 
.init(MarketSummaryDataBean.java:54)
at 
org.apache.geronimo.samples.daytrader.direct.TradeDirect.getMarketSummary(TradeDirect.java:152) 

at 
org.apache.geronimo.samples.daytrader.TradeAction.getMarketSummary 
(TradeAction.java:100)

at jsp.marketSummary_jsp._jspService(marketSummary_jsp.java:55)
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

at javax.servlet.http.HttpServlet.service (HttpServlet.java:688)
at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at 
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:97) 

at 
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter 
(WebApplicationHandler.java:830)
at 
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:170)
at 

Re: [jira] Commented: (GERONIMO-1674) Daytrader gets NullPointerException attempting to log in a user

2006-06-28 Thread Matt Hogstrom



J. Stan Cox wrote:


So, at the very least the code needs to be fixed to support a smaller 
quote population.  Perhaps we could also provide 2 basic settings on the 
configuration page:


1) Default, out of box sample application (low number of users quotes)


Agreed...200 users and 400 quotes is acceptable for our internal testing and those using Derby.  I 
think this is a fair number to kick the tires.



2) Performance test,  larger default values (e.g. 1000 quotes, 500 users)


Performance testing is so dependent on the configuration being tested I think we're better to offer 
guidance in a FAQ rather than specifying a value.   I'd never recommend people simply compare 
numbers based on population.   I think that is inviting trouble.




It would be good to settle on specific values for performance testing so 
results will be comparable.


Stan.

Dain Sundstrom wrote:

Chris,

DayTrader has two uses to us.  One is clearly as a performance 
benchmark, but DayTrader is also a very useful sample (test) 
application that touches most parts of the J2EE specification.  We 
dropped the default population sizes because Derby is so slow at 
inserts it would take several minutes to repopulate.  Also, the 
performance of Derby is so bad that you don't need much data to get 
reliable results.  If you switch to a real database, you need a much 
bigger data set.


-dain

On Jun 28, 2006, at 7:56 AM, Christopher Blythe wrote:


Joe...

I've worked on Trade for quite some time and am slowly starting to 
dig into DayTrader. Anyway, just wanted to respond to your question 
since I think I know what the problem is.


In order for the MarketSummary to be display, at least 200 quotes 
need to be populated in the database. If you look at the queries the 
MarketSummary uses (either the EJBQL or SQL in TradeDirect.java) you 
will see something like this...


ejb-qlSELECT OBJECT(q) FROM Quote q WHERE q.symbol LIKE 's:1__' 
ORDER BY q.change DESC/ejb-ql


This indicates that the MarketSummary needs quotes between 100 and 
199. If we are only populating 10 quotes by default, this query will 
return 0 results and I imagine the MarketSummary will throw an 
exception (as indicated by the stack traces).


To get you up and running, I would re-populate your database with at 
least 200 quotes. The default for Trade was actually 1000.


I also suggest that the default be changed from 10 to something more 
realistic for performance testing ( i.e. 1000 or even higher).


Hope this helps...

Chris Blythe

On 6/27/06, Joe Bohn (JIRA) dev@geronimo.apache.org  wrote:[ 
http://issues.apache.org/jira/browse/GERONIMO-1674?page=comments#action_12418036 
]


Joe Bohn commented on GERONIMO-1674:


I still get this error.  I get it with tomcat as well as jetty.   I 
think I may very well be doing something wrong.  Here is my scenario 
after successfully deploying daytrader.


1)  select configuration-configure Daytrader runtime paramenters 
...  and change the max users and max quotes to 10 each.   Note, I'm 
not really running daytrader for performance stats ... I was just 
using it to verify geronimo functions after making some substantial 
changes as a way to verify that I hadn't broken things too radically.
2)  from confirguration select (Re)-populate Daytrader Database.  
This appears to be successful.
3)  Next, from under Configuration utilities I select Test DayTrader 
Scenario and I get this attached exception.   It does seem strange 
that if I do this a number of time eventually things seem to start 
working.


Here is another stack trace (unfortunately from jetty again but I do 
get it with tomcat as well) from a recent attempt on 1.1.


## Trade configuration update. Current config:

RunTimeMode:Direct
OrderProcessingMode:Synchronous
AcessMode:  Standard
Workload Mix:   Standard
Web Interface:  JSP
CachingType:No Caching
#Trade  Users:  10
#Trade Quotes:  10
Long Run Enabled:   true

10:47:43,984 ERROR [Log] Error: TradeDirect:login -- error logging in 
user

java.lang.NullPointerException
java.lang.NullPointerException
at 
org.apache.geronimo.samples.daytrader.util.FinancialUtils.computeGainPercent(FinancialUtils.java:43) 

at 
org.apache.geronimo.samples.daytrader.MarketSummaryDataBean 
.init(MarketSummaryDataBean.java:54)
at 
org.apache.geronimo.samples.daytrader.direct.TradeDirect.getMarketSummary(TradeDirect.java:152) 

at 
org.apache.geronimo.samples.daytrader.TradeAction.getMarketSummary 
(TradeAction.java:100)

at jsp.marketSummary_jsp._jspService(marketSummary_jsp.java:55)
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

at javax.servlet.http.HttpServlet.service 

[jira] Commented: (GERONIMO-1674) Daytrader gets NullPointerException attempting to log in a user

2006-06-28 Thread Matt Hogstrom (JIRA)
[ 
http://issues.apache.org/jira/browse/GERONIMO-1674?page=comments#action_12418287
 ] 

Matt Hogstrom commented on GERONIMO-1674:
-

Updated User default from 50 and quotes of 100 to users 200 and quotes 400.  

This circumvents the problem for the initial install.

Remaining the MarketSummary.jsp needs to be updated to not throw and NPE.

SendingWEB-INF/web.xml
Transmitting file data .
Committed revision 417832.


 Daytrader gets NullPointerException attempting to log in a user
 ---

  Key: GERONIMO-1674
  URL: http://issues.apache.org/jira/browse/GERONIMO-1674
  Project: Geronimo
 Type: Bug
 Security: public(Regular issues) 
   Components: sample apps
 Versions: 1.x
  Environment: Windows XP
 Reporter: Joe Bohn


 Daytrader gets the following NPE exception when attempting to signon:
 13:47:05,510 ERROR [Log] Error: TradeDirect:login -- error logging in user
 java.lang.NullPointerException
 java.lang.NullPointerException
 at 
 org.apache.geronimo.samples.daytrader.util.FinancialUtils.computeGainPercent(FinancialUtils.java:43)
 at 
 org.apache.geronimo.samples.daytrader.MarketSummaryDataBean.init(MarketSummaryDataBean.java:54)
 at 
 org.apache.geronimo.samples.daytrader.direct.TradeDirect.getMarketSummary(TradeDirect.java:151)
 at 
 org.apache.geronimo.samples.daytrader.TradeAction.getMarketSummary(TradeAction.java:99)
 at 
 org.apache.jsp.marketSummary_jsp._jspService(org.apache.jsp.marketSummary_jsp:56)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
 at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
 at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
 at 
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
 at 
 org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:99)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
 at 
 org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:170)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
 at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:283)
 at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:163)
 at 
 org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
 at 
 org.apache.jsp.tradehome_jsp._jspService(org.apache.jsp.tradehome_jsp:282)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
 at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
 at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
 at 
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
 at 
 org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:99)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
 at 
 org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:170)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
 at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:283)
 at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:163)
 at 
 org.apache.geronimo.samples.daytrader.web.TradeServletAction.requestDispatch(TradeServletAction.java:730)
 at 
 org.apache.geronimo.samples.daytrader.web.TradeServletAction.doHome(TradeServletAction.java:319)
 at 
 org.apache.geronimo.samples.daytrader.web.TradeServletAction.doLogin(TradeServletAction.java:357)
 at 
 org.apache.geronimo.samples.daytrader.web.TradeAppServlet.performTask(TradeAppServlet.java:132)
 at 
 org.apache.geronimo.samples.daytrader.web.TradeAppServlet.doPost(TradeAppServlet.java:94)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
   

[jira] Commented: (GERONIMO-1674) Daytrader gets NullPointerException attempting to log in a user

2006-06-27 Thread Joe Bohn (JIRA)
[ 
http://issues.apache.org/jira/browse/GERONIMO-1674?page=comments#action_12418036
 ] 

Joe Bohn commented on GERONIMO-1674:


I still get this error.  I get it with tomcat as well as jetty.   I think I may 
very well be doing something wrong.  Here is my scenario after successfully 
deploying daytrader.

1)  select configuration-configure Daytrader runtime paramenters ...  and 
change the max users and max quotes to 10 each.   Note, I'm not really running 
daytrader for performance stats ... I was just using it to verify geronimo 
functions after making some substantial changes as a way to verify that I 
hadn't broken things too radically.
2)  from confirguration select (Re)-populate Daytrader Database.  This appears 
to be successful.
3)  Next, from under Configuration utilities I select Test DayTrader Scenario 
and I get this attached exception.   It does seem strange that if I do this a 
number of time eventually things seem to start working.

Here is another stack trace (unfortunately from jetty again but I do get it 
with tomcat as well) from a recent attempt on 1.1.

## Trade configuration update. Current config:

RunTimeMode:Direct
OrderProcessingMode:Synchronous
AcessMode:  Standard
Workload Mix:   Standard
Web Interface:  JSP
CachingType:No Caching
#Trade  Users:  10
#Trade Quotes:  10
Long Run Enabled:   true

10:47:43,984 ERROR [Log] Error: TradeDirect:login -- error logging in user
java.lang.NullPointerException
java.lang.NullPointerException
at 
org.apache.geronimo.samples.daytrader.util.FinancialUtils.computeGainPercent(FinancialUtils.java:43)
at 
org.apache.geronimo.samples.daytrader.MarketSummaryDataBean.init(MarketSummaryDataBean.java:54)
at 
org.apache.geronimo.samples.daytrader.direct.TradeDirect.getMarketSummary(TradeDirect.java:152)
at 
org.apache.geronimo.samples.daytrader.TradeAction.getMarketSummary(TradeAction.java:100)
at jsp.marketSummary_jsp._jspService(marketSummary_jsp.java:55)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at 
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:97)
at 
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
at 
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:170)
at 
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
at 
org.apache.geronimo.jetty.JettyWebApplicationHandler.dispatch(JettyWebApplicationHandler.java:58)
at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:283)
at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:163)
at 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at jsp.tradehome_jsp._jspService(tradehome_jsp.java:151)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at 
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:97)
at 
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
at 
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:170)
at 
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
at 
org.apache.geronimo.jetty.JettyWebApplicationHandler.dispatch(JettyWebApplicationHandler.java:58)
at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:283)
at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:163)
at 
org.apache.geronimo.samples.daytrader.web.TradeServletAction.requestDispatch(TradeServletAction.java:730)
at 
org.apache.geronimo.samples.daytrader.web.TradeServletAction.doHome(TradeServletAction.java:330)
at 
org.apache.geronimo.samples.daytrader.web.TradeServletAction.doLogin(TradeServletAction.java:373)
at 
org.apache.geronimo.samples.daytrader.web.TradeAppServlet.performTask(TradeAppServlet.java:127)
at 
org.apache.geronimo.samples.daytrader.web.TradeAppServlet.doGet(TradeAppServlet.java:78)
at 

[jira] Commented: (GERONIMO-1674) Daytrader gets NullPointerException attempting to log in a user

2006-06-02 Thread Bryan Noll (JIRA)
[ 
http://issues.apache.org/jira/browse/GERONIMO-1674?page=comments#action_12414459
 ] 

Bryan Noll commented on GERONIMO-1674:
--

Can you please give some specifics on what exact action you are taking in the 
gui to get this to occur?  Are you running a scenario?  I ask because I've 
sucessfully run scenarios, which logs a user in.  I did it with a Tomcat 
assembly on a recent 1.1 SNAPSHOT, and I see by your stacktrace that you were 
doing it with Jetty.  If you can tell me exactly what you're doing, I'll try 
that in the Tomcat assembly to see if I have the same issue.

 Daytrader gets NullPointerException attempting to log in a user
 ---

  Key: GERONIMO-1674
  URL: http://issues.apache.org/jira/browse/GERONIMO-1674
  Project: Geronimo
 Type: Bug
 Security: public(Regular issues) 
   Components: sample apps
 Versions: 1.x
  Environment: Windows XP
 Reporter: Joe Bohn


 Daytrader gets the following NPE exception when attempting to signon:
 13:47:05,510 ERROR [Log] Error: TradeDirect:login -- error logging in user
 java.lang.NullPointerException
 java.lang.NullPointerException
 at 
 org.apache.geronimo.samples.daytrader.util.FinancialUtils.computeGainPercent(FinancialUtils.java:43)
 at 
 org.apache.geronimo.samples.daytrader.MarketSummaryDataBean.init(MarketSummaryDataBean.java:54)
 at 
 org.apache.geronimo.samples.daytrader.direct.TradeDirect.getMarketSummary(TradeDirect.java:151)
 at 
 org.apache.geronimo.samples.daytrader.TradeAction.getMarketSummary(TradeAction.java:99)
 at 
 org.apache.jsp.marketSummary_jsp._jspService(org.apache.jsp.marketSummary_jsp:56)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
 at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
 at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
 at 
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
 at 
 org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:99)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
 at 
 org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:170)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
 at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:283)
 at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:163)
 at 
 org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
 at 
 org.apache.jsp.tradehome_jsp._jspService(org.apache.jsp.tradehome_jsp:282)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
 at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
 at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
 at 
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
 at 
 org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:99)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
 at 
 org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:170)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
 at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:283)
 at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:163)
 at 
 org.apache.geronimo.samples.daytrader.web.TradeServletAction.requestDispatch(TradeServletAction.java:730)
 at 
 org.apache.geronimo.samples.daytrader.web.TradeServletAction.doHome(TradeServletAction.java:319)
 at 
 org.apache.geronimo.samples.daytrader.web.TradeServletAction.doLogin(TradeServletAction.java:357)
 at 
 org.apache.geronimo.samples.daytrader.web.TradeAppServlet.performTask(TradeAppServlet.java:132)
 at 
 org.apache.geronimo.samples.daytrader.web.TradeAppServlet.doPost(TradeAppServlet.java:94)
 

[jira] Commented: (GERONIMO-1674) Daytrader gets NullPointerException attempting to log in a user

2006-06-02 Thread Kevan Miller (JIRA)
[ 
http://issues.apache.org/jira/browse/GERONIMO-1674?page=comments#action_12414470
 ] 

Kevan Miller commented on GERONIMO-1674:


I recall getting an NPE if I forgot to initialize Daytrader (create the DB, 
setup the users, # of issues, etc). I believe some of this behavior has 
changed. So, it's quite possible that the problem no longer exists. I don't 
know if Joe's problem is the same as the one I saw...

 Daytrader gets NullPointerException attempting to log in a user
 ---

  Key: GERONIMO-1674
  URL: http://issues.apache.org/jira/browse/GERONIMO-1674
  Project: Geronimo
 Type: Bug
 Security: public(Regular issues) 
   Components: sample apps
 Versions: 1.x
  Environment: Windows XP
 Reporter: Joe Bohn


 Daytrader gets the following NPE exception when attempting to signon:
 13:47:05,510 ERROR [Log] Error: TradeDirect:login -- error logging in user
 java.lang.NullPointerException
 java.lang.NullPointerException
 at 
 org.apache.geronimo.samples.daytrader.util.FinancialUtils.computeGainPercent(FinancialUtils.java:43)
 at 
 org.apache.geronimo.samples.daytrader.MarketSummaryDataBean.init(MarketSummaryDataBean.java:54)
 at 
 org.apache.geronimo.samples.daytrader.direct.TradeDirect.getMarketSummary(TradeDirect.java:151)
 at 
 org.apache.geronimo.samples.daytrader.TradeAction.getMarketSummary(TradeAction.java:99)
 at 
 org.apache.jsp.marketSummary_jsp._jspService(org.apache.jsp.marketSummary_jsp:56)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
 at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
 at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
 at 
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
 at 
 org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:99)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
 at 
 org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:170)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
 at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:283)
 at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:163)
 at 
 org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
 at 
 org.apache.jsp.tradehome_jsp._jspService(org.apache.jsp.tradehome_jsp:282)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
 at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
 at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
 at 
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
 at 
 org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:99)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
 at 
 org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:170)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
 at 
 org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
 at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:283)
 at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:163)
 at 
 org.apache.geronimo.samples.daytrader.web.TradeServletAction.requestDispatch(TradeServletAction.java:730)
 at 
 org.apache.geronimo.samples.daytrader.web.TradeServletAction.doHome(TradeServletAction.java:319)
 at 
 org.apache.geronimo.samples.daytrader.web.TradeServletAction.doLogin(TradeServletAction.java:357)
 at 
 org.apache.geronimo.samples.daytrader.web.TradeAppServlet.performTask(TradeAppServlet.java:132)
 at 
 org.apache.geronimo.samples.daytrader.web.TradeAppServlet.doPost(TradeAppServlet.java:94)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
 at