geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r559937 [1/2] - in /geronimo/sandbox/j2g/plugins: org.apache.geronimo.j2g.common/src/org/apache/geronimo/j2g/common/ org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/app/ org.apache.geronimo.j2g.descriptors/src/or...
Date Thu, 26 Jul 2007 18:51:39 GMT
Author: sppatel
Date: Thu Jul 26 11:51:34 2007
New Revision: 559937

URL: http://svn.apache.org/viewvc?view=rev&rev=559937
Log:
GERONIMO 3347

Modified:
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/src/org/apache/geronimo/j2g/common/ConsoleOutput.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/src/org/apache/geronimo/j2g/common/IOutput.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/src/org/apache/geronimo/j2g/common/XMLMigrationTool.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/app/ApplicationDescriptorTool.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/comp/CMPDescriptorTool.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/comp/CMPEntityBeanMigrator.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/EJBDescriptorTool.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/annotation/AnnotationConverter.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/annotation/AnnotationTool.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/bean/BeanMigrator.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/bean/EntityBeanMigrator.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/bean/SessionBeanMigrator.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/web/WebDescriptorTool.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/src/org/apache/geronimo/j2g/jasper/JspCompiler.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/datasource/DSResourcesTool.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/jms/JMSResourcesTool.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/mail/MailResourcesTool.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/security/SecurityResourcesTool.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/test-apps/security/security-geronimo-plan.xml
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/JavaParser.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/SourceIdentificationTool.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/dependence/APIReplaceVisitor.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/dependence/DependenceJavaMigration.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/dependence/NodesVisitor.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/environment/AbsoluteNameSolver.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/environment/BlockVisitor.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/environment/EjbEnvJavaMigration.java
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/environment/MethodsVisitor.java

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/src/org/apache/geronimo/j2g/common/ConsoleOutput.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/src/org/apache/geronimo/j2g/common/ConsoleOutput.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/src/org/apache/geronimo/j2g/common/ConsoleOutput.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/src/org/apache/geronimo/j2g/common/ConsoleOutput.java Thu Jul 26 11:51:34 2007
@@ -17,72 +17,74 @@
 package org.apache.geronimo.j2g.common;
 
 /**
- * Outputs different kinds of messages to the standart output stream. 
+ * Outputs different kinds of messages to the standard output stream. 
  */
 public class ConsoleOutput implements IOutput
 {
 	/**   
-	 * Prints info message to the standart output stream. 
+	 * Prints info message to the standard output stream. 
 	 * @param message info message to output.
 	 * @param row row in a converting file concerned to message.
 	 * @param col column in a converting file concerned to message.
 	 */
-	public void info(String message, int row, int col)
+	public void info(String caller, String message, int row, int col)
 	{
-		System.out.println("INFO: " + message + " At row:" + row + ", col:" + col);
+		System.out.println(caller + "[INFO] " + message + " At row:" + row + ", col:" + col);
 	}
 
 	/**
-	 * Prints warning message to the standart output stream. 
+	 * Prints warning message to the standard output stream. 
 	 * @param message warning message to output.
 	 * @param row row in a converting file concerned to message.
 	 * @param col column in a converting file concerned to message.
 	 */
-	public void warn(String message, int row, int col)
+	public void warn(String caller, String message, int row, int col)
 	{
-		System.out.println("WARNING: " + message + " At row:" + row + ", col:" + col);
+		System.out.println(caller + "[*WARNING*] " + message + " At row:" + row + ", col:" + col);
 	}
 
 	/**
-	 * Prints error message to the standart output stream. 
+	 * Prints error message to the standard output stream. 
 	 * @param message error message to output.
 	 * @param row row in a converting file concerned to message.
 	 * @param col column in a converting file concerned to message.
 	 */
-	public void error(String message, int row, int col)
+	public void error(String caller, String message, int row, int col)
 	{
-		System.out.println("ERROR: " + message + " At row:" + row + ", col:" + col);
+		System.out.println(caller + "[!ERROR]! " + message + " At row:" + row + ", col:" + col);
 	}
 
 	/**
-	 * Prints error message to the standart output stream. 
+	 * Prints error message to the standard output stream. 
 	 * @param message error message to output.
 	 */
-	public void error(String message) {
-		System.out.println("ERROR: " + message);
+	public void error(String caller, String message) {
+		System.out.println(caller + "[!ERROR!] " + message);
 	}
 
 	/**
-	 * Prints fatal message to the standart output stream. 
+	 * Prints fatal message to the standard output stream. 
 	 * @param message error message to output.
 	 */
-	public void fatal(String message) {
-		System.out.println("FATAL: " + message);
+	public void fatal(String caller, String message) {
+		System.out.println("**********************************************************");
+		System.out.println(caller + "[FATAL] " + message);
+		System.out.println("**********************************************************");
 	}
 	
 	/**
-	 * Prints warning message to the standart output stream. 
+	 * Prints warning message to the standard output stream. 
 	 * @param message error message to output.
 	 */
-	public void warn(String message) {
-		System.out.println("WARNING: " + message);
+	public void warn(String caller, String message) {
+		System.out.println(caller + "[*WARNING*] " + message);
 	}
 	
 	/**
-	 * Prints infomation message to the standart output stream. 
+	 * Prints information message to the standard output stream. 
 	 * @param message error message to output.
 	 */
-	public void info(String message) {
-		System.out.println("INFO: " + message);
+	public void info(String caller, String message) {
+		System.out.println(caller + "[INFO] " + message);
 	}
 }

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/src/org/apache/geronimo/j2g/common/IOutput.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/src/org/apache/geronimo/j2g/common/IOutput.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/src/org/apache/geronimo/j2g/common/IOutput.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/src/org/apache/geronimo/j2g/common/IOutput.java Thu Jul 26 11:51:34 2007
@@ -28,7 +28,7 @@
 	 * @param row row in a converting file concerned for message.
 	 * @param col column in a converting file concerned for message.
 	 */
-	public void info(String message, int row, int col);
+	public void info(String caller, String message, int row, int col);
 	
 	/**
 	 * Takes to the output a warning message.
@@ -36,7 +36,7 @@
 	 * @param row row in a converting file concerned for message.
 	 * @param col column in a converting file concerned for message.
 	 */
-	public void warn(String message, int row, int col);
+	public void warn(String caller, String message, int row, int col);
 	
 	/**
 	 * Takes to the output an error message.
@@ -44,29 +44,29 @@
 	 * @param row row in a converting file concerned for message.
 	 * @param col column in a converting file concerned for message.
 	 */
-	public void error(String message, int row, int col);
+	public void error(String caller, String message, int row, int col);
 	
 	/**
 	 * Takes to the output an error message. 
 	 * @param message info message to output.
 	 */
-	public void error(String message);
+	public void error(String caller, String message);
 	
 	/**
 	 * Takes to the output an fatal message. 
 	 * @param message info message to output.
 	 */
-	public void fatal(String message);
+	public void fatal(String caller, String message);
 	
 	/**
 	 * Takes to the output an warn message. 
 	 * @param message info message to output.
 	 */
-	public void warn(String message);
+	public void warn(String caller, String message);
 	
 	/**
 	 * Takes to the output an info message. 
 	 * @param message info message to output.
 	 */
-	public void info(String message);
+	public void info(String caller, String message);
 }

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/src/org/apache/geronimo/j2g/common/XMLMigrationTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/src/org/apache/geronimo/j2g/common/XMLMigrationTool.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/src/org/apache/geronimo/j2g/common/XMLMigrationTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/src/org/apache/geronimo/j2g/common/XMLMigrationTool.java Thu Jul 26 11:51:34 2007
@@ -55,7 +55,7 @@
 
         IFileMigration[] plugs = loadPlugins();
         if (plugs.length == 0) {
-            getOutput().warn("No plugins were found - skipping migration");
+            getOutput().warn(XMLMigrationTool.class.getSimpleName(), "No plugins were found - skipping migration");
             return new Integer(0);
         }
 
@@ -77,13 +77,13 @@
                     files.add(file);
                     rollbackManager.restore(file);
                 } else {
-                    getOutput().error(
+                    getOutput().error(XMLMigrationTool.class.getSimpleName(), 
                     "Given file or directory (" + args[i]
                     + ") does not exist, skipping!");
                 }
             }
         } catch (FatalToolException ex) {
-            getOutput().fatal(ex.getMessage());
+            getOutput().fatal(XMLMigrationTool.class.getSimpleName(), ex.getMessage());
             return new Integer(1);
         }
         Set<File> filesToMigrate = new HashSet<File>();
@@ -138,7 +138,7 @@
      * Print tool usage text.
      */
     protected void usage() {
-        getOutput().fatal("Usage: " + getToolName() + " file_or_dir_name ...");
+        getOutput().fatal(XMLMigrationTool.class.getSimpleName(), "Usage: " + getToolName() + " file_or_dir_name ...");
     }
 
     /**

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/app/ApplicationDescriptorTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/app/ApplicationDescriptorTool.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/app/ApplicationDescriptorTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/app/ApplicationDescriptorTool.java Thu Jul 26 11:51:34 2007
@@ -63,7 +63,7 @@
                     + jbossFileName);
 
             if (jbossFileName.equals(Constants.JBOSS_JBOSS_APPLICATION_XML_FILE)) {
-                out.info("Converting Jboss-app.xml file in " + directoryName);
+                out.info(ApplicationDescriptorTool.class.getSimpleName(), "Converting Jboss-app.xml file in " + directoryName);
                 try {
                     // check whether the jbosscmp-jdbc.xml file is present and
                     // if so load it and process it.
@@ -76,19 +76,19 @@
                     XMLConversionHelper.saveGeronimoDocument(geronimoOpenEjbJarFileName,
                             geronimoDocument);
                     migrated = true;
-                    out.info("Successfully migrated the Jboss-app.xml file in "
+                    out.info(ApplicationDescriptorTool.class.getSimpleName(), "Successfully migrated the Jboss-app.xml file in "
                             + directoryName + ", with the error and warning messages as shown");
                 } catch (DocumentException e) {
-                	out.error("Errors occurs while reading xml descriptor "
+                	out.error(ApplicationDescriptorTool.class.getSimpleName(), "Error occured while reading xml descriptor "
                                 + file.getAbsolutePath()
-                                + ". It is possible that the migrator cannot download an xml schema or xml file has a wrong syntax. Nested exception:" 
+                                + ". It is possible that the migrator cannot download the xml schema or that the xml file has incorrect wrong syntax. Nested exception:" 
                                 + e.getMessage());
                 } catch (IOException e) {
-                    out.error("IO exception " + e.getMessage());
+                    out.error(ApplicationDescriptorTool.class.getSimpleName(), "IO exception " + e.getMessage());
                 }
             } else if (jbossFileName.equals(Constants.APPLICATION_XML_FILE)){
-                out.info("Converting application.xml file in " + directoryName);
-                out.info("Nothing to convert. Keep the file as it is");
+                out.info(ApplicationDescriptorTool.class.getSimpleName(), "Converting application.xml file in " + directoryName);
+                out.info(ApplicationDescriptorTool.class.getSimpleName(), "Nothing to convert. No changes required for this file");
             }
         return migrated;
     }
@@ -109,11 +109,11 @@
                 securityElementProcessor.migrateSecurityRole(jbossRootChildElement,
                         geronimoRoleMapping);
             } else {
-                out.warn("The Element '" + jbossRootChildElement.getName() + "' does not support ",
+                out.warn(ApplicationDescriptorTool.class.getSimpleName(), "The Element '" + jbossRootChildElement.getName() + "' is not supported ",
                         XMLConversionHelper.getLineNumber(jbossRootChildElement),
                         XMLConversionHelper.getColumnNumber(jbossRootChildElement));
                 logger.debug("The Element '" + jbossRootChildElement.getName()
-                        + "' does not support ");
+                        + "' is not supported ");
             }
         }
     }
@@ -139,12 +139,12 @@
                 Element altDDElement = geronimoModule.addElement(qname);
                 altDDElement.setText(firstPart + ".xml");
             } else {
-                out.warn("The Element '" + jbossModuleChildElement.getName()
-                        + "' does not support ", XMLConversionHelper
+                out.warn(ApplicationDescriptorTool.class.getSimpleName(), "The Element '" + jbossModuleChildElement.getName()
+                        + "' is not supported ", XMLConversionHelper
                         .getLineNumber(jbossModuleChildElement), XMLConversionHelper
                         .getColumnNumber(jbossModuleChildElement));
                 logger.debug("The Element '" + jbossModuleChildElement.getName()
-                        + "' does not support ");
+                        + "' is not supported ");
             }
         }
     }

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/comp/CMPDescriptorTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/comp/CMPDescriptorTool.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/comp/CMPDescriptorTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/comp/CMPDescriptorTool.java Thu Jul 26 11:51:34 2007
@@ -75,7 +75,7 @@
                 + jbossFileName);
 
         if (jbossFileName.equals(Constants.JBOSS_JBOSS_CMP_JDBC_XML_FILE)) {
-            out.info("Converting file " + file.getAbsolutePath() + ".");
+            out.info(CMPDescriptorTool.class.getSimpleName(), "Converting file " + file.getAbsolutePath() + ".");
             try {
                 // check whether the jbosscmp-jdbc.xml file is present and
                 // if so load it and process it.
@@ -83,7 +83,7 @@
                 + Constants.GERONIMO_OPEN_EJB_XML_FILE;
                 File tempFile = new File(geronimoOpenEjbJarFileName);
                 if (tempFile.exists()) {
-                	System.out.println("Deleting the pre-existing openejb-jar.xml file");
+                	out.warn(CMPDescriptorTool.class.getSimpleName(), "Deleting the pre-existing openejb-jar.xml file");
                 	tempFile.delete();
                 }
                 Document jbossDocument = XMLConversionHelper.getDocument(file);
@@ -92,15 +92,15 @@
                 XMLConversionHelper.saveOpenEJBDocument(geronimoOpenEjbJarFileName,
                         geronimoDocument);
                 migrated = true;
-                out.info("Successfully migrated the Jbosscmp-jdbc.xml file in "
+                out.info(CMPDescriptorTool.class.getSimpleName(), "Successfully migrated the Jbosscmp-jdbc.xml file in "
                         + directoryName + ", with the error and warning messages as shown");
             } catch (DocumentException e) {
-            	out.error("Errors occurs while reading xml descriptor "
+            	out.error(CMPDescriptorTool.class.getSimpleName(), "Error occured while reading xml descriptor "
 						+ file.getAbsolutePath()
 						+ ". It is possible that the migrator cannot download the xml schema or the xml file has incorrect syntax. Nested exception:"
 						+ e.getMessage());
             } catch (IOException e) {
-                out.error("IO exception " + e.getMessage());
+                out.error(CMPDescriptorTool.class.getSimpleName(), "IO exception " + e.getMessage());
             }
         }
         return migrated;
@@ -128,7 +128,7 @@
                 Element geronimoReleationship = geronimoRootElement.addElement(qname);
                 migrateRelationships(jbossRootChildElement, geronimoReleationship);
             } else {
-                out.warn("The Element '" + jbossRootChildElement.getName() + "' is not supported ",
+                out.warn(CMPDescriptorTool.class.getSimpleName(), "The Element '" + jbossRootChildElement.getName() + "' is not supported ",
                         XMLConversionHelper.getLineNumber(jbossRootChildElement),
                         XMLConversionHelper.getColumnNumber(jbossRootChildElement));
                 logger.debug("The Element '" + jbossRootChildElement.getName()
@@ -157,7 +157,7 @@
                 }
             }
         } catch (DocumentException e) {
-            out.error("No ejb-jar.xml file exists can not migrate ralationships");
+            out.error(CMPDescriptorTool.class.getSimpleName(), "No ejb-jar.xml file exists. We can not migrate relationships");
         }
     }
 
@@ -182,7 +182,7 @@
             } else if (jbossEJBRelationChildElement.getName().equals("ejb-relationship-role")) {
                 Element keyFields = jbossEJBRelationChildElement.element("key-fields");
                 if ((keyFields == null) || (keyFields.elements().isEmpty())) {
-                    logger.debug("Key field is empty no neet to convert this element");
+                    logger.debug("Key field is empty. No need to convert this element");
                     // we store this element to process later if other ejb-relationship-role
                     // does not have a cmr field.
                     noKeyFieldsRelationshipRole = jbossEJBRelationChildElement;
@@ -254,7 +254,7 @@
             Element cmrFieldName = cmrFieldElement.addElement(qname);
             cmrFieldName.setText(ejbNoKeyRelationshipRole.getCmrFieldName());
         } else {
-            out.error("No cmr field given to relation ship " + ejbRelation.getEjbRelationName());
+            out.error(CMPDescriptorTool.class.getSimpleName(), "No cmr field given to relationship " + ejbRelation.getEjbRelationName());
         }
 
         // put foreign-key-column-on-source
@@ -435,7 +435,7 @@
                 geronimoResourceLink.setText(artifactID);
                 logger.debug("resource-link added to geronimo");
             } else {
-                out.warn("The Element '" + jbossDefaultsChildElement.getName()
+                out.warn(CMPDescriptorTool.class.getSimpleName(), "The Element '" + jbossDefaultsChildElement.getName()
                         + "' is not supported", XMLConversionHelper
                         .getLineNumber(jbossDefaultsChildElement), XMLConversionHelper
                         .getColumnNumber(jbossDefaultsChildElement));

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/comp/CMPEntityBeanMigrator.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/comp/CMPEntityBeanMigrator.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/comp/CMPEntityBeanMigrator.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/comp/CMPEntityBeanMigrator.java Thu Jul 26 11:51:34 2007
@@ -81,11 +81,11 @@
                 Element geronimoCMPFieldMapping = geronimoEntity.addElement(qname);
                 migrateCMPFieldMapping(jbossEntityChildElement, geronimoCMPFieldMapping);
             } else {
-                out.warn("The Element '" + jbossEntityChildElement.getName() + "' is not suported",
+                out.warn(CMPEntityBeanMigrator.class.getSimpleName(), "The Element '" + jbossEntityChildElement.getName() + "' is not supported",
                         XMLConversionHelper.getLineNumber(jbossEntityChildElement),
                         XMLConversionHelper.getColumnNumber(jbossEntityChildElement));
                 logger.debug("The Element '" + jbossEntityChildElement.getName()
-                        + "' is not suported");
+                        + "' is not supported");
             }
 
         }
@@ -109,11 +109,11 @@
                 geronimoTableColumn.setText(jbossCMPFieldChild.getText());
                 columnName = jbossCMPFieldChild.getText().trim();
             } else {
-               out.warn("The Element '" + jbossCMPFieldChild.getName() + "' is not suported",
+               out.warn(CMPEntityBeanMigrator.class.getSimpleName(), "The Element '" + jbossCMPFieldChild.getName() + "' is not supported",
                         XMLConversionHelper.getLineNumber(jbossCMPFieldChild),
                         XMLConversionHelper.getColumnNumber(jbossCMPFieldChild));
                logger.debug("The Element '" + jbossCMPFieldChild.getName()
-                        + "' is not suported");
+                        + "' is not supported");
             }
         }
 

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/EJBDescriptorTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/EJBDescriptorTool.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/EJBDescriptorTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/EJBDescriptorTool.java Thu Jul 26 11:51:34 2007
@@ -100,7 +100,7 @@
                     + jbossFileName);
 
             if (jbossFileName.equals(Constants.JBOSS_JBOSS_XML_FILE)) {
-                out.info("Converting Jboss.xml file in " + directoryName);
+                out.info(EJBDescriptorTool.class.getSimpleName(), "Converting Jboss.xml file in " + directoryName);
                 try {
                     // check whether the jbosscmp-jdbc.xml file is present and
                     // if so load it and process it.
@@ -113,21 +113,21 @@
                     XMLConversionHelper.saveOpenEJBDocument(geronimoOpenEjbJarFileName,
                             geronimoDocument);
                     migrated = true;
-                    out.info("Successfully migrated the Jboss.xml file in "
+                    out.info(EJBDescriptorTool.class.getSimpleName(), "Successfully migrated the Jboss.xml file in "
                             + directoryName + ", with the error and warning messages as shown");
                 } catch (DocumentException e) {
-                	out.error("Errors occurs while reading xml descriptor "
+                	out.error(EJBDescriptorTool.class.getSimpleName(), "Error occured while reading xml descriptor "
     						+ file.getAbsolutePath()
-    						+ ". It is possible that the migrator cannot download an xml schema or xml file has a wrong syntax. Nested exception:"
+    						+ ". It is possible that the migrator cannot download the xml schema or the xml file has incorrect syntax. Nested exception:"
     						+ e.getMessage());
                 } catch (IOException e) {
-                    out.error("IO exception " + e.getMessage());
+                    out.error(EJBDescriptorTool.class.getSimpleName(), "IO exception " + e.getMessage());
                 }
             } else if (jbossFileName.equals(Constants.EJB_JAR_XML_FILE)){
-                out.info("Converting ejb-jar.xml file in " + directoryName);
-                out.info("Nothing to convert. Keep the file as it is");
+                out.info(EJBDescriptorTool.class.getSimpleName(), "Converting ejb-jar.xml file in " + directoryName);
+                out.info(EJBDescriptorTool.class.getSimpleName(), "Nothing to convert. No changes required for this file");
             }  else if (jbossFileName.equals(Constants.PERSISTENCE_XML_FILE)) {
-	                out.info("Converting persistence.xml file in " + directoryName);
+	                out.info(EJBDescriptorTool.class.getSimpleName(), "Converting the persistence.xml file in " + directoryName);
                 try {
                     // get the dom4j representation from the persistence.xml files
                     Document persistenceDoc = XMLConversionHelper.getPersistenceDocument(directoryName);
@@ -141,15 +141,15 @@
                     // save the file
                     XMLConversionHelper.saveGeronimoDocument(geronimoPersistenceFileName, persistenceDoc);
                     migrated = true;
-                    out.info("Successfully migrated the persistence.xml file in "
+                    out.info(EJBDescriptorTool.class.getSimpleName(), "Successfully migrated the persistence.xml file in "
                                 + directoryName + ", with the error and warning messages as shown");
                 } catch(DocumentException e) {
-                    out.error("Errors occurs while reading xml descriptor "
+                    out.error(EJBDescriptorTool.class.getSimpleName(), "Error occured while reading xml descriptor "
                         + file.getAbsolutePath()
-                        + ". It is possible that the migrator cannot download an xml schema or xml file has a wrong syntax. Nested exception:"
+                        + ". It is possible that the migrator cannot download the xml schema or the xml file has incorrect syntax. Nested exception:"
                         + e.getMessage());
                 } catch(IOException e) {
-                    out.error("IO exception " + e.getMessage());
+                    out.error(EJBDescriptorTool.class.getSimpleName(), "IO exception " + e.getMessage());
                 }
             }
         return migrated;
@@ -175,7 +175,7 @@
                     replacementValue = diffs.get(nameValue);
                     if(replacementValue.startsWith("suggestion:")) {
                         // warn the user that there is a possible solution, but requires further configuration
-                        out.warn("persistence.xml SUGGESTION: " + nameValue + " should probably be replaced by " + replacementValue +
+                        out.warn(EJBDescriptorTool.class.getSimpleName(), "persistence.xml SUGGESTION: " + nameValue + " should probably be replaced by " + replacementValue +
                                     " but further configuration may be needed.");
                     } else {
                         // replace the property.name element with the analogous
@@ -183,10 +183,10 @@
                         // update the tree
                         rootChildElement.addAttribute("name", replacementValue);
                         // tell them
-                        out.info("persistence.xml: " + nameValue + " was replaced by " + replacementValue);
+                        out.info(EJBDescriptorTool.class.getSimpleName(), "persistence.xml: " + nameValue + " was replaced by " + replacementValue);
                     }
                 } else {
-                    out.warn("You should manually convert this property name: " + nameValue);
+                    out.warn(EJBDescriptorTool.class.getSimpleName(), "You should manually convert this property name: " + nameValue);
                     continue;
                 }
             } else {
@@ -199,7 +199,7 @@
         if(hasJTA && !hasNonJTA) {
             QName nonJTA = new QName("non-jta-data-source", rootElement.getNamespace());
             Element nonJTAElement = rootElement.addElement(nonJTA);
-            out.warn("You should set the text of <non-jta-data-source> to point to a non-JTA datasource.");
+            out.warn(EJBDescriptorTool.class.getSimpleName(), "You should set the text of <non-jta-data-source> to point to a non-JTA datasource.");
         }
     }
 	    
@@ -219,7 +219,7 @@
                 diffs.put(key, value);
             }
         } catch(Exception e) {
-            out.error("Cannot find properties file: " + PROP_PERSISTENCE_FILENAME);
+            out.error(EJBDescriptorTool.class.getSimpleName(), "Cannot find properties file: " + PROP_PERSISTENCE_FILENAME);
         }
         return diffs;
     }
@@ -245,7 +245,7 @@
             } else if (jbossRootChildElement.getName().equals("assembly-descriptor")) {
                 migrateAssemblyDescriptor(jbossRootChildElement, geronimoRootElement);
             } else {
-                out.warn("The Element '" + jbossRootChildElement.getName() + "' is not supported",
+                out.warn(EJBDescriptorTool.class.getSimpleName(), "The Element '" + jbossRootChildElement.getName() + "' is not supported",
                         XMLConversionHelper.getLineNumber(jbossRootChildElement),
                         XMLConversionHelper.getColumnNumber(jbossRootChildElement));
                 logger.debug("The Element '" + jbossRootChildElement.getName()
@@ -266,7 +266,7 @@
                 securityElementProcessor.migrateSecurityRole(jbossAssemblyDescriptorChildElement,
                         geronimoRoleMapping);
             } else {
-                out.warn("The Element '" + jbossAssemblyDescriptorChildElement.getName()
+                out.warn(EJBDescriptorTool.class.getSimpleName(), "The Element '" + jbossAssemblyDescriptorChildElement.getName()
                         + "' is not supported", XMLConversionHelper
                         .getLineNumber(jbossAssemblyDescriptorChildElement), XMLConversionHelper
                         .getColumnNumber(jbossAssemblyDescriptorChildElement));
@@ -309,7 +309,7 @@
                                 .getNamespace());
                 entityBeanMigrator.migrateBean(jbossEnterpriseBeanChildElement, geronimoEntity);
             } else {
-                out.warn("The Element '" + jbossEnterpriseBeanChildElement.getName()
+                out.warn(EJBDescriptorTool.class.getSimpleName(), "The Element '" + jbossEnterpriseBeanChildElement.getName()
                         + "' is not supported", XMLConversionHelper
                         .getLineNumber(jbossEnterpriseBeanChildElement), XMLConversionHelper
                         .getColumnNumber(jbossEnterpriseBeanChildElement));

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/annotation/AnnotationConverter.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/annotation/AnnotationConverter.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/annotation/AnnotationConverter.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/annotation/AnnotationConverter.java Thu Jul 26 11:51:34 2007
@@ -78,7 +78,7 @@
     public ArrayList<String> getAnnotations(String fileStr) {
         // warn the user if there exists JBoss-specific annotations
         if(fileStr.contains("org.jboss.annotation.ejb.")) {
-            out.warn("This file is using JBoss's extension to EJB annotations. Convert them accordingly, as " +
+            out.warn(AnnotationConverter.class.getSimpleName(), "This file is using JBoss's extension to EJB annotations. Convert them accordingly, as " +
                      "Geronimo does not support them.");
         }
         // list of annotations found from fileStr
@@ -133,7 +133,7 @@
         // because jboss creates these references automatically, but geronimo does not
         for(int i = 0; i < ambiguousAnnotations.length; i++) {
             if(fileStr.contains(ambiguousAnnotations[i])) {
-                out.warn(ambiguousAnnotations[i] + " annotations may not be fully specified in "
+                out.warn(AnnotationConverter.class.getSimpleName(), ambiguousAnnotations[i] + " annotations may not be fully specified in "
                                     + "the deployable. To fix this, you can create what these " 
                                     + "are supposed to reference and set a dependency on it.");
             }
@@ -143,9 +143,9 @@
         for(int i = 0; i < needsConfigurationAnnotations.length; i++) {
             if(fileStr.contains(needsConfigurationAnnotations[i])) {
                 if(needsConfigurationAnnotations[i].equals("@Resource")) {
-                    out.warn("IMPORTANT: You need to update web.xml to include a <resource-ref> if you are referring to a managed connection factory or <message-destination-ref> if you are referring to a message destination (e.g. queue).");
+                    out.warn(AnnotationConverter.class.getSimpleName(), "IMPORTANT: You need to update web.xml to include a <resource-ref> if you are referring to a managed connection factory or <message-destination-ref> if you are referring to a message destination (e.g. queue).");
                 } else {
-                    out.warn("IMPORTANT: You need to update web.xml to include a <ejb-local-ref> if you wish to use this EJB in a web app." );
+                    out.warn(AnnotationConverter.class.getSimpleName(), "IMPORTANT: You need to update web.xml to include a <ejb-local-ref> if you wish to use this EJB in a web app." );
                 }
             }
         }

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/annotation/AnnotationTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/annotation/AnnotationTool.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/annotation/AnnotationTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/annotation/AnnotationTool.java Thu Jul 26 11:51:34 2007
@@ -72,7 +72,7 @@
         }
         try {
             if (source.getCanonicalPath().endsWith(XMLMigrationTool.JAVA_SUFFIX)) {
-                out.info("Processing annotations for " + source.getCanonicalPath());
+                out.info(AnnotationTool.class.getSimpleName(), "Processing annotations for " + source.getCanonicalPath());
                 // get the contents of the file
                 String fileStr = getFileContents(source);
                 // retrieve all annotations
@@ -83,8 +83,8 @@
                 for (int i = 0; i < jbossAnnotations.size(); i++) {
                     String geronimoAnnotation = converter.j2gAnnotation(jbossAnnotations.get(i));
                     if(!jbossAnnotations.get(i).equals(geronimoAnnotation) ) {
-                        out.info("JBoss annotation: " + jbossAnnotations.get(i));
-                        out.info("Geronimo annotation: " + geronimoAnnotation);
+                        out.info(AnnotationTool.class.getSimpleName(), "JBoss annotation: " + jbossAnnotations.get(i));
+                        out.info(AnnotationTool.class.getSimpleName(), "Geronimo annotation: " + geronimoAnnotation);
                         // swap in the geronimo stuff.
                         fileStr = fileStr.replace(jbossAnnotations.get(i), geronimoAnnotation);
                     }
@@ -100,7 +100,7 @@
                 XMLConversionHelper.saveGeronimoDocument(
                 jbossXMLDirectory.getAbsolutePath() + File.separator + Constants.GERONIMO_OPEN_EJB_XML_FILE,
                 openEJBDoc);
-                out.info("openejb-jar.xml successfully updated.");
+                out.info(AnnotationTool.class.getSimpleName(), "openejb-jar.xml successfully updated.");
             }
         } catch (Exception e) {
             e.printStackTrace();
@@ -188,14 +188,14 @@
         if(name != null) {
             ejbElement.setText(name);
         } else {
-            out.warn("Unable to determine ejb-name value: supply your own.");
+            out.warn(AnnotationTool.class.getSimpleName(), "Unable to determine ejb-name value: supply your own.");
         }
         Element resourceAdapterElement = mdbElement.addElement(resourceAdapterQName);
         Element resourceLinkElement = resourceAdapterElement.addElement(resourceLinkQName);
         if(link != null) {
             resourceLinkElement.setText(link);
         } else {
-            out.warn("You need to supply your own reference to a resource-link.");
+            out.warn(AnnotationTool.class.getSimpleName(), "You need to supply your own reference to a resource-link.");
         }
     }
     
@@ -236,13 +236,13 @@
             output = new BufferedWriter(new FileWriter(source));
             output.write(fileStr);
         } catch (IOException e) {
-            out.error("Cannot write to file");
+            out.error(AnnotationTool.class.getSimpleName(), "Cannot write to file");
         } finally {
             try {
             if (output != null)
                 output.close();
             } catch (IOException e) {
-                out.error("Cannot close file");
+                out.error(AnnotationTool.class.getSimpleName(), "Cannot close file");
             }
         }
     }
@@ -259,15 +259,15 @@
                 fileStrBuffer.append(System.getProperty("line.separator"));
             }
         } catch (FileNotFoundException e) {
-            out.error("Cannot find file");
+            out.error(AnnotationTool.class.getSimpleName(), "Cannot find file");
         } catch (IOException e) {
-            out.error("Cannot read file");
+            out.error(AnnotationTool.class.getSimpleName(), "Cannot read file");
         } finally {
             try {
             if (in != null)
                 in.close();
             } catch (IOException e) {
-                out.error("Cannot close file");
+                out.error(AnnotationTool.class.getSimpleName(), "Cannot close file");
             }
         }
         return fileStrBuffer.toString();

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/bean/BeanMigrator.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/bean/BeanMigrator.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/bean/BeanMigrator.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/bean/BeanMigrator.java Thu Jul 26 11:51:34 2007
@@ -109,7 +109,7 @@
                 geronimoEJBLink.setText(element.getText());
 
             } else {
-                out.error(
+                out.error(BeanMigrator.class.getSimpleName(), 
                         "The Element 'ejb-ref' is not supported. It is not possible to determine the EJB name "
                                 + "from the jndi name. Please migrate this element manually",
                         XMLConversionHelper.getLineNumber(jbossBeanElment), XMLConversionHelper
@@ -148,7 +148,7 @@
                 geronimoEJBLink.setText(element.getText());
 
             } else {
-                out.error(
+                out.error(BeanMigrator.class.getSimpleName(), 
                         "The Element 'ejb-local-ref' is not supported. It is not possible to determine the EJB name "
                                 + "from the jndi name. Please migrate this element manually",
                         XMLConversionHelper.getLineNumber(jbossBeanElment), XMLConversionHelper

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/bean/EntityBeanMigrator.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/bean/EntityBeanMigrator.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/bean/EntityBeanMigrator.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/bean/EntityBeanMigrator.java Thu Jul 26 11:51:34 2007
@@ -52,7 +52,7 @@
             // do the migration only if super classes can not
             if (!super.migrateBean(jbossEntityChildElement, geronimoEntity)) {
                 // TODO: entity bean secific migrations
-                out.warn("The Element '" + jbossEntityChildElement.getName()
+                out.warn(EntityBeanMigrator.class.getSimpleName(), "The Element '" + jbossEntityChildElement.getName()
                         + "' is not supported");
             }
         }

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/bean/SessionBeanMigrator.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/bean/SessionBeanMigrator.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/bean/SessionBeanMigrator.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/ejb/bean/SessionBeanMigrator.java Thu Jul 26 11:51:34 2007
@@ -51,7 +51,7 @@
             // do the migration only if super classes can not
             if (!super.migrateBean(jbossSessionChildElement, geronimoSession)) {
                 // TODO: session bean secific migrations
-                out.warn("The Element '" + jbossSessionChildElement.getName()
+                out.warn(SessionBeanMigrator.class.getSimpleName(), "The Element '" + jbossSessionChildElement.getName()
                         + "' is not supported");
             }
         }

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/web/WebDescriptorTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/web/WebDescriptorTool.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/web/WebDescriptorTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/src/org/apache/geronimo/j2g/descriptors/web/WebDescriptorTool.java Thu Jul 26 11:51:34 2007
@@ -69,7 +69,7 @@
             logger.debug("Directory Name ==> " + directoryName + " jboss file Name ==> "
                     + jbossFileName);
             if (jbossFileName.equals(Constants.JBOSS_WEB_XML_FILE)) {
-                out.info("Converting Jboss-web.xml file in " + directoryName);
+                out.info(WebDescriptorTool.class.getSimpleName(), "Converting Jboss-web.xml file in " + directoryName);
                 try {
                     Document jbossDocument = XMLConversionHelper.getDocument(file);
                     Document geronimoDocument = XMLConversionHelper.createNewGeronimoDocument(
@@ -79,19 +79,19 @@
                             + Constants.GERONIMO_WEB_XML_FILE;
                     XMLConversionHelper.saveGeronimoDocument(geronimoWebFileName, geronimoDocument);
                     migrated = true;
-                    out.info("Successfully migrated the jboss-web.xml file in "
+                    out.info(WebDescriptorTool.class.getSimpleName(), "Successfully migrated the jboss-web.xml file in "
                             + directoryName + ", with the error and warning messages as shown");
                 } catch (DocumentException e) {
-                	out.error("Errors occurs while reading xml descriptor "
+                	out.error(WebDescriptorTool.class.getSimpleName(), "Error occured while reading xml descriptor "
     						+ file.getAbsolutePath()
-    						+ ". It is possible that the migrator cannot download an xml schema or xml file has a wrong syntax. Nested exception:"
+    						+ ". It is possible that the migrator cannot download the xml schema or the xml file has incorrectsyntax. Nested exception:"
     						+ e.getMessage());
                 } catch (IOException e) {
-                    out.error("IO exception " + e.getMessage());
+                    out.error(WebDescriptorTool.class.getSimpleName(), "IO exception " + e.getMessage());
                 }
             } else if (jbossFileName.equals(Constants.WEB_XML_FILE)){
-                out.info("Converting web.xml file in " + directoryName);
-                out.info("Nothing to convert. Keep the file as it is");
+                out.info(WebDescriptorTool.class.getSimpleName(), "Converting web.xml file in " + directoryName);
+                out.info(WebDescriptorTool.class.getSimpleName(), "Nothing to convert. No changes are required for this file");
             }
         return migrated;
     }
@@ -123,7 +123,7 @@
                 namingElementProcessor.migrateResourceRef(jbossRootChildElement,
                         geronimoResourceRef);
             } else if (jbossRootChildElement.getName().equals("ejb-ref")) {
-                out.error(
+                out.error(WebDescriptorTool.class.getSimpleName(), 
                         "The Element 'ejb-ref' is not supported. It is not possible to determine the EJB name "
                                 + "from the jndi name. Please migrate this element manually",
                         XMLConversionHelper.getLineNumber(jbossRootChildElement),
@@ -132,7 +132,7 @@
                         .debug("The Element 'ejb-ref' is not supported. It is not possible to determine the EJB name "
                                 + "from the jndi name. Please migrate this element manually");
             } else if (jbossRootChildElement.getName().equals("ejb-local-ref")) {
-                out.error(
+                out.error(WebDescriptorTool.class.getSimpleName(), 
                         "The Element 'ejb-local-ref' is not supported. It is not possible to determine the EJB name "
                                 + "from the jndi name. Please migrate this element manually",
                         XMLConversionHelper.getLineNumber(jbossRootChildElement),
@@ -141,7 +141,7 @@
                         .debug("The Element 'ejb-local-ref' is not supported. It is not possible to determine the EJB name "
                                 + "from the jndi name. Please migrate this element manually");
             } else {
-                out.warn(
+                out.warn(WebDescriptorTool.class.getSimpleName(), 
                         "The Element '" + jbossRootChildElement.getName() + "' is not supported. ",
                         XMLConversionHelper.getLineNumber(jbossRootChildElement),
                         XMLConversionHelper.getColumnNumber(jbossRootChildElement));

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/src/org/apache/geronimo/j2g/jasper/JspCompiler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/src/org/apache/geronimo/j2g/jasper/JspCompiler.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/src/org/apache/geronimo/j2g/jasper/JspCompiler.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/src/org/apache/geronimo/j2g/jasper/JspCompiler.java Thu Jul 26 11:51:34 2007
@@ -69,7 +69,7 @@
 			jspCompiler.setCompile(false);
 			jspCompiler.execute();
 		} catch (JasperException ex) {
-			Tool.getCurrent().getOutput().fatal("Jasper error: " + ex.getMessage());
+			Tool.getCurrent().getOutput().fatal(JspCompiler.class.getSimpleName(), "Jasper error: " + ex.getMessage());
 			throw new FatalToolException("Cannot compile jsp sources: " + webSource.getAbsolutePath(), ex);
 		}
 	}
@@ -95,7 +95,7 @@
 			}
 		}
 		else {
-			throw new FatalToolException("Wrong parameter: " + file.getAbsolutePath() + "; Only web directories allowed.");
+			throw new FatalToolException("Incorrect parameter: " + file.getAbsolutePath() + "; Please provide Web directories only.");
 		}
 	}
 }

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/datasource/DSResourcesTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/datasource/DSResourcesTool.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/datasource/DSResourcesTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/datasource/DSResourcesTool.java Thu Jul 26 11:51:34 2007
@@ -61,7 +61,7 @@
             if (jbossDSFileName.endsWith(Constants.JBOSS_VALID_DS_XML_FILE)) {
                 // Checking wether file is a valid *-ds.xml file
                 String driverType = jbossDSFileName.substring(0, jbossDSFileName.lastIndexOf("-"));
-                out.info("Converting Jboss datasource xml file in " + directoryName);
+                out.info(DSResourcesTool.class.getSimpleName(), "Converting Jboss datasource xml file in " + directoryName);
                 try {
                     Document jbossDocument = XMLConversionHelper.getJbossDocument(sourceFile);
                     Document geronimoDocument = migrationFromJboss2Geronimo(jbossDocument
@@ -73,14 +73,14 @@
                     // This was done in upper level of the tool
                     XMLConversionHelper.saveGeronimoDocument(geronimoDSFileName, geronimoDocument);
                     migrated = true;
-                    out.info("The Datasource Resource File Migration Complete !!!\n");
+                    out.info(DSResourcesTool.class.getSimpleName(), "The Datasource Resource File Migration Complete!!!\n");
                 } catch (DocumentException e) {
-                    out.error("Errors occurs while reading xml descriptor "
+                    out.error(DSResourcesTool.class.getSimpleName(), "Error occured while reading xml descriptor "
     								+ sourceFile.getAbsolutePath()
-    								+ ". It is possible that the migrator cannot download an xml schema or xml file has a wrong syntax. Nested exception:"
+    								+ ". It is possible that the migrator cannot download the xml schema or the xml file has incorrect syntax. Nested exception:"
     								+ e.getMessage());
                 } catch (IOException e) {
-                    out.error("IO exception " + e.getMessage());
+                    out.error(DSResourcesTool.class.getSimpleName(), "IO exception " + e.getMessage());
                 }
             }
         return migrated;
@@ -181,8 +181,8 @@
         outbound_resourceadapterElement.add(connector_definitionElement);
         Document document = DocumentHelper.createDocument();
         document.add(conenctorElement);
-        out.warn("The JAR holding the " + driver_class.getStringValue()
-                + " JDBC Driver should be installed " + "under <GERONIMO_HOME>/repository/");
+        out.warn(DSResourcesTool.class.getSimpleName(), "The JAR holding the " + driver_class.getStringValue()
+                + " JDBC Driver should be installed under <GERONIMO_HOME>/repository/");
         return document;
     }
 

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/jms/JMSResourcesTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/jms/JMSResourcesTool.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/jms/JMSResourcesTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/jms/JMSResourcesTool.java Thu Jul 26 11:51:34 2007
@@ -77,9 +77,9 @@
                         jbossJMSConnectioFactoryDocument = XMLConversionHelper
                                 .getJbossDocument(jbossJMSDestinationServicesFile);
                         } catch (DocumentException e){
-                        	out.error("Errors occurs while reading xml descriptor "
+                        	out.error(JMSResourcesTool.class.getSimpleName(), "Error occured while reading xml descriptor "
             						+ jbossJMSDestinationServicesFile.getAbsolutePath()
-            						+ ". It is possible that the migrator cannot download an xml schema or xml file has a wrong syntax. Nested exception:"
+            						+ ". It is possible that the migrator cannot download the xml schema or the xml file has incorrect syntax. Nested exception:"
             						+ e.getMessage());
                         	throw e;
                         }
@@ -88,9 +88,9 @@
                         	jbossJMSDestinationServicesDocument = XMLConversionHelper
                                 .getJbossDocument(sourceFile);
                         } catch(DocumentException e){
-                        	out.error("Errors occurs while reading xml descriptor "
+                        	out.error(JMSResourcesTool.class.getSimpleName(), "Error occured while reading xml descriptor "
             						+ sourceFile.getAbsolutePath()
-            						+ ". It is possible that the migrator cannot download an xml schema or xml file has a wrong syntax. Nested exception:"
+            						+ ". It is possible that the migrator cannot download the xml schema or the xml file has incorrect syntax. Nested exception:"
             						+ e.getMessage());
                         	throw e;
                         }
@@ -105,15 +105,15 @@
                         XMLConversionHelper.saveGeronimoDocument(geronimoJMSFileName,
                                 geronimoDocument);
                         migrated = true;
-                        out.info("The JMS Resource File Migration Complete !!!\n");
+                        out.info(JMSResourcesTool.class.getSimpleName(), "The JMS Resource File Migration Complete !!!\n");
                     } catch(DocumentException ignore){
                     } catch (IOException e) {
-                        out.error("IO exception " + e.getMessage());
+                        out.error(JMSResourcesTool.class.getSimpleName(), "IO exception " + e.getMessage());
                     }
                 } else {
-                    out.error("Inorder to continue the JMS Resources Tool the "
+                    out.error(JMSResourcesTool.class.getSimpleName(), "Inorder to continue the JMS Resources Tool the "
                             + Constants.JBOSS_VALID_JMS_CONNECTION_FACTORY_XML_FILE
-                            + " need to present in working directory ");
+                            + " needs to be present in the working directory ");
                 }
             }
 
@@ -146,7 +146,7 @@
 
         } else {
             out
-               .error("The supplied jboss-ds.xml file does not contain the nessesary tx-connection-factory details");
+               .error(JMSResourcesTool.class.getSimpleName(), "The supplied jboss-ds.xml file does not contain the nessesary tx-connection-factory details");
         }
         return newGeronimoDocument;
     }

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/mail/MailResourcesTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/mail/MailResourcesTool.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/mail/MailResourcesTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/mail/MailResourcesTool.java Thu Jul 26 11:51:34 2007
@@ -48,7 +48,7 @@
     /**
      * mgration method from jms jboss discripters to geronimo discriptors
      * 
-     * @param sourceFile :jms jboss discriptor file
+     * @param sourceFile :jms jboss d"iscriptor file
      * @return status of the migration
      */
     public boolean migrate(File sourceFile, File rootDirectory) {
@@ -58,7 +58,7 @@
             logger.debug("Directory Name ==> " + directoryName
                     + " jboss mail source file Name ==> " + mailFilename);
             if (mailFilename.equals(Constants.JBOSS_VALID_MAIL_XML_FILE)) {
-                out.info("Converting Jboss mail xml file in " + directoryName);
+                out.info(MailResourcesTool.class.getSimpleName(), "Converting Jboss mail xml file in " + directoryName);
                 try {
                     Document jbossDocument = XMLConversionHelper.getJbossDocument(sourceFile);
                     // check the existance of the plain password
@@ -67,9 +67,9 @@
                             .obtainSubElement(jbossDocument.getRootElement(), "mbean"),
                             "attribute", "name", "Password")) {
                         out
-                           .error("The mail discripter file "
+                           .error(MailResourcesTool.class.getSimpleName(), "The mail descripter file "
                                    + mailFilename
-                                   + " contains the plain text password authentocation, Aborting the Process !!!");
+                                   + " contains the plain text password authentication, Aborting the Process !!!");
                     } else {
                         Document geronimoDocument = migrationFromJboss2Geronimo(jbossDocument
                                 .getRootElement());
@@ -81,15 +81,15 @@
                         XMLConversionHelper.saveGeronimoDocument(geronimoMailFileName,
                                 geronimoDocument);
                         migrated = true;
-                        out.info("The Mail Resource File Migration Complete !!!\n");
+                        out.info(MailResourcesTool.class.getSimpleName(), "The Mail Resource File Migration Complete!!!\n");
                     }
                 } catch (DocumentException e) {
-                	out.error("Errors occurs while reading xml descriptor "
+                	out.error(MailResourcesTool.class.getSimpleName(), "Error occured while reading xml descriptor "
     						+ sourceFile.getAbsolutePath()
-    						+ ". It is possible that the migrator cannot download an xml schema or xml file has a wrong syntax. Nested exception:"
+    						+ ". It is possible that the migrator cannot download the xml schema or the xml file has incorrect syntax. Nested exception:"
     						+ e.getMessage());
                 } catch (IOException e) {
-                    out.error("IO exception " + e.getMessage());
+                    out.error(MailResourcesTool.class.getSimpleName(), "IO exception " + e.getMessage());
                 }
             }
         return migrated;

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/security/SecurityResourcesTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/security/SecurityResourcesTool.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/security/SecurityResourcesTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/src/org/apache/geronimo/j2g/resources/security/SecurityResourcesTool.java Thu Jul 26 11:51:34 2007
@@ -63,7 +63,7 @@
             logger.debug("jboss security file Name ==> " + jbossSecirityFileName);
             // Checking wether file is a valid login-config.xml file
             if (jbossSecirityFileName.equals(Constants.JBOSS_VALID_SECURITY_XML_FILE)) {
-                out.info("Converting Jboss login-config.xml file in " + directoryName);
+                out.info(SecurityResourcesTool.class.getSimpleName(), "Converting Jboss login-config.xml file in " + directoryName);
                 try {
                     Document jbossDocument = XMLConversionHelper.getJbossDocument(sourceFile);
                     Document geronimoDocument = migrationFromJboss2Geronimo(jbossDocument
@@ -76,14 +76,14 @@
                     XMLConversionHelper.saveGeronimoDocument(geronimoSecurityFileName,
                             geronimoDocument);
                     migrated = true;
-                    out.info("The Security Resource File Migration Complete !!!\n");
+                    out.info(SecurityResourcesTool.class.getSimpleName(), "The Security Resource File Migration Complete !!!\n");
                 } catch (DocumentException e) {
-                	out.error("Errors occurs while reading xml descriptor "
+                	out.error(SecurityResourcesTool.class.getSimpleName(), "Error occured while reading xml descriptor "
     						+ sourceFile.getAbsolutePath()
-    						+ ". It is possible that the migrator cannot download an xml schema or xml file has a wrong syntax. Nested exception:"
+    						+ ". It is possible that the migrator cannot download the xml schema or the xml file has incorrect syntax. Nested exception:"
     						+ e.getMessage());
                 } catch (IOException e) {
-                    out.error("IO exception " + e.getMessage());
+                    out.error(SecurityResourcesTool.class.getSimpleName(), "IO exception " + e.getMessage());
                 }
             }
 
@@ -184,7 +184,7 @@
         while (elementIterator.hasNext()) {
             Element itElement = (Element) elementIterator.next();
             if (itElement.getName().equals("application-policy")) {
-                out.info("Starting Module Migration");
+                out.info(SecurityResourcesTool.class.getSimpleName(), "Starting Module Migration");
                 if (validateSecurityPolicy(itElement)) {
                     login_domain_name = obtainLoginDomainName(itElement);
                     if (XMLConversionHelper.containSubElement(itElement, "authentication")) {
@@ -202,10 +202,10 @@
                             login_moduleElement, loginConfigElement, control_flag,
                             login_domain_name, login_module_class);
                     loginConfigElement.add(geronimo_login_moduleElement);
-                    out.info("Finishing Module Migration");
+                    out.info(SecurityResourcesTool.class.getSimpleName(), "Finishing Module Migration");
                 } else {
-                    out.error("The security resource conversion tool does not support module functionality");
-                    out.info("Finishing Module Migration");
+                    out.error(SecurityResourcesTool.class.getSimpleName(), "The security resource conversion tool does not support module functionality");
+                    out.info(SecurityResourcesTool.class.getSimpleName(), "Finishing Module Migration");
                 }
             }
         }
@@ -474,14 +474,14 @@
                         option_attrib_name_value = "usersURI";
                         option_value = Constants.USER_PROPERTIES_FILE_PATH;
                         out
-                           .info("Sesurity Resources Tool Assumes user properties are in location =>"
+                           .info(SecurityResourcesTool.class.getSimpleName(), "Security Resources Tool Assumes user properties are in location =>"
                                     + Constants.USER_PROPERTIES_FILE_PATH);
                     }
                     if (option_attrib_name_value.equals("rolesProperties")) {
                         option_attrib_name_value = "groupsURI";
                         option_value = Constants.GROUP_PROPERTIES_FILE_PATH;
                         out
-                           .info("Sesurity Resources Tool Assumes groups properties are in location =>"
+                           .info(SecurityResourcesTool.class.getSimpleName(), "Security Resources Tool Assumes groups properties are in location =>"
                                     + Constants.GROUP_PROPERTIES_FILE_PATH);
                     }
                     optionElement = XMLConversionHelper.createSiblingWithAttrib("option",
@@ -566,7 +566,7 @@
         } else if (jbossLoginModule.equals(Constants.JBOSS_LOGIN_MODULE_USERS_ROLES)) {
             status =  true;
         }else {
-            out.error("The security resource conversion tool does not support "+
+            out.error(SecurityResourcesTool.class.getSimpleName(), "The security resource conversion tool does not support "+
                        jbossLoginModule+" module functionality");
         }
         return status;

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/test-apps/security/security-geronimo-plan.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/test-apps/security/security-geronimo-plan.xml?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/test-apps/security/security-geronimo-plan.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/test-apps/security/security-geronimo-plan.xml Thu Jul 26 11:51:34 2007
@@ -28,7 +28,7 @@
         <log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
           <log:login-domain-name>jbossmq</log:login-domain-name>
           <log:login-module-class>org.apache.geronimo.security.realm.providers.SQLLoginModule</log:login-module-class>
-          <log:option name="dataSourceName">java:/DefaultDS/Test</log:option>
+          <log:option name="dataSourceName">DefaultDS/Test</log:option>
           <log:option name="userSelect">SELECT PASSWD FROM JMS_USERS WHERE USERID=?</log:option>
           <log:option name="groupSelect">SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=?</log:option>
         </log:login-module>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/JavaParser.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/JavaParser.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/JavaParser.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/JavaParser.java Thu Jul 26 11:51:34 2007
@@ -180,7 +180,7 @@
 				}
 			}
 			else {
-				throw new FatalToolException("Path '" + webContent[i] + "' does not pointed to the web content directory. Could not find " + webinfCat.getAbsolutePath() + " directory.");
+				throw new FatalToolException("Path '" + webContent[i] + "' does not point to the web content directory. Could not find " + webinfCat.getAbsolutePath() + " directory.");
 			}
 		}
 
@@ -249,7 +249,7 @@
 					sourceFolderEntry.createLink(Path.fromOSString(jar.getAbsolutePath()), IResource.NONE, null);
 					libs.add(JavaCore.newLibraryEntry(sourceFolderEntry.getFullPath(), null, null));
 				} catch (CoreException ex) {
-					throw new FatalToolException("Error occurs while linking geronimo library: " + jar.getAbsolutePath(), ex);
+					throw new FatalToolException("Error occured while linking geronimo library: " + jar.getAbsolutePath(), ex);
 				}
 			}
 		}
