Sunday, June 6, 2010
Nokia X3 and Fring
I got my new Nokia X3 and was trying to setup Fring. Fring gets your favourite messenger software in your mobile. It supports Skype, Yahoo, GTalk, Twitter, MSN Live, ICQ etc. Fring version which supports X3 is a Java/j2ME application and to make it access the network a preferred access point should be setup in the mobile. If this is not done the preferred access points list is empty and the application will throw a connection Error.
This is how to add a preferred access point. Goto Menu -> Settings >Configuration settings -'> Personal Configuration settings. Then select Options-> Add new ->Access Point. You can keep the default Account Name and Access point settings. That’s it and now you can start using Fring.
Check fring @ http://www.fring.com/default.php
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
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
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.
* jaxb-api.jar
* jboss-jaxrpc.jar
* jboss-jaxws.jar
* jboss-jaxws-ext.jar (applies to 2.0.2 +)
* jboss-saaj.jar
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
Thursday, February 4, 2010
62nd Independence Day of Sri Lanka

A day to think like a Sri Lankan and act like a Sri Lankan despite the race, religion and colour of you and me. This time we celebrate our independence with pride after defeating the LTTE on last year. LTTE was at that time an internationally organized terrorism outfit and Sri Lanka is the first and the only nation who was able to defeat such a strong separatist terrorist organization through a war.
Evidence from the history shows division among Sri Lankans have always brought bad consequences to the country. So let’s remember the lessons learned and play our role to build our motherland.
May our nation be blessed by the Noble Triple Gem.
Some links I found interesting.
Wilbawe, Kiulegedara Mohottala, Butawe Rate Rala from Uva Rebellion
The English episode in Ceylon
Keppetipola Disawe
http://14poems.com/
Friday, January 1, 2010
Installing ASIO4ALL in my laptop
Yesterday I was struggling a bit to install ASIO4ALL driver to my laptop Pavilion dv6 with Windows Vista Home premium installed.
Note on ASIO:
ASIO Is a sound card driver which is used for processing sound through PC software while removing the low-latency of standard drivers and improving reliability for professional sound processing. ASIO4All is a generic driver which can be used with soundcards which does not have the native ASIO driver.
Installing is very easy as all you have to do is run the setup file. After installing you have to select the ASIO driver from the audio settings panel of your software.
No sound after selecting ASIO4All
There are couple of things to check.

From the advance panel select only the relevant device and the interface and disable the others. In my case I have disabled the "High Definition Audio Device" and enabled the IDT High Definition Audio CODEC and MuxedIn1 and Speaker1 interfaces.
Note on ASIO:
ASIO Is a sound card driver which is used for processing sound through PC software while removing the low-latency of standard drivers and improving reliability for professional sound processing. ASIO4All is a generic driver which can be used with soundcards which does not have the native ASIO driver.
Installing is very easy as all you have to do is run the setup file. After installing you have to select the ASIO driver from the audio settings panel of your software.
No sound after selecting ASIO4All
There are couple of things to check.

From the advance panel select only the relevant device and the interface and disable the others. In my case I have disabled the "High Definition Audio Device" and enabled the IDT High Definition Audio CODEC and MuxedIn1 and Speaker1 interfaces.

