Sofbang Tech Team Tips Series: Configuring Database Cloud (DbaaS) with Java Cloud for Application Deployment

Share on email
Share on linkedin
Share on xing
Share on facebook
Share on whatsapp
Share on twitter

In this post of Tech Team Tips Series, I am going to show how to migrate existing ADF web application deployed on-premise WebLogic 12c to Oracle Java Cloud Service.

I will use an existing WebLogic 12c ADF sample web application for migration. Before deploying the application, it is essential to configure these important steps:

Create Schema in Database Cloud (DbaaS)

Configure Data source in JCS

I encountered few slips while configuring these pre-requisites at first time. The following is what I encountered and how you can avoid and/or troubleshoot these slips:

1. Schema Creation through SQL Developer:

a. The “ORA–65096” error:

SQL Error: ORA–65096: invalid common user or role name

The Cause: An attempt was made to create a common user or role with a name that was not valid for common users or roles. In addition to the usual rules for user and role names, common user and role names must start with C## or c## and consist only of ASCII characters.

b. The “ORA–6048” error:

 SQL Error: ORA–65048: error encountered when processing the current DDL statement in pluggable database PDB1
 ORA–01955: DEFAULT ROLE ‘CONNECT’ not granted to user
 65048.00000 - “error encountered when processing the current DDL statement in pluggable database %s”

The Cause: An error was encountered when executing a statement in one of the pluggable databases.

2. JNDI Creation Error from JCS WebLogic console.
a. Connection test failed. Error ORA–01045.

Error ORA–01045: User C##TEST lacks CREATE SESSION privilege; logon denied
 oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:466)
 oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
 oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:391)

b. Connection test failed. Error ORA–01017:

Error ORA–01017: invalid username/password; logon denied
 oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:466)
 oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
 oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:391)

Don’t worry about these errors, just follow the steps below to configure your cloud environment properly for smooth running.

Create Schema in Database Cloud (DbaaS)

To avoid these Database permission and privileges errors, create your schema from the Database EM console instead of SQL Developer. The EM console automatically handles the schema creation and synchronization for CDB (Container Database) and associated PDB (Pluggable Databases) for your database instance.

Here’s how:

  1. Login to your Database Cloud instance
  2. Open the DbaaS dashboard click the Hamburger Icon[icon name=”align-justify” class=”” unprefixed_class=””] and select Open EM console.
    Picture1
  3. Login as system or SYS user.
  4. Click Security and select Users.
    Picture2
  5. Click Create Users.
  6. Enter user details and click [icon name=”angle-right” class=”” unprefixed_class=””] icon.
    Picture3
  7. Leave Tablespaces to default settings and click[icon name=”angle-right” class=”” unprefixed_class=””].
    Picture4
  8. Select the Connect, Resource Roles and Unlimited Tablespace Privilege. Click next.
    Picture5
    The Tablespace privilege is required to create tables & to execute DML statements.
  9. Click OK to create user.
    Picture6
  10. Import you existing schema objects to the DbaaS schema. Importing of schema is not scope of this post.

Configure Data source in JCS

    1. Login to your Java Cloud Service instance.
    2. Click the Hamburger Icon[icon name=”align-justify” class=”” unprefixed_class=””] and select Open WebLogic Server Console.
      Picture7
    3. Enter your login details with administrative privileges.
    4. Select Data Sources from the Services section to the open data sources.
      Picture8
    5. Click Lock & Edit to activate the new data source button.
      Picture9
    6. Click New & Select Generic Data Source.
      Picture10
    7. Enter your desired data source details and click Next.
      Picture11
    8. Select driver and click Next. You must select Oracle Driver (Thin) for instance connection; Versions: Any driver if you are going to use it with your ADF web application.
      Picture12
    9. Keep default settings and Click next.
    10. Enter Database details.
      Picture13
    11. Use DbaaS EM console to get the DB Name & Host Name.
      i. Login to DbaaS EM console with System User.
      ii. From the Status section you can easily get your DB Name & Host Name
      Picture14
      iii. Extract and fill following details and click NextEnter Database details.

      1. Database Name: DEV (case sensitive). Never use you Container Name i.e. PDB1 in most of the cases.
      2. Host Name: db1 (case sensitive)
      3. User Name: Your schema name
      4. Password: Your password
    12. Test Configuration
      Picture15
    13. Click Test Configuration. “Connection test succeeded.” A message will be displayed if your connection is successful. Click Next.
    14. Select Data Source Target Server.
      Picture16
    15. Select Finish
    16. Select Activate Changes from change center.

That’s it! Now you’re ready to deploy you application to JCS.

Deploy your application

Now that you are set to deploy your application to Java Cloud instance, you should familiarize with the deployment steps. There are many ways to deploy applications to WebLogic. In this example I simply used the WebLogic console to deploy my application. You can choose any method according to your preference.
I suggest following these simple steps to deploy an application to Java Cloud using WebLogic console

  1. Login to you Java Cloud Service Dashboard
  2. Click the Hamburger Icon [icon name=”align-justify” class=”” unprefixed_class=””] and select Open WebLogic Server Console
    Picture7
  3. Enter login details with administrative privileges.
  4. Select Deployments under Domain Structure to open the Deployments Home.
    Oracle WebLogic Server
  5. Click Lock & Edit to enable the install option for deployments and click Install.
  6. Click the Upload Your File link from Install Application assistance to upload your Ear/War file.
    Install Application Assistant
  7. Browse for your application.
    Picture20
  8. Select the Ear/War file that you want to deploy and click Next.
    Picture21
  9. Keep default settings and click Next.
  10. Select Deployment Targets and click Next.
  11. Keep default settings and click Next.
  12. Keep default settings and click Finish.
  13. Click Activate Changes to activate your application deployment changes.
  14. Make sure your application is deployed and in Active state to service the requests.
    Picture22

Congratulations! You have migrated your on premise ADF web application to Java Cloud Service.

Close Menu

Sofbang’s Licensing and Permitting Solution Accelerator

Introducing Sofbang’s licensing and permitting solution accelerator, an easy way for state and local municipalities to streamline their entire licensing and permitting application process for both staff and constituents. Leveraging the power of the Oracle Cloud Platform, Sofbang’s licensing and permitting solution accelerator allows budget-minded municipalities to do more with less cost all while improving constituent satisfaction.

Sofbang’s licensing and permitting solution accelerator, integrate seamlessly into your current ERP and CRM to provide a solution that is transparent and easy to use, giving municipal employees full control over the entire licensing and permitting process in one central location. Staff have the ability to track and manage permit applications, add new license types, configure permit details, and even set rates and renewal dates with one easy-to-use application.

With a straightforward web and mobile interface, citizens can renew or purchase new licenses, track orders, and get answers to frequently asked questions anytime, anywhere, freeing up staff, improving efficiency and reducing errors, saving you time and money. Available in the Oracle Cloud Marketplace, see how Sofbang’s licensing and permitting solution accelerator empowers your staff and constituents. Contact Sofbang to get started today.