vaithee sub

Greenhorn
+ Follow
since Mar 12, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by vaithee sub

We have two batch jobs that are invoked concurrently at times in each of the cluster that do the same thing. We would like to ensure that only one of them id running at any given time.
Everytiem the job runs it creates an entry in the database logging in the timestamp it started running. The table has a running sequence# as a primary key. So what we see when the jobs run concurrently is 2 records with the same start timestamp. We are using EJB CMT on each of the nodes.
I would like to know how to ensure that one of them runs at any given time and the other one gracefully exits. I assume that the way to control is at the database level as they are concurrently trying to insert a record in the database. I assume that the solution will be using a combination of isolation level setting and pessimistic locking.
We are using Websphere 6.1 and UDB.
Thanks,
Vaithee
How do I perform Group Validations in h:datatable using custom Validators
For instance lets say I have a data table containing one column containing values of States (NY,NJ...).
In my custom Validator, I want to ensure that the state code does not repeat in any of the rows.

In the validator how do I get the ids for all the state codes to find the value in each of the component?

<h:dataTable id="tableEx1" value="#{careerDisplayBean.stateBarAdmissions}"
var="varstateBarAdmissions">
<h:column>
<h:inputText value="varstateBarAdmissions.stateCode" id="cd">
<h:validator validatorID="stateCodeValidator"/>
</h:inputText
</h:column
</h:dataTable
16 years ago
JSF
You may use Integer type to add int values.
You may create a list of SelectItems with value as Integer & Label as String. You don't have to do any conversion then. The default conversion for Integer should handle this case. Moreover, the value for SelectItem should only be an Object and not a String.
16 years ago
JSF
Hi,
My Faces managed bean is Session scoped and the properties are as List & Map.
I am using hx:dataTableEx to iterage over a property this is declared as follows
List<Map<String, List<CareerDescrAtomicType>>> practiceAreaList;

I am able to iterate over the property and display the value. But when I submit the form, it throws an Exception saying cannot test property property name in bean type null. There seems to be an issue setting properties of Map.

Code snippet

<hx:dataTableEx id="tableEx2"
value="#{careerDisplayBean.practiceAreaList}" var="varpracticeArea"
styleClass="dataTableEx" headerClass="dataTableHeaderClass"
footerClass="footerClass" rowClasses="oddRowClass, evenRowClass"
columnClasses="dataValueColumnClass,dataValueColumnClass"
cellpadding="2" cellpadding="0" rules="all" border="0">
<hx:columnEx id="columnEx2a" width="60%">
<f:facet name="header">
<h:outputText styleClass="outputText" value="Practice Area"
id="header2a"></h:outputText>
</f:facet>
<h:outputText id="textSpecialty"
value='#{practiceAreaList.paMapvarpracticeArea\"401\"http://0.practiceArea}'
rendered="#{!sessionScope.isEditable}">
</h:outputText>

<h:panelGroup id="paIDPG">
<h:selectOneMenu id="pa" styleClass="selectOneMenu"
value='#{varpracticeArea\"401\"[0].practiceArea}'
rendered="#{sessionScope.isEditable}">
<f:selectItems value="#{practiceAreaList.paList}" />
</h:selectOneMenu>
<h:message for="pa" errorClass="errorMessageStyleClass"
fatalClass="errorMessageStyleClass"></h:message>
</h:panelGroup>

</hx:columnEx>

