Wednesday, March 31, 2010

Oracle Enterprise Manager Console – Password Expired

Today I got the following message while trying to access the oracle enterprise console.
Failed to connect to database instance: ORA-28001: the password has expired (DBD ERROR: OCISessionBegin).
The log was draining the following errors.

[ApplicationServerThread-5] ERROR eml.OMSHandshake processFailure.806 - OMSHandshake failed.
java.sql.SQLException: ORA-28001: the password has expired
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278)
at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthenticate.java:792)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:365)
at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:519)

To fix the issue
================
* Stop enterprise manager -> emctl stop dbconsole
* login to sqlplus as sysdba -> sqlplus "/as sysdba"
* reset sysman password -> alter user sysman identified by <the new password> ;
* reset dbsnmp password -> alter user dbsnmp identified by <the new password> ;
* find the emoms.properties file -> find <ORACLE_HOME> -name emoms.properties
* select the emoms.properties file in ORACLE_HOME/HOST_SID/sysman/config
* Change sysman password in emos.properties -> oracle.sysman.eml.mntr.emdRepPwd=New Password
* Change encrypted to false in emos.properties -> oracle.sysman.eml.mntr.emdRepPwdEncrypted=FALSE
* Find the targets.xml file in ORACLE_HOME/HOST_SID/sysman/emd
* Change dbsnmp password in targets.xml and set encrypted to FALSE -> <Property NAME=”password” VALUE=”<New Password>” ENCRYPTED=”FALSE”/>
* Restart the enterprise console -> emsctl start dbconsole

Oracle 11g sets password expiry by default. This is the reason behind getting the password expiry messages.
To stop this happening in the future do the following.
* Login to sqlplus as sysdba -> sqlplus "/as sysdba"
* Execute ->ALTER PROFILE DEFAULT LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED PASSWORD_LIFE_TIME UNLIMITED;

Steps to reconfigure the DB Control in case of a host name change etc.
===============================================
set oracle_sid=YourInstanceName
emctl stop dbconsole
emca -deconfig dbcontrol db
emca -repos recreate
emca -config dbcontrol db
emca -reconfig ports -DBCONTROL_HTTP_PORT 80 (This port change is optional)

References - http://www.eggwater.co.uk/wordpress/?p=4

Thursday, March 4, 2010

Fixing JAXB LinkageError in JBoss with JDK 1.6

Struggled a bit to sort out the following issue which popped while trying to deploy a web service in Jboss booted with JDK 1.6

java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/liferay_portal/jboss-tomcat-4.2.3/server/default/tmp/deploy/tmp3673jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/) at com.sun.xml.bind.v2.model.impl.ModelBuilder.(ModelBuilder.java:172) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:422) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:286) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139) at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:105)

To fix this need to copy the following jars from ${JBOSS_HOME}/client to ${JBOSS_HOME}/lib/endorsed:

* jaxb-api.jar
* jboss-jaxrpc.jar
* jboss-jaxws.jar
* jboss-jaxws-ext.jar (applies to 2.0.2 +)
* jboss-saaj.jar

Also if the following error occur when invoking the service .

12:50:28,718 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
at javax.xml.soap.SOAPMessage.setProperty(SOAPMessage.java:441)
at org.jboss.ws.core.soap.SOAPMessageImpl.(SOAPMessageImpl.java:67)
...

Copy the above jars plus the following from ${JBOSS_HOME}/lib to ${JBOSS_HOME}/lib/endorsed:

*log4j-boot.jar
*jboss-common.jar
*concurrent.jar

Subscribe