Server not initialized. Please make sure the repository is ready

User received the “Server not initialized. Please make sure the repository is ready” error when they tried to access bi publisher:
bip2

Below error can be found in the .out file:

<Feb 1, 2015 4:09:50 PM EST> <Error> <HTTP> <BEA-101020> <[ServletContext@998079790[app:bipublisher module:xmlpserver path:/xmlpserver spec-version:2.5 version:11.1.1]] Servlet failed with Exception
java.lang.RuntimeException: oracle.xdo.servlet.CreateException: Failed to retrieve a Config Provider. Make sure that your repository is correctly setup
at oracle.xdo.servlet.security.SecurityHandler.getHandler(SecurityHandler.java:194)
at oracle.xdo.servlet.ui.NLSUtils.getSSOLocale(NLSUtils.java:617)
at oracle.xdo.servlet.ui.NLSUtils.getCurrentLocale(NLSUtils.java:310)
at oracle.xdo.servlet.ui.UIUtils.renderError(UIUtils.java:1542)
at jsp_servlet.__login._jspService(__login.java:787)
Truncated. see log file for complete stacktrace
Caused By: oracle.xdo.servlet.CreateException: Failed to retrieve a Config Provider. Make sure that your repository is correctly setup
at oracle.xdo.servlet.ReportException.fillInStackTrace(ReportException.java:124)
at java.lang.Throwable.<init>(Throwable.java:196)
at java.lang.Exception.<init>(Exception.java:41)
at oracle.xdo.servlet.ReportException.<init>(ReportException.java:36)
at oracle.xdo.servlet.CreateException.<init>(CreateException.java:18)
Truncated. see log file for complete stacktrace

On the internet, there are some discussions/blogs about this issue. Aslo we can find some MOS notes(1602339.1, 1265839.1) about this issue. However, all of discussion/notes are for full OBIEE installation. We only installed BI Publisher, not full OBIEE suite, so these soultions they provided cannot be applied to our case.

Eventually we found the issue was caused by the metadata that was not synchronized

Here was what we did:
1. Shutdown BI publisher server on all nodes
2. move ../repository/meta/mbase.bin to ../repository/meta/mbase.bin.bkp
3. Start BI publisher server on all nodes

Posted in BIP, troubleshooting | 3 Comments

500 Internal Server Error When Granting Permission in BI Publisher

New Installation of BI publisher 11.1.1.7. Recently we integrated it with OAM, so the security model is changed from the default “Oracle Fusion Middleware” to “LDAP”. After we made such changes, we failed to grant the permission on catalog folder, and the server returned “500 Internal Server Error” even if we used BI Publisher Administrator role to login

cause
The permission information is stored in the repository/Admin/Security/security.xml. Whenever you grant permission, this file gets update. After changing the security model from default ‘Oracle Fusion Middleware’ to ‘LDAP’, this file has misleading properties.

Solution
1. stop BI publisher
2. make a backup copy of the security.xml file.
3. truncate this file and add the below lines:

<?xml version="1.0" encoding="UTF-8"?>
<security>
</security>

4. start the BI Publisher

Posted in BIP, troubleshooting | 2 Comments

Browser Shows a Blank Blue Screen When Creating or Modifying a Report

Developer reported he got a blank blue screen whenever he created or modified a report in BI Publisher. He has permission on the catalog folder / subfolder, and jdbc data resource. There was no issue for him to create or modify a data model. Other users who were granted the same roles didn’t find the similar issue. The logfile was clean, no error message there.

However, there is no issue for him to create/update a report when he switched to Google Chrome. Eventually the issue got resolved after I unchecked “Display intranet sites in Compatibility View” in his IE. Below is the steps:
IE -> Tools > Compatibility View Settings -> uncheck the “Display intranet sites in Compatibility View” option -> click close button -> restart IE

Posted in BIP, troubleshooting | Leave a comment

