Archive for the ‘WebLogic Server’ Category

Fixing component Load failed with IOException Error when Configuring OHS with OEM

Friday, December 30th, 2011
No Gravatar

I ran across this today. It took me a long time to find the right solution, so I thought I would post it here.

The error message I was getting was:

Failed to invoke operation load on MBean oracle.as.management.
mbeans.register:type=component,name=ohs1,instance=asinst_1,
Location=AdminServer
Load failed with IOException

The logs further showed the following:

OHS-2079 nzos handshake error, nzos_Handshake returned
28860(server obscured.server.com:9999, client 111.127.66.159)
OHS-2171 NZ Library Error: SSL fatal alert

The fix I found towards the end of a thread at https://forums.oracle.com/forums/thread.jspa?threadID=1054032:

ORACLE_HOME\opmn\bin\upgradenonj2eeapp.bat
-oracleInstance Instance_Home_Location
-adminHost WebLogic_Server_Host_Name
-adminPort administration_server_port_number
-adminUsername administration_server_user

Change it to .sh for Linux/Unix. I found I only had to run this on the first server in the farm rather than all of them as one might expect. Your mileage may vary.

WLS 10.3.x Silent Install Gotcha

Tuesday, December 27th, 2011
No Gravatar

I ran into an issue where I couldn’t figure out why I was getting the following error when running a WebLogic Server 10.3.2 upgrade in silent mode pert the documentation:

C:\temp\ten_two_domain1>java weblogic.Upgrade -mode silent
-type domain Calling Wizard framework for upgrade: args2:
[-mode=silent,-file=wcf/plugin_silent_wizard.xml,
-p:plugin:plugin.silent.response.file=weblog
ic-upgrade-domain-responses.xml,
-log=stdout,-p:plugin:plugin.executionPlan.file=weblogic/
upgrade/domain/execplan.xml,-p:plugin:I18N_PLUGI N=weblogic/
upgrade/i18n_upgrade,
-p:plugin:TARGET_VERSION=10.3.2.0] 2011-05-03 12:12:25,926
ERROR [inputAdapter_silent] com.bea.plateng.wizard.
WizardController - Uncaught Exception java.lang.
ArrayIndexOutOfBoundsException: 0 at weblogic.upgrade.domain.
directoryselection.SelectWebLogicVersionPlugIn.
validateInputAdapter(SelectWebLogicVersionPlugIn.java:50) at
com.bea.plateng.wizard.plugin.silent.tasks.
InputAdapterSilentTask.execute(InputAdapterSilentTask.java:178)
at com.bea.plateng.wizard.silent.tasks.AbstractSilentTask.
run(AbstractSilentTask.java:28) at java.lang.Thread.run(
Thread.java:619) A fatal error has occurred. This application
will terminate.

I thought I had followed the example from http://docs.oracle.com/cd/E15523_01/web.1111/e13754/xml_ref.htm#g1066162 perfectly:

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

<plugin-silent-responses>
</plugin-silent-responses>

