Calling a method in a backing bean JDev10.3.1 ADFBC
Hi
How can I execute a method existing in a session bean (uses a parameter) from within a method in a request backing bean?
Thanks a lot in advance
AG
Maguri,
Here some example code demonstrating how to call on a session bean. Simply lookup the session bean and call the appropriate method on the bean. This code can called from within any method within in a managed bean.
Regards,
Ric
try {
final Context context = getInitialContext();
SessionEJB sessionEJB = (SessionEJB)context.lookup("SessionEJB");
System.out.println( "Departments before insert: " );
List<Departments> depts = sessionEJB.queryDepartmentsFindAll();
for ( Departments dept:depts ) {
System.out.println( "\tName: " + dept.getDepartmentName() + ", id= " + dept.getDepartmentId() );
Departments newDept = new Departments();
newDept.setDepartmentName( "Ric's 'Really Big' Department" );
sessionEJB.persistEntity(newDept);
System.out.println("\nDepartments after insert: ");
depts = sessionEJB.queryDepartmentsFindAll();
for ( Departments dept:depts ) {
System.out.println( "\tName: " + dept.getDepartmentName() + ", id= " + dept.getDepartmentId() );
} catch (Exception ex) {
ex.printStackTrace();
}
Similar Messages
-
Calling a method in the backing bean when rendering a table
I'm rendering a table that begins with :
<h:dataTable value="#{showRooms.rooms}" var="rowRoom" ...
There are several properties I'm displaying. Some are just displayed as they appear from the database like:
<h:outputText value="#{rowRoom.roomNumber}"/>
However, some I need to translate so they display a more meaningful message to the users. For example, status is stored 'A', or 'NA', but this should display 'Available' or 'Not Available'. To do this, I'm taking an idea I saw in another forum by providing a method to call and translate the text. For example:
public String getDisplayedStatus(String status) {
if (status.equals("A") {
return "Available";
} else {
My problem is how can I invoke a method and pass in the current value of status for that row in the table. I think I need something like this:
<h:outputText value="#{showRooms.getDisplayedStatus(#{rowRoom.roomStatus})"/>
But that doesn't work. I can invoke the getDisplayedStatus method when passing in a hardcoded parameter, but it won't translate the value of both expressions(the method and the method param). How can I achieve this?
Thanks,
MikeYes. I've done that and it does work....sort of. It works as long as I refer to it as 'displayStatus'. It looks up the getDisplayStatus and returns a value. The problem is getting the current status value from the object in the List. For example, the 3rd row in the table has either 'A;' or 'NA' for status. I need to know this value in order to do my translation. The way I see it, I either need
1.)a way to call a method on the backing bean and pass the value of status from the current row into the method.
-or-
2.)in getDisplayStatus, I need a way to access the current row's value, perhaps through an expression. This appears to be what you can do in the AbstractPageBean class that all backing beans inherit in Studio Creator. I've seen code in a getter like 'getValue(#{currentRow.status}'), but I don't know how that is done. I looked for the source to AbstractPageBean on the web but couldn't find it - maybe its not open-source.
Anyway, please share if anyone has a solution. I'm sure this has been done before.
Thanks,
Mike -
Unable to call Action Method of the Backing Bean
I have created a jsf page with several tables and input text boxes. I also have the command button to submit the values to the backing bean but, the action method "saveBean()" is not being called
Hear are the codes listed below listed
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<h:form id="myBioDataForm">
<h:panelGrid columns="2" >
<h:panelGroup >
<h:outputLabel id="NameLabel" value="Name" style="font-size: medium"/>
</h:panelGroup>
<h:panelGroup >
<h:inputText id="NameTextBox" value="#{bioData.objBioDataVo.name}"/>
</h:panelGroup>
<h:panelGroup >
<h:outputLabel id="DOBLabel" value="DOB" style="font-size: medium"/>
</h:panelGroup>
<h:panelGroup >
<t:inputCalendar id="DOBCalendar" renderAsPopup="true" value="#{bioData.objBioDataVo.doB}"/>
</h:panelGroup>
<h:panelGroup >
<h:outputLabel id="AddressLabel" value="address" style="font-size: medium"/>
</h:panelGroup>
<h:panelGroup >
<h:outputLabel value=""/>
</h:panelGroup>
<h:panelGroup >
<h:outputLabel id="Street" value="Street" style="font-size: medium"/>
</h:panelGroup>
<h:panelGroup >
<h:inputText id="StreetTextBox" value="#{bioData.objBioDataVo.street}"/>
</h:panelGroup>
<h:panelGroup >
<h:outputLabel id="City" value="Town/City" style="font-size: medium"/>
</h:panelGroup>
<h:panelGroup >
<h:inputText id="CityTextBox" value="#{bioData.objBioDataVo.city}"/>
</h:panelGroup>
<h:panelGroup >
<h:outputLabel id="Pincode" value="Pincode" style="font-size: medium"/>
</h:panelGroup>
<h:panelGroup >
<h:inputText id="PincodeTextBox" value="#{bioData.objBioDataVo.pincode}"/>
</h:panelGroup>
<h:panelGroup >
<h:outputLabel id="Mobile" value="Mobile" style="font-size: medium"/>
</h:panelGroup>
<h:panelGroup >
<h:inputText id="mobileTextBox" value="#{bioData.objBioDataVo.mobile}"/>
</h:panelGroup>
<h:panelGroup >
<h:outputLabel id="Email" value="Email" style="font-size: medium"/>
</h:panelGroup>
<h:panelGroup >
<h:inputText id="emailTextBox" value="#{bioData.objBioDataVo.email}"/>
</h:panelGroup>
<h:panelGroup >
<h:outputLabel id="Gender" value="Gender" style="font-size: medium"/>
</h:panelGroup>
<h:panelGroup >
<h:selectOneRadio value="#{bioData.objBioDataVo.gender}">
<f:selectItem itemLabel="Male" itemValue="Male"/>
<f:selectItem itemLabel="Female" itemValue="Female"/>
</h:selectOneRadio>
</h:panelGroup>
<h:panelGroup >
<h:outputLabel id="Marital_Status" value="Marital Status" style="font-size: medium"/>
</h:panelGroup>
<h:panelGroup >
<h:selectOneRadio value="#{bioData.objBioDataVo.status}">
<f:selectItem itemLabel="Married" itemValue="Married"/>
<f:selectItem itemLabel="UnMarried" itemValue="UnMarried"/>
</h:selectOneRadio>
</h:panelGroup>
</h:panelGrid>
<f:verbatim><br><br><br></f:verbatim>
<h:dataTable var="item" value="#{bioData.al}">
<h:column>
<f:facet name="header" >
<h:outputText value="No Of Years"/>
</f:facet>
<h:selectOneMenu id="NoYears1" value="#{item.noYears}">
<f:selectItems value="#{item.noYearsVoTM}"/>
</h:selectOneMenu>
</h:column>
<h:column>
<f:facet name="header" >
<h:outputText value="Organisation"/>
</f:facet>
<h:inputText id="OrgnisationTextBox" value="#{item.orgVo}"/>
</h:column>
<h:column>
<f:facet name="header" >
<h:outputText value="Designation"/>
</f:facet>
<h:inputText id="designationTextBox" value="#{item.desigVo}"/>
</h:column>
</h:dataTable>
<h:commandButton id="addRow" type="submit" value="Add Row" immediate="true" action="#{bioData.addStr}"/>
<h:dataTable var="edual" value="#{bioData.eduList}">
<h:column>
<f:facet name="header" >
<h:outputText value="Year of Passing"/>
</f:facet>
<h:selectOneMenu id="NoYears11" value="#{edual.yearPassing}">
<f:selectItems value="#{edual.yearPassingTM}"/>
</h:selectOneMenu>
</h:column>
<h:column>
<f:facet name="header" >
<h:outputText value="Qualification"/>
</f:facet>
<h:selectOneMenu id="NoYears11" value="#{edual.qualification}">
<f:selectItems value="#{edual.qualificationTM}"/>
</h:selectOneMenu>
</h:column>
<h:column>
<f:facet name="header" >
<h:outputText value="Specialisation"/>
</f:facet>
<h:inputText id="SpecialisationTextBox1" value="#{edual.specialisation}"/>
</h:column>
<h:column>
<f:facet name="header" >
<h:outputText value="Specialisation"/>
</f:facet>
<h:inputText id="SpecialisationTextBox1" value="#{edual.specialisation}"/>
</h:column>
<h:column>
<f:facet name="header" >
<h:outputText value="School"/>
</f:facet>
<h:inputText id="SchoolTextBox1" value="#{edual.school}"/>
</h:column>
<h:column>
<f:facet name="header" >
<h:outputText value="Total Marks"/>
</f:facet>
<h:inputText id="MarksTextBox1" value="#{edual.cgpa}"/>
</h:column>
</h:dataTable>
<h:commandButton id="addRow1" type="submit" value="AddRow" immediate="true" action="#{bioData.addEdu}"/>
<h:dataTable var="str" value="#{bioData.strList}">
<h:column>
<f:facet name="header" >
<h:outputText value="sno"/>
</f:facet>
<h:inputText id="snoTextBox" value="#{str.sno}"/>
</h:column>
<h:column>
<f:facet name="header" >
<h:outputText value="Stengths"/>
</f:facet>
<h:inputText id="StengthsTextBox" value="#{str.strengths}"/>
</h:column>
<h:column>
<f:facet name="header" >
<h:outputText value="Weaknesses"/>
</f:facet>
<h:inputText id="WeaknessesTextBox" value="#{str.weaknesses}"/>
</h:column>
</h:dataTable>
<h:commandButton id="addRow2" type="submit" value="Add Row" immediate="true" action="#{bioData.addWks}"/>
<h:outputLabel id = "saveLabel" value="Enter Name"/>
<h:inputText id="saveTextBox" value="#{bioData.bioName}"/>
<h:commandButton id="savebutton" type="submit" value="Save" action="#{bioData.saveBio}"/>
</h:form>----------------------------Backing Bean--------------------------------------
package com.minerva.trainees;
import java.util.HashMap;
public class BioDataHomeBackingBean
String selectBio;
HashMap selectBioHM;
public BioDataHomeBackingBean() {
selectBioHM = new HashMap();
selectBioHM.put("Create BioData", "Create BioData");
public String processBioData()
String select_tmp = getSelectBio();
String action="";
if(select_tmp.equalsIgnoreCase("Create BioData"))
action= "displayCompetency@rgsRequest";
return action;
public String saveBio() throws Exception
System.out.println("########################Inside saveBio##################");
return "success";
public String getSelectBio() {
return selectBio;
public void setSelectBio(String selectBio) {
this.selectBio = selectBio;
public HashMap getSelectBioHM() {
return selectBioHM;
public void setSelectBioHM(HashMap selectBioHM) {
this.selectBioHM = selectBioHM;
managed-bean>
<managed-bean-name>MyNameBB</managed-bean-name>
<managed-bean-class>com.minerva.trainees.MyNameBackingBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>bioData</managed-bean-name>
<managed-bean-class>com.minerva.trainees.BioDataBackingBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>bioDataHome</managed-bean-name>
<managed-bean-class>com.minerva.trainees.BioDataHomeBackingBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>bioTest</managed-bean-name>
<managed-bean-class>com.minerva.trainees.TestBean</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>objBioDataVo</managed-bean-name>
<managed-bean-class>com.minerva.trainees.BioDataVo</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>Please help me to solve this problemtracemein wrote:
but, the action method "saveBean()" is not being called Maybe there was a validation or conversion error occurred. Add <h:messages /> to your page to take note of them and handle accordingly. Also read the application server logs if there isn't something interesting logged. JSF 1.2 by default logs undisplayed errors to the stdout.
On the other hand, apart from the problem, you don't need h:panelGroup for single column items. Basically you can remove all of those h:panelGroup tags in your first h:panelGrid. -
How to call a Javascript function from backing bean without any event
Hi,
Someone knows how to call a Javascript function from backing bean without any event ?
thanksPlease review the following thread:
ADF Faces call javascript
Luis. -
Can we call a method in stateless session bean ?
Can we call a method in stateless session bean in onMessage method?
Hi,
The purpose of service locator is to abstract the lookup of the server side services like ejb and DSNs. It should be a normal java class but as such there is no such restriction. You can have a look at the service locator patter at the j2ee blue prints.
/Ashwani -
How to call the method from the java bean and pass it to JSP textbox
i'm quite new to java thats why i'm asking how to call a method in the java bean file and pass it to the JSP textbox. My projects are communicating JSP with C#. i had successfully created a C# client bean file for JSP. The whole process is to type something on the server(C# programming) and it would appear in the textbox.
your question doesn't provide much informartion. provide some other information and coding so that we could tell exactly what you are looking for?
-
How to call a query from the backing bean ?
Hi all,
Another question for you guys :
I made a jspx page with an input form and a submit button.
When I click the submit button, the action my_action in my backing bean is executed.
This is the code :
public BindingContainer getBindings() {
return BindingContext.getCurrent().getCurrentBindingsEntry();
public String my_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("EmployeesView");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
I hoped that the query 'EmployeesView' was executed in this way, but I get the following exception :
java.lang.ClassCastException: oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding cannot be cast to oracle.binding.OperationBinding
So how should I execute the query EmployeesView ?
Second part of the question : What if I typed the name an employee in my form, and I want to
execute a query that selects all the Employees with that name ?
How do I make a query with a variable as input in the WHERE clause ?
Thanks in advance.
Edited by: Facehugger on 7-apr-2010 11:15I'm still trying all the stuff you guys says, but still no result.
This is my backing bean :
+// the button action+
+public String my_action() {+
+// get the selected rows from the multiselect table and store the objectid's in an String array+
RowKeySet rks = graph_table.getSelectedRowKeys();
Iterator itr = rks.iterator();
Object key;
int nbr_objects = 0 , i = 0;
if (rks.size()>0) nbr_objects = rks.size();
+String[] objectid = new String[nbr_objects];+
while(itr.hasNext())
+{+
key = itr.next();
graph_table.setRowKey(key);
Object o = graph_table.getRowData();
JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding) o;
Row row = rowData.getRow();
+objectid[i] = row.getAttribute("Objectid").toString();+
i+;+
+}+
+// now get all the x and y values for these objectid's from the database out of the table history.+
BindingContainer bc = BindingContext.getCurrent().getCurrentBindingsEntry();
for (int j=0 ; j<nbr_objects; j+){+
+// get X and Y values for object number j+
DataPoints history = new DataPoints();
OperationBinding operationBinding = bc.getOperationBinding("retrieveHistory"); ===> operationBinding stays NULL ???+
+operationBinding.getParamsMap().put("OBJECTID", objectid[j]);+
Object retVal = operationBinding.execute();
+// ==> retVal should contain a List of all X and Y values for the provided objectid.+
+// while (retVal has values)+
+// {+
+// List_of_x_values.add(retVal.valueX);+
+// List_of_y_values.add(retVal.valueY);+
+// }+
history.add(List_of_x_values);
history.add(List_of_y_values):
+// call the soap method to do some calculations+
methodname.forecast(history);
+}+
+}+
In my application module :
public void retrieveHistory(String objectid) {
getHistory().setWhereClause("OBJECTID = '" + objectid + "'");
System.out.println("current query : "+getHistory().getQuery());
getHistory().executeQuery();
public ViewObjectImpl getHistory() {+
return (ViewObjectImpl)findViewObject("History");+
The query for the VO History : SELECT * FROM HISTORY
Please anyone ?
Edited by: Facehugger on 9-apr-2010 14:19 -
Can we call a javascript function from backing bean class?
I have a requirement. In a multiselect table, when users selects some rows and clicks a button. Depending upon some condition, an alert box should appear with 2 buttons 'Yes' and 'No'. On clicking yes, certain field values in the selected rows of table should change. On clicking no, the alert box should close. As far as i know alert box can be done only in JS.
Please help me, if a javascript function can be called in backing bean method or suggest some way where alert boxes can appear through ADF.I need to go back to the backing bean as i need to iterate through each selected row of the table in a method( method written for command button) and then if atleast one of the selected rows has job field='Manager', then an alert box needs to be displayed. If none of the rows have job field as 'manager', alert box should not be displayed.
If I write the function for onclick, i cannot iterate through the selected rows of the table in JS function.
Please suggest a way to do this. -
How to directly call business object class from backing bean class
I woul like to call business object class directly from the backing bean class and implement methods in BO. If possible can anyone give an example code.
Thanks in advanceWhich problems are you occurring then? I really don't see problems. You're just free to access and invoke them.
-
Call a Function From a Backing Bean
Hello,
I am trying to call a PL/SQL function from a Backing Bean but i am getting a getDBTransaction error. Here is the example i was trying to do in a backing bean.
I Am getting the employee ID , sending it to a function that calculates the annual salary and then through a button whose code is in the backing bean, showing a message on the screen with the annual salary.
I am getting the JBO-25301 error.
Can't i use getDBTransaction in my backing bean.Please have a look at the following thread:
Stored Procedure -
How can i call a taskflow methode from backing bean ??
Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660
i like to call a Methode (taskflow) from backing bean!
my bean code :
public void imageLinkActionListner(ActionEvent actionEvent) {
String id = actionEvent.getComponent().getId();
int linkID = Integer.parseInt(id.substring(4));
DCBindingContainer bc = (DCBindingContainer)ADFUtils.getBindingContainer();
DCTaskFlowBinding tf = null;
System.out.println("Region Change...."+id+" INT "+linkID);
switch (linkID) {
case LINK_CALENDAR_REGION:
tf = (DCTaskFlowBinding)bc.findExecutableBinding("calendartaskflowPage");
break;
case LINK_MAIL_REGION:
tf = (DCTaskFlowBinding)bc.findExecutableBinding("mailtaskflowPage");
break;
case LINK_ADDRESS_REGION:
tf = (DCTaskFlowBinding)bc.findExecutableBinding("addresstaskflowPage");
break;
case LINK_BLOGS_REGION:
tf = (DCTaskFlowBinding)bc.findExecutableBinding("blogstaskflowPage");
break;
case LINK_MAPS_REGION:
tf = (DCTaskFlowBinding)bc.findExecutableBinding("mapstaskflowPage");
break;
default:
return;
if (tf != null){
uiMainRegion.setRegionModel(tf.getRegionModel());
uiMainRegion.setValue(tf.getRegionModel());
tf.getExecutableBindings();
AdfFacesContext.getCurrentInstance().addPartialTarget(uiMainRegion);
}i like to call *#{backingBeanScope.mapBean.initMap}*
my taskflow source
<?xml version="1.0" encoding="windows-1252" ?>
<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
<task-flow-definition id="map-task-flow">
<default-activity id="__1">map</default-activity>
<view id="map">
<page>/map/map.jsff</page>
</view>
<method-call id="initMap">
<method>#{backingBeanScope.mapBean.initMap}</method>
<outcome id="__7">
<fixed-outcome>init</fixed-outcome>
</outcome>
</method-call>
<control-flow-rule id="__2">
<from-activity-id id="__3">initMap</from-activity-id>
<control-flow-case id="__5">
<from-outcome id="__6">init</from-outcome>
<to-activity-id id="__4">map</to-activity-id>
</control-flow-case>
</control-flow-rule>
<use-page-fragments/>
</task-flow-definition>
</adfc-config>Hi,
to call the bean, use the EL in Java and reference #{backingBeanScope.mapBean.initMap} as a method expression. If you try and access the bean directly then chances are that the instance is not available. Using EL from Java always guarantees this
Frank -
Calling a backing bean method by clicking on an image.
I have several HtmlGraphicImage (h:graphicImage) objects on a page. I would like to be able to call a method inside the backing bean for the JSP page where the images are located when the user clicks on one of the images, and have a parameter sent to that method in the backing bean that will tell it which image was clicked on.
How can this be done? Unlike buttons that have an action that gets listend to in the backing bean, HtmlGraphicImage objects do not have actions. I know that you can intercept clicks by an onClick Javascript method, but how can you call a mehtod in the backing bean using the Javascript onClick?
For example, part of my JSP looks like this:
<body style="background-color: rgb(255, 255, 255); -rave-layout: grid">
<h:form binding="#{InitialReport.form1}" id="form1">
<h:graphicImage binding="#{InitialReport.frontalImage}" height="204" id="frontalImage" style="left: 144px; top: 240px; position: absolute" width="242"/>
<h:graphicImage binding="#{InitialReport.profileImage}" height="198" id="profileImage" style="left: 432px; top: 240px; position: absolute" width="244"/>
<h:graphicImage binding="#{InitialReport.smileImage}" height="198" id="smileImage" style="left: 720px; top: 240px; position: absolute" width="244"/>If my backing bean (InitialReport.java) had a method that looked like this:
public void setCurrentImage(String imageName)what would the javascript look like in order to send a name to setCurrentImage?
Thanks!you can use the <h:button> with type='image'Thanks for the reply, but I cannot use that. The thing is, the images are read at run time from a database and are not present in the resources. The button's image only takes String file names, not URLs.
There should be a way to do this using onClick. -
Browser Dependency when calling a method in backing bean using a javasript.
Hi all,
I have a problem which may look simple but bugging me for quite some time.
The problem is : When I call a method in the backing bean using a Javascript, (the method can alternatively be invoked by clicking on a command link) I am facing an exception (stack printed below).
The strange part is that...I am getting this exception only when I use Internet Explorer. It works absolutely fine when I use Mozilla or Netscape browsers. Also, even in ie, it is working fine when I click on the link directly. The probem comes only when I invoke the action using a javascript.
WARN [lifecycle] executePhase(RENDER_RESPONSE 6,com.sun.faces.cont
ext.FacesContextImpl@16ce9df) threw exception
javax.faces.FacesException
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java
:135)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
va:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci
ationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:
84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnecti
onValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http
11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: ClientAbortException: java.net.SocketException: Connection reset by
peer: socket write error
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:
358)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:309)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288)
at org.apache.catalina.connector.Response.flushBuffer(Response.java:542)
at org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java
:279)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:20
2)
at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java
:101)
at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:
222)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java
:106)
... 24 more
Caused by: java.net.SocketException: Connection reset by peer: socket write erro
r
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWri
te(InternalOutputBuffer.java:764)
at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFi
lter.java:124)
at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.j
ava:570)
at org.apache.coyote.Response.doWrite(Response.java:560)
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:
353)
... 33 more
13:54:42,805 ERROR [STDERR] ClientAbortException: java.net.SocketException: Con
nection reset by peer: socket write error
13:54:42,805 ERROR [STDERR] at org.apache.catalina.connector.OutputBuffer.realW
riteBytes(OutputBuffer.java:358)
13:54:42,805 ERROR [STDERR] at org.apache.tomcat.util.buf.ByteChunk.flushBuffer
(ByteChunk.java:434)
13:54:42,805 ERROR [STDERR] at org.apache.catalina.connector.OutputBuffer.doFlu
sh(OutputBuffer.java:309)
13:54:42,805 ERROR [STDERR] at org.apache.catalina.connector.OutputBuffer.flush
(OutputBuffer.java:288)
13:54:42,820 ERROR [STDERR] at org.apache.catalina.connector.Response.flushBuff
er(Response.java:542)
13:54:42,820 ERROR [STDERR] at org.apache.catalina.connector.ResponseFacade.flu
shBuffer(ResponseFacade.java:279)
13:54:42,820 ERROR [STDERR] at com.sun.faces.application.ViewHandlerImpl.render
View(ViewHandlerImpl.java:202)
13:54:42,820 ERROR [STDERR] at org.ajax4jsf.framework.ViewHandlerWrapper.render
View(ViewHandlerWrapper.java:101)
13:54:42,820 ERROR [STDERR] at org.ajax4jsf.framework.ajax.AjaxViewHandler.rend
erView(AjaxViewHandler.java:222)
13:54:42,820 ERROR [STDERR] at com.sun.faces.lifecycle.RenderResponsePhase.exec
ute(RenderResponsePhase.java:106)
13:54:42,820 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.phase(Life
cycleImpl.java:251)
13:54:42,820 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.render(Lif
ecycleImpl.java:144)
13:54:42,820 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesSer
vlet.java:245)
13:54:42,820 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.
internalDoFilter(ApplicationFilterChain.java:290)
13:54:42,820 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.
doFilter(ApplicationFilterChain.java:206)
13:54:42,820 ERROR [STDERR] at com.hds.vc.common.infrastructure.AIMFilter.doFil
ter(AIMFilter.java:27)
13:54:42,820 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.
internalDoFilter(ApplicationFilterChain.java:235)
13:54:42,820 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.
doFilter(ApplicationFilterChain.java:206)
13:54:42,820 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.d
oFilter(ReplyHeaderFilter.java:96)
13:54:42,820 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.
internalDoFilter(ApplicationFilterChain.java:235)
13:54:42,820 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.
doFilter(ApplicationFilterChain.java:206)
13:54:42,820 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.in
voke(StandardWrapperValve.java:230)
13:54:42,820 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.in
voke(StandardContextValve.java:175)
13:54:42,820 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociatio
nValve.invoke(SecurityAssociationValve.java:179)
13:54:42,820 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.i
nvoke(JaccContextValve.java:84)
13:54:42,820 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invok
e(StandardHostValve.java:128)
13:54:42,820 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invo
ke(ErrorReportValve.java:104)
13:54:42,820 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectio
nValve.invoke(CachedConnectionValve.java:156)
13:54:42,820 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.inv
oke(StandardEngineValve.java:109)
13:54:42,820 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.serv
ice(CoyoteAdapter.java:241)
13:54:42,820 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:844)
13:54:42,820 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11Co
nnectionHandler.process(Http11Protocol.java:580)
13:54:42,820 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.ru
n(JIoEndpoint.java:447)
13:54:42,820 ERROR [STDERR] at java.lang.Thread.run(Unknown Source)
13:54:42,820 ERROR [STDERR] Caused by: java.net.SocketException: Connection rese
t by peer: socket write error
13:54:42,820 ERROR [STDERR] at java.net.SocketOutputStream.socketWrite0(Native
Method)
13:54:42,820 ERROR [STDERR] at java.net.SocketOutputStream.socketWrite(Unknown
Source)
13:54:42,820 ERROR [STDERR] at java.net.SocketOutputStream.write(Unknown Source
13:54:42,820 ERROR [STDERR] at org.apache.coyote.http11.InternalOutputBuffer$Ou
tputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764)
13:54:42,820 ERROR [STDERR] at org.apache.coyote.http11.filters.ChunkedOutputFi
lter.doWrite(ChunkedOutputFilter.java:124)
13:54:42,820 ERROR [STDERR] at org.apache.coyote.http11.InternalOutputBuffer.do
Write(InternalOutputBuffer.java:570)
13:54:42,820 ERROR [STDERR] at org.apache.coyote.Response.doWrite(Response.java
:560)
13:54:42,820 ERROR [STDERR] at org.apache.catalina.connector.OutputBuffer.realW
riteBytes(OutputBuffer.java:353)
13:54:42,820 ERROR [STDERR] ... 33 more
Please throw some light on this issue.This is the Java script I am using
function submitForm(e){
var characterCode
if(e && e.which){
e = e
characterCode = e.which
}else{
e = event characterCode = e.keyCode
if (characterCode== 13){
document.getElementById('mainform:submitForm:search').onclick();
Regards,
Jagadeesh
Edited by: Jagadeesh.Pala on Oct 1, 2007 3:59 AM -
How to call a method in parallel mode
Hi,
I have a web application (ADF/JSF/EJB3) developed under jdev 11g
I need to call a method in my backing bean but in parallel mode.
The idea is that when the user click on a button to compute something i do not want the user to wait untill the process is finished.
e.g.
public String doSomeAction(){
callMethodXY();
return null;
I do not want to wait until callMethodXY is finished to continue with my process.
I just want to call it in parallel and continue working normally.
Which is the best approach.
Regards,
EmileEmile,
No, not my opinion at all. I was simply stating a fact that if you do this in another thread, you must not access FacesContext nor the binding container from that other thread - it's a technical limitation. If you have something that needs doing in the background, then a thread is a fine way to do it.
John -
Calling a method in backing bean whenever a page is loaded/reloaded
Hi,
What is the best way to call a certain method in a backing bean whenever the jsp page is reloaded?
I have a managed bean that provides the data for a form and the bean gets it's data from a SQL DB. I want the bean to reload the data from the DB when and only when the page is loaded or reloaded. (I.e. it should the call method loadData() )
What is the best way to do this?
/RIf the bean is request scoped, just call the logic in the init block or in the constructor, or even in the accessor.
If the bean is session scoped, call the logic in the accessor.
http://balusc.xs4all.nl/srv/dev-jep-dat.html might give some insights.
Maybe you are looking for
-
How do I set upePrint on a HP Officejet 6500 wireless all in one E709n?
I can not find the Eprint code to print from my tablet. Where do I find the code for this printer? Thanks!
-
Creative Sound Blaster AudioPCI 64V (WDM) Prob
Hello,I have a Creative Sound Blaster AudioPCI 64V (WDM) card. I did something that affected the drivers. The sound has stopped working. When I try to use a sound application, (such as media player or sound recorder or anything), I get an error messa
-
How to see the tables which are in the physical layer of SampleAppLite rpd
Hi Everyone, I am new to OBIEE and I installed OBI Apps with Oracle 11g in my laptop. I tried to create reports using the OracleBIAnalyticsApps rpd. How can I know from which schema the tables are coming in the physical layer of the repository so tha
-
Why will my concert will only play through one speaker?
I have checked all of my connects and I get sound on both speakers on previously saved versions of my mainstage concert...just not on the one that I need! It has to be an issue with the settings, but I can't seem to find anything. Please help! Main
-
10.5.4. Error Message
I am trying to install the update. I get the following: You cannot install MacOSXUpd10.5.4Patch on this volume. This system doesn't meet the file content requirements. HELP ME PLEASE!