POST
|
Hi Leo. My code line #52 is: gWS = gWorkspaceFactory.open(propSet, 0); I connect to ArcSDE 10.1 (+ PostgreSQL 9.0.5) from ArcCatalog and ArcMap without problem with the same connection params. I change my sample connection code to clarify:
public void conectar(ParametrosSDE parametrosConexion) {
try {
// Create a WorkspaceFactory object within the Server's context
IWorkspaceFactory gWorkspaceFactory = (SdeWorkspaceFactory) ConexionAGS.crearObjeto(SdeWorkspaceFactory.getClsid());
// Create an instance of a PropertySet for an Oracle ArcSDE connection.
// The PropertySet acts as an array of keyed values that ArcSDE will use to collect
// the connection values from:
PropertySet propSet = (PropertySet) ConexionAGS.crearObjeto(PropertySet.getClsid());
propSet.setProperty("SERVER", "my_server_name");
propSet.setProperty("INSTANCE", "5151");
propSet.setProperty("DATABASE", "arcsde");
propSet.setProperty("USER", "sde");
propSet.setProperty("PASSWORD", "passwordsde");
propSet.setProperty("VERSION", "SDE.DEFAULT");
// Open the ArcSDE workspace and get a handle to it through the WorkspaceFactory,
// passing in the PropertySet
IWorkspace gWS = gWorkspaceFactory.open(propSet, 0);
Cleaner.release(propSet);
// You now have a connection to the database through a Workspace object (gWS).
} catch (Exception e) {
e.printStackTrace();
}
} Thanks, Marcos.
... View more
10-04-2012
10:53 PM
|
0
|
0
|
177
|
POST
|
Ok, thanks. I'll post my problem in that forums. Regards, Marcos.
... View more
10-04-2012
07:54 AM
|
0
|
0
|
357
|
POST
|
Hi. I'm developing a Java main app with ArcObjects 10.1, when I run this app and it tries to connect to ArcSDE 10.1 (over PostgreSQL 9.0.5) I get the following error: AutomationException: 0x8004156b - at com.esri.arcgis.datasourcesGDB.SdeWorkspaceFactory.open(Unknown Source) at es.edb.prueba.conexiones.ConexionSDE.conectar(ConexionSDE.java:52) at es.edb.prueba.principal.PruebaAO.main(PruebaAO.java:50) If I change the PropertySet with ArcSDE 9.3.1 + Oracle 10g connection params it gets success. What should I do for solving this problem? Should I intall PostgreSQL client in client machine? Where? Thanks in advance, Marcos. My connection code: ...
public void conectar() {
PropertySet propSet = null;
try {
// Create a WorkspaceFactory object within the Server's context
gWorkspaceFactory = (SdeWorkspaceFactory) ConexionAGS.crearObjeto(SdeWorkspaceFactory.getClsid());
// Create an instance of a PropertySet for an Oracle ArcSDE connection.
// The PropertySet acts as an array of keyed values that ArcSDE will use to collect
// the connection values from:
propSet = (PropertySet) ConexionAGS.crearObjeto(PropertySet.getClsid());
propSet.setProperty("SERVER", "my_server_name");
propSet.setProperty("INSTANCE", "5151");
propSet.setProperty("DATABASE", "arcsde");
propSet.setProperty("USER", "sde");
propSet.setProperty("PASSWORD", "passwordsde");
propSet.setProperty("VERSION", "SDE.DEFAULT");
// Open the ArcSDE workspace and get a handle to it through the WorkspaceFactory,
// passing in the PropertySet
gWS = gWorkspaceFactory.open(propSet, 0);
Cleaner.release(propSet);
// You now have a connection to the database through a Workspace object (gWS).
} catch (Exception e) {
e.printStackTrace();
}
}
... Configuration: Java 1.6 arcobjects.jar 10.1 ArcSDE 10.1 PostgreSQL 9.0.5 Server Operating System: W2003 Server Standard 64 bits Client Operating System (where I run Java main app): Windows 7 Professional 64 bits
... View more
10-04-2012
07:52 AM
|
0
|
2
|
2448
|
POST
|
Yes, I can connect to ArcSDE 10.1 (+ PostgreSQL 9.0.5) from ArcCatalog and ArcMap with the same connections params. No, ArcSDE logs don´t show anything, the Java app doesn´t connect to ArcSDE, therefore log doesn´t show any information. Thanks, Marcos.
... View more
10-04-2012
06:15 AM
|
0
|
0
|
357
|
POST
|
Hi Mandar. I have two machines, ArcSDE 9.3.1 + Oracle 10g are installed on a machine and ArcSDE 10.1 + PostgreSQL 9.0.5 are installed in other one. I'd like to connect to the two machines from arcobjects 10.1 Java (no ArcCatalog, no ArcMap). My Java app connect to ArcSDE 9.3.1 + Oracle 10g without problem but when I change the connection params to connect to ArcSDE 10.1 I get the following error: AutomationException: 0x8004156b - at com.esri.arcgis.datasourcesGDB.SdeWorkspaceFactory.open(Unknown Source) at es.edb.prueba.conexiones.ConexionSDE.conectar(ConexionSDE.java:52) at es.edb.prueba.principal.PruebaAO.main(PruebaAO.java:50) Connection code: ...
public void conectar() {
PropertySet propSet = null;
try {
// Create a WorkspaceFactory object within the Server's context
gWorkspaceFactory = (SdeWorkspaceFactory) ConexionAGS.crearObjeto(SdeWorkspaceFactory.getClsid());
// Create an instance of a PropertySet for an Oracle ArcSDE connection.
// The PropertySet acts as an array of keyed values that ArcSDE will use to collect
// the connection values from:
propSet = (PropertySet) ConexionAGS.crearObjeto(PropertySet.getClsid());
propSet.setProperty("SERVER", "my_server_name");
propSet.setProperty("INSTANCE", "5151");
propSet.setProperty("DATABASE", "arcsde");
propSet.setProperty("USER", "sde");
propSet.setProperty("PASSWORD", "passwordsde");
propSet.setProperty("VERSION", "SDE.DEFAULT");
// Open the ArcSDE workspace and get a handle to it through the WorkspaceFactory,
// passing in the PropertySet
gWS = gWorkspaceFactory.open(propSet, 0);
Cleaner.release(propSet);
// You now have a connection to the database through a Workspace object (gWS).
} catch (Exception e) {
e.printStackTrace();
}
}
... Thanks, Marcos
... View more
10-03-2012
10:29 PM
|
0
|
0
|
357
|
POST
|
Hi. I'm developing a Java main app with ArcObjects 10.1, when I run this app and it tries to connecto to ArcSDE 10.1 (over PostgreSQL 9.0.5) I get the following error: AutomationException: 0x8004156b - at com.esri.arcgis.datasourcesGDB.SdeWorkspaceFactory.open(Unknown Source) at es.edb.prueba.conexiones.ConexionSDE.conectar(ConexionSDE.java:52) at es.edb.prueba.principal.PruebaAO.main(PruebaAO.java:50) If I change the PropertySet with ArcSDE 9.3.1 + Oracle 10g connection params it gets success. What should I do for solving this problem? Should I intall PostgreSQL client in client machine? Where? Thanks in advance. My connection code:
...
public void conectar() {
PropertySet propSet = null;
try {
// Create a WorkspaceFactory object within the Server's context
gWorkspaceFactory = (SdeWorkspaceFactory) ConexionAGS.crearObjeto(SdeWorkspaceFactory.getClsid());
// Create an instance of a PropertySet for an Oracle ArcSDE connection.
// The PropertySet acts as an array of keyed values that ArcSDE will use to collect
// the connection values from:
propSet = (PropertySet) ConexionAGS.crearObjeto(PropertySet.getClsid());
propSet.setProperty("SERVER", "my_server_name");
propSet.setProperty("INSTANCE", "5151");
propSet.setProperty("DATABASE", "arcsde");
propSet.setProperty("USER", "sde");
propSet.setProperty("PASSWORD", "passwordsde");
propSet.setProperty("VERSION", "SDE.DEFAULT");
// Open the ArcSDE workspace and get a handle to it through the WorkspaceFactory,
// passing in the PropertySet
gWS = gWorkspaceFactory.open(propSet, 0);
Cleaner.release(propSet);
// You now have a connection to the database through a Workspace object (gWS).
} catch (Exception e) {
e.printStackTrace();
}
}
...
Configuration: Java 1.5 arcobjects.jar 10.1 ArcSDE 10.1 PostgreSQL 9.0.5 Server Operating System: W2003 Server Standard 64 bits Client Operating System: Windows 7 Professional 64 bits
... View more
10-03-2012
01:43 AM
|
0
|
6
|
1015
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|