This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Oracle XML get data problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Oracle XML get data problem" Watch "Oracle XML get data problem" New topic

Oracle XML get data problem

omar bili
Ranch Hand

Joined: Aug 13, 2004
Posts: 177
Hi, i finally found a code that allow me to
query an XMLType table from oracle, but this
program is exiting for no reason, here is the code:

String user = "stage";
String pass = "stage";
dbUrl = "jdbcracle:thin:@";

Connection conn = DriverManager.getConnection(dbUrl, user, pass);

OraclePreparedStatement stmt =
(OraclePreparedStatement) conn.prepareStatement(
"select * from xxx ");
//xxx is a xmltype database

ResultSet rset = stmt.executeQuery();
OracleResultSet orset = (OracleResultSet) rset;

// get the XMLType
while ( ){
XMLType poxml = (XMLType)orset.getObject(1);/* the error is occuring here*/
String poString = poxml.getStringVal();

the error is 'i am using JBuilder':

java.lang.NoClassDefFoundError: oracle/xml/parser/v2/XMLParseException

at oracle.xdb.XMLTypeFactory.create(

at oracle.sql.OPAQUE.toClass(

at oracle.sql.OPAQUE.toJdbc(

at oracle.jdbc.driver.OracleStatement.getObjectValue(

at oracle.jdbc.driver.OracleStatement.getObjectValue(

at oracle.jdbc.driver.OracleResultSetImpl.getObject(

at oraclefirsttest.MainFrame.jButton2_actionPerformed(

at oraclefirsttest.MainFrame_jButton2_actionAdapter.actionPerformed(

at javax.swing.AbstractButton.fireActionPerformed(

at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(

at javax.swing.DefaultButtonModel.fireActionPerformed(

at javax.swing.DefaultButtonModel.setPressed(

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(

at java.awt.Component.processMouseEvent(

at java.awt.Component.processEvent(

at java.awt.Container.processEvent(

at java.awt.Component.dispatchEventImpl(

at java.awt.Container.dispatchEventImpl(

at java.awt.Component.dispatchEvent(

at java.awt.LightweightDispatcher.retargetMouseEvent(

at java.awt.LightweightDispatcher.processMouseEvent(

at java.awt.LightweightDispatcher.dispatchEvent(

at java.awt.Container.dispatchEventImpl(

at java.awt.Window.dispatchEventImpl(

at java.awt.Component.dispatchEvent(

at java.awt.EventQueue.dispatchEvent(

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(

at java.awt.EventDispatchThread.pumpEventsForHierarchy(

at java.awt.EventDispatchThread.pumpEvents(

at java.awt.EventDispatchThread.pumpEvents(


Thanks for any help
I agree. Here's the link:
subject: Oracle XML get data problem
jQuery in Action, 3rd edition