Hi All,

I'm working on JBoss 3.2.3 with an Oracle 8.1.7 server. I'm using de 
ojdbc14.jar.

I get the error message from above when i'm trying to retrieve data from the 
database. If i try to retrieve the data using a small Java test client using 
the same code all works great. Except when i try to retrieve it from within 
JBoss (Stateless Session Bean).

The field i'm trying to retrieve is a CLOB field.

The character encoding of the database is WE8MACROMAN8S. I cannot change this 
encoding due to other software running on this server.

Has anyone got an idea why the difference is there between JBoss en the simple 
client.

Simple Client Code:


  | import java.io.*;
  | import java.sql.*;
  | 
  | import oracle.jdbc.*;
  | import oracle.sql.*;
  | 
  | public class TestClient {
  | 
  |     public TestClient() {
  |             try {
  |                     Connection connection = null;
  |                     PreparedStatement statement = null;
  |                     StringBuffer result = new StringBuffer();
  |                     
  |                     DriverManager.registerDriver(new 
oracle.jdbc.driver.OracleDriver());
  | 
  |                     connection = 
DriverManager.getConnection("jdbc:oracle:thin:user/[EMAIL PROTECTED]:1521:DB");
  |                     connection.setAutoCommit(false);
  |                     
  |                     statement = connection.prepareStatement("select 
wsl_won_programme_xml from _won_sent_programme_log where wsl_seq = ?");
  |                     
  |                     statement.setLong(1, 2423);
  |                     OracleResultSet oracleResultSet = (OracleResultSet) 
statement.executeQuery();
  |                     if (oracleResultSet.next()) {
  |                             CLOB clob = oracleResultSet.getCLOB(1);
  |                             BufferedReader br = new 
BufferedReader(clob.getCharacterStream());
  |                             String line = null;
  | 
  |                             while ((line = br.readLine()) != null) {
  |                                     result.append(line);
  |                             }
  |                     }
  |                     
  |                     System.out.println(result.toString());
  |             } catch (SQLException e) {
  |                     e.printStackTrace();
  |             } catch (IOException e) {
  |                     e.printStackTrace();
  |             }
  |     
  |     }
  | 
  |     public static void main(String[] args) {
  |             new TestClient();
  |     }
  | }
  | 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3860585#3860585

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3860585


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to