Menu
  • ABOUT US
  • WHAT WE DO
  • OUR WORK
    • Close
  • NEWS
  • BLOG
  • CONTACT

Weblogic 12c – Trouble shooting pointers

JRF enabled domain in weblogic 12c:

Weblogic’s latest release 12c is out a while ago with some great new features and while we were trying to come up with a new ConfigNOW release to support this release, we identified few really interesting requirements and aspects of this release. Here is one among them and thought we might not be the only ones to miss this.

When creating a JRF enabled domain via WLST we were hit with a confusing jps-context issue. Firstly here is the code snippet to reproduce this issue. Once you create a simple plain WLS domain try to extend that using the below WLST script. This JRF extension is a required template for creating SOA/OSB/EM domains as most of us know already.

print 'Adding JRF Template to domain.'
addTemplate('C:/Oracle12c/oracle_common/common/templates/wls/oracle.jrf_template_12.1.3.jar')

# making the ServiceTable connection(Kind of Registry table where 
# information about all other RCU schemas will be maintained).
# Please make sure they are correct for your database/environment

cd('/JDBCSystemResource/LocalSvcTblDataSource/JdbcResource/LocalSvcTblDataSource')
cd('JDBCDriverParams/NO_NAME_0')
set('DriverName','oracle.jdbc.OracleDriver')
set('URL','jdbc:oracle:thin:@localhost:1521/xe')
set('PasswordEncrypted', 'oracle')
cd('Properties/NO_NAME_0')
cd('Property/user')
cmo.setValue('DEV1_STB')

# Simulates the RCU Auto Configuration step of Configuration Wizrd. This step fatches the other schema details from 
# Service table and caches it. At this point opss-data-source gets configured with correct JDBC connection details obtained from  #Service table however they are not yet committed 

 getDatabaseDefaults()

#This tries to save those cached Datasource details, but fails

updateDomain()

But while updating the domain (very last step in the above code snippet) with this new Datasource configuration, a completely misleading error message is displayed which goes like below.

oracle.security.opss.tools.lifecycle.LifecycleException: Fail to find default JPS Context in C:Oracle12cdomainsosb_domain_12Cconfigfmwconfigjps-config-jse.xml.

After a series of painful trial and errors, what we realized is this is caused by a missing environment variable called COMMON_COMPONENTS_HOME (to be set to MW_HOME/oracle_common directory). Ideally we should have invoked the wlst using /oracle_commoncommonbinwlst.cmd instead of doing wlserverserverbinsetWLSEnv.cmd since that will set up all these Home directories for us. Unfortunately the error message here is not very helpful and in fact very confusing in this instance.

Oracle XE Time Zone issue:

If you are running DB client tools such as rcu/even weblogic datasources via JDBC drivers in a Linux environment against freshly installed Oracle XE11g DB instance (could even be other latest Oracle Database versions but we haven’t tested them yet) , you might be encountered with an error message like below.

ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found

Apparently the latest editions of Oracle Databases don’t come up with a default TimeZone setup already, but they actually expect the DB client (whatever it is) to provide this information while trying to connect to it. So you can expect to see this from even weblogic server logs while the database driver is trying to create data sources etc or even while running tools such as RCU.

Thankfully this one is easy to find and fix. If you are running a simple java client (which most of them are) pass this as a JAVA option using –D parameter as below.

-Duser.timezone=UTC (or whatever time zone you prefer to be default)

Or if you are running any third party tool to connect to Database, you could even try to set this as an environment variable as below.

export TZ=’UTC’

Hope this helps!

3 Comments

  • san says:

    cd $HOME/Middleware/oracle_common/common/bin/

    $HOME/Middleware/oracle_common/common/bin/setNMProps.sh

    source $HOME/Middleware/wlserver/server/bin/setWLSEnv.sh

    cd $HOME/Middleware/oracle_common/common/bin

    source $HOME/Middleware/oracle_common/common/bin/setWlstEnv.sh

    source $HOME/Middleware/oracle_common/common/bin/setHomeDirs.sh

    echo “Configuring Domains”

    cd $HOME/Middleware/oracle_common/common/bin

    ./wlst.sh $HOME/create_domain$ORACLE_SID.py

    ./wlst.sh $HOME/create_soa_em$ORACLE_SID.py

    Error: updateDomain() failed. Do dumpStack() to see details.

    Reason: oracle.security.opss.tools.lifecycle.LifecycleException: Fail to find default JPS Context in /abc/Middleware/user_projects/domains/soa_domain/config/fmwconfig/jps-config-jse.xml.

    Exception:

    oracle.security.opss.tools.lifecycle.LifecycleException: Fail to find default JPS Context in /abc/Middleware/user_projects/domains/soa_domain/config/fmwconfig/jps-config-jse.xml.

    at com.oracle.cie.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:56)
    at com.oracle.cie.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:2279)
    at com.oracle.cie.domain.script.jython.WLScriptContext.updateDomain(WLScriptContext.java:827)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)

    com.oracle.cie.domain.script.jython.WLSTException: com.oracle.cie.domain.script.jython.WLSTException: com.oracle.cie.domain.script.ScriptException: Domain Extension Application Failed!

    Domain Location: /abc/Middleware/user_projects/domains/soa_domain

    Reason: oracle.security.opss.tools.lifecycle.LifecycleException: Fail to find default JPS Context in /abc/Middleware/user_projects/domains/soa_domain/config/fmwconfig/jps-config-jse.xml.

    • san says:

      The parameter COMMON_COMPONENTS_HOME looks be set with the wlst call from $HOME/Middleware/oracle_common/common as suggested, but, this looks to still not fix the issue.

  • Shree says:

    This helped me a lot thank you so much for posting this simple solution

Leave a Reply