Got blank page when creating data model in Cluster BI publisher Environment

Developer reported they got blank page when creating data model in BI publisher 11.1.1.7. The bi publisher is clustered with shared repository. Checked the log file of BI Publisher managed server and found java.lang.ArrayIndexOutOfBoundException error:

####<Jan 5, 2015 6:41:52 AM EST> <Error> <HTTP> <bipserver2.orclfmw.wordpress.com> <bi_server2> <[ACTIVE] ExecuteThread: '12' for queue: 'weblogic.kernel.Defa
ult (self-tuning)'> <<WLS Kernel>> <> <0053_TquJNI1JfYFLrnJ8A0007N3000gsN> <1423143712196> <BEA-101017> <[ServletContext@1324405005[app:bipublisher modul
e:xmlpserver path:/xmlpserver spec-version:2.5 version:11.1.1]] Root cause of ServletException.
java.lang.ArrayIndexOutOfBoundsException
        at oracle.xdo.servlet.resources.mbase.impl.v1.IndexedPagerImpl.insertRecoredInPageBytes(IndexedPagerImpl.java:648)
        at oracle.xdo.servlet.resources.mbase.impl.v1.IndexedPagerImpl.writeRecordData(IndexedPagerImpl.java:568)
        at oracle.xdo.servlet.resources.mbase.impl.v1.IndexedPagerImpl.update(IndexedPagerImpl.java:256)
        at oracle.xdo.servlet.resources.mbase.impl.v1.MConnectionImpl.update(MConnectionImpl.java:82)
        at oracle.xdo.servlet.resources.MbaseUtil.upSertRecord(MbaseUtil.java:245)
        at oracle.xdo.servlet.resources.StructuredFileResourceProvider.upSertRecord(StructuredFileResourceProvider.java:2754)
        at oracle.xdo.servlet.resources.StructuredFileResourceProvider._writeResource(StructuredFileResourceProvider.java:2727)
        at oracle.xdo.servlet.resources.StructuredFileResourceProvider.writeResource(StructuredFileResourceProvider.java:2673)
        at oracle.xdo.servlet.resources.ScanningResourceProvider$WriteResourceLocale.exe(ScanningResourceProvider.java:165)
        at oracle.xdo.servlet.resources.ScanningResourceProvider.scan(ScanningResourceProvider.java:245)
        at oracle.xdo.servlet.resources.ScanningResourceProvider.writeResource(ScanningResourceProvider.java:738)
        at oracle.xdo.servlet.resources.catalog.ResourceUpdate$UpdateObject.execute(ResourceUpdate.java:3790)
        at oracle.xdo.servlet.resources.catalog.ResourceCatalogServiceImpl.update(ResourceCatalogServiceImpl.java:992)
        at oracle.xdo.servlet.resources.catalog.ResourceCatalogServiceImpl.update(ResourceCatalogServiceImpl.java:962)
        at oracle.xdo.servlet.resources.catalog.MostRecentCatalogServiceWrapper.update(MostRecentCatalogServiceWrapper.java:312)
        at oracle.xdo.servlet.resources.ResourceServlet.xdosave(ResourceServlet.java:3369)
        at oracle.xdo.servlet.resources.ResourceServlet.service(ResourceServlet.java:195)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
        at oracle.xdo.servlet.metadata.track.MostRecentFilter.doFilter(MostRecentFilter.java:64)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
        at oracle.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:127)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
        at oracle.xdo.servlet.init.InitCheckingFilter.doFilter(InitCheckingFilter.java:63)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
        at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
        at java.security.AccessController.doPrivileged(Native Method)
        at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
        at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
        at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
        at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
        at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
        at oracle.security.wls.filter.SSOSessionSynchronizationFilter.doFilter(SSOSessionSynchronizationFilter.java:292)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
        at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
        at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
        at java.security.AccessController.doPrivileged(Native Method)
        at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
        at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
        at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
        at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
        at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
        at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3748)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3714)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2283)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2182)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1491)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

