Thursday, August 16, 2012

Tomcat version 6.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 Web modules”


    While Adding/Removing the projects in tomcat server from eclipse , I am getting issue as “ Tomcat version 6.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 Web modules”. We are unable to add the project in server.
Its occuring since mismatch of jst version.

  

Solution

In project, “.settings” folder, find this file “org.eclipse.wst.common.project.facet.core.xml“, change the version of facet="jst.web" to 2.4 or 2.5.
File : org.eclipse.wst.common.project.facet.core.xml



<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<installed facet="java" version="1.6"/>
<installed facet="jst.web" version="2.5"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>



"There are no resources that can be added or removed from the server eclipse tomcat"


      I have created the Appfuse project . Its running fine in maven jetty server. I would like to run this project in tomcat server. I have added the tomcat server in eclipse and I have tried by right clicking tomcat server and Add remove..., it says "There is no resources that can be added or removed from the server".

Solution:

      I think eclipse is not recognizing our project as a Dynamic Web Application.
I have followed the following steps for fixing this issue.

    Select Project ==> Properties ==> Project Facets and make sure Dynamic Web Module check box is checked


 

Monday, July 30, 2012

org.codehaus.mojo:buildnumber-maven-plugin:maven-plugin:1.0-beta-1-SNAPSHOT - ubuntu 11.10

      A required plugin was not found: Plugin could not be found - check that the goal name is correct: Unable to download the artifact from any repository

    org.codehaus.mojo:buildnumber-maven-plugin:maven-plugin:1.0-beta-1-SNAPSHOT

Problem:

       if ubuntu and Ant tool version is mismatch, we could not download the maven repository.

Solution:

          Use the following latest Ant dependency version and try.
       <dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.8.2</version>
<scope>compile</scope>
</dependency>

 

libglib2.0-0 : Breaks: gnome-control-center (< 1:3) but 1:2.32.1-0ubuntu15 is to be installed E: Broken packages

    I got the following error while installing mysql-server in ubuntu 11 version

   The following packages have unmet dependencies:  libglib2.0-0 : Breaks: gnome-control-center (< 1:3) but 1:2.32.1-0ubuntu15 is to be installed E: Broken packages

Solution:
    
         sudo apt-get install gnome-control-center

Wednesday, July 25, 2012

Tamil Font support in Google Chrome Browser in ubuntu.

Go to freefont directory
  cd /usr/share/fonts/truetype/freefont/

Remove the following fonts

  rm -rf FreeSans.ttf
  rm -rf FreeSerif.ttf

Monday, July 23, 2012

(13)Permission denied: make_sock: could not bind to address

   In apache, this type of error occurs at the time of starting the service after editing the httpd.conf file to listen to a particular port number. The reason is apache allows only specified http port numbers, and the one you have given is not available in http port list

   We can check the http port list whether our port is available or not using the command given below.

semanage port -l|grep http

If the port number is not in the list (ex: 4080), add by using,
semanage port -a -t http_port_t -p tcp 4080


Now restart apache.

Stored Procedure for reading data from CSV file

    The following are the sample Stored Procedure for reading the data from CSV file and insert into database table.

    DELIMITER //
DROP PROCEDURE IF EXISTS `CHECKSERIALNUMBER`;
DROP TABLE IF EXISTS `SERIAL_NUMBER_TEMP_TABLE`;
CREATE TABLE `SP_TEST`.`SERIAL_NUMBER_TEMP_TABLE`(`ID` INT(5) NOT NULL ,`SERIAL_NUMBER` VARCHAR(255));
LOAD DATA LOCAL INFILE '/home/eswar/file.csv' INTO TABLE `SP_TEST`.`SERIAL_NUMBER_TEMP_TABLE`
FIELDS TERMINATED BY ',' ENCLOSED BY '"'
LINES TERMINATED BY '\n' IGNORE 1 LINES;
CREATE PROCEDURE `CHECKSERIALNUMBER`()
BEGIN
DECLARE _COUNT INT;
DECLARE _I INT DEFAULT 1;
DECLARE _SNO VARCHAR(255);
DECLARE _SNOEXIST VARCHAR(255);
SELECT COUNT(*) INTO _COUNT FROM `SERIAL_NUMBER_TEMP_TABLE`;
WHILE _COUNT >= _I DO
SELECT `SERIAL_NUMBER` INTO _SNO FROM `SERIAL_NUMBER_TEMP_TABLE` WHERE ID=_I;
SELECT `SERIAL_NUMBER` INTO _SNOEXIST FROM `RT_TEST__TABLE` WHERE `SERIAL_NUMBER`=_SNO;
IF _SNOEXIST IS NULL THEN
SELECT _SNO,'Not Exist';
ELSE
SELECT _SNO,'Exist';
END IF;
SET _I=_I+1;
SET _SNOEXIST = null;
END WHILE;
END //
DELIMITER ;