<!-- SAMPLE BELOW -->
<!--
<plugin-silent-responses>
  <group name="DomainSelectionGroup">
    <plugin name="SelectWebLogicVersionPlugIn">
      <input-adapter name="ChoiceIA">
        <bind-property name="selectedChoiceIds">
          <value>__WEBLOGIC_VERSION__</value>
        </bind-property>
      </input-adapter>
    </plugin>
    <plugin name="DomainDirectorySelectionPlugIn">
      <input-adapter name="IA">
        <bind-property name="selectedFile">
          <value>__DOMAIN_DIR__</value>
        </bind-property>
      </input-adapter>
    </plugin>
  </group>
  <group name="PostDirSelectionGroup">
    <plugin name="AdminServerSelectionPlugIn">
      <input-adapter name="IA">
        <bind-property name="selectedChoiceIds">
          <value>__ADMIN_SERVER_NAME__</value>
        </bind-property>
      </input-adapter>
    </plugin>
    <plugin name="NodeManagerCredentialsPlugIn">
      <input-adapter name="UsernameIA">
        <bind-property name="value">
          <value>__NODE_MANAGER_USERNAME__</value>
        </bind-property>
      </input-adapter>
      <input-adapter name="PasswordIA">
        <bind-property name="value">
          <value>__NODE_MANAGER_PASSWORD__</value>
        </bind-property>
      </input-adapter>
      <input-adapter name="PasswordConfirmIA">
        <bind-property name="value">
          <value>__NODE_MANAGER_PASSWORD__</value>
        </bind-property>
      </input-adapter>
    </plugin>
    <plugin name="OptionalGroupsSelectionPlugIn">
      <input-adapter name="IA">
        <bind-property name="selectedChoiceIds">
          <value>__OPTIONAL_ACTION_1__</value>
          <value> . . . </value>
        </bind-property>
      </input-adapter>
    </plugin>
  </group>
  <group name="PostDirSelectionPost81Group">
    <plugin name="AdminServerSelectionPlugIn">
      <input-adapter name="IA">
        <bind-property name="selectedChoiceIds">
          <value>__ADMIN_SERVER_NAME__</value>
        </bind-property>
      </input-adapter>
    </plugin>
    <plugin name="OptionalGroupsSelectionPlugIn">
      <input-adapter name="IA">
        <bind-property name="selectedChoiceIds">
          <value>__OPTIONAL_ACTION_1__</value>
          <value> . . . </value>
        </bind-property>
      </input-adapter>
    </plugin>
  </group>
  <group name="DomainBackupGroup">
    <plugin name="DomainDirectoryBackupPlugIn">
      <input-adapter name="FileSelectionIA">
        <bind-property name="selectedFileNames">
          <value>__BACKUP_DIR__</value>
        </bind-property>
      </input-adapter>
      <input-adapter name="TextIA">
        <bind-property name="value">
          <value>___BACKUP_FILE_NAME__</value>
        </bind-property>
      </input-adapter>
    </plugin>
  </group>
</plugin-silent-responses>

-->

But, as it turns out, where I wanted to be literal on the  SelectWebLogicVersionPlugIn value with 10.2, the correct format is to be a bit broader, with:

    <plugin name="SelectWebLogicVersionPlugIn">
      <input-adapter name="ChoiceIA">
        <bind-property name="selectedChoiceIds">
          <value>9.0 or higher</value>
        </bind-property>
      </input-adapter>
    </plugin>

Note the value 9.0 or higher

I hope this saves some folks the time I spent figuring it out :)

Excellent WLS LDAP Tuning Post

Tuesday, August 16th, 2011
No Gravatar

http://fusionsecurity.blogspot.com/2011/08/tuning-weblogic-ldap-authentication.html

Running Two WLS Domains with Pointbase

Thursday, May 5th, 2011
No Gravatar

I hope this guy’s blog lasts forever so I don’t have to manually write the steps to run two WLS domains using Pointbase on the same machine: http://www.jroller.com/gmazza/entry/reconfiguring_pointbase_databases_on_weblogic.

You would think that you could plan ahead and simply change the values for DBMS and Port on the Configure JDBC Data Sources screen, but the “wizard” still spits out config files using the default 9093 port for Pointbase.

My alternative approach is to search for .cmd, .properties, and .xml files containing “9093″ and change it to “9094″ for the second domain. Not as step-by-stepish, but easy to remember :)

Creating SAML Token Tip for Non-WLS Admins

Thursday, April 28th, 2011
No Gravatar

The documentation for setting up SAML for WLP WSRP is very straight-forward except for one small item that us non-admins may not think of: Once you have your command window open, you need to run the setDomainEnv script in that window before calling the keytool. Otherwise, you get a nice response from the commands, but the domain is not configured to use the results!

Remember: Examples are Just Examples

Monday, January 24th, 2011
No Gravatar

For example, the documentation at Using the WebLogic Server JMX Timer Service gives a very straight-forward and standards-compliant example of how to run a task at intervals.  I used this example almost in its entirety to create a module to poll a database for a specific change every 2o minutes. I then noticed that the timer would stop for no apparent reason at no obvious interval.

After many hours of digging through logs looking for some cause, I was ready to give in and post a plea for help on a mailing list. It just so happened used a text editor to grab the code to post, and noticed in the text editor that there was one place where unregister would be called on the bean: under contextDestroyed in the servlet to at registered the timer.  In the clarity of hind-sight I realized that the timer was stopping more often in environments that were accessed less often because the efficient WebLogic Server was garbage collecting the unused servlet handle, resulting in contextDestroyed being invoked, thus killing my timer. As it normally should, except in the case where the timer should continue running as long as the server was running.

Lesson learned: Think it all the way through between copy and past.