<hx:columnEx id="columnEx2b" width="40%">
<f:facet name="header">
<h:outputText styleClass="outputText" value="% of Your Time"
id="header2b"></h:outputText>
</f:facet>
<h:outputText id="textPercentage"
value='#{varpracticeArea\"401\"[0].estimatedAmount}'
rendered="#{!sessionScope.isEditable}">
</h:outputText>
<h:panelGroup id="paValuePG">
<h:inputText id="estimatedAmount"
value='#{varpracticeArea\"401\"[0].estimatedAmount}'
rendered="#{sessionScope.isEditable}"
styleClass="inputText">
</h:inputText>
<h:message for="estimatedAmount"
errorClass="errorMessageStyleClass"
fatalClass="errorMessageStyleClass"></h:message>
</h:panelGroup>
</hx:columnEx>
</hx:dataTableEx>
To be precise, I get the following error when I submit the form
javax.faces.el.PropertyNotFoundException: Error testing property 'practiceArea' in bean of type null
at com.sun.faces.el.PropertyResolverImpl.getType(PropertyResolverImpl.java:343)
at com.ibm.faces.databind.SelectItemsPropResolver.getType(SelectItemsPropResolver.java:107)
at com.sun.faces.el.impl.ArraySuffix.getType(ArraySuffix.java:240)
at com.sun.faces.el.impl.ComplexValue.getType(ComplexValue.java:208)
at com.sun.faces.el.ValueBindingImpl.getType(ValueBindingImpl.java:292)
16 years ago
JSF
Hi Darryl,
You are right. It is just the rad that is giving error. When I actually publish it to server (with error), it seems to running fine without eny runtime errors. Thanks for the clarification.
16 years ago
JSF
I am using IBM implementation of jsf.
When I nest the h:input tag inside the h:panelGroup which is nested inside h:form tag, I get a compile time error that h:input should be inside h:form tag. Is there a way of getting it to work? I want to throw a h:panelGroup tag inside h:inputText for implemnenting ajax style validation.

<h:form>
<h:panelGroup>
<h:inputText id="test" value="#{myBean.value}"/>
</h:panelGroup>
</h:form>
Any help will be appreciated.
16 years ago
JSF
I was able to resolve the issue. It looks like hx:pagerDeluxe works for session scoped list only and does not work if the list is reloaded everytime on page refresh.
16 years ago
JSF
I don't see any Java Script error in my page.
16 years ago
JSF
I am using ibm jsf package that came with rad 7 for my application.
I am not able to get the hx:pagerDeluxe to work. When I set max rows to 20, I see the pagination option in the page with correct number of pages. When I click on next/last buttons though, I get the see the same first 20 records only and it stays at Page 1. Do I have to do something in my backing bean to enable paging?

<hx:dataTableEx id="tableEx1"
value="#{requestScope.practiceAreaList4Update.practiceAreas}"
var="varpracticeArea" styleClass="dataTableEx"
headerClass="dataTableHeaderClass" footerClass="footerClass"
rowClasses="oddRowClass, evenRowClass"
columnClasses="dataValueColumnClass,dataValueColumnClass,dataValueColumnClass,dataValueColumnClass,dataValueColumnClass,dataValueColumnClass,dataValueColumnClass"
cellpadding="2" cellpadding="0" rules="all" border="0"
scrollSize="10%" rows="20">

