Bugs in "Oracle 9iJDeveloper Handbook" Example Code
Does any one know why the BC4J "DataHandler Component" Tag does not work? I'm looking at page 132 of the "Oracle9i JDeveloper Handbook", were it discusses executing the LocDept.jsp code example.
Problem is, the First Previous Next Last Navigation Bar does not work properly -- only the first and last rows are displayed from the result set.
I am not the only one experiencing this -- a prof. at the college where I'm taking classes can't get it to work either.
Is this a bug in the BC4j library -- does anyone have a fix. I'm running JDev 9.0.4.0.0 build 1347.
This practice in the book was developed with JDev 9.0.3 build 988 (late beta) and confirmed with build 1035 (production). I remember some issues with the navigator control in earlier builds but had not experienced that one with the 988 and 1035 builds. It is possible some bug was introduced on this control between 9.0.3 and 9.0.4. If you are able to get your hands on an earlier 9.0.3 version, you would be able to confirm that.
Additionally, you could try to generate a full BC4J JSP application from the New gallery. It contains the navigator bar and, if it works there, you could compare the JSP files to see if there are any differences.
Regards,
Peter Koletzke
Similar Messages
-
As far as I can determine from the documentation and posts in other newsgroups
the following example should work to produce an updatable but "empty" ResultSet which can be used to insert rows.
But it doesn't work in a JDK 1.2.2 and JDK 1.3.0_01 application using Oracle 8i (8.1.7) thin JDBC
driver against an Oracle 8.1.5 database I get the following error
SQLException: java.sql.SQLException: Invalid argument(s) in call: setRowBufferAt
However, if I change it to so the target (ie insert) ResultSet is initialized to contain one or more
rows, it works just fine.
ResultSet rset2 = stmt2.executeQuery ( "select Context.* from Context where ContextCd = '0' " );
Is this a bug in Oracle's JDBC driver (more specifically, the UpdatableResultSet implimentation)?
Does an updatabable ResultSet have to return rows to be valid and useable for insert operations?
If it does, is there another way to create an updatable ResultSet that does not depend upon
"hard-coding" some known data value into the query?
try
// conn is a working, tested connection to an Oracle database via 8.1.7 thin JDBC driver.
// source statement
Statement stmt = conn.createStatement (
ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY );
System.out.println("source rset");
rset = stmt.executeQuery ( "select Context.* from Context" );
// target Statement
Statement stmt2 = conn.createStatement (
ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE );
ResultSet rset2 =
stmt2.executeQuery ( "select Context.* from Context where ContextCd = NULL" );
System.out.println(
"see if rset2 looks good even though empty (bcs primarykey = null)");
ResultSetMetaData rsmd2 = rset2.getMetaData();
int numColumns = rsmd2.getColumnCount();
for( int i = 0; i <= numColumns; i++ )
env.msg.println ( "(" + i + ") " + rsmd2.getColumnLabel(i) );
// test results showed the correct columns even though no row returned.
// quess we can use this trick to create an "empty" insert ResultSet.
System.out.println("interate through rset and insert using rset2");
if(rset.next())
System.out.println("move to insert row");
rset2.moveToInsertRow();
System.out.println("insert values");
rset2.updateString( "ContextCd", rset.getString("ContextCd") + "-test" );
rset2.updateString( "Descrip", "test" );
rset2.updateString( "Notes", "test" );
System.out.println("insert row into db (but not committed)");
rset2.insertRow();
catch( ... ) ...
Thanks
R.Parr
Temporal ArtsI have noticed the same problem, actually it doens't matter if there is no data in your resultset. If you have a result with data and suppose you were to analyze the data by moving through all of the rows, the cursor is now after the last row. If you call insertRow, the same exception is thrown. Kinda strange, I didn't get any response as to why this is happening and that was a few weeks ago. I hope someone responds, at this point I am just re-writing some of my code to not use updateable resultsets.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Randall Parr ([email protected]):
As far as I can determine from the documentation and posts in other newsgroups
the following example should work to produce an updatable but "empty" ResultSet which can be used to insert rows.
But it doesn't work in a JDK 1.2.2 and JDK 1.3.0_01 application using Oracle 8i (8.1.7) thin JDBC
driver against an Oracle 8.1.5 database I get the following error<HR></BLOCKQUOTE>
null -
BUG in Oracle SQL Developer 3.0.04 on the "generating DLL" with comments?
I'm newbie on oracle, but I think that I found out a bug in Oracle SQL Developer version 3.0.04 on the "generating DLL" tool using "comments".
I will describe the steps that I gave:
I created a view, but after I test it I had to change my “where” condition, so I comment the old code and then I wrote the new “where” condition below. After I done that I tried to look at the sql code of my view using “generating DLL” tool, but oracle sql developer only shown me half of the code, a lot of code were missing. Then I began with some test trying to understand what happen and I notice that if I put an invalid sql code in my comment the generating DLL start working with no problems, for example(pseudo-code):
(COMMENT WITH VALID SQL CODE the "Generating SQL" don't work:)
CREATE OR REPLACE VIEW <user>.<view_name> ( <column1>,<column2> )
AS
SELECT column1, column2
FROM table1
INNER JOIN
(SELECT
FROM table2
INNER JOIN .....
INNER JOIN ....
--where time_stamp = (select max(time_stamp) from .....)
WHERE time_stamp >= TRUNC(sysdate)
) t1 ON t1.ID = ....
AND ..... >= TRUNC(sysdate)
ORDER BY ....
Generating DLL returns this(when the error occurs):
CREATE OR REPLACE VIEW <user>.<view_name> ( <column1>,<column2> )
AS
(COMMENT WITH VALID SQL CODE the "Generating SQL" work with no problems:)
CREATE OR REPLACE VIEW <user>.<view_name> ( <column1>,<column2> )
AS
SELECT column1, column2
FROM table1
INNER JOIN
(SELECT
FROM table2
INNER JOIN .....
INNER JOIN ....
--where
WHERE time_stamp >= TRUNC(sysdate)
) t1 ON t1.ID = ....
AND ..... >= TRUNC(sysdate)
ORDER BY ....
I believe that "Generating DLL" tool have some problem with the comments, I also used /*...*/ to comment but the problem is still active.
I notice as well that if I started to add some more comments along the code, the conditions migth change, so I think the problem is related with "comments" code.
Would you mind telling me if this is a real bug or if I'm doing anything wrong.
Thank you in advance,
Rodrigo Campos
Edited by: 894886 on 3/Nov/2011 5:29Hi Rodrigo,
Thank you for reporting this. The only bug I see currently logged on a comment affecting the generated View DDL involves ending the last line of the definition with a comment, which treats the ending semi-colon (even if on a different line) as part of the comment. That is actually related to a low-priority bug against an Oracle database API.
Unfortunately, your pseudo-code is a bit complex. Trying a few quick, simpler tests against the standard HR schema did not reproduce the issue. I tried INNER JOIN, and nested SELECTs. It would help greatly if you could provide a test case compilable against one of the standard schema, like HR or SCOTT.
Regards,
Gary
SQL Developer Team -
Bug in Oracle 8.1.6.0.0
Did any one come accrossed with the bug no 1328999 in oracle 8.1.6.0.0 on solaries. If any one please reply me.
Actually my problem is i am getting too many deadlocks in my application i am using MTS (Microsoft Transaction server as application server ) and database is 8.1.6.0.0. of oracle in solaries.
Did any one has similar problems please reply me.
If so
How could you confirm that the problem u are getting is because of a bug in oracle 8.1.6.0.0
Please some one reply meHi kawollek,
Thanks for the reply.
But when i tried with the example provided. I am unable to connect to oracle. it gives the error 0ra-03114 not connected to oracle.
How do i give the host string in oracle or dsn in the programe to connect to the database.
If u have tried please help me.....
Thanks & regards
Rama Raju D.S -
Bug in Oracle JDBC Pooling Classes - Deadlock
We are utilizing Oracle's connection caching (drivers 10.2.0.1) and have found a deadlock situation. I reviewed the code for the (drivers 10.2.0.3) and I see the same problem could happen.
I searched and have not found this problem identified anywhere. Is this something I should post to Oracle in some way (i.e. Metalink?) or is there a better forum to get this resolved?
We are utilizing an OCI driver with the following setup in the server.xml
<ResourceParams name="cmf_toolbox">
<parameter>
<name>factory</name>
<value>oracle.jdbc.pool.OracleDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>user</name>
<value>hidden</value>
</parameter>
<parameter>
<name>password</name>
<value>hidden</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:oci:@PTB2</value>
</parameter>
<parameter>
<name>connectionCachingEnabled</name>
<value>true</value>
</parameter>
<parameter>
<name>connectionCacheProperties</name>
<value>(InitialLimit=5,MinLimit=15,MaxLimit=75,ConnectionWaitTimeout=30,InactivityTimeout=300,AbandonedConnectionTimeout=300,ValidateConnection=false)</value>
</parameter>
</ResourceParams>
We get a deadlock situation between two threads and the exact steps are this:
1) thread1 - The OracleImplicitConnectionClassThread class is executing the runAbandonedTimeout method which will lock the OracleImplicitConnectionCache class with a synchronized block. It will then go thru additional steps and finally try to call the LogicalConnection.close method which is already locked by thread2
2) thread2 - This thread is doing a standard .close() on the Logical Connection and when it does this it obtains a lock on the LogicalConnection class. This thread then goes through additional steps till it gets to a point in the OracleImplicitConnectionCache class where it executes the reusePooledConnection method. This method is synchronized.
Actual steps that cause deadlock:
1) thread1 locks OracleImplicitConnectionClass in runAbandonedTimeout method
2) thread2 locks LogicalConnection class in close function.
3) thread1 tries to lock the LogicalConnection and is unable to do this, waits for lock
4) thread2 tries to lock the OracleImplicitConnectionClass and waits for lock.
***DEADLOCK***
Thread Dumps from two threads listed above
thread1
Thread Name : Thread-1 State : Deadlock/Waiting on monitor Owns Monitor Lock on 0x30267fe8 Waiting for Monitor Lock on 0x509190d8 Java Stack at oracle.jdbc.driver.LogicalConnection.close(LogicalConnection.java:214) - waiting to lock 0x509190d8> (a oracle.jdbc.driver.LogicalConnection) at oracle.jdbc.pool.OracleImplicitConnectionCache.closeCheckedOutConnection(OracleImplicitConnectionCache.java:1330) at oracle.jdbc.pool.OracleImplicitConnectionCacheThread.runAbandonedTimeout(OracleImplicitConnectionCacheThread.java:261) - locked 0x30267fe8> (a oracle.jdbc.pool.OracleImplicitConnectionCache) at oracle.jdbc.pool.OracleImplicitConnectionCacheThread.run(OracleImplicitConnectionCacheThread.java:81)
thread2
Thread Name : http-7320-Processor83 State : Deadlock/Waiting on monitor Owns Monitor Lock on 0x509190d8 Waiting for Monitor Lock on 0x30267fe8 Java Stack at oracle.jdbc.pool.OracleImplicitConnectionCache.reusePooledConnection(OracleImplicitConnectionCache.java:1608) - waiting to lock 0x30267fe8> (a oracle.jdbc.pool.OracleImplicitConnectionCache) at oracle.jdbc.pool.OracleConnectionCacheEventListener.connectionClosed(OracleConnectionCacheEventListener.java:71) - locked 0x34d514f8> (a oracle.jdbc.pool.OracleConnectionCacheEventListener) at oracle.jdbc.pool.OraclePooledConnection.callImplicitCacheListener(OraclePooledConnection.java:544) at oracle.jdbc.pool.OraclePooledConnection.logicalCloseForImplicitConnectionCache(OraclePooledConnection.java:459) at oracle.jdbc.pool.OraclePooledConnection.logicalClose(OraclePooledConnection.java:475) at oracle.jdbc.driver.LogicalConnection.closeInternal(LogicalConnection.java:243) at oracle.jdbc.driver.LogicalConnection.close(LogicalConnection.java:214) - locked 0x509190d8> (a oracle.jdbc.driver.LogicalConnection) at com.schoolspecialty.cmf.yantra.OrderDB.updateOrder(OrderDB.java:2022) at com.schoolspecialty.cmf.yantra.OrderFactoryImpl.saveOrder(OrderFactoryImpl.java:119) at com.schoolspecialty.cmf.yantra.OrderFactoryImpl.saveOrder(OrderFactoryImpl.java:67) at com.schoolspecialty.ecommerce.beans.ECommerceUtil.saveOrder(Unknown Source) at com.schoolspecialty.ecommerce.beans.ECommerceUtil.saveOrder(Unknown Source) at com.schoolspecialty.ecommerce.beans.UpdateCartAction.perform(Unknown Source) at com.schoolspecialty.mvc2.ActionServlet.doPost(ActionServlet.java:112) at com.schoolspecialty.ecommerce.servlets.ECServlet.doPostOrGet(Unknown Source) at com.schoolspecialty.ecommerce.servlets.ECServlet.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.schoolspecialty.ecommerce.servlets.filters.EcommerceURLFilter.doFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534)We used a documented option to abandon connects in the case of an unforeseen error. The consequence of using this option was not a graceful degradation in performance but a complete lockup of the application. The scenario in which we created a moderate number of abandoned connections was a rare error scenario but a valid test.
How could this not be a bug in the Oracle driver? Is dead-lock a desireable outcome of using an option? Is dead-lock ever an acceptable consequence of using a feature as documented?
Turns out other Oracle options to recover from an unexpected error also incur a similar deadlock (TimeToLiveTimeout).
I did a code review of the decompiled drivers and it clearly shows the issue, confirming the original report of this issue. Perhaps you have evidence to the contrary or better evidence to support your statement "not a bug in Oracle"?
Perhaps you are one of the very few people who have not experience problems with Oracle drivers? I've been using Oracle since 7.3.4 and it seems that I have always been working around Oracle JDBC driver problems.
We are using Tomcat with the OracleDataSourceFactory. -
I found another bug in Oracle:
SQL> create cluster tfsys_cluster
2 (
3 name varchar2(30),
4 cdp number(6),
5 stime number(6) sort)
6 hashkeys 1000
7 size 100;
SQL> create table tfsys(
2 name varchar2(30) not null,
3 cdp number(6) not null,
4 stime number(6) not null,
5 data number(10,2))
6 cluster tfsys_cluster(name, cdp, stime);
SQL> alter table tfsys add constraint tfsys_pk primary key(name, cdp, stime);
SQL> begin
2 for i in 1..5 loop
3 insert into tfsys values('IANC', 1, i, 15.25 + i);
4 end loop;
5 end;
6 /
SQL> commit;
SQL> select * from tfsys where name='IANC' and cdp=1 and stime <= 3;
NAME CDP STIME DATA
IANC 1 1 16,25
IANC 1 2 17,25
IANC 1 3 18,25
SQL> select * from tfsys where name='IANC' and cdp=1 and stime < 3;
NAME CDP STIME DATA
IANC 1 1 16,25
IANC 1 2 17,25
IANC 1 3 18,25
SQL> select * from tfsys where name='IANC' and cdp=1 and trunc(stime) < 3;
NAME CDP STIME DATA
IANC 1 1 16,25
IANC 1 2 17,25
This bug exists in Oracle 10.2.0.1.0-10.2.0.3.0 for Windows installation, for example in Oracle 10.1.0.3.1 for Red Hat 3 this query work right.FWIW I have not been able to reproduce your problem on Windows.
I am getting the same results in Windows and Linux.
You should check if the execution plan is different in both cases -
Bug in oracle embedded http listener
Hi there,
I've discovered a bug in the Oracle embedded http listener for our Oracle on RHEL database version 11.1.0.6 where it will return HTTP-400 bad request errors if a cookie is created with a bare comma in the cookie value. To see for yourself, simply create an apex application with an open door authentication and enter a username with a comma in it - page 101 writes the username to a cookie, and then you get HTTP-400 errors.
I'll raise this as a bug at Oracle, but in the meantime I'm frantically trying to figure out a workaround. We have a production site using a standard Apache frontend that we link to Apex applications using mod_rewrite. There are other applications on the site (invision powerboard) which create cookies with bare commas, so we have no control over the creation of these maligned cookies. My thinking is that we might be able to use mod_rewrite rules to weed out the offending cookies and encode the commas so that things continue to work.
Can anyone assist with a workaround?
Many thanks,
MikeHi Mike,
perhaps you can try to modify the cookies on the client?
http://scripts.franciscocharrua.com/javascript-cookies.php
Or is it already too late so that you cannot even run the first procedure to inject the javascript code into the first page?
Or, you could configure the DAD to run a stored procedure before anything else:
PlsqlBeforeProcedure
http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_epg.htm
If this is already too late, your only option seems to be to use an Apache as a proxy and modify the cookie value there.
Regards,
~Dietmar. -
Bug in Oracle Forms 9i triggers
I've found a bug in oracle forms 9i. It happens when you have a select query inside a when-validate-item trigger and in that query you opt to show an alert when the query has encountered an exception...
When that trigger is fired, the alert will show even if the query returns a record(which means that it does not go through the exception). The solution is to recompile the said trigger.
Is this bug present in the other versions of Oracle forms?
Is there a patch for this bug?Hi,
Thanks for your reply.
I've consulted with some of my colleagues who have been using Oracle forms for more than 5 years now, and they said that the bug seems to randomly appears...The code works fine in the local environemnt (forms builder) and in the AS itself (compiled in Unix) but after sometime, the bug appears and they just compiled the trigger where the code of the alert is in...
Is there any logical explanation of why compiling a trigger (without changing any code) solves this problem? -
Please Help: A Problem With Oracle-Provided 'Working' Example
A Problem With Oracle-Provided 'Working' Example Using htp.formcheckbox
I followed the simple steps in the Oracle-provided example:
Doc ID: Note:116534.1
Subject: How to use checkbox in webdb for bulk update using webdb report
However, when I select a checkbox and click on the Update button, I get a "ORA-01036: illegal variable name/number" error. Please advise. This was a very promising feature.
Fred
Below are step-by-step instructions provided by Oracle to create this "working" example:
How to use a checkbox in WEBDB 2.2 report for bulk update.
PURPOSE
This article shows how checkbox can used placed on WEBDB report
and how to use it.
SCOPE & APPLICATION
The following example to guide through the steps to create a working
example of this.
In this example, the checkbox is used to select the records. On clicking
the update button, the pl/sql procedure is called which will update col1 to
the string 'OK'.
After the update is done, the PL/SQL procedure calls the report again.
Since the report only select records where col1 is null, the updated
records will not be displayed when the report is called again.
Step 1 - Create Table
From Sqlplus, log in as scott/tiger and execute the following:
drop table chkbox_example;
create table chkbox_example
(id varchar2(10) not null,
comments varchar2(20),
col1 varchar2(10));
Step 2 - Insert Test Data
From Sqlplus, still logged in as scott/tiger , execute the following:
declare
l_i number;
begin
for l_i in 1..50 loop
insert into chkbox_example values (l_i, 'Comments ' || l_i , NULL);
end loop;
commit;
end;
Step 3 -Create SQL Query based WEBDB report
Logon to a WEBDB site which has access to the database the above tables are created.
Create a SQL based Report.
Name the report :RPT_CHKBOX
The select statement for the report is :
select c.id, c.comments, c.col1,
htf.formcheckbox('p_qty',c.id) Tick
from SCOTT.chkbox_example c
where c.col1 is null
In Advanced PL/SQL, (REPORT, Before displaying the form), put the following code
htp.formOpen('scott.chkbox_process');
htp.formsubmit('p_request','Update');
htp.br;
htp.br;
Step 4 - Create a stored procedure in the database
Log on to the database as scott/tiger and execute the following to create the
procedure.
Note: Replace WEBDB to the appropriate webdb user for your installation.
In my database, I had installed webdb using WEBDB username, hence user webdb owns
the packages.
create or replace procedure chkbox_process
( p_request in varchar2 default null,
p_qty in wwv_utl_api_types.vc_arr ,
p_arg_names in wwv_utl_api_types.vc_arr ,
p_arg_values in wwv_utl_api_types.vc_arr
is
i number;
begin
for i in 1..p_qty.count loop
if p_qty(i) is not null then
begin
update chkbox_example
set col1 = 'OK'
where chkbox_example.id = p_qty(i);
end;
end if;
end loop;
commit;
/* To Call Report again after updating */
SCOTT.RPT_CHKBOX.show
(p_request=>'Run Report',
p_arg_names=>webdb.wwv_standard_util.string_to_table2(' '),
p_arg_values=>webdb.wwv_standard_util.string_to_table2(' '));
end;
Summary
There are essentially 2 main modules, The WEBDB report and the pl/sql procedure (chkbox_process)
A button is created via the advanced pl/sql coding which shows on top of the report. (The
button cannot be placed at the bottom of the report due to the way WEBDB creates the procedure
internally)
When any button is clicked on the report, it calls the pl/sql procedure chkbox_process.
The procedure is called , WEBDB always passes the parameters p_request,p_arg_names and o_arg_values.
p_qty is another parameter that we are passing additionally, This comes from the checkbox created
using the htf.formcheckbox in the report select statement.
The pl/sql procedure calls the report again after processing. This is done to
show how to call the report.
Restrictions:
-The Next and Prev buttons on the report will not work.
So it is important that the report can fit in 1 page only.
(This may mean that you will not select(not ticked) 'Paginate' under
'Display Option' in the WEBDB report. If you do this,
then in Step 4, remove p_arg_names and p_arg_values as input parameters
to the chkbox_process)If your not so sure you can use the instanceof
insurance,
Object o = evt.getSource();
if (o instanceof Button) {
Button source = (Button) o;
I haven't thoroughly read the thread, but I use something like this:if (evt.getSource() == someObjRef) {
// do that voodoo
]I haven't looked into why you'd be creating a new reference... -
Strange Bug in oracle.jbo.domain.Number
Hi
There is a strange Bug in oracle.jbo.domain.Number. Look at the following code:
System.out.println(new Number("12E4"));In JDeveloper 9.0.5.3 this code prints
12000which is correct. In JDeveloper 10.1.3 this code throws an exception:
java.lang.NumberFormatException: For input string: "E4"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.parseInt(Integer.java:497)
at oracle.sql.NUMBER.toBytes(NUMBER.java:1861)
at oracle.sql.NUMBER.stringToBytes(NUMBER.java:3398)
at oracle.sql.NUMBER.<init>(NUMBER.java:277)
at oracle.jbo.domain.Number.<init>(Number.java:289)
at project1.Main.main(Main.java:10)I think this is a serious bug since some very basic behaviour is not working as expected anymore.It's a bug.
The parseInt method is called and from its javadoc it's clear that it throws a NumberFormatException:
Parses the string argument as a signed decimal integer. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' ('\u002D') to indicate a negative value. The resulting integer value is returned, exactly as if the argument and the radix 10 were given as arguments to the parseInt(java.lang.String, int) method.
Maybe the earlier implementation of oracle.jbo.domain.Number didn't use the parseInt method.
Ronald -
[svn] 4595: Fix for - Example code in ObjectProxy ASDoc page is incorrect
Revision: 4595
Author: [email protected]
Date: 2009-01-20 08:11:25 -0800 (Tue, 20 Jan 2009)
Log Message:
Fix for - Example code in ObjectProxy ASDoc page is incorrect
Also modify the build.xml for "ant asdoc"
QE Notes: None
Doc Notes: None
Bugs: SDK-18335
tests: checkintests
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-18335
Modified Paths:
flex/sdk/trunk/asdoc/build.xml
flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectProxy.as>
build url like this,
'<a href=f?p='||NV('APP_ID')||':45:'||V('APP_SESSION')||'::NO:RP,45,CIR:ub_branch,ub_supplier,ub_customer,ub_product,ub_aging,ub_destination:'||REPLACE(branch,' ','%20')||'%2C'||REPLACE(ub_supplier,' ','%20')||'%2C'||REPLACE(ub_customer,' ','%20')||'%2C'||REPLACE(ub_product,' ','%20')||'%2C'||REPLACE(ub_aging,' ','%20')||'%2C'||REPLACE(ub_destination,' ','%20') ||'>All</a>',All of this is handled by the apex_util.url_encode API function as described above.
However, as also mentioned above, the best approach is to only pass discrete key values in URLs. -
am doing VB programming on msacess in iPAQ device ,
there is some limitation in sql and one told me those are not exists in orale lite
so i tred it , intallation ok , running msql ok , creating odb ok ,
when it comes to programming with ADOCE it is the disaster ;
i have table ORDER ( OREDERNO NUMBER(9) , ..... )
when i use
set orders = CreateObject(oladoce.recordset)
orders.Open "ORERS", ,1,3
orders.AddNew
orders.Fields("ORDERNO").value = 21
orders.Update
the program exits on line 2 , even ON ERROR can't catch the error
the funny thing it passes for some other numbers e.g.
orders.Fields("ORDERNO").value = 1
orders.update
am i doing something wrong or
there is bugs in oracle ADOCEhere is the table ORDERS def.
Name Null? Type
ORDERNO N NUMBER(5)
ORDERTYPE Y NUMBER(5)
PRINTEDNO Y VARCHAR2(15)
INVOICENO Y VARCHAR2(15)
BRANCHNO Y VARCHAR2(8)
COMPANYNO Y VARCHAR2(8)
SALESMANNO Y VARCHAR2(15)
CSMNO Y VARCHAR2(15)
CUSTOMERNO Y VARCHAR2(15)
SALESECTORNO Y VARCHAR2(4)
ORDERDATE Y DATE
DELIVERYDATE Y DATE
DELIVERYTIME Y VARCHAR2(20)
ORDERSTATUS Y NUMBER(5)
and here is the code
Set Conn = CreateObject("oladoce.activeconnection")
Conn.Connect "retail"
Set Orders = CreateObject("oladoce.recordset")
Orders.Open "ORDERS", , 1, 3
Orders.AddNew
Orders.Fields("AREANO").Value = 17 ' here the program exits
Orders.Update ' it does not even reatch this ine !!!
you told me to try insert into statement
i did the following :
Set Conn = CreateObject("oladoce.activeconnection")
Conn.Connect "retail"
Set Orders = CreateObject("oladoce.recordset")
sqlStmt = "INSERT INTO ORDERS(ORDERNO) VALUES ( 1 ) "
Orders.Open sqlStmt, , 1, 3
Set Orders = Nothing
Conn.Disconnect
and it does not insert the record into the database
THE REALLY FUNNY THING WHEN I RUN
Set Conn = CreateObject("oladoce.activeconnection")
Conn.Connect "retail"
Set Orders = CreateObject("oladoce.recordset")
sqlStmt = "INSERT INTO ORDERS(ORDERNO) VALUES ( 1 ) "
Orders.Open sqlStmt, , 1, 3
Set Orders = Nothing
Set Orders = CreateObject("oladoce.recordset")
sqlStmt = "commit "
Orders.Open sqlStmt, , 1, 3
Set Orders = Nothing
Conn.Disconnect
i got an error message ' TABLE OR VIEW NOT FOUND '
but when i open the table ORDERS i found that the record inserted !!!!!!!
and you tell me OraLite is not BUGGY !!!!!!!!!!!!!!!!!! -
Any Example code site for MQ v6.0 Clustering
Hi All
Can any body please help me some sites, where I can get some example codes, for MQ Clustering in java....
Windows platform
MQ Webspere v6.0
thanks in advance
BalmikiI'm looking for exact property need to be set for SSL in Oracle MQ adapter.
It would be very helpful if Oracle have some standard docs. -
Revision: 3968
Author: [email protected]
Date: 2008-10-30 10:45:04 -0700 (Thu, 30 Oct 2008)
Log Message:
Fix for - ASDoc fails if example code included by the @includeExample tag contains an "&"
Also fix for broken links with $$ symbol.
QE Notes: None
Doc Notes: None
Bugs: SDK-17830
tests: checkintests
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-17830
Modified Paths:
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocUtil.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGenerator.ja vaRevision: 3968
Author: [email protected]
Date: 2008-10-30 10:45:04 -0700 (Thu, 30 Oct 2008)
Log Message:
Fix for - ASDoc fails if example code included by the @includeExample tag contains an "&"
Also fix for broken links with $$ symbol.
QE Notes: None
Doc Notes: None
Bugs: SDK-17830
tests: checkintests
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-17830
Modified Paths:
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocUtil.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGenerator.ja va -
Bug: Can't build TopLink10g Examples
Hi,
I am new to TopLink and tried to run the examples which come with Toplink 10g. I downloaded the source code (http://otn.oracle.com/products/ias/toplink/preview/examples.htm) and started the ANT build process (configureExample.s.cmd).
Problem: ANT can't find class org.apache.tools.ant.taskdefs.MultipleCopy .
BUILD FAILED
file:D:/oracle/ora92/toplink/examples/build.xml:12: taskdef class org.apache.tools.ant.taskdefs.MultipleCopy cannot be found
A quick search reveals that Apache does not provide that class!
Who can help me to build the examples?
Is a workaround available?
Thanx in advance,
MarkusHi, after installing ANT copy the <ORACLE_HOME>/toplink/examples/resources/toplink_customtasks.jar to your <ANT_INSTALL>/lib directory.
Maybe you are looking for
-
How to recover my backup files after restore to factory i lost my backup
after restore my macbook air to factory settings can not find my back up files. can any body tell me how to find them?
-
WRT310N as a "Wireless Access Point"
Hello, I am in the market for a wireless device to add to an existing subnet. I see many tutorials regarding routers as wireless access points, but I am not sure if this device will work. My plan is to connect one of the switch ports to an existing
-
HT2305 How do I authorize my computer for previous purchases
How do I authorize my computer for previous purchases
-
What is AppleCare Technician Training? How does it helps?
Hi i am a student of IT... I have decided to built my IT career based on mac. as i was looking for what tranings are there to start my career with mac i found about AppleCare Technician Training. but i dont know what does it actuly do? i realy want t
-
WAP4410N stops responding on large file transfers
Also experience this issue, latest firmware (7/17/2010 version). Definately related to large file transfers. Or, viewing videos (e.g. youtube) over RDP. Only power cycle gets responsiveness back. Laptops remain connected, but with "Limited Connect