Cause:
The metadata is not synchronized.

Solution:
synchronize metadata for BI publisher.
steps:
1. Shutdown BI publisher server on all nodes
2. move ../repository/meta/mbase.bin to ../repository/meta/mbase.bin.bkp
3. Start BI publisher server on all nodes

Posted in BIP, troubleshooting | 5 Comments

Install and configure Oracle Business Intelligence Publisher(BIP) 11g Cluster

To support high availability scenarios, it is highly recommended to configure a cluster of multiple Oracle Business Intelligence Publisher(BIP) servers to share the incoming load (for example, from a large number of simultaneous web service requests), and to provide continuous service in the event of failure of an individual server. This post covers some basic guidance about how to install and configure Oracle BIP 11g to support such a model using WebLogic.

Software:
Oracle JDK 1.6
Oracle Weblogic 10.3.6
Oracle Business Intelligence Publisher 11.1.1.7
Oracle Repository Creation Utility (RCU) 11.1.1.7
Oracle Database 11g

System architect:
ServerA: admin server & bi_server1
ServerB: bi_server2
ServerC: database server

all of them are Linux boxes.

Install and create database on serverC
Install Oracle database 11g binaries, then create a new Oracle database.
Test database connection before you process the next step.

install middletier binaries
1. install jdk on server A & B
2. install weblogic on server A & B
3. unzip RCU on server A
4. install Oracle Business Intelligence Publisher(BIP) software 11.1.1.7 on server A & B
When runInstaller prompts you for JDK location, enter JDK location you just installed at step 1. Follow the below screenshots to complete installation.

bip2

bip3
select skip software upgrades

bip4
select software only install

bip5
if any prerequisite checks fail, please fix it before continue.

bip6

bip7

bip8

Configure BIP

1. run ./rcuHome/bin/rcu from serverA.

select the following components associated with BIP deployment
a.Metadata Service
b.Business Intelligence Platform

bip9

If you get error when creating schemas, you can drop the schema using rcu. Fix the issue, and then rerun rcu.

2. configure BIP

a.run $MW_HOME/Oracle_BI1/bin/config.sh on ServerA
Follow the below screenshots to complete configuration
bip10

bip11
if any prerequisite checks fail, please fix it before continue.

bip12
select Create New BI System and provide required information.

bip13
Check and change the default installation location

bip14
select Business Intelligence Publisher only

bip15
Provide the information about biplatform schema, which you create in previous step using rcu.

bip16
Select Auto Port Configuration.

Review the configuration on the summary page, then create next to create and configure the new domain.

If you run into any issue during the configuration, check the back-end log file, fix the issue, and then comeback and select “BI Configuration”, and click retry.

bip_retry

 

b.run $MW_HOME/Oracle_BI1/bin/config.sh on ServerB
On the page “Create or Scale Out BI System”, choose Scale Out BI System.
Provide domain information which you created at above step.

bip17

bip18
The instance name must be different from previous one you created on serverA.

Additional Configuration Tasks
include:
Setting the Location of the Shared Oracle BI Publisher Configuration Folder
Setting Scheduler Configuration Options
Configuring Integration with Oracle BI Presentation Services
Setting the Oracle BI EE Data Source
Configuring JMS for Oracle BI Publisher
Updating the Oracle BI Publisher Scheduler Configuration

Some of these tasks need a shared location, which can be provided by Network File System(NFS) or Cluster File System(CFS), for example, OCFS from Oracle or GFS2 from Redhat. CFS is recommended.

Please refer to 6.5.3 Additional Configuration Tasks for Oracle BI Publisher for above settings

Besides above configurations, you also need to set the Location of the Shared Oracle BI Publisher catalog.

  • log in to BI Publisher with Administrator credentials and select the Administration tab.
  • Under System Maintenance, select Server Configuration.
  • In the Path field under catalog, enter the shared location for the catalog.
  • Apply your changes and restart your BI Publisher application