<f:facet name="footer">
<hx:panelBox id="box1" styleClass="panelBox">
<hx:pagerDeluxe id="deluxe1" styleClass="pagerDeluxe" />
</hx:panelBox>
</f:facet>
16 years ago
JSF
I figured out what the problem is. The problem was that JSReouruce Servlet has a url .ibmjsfres/* and siteminder did not allow that. The issue was fixed once we added this as an exception.
Just to give you a backfround, the classes in ibm-faces.jar converts the tag to html tag lib and java script. So the html source code looks like this
<script type="text/JavaScript" language="JavaScript" src="/edcrslftpa/.ibmjsfres/hxclient_v1.js"></script>
<script type="text/JavaScript" language="JavaScript">
So the url ="/edcrslftpa/.ibmjsfres/hxclient_v1.js should be accessable and permitted inorder to display the calender.
17 years ago
JSF
Hello,
I am using the inputHelperDatePicker component in my application deployed to WAS 5.1. I get a hava script error which says hX_1 is undefined and the calender icon does not show up. On research, I found that the hx_1 is the java script reference to the calender object.I don't know how to fix this error. Help on this will be greatly appreciated.
17 years ago
JSF
Hi All,
We are in the process of using SUN JRE for running applets on client's internet explorer (version 6.0) as Microsoft would not extend its support for MS JVM after the end of this year. I am using classid and codebase in the object tag to enforce the jdk version 1.5.0.
There seems to be an issue in Applet Activation. By applet activation I mean the java script code needed to rewrite the applet tag inorder to activate it.
Reference:
http://www.rgagnon.com/javadetails/java-0526.html
Also, I am using netscape.javascript package for event handling and applet to java script communication.
The issue with sun jvm is as follows.
When the applet is rewritten, the applet's reference to the window containing it (The html/jsp page) is lost and hence, I am not able to call the java scripts from Applet using netscape.javascript APIs.
To be more precise,
JSObject JSWin = JSObject.getWindow(this); fais or throws a run time exception.
This works fine if I remove the re-write applet java script function but the applets will be left un-activated untill user clicks it.
Can any of you throw a light on how to fix the issue. (i.e) rewrite the applet and at the same time be able to call java scripts from the applet using netscape.javascript using sun jre.
[ March 20, 2007: Message edited by: vaithee sub ]
17 years ago
hey supraja,
What did you mean by "not the correct file type"
18 years ago
We are facing problems when we try to upload file attachments. The system hangs when they do that. However the occurrence is sporadic.

we are using struts 1.1 api for file upload

Current Settings:

ConnectionIO Time out: 30 secs
env : websphere 5.1 fic pack 3

Flow

1. The document is uploaded from the jsp using html:file tag. The request on submission, gets delegated to struts Action class.
2. The action class does the following
2.1 gets the document meta data (file name, file type, timestamp etc) from FormFile object
2.2 filters to see if the filetype is acceptable(.doc, .pdf, .cvs, etc).
2.3 Retrieves the uploaded document from FormFile.
Problem:
The File upload action hangs and fails to delegate the request to the Action Class.
The appserver (via the input stream related code) is trying to read the posted data (file data). This read operation times-out and an error is thrown in the logs.
Any clues as to how to resolve this. Also, please find the stack trace
below.

[10/25/05 12:12:11:595 EDT] 716322f7 CommonsMultip E org.apache.struts.upload.CommonsMultipartRequestHandler Failed to parse multipart request
[10/25/05 12:12:11:612 EDT] 716322f7 CommonsMultip E org.apache.struts.upload.CommonsMultipartRequestHandler TRAS0014I: The following exception was logged org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Read timed out
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java(Compiled Code))
at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java(Compiled Code))
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java(Compiled Code))
at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java(Compiled Code))
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java(Compiled Code))
at org.apache.struts.action.ActionServlet.process(ActionServlet.java(Inlined Compiled Code))
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java(Compiled Code))
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
.
org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Read timed out
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java(Compiled Code))
at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java(Compiled Code))
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java(Compiled Code))
at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java(Compiled Code))
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java(Compiled Code))
at org.apache.struts.action.ActionServlet.process(ActionServlet.java(Inlined Compiled Code))
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java(Compiled Code))
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

[10/25/05 12:12:11:636 EDT] 716322f7 WebGroup E SRVE0026E: [Servlet Error]-[Processing of multipart/form-data request failed. Read timed out]: org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Read timed out
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java(Compiled Code))
at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java(Compiled Code))
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java(Compiled Code))
at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java(Compiled Code))
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java(Compiled Code))
at org.apache.struts.action.ActionServlet.process(ActionServlet.java(Inlined Compiled Code))
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java(Compiled Code))
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
18 years ago
Can I change the Appenders dynamically? In the sense I want a default appender all the time and at certain condition (not just fo various levels), I would like to change the Appender to write to a database for instance. In that case, Should I have to remove all appenders configured from config file, add the new Appender and then reset it back to the old appenders? Is there an easier way around it?
please advise.