CachedRowSet with sybase JDBC driver
In previous postings you mentioned the solution to using CachedRowSets with Sybase
JDBC involves setting certain properties. My question is WHERE and WHEN do you
set these properties?
Peter Wu wrote:
Hello,
Does anyone know if there is any way to use CachedRowSet with sybase JDBC
driver?
I knew there was posting regarding this in the year 2000. And now it 2003. Thanks!
PeterYes there is, but it involves some driver-specific properties, and I know this from
a discussion I read on their jdbc support newsgroup. That would be the best place
for an answer about their driver. Try news://forums.sybase.com, in the sybase.public.jconnect50
group.
Joe
Similar Messages
-
Using CachedRowSet with sybase JDBC driver
Hello,
Does anyone know if there is any way to use CachedRowSet with sybase JDBC
driver?
I knew there was posting regarding this in the year 2000. And now it 2003. Thanks!
PeterPeter Wu wrote:
Hello,
Does anyone know if there is any way to use CachedRowSet with sybase JDBC
driver?
I knew there was posting regarding this in the year 2000. And now it 2003. Thanks!
PeterYes there is, but it involves some driver-specific properties, and I know this from
a discussion I read on their jdbc support newsgroup. That would be the best place
for an answer about their driver. Try news://forums.sybase.com, in the sybase.public.jconnect50
group.
Joe -
Sybase JDBC driver & Invalid column name error
I submitted a note a year ago concerning JDBC-ODBC bridge and SQL Server db. Same Invalid column name error. The resolution was a bug in the XSU code.
This time the error is with a jconnect5 JDBC driver from Sybase to a Sybase ASA db. ASA is Adaptive Server Anywhere.
<ERROR xsql-timing="140">oracle.xml.sql.OracleXMLSQLException: S0022: Invalid column name 'name'.</ERROR>
However if I use a Sybase JDBC driver from INet Software of Germany, I get the desired result of my query.
Below are sample XSQLConfig.xml definitions.
INet Software Sybase JDBC driver definition:
- <connection name="deasa">
<username>dba</username>
<password>sql</password>
<dburl>jdbc:inetsyb:LEMKAU:2638?database=asademo</dburl>
<driver>com.inet.syb.SybDriver</driver>
<autocommit>true</autocommit>
</connection>
Sybase jconnect5 Sybase JDBC driver definition:
- <connection name="asa">
<username>dba</username>
<password>sql</password>
<dburl>jdbc:sybase:Tds:lemkau:2638?ServiceName=asademo</dburl>
<driver>com.sybase.jdbc.SybDriver</driver>
<autocommit>true</autocommit>
</connection>
I believe the bug has to do with the numeric codes that the drivers use to determine data types are not properly interpreted.
See XML General note title "insert-request, xsu 2.1.0 beta & SQL Server" for reference.
Steve.Thanks for the notification. We will look into this issue...
-
[Sybase JDBC Driver]Object has been closed
Hi,
I am getting the following error when accessing a datasource in an EJB on Weblogic using the Data Direct Drivers.
java.sql.SQLException: [DataDirect][Sybase JDBC Driver]Object has been closed.
The code works every other time. the first time through it works the second time I get the error.
Any insite would be appricated.
Here is my code
public String test(String id)
System.out.println ("test1");
DataSource ds = null;
Connection conn = null;
PreparedStatement stmt = null;
PreparedStatement stmt2 = null;
String ret = "?????";
try
System.out.println ("read data - prepare");
InitialContext ic = new InitialContext();
ds = (DataSource)ic.lookup("java:comp/env/jdbc/dataconn");
conn = ds.getConnection();
String sql = "SELECT * FROM myTable WHERE ID = ?";
System.out.println ("read data - conn.prepareStatement(sql);");
stmt = conn.prepareStatement(sql);
stmt.setString(1, id);
// stmt.setMaxRows(1000);
System.out.println ("read data - stmt.executeQuery();");
ResultSet rs = stmt.executeQuery();
System.out.println ("read data - read");
if(!rs.next())
ret = "Not found";
else
ret = "found";
sql = "UPDATE myTable SET column1 = column1 + 1 WHERE ID = ?";
System.out.println ("update data - prepare");
stmt2 = conn.prepareStatement(sql);
stmt2.setString(1, id);
ret = ret + stmt2.executeUpdate();
System.out.println ("update data - update");
catch(Exception e)
e.printStackTrace();
finally
try
stmt.close();
catch(Exception exception1) { }
try
stmt2.close();
catch(Exception exception1) { }
try
conn.close();
catch(Exception exception1) { }
stmt = null;
stmt2 = null;
conn = null;
return ret;
}Hi. What version of weblogic, and can you print the whole stacktrace?
That way I'll know which object is already closed. This hints at an
already-fixed bug, but I'm not sure yet... And tell me what happens
if you close your result set after you do your call to next(). Lastly,
you can save some DBMS traffic if you change the query to:
"SELECT 1 FROM myTable WHERE ID = ?"
Then regardless of how wide the table is, and whether the table data
is in DBMS memory, as long as there's an index on ID, the query only
needs to use the index, not the data page to answer. If there's an
index entry for your ID value, you'll get one row with 1 in it, else
nothing.
thanks
Joe
Scot McReynolds wrote:
Hi,
I am getting the following error when accessing a datasource in an EJB on Weblogic using the Data Direct Drivers.
java.sql.SQLException: [DataDirect][Sybase JDBC Driver]Object has been closed.
The code works every other time. the first time through it works the second time I get the error.
Any insite would be appricated.
Here is my code
public String test(String id)
System.out.println ("test1");
DataSource ds = null;
Connection conn = null;
PreparedStatement stmt = null;
PreparedStatement stmt2 = null;
String ret = "?????";
try
System.out.println ("read data - prepare");
InitialContext ic = new InitialContext();
ds = (DataSource)ic.lookup("java:comp/env/jdbc/dataconn");
conn = ds.getConnection();
String sql = "SELECT * FROM myTable WHERE ID = ?";
System.out.println ("read data - conn.prepareStatement(sql);");
stmt = conn.prepareStatement(sql);
stmt.setString(1, id);
// stmt.setMaxRows(1000);
System.out.println ("read data - stmt.executeQuery();");
ResultSet rs = stmt.executeQuery();
System.out.println ("read data - read");
if(!rs.next())
ret = "Not found";
else
ret = "found";
sql = "UPDATE myTable SET column1 = column1 + 1 WHERE ID = ?";
System.out.println ("update data - prepare");
stmt2 = conn.prepareStatement(sql);
stmt2.setString(1, id);
ret = ret + stmt2.executeUpdate();
System.out.println ("update data - update");
catch(Exception e)
e.printStackTrace();
finally
try
stmt.close();
catch(Exception exception1) { }
try
stmt2.close();
catch(Exception exception1) { }
try
conn.close();
catch(Exception exception1) { }
stmt = null;
stmt2 = null;
conn = null;
return ret; -
Character encoding and Sybase JDBC driver
Hi,
I have an issue with the Sybase JDBC driver we are using. We have characters in our database, e.g., canon with a ~ over the n. When I do a getString from the ResultSet, I see a ? instead of the character. I'm specifying utf8 as the encoding in the properties in the WLS console. I tried utf16 or ucs2, but I got exceptions from the Sybase JDBC driver at start up.
Any help would be greatly appreciated.Pat Bumpus wrote:
Hi,
I have an issue with the Sybase JDBC driver we are using. We have characters in our database, e.g., canon with a ~ over the n. When I do a getString from the ResultSet, I see a ? instead of the character. I'm specifying utf8 as the encoding in the properties in the WLS console. I tried utf16 or ucs2, but I got exceptions from the Sybase JDBC driver at start up.
Any help would be greatly appreciated.Which Sybase driver are you using?
Joe -
Beginner Has Problem With Loading JDBC Driver Using MySQL
Hi, I am having problem with loading JDBC driver, and need your diagnotic help.
1. I have installed MySQL (C:\mysql), created a databse (soup), and created a littel table (VIDEOS). I am able to see the table in the console:
sql> select * from videos
2. I have downloaded the latest version of Connector/J (mysql-connector-java-3.1.0-alpha.zip), and unzip the zip file into my C:\ directory.
3. I copied the mysql-connector-java-3.1.0-alpha-bin.jar to the C:\j2sdk1.4.1_02\jre\lib\ext folder and it is in my CLASSPATH
4. MySQL server is running
C:\> C:\mysql\bin\mysqld-nt --standalone
5. open another DOS window and use the database
mysql>USE SOUP
6. succesfully compiled a Java program (javac Test.java):
import java.sql.* ;
public class Test
public static void main( String[] args )
try
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
try
Connection con = DriverManager.getConnection( "jdbc:mysql://localhost:3306/soup" );
try
Statement statement = con.createStatement();
ResultSet rs = statement.executeQuery("SELECT TITLE FROM VIDEOS");
while ( rs.next() )
System.out.println( rs.getString( "TITLE" ) );
rs.close();
statement.close();
catch ( SQLException e )
System.out.println( "JDBC error: " + e );
finally
con.close();
catch( SQLException e )
System.out.println( "could not get JDBC connection: " + e );
catch( Exception e )
System.out.println( "could not load JDBC driver: " + e );
7. when I run the Java program (java Test), I got
the message:
could not load JDBC driver: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
What am I missing?Hi,
I missed to specify test in my last post.
Try running your program by explicitly setting the classspath when
running your program . java -classpath c:\mysql-connector-java-3.1.0-alpha-bin.jar test
Make sure your jar file contains org.gjt.mm.mysql.Driver class -
Does setQueryTimeout still spawn a thread with Microsoft JDBC Driver 4.0?
Hi,
Does setQueryTimeout still spawn a thread with Microsoft JDBC Driver 4.0?
This link here indicates this was fixed awhile ago:
http://msdn.microsoft.com/en-us/sqlserver/aa937724.aspx
However, we are using Microsoft JDBC Driver 4.0 but are noticing that a setQueryTimeout thread is being spawned (of class com.microsoft.sqlserver.jdbc.TimeoutTimer) for every query we execute.
And, the thread seems to stay around even after the query has finished executing.
Can anyone confirm whether this is actually fixed?
Or, does anyone have any ideas how we can avoid having a new thread spawned for monitoring for a query timeout?
Thanks!Hi,
Does setQueryTimeout still spawn a thread with Microsoft JDBC Driver 4.0?
This link here indicates this was fixed awhile ago:
http://msdn.microsoft.com/en-us/sqlserver/aa937724.aspx
However, we are using Microsoft JDBC Driver 4.0 but are noticing that a setQueryTimeout thread is being spawned (of class com.microsoft.sqlserver.jdbc.TimeoutTimer) for every query we execute.
And, the thread seems to stay around even after the query has finished executing.
Can anyone confirm whether this is actually fixed?
Or, does anyone have any ideas how we can avoid having a new thread spawned for monitoring for a query timeout?
Thanks! -
Hi,
We have recently upgraded our weblogic server from 6.0 to 6.1 sp5 on our testing
environment.
Our application runs fine for a few hours until our sybase db shuts down for some
reason. Thus rendering all connections to the db to fail.
Anyone know if the current JDBC driver has any comptiability issues with weblogic
6.1 sp5. Current version is "jConnect (TM) for JDBC(TM)/5.2(Build 21136)/P/EBF9747/JDK12/"
Our application connects to the db via a connection pool.
Here's the current settings for the connection pool:
<JDBCConnectionPool CapacityIncrement="10"
DriverName="com.sybase.jdbc2.jdbc.SybDriver" InitialCapacity="1"
MaxCapacity="200" Name="biaSybaseConnectionPool"
Properties="user=XXXXX;password=XXXXX" RefreshMinutes="0"
ShrinkPeriodMinutes="10" ShrinkingEnabled="true" Targets="as1"
TestConnectionsOnRelease="true" TestConnectionsOnReserve="true"
TestTableName="systypes" URL="jdbc:sybase:Tds:x.x.x.x:xxxx"/>
Here's some error log from weblgoic:
java.sql.SQLException: weblogic.common.ConnectDeadException: failed to make new
pool connection: java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings
chained to this exception for the reason(s).
weblogic.common.ResourceException:
Could not create pool connection. The DBMS driver exception was:
java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to
this exception for the reason(s).
at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:480)
at com.sybase.jdbc2.tds.Tds.processLoginAckToken(Tds.java:2938)
at com.sybase.jdbc2.tds.Tds.doLogin(Tds.java:419)
at com.sybase.jdbc2.tds.Tds.login(Tds.java:341)
Thanks for your help
Regards,
RaymondR Fung wrote:
Hi,
We have recently upgraded our weblogic server from 6.0 to 6.1 sp5 on our testing
environment.
Our application runs fine for a few hours until our sybase db shuts down for some
reason. Thus rendering all connections to the db to fail.
Anyone know if the current JDBC driver has any comptiability issues with weblogic
6.1 sp5. Current version is "jConnect (TM) for JDBC(TM)/5.2(Build 21136)/P/EBF9747/JDK12/"
Our application connects to the db via a connection pool.
Here's the current settings for the connection pool:
<JDBCConnectionPool CapacityIncrement="10"
DriverName="com.sybase.jdbc2.jdbc.SybDriver" InitialCapacity="1"
MaxCapacity="200" Name="biaSybaseConnectionPool"
Properties="user=XXXXX;password=XXXXX" RefreshMinutes="0"
ShrinkPeriodMinutes="10" ShrinkingEnabled="true" Targets="as1"
TestConnectionsOnRelease="true" TestConnectionsOnReserve="true"
TestTableName="systypes" URL="jdbc:sybase:Tds:x.x.x.x:xxxx"/>Hi. A few things: I would set the initial capacity = max capacity = 50 or less.
I would set TestConnectionsOnRelease="false".
See below for more....
Here's some error log from weblgoic:
java.sql.SQLException: weblogic.common.ConnectDeadException: failed to make new
pool connection: java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings
chained to this exception for the reason(s).
*******************************************I would expect to see this sort of exception in the logs during the time the DBMS was
down. Are you saying that the pool never recovers after the DBMS comes back up?
Lastly, I recommend that you download Sybase's latest appropriate driver and get it ahead
of weblogic stuff in the classpath the statup script builds for the server.
Joe
>
weblogic.common.ResourceException:
Could not create pool connection. The DBMS driver exception was:
java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to
this exception for the reason(s).
at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:480)
at com.sybase.jdbc2.tds.Tds.processLoginAckToken(Tds.java:2938)
at com.sybase.jdbc2.tds.Tds.doLogin(Tds.java:419)
at com.sybase.jdbc2.tds.Tds.login(Tds.java:341)
Thanks for your help
Regards,
Raymond -
The repository URL MASTER IS NOT COMPATIBLE WITH THE JDBC DRIVER
Hello,
I have windows 7 (64 bits), java 7 , OracleXE112_Win32 , ofm_rcu_win_11.1.1.7.0_64_disk1_1of1 ,ofm_odi_win_11.1.1.7.0_32_disk1_1of2
On install ODI (c:\tmp\DISK1\install\setup.exe) show message above
Starting Oracle Universal Installer ...
Checking if CPU speed is above 300 MHz. Real Pa 1862 MHz
ssado
Checking swap space: 0 MB available, 512 MB required. Failed <<<<
Checking monitor: must be configured to display at least 256 colors Super
ior to 256. Past real 4294967296
Some checks have failed requirements. You should fill them requirement
s before
continue with the installation,
Continue? (y / n) [n] y
Ignoring >>> necessary prerequisites failures. Continuing ...
Preparing to launch Oracle Universal Installer from C: \ Users \ REGINA APPDA ~ 1 \
ta \ Local \ Temp \ OraInstall2013-11-25_07-04-36AM. Wait ...
typed Y and follow
typed Y
I chose "Ignore Repository Setup" option
and installed without errors.
Now I click the Oracle Data Integrator and the screen appears asking to connect to the repository and fill in the requested data:
Connection with Oracle Data Integrator
Name to Log-in: Paul
User: Supervisor
Password: supervisor
Connecting to Database (Master repository)
User: system
Password: password
List of Driver: Oracle JDBC driver
Driver Name: oracle.jdbc.OracleDriver
URL: localhost: 1521: xe
Working repository
Only Master Repository it is option
clicking the Test button shows me the message:
oracle.odi.core.config.MasterRepositoryUrlNotValidForDriverException: ODI-10178: O URL jdbc "localhost:1521:XE" não foi aceito pela classe de driver jdbc "oracle.jdbc.OracleDriver" fornecida no MasterRepositoryDbInfo.
at oracle.odi.core.OdiInstance.createDataSourceDefinition(OdiInstance.java:351)
at oracle.odi.core.OdiInstance.<init>(OdiInstance.java:633)
at oracle.odi.core.OdiInstance.createInstance(OdiInstance.java:609)
at oracle.odi.core.OdiInstance.createInstance(OdiInstance.java:548)
at com.sunopsis.graphical.dialog.SnpsDialogLoginDetail.testConnection(SnpsDialogLoginDetail.java:764)
at com.sunopsis.graphical.dialog.SnpsDialogLoginDetail.access$4(SnpsDialogLoginDetail.java:752)
at com.sunopsis.graphical.dialog.SnpsDialogLoginDetail$2.performAction(SnpsDialogLoginDetail.java:297)
at oracle.odi.ui.framework.event.OdiActionListener.actionPerformed(OdiActionListener.java:69)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2319)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6297)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3276)
at java.awt.Component.processEvent(Component.java:6062)
at java.awt.Container.processEvent(Container.java:2040)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4489)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2490)
at java.awt.Component.dispatchEvent(Component.java:4489)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
at java.awt.EventQueue.access$400(EventQueue.java:81)
at java.awt.EventQueue$2.run(EventQueue.java:628)
at java.awt.EventQueue$2.run(EventQueue.java:625)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:642)
at java.awt.EventQueue$3.run(EventQueue.java:639)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:179)
at java.awt.Dialog$1.run(Dialog.java:1049)
at java.awt.Dialog$3.run(Dialog.java:1097)
at java.awt.Dialog.show(Dialog.java:1094)
at java.awt.Component.show(Component.java:1591)
at java.awt.Component.setVisible(Component.java:1544)
at java.awt.Window.setVisible(Window.java:844)
at java.awt.Dialog.setVisible(Dialog.java:985)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:397)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:356)
at oracle.odi.ui.framework.adapter.DefaultAdapter.displayDialog(DefaultAdapter.java:242)
at oracle.odi.ui.framework.UIFramework.displayDialog(UIFramework.java:88)
at oracle.odi.ui.LoginFactory.createNewLogin(LoginFactory.java:259)
at com.sunopsis.graphical.dialog.SnpsDialogLogin$4.performAction(SnpsDialogLogin.java:213)
at oracle.odi.ui.framework.event.OdiActionListener.actionPerformed(OdiActionListener.java:69)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2319)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6297)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3276)
at java.awt.Component.processEvent(Component.java:6062)
at java.awt.Container.processEvent(Container.java:2040)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4489)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2490)
at java.awt.Component.dispatchEvent(Component.java:4489)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
at java.awt.EventQueue.access$400(EventQueue.java:81)
at java.awt.EventQueue$2.run(EventQueue.java:628)
at java.awt.EventQueue$2.run(EventQueue.java:625)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:642)
at java.awt.EventQueue$3.run(EventQueue.java:639)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:179)
at java.awt.Dialog$1.run(Dialog.java:1049)
at java.awt.Dialog$3.run(Dialog.java:1097)
at java.awt.Dialog.show(Dialog.java:1094)
at java.awt.Component.show(Component.java:1591)
at java.awt.Component.setVisible(Component.java:1544)
at java.awt.Window.setVisible(Window.java:844)
at java.awt.Dialog.setVisible(Dialog.java:985)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:397)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:356)
at oracle.odi.ui.framework.adapter.DefaultAdapter.displayDialog(DefaultAdapter.java:242)
at oracle.odi.ui.framework.UIFramework.displayDialog(UIFramework.java:88)
at oracle.odi.ui.OdiConnectController.handleEvent(OdiConnectController.java:127)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:529)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:897)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:502)
at oracle.odi.ui.docking.AbstractOdiDockableWindow$1.actionPerformed(AbstractOdiDockableWindow.java:204)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2319)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6297)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3276)
at java.awt.Component.processEvent(Component.java:6062)
at java.awt.Container.processEvent(Container.java:2040)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4489)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2490)
at java.awt.Component.dispatchEvent(Component.java:4489)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
at java.awt.EventQueue.access$400(EventQueue.java:81)
at java.awt.EventQueue$2.run(EventQueue.java:628)
at java.awt.EventQueue$2.run(EventQueue.java:625)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:642)
at java.awt.EventQueue$3.run(EventQueue.java:639)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:175)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:162)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)Hi,
change the user sys to system and now show that message
"There is not a repository valid in connection specific"
oracle.odi.core.config.NotMasterRepositorySchemaException: ODI-10147: O tipo de repositório é incompatível.
PreparedStatementCallback; bad SQL grammar [select REP_SHORT_ID, REP_NAME, REP_TYPE, REP_TIMESTAMP, REP_VERSION, MIN_EXE_VERSION, IND_INSTALL_OK from SNP_LOC_REP]; nested exception is java.sql.SQLSyntaxErrorException: ORA-00942: a tabela ou view não existe
at oracle.odi.core.repository.Repository.getMasterRepository(Repository.java:102)
at oracle.odi.core.OdiInstance.createMasterRepository(OdiInstance.java:518)
at oracle.odi.core.OdiInstance.<init>(OdiInstance.java:641)
at oracle.odi.core.OdiInstance.createInstance(OdiInstance.java:609)
at oracle.odi.core.OdiInstance.createInstance(OdiInstance.java:548)
at com.sunopsis.graphical.dialog.SnpsDialogLoginDetail.testConnection(SnpsDialogLoginDetail.java:764)
at com.sunopsis.graphical.dialog.SnpsDialogLoginDetail.access$4(SnpsDialogLoginDetail.java:752)
at com.sunopsis.graphical.dialog.SnpsDialogLoginDetail$2.performAction(SnpsDialogLoginDetail.java:297)
at oracle.odi.ui.framework.event.OdiActionListener.actionPerformed(OdiActionListener.java:69)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2319)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6297)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3276)
at java.awt.Component.processEvent(Component.java:6062)
at java.awt.Container.processEvent(Container.java:2040)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4489)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2490)
at java.awt.Component.dispatchEvent(Component.java:4489)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
at java.awt.EventQueue.access$400(EventQueue.java:81)
at java.awt.EventQueue$2.run(EventQueue.java:628)
at java.awt.EventQueue$2.run(EventQueue.java:625)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:642)
at java.awt.EventQueue$3.run(EventQueue.java:639)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:179)
at java.awt.Dialog$1.run(Dialog.java:1049)
at java.awt.Dialog$3.run(Dialog.java:1097)
at java.awt.Dialog.show(Dialog.java:1094)
at java.awt.Component.show(Component.java:1591)
at java.awt.Component.setVisible(Component.java:1544)
at java.awt.Window.setVisible(Window.java:844)
at java.awt.Dialog.setVisible(Dialog.java:985)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:397)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:356)
at oracle.odi.ui.framework.adapter.DefaultAdapter.displayDialog(DefaultAdapter.java:242)
at oracle.odi.ui.framework.UIFramework.displayDialog(UIFramework.java:88)
at oracle.odi.ui.LoginFactory.createNewLogin(LoginFactory.java:259)
at com.sunopsis.graphical.dialog.SnpsDialogLogin$4.performAction(SnpsDialogLogin.java:213)
at oracle.odi.ui.framework.event.OdiActionListener.actionPerformed(OdiActionListener.java:69)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2319)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6297)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3276)
at java.awt.Component.processEvent(Component.java:6062)
at java.awt.Container.processEvent(Container.java:2040)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4489)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2490)
at java.awt.Component.dispatchEvent(Component.java:4489)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
at java.awt.EventQueue.access$400(EventQueue.java:81)
at java.awt.EventQueue$2.run(EventQueue.java:628)
at java.awt.EventQueue$2.run(EventQueue.java:625)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:642)
at java.awt.EventQueue$3.run(EventQueue.java:639)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:179)
at java.awt.Dialog$1.run(Dialog.java:1049)
at java.awt.Dialog$3.run(Dialog.java:1097)
at java.awt.Dialog.show(Dialog.java:1094)
at java.awt.Component.show(Component.java:1591)
at java.awt.Component.setVisible(Component.java:1544)
at java.awt.Window.setVisible(Window.java:844)
at java.awt.Dialog.setVisible(Dialog.java:985)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:397)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:356)
at oracle.odi.ui.framework.adapter.DefaultAdapter.displayDialog(DefaultAdapter.java:242)
at oracle.odi.ui.framework.UIFramework.displayDialog(UIFramework.java:88)
at oracle.odi.ui.OdiConnectController.handleEvent(OdiConnectController.java:127)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:529)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:897)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:502)
at oracle.odi.ui.docking.AbstractOdiDockableWindow$1.actionPerformed(AbstractOdiDockableWindow.java:204)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2319)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6297)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3276)
at java.awt.Component.processEvent(Component.java:6062)
at java.awt.Container.processEvent(Container.java:2040)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4489)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2490)
at java.awt.Component.dispatchEvent(Component.java:4489)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
at java.awt.EventQueue.access$400(EventQueue.java:81)
at java.awt.EventQueue$2.run(EventQueue.java:628)
at java.awt.EventQueue$2.run(EventQueue.java:625)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:642)
at java.awt.EventQueue$3.run(EventQueue.java:639)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:175)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:162)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select REP_SHORT_ID, REP_NAME, REP_TYPE, REP_TIMESTAMP, REP_VERSION, MIN_EXE_VERSION, IND_INSTALL_OK from SNP_LOC_REP]; nested exception is java.sql.SQLSyntaxErrorException: ORA-00942: a tabela ou view não existe
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:230)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:554)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:588)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:613)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:645)
at org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:111)
at org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:121)
at org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:136)
at oracle.odi.core.repository.support.RepositoryUtils$RepositoryInfoSource.loadRepositoryInfo(RepositoryUtils.java:182)
at oracle.odi.core.repository.support.RepositoryUtils.loadMasterRepositoryInfo(RepositoryUtils.java:376)
at oracle.odi.core.repository.Repository.getMasterRepository(Repository.java:78)
at oracle.odi.core.OdiInstance.createMasterRepository(OdiInstance.java:518)
at oracle.odi.core.OdiInstance.<init>(OdiInstance.java:641)
at oracle.odi.core.OdiInstance.createInstance(OdiInstance.java:609)
at oracle.odi.core.OdiInstance.createInstance(OdiInstance.java:548)
at com.sunopsis.graphical.dialog.SnpsDialogLoginDetail.testConnection(SnpsDialogLoginDetail.java:764)
at com.sunopsis.graphical.dialog.SnpsDialogLoginDetail.access$4(SnpsDialogLoginDetail.java:752)
at com.sunopsis.graphical.dialog.SnpsDialogLoginDetail$2.performAction(SnpsDialogLoginDetail.java:296)
at oracle.odi.ui.framework.event.OdiActionListener.actionPerformed(OdiActionListener.java:69)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6297)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
at java.awt.Component.processEvent(Component.java:6062)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2489)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
at java.awt.EventQueue.access$400(EventQueue.java:81)
at java.awt.EventQueue$2.run(EventQueue.java:627)
at java.awt.EventQueue$2.run(EventQueue.java:625)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:641)
at java.awt.EventQueue$3.run(EventQueue.java:639)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
at java.awt.Dialog$1.run(Dialog.java:1044)
at java.awt.Dialog$3.run(Dialog.java:1096)
at java.awt.Dialog.show(Dialog.java:1094)
at java.awt.Component.show(Component.java:1591)
at java.awt.Component.setVisible(Component.java:1543)
at java.awt.Window.setVisible(Window.java:843)
at java.awt.Dialog.setVisible(Dialog.java:984)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:395)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:356)
at oracle.odi.ui.framework.adapter.DefaultAdapter.displayDialog(DefaultAdapter.java:242)
at oracle.odi.ui.framework.UIFramework.displayDialog(UIFramework.java:88)
at oracle.odi.ui.LoginFactory.createNewLogin(LoginFactory.java:259)
at com.sunopsis.graphical.dialog.SnpsDialogLogin$4.performAction(SnpsDialogLogin.java:213)
at oracle.odi.ui.framework.event.OdiActionListener.actionPerformed(OdiActionListener.java:69)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6297)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
at java.awt.Component.processEvent(Component.java:6062)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2489)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
at java.awt.EventQueue.access$400(EventQueue.java:81)
at java.awt.EventQueue$2.run(EventQueue.java:627)
at java.awt.EventQueue$2.run(EventQueue.java:625)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:641)
at java.awt.EventQueue$3.run(EventQueue.java:639)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
at java.awt.Dialog$1.run(Dialog.java:1044)
at java.awt.Dialog$3.run(Dialog.java:1096)
at java.awt.Dialog.show(Dialog.java:1094)
at java.awt.Component.show(Component.java:1591)
at java.awt.Component.setVisible(Component.java:1543)
at java.awt.Window.setVisible(Window.java:843)
at java.awt.Dialog.setVisible(Dialog.java:984)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:395)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:356)
at oracle.odi.ui.framework.adapter.DefaultAdapter.displayDialog(DefaultAdapter.java:242)
at oracle.odi.ui.framework.UIFramework.displayDialog(UIFramework.java:88)
at oracle.odi.ui.OdiConnectController.handleEvent(OdiConnectController.java:127)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:529)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:897)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:501)
at oracle.odi.ui.docking.AbstractOdiDockableWindow$1.actionPerformed(AbstractOdiDockableWindow.java:203)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6297)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
at java.awt.Component.processEvent(Component.java:6062)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2489)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
at java.awt.EventQueue.access$400(EventQueue.java:81)
at java.awt.EventQueue$2.run(EventQueue.java:627)
at java.awt.EventQueue$2.run(EventQueue.java:625)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:641)
at java.awt.EventQueue$3.run(EventQueue.java:639)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
... 1 more
Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: a tabela ou view não existe
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:947)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1283)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1441)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3823)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1671)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at oracle.ucp.jdbc.proxy.PreparedStatementProxyFactory.invoke(PreparedStatementProxyFactory.java:111)
at $Proxy3.executeQuery(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at oracle.odi.core.datasource.support.RuntimeClassLoaderDataSourceCreator$StatementInvocationHandler.invoke(RuntimeClassLoaderDataSourceCreator.java:173)
at $Proxy4.executeQuery(Unknown Source)
at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:595)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:538)
... 146 more -
Issues while configuring java application using JDO with MS JDBC Driver 1.0
We are in the process of configuring our java application with the production version of SQL Server 2005 Java Database Connectivity (JDBC) Driver 1.0. We are facing issues getting it to work with Sun App Server using JDO concept.
After creating the data store, adding the JDBC driver to the application server classpath through console and also copying the driver into the lib directory, we are still getting the below error.
Following is the stack trace encountered while running the application
[#|2006-02-15T10:21:25.493+0530|WARNING|sun-appserver-pe8.1_02|javax.enterprise.system.container.ejb.entity.finder|_ThreadID=30;|JDO74010: Bean 'InventoryEJB' method ejbFindAllInventoryItems: problems running JDOQL query.
com.sun.jdo.api.persistence.support.JDOFatalInternalException: JDO76519: Failed to identify vendor type for the data store.
NestedException: java.sql.SQLException: Error in allocating a connection. Cause: javax.transaction.SystemException
at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.initializeSQLStoreManager(SQLPersistenceManagerFactory.java:870)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.getFromPool(SQLPersistenceManagerFactory.java:786)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.getPersistenceManager(SQLPersistenceManagerFactory.java:673)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:849)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:681)
at com.sun.j2ee.blueprints.supplier.inventory.ejb.InventoryEJB1142755294_ConcreteImpl.jdoGetPersistenceManager(InventoryEJB1142755294_ConcreteImpl.java:530)
at com.sun.j2ee.blueprints.supplier.inventory.ejb.InventoryEJB1142755294_ConcreteImpl.ejbFindAllInventoryItems(InventoryEJB1142755294_ConcreteImpl.java:146)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:147)
at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:185)
at $Proxy164.findAllInventoryItems(Unknown Source)
at com.sun.j2ee.blueprints.supplier.inventory.web.DisplayInventoryBean.getInventory(Unknown Source)
at org.apache.jsp.displayinventory_jsp._jspService(displayinventory_jsp.java:119)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:482)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:417)
at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:80)
at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:95)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313)
at com.sun.j2ee.blueprints.supplier.inventory.web.RcvrRequestProcessor.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
Can anyone help me on this issue?
Regards,
BinduI have already tried this before and this not work too, but strange that even if I use JDBC:ODBC bridge driver, the return value for output parameters are not correct, that is, only return the value that I input but not the value after executed in the procedure....
The code that I used with JDBC:ODBC bridge is as follow:
public static void main(String[] args) {
String url = "jdbc:odbc:;DRIVER=SQL Server;Persist Security Info=False;database=db;Server=sql;uid=sa;pwd=pwd";
Connection con;
ResultSet rs = null;
CallableStatement callS = null;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
try {
con=DriverManager.getConnection(url);
callS = con.prepareCall("{ call dbo.CpJavaTest (?)}");
callS.registerOutParameter(1, Types.INTEGER);
callS.execute();
rs=callS.getResultSet();
int ret = callS.getInt(1);
System.out.println("return value : " + ret);
while (rs.next()) {
String f1 = rs.getString(4);
String f2 = rs.getString(5);
System.out.println(f1 + " " + f2);
} catch(SQLException ex) {
System.out.println("SQLException: " + ex.getMessage());
The value of the output parameter is same as what I inputed! Hope any one can teach me how to correct it...
Thank you very much! -
What's happen with this JDBC driver?
Hi I have just started with JDBC, and I follow the steps from the Mysql drivers, but always receive the same error:
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at Connect.main(Connect.java:16)
My program is the following:
import java.sql.*;
public class Connect {
public static void main(String arg[]) throws Exception {
Connection con = null;
try {
// here is the JDBC URL for this database
// more on what the Statement and ResultSet classes do later
Statement stmt;
ResultSet rs;
// either pass this as a property, i.e.
// -Djdbc.drivers=org.gjt.mm.mysql.Driver
// or load it here as we are doing in this example
// here is where the connection is made
con = DriverManager.getConnection("jdbc:mysql://arturo.flexdns.net:3306/arturo?user=root&password=arturo.mc.laa");
Class.forName("com.mysql.jdbc.Driver").newInstance();
catch( SQLException e ) {
e.printStackTrace( );
finally {
if( con != null ) {
try { con.close( ); }
catch( Exception e ) { }
Does anyone known why, What am I doing wrong?
Thank's very much in advance.Hi,
I think you were right, but now I have got the following erro message, I have put everything in the PATH:
Exception in thread "main" java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at Connect.main(Connect.java:16) -
CLassCastException with oracle.jdbc.driver.OracleCallableStatement
Hello,
I get a ClassCastException when I try to execute a Stored Procedure with WL6.1
and the JDriver.
I have a servlet who intanciate a Bean and call to his execute() method in this
way:
Context ctx = null;
Hashtable ht = new Hashtable();
Connection conn = null;
ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
try {
ctx = new InitialContext(ht);
javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup(connPool);
conn = ds.getConnection();
conn.setAutoCommit(true);
SvcEmpEstObt empEstObt = new SvcEmpEstObt();
empEstObt.setMaxRows(100);
empEstObt.setConnection(conn);
//Get parameters from Http Get and set the JB
empEstObt.setEmpRut(request.getParameter("rut"));
empEstObt.setEmpTimeStamp(request.getParameter("timestamp"));
//Execute Service
empEstObt.execute();
/* ********* the execute() method of the jb is listed here */
public int execute() throws ClassNotFoundException, SQLException{
intreturnedRows = 0;
try {if (connection == null){
try {Class.forName(driver);
} catch (ClassNotFoundException e) {
System.err.println("ClassNotFoundException: " + e);
throw e;
connection = DriverManager.getConnection(url, user, password);
row = -1;
srv_message = String.valueOf(maxRows);
String sp = "{call SvcEmpEstObt_Pkg.SvcEmpEstObt(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}";
oracle.jdbc.driver.OracleCallableStatement procout = (oracle.jdbc.driver.OracleCallableStatement)
connection.prepareCall(sp); // The exception is here
procout.registerOutParameter(1, Types.VARCHAR);
procout.setString(1, srv_message);
procout.setString(2, empRut);
procout.setString(3, empTimeStamp);
procout.registerOutParameter(4, Types.VARCHAR);
procout.registerOutParameter(5, Types.VARCHAR);
procout.registerOutParameter(6, Types.INTEGER);
int elemSqlType = OracleTypes.INTEGER;
int elemMaxLen = 0;
procout.registerIndexTableOutParameter(7, maxRows, elemSqlType, elemMaxLen);
elemSqlType = OracleTypes.VARCHAR;
elemMaxLen = 30;
// register the OUT parameter
procout.registerIndexTableOutParameter(8, maxRows, elemSqlType, elemMaxLen);
elemSqlType = OracleTypes.VARCHAR;
elemMaxLen = 21;
// register the OUT parameter
procout.registerIndexTableOutParameter(9, maxRows, elemSqlType, elemMaxLen);
elemSqlType = OracleTypes.INTEGER;
elemMaxLen = 0;
// register the OUT parameter
procout.registerIndexTableOutParameter(10, maxRows, elemSqlType, elemMaxLen);
// execute the call
procout.execute();
sqlWarning = procout.getWarnings();
srv_message = procout.getString(1);
returnStatus = new Integer(srv_message.substring(0,1)).intValue();
dagMessage = new DagMessage();
dagMessage.oracleMessage(srv_message);
// access the value using JDBC default mapping
empEstTitulo = procout.getString(4);
empEstUniv = procout.getString(5);
empEstNivel = procout.getInt(6);
curCodigo = (BigDecimal[]) procout.getPlsqlIndexTable(7);
curNombre = (String[]) procout.getPlsqlIndexTable(8);
curFecha = (String[]) procout.getPlsqlIndexTable(9);
curDuracion = (BigDecimal[]) procout.getPlsqlIndexTable(10);
// close the statement
procout.close();
if (curCodigo == null) {
return 0;
} else {
return curCodigo.length;
} catch (SQLException e) {
SQLException ex = e;
System.err.println("\n--- SQLException caught ---\n");
while (ex != null) {
System.err.println("Message: " + ex.getMessage ());
System.err.println("SQLState: " + ex.getSQLState ());
System.err.println("ErrorCode: " + ex.getErrorCode ());
ex = ex.getNextException();
System.out.println("");
throw e;
Does Someone has an idea why it happens ?Hans,
Could you give us the whole text of exception?
Regards,
Slava Imeshev
"Hans" <[email protected]> wrote in message
news:[email protected]...
>
It Works! Thanx a lot ....
I was working with a previous version of my App ... I fixed the problemand now
i can Cast to weblogic.jdbc.vendor.oracle.OracleCallableStatement,
But ...
I get the following Exception:
SQL Exception:
registerIndexTableOutParameter is not supported by the
underlying JDBC driver weblogic.jdbc.pool.Connection
What I need to do ?
/* this is what i`m trying to make */
weblogic.jdbc.vendor.oracle.OracleCallableStatement procout =(weblogic.jdbc.vendor.oracle.OracleCallableStatement)
connection.prepareCall(sp);
procout.registerOutParameter(1, Types.VARCHAR);
procout.setString(1, srv_message);
procout.setString(2, empRut);
procout.setString(3, empTimeStamp);
procout.registerOutParameter(4, Types.VARCHAR);
procout.registerOutParameter(5, Types.VARCHAR);
procout.registerOutParameter(6, Types.INTEGER);
int elemSqlType = OracleTypes.INTEGER;
int elemMaxLen = 0;
procout.registerIndexTableOutParameter(7, maxRows, elemSqlType,elemMaxLen);
>
elemSqlType = OracleTypes.VARCHAR;
elemMaxLen = 30;
// register the OUT parameter
procout.registerIndexTableOutParameter(8, maxRows, elemSqlType,elemMaxLen);
>
elemSqlType = OracleTypes.VARCHAR;
elemMaxLen = 21;
// register the OUT parameter
procout.registerIndexTableOutParameter(9, maxRows, elemSqlType,elemMaxLen);
>
elemSqlType = OracleTypes.INTEGER;
elemMaxLen = 0;
// register the OUT parameter
procout.registerIndexTableOutParameter(10, maxRows, elemSqlType,elemMaxLen);
>
>
"Hans" <[email protected]> wrote:
Thanx Slava,
But I have the same problem again...
I replace oracle.jdbc.driver.OracleCallableStatement with
weblogic.jdbc.vendor.oracle.OracleCallableStatement
and I get the same ClassClastException in
weblogic.jdbc.vendor.oracle.OracleCallableStatement procout =
(weblogic.jdbc.vendor.oracle.OracleCallableStatement)
connection.prepareCall(sp);
Any ideas ??
"Slava Imeshev" <[email protected]> wrote:
Hi Hans,
You can not cast returned object to
oracle.jdbc.driver.OracleCallableStatement
when accessing oracle db via connection pool.
It can be casted to weblogic.jdbc.vendor.oracle.OracleCallableStatement.
Here is a list of methods supported by this interface:
void clearParameters() throws java.sql.SQLException;
void registerIndexTableOutParameter(int i, int j, int k, int l) throws
java.sql.SQLException;
void registerOutParameter(int i, int j, int k, int l) throws
java.sql.SQLException;
java.sql.ResultSet getCursor(int i) throws java.sql.SQLException;
java.io.InputStream getAsciiStream(int i) throws
java.sql.SQLException;
java.io.InputStream getBinaryStream(int i) throwsjava.sql.SQLException;
java.io.InputStream getUnicodeStream(int i) throwsjava.sql.SQLException;
>>>
Regards,
Slava Imeshev
"Hans" <[email protected]> wrote in message
news:[email protected]...
Hello,
I get a ClassCastException when I try to execute a Stored Procedurewith
WL6.1
and the JDriver.
I have a servlet who intanciate a Bean and call to his execute()
method
in
this
way:
Context ctx = null;
Hashtable ht = new Hashtable();
Connection conn = null;
ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFact
or
y");
try {
ctx = new InitialContext(ht);
javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup(connPool);
conn = ds.getConnection();
conn.setAutoCommit(true);
SvcEmpEstObt empEstObt = new SvcEmpEstObt();
empEstObt.setMaxRows(100);
empEstObt.setConnection(conn);
file://Get parameters from Http Get and set the JB
empEstObt.setEmpRut(request.getParameter("rut"));
empEstObt.setEmpTimeStamp(request.getParameter("timestamp"));
file://Execute Service
empEstObt.execute();
/* ********* the execute() method of the jb is listed here */
public int execute() throws ClassNotFoundException, SQLException{
intreturnedRows = 0;
try {if (connection == null){
try {Class.forName(driver);
} catch (ClassNotFoundException e) {
System.err.println("ClassNotFoundException: " + e);
throw e;
connection = DriverManager.getConnection(url, user, password);
row = -1;
srv_message = String.valueOf(maxRows);
String sp = "{call SvcEmpEstObt_Pkg.SvcEmpEstObt(?, ?, ?, ?, ?, ?,?, ?,
oracle.jdbc.driver.OracleCallableStatement procout =(oracle.jdbc.driver.OracleCallableStatement)
connection.prepareCall(sp); // The exception is here
procout.registerOutParameter(1, Types.VARCHAR);
procout.setString(1, srv_message);
procout.setString(2, empRut);
procout.setString(3, empTimeStamp);
procout.registerOutParameter(4, Types.VARCHAR);
procout.registerOutParameter(5, Types.VARCHAR);
procout.registerOutParameter(6, Types.INTEGER);
int elemSqlType = OracleTypes.INTEGER;
int elemMaxLen = 0;
procout.registerIndexTableOutParameter(7, maxRows, elemSqlType,elemMaxLen);
elemSqlType = OracleTypes.VARCHAR;
elemMaxLen = 30;
// register the OUT parameter
procout.registerIndexTableOutParameter(8, maxRows, elemSqlType,elemMaxLen);
elemSqlType = OracleTypes.VARCHAR;
elemMaxLen = 21;
// register the OUT parameter
procout.registerIndexTableOutParameter(9, maxRows, elemSqlType,elemMaxLen);
elemSqlType = OracleTypes.INTEGER;
elemMaxLen = 0;
// register the OUT parameter
procout.registerIndexTableOutParameter(10, maxRows, elemSqlType,elemMaxLen);
// execute the call
procout.execute();
sqlWarning = procout.getWarnings();
srv_message = procout.getString(1);
returnStatus = new Integer(srv_message.substring(0,1)).intValue();
dagMessage = new DagMessage();
dagMessage.oracleMessage(srv_message);
// access the value using JDBC default mapping
empEstTitulo = procout.getString(4);
empEstUniv = procout.getString(5);
empEstNivel = procout.getInt(6);
curCodigo = (BigDecimal[]) procout.getPlsqlIndexTable(7);
curNombre = (String[]) procout.getPlsqlIndexTable(8);
curFecha = (String[]) procout.getPlsqlIndexTable(9);
curDuracion = (BigDecimal[]) procout.getPlsqlIndexTable(10);
// close the statement
procout.close();
if (curCodigo == null) {
return 0;
} else {
return curCodigo.length;
} catch (SQLException e) {
SQLException ex = e;
System.err.println("\n--- SQLException caught ---\n");
while (ex != null) {
System.err.println("Message: " + ex.getMessage ());
System.err.println("SQLState: " + ex.getSQLState ());
System.err.println("ErrorCode: " + ex.getErrorCode ());
ex = ex.getNextException();
System.out.println("");
throw e;
Does Someone has an idea why it happens ? -
Access denial on connecting SQL server 2000 with Microsoft JDBC driver
Hi guys,
I am developping a BMP invoking procedures stored in a SQL server 2000 instance on the Sun RI platform. I am using the Microsoft type 4 JDBC driver.
the connection pattern is something like
jdbc:microsoft:sqlserver://ambassador:1433;User=sa;Password;DataBase=Forethought;SelectMethod=cursor
An type-like "access denied" exception is raised when trying to get the connection from the DataSource object with some code similar to :
DataSource objDS = (DataSource)objCtx.lookup("jdbc/Forethought");
Connection objConn = ds.getConnection();
I have realised a CMP to access the database and everything works fine.
It seems that the SunRI tries to get the db connection with an "impersonated " user even if i have specified the user name and password in the connection string.
Does anyone have an idea how to force the connection with SQL Server user name and password ??I come accorss the same problem too,
my URL jdbc:microsoft:sqlserver://ambassador:1433;User=sa;Password=123;DatabaseName=pubs
and the password is right.I can establish connection to SQL server 2000 by JDBC Driver Manager,the code as follow:
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection conn = DriverManager.getConnection
("jdbc:microsoft:sqlserver://localhost:1433;User=sa;Password=123"); -
Problem with Oracle jdbc driver and jdk1.4
Hi
I have some java code which uses Oracle jdbc driver.
This code works with java 1.1.8, 1.2 & 1.3 but not with java 1.4 !
I have that exception :
java.sql.SQLException: The Network Adapter could not establish the connection
at oracle/jdbc/dbaccess/DBError.check_error(DBError.java)
at oracle/jdbc/driver/OracleConnection.<init>(OracleConnection.java)
at oracle/jdbc/driver/OracleDriver.getConnectionInstance(OracleDriver.java)
at oracle/jdbc/driver/OracleDriver.connect(OracleDriver.java)
at java/sql/DriverManager.getConnection(DriverManager.java:529)
at java/sql/DriverManager.getConnection(DriverManager.java:179)
at SimpleQuery.<init>(SimpleQuery.java:21)
at SimpleQuery.main(SimpleQuery.java:56)
when I try a getConnection...
I've tried all the jdbc drivers provided by Oracle, but it's still the same problem !
Any Idea ?
ThanksHave you tried the drivers shipped with Oracle9i Db R2? they should work against JDK 1.4
Kuassi
Hi
I have some java code which uses Oracle jdbc driver.
This code works with java 1.1.8, 1.2 & 1.3 but not with java 1.4 !
I have that exception :
java.sql.SQLException: The Network Adapter could not establish the connection
at oracle/jdbc/dbaccess/DBError.check_error(DBError.java)
at oracle/jdbc/driver/OracleConnection.<init>(OracleConnection.java)
at oracle/jdbc/driver/OracleDriver.getConnectionInstance(OracleDriver.java)
at oracle/jdbc/driver/OracleDriver.connect(OracleDriver.java)
at java/sql/DriverManager.getConnection(DriverManager.java:529)
at java/sql/DriverManager.getConnection(DriverManager.java:179)
at SimpleQuery.<init>(SimpleQuery.java:21)
at SimpleQuery.main(SimpleQuery.java:56)
when I try a getConnection...
I've tried all the jdbc drivers provided by Oracle, but it's still the same problem !
Any Idea ?
Thanks -
Query TImeout with ORACLE JDBC driver
I want to halt an execution of query if an query takes more than specified time. Not only the query should be cancelled but the error should be thrown at client. I am using ORACLE 11g JDBC driver.
I have used statement.setQueryTimeout() for the same. Moreover, my application is an OLTP system handling thousands of calls per second and one call is of 4 to 5 queries. Can anyone explain whether querytimeout will work in this case and its drawbacks if any.Dear user10366531,
Your question about setQueryTimeout() has been already disscussed in this topic (Setup "QueryThreshold" parameter
(Chris Jenkins aswered).
Best regards,
Gennady
Maybe you are looking for
-
One user for multiple tablespaces
Hello. Oracle 11g enterprise. Whenever I setup a new tablespace on my server, I create a user for each tablespace on the server. Is is possible to create only one user for all tablespaces on a server? What is the easiest way to create this one user t
-
The application has accessed a fund managements or cash mgt module with par
When I am trying to post a entry Mesage appears F1030 The application has accessed a fund managements or cash mgt module with parameters missinfg or defective Please solve
-
We all have an idea of how to pass in variables / parameters to a swf file when on an html file. But, how do I pass in a variable / parameter / external variable to my flash file when it is an EXE under the following situations; On the call to start
-
iMac 10.5.8 is slow. Verified Disk Permissions and then repaired. No big improvement in speed. What about internet files (safari and firefox) ; caches and cookies? Thank you.
-
Printing Keynote presentation-scale to fit
is there a way to print a keynote presentation to scale to fit different paper sizes? E.g. I have a 800 x 600 presentation and I want it to print to the maximum size on a tabloid page (same for 1024x720, 1920 x 1080, custom, etc). Ideally this would