@@ -351,17 +351,17 @@
 						ICompilationUnit compilationUnit = fragment.getCompilationUnit(files[i].getName());
 						units.add(new ParsedSource(compilationUnit, files[i]));
 					} catch (JavaModelException ex) {
-						throw new FatalToolException("Error occurs while parsing sources.", ex);
+						throw new FatalToolException("Error occured while parsing sources.", ex);
 					}
 				}
 			}
 		}
 		else {
 			if (sourceFile.exists()) {
-				throw new FatalToolException("'" + sourceFile.getAbsolutePath() + "'; Source directories allowed only.");
+				throw new FatalToolException("'" + sourceFile.getAbsolutePath() + "'; only source directories are allowed.");
 			}
 			else {
-				throw new FatalToolException("'" + sourceFile.getAbsolutePath() + "' directory does not exists.");
+				throw new FatalToolException("'" + sourceFile.getAbsolutePath() + "' directory does not exist.");
 			}
 		}
 	}
@@ -392,14 +392,14 @@
 		for (int i = 0; i < sources.length; i++) {
 			File file = new File(sources[i]);
 			if (!file.exists()) {
-				throw new FatalToolException("Source directory '" + file.getAbsolutePath() + "' does not exists.");
+				throw new FatalToolException("Source directory '" + file.getAbsolutePath() + "' does not exist.");
 			}
 			IFolder sourceFolderEntry = project.getFolder(generateName(SRC_FOLDER_NAME, i));
 			try {
 				sourceFolderEntry.createLink(Path.fromOSString(file.getAbsolutePath()), IResource.NONE, null);
 				srcList.add(JavaCore.newSourceEntry(sourceFolderEntry.getFullPath()));
 			} catch (CoreException ex) {
-				throw new FatalToolException("Error occurs while linking source directory: " + file.getAbsolutePath(), ex);
+				throw new FatalToolException("Error occured while linking source directory: " + file.getAbsolutePath(), ex);
 			}
 		}
 		return srcList;
