Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old March 5th, 2002, 11:12 AM
sgaucho sgaucho is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 26 sgaucho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 28 sec
Reputation Power: 0
Unhappy drivers for blobs???

hi,

I am running an JSP application which selects and inserts blobs in to ORACLE...

The application runs fine in my local machine but when I upload it to the server, I keep gettin an Internal Server Error "javax.servlet.ServletException"

I comment the lines "doc = rs.getBlob("blobs");" and the page loads fine but ofcouse without the blob...

I copied all the drivers i had to the server but nothing...

can anyone help me out!!??

TIA,
sands

Reply With Quote
  #2  
Old March 5th, 2002, 11:44 AM
oscagne oscagne is offline
Java Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Posts: 5 oscagne User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
What does the code look like?

Do you realise you can't treat it just like a stream, you need to get an input/ouputstream to it from the reference to it to write/read to it

Oscagne

Reply With Quote
  #3  
Old March 5th, 2002, 12:35 PM
sgaucho sgaucho is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 26 sgaucho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 28 sec
Reputation Power: 0
yes, i understand what u mean and yes I am using streams later on.. but the exception occurs right when i try to get the blob from the table...

hv checked and rechecked all the drivers, classpaths etc... and they look exactly the same as my localhost...
dunno whats happening...

PHP Code:
// NOTE: this is an JSP page.. used the php for syntax highlighting...


  
Statement stm db.connection.createStatement();
 
    
out.println("helloo");
String dc null;
        
Blob doc null;
    
String contype null;        

    
String SQL "SELECT DOCUMENT.code,DOCUMENT.doc,DOCUMENT.content_type FROM DOCUMENT WHERE DOCUMENT.document_code ='6itqr001' AND DOCUMENT.version='1'";

    
System.out.println("\n\nDetail Query\n\n" SQL);    
     
ResultSet rsd stm.executeQuery(SQL);
        
     while(
rsd.next()) { 
    
    
dc rsd.getString("code");
    
    
doc =  rsd.getBlob("doc"); 

Reply With Quote
  #4  
Old March 7th, 2002, 05:21 PM
oscagne oscagne is offline
Java Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Posts: 5 oscagne User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
It's a while since I've done this, but I'm sure I used the oracle dbms_lob.read and dbms_lob.write db procedures to read and write them.

I take it you say you aren't throwing errors if you remove this line, means that you are removing all the line refering to that variable aswell, so it may not be that line...why don't you put a try arount it and print the stack trace in the catch, that'll narrow it down.

Also I think I might have had to use the Oracle blob type rather than the java.sql one, as they may differ per JDBC connection type, but this is just a vague memory, I may be wrong

Oscagne

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > drivers for blobs???


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway