Skip to Content
avatar image
Former Member

JCO properties file Linux..Urgent !!!!

how do i load linux properties..file...

if anyone have download the sapjco connector for linux

inside the folder> demo > Tutorial2Connect & OrderedProperties it gives you how to connect to properties file...

i done in in windows ok...

but when i run in linux..with the following coding...

this is the error message

at org.apache.tomcat.util.threads.ThreadPool$

at /home/osbdev/ (No such file or directory)


createPool /home/osbdev/ (No such file or directory)

if i remark out the gpath for works for windows...

but it doesnt work for linux..pls advice....

private String connectionPool = "SoccerPool";
	private JCO.Repository mRepository = null;
//for linux	
public String gpath="/home/osbdev/working/tomcat/webapps/";
//public String gpath="C:\tomcat\webapps\\"; >>for windows

public JCOConnection(){
		JCO.Pool pool = JCO.getClientPoolManager().getPool(connectionPool);
		if (pool == null) {
			OrderedProperties logonProperties;
			try {
logonProperties = OrderedProperties.load(gpath); JCO.addClientPool(connectionPool,5,logonProperties);
			} catch (Exception e) {
				// TODO Auto-generated catch block
				System.err.println("logon:" +e);
			}catch(Throwable ex){
		mRepository = new JCO.Repository("ElectcomsRepository", connectionPool);
		System.out.println("mRepository " + mRepository);

//Ordered Properties class
public class OrderedProperties extends java.util.Properties {
  ArrayList orderedKeys = new ArrayList();
  public OrderedProperties() {
  public OrderedProperties(java.util.Properties defaults) {
  public synchronized Iterator getKeysIterator() {
    return orderedKeys.iterator();
  public static OrderedProperties load(String name)
                                  throws IOException {
    OrderedProperties props = null;
    // is =OrderedProperties.class.getResourceAsStream("/WEB-INF/" +name);  is=new FileInputStream(name);	
    if ( is != null ) {
      props = new OrderedProperties();
      return props;
    } else {
      if ( ! name.startsWith("/") ) {
        return load("/" + name);
      } else {
        throw new IOException("Properties could not be loaded.");

public void load(InputStream inputS){
	OrderedProperties props=null;

  public synchronized Object put(Object key, Object value) {
    Object obj = super.put(key, value);
    return obj;
  public synchronized Object remove(Object key) {
    Object obj = super.remove(key);
    return obj;

Message was edited by:

yzme yzme

Message was edited by:

yzme yzme

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Mar 27, 2007 at 11:30 AM


    Did you test your code on real Linux OS (like RH) or with cygwin?

    The later has a lot of problems with file paths, if you are using Windows JVM you must use windows style paths with cygwin.


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      <i>naming of the but get the file </i>


      The most complex type of errors, seriously.