joshua asem

Greenhorn
+ Follow
since Aug 21, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by joshua asem

Thanks for the inputs so far.

Here is the Stack trace if it can help anything:
[11/24/10 17:26:16:652 GMT] 0000020c DealAssociate E com.dm.model.DealAssociatedService someMethod Exception caught at someMethod:
java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:462)
at java.util.AbstractList$Itr.next(AbstractList.java:433)
at com.dm.model.DealAssociatedService.someMethod(DealAssociatedService.java:761)
at com.dm.ui.AssociatedBean.getPerformanceDocs(AssociatedDocsBean.java:139)
at sun.reflect.GeneratedMethodAccessor666.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:62)
at java.lang.reflect.Method.invoke(Method.java:391)
at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:457)
at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:85)
at org.apache.myfaces.custom.security.SecurityContextPropertyResolver.getValue(SecurityContextPropertyResolver.java:101)
at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:156)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:137)
at javax.faces.component.UIData.getValue(UIData.java:527)
at org.apache.myfaces.component.html.ext.HtmlDataTableHack.createDataModel(HtmlDataTableHack.java:437)
at org.apache.myfaces.component.html.ext.HtmlDataTable.createDataModel(HtmlDataTable.java:847)
at org.apache.myfaces.component.html.ext.HtmlDataTableHack.getDataModel(HtmlDataTableHack.java:414)
at org.apache.myfaces.component.html.ext.HtmlDataTable.getDataModel(HtmlDataTable.java:839)
at org.apache.myfaces.component.html.ext.HtmlDataTableHack.getRowCount(HtmlDataTableHack.java:87)
at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:226)
at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:134)
at org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.encodeChildren(HtmlTableRenderer.java:187)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:743)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:414)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChildren(RendererUtils.java:400)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:417)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChildren(RendererUtils.java:400)
at org.apache.myfaces.renderkit.html.ext.HtmlGroupRenderer.encodeEnd(HtmlGroupRenderer.java:66)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:762)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:419)
at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:229)
at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:101)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:762)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:419)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChildren(RendererUtils.java:400)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:417)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChildren(RendererUtils.java:400)
at org.apache.myfaces.renderkit.html.ext.HtmlGroupRenderer.encodeEnd(HtmlGroupRenderer.java:66)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:762)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:419)
at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:229)
at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:101)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:762)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:419)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChildren(RendererUtils.java:400)
at org.apache.myfaces.renderkit.html.ext.HtmlGroupRenderer.encodeEnd(HtmlGroupRenderer.java:66)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:762)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:419)
at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:229)
at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:101)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:762)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:419)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChildren(RendererUtils.java:400)
at org.apache.myfaces.renderkit.html.ext.HtmlGroupRenderer.encodeEnd(HtmlGroupRenderer.java:66)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:762)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:419)
at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:229)
at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:101)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:762)
at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:611)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:534)
at org.apache.myfaces.shared_tomahawk.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:57)
at com.ibm._jsp._associatedDocs._jspx_meth_t_panelGrid_0(_associatedDocs.java:2277)
at com.ibm._jsp._associatedDocs._jspService(_associatedDocs.java:201)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1793)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1742)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:113)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:882)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:222)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:347)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:325)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:220)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1793)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1742)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:136)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
at com.cgi.dm.extworkplace.util.UTF8EncodingFilter.doFilter(UTF8EncodingFilter.java:25)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:882)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1937)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:120)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:434)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:373)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:101)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
12 years ago
if line 27, could you please let me know why is it so ?
line 27's associatedActionsDos is not iterating anywhere also while adding one item at it on line-27.
Thanks.
12 years ago
While running the following code snippet at some scenario, I got the java.util.ConcurrentModificationException exception.
Please advice: How to avoid it? what can be the worse scenario which ConcurrentModificationException can create? will it occupy the CPU Usage %? Any pointer would be great!!!


12 years ago
Hi,
I want to call a method when the page loads in JSF. Could anyone help me out for this without using javascript onload(). Thanks.
13 years ago
JSF
How does the rendered thing solved the problem? Can someone explain the details on this?
Just wondering if there is any way without calling <onload="test()">, to solve this requirement.
Can anyone give a pointer on this? Thanks.
13 years ago
JSF
Smitha. Thanks for the Reply.

The actual issue is I am trying to sort base on the <h:outputText value="#{item.name}"/>, but its actually sorted starting with param1=#{item.param1}¶m2=#{item.param2} as those are also dynamic values.

