Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Character Set Unknown issue using datasource in JBOSS server

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am not able to read String data from SQLInput stream of a customized database object.

Java object corresponding to customized row type is:

public class Excust implements SQLData {
public String numFact;
public String indFact;
public String dFacEmi;
public int mntImp;
public String devTit;

private static String SCHEMA_NAME_POSTFIX = ".EXOBJECT";

public Excust () {
private void initSchemaName() {
String schemaname = "OPSSCHEMANAME";
sql_type = schemaname;
public void readSQL(SQLInput stream, String type) throws SQLException {
sql_type = type;
numFact = stream.readString(); //It is read as ???-- Character Set Unknown
indFact = stream.readString(); //It is read as ???-- Character Set Unknown
dFacEmi = stream.readString(); //It is read as ???-- Character Set Unknown
mntImp = stream.readInt();
devTit = stream.readString(); //It is read as ???-- Character Set Unknown


public void writeSQL(SQLOutput stream) throws SQLException {

// champs à écrire dans l'ordre

When I get the connection object using DriverManager i.e.
connection = DriverManager.getConnection(
"jdbc:oracle:thin:@", "username",
I am able to get the data.

But using datasource in JBOSS I am not able to get the data saying "Character Set unknown".
Datasource code:

Context initContext = (Context) new InitialContext().
Hashtable params = new Hashtable();
params.put(Context.INITIAL_CONTEXT_FACTORY, org.jnp.interfaces.NamingContextFactory);
String providerURL = "";
params.put(Context.PROVIDER_URL, providerURL);
initContext = new InitialContext(params);
datasource = (DataSource) initContext.lookup("java:OracleDS");
Connection connection = datasource.getConnection();

Our database is using WE8ISO8859P15 character set.

Can anybody please suggest why I am not able to get the data when I connect with datasource in JBOSS Server?

Thanks in advance.
Grow a forest with seedballs and this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
    Bookmark Topic Watch Topic
  • New Topic