Skip to Content
Technical Articles

Analytics Agent on Paraya Glassfish

The SAP Analytics Agent is intended to connect on Premise Systems via the Cloud Connector to SAP Analytics cloud.

The agent itself comes as a war file deployable for Apache Tomcat servers.

DISCLAIMER: This is an experimental setup. It is NOT SUPPORTED and should not be used in a productive environment.

Despite Tomcat being the most widely used Java application server I recently came across an environment where Tomcat was not available but Glassfish was the Java Server of choice. In this blog I would like to share the results of my experiments.

TL;DR

The Analytics Agent seems to be running fine on Glassfish too. Only simple queries were used in my experiments – so this is still a very weak statement.

 

For this tutorial we need:

  • A SAC tennant where we have admin rights
  • An SAP JCO Adapter Version 3 SF 20  – search for Java Connector at https://launchpad.support.sap.com/#/softwarecenter
  • An up and running SAP Cloud Connector with access to the internet
  • The Analytics Agent war file (search via the link above for “analytics agent”) – SAP Analytics Cloud Agent 1.0.83 was used here.
  • The Paraya Glassfish 5 Web Application Server (Community Edition) – download via their website
  • A backend system (here we use BW/4) 

 

First we download and install the Paraya Glassfish community edition.

I will install it on my local machine on Windows 10 which is pretty much just unzipping it to a folder on my local harddrive. I have created a folder \paraya5

Then we copy the JCO files to the Paraya \lib folder payara5\glassfish\lib 

and start the server via payara5\glassfish\asadmin.bat

I’ve had a bit of an issue with my JDK not being picked up – so I made some changes to the config of glassfish payara5\\glassfish\config\asenv.bat to specifically point to the intended JDK.

set AS_JAVA=C:\Program Files\Java\jdk-11

After starting the Glassfish we can reach the admin console via the URL : http://127.0.0.1:4848

No admin password is required in the default setup.

Then we deploy the Analytics Agent war file via Applications-> Deploy or the direct link

The Analytics Agent will start and be available via http://127.0.0.1:8080

Then we need to create an Analytics Agent user to be able to access the just deployed application. We go back to the command line where we started the Paraya Server using asadmin.bat

In the admin console we enter:

asamin> create-file-user --groups Services user1

This will create a user: user1 that belongs to the group “Services” then we will be prompted to create a password we will need later

We switch back to the SAC Tennant.

I assume that this is the first CloudConnector connected to SAC

We go to System->Administration->Datasource Configuration

We need to enable CC Connections to the tenant by activating the SAP CP Account. I have added my email address and subsequently the Subaccount number can be seen.

We copy this number and go next to our Cloud Connector administration.

Here we create a new connection to our SAC Tennant. The quired information can be taken from the previous step in the SAC Tennant. Just make sure that your Subaccount user has the Cloud Connector Admin role.

Next we add the connection details to our Glassfish server. I have both the Cloud Connector and Glassfish running on the same machine: So this gives the following configuration:

Make sure to add the URL Path /C4_AGENT/ to the Resources (Path+AllSubPath – see Arrow) or you will get an “access denied” entry in you CC Log files.

As the next step we go back to the SAC Tennant:

To System->Administration->Datasource Configuration and add an onPremise Datasource

In the Cloud Connector we have configured the “Virtual Host” to be 127.0.0.1 Port 8080 and this is the information we put here.

The user + password is for the Analytics Agent and was previously configured by us via the Glassfish Admin Console (user1 + password)

So we have all the required information to fill in the details for the Default Location:

To configure the connection to the BW/4 System is the last part and is surprisingly done via SAC and not within the Analytics Agent.

We go to System-> Connection and add a new Connection:

We add the system details and our BW/4 login credentials (we need the SID, System Number, Client ID, Application Server URL, User Credentials)

The server URL needs to be accessible from the Analytics Agent, make sure that no Firewall is blocking the agent from accessing the BW/4 system. There is no need to open the BW/4 system to the internet.

Finally we can create a new Model based on the just created Data Connection:

GetDataFromSource-> BW/4 and then we select the just created Connection.

From there we can use the model and create a story based on it.

Be the first to leave a comment
You must be Logged on to comment or reply to a post.