Further reading:

Configure BI Publisher to use Oracle Access Manager(OAM)

Posted in BIP, OBIEE | Leave a comment

Configure APEX Listener / Oracle REST Data Services (ORDS) 2.x to Serve Multiple APEX Instances

If you already followed the post to setup Apex Listener/Oracle REST Data Services (ORDS) 2.x to serve one APEX instance, and you want to use it for the second Apex instance, here is what you can follow.

prerequisite:
The versions of APEX must be same. You can run below command in database to check the version

select comp_name,version from dba_registry;
or
select * from apex_release;

1. Configure the second database for ORDS/Apex Listener
run below command:

java -jar apex.war(or ords.war) setup --database seconddb

Please change the seconddb to a meaningful name
This command will create connection file in $APEX_CONFIG_DIR/apex(or ords)/conf called seconddb.xml, which contains the connection information to the second database.
Basically the information you needs to provide is similar to what you have provided for first database when you run the command java -jar apex.war(or ords.war) setup

bash-3.2$ java -jar apex.war setup --database seconddb
oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
INFO: Using configuration folder: $MW_HOME/user_projects/applications/apex
Enter the name of the database server [localhost]:mydbserver
Enter the database listen port [1521]:
Enter 1 to specify the database service name, or 2 to specify the database SID [1]:
Enter the database service name:myservicename
Enter the database user name [APEX_PUBLIC_USER]:
Enter the database password for APEX_PUBLIC_USER:
Confirm password:
Enter 1 to enter passwords for the RESTful Services database users (APEX_LISTENER,APEX_REST_PUBLIC_USER), 2 to use the same password as used for APEX_PUBLIC_USER or, 3 to skip this step [1]:3
oracle.dbtools.common.config.file.ConfigurationFiles update
INFO: Updated configurations: apex, seconddb

You can get the ORDS/APEX Listener Config dirctory by running the command:
java -jar apex.war(or ords.war) configdir

2. Define the mapped URL for the second database

java -jar apex.war map-url --type base-path /second seconddb
oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
INFO: Using configuration folder: $MW_HOME/user_projects/applications/apex

Please change the “second” to a meaningful name

The information is created in the url-mapping.xml file located in the $APEX_CONFIG_DIR/apex(or ords) directory.

3. Copy configuration files to remote managed server
If managed server is on remote node, then you have to copy the configuration files(seconddb.xml and url-mapping.xml ) generated at above steps to the same directories on that node. If files are not copied, you will get the http 404 – Not Found error

Verify that the connections to both the original configuration and the new configuration run successfully:
http://servername:port/apex/
http://servername:port/apex/seconddb/

Note
For 2.0 – 2.0.1, always enter a trailing slash for mapped URLs referencing an APEX instance:
http://servername:port/apex/seconddb/
Instead of:
http://servername:port/apex/seconddb

Posted in APEX | 5 Comments

enable SSL debug in weblogic

1. Open the admin console for the Weblogic domain and “Lock and Edit” for changes.
2. Click on the server you will enable debug for.
3. Click on the “Debug” tab.
4. Expand the “weblogic” node.
5. Expand the “security” node.
6. check “DebugSecuritySSL” & “DebugSecuritySSLEaten”
7. click enable button

Posted in SSL, weblogic | Leave a comment

SSL issue caused by stronger signature algorithms

We have configured SSL with a certificate that is signed by Active Directory Certificate Services (AD CS). However, after we configured SSL on weblogic manager server, the SSL port was not up.

in managed server’s log, we got the below error:

<Apr 10, 2014 7:29:29 AM EDT> <Error> <WebLogicServer> <BEA-000297> 
<Inconsistent security configuration, java.lang.RuntimeException: Cannot convert identity certificate>
<Apr 10, 2014 7:29:29 AM EDT> <Emergency> <Security> <BEA-090034> 
<Not listening for SSL, java.io.IOException: Cannot convert identity certificate.>

