Installing Formspider Reference Application

This tutorial describes how to install the Formspider Reference Application SRDEMO. SRDEMO is a customer relationship management application that tracks customer service requests. SRDEMO implements common use cases developers face while building applications, according to Formspider best practices. You can click here to run the SRDEMO application.

We are writing a developer guide which documents the development of SRDEMO in detail. First 5 chapters of the guide are available online:

Download the installation scripts and please follow the instructions below to install the SRDEMO application. Please note that SRDEMO requires Formspider version 1.3 to run properly.

A Note About Security Implementation

Please not that SRDEMO reference application demonstrates how to use an external security repository in a Formspider application. To find out more about the built-in Formspider Security Repository please read this tutorial.

1. Creating SRDEMO Schema

1.1. Setting Up the Database

Before creating the SRDEMO schema, make sure that DBMS_CRYPTO package is already installed in your database. To check it, connect to your database with the SYS user and run the following query:

select *
from user_objects
where object_name = 'DBMS_CRYPTO'

If the DBMS_CRYPTO package is not installed, please connect to your database as sysdba and install this package using the script named dbmsobtk.sql located under $ORACLE_HOME/rdbms/admin directory.

1.2. Creating Schema

Locate the dbSchemaScripts subdirectory. This folder contains files that used to create the SRDEMO user and schema, populate schema table data and drop the schema. Detailed information about these scripts is in the table below:

Script Description
01_createSchema.sql Creates the database user named “SRDEMO” and grants necessary privileges to this user.
02_createSchemaObjects.sql Creates schema tables and constraints.
03_createSequenceTriggers.sql Creates before insert triggers on the SERVICE_REQUESTS, PRODUCTS and USERS tables.
04_populateSchemaTables.sql Populates sample data in schema tables.
05_createPackagesViews.sql Creates all packages, views and triggers used by the application.
clearSchemaTables.sql Deletes data contained in tables created for the SRDEMO user.
dropSchemaObjects.sql Drops all database objects created for the SRDEMO user.
dropSchema.sql Drops SRDEMO schema from your database.

The SRDEMO user owns the data displayed in the application. Access to an Oracle SYS user or equivalent is required to create the user account and assign the appropriate privileges. To create the schema owner and schema, take the following steps:

  1. Open your favorite PL/SQL editor tool and log on as SYS or another DBA level user. (You may need to ask your DBA to run this script for you.) Execute the script named 01_createSchema.sql to create the SRDEMO schema owner.
  2. Log on to SRDEMO schema.
  3. Execute first the script named 02_createSchemaObjects.sql and then the script named 03_createSequenceTriggers.sql to create all necessary tables, constraints and database sequences. Execute the script named 04_populateSchemaTables.sql to insert sample data into tables.
  4. Finally, execute the script 05_createPackagesViews.sql to create application’s packages, views and triggers.

2. Importing Images into the Middle-tier

Locate the SRDEMO subdirectory. This folder contains the images and icons used in the application. It also contains an HTML file displayed as the FAQ page of the application. To import these files into the middle-tier:

  1. Navigate to the “apps” folder in your middle-tier installation. By default, you can find this folder under “[Tomcat Home]\webapps\formspider”.
  2. Copy the SRDEMO folder under the “apps” folder.

3. Importing SRDEMO Application

To import the SRDEMO application, perform the following steps:

  1. Open Formspider IDE, select “File –> Import” from the menu bar, the “Import Application” dialog shows up.

  2. Press “Browse”, select SRDEMO.xml file and press “Next”.

  3. Make sure that “Import my file as a new Application” option is selected and the value “SRDEMO” is appeared in the textField labeled “Import as”.

  4. Press “Import” to complete the process. An information message appears on the screen when the import is successfully completed.

  • Sreeviswa Peesapati

    Can someone help me please… I tried in Firefox, Chrome and IE.

    When I try to import SRDEMO application, I get the following error.

    All Formspider Objects are not loaded successfully: ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00216: invalid character 195 (0xC3)

    Error at line 13999

  • Sreeviswa Peesapati

    I know we all are SQL, PL/SQL developers, so below things may not be issues, however I want “FormSpider” to grow even for upcoming PL/SQL developer and junior database programmers as well. So, I thought we can improve the scripts a bit.

    1. In script 01 -> &&1 should be surrounded by double quotes.
    2. In scripts starting from 02, I feel we need to have the below 2 lines. That decreases the errors.
    rename the script clearSchemaTables.sql to 01_clearSchemaTables.sql
    rename the script dropSchemaObjects.sql to 02_dropSchemaObjects.sql
    rename the script dropSchema.sql to 03_dropSchema.sql

  • Sreeviswa Peesapati

    In 01_createSchema.sql, &&1 should be surrounded by double quotes that way, any oracle legitimate will be accepted. Currently it does not accept if the pwd starts with a number. I know this is an easy fix, but I just thought will udpate you. Thank you.

  • Uwe Klos


    getting Problem when choosing the SRDEMO.xml in Crome (Version 31.0.1650.57 m). Freezing. In FireFox works fine.

    • Yalim K. Gerger

      Hi Uwe. Do you mean that when you try to import the SRDEMO.xml from the Formspider IDE in Chrome the screen freezes?

  • downunder

    Hi there.

    The 05_createPackagesViews.sql script is asking two times for:
    Enter value for cells:
    Enter value for components:

    After installing to the latest formspider ver. the debug window is showing:

    ERROR : 09-08-2013 01:03:26 SRWelcome_login. ( Button ) : ButtonPress => signOn_buttonPressed : srdemo.signOn_buttonPressed ( ) => ORA-04067: not executed, package body “SRDEMO.DBMS_CRYPTO” does not exist ORA-06508: PL/SQL: could not find program unit being called: “SRDEMO.DBMS_CRYPTO”

    The “SRDEMO.DBMS_CRYPTO” is installed as VALID. The DB is OracleXE112_Win32.

    Please advice. Thanks


    • Samet Basaran

      Hi Drazen,

      Sorry for the inconvinienced caused to you. If scripts asks for values, you may add following lines to the beginning of the “05_createPackagesViews.sql” named script. (We will also update it for further installations)

      set define off

      The “DBMS_CRYPTO” package exists in SYS schema, so you need to grant execute right to
      SRDEMO user to use this package. Please run following statement in SYS user.

      grant execute on dbms_crypto to srdemo

      Best Regards,

      • downunder

        Thank you.

        That fixed it.

        On a fresh and same DB install, I needed to run $ORACLE_HOME/rdbms/admin/utlfile.sql
        as well.
        I can login now.
        Kind Regards