NullPointerException trying to ViewObject.setCurrentRow(Row)
JDev 10.1.2 build 1811 ... JClient app
Basically, I'm attempting to save and restore a view's currency before and after clearing the entity cache of one of its entities.
The code is executed in the event thread (later) in beforeSetAttribute if that matters.
DetailAM detailAM = (DetailAM)panelBinding.getApplication().getApplicationModule();
ViewObject view = detailAM.findViewObject("ASP20_AssortmentItemView1");
Row row = view.getCurrentRow();
Transaction transaction = detailAM.getTransaction();
transaction.postChanges();
transaction.clearEntityCache("dg.merchandising.asp.detail.model.AssortmentVendorItem");
view.setCurrentRow(row);I have checked that the row object is not null and its key is not null.
[java] Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
[java] at oracle.jbo.server.ViewRowSetIteratorImpl.setCurrentRow(ViewRowSetIteratorImpl.java:950)
[java] at oracle.jbo.server.ViewRowSetImpl.setCurrentRow(ViewRowSetImpl.java:2552)
[java] at oracle.jbo.server.ViewObjectImpl.setCurrentRow(ViewObjectImpl.java:6159)
[java] at dg.merchandising.asp.detail.swing.ASP20.restoreCurrency(ASP20.java:2854)
So is what I am attempting simply an invalid operation since I am clearing the underlying cache without revalidating the cache somehow?
Using JUIteratorBindings on top of the views, saving the keys, then using JUIteratorBinding.setCurrentRowWithKey(String) seems to work. So far, so good, anyway.
Perhaps a more informative exception could be raised instead of a NullPointerException thrown from the source-unavailable bowels of ADF if you try to ViewObject.setCurrentRow with a bad Row object.
Similar Messages
-
Trying to omit duplicate rows in a UNION
I am trying to omit duplicate rows from my union’ed join of 2 tables but am running into a problem which I am hoping someone can help me with. The following SQL works, but doesn’t omit the dups.
SELECT service_code, description_txt, effective_date, ROW_NUMBER() OVER (PARTITION BY service_code
ORDER BY effective_date DESC) AS rn
FROM
(SELECT s.service_code, s.effective_date, s.description_txt
FROM state_code_desc s
WHERE s.expire_date IS NULL
AND s.code_type='H'
AND s.coverage_type='W'
AND s.geo_area_code='USA'
AND s.state_abbr='GE'
UNION
SELECT f.service_code, f.effective_date, f.description_txt
FROM fed_code_desc f
WHERE f.code_type='H'
AND f.expire_date IS NULL
ORDER BY service_code
When I try to add the WHERE RN=1 immediately before the ORDER by service_code (last line of the SQL), I get the following error:
ORA-00904 – “RN” Invalid identifier
Can someone out there help me out, please?
Thanks!
Janet
P.S.-I'm running Oracle 9.1Just a precesion,
It is not a question of analytic functions at all
In fact, column aliases are not usable in tbe same
query in the WHERE clause.
SQL> SELECT deptno,COUNT(*) OVER (PARTITION BY deptno) cnt
2 FROM emp;
DEPTNO CNT
10 2
10 2
20 2
20 2
30 5
30 5
30 5
30 5
30 5
9 rows selected.
SQL> SELECT deptno,COUNT(*) OVER (PARTITION BY deptno) cnt
2 FROM emp
3 WHERE cnt=1;
WHERE cnt=1
ERROR at line 3:
ORA-00904: "CNT": invalid identifier
SQL> SELECT deptno,sal*100 s,COUNT(*) OVER (PARTITION BY deptno) cnt
2 FROM emp
3 WHERE s=100;
WHERE s=100
ERROR at line 3:
ORA-00904: "S": invalid identifier
SQL> SELECT deptno,sal*100 s,COUNT(*) OVER (PARTITION BY deptno) cnt
2 FROM emp
3 WHERE (sal*100)=100;
no rows selected
SQL> SELECT deptno,sal*100 s,COUNT(*) OVER (PARTITION BY deptno) cnt
2 FROM emp
3 HAVING COUNT(*) OVER (PARTITION BY deptno)=2;
HAVING COUNT(*) OVER (PARTITION BY deptno)=2
ERROR at line 3:
ORA-30483: window functions are not allowed hereKhurram -
JTable - trying to delete a row of data using an Abstract TableModel
Hi Guys,
I am trying to delete a row of data on a JTable. What I am trying to accomplish is to highlight the row by a mouseclick,
then from the menu bar I am having the user select a "delete row" option. I am working with an abstract
Table Model with a deleteRow method. I know I am doing something wrong in this method but I'm not sure what... it is not deleting nor dynamically reflecting the deleted row of data on the JTable gui:
P.S. I am using a Vector of Vectors to store the data
Here are snippets of my main class and Abstract Table Model :
Main Class
Table definition and mouse listener:
usermodel = new DataFileTableModel("UserCtl.dat") ;
userTable = new JTable();
userTable.setModel(usermodel);
userTable.createDefaultColumnsFromModel();
userTable.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
upoint = evt.getPoint();
rowToBeDeleted = userTable.rowAtPoint(upoint);
Menu Selection which calls the deleteRow Method in the model:
deleteitem = new JMenuItem("Delete Row",'D');
editmenu.add(deleteitem) ;
deleteitem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
int delresp = JOptionPane.showConfirmDialog(null,"Are you sure you wish to delete this row ?",null, JOptionPane.YES_NO_OPTION) ;
switch(delresp) {
case JOptionPane.NO_OPTION:
return;
case JOptionPane.YES_OPTION:
switch (tabnum)
case 0:
usermodel.deleteRow(rowToBeDeleted);
break ;
Here is my Abstract Table Model... the deleteRow method is at the bottom:
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.event.*;
import java.io.*;
import java.util.*;
public class DataFileTableModel extends AbstractTableModel {
protected Vector data;
protected Vector columnNames ;
protected String datafile;
public DataFileTableModel(String f){
datafile = f;
initVectors();
public void initVectors() {
String aLine ;
data = new Vector();
columnNames = new Vector();
try {
FileInputStream fin = new FileInputStream(datafile);
BufferedReader br = new BufferedReader(new InputStreamReader(fin));
// extract column names
StringTokenizer st1 =
new StringTokenizer(br.readLine(), "|");
while(st1.hasMoreTokens())
columnNames.addElement(st1.nextToken());
// extract data
while ((aLine = br.readLine()) != null) {
StringTokenizer st2 =
new StringTokenizer(aLine, "|");
while(st2.hasMoreTokens())
data.addElement(st2.nextToken());
br.close();
catch (Exception e) {
e.printStackTrace();
public int getRowCount() {
return data.size() / getColumnCount();
public int getColumnCount(){
return columnNames.size();
public String getColumnName(int columnIndex) {
String colName = "";
if (columnIndex <= getColumnCount())
colName = (String)columnNames.elementAt(columnIndex);
return colName;
public Class getColumnClass(int columnIndex){
return String.class;
public boolean isCellEditable(int rowIndex, int columnIndex) {
return true;
public Object getValueAt(int rowIndex, int columnIndex) {
return (String)data.elementAt( (rowIndex * getColumnCount()) + columnIndex);
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
data.setElementAt(aValue, (rowIndex * getColumnCount())+columnIndex) ;
fireTableCellUpdated(rowIndex, columnIndex);
public void addRow(Object[] aRow) {
for (int i=0; i < aRow.length; i++)
data.add(aRow);
int size = getRowCount();
fireTableRowsInserted(size-1,size-1);
public void deleteRow(int rowNo)
if (rowNo < 0 || rowNo >= getRowCount())
return;
int colCount = getColumnCount();
int index = colCount * rowNo;
System.out.println("in deleteRow Row = " + rowNo);
System.out.println("colCount = " + colCount);
System.out.println("index = " + index) ;
for (int d = index; d <= colCount; d++)
data.remove(d) ;
fireTableRowsDeleted(rowNo,rowNo) ;Hi,
I can see one obvious problem. Your method to delete contains
for (int d = index; d <= colCount; d++)
data.remove(d) ;
which I think should be
for (int d = index; d <= colCount; d++)
data.remove(index) ;
because every time you remove the value at 'index' it replaces it with the value at 'index+1'.
I'm not sure that this is the only problem but ...
Roger -
ViewObject with rows not based on a query
Hello,
I have an ViewObject with rows not based on a query. For example, if in activate method from my application module I insert a row, that row will not show when I test my app module. Please do not answer with a link for SRDemo ADF+BC as i've read it and didn't find any answers there.Yes,thanks, I found that, but I don't know how to do a ViewLink that have as destination a viewobject like that. I get all rows from destination for any row from source. There is a way to do that?
-
NullPointerException trying to execute CallableStatement
oracle.jbo.domain.Number jobId = null;
Connection conn = getCurrentConnection();
statement = getDBTransaction().createCallableStatement("{ ? = CALL submit_refresh_actuals(1) }", 0);
statement.registerOutParameter(1, OracleTypes.NUMBER);
System.err.println("CALL SUBMIT_REFRESH_ACTUALS("+planId+")");
statement.execute();(boom)
Output:
[377] JDBCDriverVersion: 10.2.0.1.0
[378] DatabaseProductName: Oracle
[379] DatabaseProductVersion: Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.5.0 - Production
[380] cStmt = conn.prepareCall("{call dbms_application_info.set_client_info('testuser')}"); // JBO-JDBC-INTERACT
refreshPlan
getAssortmentItemIds 1 updated? false
[381] Column count: 1
[382] ViewObject: ASP20_NonUpdatedAssortmentItemLookup Created new QUERY statement
[383] ASP20_NonUpdatedAssortmentItemLookup>#q computed SQLStmtBufLen: 154, actual=114, storing=144
[384] SELECT ASSORTMENT_ITEM_ID FROM ASSORTMENT_ITEM WHERE PLAN_ID = :1 AND TO_DATE(LYA_UPDATE_DATE) != TO_DATE(SYSDATE)
[385] pStmt = conn.prepareStatement("SELECT ASSORTMENT_ITEM_ID FROM ASSORTMENT_ITEM WHERE PLAN_ID = :1 AND TO_DATE(LYA_UPDATE_DATE) != TO_DATE(SYSDATE)"); // JBO-JDBC-INTERACT
[386] Bind params for ViewObject: ASP20_NonUpdatedAssortmentItemLookup
[387] Binding param 1: 1
nonUpdatedAssortmentItemIds = [1627]
[388] cStmt = conn.prepareCall("SELECT PS_ASP_ACTUALS.REFRESH_JOB_EXISTS(?) FROM DUAL"); // JBO-JDBC-INTERACT
job exists? false
[389] pStmt = conn.prepareStatement("SELECT NULL FROM DUAL;"); // JBO-JDBC-INTERACT
[390] cStmt = conn.prepareCall("{ ? = CALL submit_refresh_actuals(1) }"); // JBO-JDBC-INTERACT
CALL SUBMIT_REFRESH_ACTUALS(1)
Exception in thread main
java.lang.NullPointerException
at oracle.jdbc.driver.T4C8Oall.getNumRows(T4C8Oall.java:870)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:959)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1167)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3284)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3389)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4222)
at dg.merchandising.asp.detail.model.DetailAMImpl.submitRefreshPlan(DetailAMImpl.java:548)I have tried [377] JDBCDriverVersion: 10.1.0.3.0. Same problem.
Any tips appreciated.
Thanks,
SteveThank you for the reply.
Steve,
Pardon me if this is an obvious question, but is
SUBMIT_REFRESH_ACTUALS a
PL/SQL function?Yes.
According to what you have posted,
the call spec for
SUBMIT_REFRESH_ACTUALS should be:
function SUBMIT_REFRESH_ACTUALS (PARAM number)
return number;Is this correct?Yes.
CREATE OR REPLACE FUNCTION submit_refresh_actuals
(p_plan_id ASSORTMENT_PLAN.PLAN_ID%TYPE)
RETURN NUMBER
where ASSORTMENT_PLAN.PLAN_ID's type is NUMBER(10).
Have you tried executing the function in
SQL*Plus? For example:
select SUBMIT_REFRESH_ACTUALS(1) from DUALGood Luck,
Avi.The DB guy here is telling me:
I can't because it does DML inside the function, but it works fine inside an anonymous block. -
JDev 9i RC2 Failure when trying to insert a row with DATATAGS
500 Internal Server Error
oracle.jbo.JboException: Need the datasource property defined if not used
within a DefinitionIterate, a RowSetIterator or a Row tag
This is the error message occuring when i do the following
I was trying to insert a record via DataTags (JBO Datatags in JDeveloper 9i
Release Candidate 2).
The following should show you the details
<body bgcolor=#CCCCCC>
<br>
<%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
<br>
<jbo:ApplicationModule id="am"
configname="PrevDoc.PrevDocModule.PrevDocModuleLocal" username="zode"
password="zode"/>
<br>
<jbo:DataSource id="ds" appid="am" viewobject="MicEindocView">
</jbo:DataSource>
<br>
<center>
<p><b>MicEindocView Search Results</b></p>
<br>
<jbo:Row id="newRow" datasource="ds" action="Create" />
<jbo:SetAttribute dataitem="Efdsid" value="9999" />
<jbo:SetAttribute dataitem="Efdmandant" value="55" />
<jbo:SetAttribute dataitem="Efdwerk" value="00" />
<jbo:SetAttribute dataitem="Efdperiode" value='200204' />
<jbo:SetAttribute dataitem="Efdvssart" value='AWB' />
<jbo:SetAttribute dataitem="Efdvssnr" value='TEST WEB JODE' />
</jbo:Row>
<jbo:Commit appid="am" />
<jbo:ReleasePageResources releasemode="Stateless"/>
</center>
</body>
</html>
These fields are not null fields in the database. At least this fields must be
entered.
Can you please tell me the reason why the above error occurs at any time??
Thanks
I appreciate all your help on this issue.
Thanks a lotJosef,
Remove the closing slash in this tag.
<jbo:Row id="newRow" datasource="ds" action="Create" />
I am sure you meant to close it with the </jbo:Row> some lines below.
That explain the complaint of the setAttributeTag missing their context.
Charles. -
Getting error while trying to delete multiple rows
Hi Experts,
Working in jdev 11.1.1.3.0 with ADF BC and rich faces.
i am trying to delete multiple records from the table, everything is working fine if i use filter or not using horizontal scroll bar of the table. if i try to delete last records on the table and the records are deleting from UI and from the DB also, but i am getting error like
ADFv:Count not find row:_$<to-calc>$_with key:oracle.jbo.key[2333] inside parent: XxwfsAvcardXXXXXXXVO1Iterator with key:null
I have changed my method with the below link
Re: JDev 11g-Multiple Row Selection Table-Ctrl+A error
but till i am getting the same error:
Method:
public void deleteRec(ActionEvent actionEvent) {
// Add event code here...
RowKeySet rowKeySet = (RowKeySet)this.embossTB.getSelectedRowKeys();
CollectionModel cm = (CollectionModel)this.embossTB.getValue();
Row specRow = null;
ArrayList rowList = new ArrayList();
int listLength = 0;
ArrayList<Number> printReqLST=new ArrayList<Number>();
ViewObject vo1=null;
boolean flag=false;
for (Object facesTreeRowKey : rowKeySet) {
cm.setRowKey(facesTreeRowKey);
JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)cm.getRowData();
specRow = rowData.getRow();
rowList.add(specRow);
listLength++;
for (int index = 0; index < listLength; index++){
specRow = (Row)rowList.get(index);
Number printReqID = (Number)specRow.getAttribute("PrintRequestId");
String PrintState = specRow.getAttribute("PrintState").toString();
if (PrintState.equalsIgnoreCase("PRINTED")) {
System.out.println("cann't delete");
FacesContext fctx = FacesContext.getCurrentInstance();
FacesMessage message =
new FacesMessage("Cann't Delete the selected row:" + printReqID);
message.setSeverity(FacesMessage.SEVERITY_ERROR);
fctx.addMessage(null, message);
} else {
System.out.println("delete");
flag=true;
specRow.remove();
if(flag){
System.out.println("before commit");
commitRows();
Can any one help me....Can any one help me...
i written logic in AM but still i am facing the same issue.
can any one help me, is this is bug or coding issue.
If i am not doing scroll down and trying to delete rows then there is no error.... only error is coming when i scroll down and try to delete.
Method:
public void deleteRec(ActionEvent actionEvent) {
// Add event code here...
RowKeySet rowKeySet = (RowKeySet)this.embossTB.getSelectedRowKeys();
CollectionModel cm = (CollectionModel)this.embossTB.getValue();
List<Row> rowsToDelete = new ArrayList<Row>();
for (Object facesTreeRowKey : rowKeySet) {
cm.setRowKey(facesTreeRowKey);
JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)cm.getRowData();
Number printReqID = (Number)rowData.getAttribute("PrintRequestId");
String PrintState=rowData.getAttribute("PrintState").toString();
if (PrintState.equalsIgnoreCase("PRINTED")){
System.out.println("cann't delete");
FacesContext fctx = FacesContext.getCurrentInstance();
FacesMessage message =
new FacesMessage("Cann't Delete the selected row:" + printReqID);
message.setSeverity(FacesMessage.SEVERITY_ERROR);
fctx.addMessage(null, message);
} else{
System.out.println("delete");
Row row1 = rowData.getRow();
rowsToDelete.add(row1);
// deletePrintRecords(printReqID);
for (Row row : rowsToDelete){
System.out.println("inside deleting rows");
row.remove();
//commitRows();
System.out.println("After commit from am");
public void commitRows(){
// System.out.println("commit");
DCIteratorBinding embossIter =
ADFUtils.findIterator("XxwfsAvcardEmbossInterfaceVO1Iterator");
ADFUtils.invokeEL("#{bindings.Commit.execute}");
embossIter.getViewObject().executeQuery();
AdfFacesContext.getCurrentInstance().addPartialTarget(embossTB);
Edited by: user5802014 on Sep 3, 2010 11:47 AM
Edited by: user5802014 on Sep 3, 2010 1:07 PM -
Issue with parameter/filter - trying to display null rows
This is how my data looks in the database
Order_ID ----- Vendor
ID123 NULL
ID234 ABC
ID456 NULL
ID001 CDE
I want to create an SSRS report with a filter for vendors
*All Vendors should be checked off by default
*Users should be able to select multiple vendors
So I started by creating the VendorDataSet, the query looks like
SELECT VendorName
FROM Vendor
WHERE Active = 1
*This query will return all active vendors stored in my vendor table
Then, I created my parameter @prmVendor and it looks like:
-Data Type: Text
-Allow blank value("")
-Allow multiples values
Available Values:
-Dataset: Vendor
-Value field: vendor_name
-Label field: vendor_name
The main query of the report looks like
Select Order_ID, Vendor
FROM Order
LEFT JOIN Vendors
ON Order.VendorID = Vendor.ID
WHERE Vendor IN (@prmVendor)
So at this point it does what is supposed to do except - that when I run the query with all the vendors selected,
the query will only return the ones with vendors populated.
Order_ID ----- Vendor
ID234 ABC
ID001 CDE
I've tried adding the following to my VendorDataSet:
SELECT VendorName
FROM Vendor
WHERE Active = 1
UNION ALL
SELECT '' -- I've also tried SELECT NULL
But when I run the report and look at the list of vendor displayed - it won't show the empty row in the vendor drop down filter
thus, my main query will ignore the orders with no vendors.
Any ideas on how to fix this issue?
-AlanSo I changed my VendorDataSet to look like this:
;WITH cteVendors AS (
SELECT VendorName
FROM Vendor
WHERE Active = 1
UNION ALL
SELECT ''
SELECT (CASE WHEN Vendor IS NULL THEN '' ELSE Vendor END) AS VendorName
FROM cteVendors
This allowed me to show an empty box in my drop down filter see link for
image
Is there a way to make some changes to my main query so this works? so if the user was to select the blank box the query will return something like :
Order_ID ----- Vendor
ID123 NULL
ID456 NULL
-Alan -
Trying to fetch a row ID from the address bar
Hello,
I am creating a website that will strickly be run on a touch
screen and saved locally. I am using spry.
I have a Category page with a list of 4 products (Each a
large link button). All of them link to the same html document like
so:
href="product.html?thisID=0" and then the next one "thisID=1"
and so forth.
On the product.html page I wrote a little javascript function
to read the address bar and get me the id number. Here is the
javascript function that runs on page load:
function fetchID() {
var varArray = document.location.href.split("?");
var thisID = varArray[1].split("=");
dsProducts.setCurrentRowNumber(thisID[1]);
alert(thisID[1] + " | " + dsProducts.getCurrentRowNumber());
When I click the first product with thisID=0 the alert says
"0 | 0"
And spry gives me an error saying "Invalid Row Number: 0"
When I click on the second product (thisID=1) the alert
correctly says "1 | 0" and once again I get an invalid row number:
1
How can I set the current row using the variable in the
address bar? My javascript correctly gets me the integer that I
pass.
Thanks,
BraxoHi Braxo,
To do what you want is no need to parse the whole url to get
the id number.
You can add an observer for your dataset. When the dataset
will be populated with the values from xml, you can set the current
id to the url parameter.
You have to this because when page loads and your code runs
no data is present . This is because data loads asynchronous.
You should add something like this into your code:
dsProducts.addObserver({ onPostLoad: function(ds, type) {
dsProducts.setCurrentRow(params.thisID); }
Until the end of this week, on labs will be posted an
complete example that covers your situation and you can follow the
example from there.
Hope this helps,
Diana -
Java.lang.NullPointerException trying to migrate from MySQL to OracleXE
(Originally posted in the SQL Developer forum)
I'm trying to migrate a small MySQL database (four tables) to OracleXE. When I capture an object (table, schema or entire database), I'm receiving a java.lang.NullPointerException message from the Capture source in the Migration Log window. The migrated object doesn't show up in the Captured Objects window until after I shut down SQL Developer and restart it, then the tables in the migration script don't have any columns defined in them.
Here's the error from the console:
java.lang.Exception: java.lang.NullPointerException
at oracle.dbtools.migration.workbench.core.ui.AbstractMigrationProgressRunnable.start(AbstractMigrationProgressRunnable.java:139)
at oracle.dbtools.migration.workbench.core.CaptureInitiator.launch(CaptureInitiator.java:57)
at oracle.dbtools.raptor.controls.sqldialog.ObjectActionController.handleEvent(ObjectActionController.java:127)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:551)
at oracle.ide.controller.IdeAction$2.run(IdeAction.java:804)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:823)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:521)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5501)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
at java.awt.Component.processEvent(Component.java:5266)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3968)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1778)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)Caused by: java.lang.NullPointerException
at oracle.dbtools.migration.workbench.plugin.MySQLCapturer.captureColumnDetails(MySQLCapturer.java:473)
at oracle.dbtools.migration.workbench.plugin.MySQLCapturer.captureObjects(MySQLCapturer.java:145)
at oracle.dbtools.migration.capture.CaptureWorker.capturePerTable(CaptureWorker.java:568)
at oracle.dbtools.migration.capture.CaptureWorker.captureType(CaptureWorker.java:331)
at oracle.dbtools.migration.capture.CaptureWorker.runCapture(CaptureWorker.java:282)
at oracle.dbtools.migration.workbench.core.ui.CaptureRunner.doWork(CaptureRunner.java:63)
at oracle.dbtools.migration.workbench.core.ui.AbstractMigrationProgressRunnable.run(AbstractMigrationProgressRunnable.java:159)
at oracle.dbtools.migration.workbench.core.ui.MigrationProgressBar.run(MigrationProgressBar.java:532)
at java.lang.Thread.run(Thread.java:595)
My environment is:
Windows Xp sp2
SQL Developer (ver. 1.1.2.25.78)
J2SE Development Kit 5.0 Update 11
mysql-connector-java-5.0.5
Oracle Database 10g Express Edition Release 10.2.0.1.0
The MySQL database is version 4.1.2 running on a remote Mandriva Linux 2006 server.
Are there any specific version requirements for the components involved?
Thanks.Hi,
There's a known bug in the code that captures 4.1 MySQL databases (specifically). The fix has been applied, and will be available in our next release.
for a temporary workaround, you can put your data into a MySQL 4.0 or 5.0 database.
Regards,
Dermot. -
NullPointerException trying to run application
Hi,
I'm trying to run my project using JSF 1.2 and Facelets on Tomcat 6. When i do that I'm getting this error:
java.lang.NullPointerException
at com.sun.faces.lifecycle.ELResolverInitPhaseListener.beforePhase(ELResolverInitPhaseListener.java:100)
at org.apache.myfaces.lifecycle.LifecycleImpl.informPhaseListenersBefore(LifecycleImpl.java:503)
at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:100)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:64)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
at java.lang.Thread.run(Unknown Source)
Can anybody help me with what that error means and how to fix it?
Thanks,
BenThanks for the reply.
I have the following ones:
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-el.jar
commons-logging.jar
el-ri.jar
jsf-api.jar
jsf-facelets.jar
jsf-impl.jar
jstl-1.2.jar
myfaces-api-1.1.3-SNAPSHOT.jar
myfaces-impl-1.1.3-SNAPSHOT.jar
The funny thing is, that the app runs fine at home with the same versin of Eclipse/Tomcat but not over here at work. Both are Devel environments running Windows XP. Also tried to run on Tomcat 6 in linux and got same null pointer.
Any idea which jar it can be? -
Essbase Adapter problem, NullPointerException trying reversing
Hi, i'm trying to import via ODI some data in Essbase.
I've imported the adapter, the RKM and created the dataserver and phy schema.
When in designer i try the reverse engineering i obtain a java.nullPointerException.
I've also added drivers path to windows enviroment.
I think there is an error in DataServer settings.
I've filled in as follow:
name: essbase name (taken by essbase console)
user and pass: demoadmin (it's local admin)
In Phy Schema i've written the name of application (OdiLoad) and Database (DataB) for both catalog, work and schema fields.
I don't know how test where is the error.
Edited by: DecaXD on 28-ott-2008 4.21The operator list is blank. This is due probably because i can't interface to Essbase server. Once i succeded to started session and i obtained this same problem
Re: Reverse Engineering of Essbase cube failing
when i start reverse i obtain a nullPointerException
java.lang.NullPointerException
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.prepare(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.t(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.dbobj.SnpSession.localExecute(SnpSession.java)
at com.sunopsis.graphical.t.nm.k(nm.java)
at com.sunopsis.graphical.frame.a.iq.bw(iq.java)
at com.sunopsis.graphical.frame.bn.A(bn.java)
at com.sunopsis.graphical.frame.bn.e(bn.java)
at com.sunopsis.graphical.frame.w.actionPerformed(w.java)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1778)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) -
Getting ClassCastException When Trying To Color JTable Row?
hi there
i'm trying to set color for JTable Rows Using the method prepareRenderer
and get the values of the second column which contains integer values
and if it contain 0 integer value set the color row as red
its already works and the row with 0 is set to red but when i try to select any cell in the table
i'm getting
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integerat prepareRenderer
although the second row which i'm trying to test it's values is Integer not String????????????
here's the code:
import javax.swing.border.*;
import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
import java.awt.event.*;
import javax.swing.JFrame;
public class Column_Filter {
static JTable table;
static DefaultTableModel dtm;
public static void main(String[] args) {
String[]columns={"Name","Number","Price"};
Object[][]data={ {"a",new Integer(5),new Integer(200)}
,{"b",new Integer(7),new Integer(400)}
,{"c",new Integer(0),new Integer(100)}
,{"d",new Integer(8),new Integer(800)}
,{"e",new Integer(3),new Integer(300)}
dtm=new DefaultTableModel(data,columns);
table=new JTable(dtm){
public Class getColumnClass(int column)
return getValueAt(0, column).getClass();
public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
Component c = super.prepareRenderer(renderer, row, column);
if (!c.getBackground().equals(getSelectionBackground()))
Integer type = (Integer)getModel().getValueAt(row, 1);
if(type!=null)
c.setBackground(type==0 ? Color.RED : Color.WHITE );
else
c.setBackground(Color.white);
return c;
TableColumnModel columnModel = table.getColumnModel();
TableColumn col1 = columnModel.getColumn(1);
col1.setCellEditor(new TableEditor());
TableColumn col2 = columnModel.getColumn(2);
col2.setCellEditor(new TableEditor());
table.setPreferredScrollableViewportSize(new Dimension(280,160));
JScrollPane scroll=new JScrollPane(table);
JLabel label=new JLabel("Column Stuff",JLabel.CENTER);
JPanel panel=new JPanel();
panel.add(scroll);
JFrame frame=new JFrame("Column Stuff");
frame.add(label,BorderLayout.NORTH);
frame.add(panel,BorderLayout.CENTER);
frame.setSize(300,300);
frame.setResizable(false);
frame.setVisible(true);
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
table=new JTable();
table.setModel(new DefaultTableModel(new Object [][][] {},new String [] {"Name", "Number","Price"}) {
Class[] types = new Class [] {
java.lang.String.class, java.lang.String.class,java.lang.String.class
public Class getColumnClass(int columnIndex) {
return types [columnIndex];
class TableEditor extends DefaultCellEditor
TableEditor()
super( new JTextField() );
setClickCountToStart(0);
public boolean stopCellEditing()
String editingValue = (String)getCellEditorValue();
if(!editingValue.equals("")){
try
int i = Integer.parseInt(editingValue);
catch(NumberFormatException nfe)
((JComponent)getComponent()).setBorder(new LineBorder(Color.red));
getComponent().requestFocusInWindow();
JOptionPane.showMessageDialog(null,"Data Input Error","Error",JOptionPane.ERROR_MESSAGE);
return false;
else{
getComponent().requestFocusInWindow();
fireEditingCanceled();
JOptionPane.showMessageDialog(null,"Data Input Error","Error",JOptionPane.ERROR_MESSAGE);
return false;
return super.stopCellEditing();
public Component getTableCellEditorComponent(
JTable table, Object value, boolean isSelected, int row, int column)
Component c = super.getTableCellEditorComponent(table, value, isSelected, row, column);
((JComponent)c).setBorder(new LineBorder(Color.BLACK));
return c;
}hi again camickr
i changed the stopCellEditing as you mentioned
changed the getCellEditorValue to return an integer
and give exception and error message if the value can't be converted into integer(non numeric)
but the problem is when i run the program and change the value in any cell with numeric values
or with non numeric or not changing the value and press enter
it give the error message meaning it cannot convert the value to integer
even if enter an int or don't change the value ????????
here's what i did
import javax.swing.border.*;
import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
import java.awt.event.*;
import javax.swing.JFrame;
public class Column_Filter {
static JTable table;
static DefaultTableModel dtm;
public static void main(String[] args) {
String[]columns={"Name","Number","Price"};
Object[][]data={ {"a",new Integer(5),new Integer(200)}
,{"b",new Integer(7),new Integer(400)}
,{"c",new Integer(0),new Integer(100)}
,{"d",new Integer(8),new Integer(800)}
,{"e",new Integer(3),new Integer(300)}
dtm=new DefaultTableModel(data,columns);
table=new JTable(dtm){
public Class getColumnClass(int column)
return getValueAt(0, column).getClass();
public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
Component c = super.prepareRenderer(renderer, row, column);
if (!c.getBackground().equals(getSelectionBackground()))
Integer type = (Integer)getModel().getValueAt(row, 1);
c.setBackground(type==0 ? Color.RED : Color.WHITE );
return c;
TableColumnModel columnModel = table.getColumnModel();
TableColumn col1 = columnModel.getColumn(1);
col1.setCellEditor(new TableEditor());
TableColumn col2 = columnModel.getColumn(2);
col2.setCellEditor(new TableEditor());
table.setPreferredScrollableViewportSize(new Dimension(280,160));
JScrollPane scroll=new JScrollPane(table);
JLabel label=new JLabel("Column Stuff",JLabel.CENTER);
JPanel panel=new JPanel();
panel.add(scroll);
JFrame frame=new JFrame("Column Stuff");
frame.add(label,BorderLayout.NORTH);
frame.add(panel,BorderLayout.CENTER);
frame.setSize(300,300);
frame.setResizable(false);
frame.setVisible(true);
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
table=new JTable();
table.setModel(new DefaultTableModel(new Object [][][] {},new String [] {"Name", "Number","Price"}) {
Class[] types = new Class [] {
java.lang.String.class, java.lang.Integer.class,java.lang.Integer.class
public Class getColumnClass(int columnIndex) {
return types [columnIndex];
class TableEditor extends DefaultCellEditor
TableEditor()
super( new JTextField() );
setClickCountToStart(0);
public boolean stopCellEditing()
try
Integer editingValue = (Integer)getCellEditorValue();
catch(ClassCastException exception)
//when i enter any value in any cell this code is executed even i enter an int or don't change the value
((JComponent)getComponent()).setBorder(new LineBorder(Color.red));
getComponent().requestFocusInWindow();
JOptionPane.showMessageDialog(null,"Data Input Error","Error",JOptionPane.ERROR_MESSAGE);
return false;
return super.stopCellEditing();
public Component getTableCellEditorComponent(
JTable table, Object value, boolean isSelected, int row, int column)
Component c = super.getTableCellEditorComponent(table, value, isSelected, row, column);
((JComponent)c).setBorder(new LineBorder(Color.BLACK));
return c;
} -
Trying to convert multiple rows into multipe columns within a single row
I am trying to convert data from multiple rows into multiple columns. Let me see if I can paint the picture for you.
Here is a sample of the table i am trying to read from:
Company Name Account
1 Sam 123
1 Sam 234
1 Joe 345
1 Sue 789
1 Sue 987
1 Sue 573
I am trying to put this into a View that would have the data represented as such:
Company Name Acct1 Acct2 Acct3 Acct4
1 Sam 123 234 <null> <null>
1 Joe 345 <null> <null> <null>
1 Sue 789 987 573 <null>
Many thanks in advance for your help!test@XE> --
test@XE> with t as (
2 select 1 as company, 'Sam' as name, 123 as account from dual union all
3 select 1, 'Sam', 234 from dual union all
4 select 1, 'Joe', 345 from dual union all
5 select 1, 'Sue', 789 from dual union all
6 select 1, 'Sue', 987 from dual union all
7 select 1, 'Sue', 573 from dual)
8 --
9 select company,
10 name,
11 max(case when rn = 1 then account else null end) as acct1,
12 max(case when rn = 2 then account else null end) as acct2,
13 max(case when rn = 3 then account else null end) as acct3,
14 max(case when rn = 4 then account else null end) as acct4
15 from (select company,
16 name,
17 account,
18 row_number() over (partition by company, name order by 1) as rn
19 from t)
20 group by company, name;
COMPANY NAM ACCT1 ACCT2 ACCT3 ACCT4
1 Joe 345
1 Sam 234 123
1 Sue 573 789 987
3 rows selected.
test@XE>
test@XE>isotope -
LOV throws NullPointerException when there are no rows to display
Hi,
I have cascading LOVs in my application. I have 3 of them. I select values for the first 2 LOVs, and then I click on the 3rd LOV. The query for the third LOV returns no records from the database and so, a NullPointerException is thrown.
When there are no rows to display in the LOV, I want the LOV to still pop up with a message saying "No rows to display".
Is there a way I can achieve this functionality using the existing features?
I am using JDev 11.1.1.3.0
Thanks
Srikanth Addanki<RegistrationConfigurator><handleError> Server Exception during PPR, #2
java.lang.NullPointerException
at oracle.adfinternal.view.faces.model.binding.FacesCtrlLOVBinding.getSearchBinding(FacesCtrlLOVBinding.java:189)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlLOVBinding$ListOfValuesModelImpl.getSearchRegion(FacesCtrlLOVBinding.java:1536)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlLOVBinding$ListOfValuesModelImpl.getQueryModel(FacesCtrlLOVBinding.java:1163)
at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputListOfValuesRendererBase$InternalLaunchPopupListener.processLaunch(SimpleInputListOfValuesRendererBase.java:1371)
at oracle.adf.view.rich.event.LaunchPopupEvent.processListener(LaunchPopupEvent.java:108)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:673)
at org.apache.myfaces.trinidad.component.UIXEditableValue.broadcast(UIXEditableValue.java:210)
at oracle.adf.view.rich.component.UIXInputPopup.broadcast(UIXInputPopup.java:152)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Please let me know if I can provide any other info that makes the issue analysis easy.
Thanks for the quick reply.
Maybe you are looking for
-
Duplex printing with HP Color Laserjet 4650dn
Dear all, I wanted to print the handouts of a Powerpoint presentation (Office for Mac 2008, v12.2.5), but could not get a double-sided copy. The printer (HP CLJ 4650 dn) is installed with the OS X 10.6.4 embedded drivers etc. as HP CLJ 4650. Works fi
-
Suppress messages while sticking with iTunes 10.7 and iOS7?
There's been plenty discussion about the failures of iTunes 11, and for me there are two and a half things which between them make it a no-go. 1. No iTunes DJ. Up Next, even when resized to the left of the main window in the mini-player, doesn't oper
-
Hi everyone, I'm trying to add songs to an existing playlist but when I sync my iPod the newly added songs disappear. Any ideas why? Thanks
-
Changing account settings from G/L account into reconciliation account
Dear all, Could you please help me solve the following problem: We've got such settings in productive system so that open items were formed on GL account in spite of the fact that it was not a reconciliation account for creditors. Is there any way to
-
I have a image background set and i imported a logo. I cant seem to bring my Logo image to front. Please help..