cancel
Showing results for 
Search instead for 
Did you mean: 

Custom DataSource in NWCE 7.1

Former Member
0 Kudos

Hi CE 7.1 users,

In NWCE 7.1 i created a new custom DataSource (e.g. TESTDB) and registered an alias which is used in the persistence.xml file of the entity beans (EJB 3). Directly after registering the DataSource NWA displays it as "Fully available", although it can't be found when the EJB project is deployed. After restarting NWCE the DataSource appears in the status "Not Available".

I'me using MaxDB and configured the Connection with the following parameters:

SQL Engine: Vendor SQL (also tried the other with the same result)

Isolation Level: Default

Driver Class Name: com.sap.dbtech.jdbc.DriverSapDB

Database URL: jdbc:sapdb://dev005/CE1

User Name: myuser

Password: mypassword

For "Driver Name" I tried the SYSTEM_DRIVER and a driver which I manually created. In a JDBC test application the connection works with the same driver, URL, user and password.

When i looked at the log files I found some info messages in server_00.log which look quite strange:

BcaClassFinder.addResources Can not open zip fileC:\usr\sap\CE1\J00\j2ee\cluster\server0\temp\deploy\work\deploying\TESTDB.xml.sda1223997783509\META-INF\sda-dd.xml it is not a valid zip archive

This message is followed by several other files which should be in the same .zip file. The specified zip file doesn't exist in the file system.

It would be great if somebody could give me a hint where to look for the problem...

Thanks & Regards,

Tarik

Accepted Solutions (0)

Answers (1)

Answers (1)

snehal_kendre
Active Contributor
0 Kudos

HI,

although it can't be found when the EJB project is deployed. After restarting NWCE the DataSource appears in the status "Not Available".

as you have mentioned alias in persistence.xml, create a data-source-aliases.xml file in EAR project in which your EJB is present. and put data source alias there.

make sure that alias name in both data-source-aliases.xml and persistence.xml are same and in uppercase letters.

Former Member
0 Kudos

Hi

If I create the alias in data-source-aliases.xml with ${com.sap.datasource.default} instead of the custom data source it prints:

Clusterwide exception: server ID 4822950:com.sap.engine.services.dbpool.exceptions.BaseDeploymentException: Cannot register aliases for DataSource "SAPCE1DB".

It seems as if the custom data source cannot be found at all in JNDI even if it is displayed as "Fully available". There I get the same message like when an inexistent data source is specified.

Regards,

Tarik

snehal_kendre
Active Contributor
0 Kudos

HI,

dont change.

${com.sap.datasource.default} it is used by EJB container to point default datasource.

you just need to create alias.

Aliases

->${com.sap.datasource.default}

-> Alias name