Thursday, July 28, 2016

Weblogic 10.3.6: Registering the Jersey JAX-RS RI Shared Libraries With Your WebLogic Server Instances

Shared Java EE libraries are registered with one or more WebLogic Server instances by deploying them to the target servers and indicating that the deployments are to be shared. Shared Java EE libraries must be targeted to the same WebLogic Server instances you want to deploy applications that reference the libraries.
When a referencing application is deployed, WebLogic Server merges the shared library files with the application. If you try to deploy a referencing application to a server instance that has not registered a required library, deployment of the referencing application fails with following exception

[Extension-Name: jsr311-api, exact-match: false], [Extension-Name: jersey-bundle, exact-match: false].>
java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer
        at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(
        at weblogic.utils.classloaders.GenericClassLoader.findClass(
        at java.lang.ClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        at weblogic.utils.classloaders.GenericClassLoader.loadClass(
        at weblogic.servlet.internal.WebAnnotationProcessorImpl.processServlets(
        at weblogic.servlet.internal.WebAnnotationProcessorImpl.processJ2eeAnnotations(

The following steps show how to deploy the Jersey JAX-RS RI Shared Libraries With Your WebLogic Server Instances.

  • Change to the directory C:\WLS10-3-6\Oracle\Middleware\wlserver_10.3\server\bin
  • Execute the cmd file setWLSEnv.cmd

  •  Execute the command
java weblogic.Deployer -verbose -noexit -source C:\WLS10-3-6\Oracle\Middleware\wlserver_10.3\common\deployable-libraries\jersey-bundle- -targets AdminServer -adminurl t3://localhost:7001 -user weblogic -password welcome1 -deploy -library

  • Execute the command.
java weblogic.Deployer -verbose -noexit -source C:\WLS10-3-6\Oracle\Middleware\wlserver_10.3\common\deployable-libraries\jsr311-api-1.1.1.war -targets AdminServer -adminurl t3://localhost:7001 -user weblogic -password welcome1 -deploy -library

Monday, July 25, 2016

Weblogic 12.2.1:Java - JMX to get the Server Name and port

 The following section of code discusses how to get the Server Name and Port for the managed server or a cluster where the API is deployed.

     public static Integer getPort() {
       Integer port=null; 
       try {
            InitialContext ctx = new InitialContext();
            String serverName = System.getProperty("weblogic.Name");

            MBeanServer server =

            ObjectName objName =
                new ObjectName("com.bea:Name=" + serverName + ",Type=Server");
            port = (Integer)server.getAttribute(objName, "ListenPort");
        } catch (Exception e) {
        return port;

Monday, July 4, 2016

Oracle® Weblogic 10.3.6 Or Higher: Steps to create a Self-Signed Certificate using the SHA-256 Algorithm

Support for SHA-256 with JSSE is supported in WLS 10.3.3 and higher, in conjunction with using the JSSE SSL implementation. It is not supported when using the Certicom SSL implementation, which is deprecated in WLS 10.3.4 and higher.

The following sections describes the steps to create the self signed SHA-256 certificate.

  • Set the WLS domain, by executing the command or (Windows)
  • Enter the following pieces of when prompted

$ keytool -genkey -alias selfsignedcert -keyalg RSA -sigalg SHA256withRSA -keypass password1 -keystore identity.jks -storepass password -validity 365

What is your first and last name?
What is the name of your organizational unit?
[Unknown]: mindtelligent-soa
What is the name of your organization?
[Unknown]: MindTelligent
What is the name of your City or Locality?
[Unknown]: El Dorado Hills
What is the name of your State or Province?
[Unknown]: c
What is the two-letter country code for this unit?
[Unknown]: US
Is CN=, OU= mindtelligent-soa, O= MindTelligent, L= El Dorado Hills, ST= El Dorado Hills, C=US correct?
[no]: yes

  • Export the certificate

$ keytool -export -alias Mindteligent-SelfSigned -sigalg SHA256withRSA -file root.cer -keystore identity.jks
Enter keystore password:
Certificate stored in file <root.cer>          

  • Import the root certificate to the trust store:

$keytool -import -alias Mindteligent-SelfSigned  -sigalg SHA256withRSA -trustcacerts -file root.cer -keystore trust.jks
Enter keystore password:
Re-enter new password:

  • Please include the following parameter for startup options.


Wednesday, June 15, 2016

Oracle® SOA 12c (12.1.3 and 12.2.1) Setting Composite Title using a mediator

The setCompositeInstanceTitle operation is no longer supported in 12c. It has been replaced with oraext:setFlowInstanceTitle operation. 

To use this operation in SOA 12c (12.1.3) specifically , we need to install Patch 18310693.

Pre-install Instructions for the patch

  • Set the ORACLE_HOME environment variable to the directory where you have installed Oracle SOA Suite.

  • Stop all servers (AdminServer and all Managed server(s)).

Installation Instructions

  • Unzip the patch zip file into the PATCH_TOP.

   $ unzip -d PATCH_TOP

  • Set your current directory to the directory where the patch is located.

    $ cd PATCH_TOP/18310693

  • Run OPatch to apply the patch.

   $ opatch apply

  • Once the patch has checked all the imperative prerequisites, it will prompt to proceed with installation. Please enter Y and press Enter.

  • On successful installation, you should see the following results.

SOA 12c 12.1.3 is now ready testing the setSlowInstanceTitle.

Changes to the Mediator

  • Click on the Assign button of the Mediator and setthe following property

  • Please ensure that you use the operation setFlowInstanceTitle() as shown below
         oraext:setFlowInstanceTitle(string('The tilte is'))

  • Build your code and deploy it. You should be able to the Tile in the Enterprise Manager

Monday, June 13, 2016

Oracle® Weblogic 12.2.1: How to implement a custom UUID in for Toplink EJB 3.0

To implement a custom sequence strategy you can subclass org.eclipse.persistence.sequencing.Sequenceor StandardSequence 

StandardSequence assumes a numeric value being used so Sequence will be used for this example to return a random UUID value.

Implementation of UUIDSequence
package com.mindtelligent.worklist.model;

import java.util.UUID;
import java.util.Vector;

import org.eclipse.persistence.config.SessionCustomizer;
import org.eclipse.persistence.internal.databaseaccess.Accessor;
import org.eclipse.persistence.internal.sessions.AbstractSession;
import org.eclipse.persistence.sequencing.Sequence;
import org.eclipse.persistence.sessions.Session;

public class UUIDSequence extends Sequence implements SessionCustomizer {

public UUIDSequence() {

public UUIDSequence(String name) {

public Object getGeneratedValue(Accessor accessor,
AbstractSession writeSession, String seqName) {
return UUID.randomUUID().toString().toUpperCase();

public Vector getGeneratedVector(Accessor accessor,
AbstractSession writeSession, String seqName, int size) {
return null;

public void onConnect() {

public void onDisconnect() {

public boolean shouldAcquireValueAfterInsert() {
return false;


public boolean shouldUseTransaction() {
return false;

public boolean shouldUsePreallocation() {
return false;

public void customize(Session session) throws Exception {
UUIDSequence sequence = new UUIDSequence("system-uuid");




Registering Sequence

Add a property to persistence.xml

 <property name="eclipselink.session.customizer" value="com.mindtelligent.worklist.model.UUIDSequence"/> 



Change the EJB 3.0 Class 

@Column(name="ADDRESS_ID", nullable = false, length = 50)

Where ADDRESS_ID is the Primary Key of the table

Thursday, May 26, 2016

Oracle® SOA 12c Enterprise Scheduler Health Check

Access the Java health check servlet in a web browser.

Access to the health check page is available only to users with administrator privileges.

To verify the Oracle Enterprise Scheduler installation:

  • In a web browser, enter the following URL: 



  • Log in to the diagnostic servlet using an Oracle WebLogic Server administrator user name and password. 

  •  Click the Check Health button to verify the installation

  • You should see the following screen

Friday, April 29, 2016

Oracle® SOA 12c 12.2.1 Quick Start

Starting in 12(12.1.3), we can no longer download SOA extensions. We need to use a Quick Start distribution to obtain a version of JDeveloper pre-configured for either SOA Suite or Business Process Management Suite. This thread discusses the installation of Oracle SOA Suite Quick Start.

  • Navigate to URL to download the zip files for SOA Suite Quick Start. Download both the files.

  • Extract the contents of both the files
  • Ensure that contents of both the zip files are in the same folder

  • JDK 1.8 is a minimum requirement for running the software. Please download and install JDK 1.8 or above. Set the JAVA_HOME environment variable.

  • Navigate to the unzipped folder for Disk 1 of 1 and give the command
java -jar fmw_12.

  • This will launch the SOA installer

  • Click Next 

  • Click Next

  • Click Next

  • Click Next

  • Click Install

Please verify JDeveloper

Tuesday, April 19, 2016

Oracle® Fusion Middleware Weblogic 10.3.6: JPA client error

In a recent IoT project, MindTelligent team ran into an issue with connecting the JPA (Session Facade Client) with Session Beans when deployed on Weblogic 10.3.6 JDK 1.7 and client running on JDeveloper

Following exception is thrown org.eclipse.persistence.exceptions.ValidationException; local class incompatible: stream classdesc serialVersionUID = 8323218586942907354, local class serialVersionUID = 7573113798854854020 org.eclipse.persistence.exceptions.ValidationException; local class incompatible: stream classdesc serialVersionUID = 8323218586942907354, local class serialVersionUID = 7573113798854854020
at weblogic.rjvm.ClassTableEntry.readExternal(

The version of the Class org.eclipse.persistence.exceptions.ValidationException is different in JDeveloper and Weblogic instance on which the EJB 3.0 are running.


FTP the  org.eclipse.persistence_1.2.0.0_2-3.jar from the Weblogic Instance where the deployed beans are running and include it in the CLASSPATH of the client as shown below. This should resolve the issue

Monday, March 14, 2016

Registering the Jersey JAX-RS RI Shared Libraries With Your WebLogic Server Instances

Shared Java EE libraries are registered with one or more WebLogic Server instances by deploying them to the target servers and indicating that the deployments are to be shared. Shared Java EE libraries must be targeted to the same WebLogic Server instances you want to deploy applications that reference the libraries.

If you wish to use Jersey JAX-RS RI Version, the following shows an example of how to deploy the shared libraries that provide support for the basic Jersey JAX-RS RI functionality and JAX-RS API.

  • Change to the WLS_HOME/server/bin and run the command
  • Change to the WLS_HOME/server/lib directory

           cd C:\WLS1036\Oracle\Middleware\wlserver_10.3\server\lib

  •  Give the command

java weblogic.Deployer -verbose -noexit -source C:\WLS1036\Oracle\Middleware\wlserver_10.3\common\deployable-libraries\jersey-bundle- -targets AdminServer -adminurl t3://localhost:7001 -user weblogic -password *** -deploy -library

  • Give the command
 java weblogic.Deployer -verbose -noexit -source C:\WLS1036\Oracle\Middleware\wlserver_10.3\common\deployable-libraries\jsr311-api-1.1.1.war -targets AdminServer -adminurl t3://localhost:7001 -user weblogic -password Satnaam111 -deploy -library

Wednesday, November 18, 2015

Customizing Okta Accounts Page, Organization Logo and Appearance

Customizing Okta

The Settings menu allows you to customize the look and feel of your organization. Admins can customize elements such as headings, labels, and the appearance of the Okta My Applications or "home" page, as well as the look and feel of the activation email. The Settings menu also includes a Downloads option to the latest browser plug-ins and admin downloads.
The Settings menu is an option on the Administrator Dashboard:
User-added image

Account Page

As an admin, you can supply contact information for your org, including organization, end-user support, billing, and technical contacts. You can also give Okta Support temporary access to your account for troubleshooting purposes, and can select the type of email notifications you want to receive. The Account page hosts all of this information.

  1. Select Settings > Account.
  2. Click the corresponding Edit link to specify the following:
    • Organization Contact: Used by Okta to communicate with your organization.
    • End User Support Contact: Enter a support phone number that will display on Okta help pages.
    • Technical Contact: Receives notices when users send a help request. The email address appears on all new user registration emails.
    • Billing Information: Used by Okta for billing purposes.
    • Give Access to Okta Support: By default this is Disabled. If you want to allow Okta Support to login to your account as an administrator for troubleshooting purposes, click Edit, then change this option toEnabled. Access is only enabled for 8 hours; after which you will need to re-enable access for Okta Support again.
    • Email Notifications: Configure which email notifications are sent to you by doing the following:
    1. From your Administrator Dashboard, select Settings > Account, and then click Edit in the Email Notifications section.
    2. For each email notification that you want to receive, select the corresponding check box.
  1. Once you have made any changes to your account settings, click Save.

Appearance Page

Admins can specify the look and feel of their end users'  My Applications or "home" page. The Appearancepage allows for customizing how much or how little of Okta is shown for an org.

Display Options

The elements under Display Options have a large impact on how your end users experience their My Applications home page, as well as the admin user experience.  
  1. Select Settings > Appearance.
  1. In the Display Options section, click Edit
  1. You can specify 2 display options here:
  • Logo URL: If you choose to upload your org's logo (as explained in the following section), you can have the logo link to your company's website. Specify the URL you want to link to in this field.
Note: A logo must be uploaded before the link can become active. See Organization Logo below for instructions on how to add a company logo. 
  • Enable Okta Home Footer: Specify whether you want to the Okta footer to appear on your end users' Home pages (True/False)
  1. Click Save.

Organization Logo

One way you can customize your end users' My Applications or "home" page is to add the company logo for your org.
  1. Prepare a logo file. The file must be in .jpg, .png, or .gif format. The maximum file size is 100kB, and the maximum dimensions are 3000 x 500px.
  1. ​Select Settings > Appearance.
  1. Under Organization Logo, click Upload Logo, and then browse to find the logo file you previously created.
  1. Click Upload Logo. The image appears as a thumbnail which displays when your users sign in.

Application Theme

Choose an application theme to customize the look and feel for your end users. Click on a thumbnail to choose a theme.
  1. Select Settings > Appearance.
  1. From under Application Theme, select a thumbnail. The Change Theme button appears. This is the color scheme that will appear on your end user's My Applications home page. 
The selected theme appears with these colors when your end users sign in.