Error in starting Fuse ESB

May 4, 2014

When starting Apache Servicemix ESB on windows XP as part of Fuse ESB we may get the following problem or error: Using an unsupported terminal: java.lang.NoClassDefFoundError: Could not initialize class org.fusesource.jansi.internal.Kernel32 In order to resolve this download and install the following software: Microsoft Visual C++ 2008 SP1 Redistributable Package (x86): Size: 4 MB

EJB 3 getting started

November 23, 2012

EJB3 Getting Started with JBoss 5:     Environment: JBoss – Atleast 5.1.0.GA. If it is less than 5.1, use JDK 1.5 only Java version  – Atleast 1.5 EJB – Atleast 3     Use the following reference JAR if at all you are using any IDE: ejb-api-3.0.jar     Steps to follow: Create remote [...]

Installing Java on Linux

March 15, 2012
Installing Java on Linux

Lets see how to install Java on Ubuntu. On all other Unix flavored systems, the procedure will be more or less same as we’re using terminal Unix commands to install JDK. Download JDK from here: Suppose say JDK is downloaded to ‘Downloads‘ folder Change directory to Downloads folder % cd ~/Downloads Change the execute [...]

NonUniqueResultException in Hibernate

March 6, 2012
NonUniqueResultException in Hibernate

Sometimes we will get the NonUniqueResultException when we tried to get the result-set by executing query using Hibernate. The following is the stack trace of the exception: query did not return a unique result: 2 org.hibernate.NonUniqueResultException: query did not return a unique result: 2 at org.hibernate.internal.AbstractQueryImpl.uniqueElement( at org.hibernate.internal.AbstractQueryImpl.uniqueResult( at org.bss.dao.SampleDAO.main( This happens because you’re expecting [...]

Deal with Stored Procedures using phpMyAdmin

March 2, 2012
Deal with Stored Procedures using phpMyAdmin

phpMyAdmin MySQL web interface doesn’t contain any editor to manipulate or create stored procedure like all other IDEs. But you can create/modify the Stored Procedure using the queries. Example query for creating Stored Procedure ‘SP_INS_MEMBER’ is: DELIMITER $$   DROP PROCEDURE IF EXISTS `DB_NAME`.`SP_INS_MEMBER`$$   CREATE DEFINER=`root`@`localhost` PROCEDURE `SP_INS_MEMBER`(IN subProcessId VARCHAR(100), IN storeId VARCHAR(100), IN [...]

Logging each & every request at JBoss Server level

January 7, 2012
Logging each & every request at JBoss Server level

  You can get this by uncommenting & replacing the following valve tag inside server.xml of JBOSS located at $JBOSS_HOME/default/deploy/jbossweb-tomcat50.sar/ (path depends on JBoss version) <Valve className="org.apache.catalina.valves.AccessLogValve" prefix="localhost_access_log." suffix=".log" pattern="(%h) %t: %r; Time taken to process the request, in millis – %D; Bytes sent, excluding HTTP headers, or ‘-’ if zero – %b;" directory="${jboss.server.home.dir}/log" resolveHosts="false" [...]

‘tree’ command: Directory structure in tree format

January 5, 2012
'tree' command: Directory structure in tree format

'tree' DOS command is pretty much useful to take the tree structure of any directory (including its sub-directories and files also) on windows in the form of text. For example: C:. | OtherFile.txt | ParentTextDocument.txt | +—SubFolder1 | SubTextDocument1.txt | \—SubFolder2 | SubTextDocument2.txt | \—ChildOfSubFolder2 ChildSubTextDocument2.txt Open command prompt in windows and go to the [...]

Enable log for queries on MySQL

December 23, 2011
Enable log for queries on MySQL

Generally we will get some situations where we need to see the each and every query hitting the MySQL server, especially while debugging. Viewing each & every query hitting any MySQl database is possible by enabling the logs in MySQL configuration. Go to the MySQL home directory where you installed MySQL. In my case it [...]

Parse the XML using DOM Parser in Java

December 8, 2011
Parse the XML using DOM Parser in Java

From Wikipedia, we can read like: The DOM interface is perhaps the easiest to understand. It parses an entire XML document and constructs a complete in-memory representation of the document using the classes modeling the concepts found in the Document Object Model(DOM) Level 2 Core Specification The following is the Java code to parse [...]

Fixing ‘Could not reserve enough space for object heap’ With Ant tool

December 6, 2011
Fixing 'Could not reserve enough space for object heap' With Ant tool

Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. This happens only because there is no enough space for ANT build tool to run the scripts. So first fix the heap space. On UNIX: set ANT_OPTS = -Xms16m -Xmx512m On WINDOWS: Add environment [...]

« Older Entries  

If you have a Tip, Comment, Article or anything you want to share, please send it to: