on 05-26-2005 5:11 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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é
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.