Using Oracle 8i db with creator
Hi there, could someone please help me, I'm trying to use an 8i database, I added an 8i driver to creator, I can see the tables in creator and run queries but as soon as I try to bind it to a control it gives an error. The program works fine if I use a 9i db.
Here is my databse url: jdbc:oracle:thin:@mp1hs022:1521:DFM1
Thanks in advance for any help.
Hi,
Could you please tell us what is the error you are getting? Also what is the control to which you are trying to bind. That would help us in understanding the problem better.
Cheers
Giri
Similar Messages
-
Can I use Oracle app server with mysql
Can I use Oracle app server with mysql. I seem to have the following error when trying to create a datastore. I have mysql.jar in my classpath. Can any one tell me what's wrong.
Error initializing data-source 'jdbc/topup': DriverManagerDataSource driver 'org.gjt.mm.mysql.Driver' not foundYes you can forward requests from your own apache to the iAS. This can be done using mod_proxy. Some hints about how to do this are availlable on this forum.
mod_oc4j is not a standard apache module, and therefore is not availlable when you download apache. There is no apparent reason to use mod_oc4j on a "regular" webserver (unless you want to build your own iAS). Also there might be some licenseing issues with using mod_oc4j module on a standard apache.
You can encrypt data that is passed from a random Apache to you iAS. -
Workaround for using Oracle JDBC extension with WLS pooling
Reading the newsgroup I saw that many of us encountered the problems
with ClassCastException when tried to use Oracle JDBC extension
with WLS pooling. I also had.
In this case BEA recommends to use dangerous
method getVendorConnection() which exposes
the physical connection object to your code.
Yes it's really dangerous because of unsafe usage may breaks
WLS pooled connection(s).
Moreover, this practice will make your JDBC code
unportable (your JDBC code in addition to Oracle dependence
became Weblogic dependent):
void doSmth() {
Connection con = ...;
Connection vCon = ((WLConnection)con).getVendorConnection();
// + mess of usage con in one places and vCon in others
// (where Oracle extensions are needed)
// !Don't forget to don't close vCon!
Sux.
I found the workaround.
Introduction
============
Yes the real cause of ClassCastException is that
in depth of Oracle driver the casting
to class oracle.jdbc.driver.OracleConnection
(not to interface oracle.jdbc.OracleConnection)
is performed.
Someone can say that this is bug or pure desing.
Weblogic pooled connection provide dynamic
implementation for all public interfaces
which real physical (wrapped) connection object implements.
Great feature!
But I guess that all interface methods implemented
by simple call-delegation to physical (wrapped) connection object.
In case of oracle.jdbc.OracleConnection interface
this approach doesn't work for at least one its method:
public OracleConnection unwrap()
WLS pooled connection shoudn't implement this method by
delegation to physical connection object BUT should
return physical connection object itself!
// Wrong implementation of unwrap()
// delegation is used
public OracleConnection unwrap() {
return physicalConnection.unwrap();
// Right implementation of unwrap()
// physical connection returned
public OracleConnection unwrap() {
return physicalConnection;
Workaround
==========
1. Develop your own OracleConnection wrapper class:
import oracle.jdbc.OracleConnection;
import weblogic.jdbc.extensions.WLConnection;
public class MyOracleConnectionImpl implements OracleConnection {
private OracleConnection con;
public MyOracleConnectionImpl(OracleConnection connection)
throws SQLException
this.con = connection;
public OracleConnection unwrap() {
return (OracleConnection)
((WLConnection)con).getVendorConnection();
/* Implement all other methods by delegation to con object */
2. Don't get Connections directly from DataSource --
develop your own simple (may be static) utility
class which retrives Connections from dataSource
and returns them wrapped into your MyOracleConnectionImpl
to your code from some method:
puclic abstract class MyConnectionSource {
public static Connection getConnection() {
Connection con = // get it from DataSource
return new MyOracleConnectionImpl((OracleConnection)con);
3. Add attribute RemoveInfectedConnectionsEnabled="false"
to definition of your JDBCConnectionPool within config.xml
You may do it because of you `safely` use vendorConnection --
you don't expose it to application code.
4. Enjoy the Oracle JDBC extensions in your code!
Example:
Connection con = MyConnectionSource.getConnection;
ArrayDescriptor add =
ArrayDescriptor.createDescriptor("your_type", con);
Hope it helps to someone.
Best regards,
Eugene VoytitskyHello Eugene Voytitsky,
Thanks Eugene Voytitsky for your idea
I have tried the solution suggested by You, but it did not work.
It still throws ClassCastException.
I am sorry for posting the whole code of two classes below.
I did this to give you more clarity.
I am also indicating the place where the exception was thrown..
Please let me know if I am doing something wrong.
OracleConnection Wrapper class
package ejbTesting;
// sql imports
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Statement;
// util imports
import java.util.Map;
import java.util.Properties;
// imports from Oracle Driver Classes
import oracle.jdbc.OracleConnection;
import oracle.jdbc.OracleOCIFailover;
import oracle.jdbc.OracleSavepoint;
// import from Weblogic extensions
import weblogic.jdbc.extensions.WLConnection;
public class WeblogicConnectionWrapper implements OracleConnection
// oracle connection object
private OracleConnection connection;
public WeblogicConnectionWrapper (OracleConnection orclConnection)
try
this.connection = orclConnection;
catch(Exception unexpected )
unexpected.printStackTrace();
public OracleConnection unwrap()
try
// The datasource returns a weblogic.jdbc.pool.Connection
// This needs to be type casted to weblogic.jdbc.extensions.WLConnection
// Only this weblogic.jdbc.extensions.WLConnection CAN BE type casted
// to OracleConnection
return (OracleConnection) ((WLConnection) connection).getVendorConnection();
catch(Exception sqlException )
sqlException.printStackTrace ();
return null;
/* Implement all other methods by delegation to connection object */
public Connection _getPC()
return connection._getPC();
public void archive(int i, int j, String s)
throws SQLException
connection.archive(i, j, s);
public void assertComplete()
throws SQLException
connection.assertComplete();
public void clearWarnings()
throws SQLException
connection.clearWarnings();
public void close()
throws SQLException
connection.close();
public void commit()
throws SQLException
connection.commit();
public Statement createStatement()
throws SQLException
return connection.createStatement();
public Statement createStatement(int i, int j)
throws SQLException
return connection.createStatement(i, j);
public boolean getAutoClose()
throws SQLException
return connection.getAutoClose();
public boolean getAutoCommit()
throws SQLException
return connection.getAutoCommit();
public CallableStatement getCallWithKey(String s)
throws SQLException
return connection.getCallWithKey(s);
public String getCatalog()
throws SQLException
return connection.getCatalog();
public boolean getCreateStatementAsRefCursor()
return connection.getCreateStatementAsRefCursor();
public int getDefaultExecuteBatch()
return connection.getDefaultExecuteBatch();
public int getDefaultRowPrefetch()
return connection.getDefaultRowPrefetch();
public Object getDescriptor(String s)
return connection.getDescriptor(s);
public boolean getExplicitCachingEnabled()
throws SQLException
return connection.getExplicitCachingEnabled();
public boolean getImplicitCachingEnabled()
throws SQLException
return connection.getImplicitCachingEnabled();
public boolean getIncludeSynonyms()
return connection.getIncludeSynonyms();
public Object getJavaObject(String s)
throws SQLException
return connection.getJavaObject(s);
public DatabaseMetaData getMetaData()
throws SQLException
return connection.getMetaData();
public Properties getProperties()
return connection.getProperties();
public boolean getRemarksReporting()
return connection.getRemarksReporting();
public boolean getRestrictGetTables()
return connection.getRestrictGetTables();
public String getSQLType(Object obj)
throws SQLException
return connection.getSQLType(obj);
public String getSessionTimeZone()
return connection.getSessionTimeZone();
public int getStatementCacheSize()
throws SQLException
return connection.getStatementCacheSize();
public PreparedStatement getStatementWithKey(String s)
throws SQLException
return connection.getStatementWithKey(s);
public int getStmtCacheSize()
return connection.getStmtCacheSize();
public short getStructAttrCsId()
throws SQLException
return connection.getStructAttrCsId();
public boolean getSynchronousMode()
return connection.getSynchronousMode();
public int getTransactionIsolation()
throws SQLException
return connection.getTransactionIsolation();
public Map getTypeMap()
throws SQLException
return connection.getTypeMap();
public String getUserName()
throws SQLException
return connection.getUserName();
public boolean getUsingXAFlag()
return connection.getUsingXAFlag();
public SQLWarning getWarnings()
throws SQLException
return connection.getWarnings();
public boolean getXAErrorFlag()
return connection.getXAErrorFlag();
public boolean isClosed()
throws SQLException
return connection.isClosed();
public boolean isLogicalConnection()
return connection.isLogicalConnection();
public boolean isReadOnly()
throws SQLException
return connection.isReadOnly();
public String nativeSQL(String s)
throws SQLException
return connection.nativeSQL(s);
public Object openJoltConnection(String s, short word0, short word1)
return connection.openJoltConnection(s, word0, word1);
public void oracleReleaseSavepoint(OracleSavepoint oraclesavepoint)
throws SQLException
connection.oracleReleaseSavepoint(oraclesavepoint);
public void oracleRollback(OracleSavepoint oraclesavepoint)
throws SQLException
connection.oracleRollback(oraclesavepoint);
public OracleSavepoint oracleSetSavepoint()
throws SQLException
return connection.oracleSetSavepoint();
public OracleSavepoint oracleSetSavepoint(String s)
throws SQLException
return connection.oracleSetSavepoint(s);
public int pingDatabase(int i)
throws SQLException
return connection.pingDatabase(i);
public CallableStatement prepareCall(String s)
throws SQLException
return connection.prepareCall(s);
public CallableStatement prepareCall(String s, int i, int j)
throws SQLException
return connection.prepareCall(s, i, j);
public CallableStatement prepareCallWithKey(String s)
throws SQLException
return connection.prepareCallWithKey(s);
public PreparedStatement prepareStatement(String s)
throws SQLException
return connection.prepareStatement(s);
public PreparedStatement prepareStatement(String s, int i, int j)
throws SQLException
return connection.prepareStatement(s, i, j);
public PreparedStatement prepareStatementWithKey(String s)
throws SQLException
return connection.prepareStatementWithKey(s);
public void purgeExplicitCache()
throws SQLException
connection.purgeExplicitCache();
public void purgeImplicitCache()
throws SQLException
connection.purgeImplicitCache();
public void putDescriptor(String s, Object obj)
throws SQLException
connection.putDescriptor(s, obj);
public void registerApiDescription(String s, short word0, short word1, String
s1)
connection.registerApiDescription(s, word0, word1, s1);
public void registerSQLType(String s, Class class1)
throws SQLException
connection.registerSQLType(s, class1);
public void registerSQLType(String s, String s1)
throws SQLException
connection.registerSQLType(s, s1);
public void registerTAFCallback(OracleOCIFailover oracleocifailover, Object
obj)
throws SQLException
connection.registerTAFCallback(oracleocifailover, obj);
public void rollback()
throws SQLException
connection.rollback();
public void setAutoClose(boolean flag)
throws SQLException
connection.setAutoClose(flag);
public void setAutoCommit(boolean flag)
throws SQLException
connection.setAutoCommit(flag);
public void setCatalog(String s)
throws SQLException
connection.setCatalog(s);
public void setCreateStatementAsRefCursor(boolean flag)
connection.setCreateStatementAsRefCursor(flag);
public void setDefaultExecuteBatch(int i)
throws SQLException
connection.setDefaultExecuteBatch(i);
public void setDefaultRowPrefetch(int i)
throws SQLException
connection.setDefaultRowPrefetch(i);
public void setExplicitCachingEnabled(boolean flag)
throws SQLException
connection.setExplicitCachingEnabled(flag);
public void setImplicitCachingEnabled(boolean flag)
throws SQLException
connection.setImplicitCachingEnabled(flag);
public void setIncludeSynonyms(boolean flag)
connection.setIncludeSynonyms(flag);
public void setReadOnly(boolean flag)
throws SQLException
connection.setReadOnly(flag);
public void setRemarksReporting(boolean flag)
connection.setRemarksReporting(flag);
public void setRestrictGetTables(boolean flag)
connection.setRestrictGetTables(flag);
public void setSessionTimeZone(String s)
throws SQLException
connection.setSessionTimeZone(s);
public void setStatementCacheSize(int i)
throws SQLException
connection.setStatementCacheSize(i);
public void setStmtCacheSize(int i)
throws SQLException
connection.setStmtCacheSize(i);
public void setStmtCacheSize(int i, boolean flag)
throws SQLException
connection.setStmtCacheSize(i, flag);
public void setSynchronousMode(boolean flag)
connection.setSynchronousMode(flag);
public void setTransactionIsolation(int i)
throws SQLException
connection.setTransactionIsolation(i);
public void setTypeMap(Map map)
throws SQLException
connection.setTypeMap(map);
public void setUsingXAFlag(boolean flag)
connection.setUsingXAFlag(flag);
public void setWrapper(OracleConnection oracleconnection)
connection.setWrapper(oracleconnection);
public void setXAErrorFlag(boolean flag)
connection.setXAErrorFlag(flag);
public void shutdown(int i)
throws SQLException
connection.shutdown(i);
public void startup(String s, int i)
throws SQLException
connection.startup(s, i);
Util class to get Wrapped Connections from
datasource
package ejbTesting;
// j2ee imports
import javax.naming.InitialContext;
import javax.sql.DataSource;
// sql imports
import java.sql.Connection;
// imports from Oracle Driver Classes
import oracle.jdbc.OracleConnection;
* Wrapper class for the DataSource Connection from Weblogic pool
public class DataSourceConnectionWrapper
// datasource variable
private static transient DataSource datasource = null;
private static String dbName = "jdbc/workbench";
* Method that returns the database connection
public static Connection getConnection()
try
// initialsing the datasource object
initialiseDataSource ();
// Getting a connection from the datasource
Connection con = datasource.getConnection( );
// wrapping it custom wrapper class and
// returning the connection object
return new WeblogicConnectionWrapper((OracleConnection)con);
catch(Exception exception )
exception.printStackTrace();
return null;
private static void initialiseDataSource( ) throws Exception
if ( datasource == null )
try
InitialContext ic = new InitialContext( );
datasource = (DataSource) ic.lookup( dbName );
catch (Exception ne )
throw new Exception( "NamingException while looking up DataSource with
JNDI name" +
dbName + ": \n" + ne.getMessage( ) );
Exception Stack Trace
The line 46 in DataSourceConnectionWrapper
corresponds to
return new WeblogicConnectionWrapper((OracleConnection)con);
Which I feel is logical as the connection which we get from Weblogic
datasource cannot be type casted to OracleConnection
java.lang.ClassCastException: weblogic.jdbc.pool.Connection
at ejbTesting.DataSourceConnectionWrapper.getConnection(DataSourceConnectionWrapper.java:46) -
Advantages and Disadvantages of Using Oracle 7 Client with Oracle 9 Server
Hello,
I was wondering what are the advanatges of using Oracle 7 client with Oracle 9 Server versus using Oracle 9 Client with Oracle 9 server.Some years ago I used 7.3 Client with 9i DB, and I don't remember of particular problems, but I'm speaking of Sql*Plus only. Are there specific problems ?
Of course the best thing is to install one 9i Client (did you already do it ?) : if there are same problems, then that's not compatibility issue.
And what are advantages of using 9 Client with 9 server other than 7 is no longer supported.You're sure you won't have compatibility problems.
If you have access to Metalink have a look at [url http://metalink.oracle.com/metalink/plsql/ml2_documents.showFrameDocument?p_database_id=NOTE&p_id=207303.1]Note 207303.1 -
Using Ajax4Jsf or AjaxAnywhere with Creator
Is it possible to use Ajax4Jsf or AjaxAnywhere with Creator applications?
Hi Igor,
How do the Sun's UI tag fit in Exadel studio? Right no the custom tags are not rendering during design time in Exadel. Do Exadel have the same features that are given in SunStudio and My Eclipse?
What addition and what not? I know you are the VP involved in active campaign in various news groups like Serverside.com, Java and Eclipse forums.
Exadel is not having right AJAX examples in the website. Intellij has given some good AJAX Demos
http://www.jetbrains.com/idea/training/how_to_start.html
Regards,
(Shankar .Pattabiraman)
Senior Engineer Development -
Is it possible to use Oracle Forms 10g with Oracle 10g Lite Database?
Hi All,
We are in process of migrating our forms from 6i to 10g environment.
We have two kinds of applications, one set run on general Oracle 11g database and the other set of forms run at the client machine using Oracle lite database.
We dont have any problem with Forms 6i to connect to Lite database as it allows to connect through ODBC:DSN names. When we try to connect to a lite database (10gR3) from Forms 10g through ODBC/DSN, it's not allowing and throwing the below error.
ORA-03121 : no interface driver connected - function not performed
Can someone tell me if there is something wrong in our approach? Also advise how to use Oracle Lite database with Forms 10G.
Sincerely,
Praveen ManthenaHi,
I have experience with 6i with lite database 10g. There are two version of lite database one is multi language support and other one in english. There lang problem in connectivity with multi language 10g lite database. I done connectivity with single language connectivity of 6i with 10g lite database. You should try this one with forms 10g.
Regards,
Naveed Ali -
Using Oracle Dataguard 10g With Oracle EBS
Hello,
I am working on Linux with Oracle Database 10g and Oracle EBS R12 and trying to configure Oracle Data Guard with Oracle EBS. I have been reading Oracle My Support Document (Business Continuity for Oracle E-Business Release 12 Using Oracle 11g Physical Standby Database [ID 1070033.1] ).
Please let me know of any another useful documents. It will also be helpful if anyone could share real time experiences.
Thank you.Hi,
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/prod/ha/dataguard/physstby/physstdby.htm
http://www.oracle.com/technetwork/database/features/availability/dataguardoverview-083155.html
Regards
Yoonas -
Is it possible to use Oracle Memebership Providers with Oracle Express
I am using Oracle Express as development database and I was able to create the ORA_ASPNET_ tables and procedures but when I try to use Microsofts "ASP .NET Configuration" tool to create users and roles I get this error message: OracleConnection.ConnectionString is invalid
When I use the connection string in code to connect to the database I am successful, I am able to open and close a connection to the Oracle Express database.
This is the connection string I am using: <add name="OraAspNetConString2" connectionString="DATA SOURCE=localhost:1521/XE;ENLIST=false;METADATA POOLING=False;PASSWORD=CREDENTIALSMGR;PERSIST SECURITY INFO=True;STATEMENT CACHE PURGE=True;USER ID=CREDENTIALSMGR;" providerName="Oracle.DataAccess.Client"/>
So I am wondering why when I run the application and the membership class tries to verify the user I get the error message: OracleConnection.ConnectionString is invalid
I have been looking at this a couple of days now so not sure what the problem is, any help?I suggest that update your machine.config file under your
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG.
There is one following entry. You may try to update the
connectionString with a valid string value.
<add name="OraAspNetConString" connectionString=" " /> -
How to use oracle collection type with JDBC?
I try to use oracle collection type in java program. So I made some package and java program, however Java program was not found "package.collectiontype"(JDBC_ERP_IF_TEST.NUM_ARRAY) . please, show me how to use this.
Java Version : Java 1.4
JDBC Driver : Oracle Oci Driver
DB: Oracle 9i
No 1. Package
===========================================
create or replace package JDBC_ERP_IF_TEST AS
type NUM_ARRAY is table of number;
procedure JDBC_ERP_IF_ARRAY_TEST(P_NUM_ARRAY IN NUM_ARRAY, ERR_NO OUT NUMBER, ERR_TEXT OUT VARCHAR2);
procedure TEST(ABC IN NUMBER);
END JDBC_ERP_IF_TEST;
==================================================
No 2. Package Body
===============================================
CREATE OR REPLACE package BODY JDBC_ERP_IF_TEST is
procedure JDBC_ERP_IF_ARRAY_TEST(p_num_array IN NUM_ARRAY,
ERR_NO OUT NUMBER,
ERR_TEXT OUT VARCHAR2) is
begin
ERR_NO := 0;
ERR_TEXT := '';
dbms_output.enable;
for i in 1 .. p_num_array.count() loop
dbms_output.put_line(p_num_array(i));
insert into emp (empno) values (p_num_array(i));
commit;
end loop;
EXCEPTION
WHEN OTHERS THEN
ERR_NO := SQLCODE;
ERR_TEXT := ERR_TEXT ||
' IN JDBC INTERFACE TEST FOR ORACLE ERP OPEN API..';
ROLLBACK;
RETURN;
end JDBC_ERP_IF_ARRAY_TEST;
procedure TEST(ABC IN NUMBER) IS
begin
insert into emp(empno) values (ABC);
commit;
end TEST;
end JDBC_ERP_IF_TEST;
===============================================
NO 3. Java Program
===============================================
ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor("JDBC_ERP_IF_TEST.NUM_ARRAY", getConnection());
ARRAY array = new ARRAY(descriptor, getConnection(), arrs);
cstmt = getConnection().prepareCall(LQueryFactory.getInstance().get("Meta/Basic/testJdbcErpArrayIf").getSql());
cstmt.setArray(1, array);
cstmt.registerOutParameter(2, Types.INTEGER);
cstmt.registerOutParameter(3, Types.VARCHAR);
====================================================
couldn't find this phase => JDBC_ERP_IF_TEST.NUM_ARRAY
what can i do for this package and program? please help me..Something like this:
create or replace type t_record as object (
id number,
no number
CREATE or replace type t_table AS TABLE OF t_record;
set serveroutput on
declare
v_table t_table := t_table();
v_t1 t_table := t_table();
begin
v_table.extend(1);
v_table(1).ID := 1;
v_table(1).No := 10;
v_table.extend(1);
v_table(2).ID := 2;
v_table(2).ID := 20;
SELEC t_record (ID,NO) BULK COLLECT INTO v_t1
from TableA
FROM TABLEA
WHERE ID IN (select t.ID from table(v_Table) t);
for i in 1..v_t1.count loop
dbms_output.put_line(v_t1(i).ID);
dbms_output.put_line(v_t1(i).No);
end loop;
end;
/Untested!
P;
Edited by: bluefrog on Mar 5, 2010 5:08 PM -
Using oracle thin driver with to_char gives invalid column name
select x,y,z, to_char(event_time,'YYYY-MMM-DD') from eventtable;
if i execute the above query using oracle thin driver it gives me invalid column name. It works fine if i use weblogic driver. So what could be the problem ???
thanks.Sorry , forgot to add that 'YYYY-MM-DD' or 'YYYY-Month-DD' or 'Year-MM-DD' or 'Year-Month-DD' are also allowed(please cheek also for other combinations), not 'YYYY-MMM-DD'.
Thanks -
How to use oracle thin driver with jsp?...pls help
Hello. I am trying to insert a word file into my Oracle 9i database using JSP. I have tomcat running as my standalone server. So far, i have been using the sun.jdbc.odbc driver to implement all my DB accesses. Recently however, i found out that in order to use Oracle specific objects such as BLOBS or BFILES, i have to use the oracle thin driver or OCI driver.
So far, i have downloaded the thin driver and put it into the tomcat shared/common folder and also put the .jar file into my classpath. Now, i am having trouble as to how to call the oracle thin driver inside my JSP code.
My previous code read as:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:Andy","user","pass");
How do i switch over to the oracle thin driver in JSP? Any help would be much appreciated. Thank you
Andrewmy code is:
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection(sConnStr, sUser, sPassword);
notice the driver --"oracle.jdbc.driver.OracleDriver"!
and copy the class12.zip to lib path
if still not work
change the class12.zip to class12.jar
good luck -
Using oracle in combination with the mean-stack
Hi all,
I have been exploring the mean stack and saw the oracle-nodejs-passing by.
I am wondering what the best way is to replace/combine the mongodb with an oracle db (11g).
At this moment I have tried using mongoose for schema's and an json to XML parser to retrieve an xml-representation of the object I want to save.
To do some dml in the db I created some procedures which uses the xmltype in combination with xquery to update/insert.
Although it is working I am wondering this is the way to go. What are your experiences?
Regards,
RomanoThe way to go is to use node-oracledb with Oracle 12.1.0.2 JSON datatype support: http://docs.oracle.com/database/121/ADXDB/json.htm
However, since you are still on 11g, using stored procedures to encapsulate logic seems like a good start.
You'll lose some performance using any ORM: do you really need one? -
Using Oracle thin driver with Weblogic 6.1
hi all,
i am trying to create a ConnectionPool using WLS6.1 and Oracle 8.0.5.
Since i cannot use the weblogic driver (due to the old version of oracle that
i have)
i am trying to use instead the oracle thin driver.
i configured my pool as follows:
URL jdbc:oracle:[email protected]:1521:ORC1
Driver oracle.jdbc.Driver.OracleDriver
Propeties user=SCOTT
when i try to assing the created pool to a server (using the 'Target' link),
i always got this exception
weblogic.management.DeploymentException: Error creating connection pool - with
n
ested exception:
[weblogic.common.ResourceException: Cannot load driver class: oracle.jdbc.Driver
.OracleDriver]
at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:110)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:144)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:608)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:592)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:352)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBean
s(ConfigurationMBeanImpl.java:484)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:354)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
at $Proxy7.addDeployment(Unknown Source)
at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(Dynam
icMBeanImpl.java:1448)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBe
anImpl.java:858)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBe
anImpl.java:810)
at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(Conf
igurationMBeanImpl.java:288)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.j
ava:1356)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.j
ava:1331)
at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:
303)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy75.setTargets(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.console.info.FilteredMBeanAttribute.doSet(Filtere
dMBeanAttribute.java:89)
at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(D
oEditMBeanAction.java:116)
at weblogic.management.console.actions.internal.ActionServlet.doAction(A
ctionServlet.java:167)
at weblogic.management.console.actions.internal.ActionServlet.doPost(Act
ionServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2456)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
--------------- nested within: ------------------
weblogic.management.DistributedOperationUpdateException: Error creating connecti
on pool - with nested exception:
[weblogic.management.DeploymentException: Error creating connection pool - with
nested exception:
[weblogic.common.ResourceException: Cannot load driver class: oracle.jdbc.Driver
.OracleDriver]]
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBean
s(ConfigurationMBeanImpl.java:494)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:354)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:44>
However, i set the CLASSPATH & PATH of my startWebLogic.cmd as follows:
set PATH=c:\orant\bin;d:\bea\wlserver6.1\bin\oci817_8;.\bin;%PATH%
set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;.\samples\eval\cloudscape\lib\cloudscape.jar;.\config\examples\serverclasses;c:\orant\jdbc\lib\classes111.zip
AND, i have written a small program that uses JDBC (without weblogic) to query
a table
on the Oracle (using the pool's URL in the properties for getting the Connection
conn = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:ORC1", "scott",
"tiger");
and that program works fine.
Can anyone tell me what is wrong?? it seems that everything is in order (with
respect to CLASSPATH, PATH etc..)
hope someone can solve my problem
thanx and regards
marcoyour url should be
jdbc:oracle:thin:@127.0.0.1:1521:ORC1
notice the ':' before the '@'.
sree
"Marco" <[email protected]> wrote in message
news:[email protected]...
Hi Sree,
You have to place the classes11.zip file in the beginning of the classpath.i did it. my CLASSPATH is now
CLASSPATH=c:\orant\jdbc\lib\classes111.zip;.;.\lib\weblogic_sp.jar;.\lib\web
logic.jar;.\samples\eval\cloudscape\lib\cloudscape.jar;.\config\examples\ser
verclasses
But now, when i assign the target, the exception is:
--------------- nested within: ------------------
weblogic.management.DistributedOperationUpdateException: Error creating
connecti
on pool - with nested exception:
[weblogic.management.DeploymentException: Error creating connection pool -
with
nested exception:
[weblogic.common.ResourceException: weblogic.common.ResourceException:
Could not create pool connection. The DBMS driver exception was:
java.sql.SQLException: Sub Protocol must be specified in connection URL
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:352)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:102)
at
weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
nectionEnvFactory.java:192)
at
weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
nectionEnvFactory.java:134)
at
weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllo
cator.java:698)
at
weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.j
ava:282)
at
weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
ava:629)
at
weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:329)
at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:144)
at java.lang.reflect.Method.invoke(Native Method)
at
weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:608)
at
weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
java:592)
at
weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:352)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at
weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBean
s(ConfigurationMBeanImpl.java:484)
at
weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:354)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
at
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
at $Proxy8.addDeployment(Unknown Source)
at weblogic.management.internal.DynamicMB>
what is SubProtocol???
my ConnectionPool is configured as follows:
Name: MyJDBC Connection Pool
URL : jdbc:oracle:[email protected]:1521:ORC1
Driver: oracle.jdbc.driver.OracleDriver
Properties: user=SCOTT
Password : tiger
can u help me???
thanx in advance and regards
marco
>
>
at
weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:110)
at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:329)
at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:144)
at java.lang.reflect.Method.invoke(Native Method)
at
weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:608)
at
weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
java:592)
at
weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:352)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at
weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBean
s(ConfigurationMBeanImpl.java:484)
at
weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:354)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
at
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
at $Proxy7.addDeployment(Unknown Source)
at
weblogic.management.internal.DynamicMBeanImpl.updateDeployments(Dynam
icMBeanImpl.java:1448)
at
weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBe
anImpl.java:858)
at
weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBe
anImpl.java:810)
at
weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(Conf
igurationMBeanImpl.java:288)
at
com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.j
ava:1356)
at
com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.j
ava:1331)
at
weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:
303)
at
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy75.setTargets(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at
weblogic.management.console.info.FilteredMBeanAttribute.doSet(Filtere
dMBeanAttribute.java:89)
at
weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(D
oEditMBeanAction.java:116)
at
weblogic.management.console.actions.internal.ActionServlet.doAction(A
ctionServlet.java:167)
at
weblogic.management.console.actions.internal.ActionServlet.doPost(Act
ionServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:265)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2456)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
--------------- nested within: ------------------
weblogic.management.DistributedOperationUpdateException: Error creating
connecti
on pool - with nested exception:
[weblogic.management.DeploymentException: Error creating connection pool
with
nested exception:
[weblogic.common.ResourceException: Cannot load driver class:
oracle.jdbc.Driver
OracleDriver]]
at
weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBean
s(ConfigurationMBeanImpl.java:494)
at
weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:354)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:44>
However, i set the CLASSPATH & PATH of my startWebLogic.cmd as follows:
set PATH=c:\orant\bin;d:\bea\wlserver6.1\bin\oci817_8;.\bin;%PATH%
set
CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;.\samples\eval\cloudsc
a
pe\lib\cloudscape.jar;.\config\examples\serverclasses;c:\orant\jdbc\lib\clas
ses111.zip
AND, i have written a small program that uses JDBC (without weblogic)
to
query
a table
on the Oracle (using the pool's URL in the properties for getting the
Connection
conn = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:ORC1",
"scott",
"tiger");
and that program works fine.
Can anyone tell me what is wrong?? it seems that everything is in order
(with
respect to CLASSPATH, PATH etc..)
hope someone can solve my problem
thanx and regards
marco -
Using Oracle Analytical Workspace With Excel
Hi i have created an analytical workspace on Oracle Analytical Workspace, Now suppose i want to access this workspace from Excel , is this possible ?? If so How
Hi,
I understand there are three Oracle plug-ins for Excel: OLAP, OBIEE, and Essbase. I presume the plug-in you are using is the OLAP plug-in, which only works with Oracle 10g or earlier. Starting in Oracle 11g, however, Oracle recommends you use the Simba MDX Provider for Oracle OLAP (http://www.oracle.com/us/corporate/press/036550 and http://www.oracle.com/us/corporate/press/173668).
If you use the MDX Provider, your application can connect directly to the Oracle OLAP cube. Since you are using Excel, your users don't need to connect through Oracle, and you do not need to manipulate the retrieved data before displaying it. Excel and its PivotTables will generate MDX queries against the Oracle database through the MDX Provider, so you don't need to use any plug-ins or APIs. This means you don't need to learn any new menus or APIs -- you just use native Excel functionality. Furthermore, your data is coming live from the Oracle database. Each time you open your workboook, you refresh your data with the Data -> Refresh button, and your spreadsheet data is current, not a stale copy.
Please let me know if I am missing something in your requirements. Feel free to contact me directly if you have any questions or concerns.
Mike -
Trying to use Oracle Label Security with a XMLType
Hi everybody.
I'm trying to apply some of the Oracle Label Security functionalities to a table created from the annotations of a XML Schema
(Below I show part of this XML Schema:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xdb="http://xmlns.oracle.com/xdb"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:element name="FILE_INFO" xdb:SQLType="FILE_INFO" xdb:defaultTable="TABLE_FILE_INFO">
<xs:complexType>
<xs:choice>
<xs:element name="FILE_INFO_DICOM"
type="FILE_INFO_DICOM_TYPE" />
<xs:element name="FILE_INFO_ANALYZE"
type="FILE_INFO_ANALYZE_TYPE" />
</xs:choice>
</xs:complexType>
</xs:element>
<xs:complexType name="FILE_INFO_DICOM_TYPE" xdb:SQLType="FILE_INFO_DICOM_TYPE">
<xs:sequence>
<xs:element name="ELEMENT_INFO_DICOM"
type="ELEMENT_INFO_DICOM_TYPE"
minOccurs="0"
maxOccurs="unbounded"
xdb:defaultTable="TABLE_ELEMENT_INFO_DICOM"
xdb:SQLInline ="false"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ELEMENT_INFO_DICOM_TYPE" xdb:SQLType="ELEMENT_INFO_DICOM_TYPE">
<xs:all>
<xs:element name="Description" type="xs:string" minOccurs="0" maxOccurs="1" />
<xs:element name="GroupTag" type="xs:string" minOccurs="0" maxOccurs="1" />
<xs:element name="ElementTag" type="xs:string" minOccurs="0" maxOccurs="1" />
<xs:element name="VR" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="Value" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:all>
</xs:complexType>
................etc
I've created a security policy that I have tested on relational tables (not based on any object type) and works correctly.
BEGIN
SA_POLICY_ADMIN.APPLY_TABLE_POLICY(policy_name => 'policy1',
schema_name => 'oe',
table_name => 'TABLE_FILE_INFO',
table_options => 'LABEL_DEFAULT, READ_CONTROL, WRITE_CONTROL',
label_function => NULL,
predicate => NULL);
END;
When I try to apply this policy to the XMLSchema-created table (TABLE_FILE_INFO) I get next error messages:
ORA-22856: cannot add columns to object tables
ORA-00604 error occurred at recursive SQL level 1
ORA-12445: cannot change HIDDEN property of column.
ORA-06512: in "LBACSYS.LBAC_POLICY_ADMIN", line 257
ORA-06512: in line 2
I suppose that the main problem is that the apply_plicy procedure is trying to add an extra column to a table created from a defined type.
So my questions are: It's that true? Is it possible to apply a policy to the content of XML documents, I mean, if I want to restrict that some users see some subset of a XML document based on a specific policy, is there anything similar to Oracle Label security for XML? (as defined with the annotations in the XML Schema, some elements will be mapped to rows of a XMLType-based table when a XML document is inserted into the XMLDB repository (marked to follow the previous XML Schema of course)
Hope someone can help to solve my doubts...
Thanks,
Marcos.Have you ever answered this question? If not, have you tried to use the "HIDE" property on your table_options?
Maybe you are looking for
-
Mozilla Aurora is not responding
-
I have an Acer which is Windows 7 and thats pretty much all I can offord at this point very hard being a single Mother with the kind of economy we have today. I'm really not a high tech kind of person but I do get the consept of syncing music to an m
-
How to change number format in a dynamic VO
Hi, Dynamic VO : Using "createViewObjectFromQueryStmt" Dynamic UI : <pre> <af:table rows="#{bindings.DynamicVO.rangeSize}" emptyText="No data to display." var="row" value="#{bindings.DynamicVO.collectionModel}" id="t21" rendered="#{pageFlowScope.Comp
-
Never implemented exception handling in Stored Procedures
I have lots of stand alone stored procedures callled from .NET 20 programs that follow the following pattern. They runn against Oracle 10.2 on Win2003. The only deviiation is a couple where I insert to temptables. I specify a parameter for messages b
-
How to get at cursor embedded in cursor?
Hello I have a PL/SQL function that returns a cursor that has an embedded cursor in it. eg...PL/SQL select id, name, primary_contact, time_stamp , cursor select id, name, regi_region, time_stamp from offices o where o.supp_id = s.id ) offices from su