Today Hybris 5.1.0 has been released and SAP HANA is now supported as database.

This blog will illustrate all the step needed to run hybris platform on Hana Database provided for free with Hana Cloud Platform Developer Trial.

In this way you can try the new platform with the great SAP HANA without having to install it.

Do not expect good performances since the hana cloud database is reachable via open-db-tunnel and the hana instance is shared.

It is just a starting point to have an hybris platform running on HANA.

Here the software requirements to download.

  • You need to register here to get the HCP developer freebies if you haven’t already one. You have to be registered on http://scn.sap.com to get the SAP ID.
  • You need to download the Console Client, provided with HCP SDK, from here. I suggest to donwload 2.x (J2EE 6 Web Profile). Follow this guide to install the Console Client.
  • You need to get hybris sofware. Download hybris platform here. You have to be registered on https://wiki.hybris.com.
  • You need the Oracle JDK 7 to run the console client and the local hybris platform.

At this point you have all the needed software. We can go ahead with the installation and configuration.

First step is to connect to the Hana Cloud Platform Cockpit with your SAP ID.

Navigate on the left side menu to the Database Schema entry, and create a new database schema based on HANA Database. Follow this guide for details.

In this example i’ve created the “hybris” schema:

/wp-content/uploads/2013/12/schema_343219.png

At this point we need to connect to the Hana Database in the Cloud using the open-db-tunnel command provided with hcp console client.

Follow this guide to configure to run open-db-tunnel.

The command for my account is this one:


bash# neo.sh open-db-tunnel --id hybris p079297trial.properties





Specify your database schema you’ve created with –id parameter.

I’ve used a property file to store the following information:


account=p079297trial
user=p079297
host=hanatrial.ondemand.com




Provide the password and you will get something like this:

/wp-content/uploads/2013/12/open_db_tunnel_343238.png

Take a note of hostname (localhost), Instance Number (00), User (DEV_*) and Password (secret 😉 ).

Now we have a tunnel that connects our local machine to the HANA database schema in the cloud.

At this point we can configure and run hybris platform.

Go to the directory in which you’ve unzipped the file hybris-platform-5.1.0.0.zip. From this point <HYBRIS_DIR>.

Here the commands for me:


bash# cd <HYBRIS_DIR>hybris/bin/platform/
bash# . ./setantenv.sh
bash#  ant all



When the build process asks you to choose the configuration hit return, in that way you choose the develop configuration:

/wp-content/uploads/2013/12/hybris_build_343147.png

When the build process has finished you have to open the file local.properties located in <HYBRIS_DIR>/hybris/config

Add the following lines in the local.properties file:


#load only english lang pack to save space!
lang.packs=en
#hana configuration
db.url=jdbc:sap://localhost:30015/?currentschema=NEO_**************&reconnect=true
db.driver=com.sap.db.jdbc.Driver
db.username=DEV_**************
db.password=**************



Replace the stars with your own logon data provided by open-db-tunnel.

Save the file and build the platform again with command:


bash# cd <HYBRIS_DIR>/hybris/bin/platform
bash# ant all



If during the build you get the error:

ERROR DbDriverValidator – Database driver – com.sap.db.jdbc.Driver   could not be found

Try to run this command:


bash# ant clean all

Start hybris platform with command


bash# ./hybrisserver.sh



When the platform is up-and-running we can go ahead and initialize the platform:

With web browser connect to http://localhost:9001/

Initialization will feed the database with the needed data to use the plaftorm.

Hit Initalize button!

Initialization process with hana database in the cloud will take a lot of time! So have patience and drink beer(s)!!

/wp-content/uploads/2013/12/initialization_343479.png

Now you can play with you local hybris platform with hana in the cloud!

Enjoy!

Download HANA Studio from here if you want to leverage the power of HANA!.

To report this post you need to login first.

34 Comments

