DynamoHttpServletRequest becoming null
Hi,
We are getting null pointer error because of DynamoHttpServletRequest becoming null. Any clue on what scenario request leak can happen in ATG. We are using ATG10.1.2.
Also in logs I can see following warning before I encounter null request.
atg.servlet.ServletUtil Detected currentRequest leak. Set trackSetCurrentRequest to true to debug this issue.
I do not see any extra errors in the logs.
as Shaik suggested check your web.xml it should have Filter and Filter url pattern mapping for example
<filter>
<filter-name>PageFilter</filter-name>
<filter-class>atg.filter.dspjsp.PageFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>PageFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
Similar Messages
-
Window.opener becoming null after 10 seconds
Wondering if anyone else has ran into this problem...
function refreshMe()
var openerObj = window.opener;
window.close();
alert(openerObj);
openerObj.opener.location.href = openerObj.opener.location.href;
openerObj has a value of [object DOMWindow] when a new window pops up. But when I wait approximately 10 seconds the value is becomes null.
Any suggestions or advice you may have is appreciated.Basically I'm using Javascript to pop up a window (child). That window changes to another URL (sub child) after a user selection... Once that pop up form submission is complete I want to refresh the original parent window and close the sub child.
To accomplish this I'm using window.opener.opener.location.href (the original URL) which should be saved by Safari. The problem is after approx. 10 seconds the window.opener variable becomes null. I'm guessing this is something related to Sarfari and not my code...
However, I'm open to any suggestions. Thank you. -
Data automatically become null in Oracle 11g DB
We setup an Oracle 11g database for our application. Yesterday I have noted that in a table Contract_Owner the effective date for the owner FQYX1 is 30-Oct-12. But all of a sudden it has become NULL today. Im not sure how it has changed from 30-Oct-12 to NULL.
Any ideas/thoughts will be appreciated greatly ....
Edited by: 959598 on Apr 18, 2013 2:03 AMOracle wouldn't change a value to a NULL unless it is told to do so.
It could have been a user , a developer, a power user / super user.
It could have been application code.
It could have been a trigger.
It could have been a mistakenly-written update.
It could have been a scheduled job or a one-off job.
Hemant K Chitale -
Dropdown values becoming null after deployment
Iam using jdev 10.1.3.4 and oc4j 10.1.3.4 server.
we have a ADF table in a page in the application with three dropdowns. when i run the page in jdev the values are getting populated correctly for every record.But After deployment, for some records the values in the dropdowns are becoming null. we have 85 records in our Database for which only 5 records have this problem after deployment. But this works fine in local server.
Any help will be appreciated.
Thanks,
Lakshmi.Thank you very much for answering...
I can't send all the code because it needs plenty of files to run. I'll just describe the "critical" parts of it:
- my main class extends JPanel and implements ActionListener + FocusListener + ListSelectionListener
- the JTable is declared by private JTable myTable = null;
- the table is inited by a call to a private void method, with the followind code:
myTable = new JTable(cellData,colNames);
myTable.setName("my_table");
myTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
//... - the table is then put in a scroll pane:
sTable = new JScrollPane(myTable);and the scroll pane put in the NORTH of a JPanel.
- I put a listener on the table by:
myTable.getSelectionModel().addListSelectionListener(this);Here is the most part of the misfuntionning code... the table goes well until the listener generates events... then the myTable instance becomes NULL.
Thanks in advance for thinking about the problem's causes,
Cheers. -
Existing session is becoming null when returning from jsp
Hi Guys !
I have an urgent requirement to meet in few days from now and got stuck with session problem in servlet.
Scenario :-
For the first time when i call a servlet a new sessoin is created and after some validations i forward to a jsp which has some links.
I have printed sessoin ids from both the servlet and jsp and they are same.
Now when i clicked on the link in jsp , the servlet is called but session is lost its becoming null.
Servlet Code :
HttpSession session = request.getSession(false);
if(session ==null){
// create session code ....using getSession(true)
RequestDispatcher r = servletcontext.getRequestDispatcher(resp.encodeURL("/user.jsp"));
jsp code:-
<a href="<%=response.encodeURL(/application/servlet/ViewUser") %">" > View User </a>
GUYS GIVE ME A SUGGESTION IN THIS REGARD AS SOON AS POSSIBLE .....
Thanks in advance !
Aparna</a>Hi,
Session Create Code in Login file
HttpSession hs = req.getSession( true );
hs.setAttribute( "user", lb.getUsername() ); // username() is ur unique id
Session Tracking code in all file
HttpSession hs=request.getSession();
if ( hs == null || hs.getAttribute( "user" ) == null )
response.sendRedirect ( "./index.jsp" );
Logout code
HttpSession hs=req.getSession(false);
hs.setAttribute( "user", null );
hs.invalidate();
res.sendRedirect ( "./index.jsp" );
// I hope this snippet will help u.. -
I am working on struts application.
When we restart Tomcat, it's working fine.
After few days, session becoming null in particular area of the application. Otherthan that area, application is working fine. If we restart Tomcat, then it's works fine.
There is no problem with database (MySQL). Previously, we started db with max_allowed_packets=50M as default.
struts-config.xml contains the following content:
<data-sources>
<data-source key = "jdbc/RFS">
<set-property property = "password" value = "rfs" />
<set-property property = "minCount" value = "1" />
<set-property property = "maxCount" value = "50" />
<set-property property = "user" value = "rfs" />
<set-property property = "driverClass" value = "com.mysql.jdbc.Driver" />
<set-property property = "description" value = "" />
<set-property property = "url" value = "jdbc:mysql://172.23.7.64:3306/rfs" />
<set-property property = "readOnly" value = "false" />
<set-property property = "autoCommit" value = "true" />
<set-property property = "loginTimeout" value = "" />
</data-source>
</data-sources>Please let me know the usage of loginTimeout.Hi,
Session Create Code in Login file
HttpSession hs = req.getSession( true );
hs.setAttribute( "user", lb.getUsername() ); // username() is ur unique id
Session Tracking code in all file
HttpSession hs=request.getSession();
if ( hs == null || hs.getAttribute( "user" ) == null )
response.sendRedirect ( "./index.jsp" );
Logout code
HttpSession hs=req.getSession(false);
hs.setAttribute( "user", null );
hs.invalidate();
res.sendRedirect ( "./index.jsp" );
// I hope this snippet will help u.. -
Hi All,
I am working in ADF 10.1.3.3 .
I have a class where I have overridden the Prepare Model method.
In this I am executing a Query using Iterator Bindings for the VO.
When the page is loaded Query is executing fine , but when I come from other page to my page, bindings are becoming null.
What is the solution for this?
Pls help me.
Thanks,Hi,
as stated in the developer guide, the binding content is not available between requests, which means that you wont have it available e.g. in a restore view phase
Frank -
Hi,
I've created a quotation form, In that, I've created a application process to get details of a customer from the customer master. If I'll enter Customer ID, details are coming automatically. The problem is, If the customer is not existing in the master, I'm entering customer details directly into the form without id and I'm saving these details in the quotation table. I can see the details also in the table. But when I'm editing the exiting quotation, I can see all details in the form, But When I press any button all other details are existing. But related to customer details are just becoming null. This is happening only in the form. Details are existing in the quotation table.
What could be the problem.
Thanks and Regards,
Sudha.Hi Sudha,
Without seeing the page this is my best guess as to what is happening.
If you have created the form using the automated row fetch wizard it will by default have created a reset page process. When you resubmit the page this will be clearing the form items. If this is the case you will need to change the behavior of this process.
cheers,
Ron -
An instance was created, but it becomes null later
I just start to work on an existing Java web application. I build a class. UserDAO which wrap a home-grown DB connection pool. And a client of this class is something like:
Class A {
private UserDAO userDAO;
public A(){
userDAO = new UserDAO();
if(userDAO == null)
System.out.println("The instance can't be created"):
public void method1(..){
userDAO.doSomething();
}The instance in the method1 becomes null for a reason I don't understand. This instance is never set to null as any point of the application.
When I test the code with a small piece of testing code, the situation doesn't occur, however.
Can anyonee see any reasons?
Thanks.uj_ wrote:
vwuvancouver wrote:
The instance in the method1 becomes null for a reason I don't understand. This instance is never set to null as any point of the application.Maybe the A() constructor isn't run. Maybe there's another constructor that's used which doesn't assign an object to userDAO?
Or maybe userDAO is reset to null somewhere in the class.
It can only be one of these.There's a third - albeit very unlikely - option. The omitted code from method1 has a local reference called userDAO that isn't assigned to anything. Unlikely, but it's a mistake people have made in the past. I'm with you, though, it's probably that the default constructor ain't being called -
On making call to Oracle procedures from Java, Value becomes null on oracle
We are using some user defined Oracle data types in my Java/J2EE application
and some of them are Oracle collections(ex. VARRAY).
We are making a call to Procedures/Functions from Java, there are some
parameters of user defined data types declared in the
procedures/functions, from java the values are properly setting to these
user defined data type parameters and sending to Procedures.
We are not getting any exception at Java side and Oracle side and values
are becoming blank/null at oracle procedure side for the parameters of
user defined data types.
But when do the count of collection of user defined data type then it is
properly giving the size of collection(VARRAY).
When we are trying to read the values from the collection(VARRAY) it is
giving blank/null value and there is no exception.
Please let me know if you have any suggestion on this?user7671994 wrote:
When we are trying to read the values from the collection(VARRAY) it is
giving blank/null value and there is no exception.If you are talking about VARCHAR2 parameters of the objects - then you should add orai18n.jar to classpath. -
Value of Statement becomes null even when the connection is open
my small program deals with jdbc during which i met with this strange situation.
i want the value assigned to an instance of Statement (say 'st') for future use. So i declared st' as a class variable. and the variable is assigned with a value inside try-catch block which is inside the constructor. But when i tried to access it from outside it seems to be null. i ve made it clear by giving two print statements INSIDE and OUTSIDE the try-catch block. More over u can notice that the
value of an integer variable remains unaltered INSIDE and OUTSIDE the try-catch block. Wats wrong with my coding? Is there anything
special regarding the 'st' variable which is a reference of Statement interface. BUT WHEN THE DATABASE WAS MS Access, THE
VALUE OF 'st' WAS EXACTLY THE SAME INSIDE AND OUTSIDE THE try-catch BLOCK(i tried it also by making appropriate changes in the jdbc part).
the output in both the situation is copied here.
please correct me.......any help welcomed.
my program
import java.sql.*;
public class MyStatement
Connection con;
Statement st;
ResultSet rs;
int test=0;
public MyStatement()
try
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/mysql", "root", "passes");
Statement st = conn.createStatement();
test=111;
System.out.println("value of statement INSIDE try-catch block: "+st);
System.out.println("value of test INSIDE try-catch block: "+test);
catch (Exception e){System.out.println("sql "+e);}
System.out.println("value of statement OUTSIDE try-catch block: "+st);
System.out.println("value of test OUTSIDE try-catch block: "+test);
public static void main(String args[])
new MyStatement();
}Try this:
public class MyStatement {
Connection conn;
Statement st;
ResultSet rs;
int test = 0;
public MyStatement() {
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/mysql", "root", "passes");
st = conn.createStatement();
test = 111;
System.out.println("value of statement INSIDE try-catch block: " + st);
System.out.println("value of test INSIDE try-catch block: " + test);
} catch (Exception e) {
System.out.println("sql " + e);
System.out.println("value of statement OUTSIDE try-catch block: " + st);
System.out.println("value of test OUTSIDE try-catch block: " + test);
public static void main(String[] args) {
new MyStatement();
} -
Cannot set selectOneChoice value during reload (value auto become null)
Dear all,
I have a problem that getting null value in the SelectOneChoice field in a table binded to
a view object. If I change that SelectOneChoice to inputText, it works perfectly. The details
of the situation is described as follows:
I've binded a view objects with 8 attributes to a af:table, then I manually change
2 of the inputText fields inside 'Column' fields of the table to inputlistofvalue and
selectOneChoice. The code is as follow:
<af:column sortProperty="#{bindings.OpenBalanceVO1.hints.AcNo.name}"
sortable="false"
headerText="#{bindings.OpenBalanceVO1.hints.AcNo.label}"
id="c1" width="180"
inlineStyle="font-family:'Times New Roman', 'Arial Black', times, Serif; font-size:medium;">
<af:inputListOfValues value="#{row.bindings.AcNo.inputValue}"
label="#{bindings.OpenBalanceVO1.hints.AcNo.label}"
required="#{bindings.OpenBalanceVO1.hints.AcNo.mandatory}"
columns="#{bindings.OpenBalanceVO1.hints.AcNo.displayWidth}"
maximumLength="#{bindings.OpenBalanceVO1.hints.AcNo.precision}"
shortDesc="#{bindings.OpenBalanceVO1.hints.AcNo.tooltip}"
id="it1"
model="#{bindings.AcNo2.listOfValuesModel}"
autoSubmit="false"
returnPopupListener="#{backingBeanScope.backing_ImportOpenBalance.returnListener}">
<f:validator binding="#{row.bindings.AcNo.validator}"/>
</af:inputListOfValues>
</af:column>
<af:column sortProperty="#{bindings.OpenBalanceVO1.hints.CurrencyCode.name}"
sortable="false"
headerText="#{bindings.OpenBalanceVO1.hints.CurrencyCode.label}"
id="c2">
<af:selectOneChoice value="#{row.bindings.CurrencyCode.inputValue}"
label="#{bindings.OpenBalanceVO1.hints.CurrencyCode.label}"
shortDesc="#{bindings.OpenBalanceVO1.hints.CurrencyCode.tooltip}"
id="it2" autoSubmit="false"
partialTriggers="cb1 cb2">
<f:selectItems value="#{loginInfo.activeCurrencies}" id="currenciesList"/>
</af:selectOneChoice>
</af:column>
And I have binded the returnPopupListener to returnListerner event handler to automatically
set the Currency field (2nd field) after the user chose the Account field (1st field) from
the input list of value:
public void returnListener(ReturnPopupEvent returnPopupEvent) {
RichInputListOfValues lovField = (RichInputListOfValues)returnPopupEvent.getSource();
ListOfValuesModel lovModel = lovField.getModel();
CollectionModel collectionModel = lovModel.getTableModel().getCollectionModel();
JUCtrlHierBinding treeBinding = (JUCtrlHierBinding)collectionModel.getWrappedData();
RowKeySet rks = (RowKeySet)returnPopupEvent.getReturnValue();
List tableRowKey = (List)rks.iterator().next();
DCIteratorBinding dciter = treeBinding.getDCIteratorBinding();
Key key = (Key)tableRowKey.get(0);
Row row = dciter.findRowByKeyString(key.toStringFormat(true));
DCBindingContainer bc = getBindingContainer();
DCIteratorBinding it2 = bc.findIteratorBinding("OpenBalanceVO1Iterator");
OpenBalanceVOImpl viewObject = (OpenBalanceVOImpl)it2.getViewObject();
FacesContext fctx = FacesContext.getCurrentInstance();
ExpressionFactory elFactory = fctx.getApplication().getExpressionFactory();
ValueExpression ve = elFactory.createValueExpression(fctx.getELContext(), "#{loginInfo}", LoginInfo.class);
LoginInfo loginInfo = (LoginInfo)ve.getValue(fctx.getELContext());
System.out.println("Return place: search date:" + loginInfo.getSearchDate());
Row newRow = viewObject.createRow();
String selectedAcNo = row.getAttribute("AcNo").toString();
String selectedCurrency = row.getAttribute("CurrencyCode").toString();
newRow.setAttribute("AcNo", selectedAcNo);
newRow.setAttribute("CurrencyCode",selectedCurrency);
newRow.setAttribute("OpenBal", 300);
newRow.setAttribute("AvailBal", 200);
newRow.setAttribute("CreateDate", new Date());
newRow.setAttribute("EffectiveDate", loginInfo.getSearchDate());
newRow.setAttribute("LockStatus", "N");
viewObject.insertRowAtRangeIndex(rowIndex, newRow);
The problem occurs when I use a 'createInsert' button to create a new row in the table,
and then choose a value from the inputListOfValues. The new row refresh and get the value
I chose in the first column in the new row. But the second column (currency field) is left
as empty (null value). If I change the second column frmo selectOneChoice to inputText,
the correct Currency value (e.g. "HKD" or "USD") can be shown. So I wonder if there is any
additional tricks in order to set the selectOneChoice value during refresh.
Additionally I have tried to check the state of the view object attributes during the refresh
lifecycle and found that the following reload method (else place) is being reached 3 times after I click
the 'ok' button in the popup up in the inputListOfValue.
public void beforePhase(PagePhaseEvent event) {
//System.out.println("i am here inside backing bean : before phrase 1 phrase ID:" + event.getPhaseId());
if (event.getPhaseId() == Lifecycle.PREPARE_MODEL_ID) {
if (!isPostback()) {
} else {
System.out.println("Post Back on Page Load!");
DCIteratorBinding it2 = bc.findIteratorBinding("OpenBalanceVO1Iterator");
OpenBalanceVOImpl viewObject = (OpenBalanceVOImpl)it2.getViewObject();
RowSetIterator iterator = viewObject.createRowSetIterator(null);
iterator.reset();
while (iterator.hasNext()) {
//Row row = viewObject.getCurrentRow();
Row row = iterator.next();
System.out.print("Account:" + row.getAttribute("AcNo"));
System.out.print(",AvailBal:" + row.getAttribute("AvailBal"));
System.out.print(",OpenBal:" + row.getAttribute("OpenBal"));
System.out.print(",CurrencyCode:" + row.getAttribute("CurrencyCode"));
System.out.print(",EffectiveDate:" + row.getAttribute("EffectiveDate"));
System.out.print(",UserCreate:" + row.getAttribute("UserCreate"));
System.out.println("");
if (row.getAttribute("UserCreate").toString().equals("<current user>")) {
System.out.println("Match <current user> in preload");
//row.setAttribute("CurrencyCode", "USD");
System.out.println("end of reload");
During the 1st time, the CurrencyCode field was set currently, but then in the 2nd and 3rd
times, it's value suddenly changed to 'null'. If I use inputText, all the 3 times currencyCode
field is showing correctly without the null issue.
Anyone can kindly give me some hints? Thanks a lot!!!Dear all,
I have a problem that getting null value in the SelectOneChoice field in a table binded to
a view object. If I change that SelectOneChoice to inputText, it works perfectly. The details
of the situation is described as follows:
I've binded a view objects with 8 attributes to a af:table, then I manually change
2 of the inputText fields inside 'Column' fields of the table to inputlistofvalue and
selectOneChoice. The code is as follow:
<af:column sortProperty="#{bindings.OpenBalanceVO1.hints.AcNo.name}"
sortable="false"
headerText="#{bindings.OpenBalanceVO1.hints.AcNo.label}"
id="c1" width="180"
inlineStyle="font-family:'Times New Roman', 'Arial Black', times, Serif; font-size:medium;">
<af:inputListOfValues value="#{row.bindings.AcNo.inputValue}"
label="#{bindings.OpenBalanceVO1.hints.AcNo.label}"
required="#{bindings.OpenBalanceVO1.hints.AcNo.mandatory}"
columns="#{bindings.OpenBalanceVO1.hints.AcNo.displayWidth}"
maximumLength="#{bindings.OpenBalanceVO1.hints.AcNo.precision}"
shortDesc="#{bindings.OpenBalanceVO1.hints.AcNo.tooltip}"
id="it1"
model="#{bindings.AcNo2.listOfValuesModel}"
autoSubmit="false"
returnPopupListener="#{backingBeanScope.backing_ImportOpenBalance.returnListener}">
<f:validator binding="#{row.bindings.AcNo.validator}"/>
</af:inputListOfValues>
</af:column>
<af:column sortProperty="#{bindings.OpenBalanceVO1.hints.CurrencyCode.name}"
sortable="false"
headerText="#{bindings.OpenBalanceVO1.hints.CurrencyCode.label}"
id="c2">
<af:selectOneChoice value="#{row.bindings.CurrencyCode.inputValue}"
label="#{bindings.OpenBalanceVO1.hints.CurrencyCode.label}"
shortDesc="#{bindings.OpenBalanceVO1.hints.CurrencyCode.tooltip}"
id="it2" autoSubmit="false"
partialTriggers="cb1 cb2">
<f:selectItems value="#{loginInfo.activeCurrencies}" id="currenciesList"/>
</af:selectOneChoice>
</af:column>
And I have binded the returnPopupListener to returnListerner event handler to automatically
set the Currency field (2nd field) after the user chose the Account field (1st field) from
the input list of value:
public void returnListener(ReturnPopupEvent returnPopupEvent) {
RichInputListOfValues lovField = (RichInputListOfValues)returnPopupEvent.getSource();
ListOfValuesModel lovModel = lovField.getModel();
CollectionModel collectionModel = lovModel.getTableModel().getCollectionModel();
JUCtrlHierBinding treeBinding = (JUCtrlHierBinding)collectionModel.getWrappedData();
RowKeySet rks = (RowKeySet)returnPopupEvent.getReturnValue();
List tableRowKey = (List)rks.iterator().next();
DCIteratorBinding dciter = treeBinding.getDCIteratorBinding();
Key key = (Key)tableRowKey.get(0);
Row row = dciter.findRowByKeyString(key.toStringFormat(true));
DCBindingContainer bc = getBindingContainer();
DCIteratorBinding it2 = bc.findIteratorBinding("OpenBalanceVO1Iterator");
OpenBalanceVOImpl viewObject = (OpenBalanceVOImpl)it2.getViewObject();
FacesContext fctx = FacesContext.getCurrentInstance();
ExpressionFactory elFactory = fctx.getApplication().getExpressionFactory();
ValueExpression ve = elFactory.createValueExpression(fctx.getELContext(), "#{loginInfo}", LoginInfo.class);
LoginInfo loginInfo = (LoginInfo)ve.getValue(fctx.getELContext());
System.out.println("Return place: search date:" + loginInfo.getSearchDate());
Row newRow = viewObject.createRow();
String selectedAcNo = row.getAttribute("AcNo").toString();
String selectedCurrency = row.getAttribute("CurrencyCode").toString();
newRow.setAttribute("AcNo", selectedAcNo);
newRow.setAttribute("CurrencyCode",selectedCurrency);
newRow.setAttribute("OpenBal", 300);
newRow.setAttribute("AvailBal", 200);
newRow.setAttribute("CreateDate", new Date());
newRow.setAttribute("EffectiveDate", loginInfo.getSearchDate());
newRow.setAttribute("LockStatus", "N");
viewObject.insertRowAtRangeIndex(rowIndex, newRow);
The problem occurs when I use a 'createInsert' button to create a new row in the table,
and then choose a value from the inputListOfValues. The new row refresh and get the value
I chose in the first column in the new row. But the second column (currency field) is left
as empty (null value). If I change the second column frmo selectOneChoice to inputText,
the correct Currency value (e.g. "HKD" or "USD") can be shown. So I wonder if there is any
additional tricks in order to set the selectOneChoice value during refresh.
Additionally I have tried to check the state of the view object attributes during the refresh
lifecycle and found that the following reload method (else place) is being reached 3 times after I click
the 'ok' button in the popup up in the inputListOfValue.
public void beforePhase(PagePhaseEvent event) {
//System.out.println("i am here inside backing bean : before phrase 1 phrase ID:" + event.getPhaseId());
if (event.getPhaseId() == Lifecycle.PREPARE_MODEL_ID) {
if (!isPostback()) {
} else {
System.out.println("Post Back on Page Load!");
DCIteratorBinding it2 = bc.findIteratorBinding("OpenBalanceVO1Iterator");
OpenBalanceVOImpl viewObject = (OpenBalanceVOImpl)it2.getViewObject();
RowSetIterator iterator = viewObject.createRowSetIterator(null);
iterator.reset();
while (iterator.hasNext()) {
//Row row = viewObject.getCurrentRow();
Row row = iterator.next();
System.out.print("Account:" + row.getAttribute("AcNo"));
System.out.print(",AvailBal:" + row.getAttribute("AvailBal"));
System.out.print(",OpenBal:" + row.getAttribute("OpenBal"));
System.out.print(",CurrencyCode:" + row.getAttribute("CurrencyCode"));
System.out.print(",EffectiveDate:" + row.getAttribute("EffectiveDate"));
System.out.print(",UserCreate:" + row.getAttribute("UserCreate"));
System.out.println("");
if (row.getAttribute("UserCreate").toString().equals("<current user>")) {
System.out.println("Match <current user> in preload");
//row.setAttribute("CurrencyCode", "USD");
System.out.println("end of reload");
During the 1st time, the CurrencyCode field was set currently, but then in the 2nd and 3rd
times, it's value suddenly changed to 'null'. If I use inputText, all the 3 times currencyCode
field is showing correctly without the null issue.
Anyone can kindly give me some hints? Thanks a lot!!! -
ADF Bug? SelectOneChoice in af:column becomes null after refresh
Hello,
I just discovered a serious issue in my code (ADF 11.1.1.4/Windows 7). I was able to reproduce the issue using the following code :
I have a table mapped to a Widget ViewObject listing some widget definitions. On of the column represents the widget type id. I use an af:selectOneChoice and the widgetTypeId is mapped to the WidgetType ViewObject (the category name is displayed)
The page definition :
<?xml version="1.0" encoding="UTF-8" ?>
<pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
version="11.1.1.59.23" id="testFramePageDef"
Package="com.test.view.pageDefs">
<parameters/>
<executables>
<variableIterator id="variables"/>
<iterator Binds="WidgetView1" RangeSize="25"
DataControl="AppModuleDataControl" id="WidgetView1Iterator"/>
<iterator Binds="WidgetTypeView1" RangeSize="-1"
DataControl="AppModuleDataControl" id="WidgetTypeView1Iterator"/>
</executables>
<bindings>
<tree IterBinding="WidgetView1Iterator" id="WidgetView1">
<nodeDefinition DefName="com.test.model.views.dashboard.WidgetView"
Name="WidgetView10">
<AttrNames>
<Item Value="WidgetId"/>
<Item Value="WidgetTypeId" Binds="WidgetTypeId"/>
<Item Value="Name"/>
<Item Value="Reference"/>
<Item Value="Description"/>
<Item Value="StrId"/>
</AttrNames>
</nodeDefinition>
</tree>
<list IterBinding="WidgetView1Iterator" id="WidgetTypeId"
DTSupportsMRU="true" StaticList="false"
ListIter="WidgetTypeView1Iterator">
<AttrNames>
<Item Value="WidgetTypeId"/>
</AttrNames>
<ListAttrNames>
<Item Value="WidgetTypeId"/>
</ListAttrNames>
<ListDisplayAttrNames>
<Item Value="Name"/>
</ListDisplayAttrNames>
</list>
</bindings>
</pageDefinition>The jsf page displays the widgets name and type, which are both modifiable. I also added previous/next buttons :
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1">
<af:messages id="m1"/>
<af:form id="f1">
<af:panelStretchLayout id="ptstc">
<f:facet name="top">
<af:panelGroupLayout id="pglact" layout="horizontal">
<af:commandButton id="cbprv" action="#{userBean.previous}" text="Previous"/>
<af:commandButton id="cbnxt" action="#{userBean.next}" text="Next"/>
</af:panelGroupLayout>
</f:facet>
<f:facet name="center">
<af:table value="#{bindings.WidgetView1.collectionModel}" var="row"
rows="#{bindings.WidgetView1.rangeSize}"
emptyText="#{bindings.WidgetView1.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.WidgetView1.rangeSize}"
rowBandingInterval="0"
selectedRowKeys="#{bindings.WidgetView1.collectionModel.selectedRow}"
selectionListener="#{bindings.WidgetView1.collectionModel.makeCurrent}"
rowSelection="single" id="t1">
<af:column sortProperty="WidgetId" sortable="false"
headerText="#{bindings.WidgetView1.hints.WidgetId.label}"
id="c3">
<af:inputText value="#{row.bindings.WidgetId.inputValue}"
label="#{bindings.WidgetView1.hints.WidgetId.label}"
required="#{bindings.WidgetView1.hints.WidgetId.mandatory}"
columns="#{bindings.WidgetView1.hints.WidgetId.displayWidth}"
maximumLength="#{bindings.WidgetView1.hints.WidgetId.precision}"
shortDesc="#{bindings.WidgetView1.hints.WidgetId.tooltip}"
id="it5">
<f:validator binding="#{row.bindings.WidgetId.validator}"/>
<af:convertNumber groupingUsed="false"
pattern="#{bindings.WidgetView1.hints.WidgetId.format}"/>
</af:inputText>
</af:column>
<af:column sortProperty="WidgetTypeId" sortable="false"
headerText="#{bindings.WidgetView1.hints.WidgetTypeId.label}"
id="c1">
<af:selectOneChoice value="#{row.bindings.WidgetTypeId.inputValue}"
label="#{row.bindings.WidgetTypeId.label}"
required="#{bindings.WidgetView1.hints.WidgetTypeId.mandatory}"
shortDesc="#{bindings.WidgetView1.hints.WidgetTypeId.tooltip}"
id="soc1">
<f:selectItems value="#{row.bindings.WidgetTypeId.items}"
id="si1"/>
</af:selectOneChoice>
</af:column>
</af:table>
</f:facet>
</af:panelStretchLayout>
</af:form>
</af:document>
</f:view>
</jsp:root>Here is the code from my backing bean :
private int widgetId = 1010;
public void previous(){
text = "action";
AppModuleImpl am = (AppModuleImpl)ADFUtils.getApplicationModuleForDataControl("AppModuleDataControl");
ViewObject vo = am.getWidgetView1();
widgetId--;
vo.setWhereClause("WIDGET_ID="+widgetId);
vo.executeQuery();
public void next(){
text = "action";
AppModuleImpl am = (AppModuleImpl)ADFUtils.getApplicationModuleForDataControl("AppModuleDataControl");
ViewObject vo = am.getWidgetView1();
widgetId++;
vo.setWhereClause("WIDGET_ID="+widgetId);
vo.executeQuery();
}Now the issue : if I open the page, the entire widget table is displayed. I click on 'next' and the first record is displayed with correct name and type. If a do a refresh by hitting F5, the action is re-executed and the second row is displayed, also with correct name and type. But if I select 'previous', I come back to the first row but the type is now set to null(0).
Can you tell me if this code is correct and if yes : are you able to reproduce it? / is this an ADF bug?
Thank you
Stephane
Edited by: drahuks on 9 mai 2011 01:32Frank,
The backing bean is session scoped.
I tried a second solution using af:iterator and af:selectItem instead of af:selectItems :
pageDef :
<?xml version="1.0" encoding="UTF-8" ?>
<pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
version="11.1.1.59.23" id="testFramePageDef"
Package="com.test.view.pageDefs">
<parameters/>
<executables>
<variableIterator id="variables"/>
<iterator Binds="WidgetView1" RangeSize="25"
DataControl="AppModuleDataControl" id="WidgetView1Iterator"/>
<iterator Binds="WidgetTypeView1" RangeSize="-1"
DataControl="AppModuleDataControl" id="WidgetTypeView1Iterator"/>
</executables>
<bindings>
<tree IterBinding="WidgetView1Iterator" id="WidgetView1">
<nodeDefinition DefName="com.test.model.views.dashboard.WidgetView">
<AttrNames>
<Item Value="Name"/>
<Item Value="WidgetTypeId"/>
</AttrNames>
</nodeDefinition>
</tree>
<table IterBinding="WidgetTypeView1Iterator" id="WidgetTypeLov">
<AttrNames>
<Item Value="Name"/>
<Item Value="WidgetTypeId"/>
</AttrNames>
</table>
</bindings>
</pageDefinition>jspx :
<af:selectOneChoice value="#{row.WidgetTypeId}"
id="soc1">
<af:forEach var="typeNode"
items="#{bindings.WidgetTypeLov.rangeSet}">
<af:selectItem id="sit" value="#{typeNode.WidgetTypeId}"
label="#{typeNode.Name}"/>
</af:forEach>
<!--<f:selectItems value="#{row.bindings.WidgetTypeId.items}"
id="si1"/>-->
</af:selectOneChoice>Still get an issue : when hitting F5 I get a nullpointer exception. Here is the debug :
<ADFLogger> <begin> Execute query
<ViewObjectImpl> <buildQuery> [1960] _LOCAL_VIEW_USAGE_com_test_model_views_dashboard_WidgetView_WidgetTypeView1>#q computed SQLStmtBufLen: 112, actual=85, storing=115
<ViewObjectImpl> <buildQuery> [1961] SELECT WidgetType.WIDGET_TYPE_ID, WidgetType.NAME FROM WIDGET_TYPE WidgetType
<ViewObjectImpl> <getPreparedStatement> [1962] ViewObject: [com.test.model.views.WidgetTypeView]AppModule._LOCAL_VIEW_USAGE_com_test_model_views_dashboard_WidgetView_WidgetTypeView1 Created new QUERY statement
<ViewObjectImpl> <bindParametersForCollection> [1963] Bind params for ViewObject: [com.test.model.views.WidgetTypeView]AppModule._LOCAL_VIEW_USAGE_com_test_model_views_dashboard_WidgetView_WidgetTypeView1
<ViewObjectImpl> <bindParametersForCollection> [1964] For RowSet : _LOCAL_VIEW_USAGE_com_test_model_views_dashboard_WidgetView_WidgetTypeView1_0
<ADFLogger> <addContextData> Execute query
<ADFLogger> <addContextData> Execute query
<ADFLogger> <addContextData> Get LOV list
<MessageFactory> <getMessage>
java.lang.NullPointerException
at oracle.jbo.uicli.binding.JUCtrlListBinding.processNewInputValue(JUCtrlListBinding.java:3834)
at oracle.adfinternal.view.faces.model.HierNodeBindingELResolver.setValue(HierNodeBindingELResolver.java:77)
at oracle.adfinternal.view.faces.model.AdfELResolver.setValue(AdfELResolver.java:132)
at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:283)
at com.sun.faces.el.DemuxCompositeELResolver._setValue(DemuxCompositeELResolver.java:252)
at com.sun.faces.el.DemuxCompositeELResolver.setValue(DemuxCompositeELResolver.java:278)
at com.sun.el.parser.AstValue.setValue(Unknown Source)
at com.sun.el.ValueExpressionImpl.setValue(Unknown Source)
at org.apache.myfaces.trinidad.component.UIXEditableValue.updateModel(UIXEditableValue.java:289)
at org.apache.myfaces.trinidad.component.UIXEditableValue.processUpdates(UIXEditableValue.java:252)Stephane
Edited by: drahuks on 10 mai 2011 04:09 -
Why this_date becoming null in dbms_job
Hi ,
This is how my code looks....
decalre
mysql VARCHAR2(1000);
BEGIN
mysql :='XXXXXXXXXXXX';
DBMS_JOB.submit (jobno, 'begin ' || mysql || '; end;');
commit;
END;
Using mysql I m invoking a procedure.When I am executing above block , jobs are getting inserted into dbms_jobs.
But they are not getting executed.In user_jobs table, this_date column is going as NULL.
ANy suggestions pleaseHi,
930414 wrote:
Hi ,
This is how my code looks....
decalre
mysql VARCHAR2(1000);
BEGIN
mysql :='XXXXXXXXXXXX';
DBMS_JOB.submit (jobno, 'begin ' || mysql || '; end;');
commit;
END;
Using mysql I m invoking a procedure.When I am executing above block , jobs are getting inserted into dbms_jobs.
But they are not getting executed.In user_jobs table, this_date column is going as NULL.If you're getting any results other than error messages, then I don't believe you're really running this code.
DECLARE is mis-spelled, and jobno is not declared.
ANy suggestions pleasePost a complete test script that people can run to re-create the problem and test their ideas. Include the CREATE PROCEDURE code for XXXXXXXXXXXX, and some code that checks whether the procedure ran or not.
Why are you using dbms_jobs?
If you want to run a procedure over and over (say, once a day), or at a particular time, then use dbms_scheduler.
If you want to run the procedure just once, right away, then just run the procedure. Don't botherr with either dbms_jobs or dbms_scheduler. -
CoyoteRequestFacade becoming null
hi experts,
i get a null pointer exception when i try to do getAttribute(arg)
java.lang.NullPointerException
at org.apache.coyote.tomcat4.CoyoteRequestFacade.getAttribute(CoyoteRequestFacade.java:141)
at com.salmonllc.html.HttpServletRequestWrapper.getAttribute(HttpServletRequestWrapper.java:59)
can anybody help
zetahi experts,
Sorry this was due to a mistake in the code.
zeta
Maybe you are looking for
-
How to restore a single instance database to RAC (10g) using RMAN ?
Hi all, I have a single instance database configured using file system in a unique server, so now I need to restore this database using RMAN to a new RAC environment with two nodes and ASM also. Does anyone can help with this documentation or a link
-
Q 10 Issue with Night mode and Pnone on ring mode
I have one more issue now. I put on the alarm mode at night which shows the clock in red. Today I realised that the phone goes in to silent mode and does not ring. I want it to be in PHONE ONLY mode to attend to emergencies. Is there any way that can
-
Important URLs for Sun ONE Studio forums
Check out our Sun ONE Studio forums by visiting the following links: For Java Tools: http://forte.sun.com/ffj/forums/index.html For Compiler Collection: http://forte.sun.com/s1scc/forums/index.html Add your voice to these active communities, while ga
-
My system preferences won't load. It opens straight up to the desktop folder and pictures won't load, leaving me with a color wheel. I've tried restarting my computer and that doesn't help. System preferences just won't open/load at all. Any ideas?
-
Accessing Human Task output parameters
Hi all. I have encountered a problem that I find to be quite irritating. I have already searched the forum, and read through the threads regarding this topic, but still haven't been able to solve the issue. I have a simple type String variable ({[htt