If you start the manager server w/node manager, you may see the following error messages in nodemanager’s log

Apr 10, 2014 7:28:33 AM weblogic.nodemanager.server.Handler run
WARNING: Uncaught exception in server handlerjavax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack?
javax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack?
        at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190)
        at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1447)
        at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1415)
        at com.sun.net.ssl.internal.ssl.SSLEngineImpl.closeInbound(SSLEngineImpl.java:1354)
        at weblogic.security.SSL.jsseadapter.JaSSLEngine$7.run(JaSSLEngine.java:174)
        at weblogic.security.SSL.jsseadapter.JaSSLEngine.doAction(JaSSLEngine.java:732)
        at weblogic.security.SSL.jsseadapter.JaSSLEngine.closeInbound(JaSSLEngine.java:172)
        at weblogic.security.SSL.jsseadapter.JaSSLEngineRunner$Context.fillBufferNetIn(JaSSLEngineRunner.java:337)
        at weblogic.security.SSL.jsseadapter.JaSSLEngineRunner$Transition_NeedUnwrap.getNextState(JaSSLEngineRunner.java:822)
        at weblogic.security.SSL.jsseadapter.JaSSLEngineRunner.doTransitions(JaSSLEngineRunner.java:763)
        at weblogic.security.SSL.jsseadapter.JaSSLEngineRunner.unwrap(JaSSLEngineRunner.java:1122)
        at weblogic.security.SSL.jsseadapter.JaApplicationReadableByteChannel.read(JaApplicationReadableByteChannel.java:40)
        at weblogic.security.SSL.jsseadapter.JaChannelInputStream.read(JaChannelInputStream.java:71)
        at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
        at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
        at java.io.InputStreamReader.read(InputStreamReader.java:167)
        at java.io.BufferedReader.fill(BufferedReader.java:136)
        at java.io.BufferedReader.readLine(BufferedReader.java:299)
        at java.io.BufferedReader.readLine(BufferedReader.java:362)
        at weblogic.nodemanager.server.Handler.run(Handler.java:71)
        at java.lang.Thread.run(Thread.java:680)

root cause :
SHA256withRSA algorithm is used by AD CS, but with default configuration, WebLogic doesn’t support the certificates with stronger signature algorithms like SHA256withRSA.

soultion:
To support the stronger signature, you have to use JSSE. Below are the steps to configure it with weblogic console.
login weblogic console -> click servers -> select the managed server ->lock&edit -> configuration tab -> SSL subtab -> expand Advanced -> check “Use JSSE SSL” -> click save button -> click “Activate Changes” button -> restart the managed server

The issue should be gone now.

The similar issue can happened on node manager if you configured the SSL for node manager using a certificate w/the stronger signature .

In the log file, you could see:

java.lang.RuntimeException: Cannot convert identity certificate
        at com.certicom.tls.interfaceimpl.CertificateSupport.addAuthChain(Unknown Source)
        at com.certicom.net.ssl.SSLContext.addAuthChain(Unknown Source)
        at com.bea.sslplus.CerticomSSLContext.addIdentity(Unknown Source)
        at weblogic.security.utils.SSLContextWrapper.addIdentity(SSLContextWrapper.java:146)
        at weblogic.nodemanager.server.SSLListener.init(SSLListener.java:53)
        at weblogic.nodemanager.server.NMServer.start(NMServer.java:206)
        at weblogic.nodemanager.server.NMServer.main(NMServer.java:382)
        at weblogic.NodeManager.main(NodeManager.java:31)
+ set +x

the solution is to modify the file $WL_HOME/server/bin/startNodeManager.sh
to add the following line:

JAVA_OPTIONS="-Dweblogic.security.SSL.enableJSSE=true ${JAVA_OPTIONS}"