You must be Logged on to comment or reply to a post.

    1. Francesco Bersani Post author

      Hi Richard

      we have to wait a little bit more to have hybris running on hcp platform.

      Anyway we could evaluate for free hybris on hana taking the advantage of the cloud database and the database tunnel.

      (0) 
        1. Vladislav Volodin

          I have tested hybris 5.1 and 5.3 with SAP JVM 1.7_65 probably, and it works fine, I didn’t any issues with it. Moreover, SAP JVM tools are great with SAP JVM.

          (0) 
  1. Abdulbasit Gulsen

    We have to sign up for Hybris to download, but it seems that only Customers, Partners or SAP Employees can sign-up. Is this the only option to be able to download Hybris ?

    (0) 
  2. Chris Wink

    But Why? The licensing model for HANA means you could never conceive of using it for a eCommerce application that stores a lot of data. Its the wrong sort of problem.

    Come to that, what IS the problem this HANA solution wants to solve?

    And you should be ok to run hybris in SAP JVM, this is just Hotspot with some Netweaver integration code.

    (0) 
    1. Francesco Bersani Post author

      Hi Chris

      thank you for your comment.

      Maybe the aim of this blog was not clearly explained by me.

      Obviously the solution proposed here is not for production use, but think anyone who has understood this

      I only showed how to configure the hybris development environment (that normally runs on the developer workstation) and connect it to HANA database that comes with developer edition of HCP.

      For an hybris developer could be interesting to see hybris on hana in action, and maybe most of them does’t have a hana system on premise.

      About SAP JVM I agree with you.

      I hope to see very soon the SAP JVM in the compatibility matrix.

      Best Regard

      Francesco

      (0) 
  3. Hans Verreydt

    Hi,

    When following these steps, following issue always occurs:

    [yDbDriverValidator] 10:36:11,577 [main] ERROR DbDriverValidator – Database driver – com.sap.db.jdbc.Driver   could not be found. Make sure you have it under D:\60) Hybris\5.1.0\hybris\bin\platform/lib/dbdriver

    BUILD FAILED

    D:\60) Hybris\5.1.0\hybris\bin\platform\build.xml:20: The following error occurred while executing this line:

    D:\60) Hybris\5.1.0\hybris\bin\platform\resources\ant\antmacros.xml:97: com.sap.db.jdbc.Driver

    Any ideas about why the jdbc driver isn’t found?

    ngdbc.jar file is included in the lib directory, which includes this.

    Thx!

    Regards,

    Hans

    (0) 
  4. swetha krishna

    Hi,

    I have tried initialising Hybris 5.1 with HANA database.Hybris takes very long time to initialise.During this process of initialisation,,Hybris connection to HANA is lost after 1 hour (from opening the tunnel).

    Any ideas on why HANA is disconnected would be of great help

    Thx!

    Regards

    Swetha

    (0) 
    1. Amit Gundage

      Hi Swetha,     
      Is your problem solved by using single lang pack? because we are also facing the same problem and by doing so there is no effect on amount of data.

      Thanks
      Amit

      (0) 
  5. Francesco Bersani Post author

    Hi Hans and Swetha

    i got the same error but after executing a clean and build the error disappear.

    Then i’m able to successuflly build and start the platform.

    This is the command i’ve executed:

    # ant clean all

    (0) 
  6. Amit Gundage

    Hello,

         We also have the same requirement, we want to use Hana cloud database for hybris. We also followed the same steps, but we are facing problem in initializing the data in database. After 30-31 MB of data the tunnel connection is getting lost, and we are getting socket closed error.

         We tried this two – three times but didn’t get any solution.

         Is there is any limit on amount of data in one schema ? or number of transactions allowed in one schema ?

          Also sometimes the account gets locked for 24 hours after 30-31 MB of data if we try to reconnect.

    Regards,

    Amit

    (0) 
  7. Francesco Bersani Post author

    Hi Amit

    in my tests I never got an error with the database tunnel connection.

    Please note that the hanatrial cloud is not intended for large data usage.

    In my tests i’ve always deployed the hybris platform only with english lang pack only.

    This create about 10MB of data in the database as you can see here.

    schemasize.PNG

    If you want to run hybris on hana maybe you could evaluate the possibility to use the hana developer edition.

    But i’m not sure if the license will allow it.

    (0) 
    1. Amit Gundage

      Hi Francesco,
            Thanks a lot for your help. However we tried with just one language pack but still we are not able to reach minimum amount of data that you have achieved i.e. 10 MB, also as you know the tunnel connection is valid for just 24 Hrs. and after that the connection is closed automatically we are not able to initialize hybris suite in 24 Hrs.
            Is there any other configuration you did to minimize the amount of data in hybris ?
            Any help on this is really appreciated.
      Thanks
      Amit

      (0) 
      1. Francesco Bersani Post author

        Hi Amit

        please make sure that:

        • in local.properties this line is present:

                 lang.packs=en

        • your file localextension.xml is based on the /hybris/sampleconfigurations/platform_only.xml
        • Perform an ant build all before start the platform in case you make changes to the above files.
        (0) 
  8. Weibin Yu

    Hi Francesco,

    I have installed the Hybris on HANA, and Initialize the HANA db successfully. But when I added the CUPPY extension,  and update the database,   and get the trouble. the error msg is as follow.


    Please help me check. Thanks a million in advance,


    HANA Database(1.00.70).

    ERROR [hybrisHTTP7] [DefaultInitUpdateFacade] Failed to initialize
    java.lang.NullPointerException
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
    at de.hybris.bootstrap.ddl.dbtypesystem.impl.DbTypeSystemFactory.createDbTypeSystem(DbTypeSystemF
    actory.java:30)
    at de.hybris.bootstrap.ddl.HybrisSchemaGenerator.createDbTypeSystem(HybrisSchemaGenerator.java:25
    6)
    at de.hybris.bootstrap.ddl.HybrisSchemaGenerator.update(HybrisSchemaGenerator.java:203)
    at de.hybris.platform.core.Initialization.initializeSchemaAndTypeSystemFullyNewStyle(Initializati
    on.java:1228)
    at de.hybris.platform.core.Initialization.initialize(Initialization.java:1098)
    at de.hybris.platform.core.Initialization.createEmptySystemOrUpdate(Initialization.java:789)
    at de.hybris.platform.core.Initialization.access$4(Initialization.java:768)
    at de.hybris.platform.core.Initialization$4.call(Initialization.java:588)
    at de.hybris.platform.core.Initialization$4.call(Initialization.java:1)
    at de.hybris.platform.core.Initialization$SessionRecoveryAfterRegistryStartupAwareExecutor.execut

    (0) 
  9. Dibyajyoti Nanda

    Hi Francesco,

    I am trying to connect to HCP as per your steps mentioned above.

    I am working with Hybris-commerce-suite-5.3.0.

    as per your steps I have added my account details in to local.properties after that while I am trying to run

    bash# ant all 

    I am getting below error 1.PNG

    2.PNG

    I have tried with

    bash# ant clean all

    but still getting the error


    while I am executing

    bash# ./hybrisserver.bat

    I am getting below error

    3.PNG

    would you please help on this.


    Regards

    Dibyajyoti Nanda

    (0) 
  10. Jaekumar Rajendran

    Thanks Francesco for the article , I am very grateful to you !! please keep sharing more on Hybris.

    1.  The Hybris 5.5.1 which you have downloaded has an internal database temporarily built just for demo purpose and does not need the Hana schema to be connected .

    2. So for demo purpose installation : please refer below link below https://wiki.hybris.com/display/release5/Quick+Installation

    3. I encountered certain errors during my installation using windows 7 sharing the fixes with you all : installation happens using cmd .

    error a : java tools.jar not found  ,This occurs when performing ant clean all.

              Solution: Install java jdk ,  if you still get the error go to java installation folder and find tools.jar copy and paste into the location which the error states .

    error b :  When you are using a high RAM system unfortunately you might encounter this error while running hybrisserver.bat.

              Solution :  enter this in cmd–>  set _JAVA_OPTIONS=“-Xmx256M”  , enter and then do hybrisserver.bat.

    Disclaimer : I did these steps and the Hybris initiated very well  and I have 0 knowledge on java , so please take guidance if java expert is available. Also feel free to comment and correct/add extra tips. Thanks.

    (0) 
  11. Venkatakrishnan Srinivasamurthy

    Hi Francesco

    we installed and logged in hAc Console, using default username and password.we want to enter hMc ,do we have default username and password for hMc as well?

    If yes, kindly share with us.

    Many Thanks

    (0) 

Leave a Reply