Hi,
I was asked by some developers, who executed SAP NW Cloud Application Development Scenario End-to-End Tutorial which "Database Viewer" one could use to displayed the stored data when testing the application locally.
I will answer this question by means of the below step-by-step description which might be helpful especially for NW Cloud beginners.
There it is explained how to use the Eclipse "Data Source Explorer" to display database (db) content which has been created by a Web Application running locally on NW Cloud test server
As example I use here the persons-list application which has been developed as part of the Scenario End-to-End Tutorial, but of course this kind of displaying db contents works for other locally running NetWeaver (NW) Cloud applications as well.
For the below description we make use of the following NW Cloud application
- Install the Ready-to-Run Sample Application
There in chapter 3.1 you run the "e2e-nwcloud-app-persons-list" application on the Local Test Server for NW Cloud.
From the running persons-list Web Application you create persons (firstname and lastname) which are stored in an embedded Derby db which is already part of the Eclipse installation.
Unfortunately you cannot connect to this embedded Derby db via a db viewer (like the "Data Source Explorer" Eclipse view) because the embedded derby db allows only one connection which is already established by the Web application, so that a db viewer is not able to establish a separate connection.
To solve this problem you could do the following four steps:
To do so just execute the following step-by-step description:
(e.g. I downloaded "db-derby-10.9.1.0-bin.zip" and extracted the content "db-derby-10.9.1.0-bin" to C:\)
This quick derby installation should be sufficient but if you want to get more installation and other details refer to http://db.apache.org/derby/
It is assumed here that you published and run the "e2e-nwcloud-app-persons-list" web application on the Local Test Server for NW Cloud.
(as described in chapter 3.1 of document http://scn.sap.com/docs/DOC-33514).
From there on do the following:
javax.persistence.jdbc.driver=org.apache.derby.jdbc.ClientDriver
javax.persistence.jdbc.url=jdbc:derby://localhost:1527/DemoDB;create=true
javax.persistence.jdbc.user=demo
javax.persistence.jdbc.password=demo
eclipselink.target-database=Derby
With these steps the "Test Server for SAP NetWeaver Cloud" server on which the "e2e-nwcloud-app-persons-list" web application is already deployed is connected to the newly installed derby db
(this name of the db has been specified in the connection.properties)
Follow the screenshot sequence to create a new Derby Connection Profile and display the database content that was created by the web application (John Smith)
Define New Database Connection in Data Source Explorer view
Add new Derby Embedded JDBC Driver of version 10.2
Specify derbyclient.jar location
The remove derbyclient.jar entry from JAR list
After that confirm New Driver Definition dialog with OK.
On the Derby Connection Profile specify the properties as shown in the following screenshot; especially the name of the db: DemoDB (as specified in connection.properties)
Then open T_PERSON data for edit
Confirm that the before created person data "John Smith" is displayed in the data editor.
You could also install a MaxDB (for installation see here http://scn.sap.com/docs/DOC-8406) and do corresponding changes (connection.properties) as described above and work then with MaxDB as standalone db.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
36 | |
25 | |
17 | |
13 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 |