Also the bit depth of the input and output interfaces should be set to 16bits. This can be done from Control Panel>Sound> and selecting Properties of the Interface and choosing the Advance tab.
Saturday, November 21, 2009
Comparing PHP Java and Ruby
Today I tried to do a small research to try and find out what language is best
when it comes to web development and tools that supports it. I tried to compare the three most used languages for web frameworks namely PHP, Java and Ruby.
All the details collected here are from my colleagues and not from a firm source. So if there is
any mistake please feel free to highlight.
The comparison was split between following items.
1/ Speed
2/ Debugging (and profiling)
3/ IDEs and Tools
3/ Testing (Unit, functional, performance)
4/ Logging and Log file maintenance
5/ Security
6/ Application integration (Integrate legacy systems and ERP systems).
Speed component depends on what you really do and the actual framework you
are using. But in general when the number of requests are low to medium PHP > Java > Ruby. When the number of requests are
high Java > Ruby > PHP is the case.
Tools that supports Debugging.
PHP - PHPEd, Expert Debugger
Java - Any IDE, JMeter, JProfiler
Ruby - ruby-debug,ruby-prof(Profiler)
List of popular IDEs for each language.
PHP - PHPEd, PHP Designer, Zend Studio Professional, PHP Expert Editor
Java - Eclips, JIdea, JBuilder
(Note: JIdea is best)
Ruby - Aptana RadRails http://www.radrails.org/, TextMate, Steel IDE (http://www.sapphiresteel.com/). NetBeans, JIdea Ruby plugin, CodeGear's 3rdRail
(Note: NetBeans free and the best so far)
Testing.
PHP - Testilence, izh_test,Phpunit, Spike PHPCoverage,SimpleTest.
Java - Junit, Cactus,Jemmy, jfcUnit, Abbot
Ruby - MiniTest, Test::Unit
The security features of Java is unmatched when compared with PHP or Ruby or any other language. Actually Java was born
with security. Starting from its Strong data typing, Automatic memory management, Bytecode verification, Secure class loading
Java exposed a new dimension to the world of security.
When it comes to logging and application integration also Java leads the other languages for its versatility, available tools and frameworks.
Now the issue is if Java is such strong what is the catch. Why people use PHP for most of the sites. One reason is the cost. You need a dedicated server to host a Java site most of the time. Next you need a skilled staff from development to network administration to handle a heavy wait Java application server.Because of the above reasons PHP would be a better option to run small to moderate sites.
Also check the following comment by
James Gosling the father of the Java programming language
Ruby can't scale as good as Java
when it comes to web development and tools that supports it. I tried to compare the three most used languages for web frameworks namely PHP, Java and Ruby.
All the details collected here are from my colleagues and not from a firm source. So if there is
any mistake please feel free to highlight.
The comparison was split between following items.
1/ Speed
2/ Debugging (and profiling)
3/ IDEs and Tools
3/ Testing (Unit, functional, performance)
4/ Logging and Log file maintenance
5/ Security
6/ Application integration (Integrate legacy systems and ERP systems).
Speed component depends on what you really do and the actual framework you
are using. But in general when the number of requests are low to medium PHP > Java > Ruby. When the number of requests are
high Java > Ruby > PHP is the case.
Tools that supports Debugging.
PHP - PHPEd, Expert Debugger
Java - Any IDE, JMeter, JProfiler
Ruby - ruby-debug,ruby-prof(Profiler)
List of popular IDEs for each language.
PHP - PHPEd, PHP Designer, Zend Studio Professional, PHP Expert Editor
Java - Eclips, JIdea, JBuilder
(Note: JIdea is best)
Ruby - Aptana RadRails http://www.radrails.org/, TextMate, Steel IDE (http://www.sapphiresteel.com/). NetBeans, JIdea Ruby plugin, CodeGear's 3rdRail
(Note: NetBeans free and the best so far)
Testing.
PHP - Testilence, izh_test,Phpunit, Spike PHPCoverage,SimpleTest.
Java - Junit, Cactus,Jemmy, jfcUnit, Abbot
Ruby - MiniTest, Test::Unit
The security features of Java is unmatched when compared with PHP or Ruby or any other language. Actually Java was born
with security. Starting from its Strong data typing, Automatic memory management, Bytecode verification, Secure class loading
Java exposed a new dimension to the world of security.
When it comes to logging and application integration also Java leads the other languages for its versatility, available tools and frameworks.
Now the issue is if Java is such strong what is the catch. Why people use PHP for most of the sites. One reason is the cost. You need a dedicated server to host a Java site most of the time. Next you need a skilled staff from development to network administration to handle a heavy wait Java application server.Because of the above reasons PHP would be a better option to run small to moderate sites.
Also check the following comment by
James Gosling the father of the Java programming language
Ruby can't scale as good as Java
Monday, November 16, 2009
Porting our existing J2EE ecommerce application to Liferay.
The main reason for porting the existing portal to Liferay was, to use the
CMS capabilities it provides. On the evaluation on what CMS to use
we found a hand full of Java Portal/CMS systems.
Although the framework of each of them were attractive they lacked good portlets or plugins which can be used out of the box. Liferay on
the other hand has many plugins available already. It has a Forum, Blog, RSS/Atom Module, A fine HTML templating module and a couple of simple frame works to write CRUD applications which were critical for our requirements.
The site we implemented had three full fledged ecommerce applications, landing sites for several affiliate products, promotion pages,
forums, blogs, newsletters, testimonials, press releases and articles. There was a magazine and advertising
campaign application that was meant to be used by the readers of the company magazine. This application
had a poll, a survey, a competition and couple of other options aimed for the campaign.
From the side of implementation we used an agile development approach and our development
team had 11 members. The time span for this project was only 2 months and the site had around 80 pages both
dynamic and static. Although this was a tough deadline we had to accept it as the management already scheduled advertising
campaigns that follows the delivery of the site.
Since the complexity of the user interface designs and for the flexibility we agreed not to use portlets for implementing
the ecommerce modules. The architecture was to use AJAX/JSON to integrate functionality and keep the pages
generating from the Liferay CMS.
Today we got a reward for completing the project on time with a lot of appreciation from our management. Being the
project manager Im so pleased and like to thank the whole team for their dedication and hard work. Cheers Guys.
Also now we are fully convinced that Liferay Portal is a better Java based CMS (or a WCM - Web content Management System) among the
Java CMS family.
If you like to have a look on the site visit this link
>>>Link Removed !<<<
CMS capabilities it provides. On the evaluation on what CMS to use
we found a hand full of Java Portal/CMS systems.
Although the framework of each of them were attractive they lacked good portlets or plugins which can be used out of the box. Liferay on
the other hand has many plugins available already. It has a Forum, Blog, RSS/Atom Module, A fine HTML templating module and a couple of simple frame works to write CRUD applications which were critical for our requirements.
The site we implemented had three full fledged ecommerce applications, landing sites for several affiliate products, promotion pages,
forums, blogs, newsletters, testimonials, press releases and articles. There was a magazine and advertising
campaign application that was meant to be used by the readers of the company magazine. This application
had a poll, a survey, a competition and couple of other options aimed for the campaign.
From the side of implementation we used an agile development approach and our development
team had 11 members. The time span for this project was only 2 months and the site had around 80 pages both
dynamic and static. Although this was a tough deadline we had to accept it as the management already scheduled advertising
campaigns that follows the delivery of the site.
Since the complexity of the user interface designs and for the flexibility we agreed not to use portlets for implementing
the ecommerce modules. The architecture was to use AJAX/JSON to integrate functionality and keep the pages
generating from the Liferay CMS.
Today we got a reward for completing the project on time with a lot of appreciation from our management. Being the
project manager Im so pleased and like to thank the whole team for their dedication and hard work. Cheers Guys.
Also now we are fully convinced that Liferay Portal is a better Java based CMS (or a WCM - Web content Management System) among the
Java CMS family.
If you like to have a look on the site visit this link
>>>Link Removed !<<<
Subscribe to:
Posts (Atom)