For those who like links and confessions:  There is an example of using a timer in my JavaBoutique article that contains precisely the same flaw in logic.

Do Not Use Commas For Multi-Source JNDI

Wednesday, December 22nd, 2010
No Gravatar

Here’s a bit of fun with WebLogic JDBC configurations.  I ran into this issue after reading that p13nDataSource and  cgDataSource-NonXA should not be configured as multi-source. There were  some issues changing them to use the basic JDBC connection string and  when rolling back to the bad configuration the server went “Boom”.  Since one purpose behind this blog is to share lessons learned, I just had to post this.

If you write your descriptors manually (as opposed to generating them using the WLS console) and put a comma-separated list of JNDI addresses like this:

<jdbc-data-source-params>
  <jndi-name>weblogic.jdbc.jts.commercePool,
	contentDataSource,
	contentVersioningDataSource,
	portalFrameworkPool</jndi-name>
  <algorithm-type>Load-Balancing</algorithm-type>
  <data-source-list>portalDataSource-rac0,
	portalDataSource-rac1</data-source-list>
  <failover-request-if-busy>false</failover-request-if-busy>
</jdbc-data-source-params>

so long as the first address resolves, it will still work. Sort of.  If you call this connection to do an update, only one node of the RAC instance is updated. Other wonderful side-effects include the server refusing to start sometimes.

The proper way to list the JNDI sources is one per node, like this:

<jdbc-data-source-params>
	<jndi-name>weblogic.jdbc.jts.commercePool</jndi-name>
	<jndi-name>contentDataSource</jndi-name>
	<jndi-name>contentVersioningDataSource</jndi-name>
	<jndi-name>portalFrameworkPool</jndi-name>
	<algorithm-type>Load-Balancing</algorithm-type>
	<data-source-list>portalDataSource-rac0,
			portalDataSource-rac1,
			portalDataSource-rac2
	</data-source-list>
	<failover-request-if-busy>false</failover-request-if-busy>
</jdbc-data-source-params>

(Props to Sandeep Seshan for locating the root cause)

com/compoze/collab/log/LogEntryPrototype Error

Friday, September 10th, 2010
No Gravatar

While attempting to deploy an application built by someone new to WLP recently, I was getting a bit frustrated with a recurring error about “java.lang.NoClassDefFoundError: com/businessobjects/log/Logger” in the dev environment and deployment errors about com/compoze/collab/log/LogEntryPrototype in the integration environment.

Long story short (actually did it this time!), the issue was that the developer edited weblogic.xml by hand using an older WLP application as a guide and included the following:

wlp-collab-portlets-web-lib
10.3.2
10.3.2
false

Which is only available in a GroupWare-enabled environment. Once I removed that, everything was fine again.

Good Post on WLS 10.3 Start Up

Wednesday, August 18th, 2010
No Gravatar

I ran across a thread on LinkedIn that pointed me to an excellent article on IT on Guard dealing with a slow WLS start up issue.

JDBC BEA-001129

Tuesday, June 8th, 2010
No Gravatar

If you don’t have a LinkedIn membership, this discussion should be enough reason to sign up (for the record, I did not provide the responses to this question):

Q:

I have a problem in production environment with WebLogic 9.2 mp3.We are using Multi datasource with Oracle 9i RAC two nodes. Database team have maintaince so they took out one node out of RAC. when one of the WebLogic instance associated with connection pool to that RAC node shown the following Warning message and could not start the instance.The multi datasource is configured with algorithm-type as “Load-Balancing”

<Jun 3, 2010 3:12:23 AM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<Jun 3, 2010 3:14:10 AM EDT> <Warning> <JDBC> <BEA-001129> <Received exception while creating connection for pool “DS2″: Io exception: The Network Adapter could not establish the connection>

What are the recommandations to avoid this kind of problems when one of the RAC nodes down and the WebLogic server should have High Availability and scalable?

Any configuration parameters need to set for this??

A:

The way 9.2 mp3 works with RAC is that the multidatasource represents a pool of datasources so if one datasource is not available it will mark that down and use the other datasources configured in the multidatasource. WLS controls the failover, not RAC and this version does not use FAN or FCF.

I assume you have test on reserve set in the connection of all the data sources as that is required to use multdatasource. This parameter is at datasource->connection pool-> advanced

“could not start the instance” means that WLS did not come up??

If you are bringing up a WLS instance without the DB up you may want to set initial connections to 0