Also don’t forget to set “Use JSSE SSL” for Admin server after you import the certificate into the trust keystore on admin server. Otherwise Admin server may fail to communicate with node manager, and you will see “javax.net.ssl.SSLKeyException” error when you check Node Manager Status from weblogic console.

Posted in SSL | 3 Comments

Install and configure Oracle REST Data Services(APEX Listener) 2.x on WebLogic Server

Starting with 2.0.6 and above, Apex Listener is renamed to Oracle REST Data Services(ORDS), and the deployment file name is also changed from apex.war to ords.war to reflect this change.

For ORDS/Apex Listener 2.x, the Listener Configuration web page for database connection is gone. Now you have to use the command line to config database connection before you deploy ORDS/apex listener.

Below are the steps to install and configure ORDS/apex listener 2.x on Weblogic Server

download software:
1. ORDS/APEX listener 2.0.x
2. images from the right version of apex

1. create a apex directory to store configuration file and image files on both Admin server and manager server.

mkdir $MW_HOME/user_projects/application/apex
or
mkdir $MW_HOME/user_projects/application/ords (if you are using ORDS 2.0.6 +)

2. get images from the right version of apex. You can check the version of installed apex by following sql

select comp_name,version from dba_registry;
or
select * from apex_release;

If the version is not right, you may get blank web page when you access apex after installation.

3. copy the image files
Create a directory called images under the one you created at step 1, and copy the image files to this directory on both Admin server and manager server.
When you deploy ORDS on weblogic, the image files will not be copied from Admin server to managed server automatically, so you have to do this manually, otherwise you will get blank web page when you access apex after installation.

4. configure ORDS/apex listener configuration directory.

By default, the ORDS/apex listener configuration files is saved under /tmp/apex(or /tmp/ords for 2.0.6+). The command
java -jar apex.war configdir
or
java -jar ords.war configdir

will tell you that config.dir setting is not set, like below

Sep 22, 2014 12:13:03 PM oracle.dbtools.common.config.cmds.ConfigDir execute
INFO: The config.dir setting is not set

However, using /tmp/apex(or /tmp/ords) as configuration directory is not good idea. If someone clean the space for the /tmp, your configuration may be gone. Therefore it is better to set a dedicated configuation directory. The command used for this is:

java -jar apex.war configdir <MW_HOME>/user_projects/application

verify the configuration path has been set correctly.
java -jar apex.war configdir
or
java -jar ords.war configdir

5. configure the database connection.

java -jar apex.war setup
or
java -jar ords.war setup

oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
INFO: Using configuration folder: $MW_HOME/user_projects/applications/apex
Enter the name of the database server [localhost]:mydbserver.domain.com
Enter the database listen port [1521]:
Enter 1 to specify the database service name, or 2 to specify the database SID [1]:
Enter the database service name:mydb
Enter the database user name [APEX_PUBLIC_USER]:
Enter the database password for APEX_PUBLIC_USER:
Confirm password:
Enter 1 to enter passwords for the RESTful Services database users (APEX_LISTENER,APEX_REST_PUBLIC_USER), 2 to use the same password as used for APEX_PUBLIC_USER or, 3 to skip this step [1]:3
oracle.dbtools.common.config.file.ConfigurationFiles update
INFO: Updated configurations: defaults, apex
Enter 1 if you wish to start in standalone mode or 2 to exit [1]:2

This command creates a directory apex under the configdir you specified above and two configuration files under apex(or ords) directory:
1. defaults.xml, which contains the database connection information
2. conf/apex.xml, which contains the apex schema information.

6. Create the Web Archive to refer the Oracle Application Express image files

java -jar apex.war static $MW_HOME/user_projects/applications/apex/images
or
java -jar ords.war static $MW_HOME/user_projects/applications/apex/images

This command will generate a i.war under the current directory. The i.war file contains only references to the image files, and it doesn’t contain the images themselves.

7. deploy apex.war(or ords), and then i.war file to weblogic server.

