Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] Connecting to Oracle

Hello,

I cannot connect to an Oracle DB because the parameter list in net.refractions.udig.catalog.internal.oracle.ui.OracleSpatialWizardPage.getParams() has a different order than what's expected.

Actual:
p 0: dbtype=java.lang.String REQUIRED null
p 1: host=java.lang.String REQUIRED null
p 2: port=java.lang.Integer REQUIRED null
p 3: user=java.lang.String REQUIRED null
p 4: passwd=java.lang.String REQUIRED null
p 5: instance=java.lang.String REQUIRED null
p 6: max connections=java.lang.Integer null
p 7: min connections=java.lang.Integer null
p 8: validate connections=java.lang.Boolean null
p 9: schema=java.lang.String null
p 10: namespace=java.lang.String null

In code:
params.put(dbParams[0].key, "oracle"); //$NON-NLS-1$
params.put(dbParams[1].key, currentDBCI.getHostString());
params.put(dbParams[2].key, new Integer(currentDBCI.getPortString()));
params.put(dbParams[3].key, currentDBCI.getUserString());
params.put(dbParams[4].key, currentDBCI.getPassString());
params.put(dbParams[5].key, currentDBCI.getDbString());
params.put(dbParams[6].key, currentDBCI.getSchemaString()); //WRONG!

dbParams[6] is 'max connections' and not the schema. I did
 params.put(dbParams[6].key, 10);
and it worked, but I don't know where to get a valid value for max connections (thus the '10').

Cheers,

Ugo

--
Ugo Taddei

Fraunhofer Institut Intelligente Analyse- und Informationssysteme (FhG IAIS)
http://www.iais.fraunhofer.de
Department Knowledge Discovery - IAIS.KD -
Working Group Spatial Decision Support
http://www.iais.fraunhofer.de/kd.html
phone  (+49)2241-14-2184    fax    (+49)2241-14-2072
Schloss Birlinghoven, D-53754 Sankt Augustin, Germany


Back to the top