DataSourceUserManager bug in oracle 9.0.4
Hi,
We use jaas configured with com.evermind.sql.DataSourceUserManager as a custom user manager provider on Oracle 9.0.4. It works with a datasource that defined in OracleAs datasource.
Every thing works fine.
When we restart the OC4J instance, the com.evermind.sql.DataSourceUserManager gives error that could not initial becuase could not find the datasource which is already there!
We found it as a bug in AS 9.0.4 are there any patches for this version.
Regadrs,
Alireza Fattahi
Hi,
We found the pacth p3343332, which fix this bug in metalink! This patch only replaces the DataSourceUserManager which is in %ORACLE_HOME%\j2ee\home\oc4j.jar
Regards,
Alireza Fattahi
The Code is:
package com.evermind.sql;
import com.evermind.security.*;
import com.evermind.util.ObjectUtils;
import java.io.PrintStream;
import java.math.BigInteger;
import java.sql.*;
import java.util.*;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
// Referenced classes of package com.evermind.sql:
// DataSourceUser
public class DataSourceUserManager extends AbstractUserManager
public DataSourceUserManager()
dataSource = null;
dataSourceLocation = null;
groupMembershipUserField = "username";
groupMembershipGroupField = "group";
users = new HashMap();
stalenessTime = -1L;
public void init(Properties properties)
throws InstantiationException
String staleness = properties.getProperty("staleness");
String casing = properties.getProperty("casing");
if(staleness != null)
try
stalenessTime = Integer.parseInt(staleness);
catch(NumberFormatException e)
throw new InstantiationException("Invalid staleness value: '" + staleness + "', must be a valid integer");
if(casing == null || casing.equalsIgnoreCase("sensitive"))
this.casing = 1;
else
if(casing.equalsIgnoreCase("toupper"))
this.casing = 2;
else
if(casing.equalsIgnoreCase("tolower"))
this.casing = 3;
else
throw new InstantiationException("Unknown casing type: '" + casing + "'");
String location = properties.getProperty("dataSource");
if(location == null)
throw new InstantiationException("No dataSource specified");
dataSourceLocation = location;
tableName = properties.getProperty("table", properties.getProperty("tableName", "users"));
usernameField = properties.getProperty("usernameField", "username");
passwordField = properties.getProperty("passwordField", "password");
certificateIssuerField = properties.getProperty("certificateIssuerField", null);
certificateSerialField = properties.getProperty("certificateSerialField", null);
localeField = properties.getProperty("localeField", null);
groupMembershipTableName = properties.getProperty("groupMembershipTableName");
groupMembershipUserField = properties.getProperty("groupMembershipUsernameField");
groupMembershipGroupField = properties.getProperty("groupMembershipGroupField");
if(properties.getProperty("groupMembershipUsernameFieldName") != null)
groupMembershipUserField = properties.getProperty("groupMembershipUsernameFieldName");
if(properties.getProperty("groupMembershipGroupFieldName") != null)
groupMembershipGroupField = properties.getProperty("groupMembershipGroupFieldName");
debug = "true".equalsIgnoreCase(properties.getProperty("debug"));
if(groupMembershipGroupField == null)
groupMembershipGroupField = "group";
if(groupMembershipUserField == null)
groupMembershipUserField = "username";
String defaultGroupsString = properties.getProperty("defaultGroups");
if(defaultGroupsString != null)
for(StringTokenizer tokenizer = new StringTokenizer(defaultGroupsString, ", "); tokenizer.hasMoreElements(); addDefaultGroup(tokenizer.nextToken()));
public Group getGroup(String name)
if(parent != null)
return parent.getGroup(name);
else
return null;
public User createUser(String username, String password)
throws InstantiationException
username = toCase(username);
DataSourceUser user = null;
try
Connection connection = getDataSource().getConnection();
try
synchronized(this)
PreparedStatement statement = connection.prepareStatement("SELECT * FROM " + tableName + " WHERE " + usernameField + " = ?");
statement.setString(1, username);
ResultSet resultSet = statement.executeQuery();
if(resultSet.next())
resultSet.close();
statement.close();
throw new InstantiationException("User already exists");
resultSet.close();
statement.close();
statement = connection.prepareStatement("INSERT INTO " + tableName + "(" + usernameField + ", " + passwordField + ") VALUES (?, ?)");
statement.setString(1, username);
statement.setString(2, password);
statement.executeUpdate();
statement.close();
user = new DataSourceUser(this, username, password, null, null, null, stalenessTime < 0L ? 0L : System.currentTimeMillis());
synchronized(users)
users.put(username, user);
finally
try
connection.close();
catch(SQLException e) { }
catch(SQLException e)
throw new RuntimeException("SQLException: " + e.getMessage());
return user;
public User getUser(String username)
username = toCase(username);
if(debug)
System.out.println("DataSourceUserManager.getUser(" + username + ")");
User user = null;
synchronized(users)
user = (DataSourceUser)users.get(username);
if(user != null && (stalenessTime < 0L || ((DataSourceUser)user).fetchedTime >= System.currentTimeMillis() - stalenessTime))
return user;
Connection connection = null;
try
connection = getDataSource().getConnection();
try
synchronized(this)
PreparedStatement statement = connection.prepareStatement("SELECT * FROM " + tableName + " WHERE " + usernameField + "= ?");
statement.setString(1, username);
ResultSet resultSet = statement.executeQuery();
if(!resultSet.next())
resultSet.close();
statement.close();
if(parent != null)
user = parent.getUser(username);
} else
String password = resultSet.getString(passwordField);
String issuer = null;
BigInteger serial = null;
Locale locale = null;
if(certificateIssuerField != null)
issuer = resultSet.getString(certificateIssuerField);
if(certificateSerialField != null)
String serialString = resultSet.getString(certificateSerialField);
if(serialString != null)
serial = new BigInteger(serialString);
if(localeField != null)
locale = ObjectUtils.toLocale(resultSet.getString(localeField));
user = new DataSourceUser(this, username, password, issuer, serial, locale, stalenessTime < 0L ? 0L : System.currentTimeMillis());
resultSet.close();
statement.close();
synchronized(users)
users.put(username, user);
finally
try
connection.close();
catch(SQLException e) { }
catch(SQLException e)
if(debug)
System.err.println("SQLException in getUser(...):");
e.printStackTrace();
throw new RuntimeException("SQLException: " + e.getMessage());
return user;
public boolean remove(User user)
String name = user.getName();
boolean response = false;
if(name == null)
return false;
synchronized(users)
users.remove(user);
Connection connection = null;
try
connection = getDataSource().getConnection();
try
synchronized(this)
PreparedStatement statement = connection.prepareStatement("DELETE FROM " + tableName + " WHERE " + usernameField + "= ?");
statement.setString(1, name);
response = statement.executeUpdate() != 0;
statement.close();
finally
try
connection.close();
catch(SQLException e) { }
catch(SQLException e)
throw new RuntimeException("SQLException: " + e.getMessage());
return response;
public void updateUserInfo(String username, String issuer, BigInteger serial, Locale locale)
if((issuer != null || serial != null) && (certificateIssuerField == null || certificateSerialField == null))
throw new UnsupportedOperationException("certificateIssuerField or certificateSerialField not specified");
Connection connection = null;
try
connection = getDataSource().getConnection();
synchronized(this)
StringBuffer buffer = new StringBuffer();
buffer.append("update " + tableName + " set ");
boolean first = true;
if(certificateIssuerField != null)
first = false;
buffer.append(certificateIssuerField + " = ?");
if(certificateSerialField != null)
if(!first)
buffer.append(", ");
first = false;
buffer.append(certificateSerialField + " = ?");
if(localeField != null)
if(!first)
buffer.append(", ");
first = false;
buffer.append(localeField + " = ?");
buffer.append(" WHERE " + usernameField + " = ?");
PreparedStatement statement = connection.prepareStatement(buffer.toString());
int nr = 1;
if(certificateIssuerField != null)
if(issuer == null)
statement.setNull(nr++, 12);
else
statement.setString(nr++, issuer);
if(certificateSerialField != null)
if(serial == null)
statement.setNull(nr++, 12);
else
statement.setString(nr++, serial.toString());
if(localeField != null)
if(locale == null)
statement.setNull(nr++, 12);
else
statement.setString(nr++, ObjectUtils.toString(locale));
statement.setString(nr++, username);
statement.executeUpdate();
statement.close();
catch(SQLException e)
throw new RuntimeException("SQLException: " + e.getMessage());
finally
try
if(connection != null)
connection.close();
catch(SQLException e) { }
public User getUser(String issuerDN, BigInteger serial)
User user;
user = null;
if(certificateIssuerField == null || certificateSerialField == null)
break MISSING_BLOCK_LABEL_505;
if(users == null)
break MISSING_BLOCK_LABEL_131;
Map map = users;
JVM INSTR monitorenter ;
Iterator iterator = users.values().iterator();
goto _L1
_L3:
BigInteger userSerial;
user = (DataSourceUser)iterator.next();
userSerial = user.getCertificateSerial();
if(userSerial != null && userSerial.equals(serial) && issuerDN.equals(user.getCertificateIssuerDN()))
return user;
_L1:
if(iterator.hasNext()) goto L3; else goto L2
_L2:
map;
JVM INSTR monitorexit ;
break MISSING_BLOCK_LABEL_131;
Exception exception;
exception;
throw exception;
Connection connection = null;
try
connection = getDataSource().getConnection();
synchronized(this)
PreparedStatement statement = connection.prepareStatement("SELECT * FROM " + tableName + " WHERE " + certificateIssuerField + " = ? AND " + certificateSerialField + " = ?");
statement.setString(1, issuerDN);
statement.setString(2, serial.toString());
ResultSet resultSet = statement.executeQuery();
if(!resultSet.next())
resultSet.close();
statement.close();
if(parent != null)
user = parent.getUser(issuerDN, serial);
} else
String username = resultSet.getString(usernameField);
String password = resultSet.getString(passwordField);
Locale locale = null;
if(localeField != null)
locale = ObjectUtils.toLocale(resultSet.getString(localeField));
user = new DataSourceUser(this, username, password, issuerDN, serial, locale, stalenessTime < 0L ? 0L : System.currentTimeMillis());
resultSet.close();
statement.close();
synchronized(users)
users.put(username, user);
catch(SQLException e)
throw new RuntimeException("SQLException: " + e.getMessage());
finally
try
if(connection != null)
connection.close();
catch(SQLException e) { }
if(user == null && parent != null)
return parent.getUser(issuerDN, serial);
else
return user;
protected Set getGroups(DataSourceUser user)
throws SQLException
if(debug)
System.out.println("Getting groups for " + user.getName() + "...");
if(groupMembershipTableName == null)
if(debug)
System.out.println("Groups for " + user.getName() + ": <none> (no groupMembershipTableName defined)");
return null;
Connection connection = null;
Set set1;
try
connection = getDataSource().getConnection();
PreparedStatement statement = connection.prepareStatement("select " + groupMembershipGroupField + " from " + groupMembershipTableName + " where " + groupMembershipUserField + " = ?");
statement.setString(1, user.getName());
ResultSet set = statement.executeQuery();
Set response = new HashSet();
for(; set.next(); response.add(getGroup(set.getString(1))));
set.close();
statement.close();
if(debug)
System.out.println("Groups for " + user.getName() + ": " + response);
set1 = response;
finally
try
if(connection != null)
connection.close();
catch(SQLException e) { }
return set1;
protected void addToGroup(DataSourceUser user, Group group)
throws SQLException
if(groupMembershipTableName == null)
return;
Connection connection = null;
try
connection = getDataSource().getConnection();
PreparedStatement statement = connection.prepareStatement("insert into " + groupMembershipTableName + " (" + groupMembershipUserField + ", " + groupMembershipGroupField + ") values (?, ?)");
statement.setString(1, user.getName());
statement.setString(1, group.getName());
statement.executeUpdate();
statement.close();
finally
try
if(connection != null)
connection.close();
catch(SQLException e) { }
protected void removeFromGroup(DataSourceUser user, Group group)
throws SQLException
if(groupMembershipTableName == null)
return;
Connection connection = null;
try
connection = getDataSource().getConnection();
PreparedStatement statement = connection.prepareStatement("delete from " + groupMembershipTableName + " where " + groupMembershipUserField + " = ? and " + groupMembershipGroupField + " = ?");
statement.setString(1, user.getName());
statement.setString(2, group.getName());
statement.executeUpdate();
statement.close();
finally
try
if(connection != null)
connection.close();
catch(SQLException e) { }
public int getUserCount()
Connection connection;
Exception exception;
connection = null;
int i;
try
connection = getDataSource().getConnection();
PreparedStatement statement = connection.prepareStatement("select count(*) as numberOfUsers from " + tableName);
ResultSet set = statement.executeQuery();
set.next();
int count = set.getInt("numberOfUsers");
set.close();
statement.close();
i = count;
catch(SQLException e)
throw new RuntimeException("SQLException: " + e.getMessage());
finally
JVM INSTR jsr 126;
return i;
throw exception;
local;
try
if(connection != null)
connection.close();
catch(SQLException e) { }
JVM INSTR ret 7;
public List getUsers(int start, int length)
Connection connection;
Exception exception;
connection = null;
List list;
try
connection = getDataSource().getConnection();
PreparedStatement statement = connection.prepareStatement("select " + usernameField + " from " + tableName);
ResultSet set;
for(set = statement.executeQuery(); start > 0 && set.next(););
List response = new ArrayList();
for(; length > 0 && set.next(); response.add(getUser(set.getString(usernameField))));
set.close();
statement.close();
list = response;
catch(SQLException e)
throw new RuntimeException("SQLException: " + e.getMessage());
finally
JVM INSTR jsr 194;
return list;
throw exception;
local;
try
if(connection != null)
connection.close();
catch(SQLException e) { }
JVM INSTR ret 9;
public String toCase(String name)
switch(casing)
case 2: // '\002'
boolean needsToChange = false;
for(int i = 0; i < name.length(); i++)
if(!Character.isLowerCase(name.charAt(i)))
continue;
needsToChange = true;
break;
return needsToChange ? name.toUpperCase() : name;
case 3: // '\003'
boolean needsToChange = false;
for(int i = 0; i < name.length(); i++)
if(!Character.isUpperCase(name.charAt(i)))
continue;
needsToChange = true;
break;
return needsToChange ? name.toLowerCase() : name;
return name;
protected DataSource getDataSource()
if(dataSource == null)
try
InitialContext context = new InitialContext();
dataSource = (DataSource)context.lookup(dataSourceLocation);
catch(ClassCastException e)
if(debug)
e.printStackTrace();
System.out.println("DataSourceUserManager.getDataResource - Not a valid DataSource at " + dataSourceLocation);
dataSource = null;
catch(NamingException e)
if(debug)
e.printStackTrace();
System.out.println("DataSourceUserManager.getDataResource - Error in lookup of datasource : " + dataSourceLocation + " exception is " + e.getMessage());
dataSource = null;
return dataSource;
private static final int CASING_SENSITIVE = 1;
private static final int CASING_TOUPPER = 2;
private static final int CASING_TOLOWER = 3;
protected DataSource dataSource;
protected String dataSourceLocation;
protected boolean destroyed;
protected String tableName;
protected String usernameField;
protected String passwordField;
protected String certificateIssuerField;
protected String certificateSerialField;
protected String localeField;
protected boolean debug;
protected String groupMembershipTableName;
protected String groupMembershipUserField;
protected String groupMembershipGroupField;
protected Map users;
protected long stalenessTime;
protected int casing;
}
Similar Messages
-
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. -
Bug in Oracle JDBC thin driver (parameter order)
[ I'd preferably send this to some Oracle support email but I
can't find any on both www.oracle.com and www.technet.com. ]
The following program illustrates bug I found in JDBC Oracle thin
driver.
* Synopsis:
The parameters of prepared statement (I tested SELECT's and
UPDATE's) are bound in the reverse order.
If one do:
PreparedStatement p = connection.prepareStatement(
"SELECT field FROM table WHERE first = ? and second = ?");
and then bind parameter 1 to "a" and parameter to "b":
p.setString(1, "a");
p.setString(2, "b");
then executing p yields the same results as executing
SELECT field FROM table WHERE first = "b" and second = "a"
although it should be equivalent to
SELECT field FROM table WHERE first = "a" and second = "b"
The bug is present only in "thin" Oracle JDBC driver. Changing
driver to "oci8" solves the problem.
* Version and platform info:
I detected the bug using Oracle 8.0.5 server for Linux.
According to $ORACLE_HOME/jdbc/README.doc that is
Oracle JDBC Drivers release 8.0.5.0.0 (Production Release)
* The program below:
The program below illustrates the bug by creating dummy two
column table, inserting the row into it and then selecting
the contents using prepared statement. Those operations
are performed on both good (oci8) and bad (thin) connections,
the results can be compared.
You may need to change SID, listener port and account data
in getConnecton calls.
Sample program output:
$ javac ShowBug.java; java ShowBug
Output for both connections should be the same
--------------- thin Driver ---------------
[ Non parametrized query: ]
aaa
[ The same - parametrized (should give one row): ]
[ The same - with buggy reversed order (should give no answers):
aaa
--------------- oci8 driver ---------------
[ Non parametrized query: ]
aaa
[ The same - parametrized (should give one row): ]
aaa
[ The same - with buggy reversed order (should give no answers):
--------------- The end ---------------
* The program itself
import java.sql.*;
class ShowBug
public static void main (String args [])
throws SQLException
// Load the Oracle JDBC driver
DriverManager.registerDriver(new
oracle.jdbc.driver.OracleDriver());
System.out.println("Output for both connections should be the
same");
Connection buggyConnection
= DriverManager.getConnection
("jdbc:oracle:thin:@localhost:1521:ORACLE",
"scott", "tiger");
process("thin Driver", buggyConnection);
Connection goodConnection
= DriverManager.getConnection ("jdbc:oracle:oci8:",
"scott", "tiger");
process("oci8 driver", goodConnection);
System.out.println("--------------- The end ---------------");
public static void process(String title, Connection conn)
throws SQLException
System.out.println("--------------- " + title + "
Statement stmt = conn.createStatement ();
stmt.execute(
"CREATE TABLE bug (id VARCHAR(10), val VARCHAR(10))");
stmt.executeUpdate(
"INSERT INTO bug VALUES('aaa', 'bbb')");
System.out.println("[ Non parametrized query: ]");
ResultSet rset = stmt.executeQuery(
"select id from bug where id = 'aaa' and val = 'bbb'");
while (rset.next ())
System.out.println (rset.getString (1));
System.out.println("[ The same - parametrized (should give one
row): ]");
PreparedStatement prep = conn.prepareStatement(
"select id from bug where id = ? and val = ?");
prep.setString(1, "aaa");
prep.setString(2, "bbb");
rset = prep.executeQuery();
while (rset.next ())
System.out.println (rset.getString (1));
System.out.println("[ The same - with buggy reversed order
(should give no answers): ]");
prep = conn.prepareStatement(
"select id from bug where id = ? and val = ?");
prep.setString(1, "bbb");
prep.setString(2, "aaa");
rset = prep.executeQuery();
while (rset.next ())
System.out.println (rset.getString (1));
stmt.execute("DROP TABLE bug");
nullHorea
In the ejb-jar.xml, in the method a cursor is closed, set <trans-attribute>
to "Never".
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name></ejb-name>
<method-name></method-name>
</method>
<trans-attribute>Never</trans-attribute>
</container-transaction>
</assembly-descriptor>
Deepak
Horea Raducan wrote:
Is there a known bug in Oracle JDBC thin driver version 8.1.6 that would
prevent it from closing the open cursors ?
Thank you,
Horea -
Bug in oracle portal: problem in pl/sql item type
I created a pl/sql item type... based on a stored proc... whenever I make a change to the store proc I have to readd the item based on this item type since the result on the item type is not updated is this some bug in oracle portal
I created a pl/sql item type... based on a stored proc... whenever I make a change to the store proc I have to readd the item based on this item type since the result on the item type is not updated is this some bug in oracle portal
-
Sir,i know it very clearly that ,primary key column ,can not be null.
But the bug in oracle is that,
when first time ,i tried to ALTER the primary key column in the table,to accept NULL,
oracle shows the message that ,"TABLE ALTERED."
But when i queried the USER_TAB_COLUMNS,data dictionary ,i found that the primary column,is actually NOT ALTERED AT ALL,TO ACCEPT NULL VALUES.
Although oracle is enforcing the rule that,PRIMARY KEY COLUMN CAN NOT BE NULL ,but how ORACLE GENERATED THE FALSE MESSAGE THAT -"Table Altered".
where as the DDL operation was not successful.
But when second time ,i tried to ALTER the primary key column,to accept NULL,
oracle shows the message that ,
ORA-01451: column to be modified to NULL cannot be modified to NULL
So what i am saying is that,why oracle show me the correct ,message ,
"ORA-01451: column to be modified to NULL cannot be modified to NULL",
at the second time DDL operation ,rather than showing me at the first time DDL operation.
And how even if ,at the first time, the DLL operation was not successful,
how oracle shows the false message that "Table Altered".
Please go through the steps as i have mentioned below ,to ALTER TABLE,then you can find the problem.
I have gone through steps like this.
-->Suppose in a Employee table,EMP_ID column is primary key
-->I tried to alter EMP_ID column to accept NULL values,
but it generates error
ALTER TABLE EMPLOYEE
MODIFY (EMP_ID NULL);
ORA-01451: column to be modified to NULL cannot be modified to NULL
-->So i tried ,to alter EMP_ID column to NOT NULL,
and i got message ,Table altered.
ALTER TABLE EMPLOYEE
MODIFY (EMP_ID NOT NULL);
-->Then i tried to alter EMP_ID column to accept NULL values,
but THIS TIME IT DOES NOT GENERATES ANY ERROR,
and i got message ,Table altered.
ALTER TABLE EMPLOYEE
MODIFY (EMP_ID NULL);
But when again ,i run the same statement again,it generates error
ORA-01451: column to be modified to NULL cannot be modified to NULLPlease don't post duplicate threads.
{thread:id=1100939} -
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 JDBC thin driver 8.1.6 ?
Is there a known bug in Oracle JDBC thin driver version 8.1.6 that would
prevent it from closing the open cursors ?
Thank you,
HoreaHorea
In the ejb-jar.xml, in the method a cursor is closed, set <trans-attribute>
to "Never".
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name></ejb-name>
<method-name></method-name>
</method>
<trans-attribute>Never</trans-attribute>
</container-transaction>
</assembly-descriptor>
Deepak
Horea Raducan wrote:
Is there a known bug in Oracle JDBC thin driver version 8.1.6 that would
prevent it from closing the open cursors ?
Thank you,
Horea -
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's handling of transaction isolation levels?
Hello,
I think there is a bug in Oracle 9i database related to serializable transaction isolation level.
Here is the information about the server:
Operating System: Microsoft Windows 2000 Server Version 5.0.2195 Service Pack 2 Build 2195
System type: Single CPU x86 Family 6 Model 8 Stepping 10 GenuineIntel ~866 MHz
BIOS-Version: Award Medallion BIOS v6.0
Locale: German
Here is my information about the client computer:
Operaing system: Microsoft Windows XP
System type: IBM ThinkPad
Language for DB access: Java
Database information:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
The database has been set up using the default settings and nothing has been changed.
To reproduce the bug, follow these steps:
1. Create a user in 9i database called 'kaon' with password 'kaon'
2. Using SQL Worksheet create the following table:
CREATE TABLE OIModel (
modelID int NOT NULL,
logicalURI varchar (255) NOT NULL,
CONSTRAINT pk_OIModel PRIMARY KEY (modelID),
CONSTRAINT logicalURI_OIModel UNIQUE (logicalURI)
3. Run the following program:
package test;
import java.sql.*;
public class Test {
public static void main(String[] args) throws Exception {
java.util.Locale.setDefault(java.util.Locale.US);
Class.forName("oracle.jdbc.OracleDriver");
Connection connection=DriverManager.getConnection("jdbc:oracle:thin:@schlange:1521:ORCL","kaon","kaon");
DatabaseMetaData dmd=connection.getMetaData();
System.out.println("Product version:");
System.out.println(dmd.getDatabaseProductVersion());
System.out.println();
connection.setAutoCommit(false);
connection.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
int batches=0;
int counter=2000;
for (int outer=0;outer<50;outer++) {
for (int i=0;i<200;i++) {
executeUpdate(connection,"INSERT INTO OIModel (modelID,logicalURI) VALUES ("+counter+",'start"+counter+"')");
executeUpdate(connection,"UPDATE OIModel SET logicalURI='next"+counter+"' WHERE modelID="+counter);
counter++;
connection.commit();
System.out.println("Batch "+batches+" done");
batches++;
protected static void executeUpdate(Connection conn,String sql) throws Exception {
Statement s=conn.createStatement();
try {
int result=s.executeUpdate(sql);
if (result!=1)
throw new Exception("Should update one row, but updated "+result+" rows, query is "+sql);
finally {
s.close();
The program prints the following output:
Product version:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
Batch 0 done
Batch 1 done
java.lang.Exception: Should update one row, but updated 0 rows, query is UPDATE OIModel SET logicalURI='next2571' WHERE modelID=2571
at test.Test.executeUpdate(Test.java:35)
at test.Test.main(Test.java:22)
That is, after several iterations, the executeUpdate() method returns 0, rather than 1. This is clearly an error.
4. Leave the database as is. Replace the line
int counter=2000;
with line
int counter=4000;
and restart the program. The following output is generated:
Product version:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
Batch 0 done
Batch 1 done
java.sql.SQLException: ORA-08177: can't serialize access for this transaction
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:796)
at test.Test.executeUpdate(Test.java:33)
at test.Test.main(Test.java:22)
This is clearly an error - only one transaction is being active at the time, so there is no need for serialization of transactions.
5. You can restart the program as many times you wish (by chaging the initial counter value first). The same error (can't serialize access for this transaction) will be generated.
6. The error doesn't occur if the transaction isolation level isn't changed.
7. The error doesn't occur if the UPDATE statement is commented out.
Sincerely yours
Boris MotikI have a similar problem
I'm using Oracle and serializable isolation level.
Transaction inserts 4000 objects and then updates about 1000 of these objects.
Transactions sees inserted objects but cant update them (row not found or can't serialize access for this transaction are thrown).
On 3 tries for this transaction 1 succeds and 2 fails with one of above errors.
No other transactions run concurently.
In read commited isolation error doesn't arise.
I'm using plain JDBC.
Similar or even much bigger serializable transaction works perfectly on the same database as plsql procedure.
I've tried oci and thin (Oracle) drivers and oranxo demo (i-net) driver.
And this problems arises on all of this drivers.
This problem confused me so much :(.
Maby one of Oracle users, developers nows cause of this strange behaviour.
Thanx for all answers. -
Bug in Oracle 9.2.0.1.0.
I have found a bug in Oracle 9.2.0.1.0.
Here is the bug analysis.
Step 1:
CREATE TABLE T1 ( ENO NUMBER, ENAME VARCHAR2(100));
Step 2:
CREATE TABLE T2 (DNAME VARCHAR2(1000));
Step 3:
INSERT INTO T1 VALUES (1,’KARTHIK’);
Step 4:
INSERINTO T2 VALUES ('VENKATRAMAN');
Commit;
Now try executing this command,
Command:
SELECT * FROM T1 WHERE ENO IN (SELECT ENO FROM T2);
Here table T2 does not contain “ENO”.
But the query returns,
Output:
=====
ENAME
DNAME
1
KARTHIK
VENKATRAMAN
“ENO” column is being fetched from the main query with table T1 and not from the sub query with table T1.
Please verify this bug and kindly provide a response.
Regards,
KarthikWell, heres my test (10g, for I dont have a 9.2.0.1.0, but I think it´d show the same result):
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> select *
2 from t1;
ENO ENAME
1 KARTHIK
SQL> select *
2 from t2;
DNAME
VENKATRAMAN
SQL> select *
2 from t1
3 where eno in (select eno from t2);
ENO ENAME
1 KARTHIK
SQL> alter table t2 add (eno number);
Table altered.
SQL> select *
2 from t1
3 where eno in (select eno from t2);
no rows selected
SQL> alter table t2 drop (eno);
Table altered.
SQL> select *
2 from t1
3 where eno in (select t2. eno from t2);
where eno in (select t2. eno from t2)
ERROR at line 3:
ORA-00904: "T2"."ENO": invalid identifier
SQL>
But he is getting output of table T2 too se his last postI don´t think so, because he didn´t SELECT it. Would be nice to just copy & paste the output...
Regards,
Gerd -
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? -
Bug in Oracle JDBC Drivers with {ts ?}
Oracle fails to set bind variables correctly when using the {ts ?} in an insert. It works ok if you use {d ?}.
Ex:
String st = "INSERT INTO BL(NM,TSTAMP) VALUES (?,{ts ?} )";
System.out.println(dbConn.nativeSQL(st));
java.sql.PreparedStatement stmt = dbConnn.prepareStatement(st);
stmt.setString(1,"test");
stmt.setString(2,"2000-08-18 09:33:45");
int xx = stmt.executeUpdate();
Oracle Reports:
INSERT INTO BL (NM,TSTAMP) VALUES (:1,TO_DATE (?, 'YYYY-MM-DD HH24:MI:SS'))
ConnectionPoolManager failed:java.sql.SQLException: ORA-00911: invalid character
Notice the ? doesn't change to :2.
Whoops.
Also when does Oracle plan to implement {fn }
scalars. There are work arounds but they are not portable. If not soon we will switch our suggested database for our clients.
nullHorea
In the ejb-jar.xml, in the method a cursor is closed, set <trans-attribute>
to "Never".
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name></ejb-name>
<method-name></method-name>
</method>
<trans-attribute>Never</trans-attribute>
</container-transaction>
</assembly-descriptor>
Deepak
Horea Raducan wrote:
Is there a known bug in Oracle JDBC thin driver version 8.1.6 that would
prevent it from closing the open cursors ?
Thank you,
Horea
Maybe you are looking for
-
Hello All, I seem to have sprung a leak and cannot work out what is going wrong. I return a result set from a class to jsp, I cannot close this resultset before it is passed back, however I do close it in the jsp after use. Do I actually have two con
-
How can i get my Mac book pro if i lost it?
Me robaron mi Mac book pro y quiero saber si hay manera de recuperarla por rastreo
-
I currently have an old work phone that is synced to my iPad. I would like to delete the old work phone number from my iCloud without having to contact my previous employer. Is there a way to do this from my ipad and replace it with my personal iPhon
-
Edit Tab has this code loaded : FND POPIDR APPL_SHORT_NAME="SQLGL" CODE="GL#" NUM=:$FLEX$.GL_SRS_COA_UNVALIDATED REQUIRED="Y" VALIDATE="NONE" SEG=":!VALUE" DESC=":!MEANING" NAVIGATE="!DIR" VDATE="" And from how and where this NUM is mapped to that wh
-
Error message Error! Check Activation.
I just upgraded to Adobe Digital Editions 4.0.1.101645 on my Windows 8.1 machine. The hardware is ASUS and the antivirus is Kaspersky. McAffee was bundled with the machine, I don't use it, but I don't know if it is completely removed. I cannot add