Under security section, please choose:

Custom Roles: Use roles that are defined in the Administration Console; use policies that are defined in the deployment descriptor

Leave everything else as defaults.

8.Configure WebLogic to Handle HTTP Basic Challenges Correctly

Add the <enforce-valid-basic-auth-credentials> element to config.xml within the<security-configuration> element on Admin server . The edited file should look like the following:

...
<enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth-credentials>
</security-configuration>
...

Save the updated config.xml file & restart Weblogic server.

9. copy configration file from admin server to manager server.

a. copy $MW_HOME/user_projects/applications/apex(or ords)/conf/* to manager server. If you didn’t do this, you will get the message stating: “Apex listener has not been configured yet” when access apex.

b. copy $MW_HOME/user_projects/applications/apex(or ords)/defaults.xml to managed server. The one generated on manager server doesn’t include database user and password information, so if you didn’t do this, you will hit “503 – Service Unavailable” messages when trying to access APEX later on

10. Restarted Managed server and verify the State and Health of apex and i

Optional Step
If you want to use OHS as front end web server,especially if you want to integrate Apex with Oracle Access Manager(OAM), then you have to install and configure Oracle HTTP Server(OHS) and Weblogic OHS plugin.

In order for the connection between Oracle HTTP Server and Oracle WebLogic Server to work correctly you must also add the following to the mod_wl_ohs.conf file for the Oracle HTTP Server:

<IfModule weblogic_module>
#Using a single weblogic server specific to the one location
#The weblogic console is used as an example:
   <Location /console>
      SetHandler weblogic-handler
      WebLogicHost <weblogic server name>
      WebLogicPort <weblogic server port>
    </Location>
# Map the Apex Context root
   <Location /apex(or ords)>
      SetHandler weblogic-handler
      WebLogicHost <weblogic server name>
      WebLogicPort <weblogic server port>
   </Location>
# Map the images i.war
   <Location /i >
      SetHandler weblogic-handler
      WebLogicHost <weblogic server name>
      WebLogicPort <weblogic server port>
   </Location>
</IfModule>

You must now stop and then restart the Oracle HTTP Server for the changes to take
effect.

Note:
After you configured the apex, you can verify database connection using standalone mode w/o getting weblogic involved.

java -jar apex.war standalone

The first time you run the standalone command, you will be prompted for the APEX images directory and the standalone listener port. These values will be saved in the apex.properties file in you APEX Listener configuration directory structure.

If the apex.properties file exists in the APEX Listener Configuration Directory, the port values and images location defined in this file will be used.

To override the port or APEX images location value in the the apex.properties file for the configuration, use the –port or –apex-images parameters to override the desired value. For example, the following overrides the port value:

java -jar apex.war standalone –port 8090

further reading
To integrate APEX with Oracle Access Manager(OAM) 11gR2, please read this post
To configure APEX Listener/ORDS 2.0.x to serve multiple APEX instances, please read this post

reference:

http://docs.oracle.com/cd/E37099_01/doc/doc.20/e25066/toc.htm

Posted in APEX | Tagged | 5 Comments

High CPU load caused by JVM Memory settting

Users reported extremely slowness when accessing their application after this application was migrated to new virtual box. We checked the both middle tier and database . Database looks good, but the CPU load on the middle tier was too high and CPU utilization was closed to 100%.

All top CPU utilization processes were JVM processes on this box, so looks likely this performance issue was related with JVMs. Later on we were able to figure out that we forgot to set the JVM memory parameters when JVMs were created on new servers, thus the default JVM memory setting were used, that is, maximum heap size is 64MB while minimum heap size is 2MB. Given more than 100 concurrent users, this setting is too low, so most of CPU resource was used to create new objects and do Garbage Collection.

The performance is gone and CPU load is around 1.00 after we set both maximum heap and minimum heap size to 1GB.

Posted in performance | Leave a comment