Results 1 to 2 of 2

Thread: Oracle 10 LOB, Websphere 6.1 (OSGi?)

  1. #1
    Join Date
    Aug 2006
    Posts
    3

    Default Oracle 10 LOB, Websphere 6.1 (OSGi?)

    I have a Websphere application that tries to insert a new db table row containing a CLOB field. When there is little data to insert, say 2-3K, everything works well. However, for larger data volumes I get the following exception:

    Code:
    Caused by: java.lang.ClassNotFoundException: oracle.sql.BLOB
    	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:402)
    	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:347)
    	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    	at org.springframework.jdbc.support.lob.OracleLobHandler.initOracleDriverClasses(OracleLobHandler.java:181)
    Here is the Java code:
    Code:
    	protected String storeReport(Integer reportId, AreBatchReport report) throws XmlMappingException, IOException{
    		StringWriter writer = new StringWriter();
    
    		// Marshal the XML
    		ObjectFactory fact = new ObjectFactory();
    		marshaller.marshal(fact.createAreBatchReport(report), new StreamResult(writer));
    		
    		// Store it in the DB
    		final int id = reportId.intValue();
    		final String xml = writer.getBuffer().toString();
    		
    		jdbcTemplate.execute(storeXmlQuery, new AbstractLobCreatingPreparedStatementCallback(lobHandler){
    
    			@Override
    			protected void setValues(PreparedStatement stmt, LobCreator lobCreator)
    					throws SQLException, DataAccessException {
    				
    				lobCreator.setClobAsString(stmt, 1, xml);
    				stmt.setInt(2, id);
    			}
    			
    		});
    		
    		return xml;
    	}
    Here is the Spring config:
    Code:
    	<beans:bean id="lobHandler" class="org.springframework.jdbc.support.lob.OracleLobHandler">
    		<beans:property name="nativeJdbcExtractor">
    			<beans:bean class="org.springframework.jdbc.support.nativejdbc.WebSphereNativeJdbcExtractor"/>
    		</beans:property>
    I have tried to use DefaultLobHandler instead but it did not help.

    The application refers to com.springsource.oracle.jdbc-10.2.0.2.jar that contains among others oracle.sql.BLOB class. It seems that this jar is not used when trying to load the class.

    Furthermore, the stack trace points out org.eclipse.osgi.framework.internal.core.BundleLoa der class. Does it mean that some OSGI configuration should be present to make it work?

  2. #2

    Default

    Same problem here.
    Did you manage to fix it?

    Cheers

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •