Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Oracle XML get data problem  RSS feed

omar bili
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!