cancel
Showing results for 
Search instead for 
Did you mean: 

Remote JDBC connect error; missing SecStore.properties

Former Member
0 Kudos

Hi

After creating the intial context for a remote JDBC connection, using a Java client, to the J2EE engine, when calling createConnection(), I get the following error on ver 6.4:

com.sap.engine.services.dbpool.exceptions.BaseSQLException: ResourceException in method ConnectionFactoryImpl.getConnection(): com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection:

com.sap.sql.log.OpenSQLException: Error while accessing secure store: File "SecStore.properties" does not exist although it should..

I can not find the file on the server, although what limited doco I can find suggests SecStore should be created at install time. Am I missing something here?

Thanks, Leonard

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Tried, but no success. Am definitely connecting to jndi, getting the context etc. The issue seems to be here;

Caused by: com.sap.security.core.server.secstorefs.FileMissingException: File "SecStore.properties" does not exist although it should.

at com.sap.security.core.server.secstorefs.StorageHandler.openExistingStore(StorageHandler.java:372)

at com.sap.security.core.server.secstorefs.SecStoreFS.openExistingStore(SecStoreFS.java:1946)

at com.sap.sql.connect.OpenSQLConnectInfo.getStore(OpenSQLConnectInfo.java:803)

at com.sap.sql.connect.OpenSQLConnectInfo.lookup(OpenSQLConnectInfo.java:784)

at com.sap.sql.connect.OpenSQLDataSourceImpl.setDataSourceName(OpenSQLDataSourceImpl.java:206)

Why is StorageHandler.openExistingStore trying to open SecStore.properties from the remote java client and not on the j2ee server? This makes no sense.

Thanks

Former Member
0 Kudos

Hi Leonard,

Were you able to solve this?

I am facing the same issue.

thanks for your help.

Former Member
0 Kudos

Hi Leonard,

you can find the SecStore.properties file in the following directory on your server: \usr\sap\<SID>\SYS\global\security\data. Have you checked it?

Former Member
0 Kudos

Yes, it's there and seems ok in format. If I place this file at the client side, the error goes away; but other errors occur:

DataSource ds = (DataSource) context.lookup("/jdbc/client/jdbc/SAPXGMDB");

Connection c = ds.getConnection(); # gives a NullPointer

I don't understand what's happening here. Why does the client seem to want this file? If I ran this code on J2EE, I'd get the JDBC connection, but the SAP dbpool.spi.ManagedConnectionFactoryImpl.createManagedConnection layers seem to adding all sorts of added auth. checking. Am I going the wrong way about getting a JDBC connection from the dbpool?

Regards

Former Member
0 Kudos

Hi,

the NullPointerException could be occur of an NameNotFoundException. This is possible if you initialize the InitialContext without some parameters for WebAS.

Try this code for initialization:

Hashtable props = new Hashtable();
props.put("java.naming.factory.initial","com.sap.engine.services.jndi.InitialContextFactoryImpl");
props.put("java.naming.provider.url","localhost:50004");

InitialContext jndiContext = new InitialContext(props);
DataSource ds = (DataSource) jndiContext.lookup("/jdbc/client/jdbc/SAPXGMDB");

Regards André

Former Member
0 Kudos

Hi,

can you try looking up the datasource with just the "jdbc/client/jdbc/SAPXGMDB" String (without the <b>slash</b> in front of jdbc?)

Former Member
0 Kudos

Hi, thanks, but same problem. This is very strange. Regards.