Dynmically setting max bean count?
Hi,
With the applications we deploy we want to insure that the bean
pool and thread pool are inited at their maximum value. The only
thing is that depending on what machine we deploy the maximum
would not be the same, due to memory or processor constraints.
Currently we have to define these values manually. Is there any
way for us to write a plug-in to automatically set these values
based on an algorithm?
regards
Andre
Hello,
I think you can write a script that uses weblogic.Admin utility to automate this process after deploying your beans.
I can't remember if you can control the specific ejb properties you require, have a look at:
http://edocs.bea.com/wls/docs81/admin_ref/cli.html
Similar Messages
-
Setting max bean pool size in MDB
Hi,
I need to set the max bean pool size for my MDB to 1. This MDB is a part of my application and is packaged in an ear.
I tried to set it with the following annotation -
import javax.ejb.*;
@MessageDriven
(mappedName = "MyQueue",
name = "MyMDB",
activationConfig = {
@ActivationConfigProperty(propertyName="maxBeansInFreePool",
propertyValue="1"),
@ActivationConfigProperty(propertyName="initialBeansInFreePool",
propertyValue="1"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
However, this does not seem to work since I see the Current pool count on the WLS console as 3 after processing is done.
After looking at various posts in this forum, I also tried it with weblogic ejbgen as follows-
import weblogic.ejbgen.*;
@MessageDriven(ejbName = "MyMDB",
destinationType = "javax.jms.Queue",
initialBeansInFreePool = "1",
maxBeansInFreePool = "1",
destinationJndiName = "MyQueue")
However, with this the MDB did not get deployed in WLS.
I am using Weblogic 10.3 / EJB 3.0.
Any help on this is greatly appreciated.
Thanks
MeeraAs far as I know, it currently isn't possible to set max-beans-in-free-pool via annotations. You can use a deployment plan (configurable from console and/or follow the link supplied by atheek1).
I think you can also automatically generate descriptors based on javadoc text via ejb-gen, I'm not quite sure if this tooling can work in conjunction with EJB 3.0 annotations. See http://download.oracle.com/docs/cd/E12840_01/wls/docs103/ejb/EJBGen_reference.html
Tom -
Pagination disappears after setting 'max row count'
I have a report with app. 4500 records (with the default of 15 lines per page) and a pagination scheme of 'Row Ranges 1-15 16-30 in select list (with pagination)'.
When running the report, all is working fine and i get the information in the select list '.. of more than 500'.
Then i inserted some values in the 'max row count'-field:
a value of 2000: it's working as expected
a value of 4000 (or more): the pagination disappears and won't be desplayed :-(
Any ideas, what i have done wrong?
Thanks
RainerHi
This problem - select list dissapearing when > 32k still persists in Version 3.
A neat workaround is to use a page item to set the number of rows disaplyed.
Where there is a large number of rows in the table and the max rows is also large, simply set the page item value for the number of rows to a larger value say 200 - then - if the select list now becomes less than 32K the select list will be shown.
It's a matter of balancing the number of rows shown on the page with the total number of rows in the table / max rows combination.
It's not perfect but it works.
Hope this helps.
Mike Mac
Message was edited by:
Mike Mac -
Hello colleagues,
Probably you many know there is Max Query Count setting in MII.
Does any of you experience performance concerns by dealing with large number of query count? or does any of you have a recommendation for how to set max query count, e.g. not exceeding memory size to avoid memory swapping?
my customer want to increase this max count due to fluctuating record count. but they have concerns on such disadvantage in performance.
any of your experiences are welcome. Thank you,
Shiroh Kinoshita, SAP JapanShiroh,
Good to hear from you.
All queries have the RowCount setting, but we typically discourage people from just setting it to a high number. In some cases the data servers will limit this number to a max (something like 250000) but that doesn't mean that from a memory standpoint, or a customer patience level (especially in the browser) would ever get to that number of records.
Where is it that you are seeing the record count fluctuate, applets in the browser, query actions in a transaction?
What is it that makes the customer want to increase this to a high number?
Regards,
Jeremy -
Max-beans-in-cache, cachefullexception, outofmemory error
Hi,
I am trying to find the best way to find the numbers to be set in max-beans-in-cache
for entity beans. I have a stateless session bean through which I access the
entity beans. If I don't set any value for this property, in some query which
will return 2500 records, I get a cachefullexception and if I increase it and
set this property to say 5000, I get an outofmemory error.
I am not sure how to decide what value should be used.
Any help or suggestion would be greatly appreciated.
We are using WLS 7.0 on NT machines in a cluster.
Thanks,
JaideepIf you need to perform some sort of bulk processing then perhaps you
shouldn't be using
entity beans at all.
"Jaideep" <[email protected]> wrote in message
news:[email protected]..
>
unfortunately, for a specific functionality in our application we need toget that
many records. Now I am debating about changing the finder method so thatit returns
only 500 records at one time and then I can call it multiple number oftimes.
This may not be the best thing to do and we may take some kind of aperformance
hit also but it may avoid the cachefull and outofmemory problems.
Any suggestions or comments??
Thanks,
Jaideep
Rob Woollen <[email protected]> wrote:
First off, does what does the session bean or its caller do with the
2500 or 5000 records? i.e. do you really need to select that many.
Unfortunately there is no easy answer on how to set max-beans-in-cache.
It depends a lot on your memory, application, and load.
-- Rob
Jaideep wrote:
Hi,
I am trying to find the best way to find the numbers to be set in
max-beans-in-cache
for entity beans. I have a stateless session bean through which Iaccess the
entity beans. If I don't set any value for this property, in somequery which
will return 2500 records, I get a cachefullexception and if I increaseit and
set this property to say 5000, I get an outofmemory error.
I am not sure how to decide what value should be used.
Any help or suggestion would be greatly appreciated.
We are using WLS 7.0 on NT machines in a cluster.
Thanks,
Jaideep
Dimitri -
Hi ,
I have the following parameter set in weblogic-ejb-jar.xml for a statefulsession bean.
==================================================
stateful-session-cache>
<max-beans-in-cache>2</max-beans-in-cache>
<idle-timeout-seconds>600</idle-timeout-seconds>
</stateful-session-cache>
==================================================
I then create more than 2 requests(approx 10) to the stateful session bean for which the above parameter is set.
In EJB-MONITORING-Stateful Ejbs I have the following fields set from the customize view:
Activation Count
Passivation Count
Cache Access Count
Cache Miss Count
Cached Beans Current Count
EJB Name
My understanding is that no more than 2 beans should appear in the Cached Beans Current Count.If the request is sent from more than 2 browsers invoking the stateful bean I should get Invocation Target exception.
But upon sending requests from more than 2 browsers invoking the same session bean I see that :
count of Cached Beans Current Count = number of browsers/clients from where the request is coming.
There is no exception.
Kindly clarify my understanding.
ThanksHi,
if you give some number in <max-beans-in-cache>number</max-beans-in-cache>.Then Weblogic Server going to create that many number of objects initially .
In case of statefull SessionBeans, If you give 3 ,Then Server creates 3 objects for that bean to provide service to the 3 clients at a time .
Whenever it receives the 4 requests at a time then three request's will be served at a time and 4th request will wait until the server passivate any object out of 3 in some persistant storage and create the object for 4th client.
it will not throw any exception or error if we sent more than number of requests which we were mention in max-beans-in-cache.
----Anilkumar kari -
Max-beans-in-cache, cachefullException, outOfMemoryError
Hi,
I am trying to find the best way to find the numbers to be set in max-beans-in-cache
for entity beans. I have a stateless session bean through which I access the entity
beans. If I don't set any value for this property, in some query which will return
2500 records, I get a cachefullexception and if I increase it and set this property
to say 5000, I get an outofmemory error. I am not sure how to decide what value
should be used. Any help or suggestion would be greatly appreciated. We are using
WLS 7.0 on NT machines in a cluster.
I have already tried the maxPermSize option in the jvm. The max heap size is
set to 768m.
Thanks,
JaideepPlease reply only to the newsgroup.
If you are doing a find and then invoking on the bean, splitting the transaction into
multiple transactions that return smaller sets of beans is the only thing I can think of to
get around the problem.
If you are simply doing a find, but not invoking the beans, you could set finders-load-bean
to false in the EJB deployment descriptor to avoid loading the bean when the finder is
called. The bean will then be loaded and put into the cache only when it is invoked.
However, this setting affects all finders defined on the bean and if you have transactions
that do a find and invoke, performance could be lower if set to false.
Unless relationship-caching is turned on, related beans are not loaded when a finder is
invoked.
Arunabh
"Chadha, Jaideep" wrote:
Thanks Arunabh. I tried different values and came
up with the ones that suite our needs. Also the
cache size is restricted in a transaction, we can
split the transactions into multiple transactions
especially for read-only data. Do you think that
would be a good idea? I was also thinking if it
was possible to define the attribute for the
entity beans especially in case of relationships that
they get loaded in finders when I need them but for
some methods they don't get loaded in finders. And
when a getXXX is invoked that particular bean gets
loaded at that time.
It will be helpful, if you could let me know.
Thanks,
JaideepArunabh Hazarika wrote:
Increasing the max-beans-in-cache will always mean higher memory requirements. Afraid
there is no way around it except to increase the max heap size. You could try a new
feature in WLS 7.0 - application level caches. This is specified in the application
deployment descriptor rather than at the bean deployment descriptor. With this cache,
the cache size can be specified in terms of memory-size rather than an instance-count.
You can find out how to set this from:
http://e-docs.bea.com/wls/docs70/programming/app_xml.html (search for entity-cache)
This cache would be shared across all EJBs in the application. Also, note that this will
not prevent CacheFullExceptions from occuring, but would be more useful in avoiding
OutOfMemory errors. To avoid CacheFullExceptions without indefinitely increasing the
heap size, try to limit the number of beans loaded in a single transaction.
Hope this helps
Arunabh
Jaideep wrote:
Hi,
I am trying to find the best way to find the numbers to be set in max-beans-in-cache
for entity beans. I have a stateless session bean through which I access the entity
beans. If I don't set any value for this property, in some query which will return
2500 records, I get a cachefullexception and if I increase it and set this property
to say 5000, I get an outofmemory error. I am not sure how to decide what value
should be used. Any help or suggestion would be greatly appreciated. We are using
WLS 7.0 on NT machines in a cluster.
I have already tried the maxPermSize option in the jvm. The max heap size is
set to 768m.
Thanks,
Jaideep -
Max-beans-in-cache, transactions and passivation
WLS 6.1 sp4
database concurrency, oracle
I compute max-beans-in-cache as:
(max # fetched in a transaction) * (number of worker threads)
therefore if I think that a table with have at most 500 rows and the
server is configured with 20 worker threads I have 500 * 20 = 10000 as
my max-beans-in-cache.
In my test the table has 7 rows. In our load test I see the Beans In
Use Count go up to 9999 instances and then start passivation.
I have two questions:
1) What does 'Beans In Use Count' really mean
2) why is weblogic using much more memory than it should to store 7 unique entities?
thanksSee my comments below.
S
Chad Urso McDaniel <[email protected]> wrote:
>
I understand this, but WebLogic should either reuse objects in the
cache/pool or not cache them at all. There are cases where the objects in the cahce are used. For e.g. with entity
beans and Read-Only concurrancy, when cache-between-tx is set. However I noticed
this behavior for other cases too and therefore the caching is not all that intellegent.
Also the beans in the pool are reused.
The current situation results in
objects being allocated, referenced by the cache so they will never be
garbage collected, but the objects are never used again once their
transaction completes. This is very, very wasteful with memory.
In some cases as mentioned above.
S
"Sri" <[email protected]> writes:
Hi,
The reason for having so many entries is due to fact that there isno way WLS
would know there are only 7 rows in the db everytime an entity beanis created/modified/accessed.
For e.g., if you run a test where you do 'findAll' the first run wouldhave 7
beans and the next most likely (There is another parameter that youcould use
to control number of beans in the cache, idle-timeout-seconds. Thoughits not
clear from the doc how the entity beans are handled wrt this parameter,it might
passivate entity beans if this timeout occurs) 14 and so on. If thisis a overhead
for your system then reduce this number.
S
container start removing beans before Chad Urso McDaniel <[email protected]>
wrote:
WLS 6.1 sp4
database concurrency, oracle
I compute max-beans-in-cache as:
(max # fetched in a transaction) * (number of worker threads)
therefore if I think that a table with have at most 500 rows and the
server is configured with 20 worker threads I have 500 * 20 = 10000as
my max-beans-in-cache.
In my test the table has 7 rows. In our load test I see the BeansIn
Use Count go up to 9999 instances and then start passivation.
I have two questions:
1) What does 'Beans In Use Count' really mean
2) why is weblogic using much more memory than it should to store7 unique
entities?
thanks -
Max Beans in Cache causes NULL Pointer Exception
Hi All,
a rather weird event (from our perspective) occurs when we do the
following:
We have an entity bean set to max beans in cache 100 (default value of
our deployment tool ), the database table related to that bean holds
lets say 300 entries.
Doing a find all and in the same session bean instanciated transaction a
processing loop over the enumeration of beans we get an NULL Pointer
exception when accesing the 101 Bean. Neverthless the Weblogic server
increases the cache size automatically but obviously not fast enough and
not on time.
has anyone experienced the same problem and has a fix for it, appart
from increasing the cache size in the deployment descriptor ?
any help welcome
MichaelHi Michael.
Can you post the stack trace of the NullPointerException? Was it in
your code or ours? Also, what version of WebLogic are you using?
-- Rob
Rob Woollen
Software Engineer
BEA WebLogic
[email protected]
Michael Rupprecht wrote:
Hi All,
a rather weird event (from our perspective) occurs when we do the
following:
We have an entity bean set to max beans in cache 100 (default value of
our deployment tool ), the database table related to that bean holds
lets say 300 entries.
Doing a find all and in the same session bean instanciated transaction a
processing loop over the enumeration of beans we get an NULL Pointer
exception when accesing the 101 Bean. Neverthless the Weblogic server
increases the cache size automatically but obviously not fast enough and
not on time.
has anyone experienced the same problem and has a fix for it, appart
from increasing the cache size in the deployment descriptor ?
any help welcome
Michael -
HTML DB SQL Workshop Output to csv Max Row Count
I am using HTML DB 1.6 with Oracle 10g 10.1.0.3.0 On SuSE Linux Enterprise Server 9.
When I execute a query in SQL Workshop SQL Command Processor that returns a result set of greater than 5,000 rows and click the Output to Excel link, it exports NO MORE than 5,000 records.
In working through Metalink with Oracle Tech Support, apparently for Reports in HTML DB there is a way to change the Max Row Count default limitation of 5,0000. However, this isn't in a report. It is simply from the query results page in SQL Workshop. Tech Support has been unable to idnetify ANYWHERE where I can change the default Max Row Count for simply outputting the results to csv format through the Output to Excel link.
I am desperately looking for where I can globally change this default that will allow me to use SQL Worskshop to output greater than 5,000 records from within SQL Workshop.
Thanks for you help!
Mikehi mikes--
that sqlworkshop 5k row limit issue was corrected in htmldb 2.0. in 1.6.x, i'm pretty sure you're always limited to 5k no matter what you select for that Max Rows attribute.
regards,
raj -
Interactive report max row count
Is there a way to set IR max row count dynamically?
To improve performance, I would like to set this value to 200 when users run the report and set this value to 50000 when users download the report.A dirty solution to this could be , create IR report with rowum < 201 and then add a link to the region header for downloading report. Point this link to another page with the same sql query (classic report) and select the template as CSV.
Hope this helps.
Thanks,
Manish -
Can't View All Records if Max Row Count is null
Hi,
There are over 2500 records in a table and if Max Row Count is set to nothing in report attributes, the user is restricted to view only 500 records. And If Max Row Count is set more than 2500 then user is able to view all records but taking more time to display report.
What to do to minimise process time and allow user to view all the records. ?
Pagination Scheme : Row Ranges X to Y of Z (with pagination)
Number of Rows : 100
Number of Rows (Item) : <empty>
Max Row Count : <empty>
Thanks,
Ven.Hi Ven,
Apex restricts the number of rows returned by a report to 500 by default. You can change this by setting the Max Row Count. Apex does this so that the amount of data returned over the network to the browser is kept to a reasonable amount. The reason it is done this way is because a user in apex does not maintain a stateful connection to the database and as a result, rows returned from a query can not be cached in the database and fetched as required.
From a usability point of view, I'm not sure why a user would want 2500+ rows returned to a screen. They would have to scroll and paginate to find anything of use and network bandwidth would get chewed up in the process. Why not provide the users with query options so that the number rows returned to the browser is restricted to a more manageable amount? If the users require a full hardcopy of the data then you can handle this with csv and pdf options.
Regards
Andre -
how to set sessions beans as max-benas-inpool
like weblogic-jar.xml. how should i do in oc4j. in whihc xml file
i need to configure.
thanx in advance.
suriHi Suri,
I don't know how to do it, but there may be something available in the
"orion-ejb-jar.xml" file.
Documentation for this file can be found from the following URLs:
http://www.atlassian.com
http://www.orionserver.com
Good Luck,
Avi. -
APEX 3.1 Report pagination style limited by max row count
I am working on an application using APEX 3.1 and am having trouble keeping the report pagination style as a select list when the max row count for the report is greater than 8000. If I use the select list as the pagination method, the first time that the first page is viewed is fine however all subsequent pages begin to use the "next" and "previous" link method of pagination. This is only occurring when the max row count is higher than 8000 and a select list is used for pagination.
My question is: is the style of pagination, in Oracle APEX (3.1), limited by the potential number of rows returned for the report? If not, is this a bug with my version of Oracle APEX?The source of my problem was that the report referenced a page item for the number of rows. That select list referenced a named List of Values (LOV) that limited the number of rows that the report could display. I removed that reference and my problem disappeared!
-
Can't set managed bean property:
Hi,
I am trying to experiment with JSF and I am extending an example I downloaded from the web. When I added a new secret field and extened the bean. I get the following error. I trying to resolve this problem from two days , cant figure out why I get this exception. I tried changed the property name I still get the same error. It is something to do with the bean, I am not sure why its not able to set the property, I know that the get and set methods exist in the class file. Any help would be greatly appreciated . I have pasted the bean file, faces-config.xml, and the inputname.jsp file below. Thanks a lot.
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.faces.FacesException: javax.faces.FacesException: Can't set managed bean property: 'word'.
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:430)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:48)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:197)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
at java.lang.Thread.run(Thread.java:536)
root cause
javax.servlet.ServletException: javax.faces.FacesException: javax.faces.FacesException: Can't set managed bean property: 'word'.
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:531)
at org.apache.jsp.inputname_jsp._jspService(inputname_jsp.java:94)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:430)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:48)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:197)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
at java.lang.Thread.run(Thread.java:536)
My JSP file is
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<f:loadBundle basename="demo.bundle.Messages" var="Message"/>
<HTML>
<HEAD> <title>Input Name Page</title> </HEAD>
<body bgcolor="white">
<f:view>
<h1><h:outputText value="#{Message.inputname_header}"/></h1>
<h:messages style="color: red"/>
<h:form id="helloForm" >
<h:outputText value="#{Message.prompt}"/>
<h:inputText id="userName" value="#{GetNameBean.userName}" required="true">
<f:validateLength minimum="2" maximum="10"/>
</h:inputText>
<h:inputSecret id="word" value="#{GetNameBean.word}" required="true">
<f:validateLength minimum="2" maximum="10"/>
</h:inputSecret>
<h:commandButton id="submit" action="sayhello" value="Say Hello" />
</h:form>
</f:view>
</HTML>
My faces-config.xml is as follow
<?xml version="1.0"?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
<navigation-rule>
<from-view-id>/inputname.jsp</from-view-id>
<navigation-case>
<to-view-id>/greeting.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<managed-bean>
<description>
Input Value Holder
</description>
<managed-bean-name>GetNameBean</managed-bean-name>
<managed-bean-class>demo.GetNameBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>userName</property-name>
<property-class>java.lang.String</property-class>
<value></value>
</managed-property>
<managed-property>
<property-name>word</property-name>
<property-class>java.lang.String</property-class>
<value></value>
</managed-property>
</managed-bean>
</faces-config>
My bean file is as follows GetNameBean.java
package demo;
* @author Sergey Smirnov. Exadel, Inc.
public class GetNameBean {
private String userName;
private String word;
* @return User Name
public String getUserName() {
return userName;
* @param User Name
public void setUserName(String name) {
this.userName = name;
* @return Password
public String getWord() {
return word;
* @param Password
public void setWord(String word) {
this.word = word;Hello,
Thanks for the reply. I used Camelcase, but its giving me the same error. I am also posting my bean files and jsp files for your reference.
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: org.apache.jasper.JasperException: javax.faces.FacesException: javax.faces.FacesException: Can't set managed bean property: 'UserName'.
javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
javax.faces.FacesException: org.apache.jasper.JasperException: javax.faces.FacesException: javax.faces.FacesException: Can't set managed bean property: 'UserName'.
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:327)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
LOGIN.JSP file
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<f:view>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<f:verbatim escape="false">
<head>
<title>My JSP 'login.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
</f:verbatim>
<body>
<h:form rendered="true" id="loginform">
<f:verbatim escape="false"><br><br> </f:verbatim>
<h:outputLabel for="userName" rendered="true"></h:outputLabel>
<h:inputText id="userName" required="true" rendered="true" value="#{UserBean.userName}"></h:inputText>
<f:verbatim escape="false"><br> </f:verbatim>
<h:outputLabel for="password" rendered="true"></h:outputLabel>
<h:inputSecret id="password" redisplay="false" required="true" rendered="true" value="#{UserBean.password}"></h:inputSecret>
<h:commandButton id="submit" action="#{UserBean.loginUser}" rendered="true" value=" Submit"></h:commandButton><br><br></h:form>
</body>
</html>
</f:view>
UserBean file
package com.jsfdemo.bean;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
* @author ExterroAdmin
public final class UserBean extends Object
private String password;
private String userName;
public UserBean()
super();
public String getPassword()
return password;
public void setPassword(String password)
this.password = password;
public String getUserName()
return userName;
public void setUserName(String userName)
this.userName = userName;
public String loginUser() {
if("myeclipse".equals(getUserName()) && "myeclipse".equals(getPassword()))
return "success";
FacesContext facesContext = FacesContext.getCurrentInstance();
FacesMessage facesMessage = new FacesMessage(
"You have entered an invalid user name and/or password");
facesContext.addMessage("loginForm", facesMessage);
return "failure";
If you need any more information, please let me know
Maybe you are looking for
-
I hate the date file structure for iphoto. If I move to a programme which isn't iphoto, I cannot navigate through the date structure to find certain photos. Why is it when I name a photo in iphoto, the name does not show in the file structure. Is the
-
InCopy CS5- Unable to install InMath reader plugin
I am using InCopy CS5 7.0.4 and want to use InMath reader plugin along with it.I am not able to install the InMath Reader plugin to it. Though Indesign works fine with the plugin.Any known issue/resolution?
-
Broadcast safe filter for DVD - or no need?
I'm getting a bit confused here and hoping someone can help here I shoot with an EX camera and generally edit in 720 50p prores. My output is currently SD DVD and web. Do I need to put a broadcast safe filter on or will the process of turning it into
-
Not charging when connected to iTunes
Can anyone help, our 2nd generation iPod Shuffle stops charging (i.e. the orange light stops blinking) when iTunes comes on the computer. So as soon as I connect the shuffle it blinks orange but then when iTunes automatically comes on it stops. I h
-
ITunes Music Store Display Language
Hi all. This query is on behalf of my Brother who lives in Switzerland. He wants to set up an account with ITMS. Due to the way it works he has to set up an account with the Swiss Store, because his credit card and billing address are both Swiss. How