@@ -417,7 +417,7 @@
 				try {
 					if (file.isDirectory()) {
 						if (!file.exists()) {
-							throw new FatalToolException("Directory '" + file.getAbsolutePath() + "' does not exists.");
+							throw new FatalToolException("Directory '" + file.getAbsolutePath() + "' does not exist.");
 						}
 						IFolder libFolderEntry = project.getFolder(generateName(LIB_FOLDER_NAME, i));
 						libFolderEntry.createLink(Path.fromOSString(file.getAbsolutePath()), IResource.NONE, null);
@@ -426,7 +426,7 @@
 					}
 					else {
 						if (!file.exists()) {
-							throw new FatalToolException("File '" + file.getAbsolutePath() + "' does not exists.");
+							throw new FatalToolException("File '" + file.getAbsolutePath() + "' does not exist.");
 						}
 						String libName = file.getName();
 						String extension = libName.substring(libName.lastIndexOf("."), libName.length());
@@ -436,7 +436,7 @@
 						libList.add(libJar);
 					}
 				} catch (CoreException ex) {
-					throw new FatalToolException("Error occurs while linking library: " + file.getAbsolutePath(), ex);
+					throw new FatalToolException("Error occured while linking library: " + file.getAbsolutePath(), ex);
 				}
 			}
 		}

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/SourceIdentificationTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/SourceIdentificationTool.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/SourceIdentificationTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/SourceIdentificationTool.java Thu Jul 26 11:51:34 2007
@@ -182,7 +182,7 @@
 			}
 
 		} catch (FatalToolException ex) {
-			getOutput().fatal(ex.getMessage());
+			getOutput().fatal(SourceIdentificationTool.class.getSimpleName(), ex.getMessage());
 			return new Integer(1);
 		} finally {
 			IWorkspace workspace = ResourcesPlugin.getWorkspace();
@@ -197,7 +197,7 @@
 	 * Print tool usage text.
 	 */
 	protected void usage() {
-		getOutput().fatal("Usage: jsrc2g.cmd {-src dir_name[,dir_nameN]}{-lib dir_or_jar_name[;dir_or_jar_nameN]}{-web dir_name[;dir_nameN]} -geronimo geronimo_home");
+		getOutput().fatal(SourceIdentificationTool.class.getSimpleName(), "Usage: jsrc2g.cmd {-src dir_name[,dir_nameN]}{-lib dir_or_jar_name[;dir_or_jar_nameN]}{-web dir_name[;dir_nameN]} -geronimo geronimo_home");
 	}
 
 	/**
@@ -361,11 +361,11 @@
 			sourceUnit.getBuffer().setContents(newSource);
 			sourceUnit.save(null, true);
 		} catch (JavaModelException ex) {
-			getOutput().error("Java element does not exists or it is read-only: " + sourceUnit.getElementName());
+			getOutput().error(SourceIdentificationTool.class.getSimpleName(), "Java element does not exist or it is read-only: " + sourceUnit.getElementName());
 		} catch (IOException ex) {
-			getOutput().error("I/O error occurs while creating backup copy of source file: " + source.getFile().getAbsolutePath());
+			getOutput().error(SourceIdentificationTool.class.getSimpleName(), "I/O error occured while creating backup copy of source file: " + source.getFile().getAbsolutePath());
 		} catch (BadLocationException ex) {
-			getOutput().error("Cannot edit source file: " + source.getFile().getAbsolutePath());
+			getOutput().error(SourceIdentificationTool.class.getSimpleName(), "Cannot edit source file: " + source.getFile().getAbsolutePath());
 		}
 	}
 }

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/dependence/APIReplaceVisitor.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/dependence/APIReplaceVisitor.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/dependence/APIReplaceVisitor.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/dependence/APIReplaceVisitor.java Thu Jul 26 11:51:34 2007
@@ -96,7 +96,7 @@
 				newImport.setName(newName);
 				imports.add(newImport);
 				isImportAffected = true;
-				out.info("New import was added: '" + newName.getFullyQualifiedName()+"'.");
+				out.info(APIReplaceVisitor.class.getSimpleName(), "New import was added: '" + newName.getFullyQualifiedName()+"'.");
 				changes++;
 			}
 		}
@@ -139,7 +139,7 @@
 	 */
 	private void printChanges(Name name, Name newName, int row, int col) {
 		changes++;
-		out.info("Name '" + name.getFullyQualifiedName() + "' was replaced by '" + newName.getFullyQualifiedName() + "'.", row, col);
+		out.info(APIReplaceVisitor.class.getSimpleName(), "Name '" + name.getFullyQualifiedName() + "' was replaced by '" + newName.getFullyQualifiedName() + "'.", row, col);
 	}
 
 	/**

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/dependence/DependenceJavaMigration.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/dependence/DependenceJavaMigration.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/dependence/DependenceJavaMigration.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/dependence/DependenceJavaMigration.java Thu Jul 26 11:51:34 2007
@@ -165,7 +165,7 @@
 			CompilationUnit compilationUnit = (CompilationUnit) source;
 			String unitName = compilationUnit.getJavaElement().getElementName();
 			boolean isSourceChanged = false;
-			out.info("[" + PLUGIN_NAME + "] " + "Migration started: " + unitName);
+			out.info(DependenceJavaMigration.class.getSimpleName(), "[" + PLUGIN_NAME + "] " + "Migration started: " + unitName);
 			Set replacedClasses = classAnalogies.keySet();
 			AST ast = compilationUnit.getAST();
 			Iterator classesIterator = replacedClasses.iterator();
@@ -184,7 +184,7 @@
 					isSourceChanged = isSourceChanged || (apiReplacer.getChanges() > 0);
 				}
 				else {
-					out.error("Wrong class names for JBoss classes and it's Geronimo analogies in property file");
+					out.error(DependenceJavaMigration.class.getSimpleName(), "Wrong class names for JBoss classes and it's Geronimo analogies in property file");
 					break;
 				}
 
@@ -242,22 +242,22 @@
 					compilationUnit = (CompilationUnit) parser.createAST(null);
 				}
 			} catch (IOException ex) {
-				out.fatal("The plug-in cannot add compatible package or save buckup because of I/O error occurs. Make sure that the source directories are not under write protection.");
+				out.fatal(DependenceJavaMigration.class.getSimpleName(), "The plug-in cannot add compatible package or save backup because an I/O error occured. Make sure that the source directories are not under write protection.");
 			} catch (Exception e) {
-				out.fatal("The plug-in cannot get access to the resources. Make sure that the source files are not under write protection or not deleted by another process.");
+				out.fatal(DependenceJavaMigration.class.getSimpleName(), "The plug-in cannot get access to the resources. Make sure that the source files are not under write protection or have not been deleted by another process.");
 			}
 			NodesVisitor visitor = new NodesVisitor(compilationUnit);
 			compilationUnit.accept(visitor);
 			visitor.visit(compilationUnit);
 			boolean isSourceValid = visitor.isSourceValid();
 			if (isSourceChanged && !isSourceValid) {
-				out.warn("Errors were found in source file! Changes were saved. The original file was saved with name " + unitName + RollbackManager.BACKUP_SUFFIX);
+				out.warn(DependenceJavaMigration.class.getSimpleName(), "Errors were found in the source file! Changes were saved. The original file was saved with name " + unitName + RollbackManager.BACKUP_SUFFIX);
 			}
-			out.info("[" + PLUGIN_NAME + "] " + "Migration finished: " + unitName);
+			out.info(DependenceJavaMigration.class.getSimpleName(), "[" + PLUGIN_NAME + "] " + "Migration finished: " + unitName);
 			return false;
 		}
 		else {
-			out.error("[" + PLUGIN_NAME + "] " + "Wrong type of source node.");
+			out.error(DependenceJavaMigration.class.getSimpleName(), "[" + PLUGIN_NAME + "] " + "Wrong type of source node.");
 		}
 		return false;
 	}

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/dependence/NodesVisitor.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/dependence/NodesVisitor.java?view=diff&rev=559937&r1=559936&r2=559937
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/dependence/NodesVisitor.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/src/org/apache/geronimo/j2g/sources/dependence/NodesVisitor.java Thu Jul 26 11:51:34 2007
@@ -113,12 +113,12 @@
 					File lib = binding.getJavaElement().getUnderlyingResource().getRawLocation().toFile();
 					String artifactName = getGeronimoArtifactName(lib);
 					if (!linkedLibs.contains(lib.getName()) && !DependenceJavaMigration.getDefaultLibs().contains(artifactName)) {
-						out.warn("You should add '" + artifactName + "' dependency.");
+						out.warn(NodesVisitor.class.getSimpleName(), "You should add a '" + artifactName + "' dependency.");
 						linkedLibs.add(lib.getName());
 					}
 				}
 			} catch (JavaModelException e) {
-				out.fatal("Cannot get access to library for resolve name'" + name + "'.");
+				out.fatal(NodesVisitor.class.getSimpleName(), "Cannot get access to library for resolve name'" + name + "'.");
 			}
 		}
 	}
@@ -308,7 +308,7 @@
 	 */
 	private void printTypeError(String name, int position) {
 		if (!imports.contains(name)) {
-			out.error("The name '" + name + "' cannot be resolved.", unit.getLineNumber(position), unit.getColumnNumber(position));
+			out.error(NodesVisitor.class.getSimpleName(), "The name '" + name + "' cannot be resolved.", unit.getLineNumber(position), unit.getColumnNumber(position));
 			wrongApiUsing = true;
 		}
 	}
@@ -323,7 +323,7 @@
 	 */
 	private void printImportError(String name, int position) {
 		wrongApiUsing = true;
-		out.error("The import '" + name + "' cannot be resolved.", unit.getLineNumber(position), unit.getColumnNumber(position));
+		out.error(NodesVisitor.class.getSimpleName(), "The import '" + name + "' cannot be resolved.", unit.getLineNumber(position), unit.getColumnNumber(position));
 	}
 	
 	/**



Mime
View raw message