<t:column sortable="true">
<f:facet name="header">
<h:outputText value="Title"/>
</f:facet>

<h:outputLink value="http://mydomain.com/some.jsf?param1=#{item.param1}¶m2=#{item.param2}"
styleClass="linkBlack">
<h:outputText value="#{item.name}"/>
</h:outputLink>
</t:column>

13 years ago
JSF
I am using tomahawk's sorting feature using sort attribute for my datatable.

I found one issue while sorting on a hyperlink content in the column. I wanted to sort the table's column based on the title of the hyperlink, but it got sorted based on the whole hyperlink's tag's content also.

Example:
Is there any way that it can only sort based on the title "hashh" (but it got sorted with the whole content inside the generated output from <h:column> tag as hashh )?

Any pointer for the solution will be very much appreciated.

Regards,
Nish
13 years ago
JSF
Thanks for the reply. Any idea how normally this can be achieved without passing at the DataScoller component. Thanks.
13 years ago
JSF
I need to pass couple of request parameters while navigating "first","next","previous" pagination controls. These request parameters will be used at the managedBean to filter the Database Result.
Please suggest on this. Thanks.

Cheers,
Josh
13 years ago
JSF
An Unicode (UTF8 : right arrow ->) coming from database need to validate at my Java program and replacing it with "blank". Could some give some idea on this. Thanks in advance.

Joshua
13 years ago
HMM...

targetNamespace="http://somesite.com/BaseDataTypes"
AND
schemaLocation="http://somesite.com/BaseDataTypes.xsd"
should be same in the XSD file, So can't change with that.

Also these xsd and xml are third-party's files and I have only the Java program which need to tailored to fit those guys. And the given xsd and xml properly validates with the XMLSpy. I am wondering is there anything which can change the attributes in the above java program to fit those guys and validate properly. Still wondering
[ August 21, 2008: Message edited by: joshuaa ]
Need help in validating with the existing XML and existing XSD:
---------------------------------------------------------------

These are the entities used:
----------------------------
XSD FILE (mainInfo.xsd):
========================


XML File:
=========


ERROR MESSAGE:
==============
Error : cvc-elt.1: Cannot find the declaration of element 'mainTag'
IF I CHECK WITH FOLLOWING STARTING TAG IT WORKS PERFECTLY But following way we can't change from the thirdparty's XML:
=======================================
<mainTag xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://somesite.com/schemas/BaseDataTypes"
xsi:schemaLocation="http://somesite.com/schemas/BaseDataTypes http://somesite.com/schemas/mainInfo.xsd">

I USED THE FOLLOWING CODE FOR VALIDATING AGAINST THE XSD:
=========================================================

import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.w3c.dom.Document;
import org.xml.sax.SAXParseException;
import org.xml.sax.helpers.DefaultHandler;


public class DomValidator {
static final String schemaSource = "c:\\testProject\\mainInfo.xsd";

static final String xml_file = "c:\\testProject\\profile.xml";

static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";

static final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";

public static void main(String args[]) {


try {
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
factory.setNamespaceAware(true);
factory.setValidating(true);


factory.setAttribute(JAXP_SCHEMA_LANGUAGE,
"http://www.w3.org/2001/XMLSchema");
factory.setAttribute(JAXP_SCHEMA_SOURCE, new File(schemaSource));


DocumentBuilder domParser = factory.newDocumentBuilder();
// Set Error Handler
ErrorChecker errors = new ErrorChecker();
domParser.setErrorHandler(errors);

Document document = domParser.parse(new File(xml_file));
List errorList = errors.getErrors();
Iterator iter = errorList.iterator();
while (iter.hasNext()) {
String errroMessage = (String) iter.next();
System.out.println(errroMessage);
}
} catch (Exception e) {
e.printStackTrace();
}

}
}

// to capture the errors and warnings and the fatal errors occured

class ErrorChecker extends DefaultHandler

{
public ArrayList errorList = new ArrayList();

public ErrorChecker() {
}

public List getErrors() {
return errorList;
}

public void error(SAXParseException e) {
errorList.add("Error : " + e.getMessage() + " " + e.getPublicId() + " "
+ e.getSystemId());
}

public void warning(SAXParseException e) {
errorList.add("Warning : " + e.getMessage());
}

public void fatalError(SAXParseException e) {
errorList.add("Fatal error : " + e.getMessage());
System.exit(1);
}

}



It would be great if anyone can suggest me without changing the existing XML structure to validate properly by changing in My Java program. Or guide me to the right direction would be appreiciated.