mgrex's Profile User Rating: -----

Reputation: 3 Apprentice
Group:
Active Members
Active Posts:
213 (0.11 per day)
Joined:
25-March 10
Profile Views:
2,002
Last Active:
User is offline Yesterday, 10:46 AM
Currently:
Offline

Previous Fields

Country:
Who Cares
OS Preference:
Who Cares
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0
Icon   mgrex has not set their status

Posts I've Made

  1. In Topic: Syntax from textbook won't execute in query.

    Posted 2 Aug 2015

    The following seemed to have worked; by removing all quotation marks.

    CREATE TABLE employeeschema_01.Department (
    	DNR INT NOT NULL,
    	DName VARCHAR(45) NULL,
    	DAddress VARCHAR(45) NULL,
    	PRIMARY KEY (DNR))
    ENGINE = InnoDB;
    
    CREATE TABLE employeeschema_01.Employee 
    (
    	EmployeeID INT NOT NULL,
    	Name VARCHAR(45) NULL,
    	Gender VARCHAR(45) NULL,
    	DNR INT NULL,
    	PRIMARY KEY (EmployeeID),
    	INDEX DNRForeign_idx (DNR ASC),
    	CONSTRAINT DNRForeign FOREIGN KEY (DNR)				# Department table must be created first.
    		REFERENCES employeeschema_01.Department (DNR)
    	ON DELETE NO ACTION
    	ON UPDATE NO ACTION
        )    
        
    ENGINE = InnoDB;
        
    
  2. In Topic: When appending to an existing, begin at a new line.

    Posted 20 Jul 2015

    I created an if statement, to prevent a newly created duplicate list, from starting with an empty line.

    if  ( "groceries02.txt" == null) 
    				out.write("\r\n");
    
  3. In Topic: How to modify logger to display desired result.

    Posted 13 Jul 2015

    I placed log4j2.xml in the /bin directory instead of the /src directory as the author stated.

    I got the following output:

    03:58:51.612 [main] TRACE Ch_05_12_ApacheLogging - entry
    03:58:51.614 [main] INFO  Ch_05_12_ApacheLogging - fundAmount = 12100.000000000002
    03:58:51.614 [main] TRACE Ch_05_12_ApacheLogging - exit
    03:58:51.614 [main] TRACE Ch_05_12_ApacheLogging - entry
    03:58:51.614 [main] INFO  Ch_05_12_ApacheLogging - fundAmount = 12100.000000000002
    03:58:51.614 [main] TRACE Ch_05_12_ApacheLogging - exit
    03:58:51.614 [main] TRACE Ch_05_12_ApacheLogging - entry
    03:58:51.614 [main] INFO  Ch_05_12_ApacheLogging - fundAmount = 12100.000000000002
    03:58:51.614 [main] TRACE Ch_05_12_ApacheLogging - exit
    03:58:51.614 [main] TRACE Ch_05_12_ApacheLogging - entry
    03:58:51.615 [main] INFO  Ch_05_12_ApacheLogging - fundAmount = 12100.000000000002
    03:58:51.615 [main] TRACE Ch_05_12_ApacheLogging - exit
    03:58:51.615 [main] TRACE Ch_05_12_ApacheLogging - entry
    03:58:51.615 [main] INFO  Ch_05_12_ApacheLogging - fundAmount = 12100.000000000002
    03:58:51.615 [main] TRACE Ch_05_12_ApacheLogging - exit
    03:58:51.615 [main] TRACE Ch_05_12_ApacheLogging - entry
    03:58:51.615 [main] INFO  Ch_05_12_ApacheLogging - fundAmount = 12100.000000000002
    03:58:51.615 [main] TRACE Ch_05_12_ApacheLogging - exit
    David Johnson will have $41.666666666666664 per month for retirement.
    monthlyPension is too low.
    03:58:51.615 [main] TRACE Ch_05_12_ApacheLogging - finely detailed TRACE message
    03:58:51.615 [main] DEBUG Ch_05_12_ApacheLogging - detailed DEBUG message
    03:58:51.615 [main] INFO  Ch_05_12_ApacheLogging - informational message
    03:58:51.615 [main] WARN  Ch_05_12_ApacheLogging - warning message
    03:58:51.615 [main] ERROR Ch_05_12_ApacheLogging - error message
    03:58:51.615 [main] FATAL Ch_05_12_ApacheLogging - fatal message
    



    Unfortunately the author got the following result, with 11,000 instead of 12,100. If anyone knows why they're different, it would be appreciated. I'm fortunate to have gotten this far.


    Spoiler
  4. In Topic: How to modify logger to display desired result.

    Posted 12 Jul 2015

    The link in my original post is able open the download page.

    I got the files from here, binary zip & mirror.
    https://logging.apache.org/log4j/2.0/download.html
    


    I typed the import statements as they were written in the book's example.

    The following code, generated 2 files, config.log and finer.log, in the /src folder where the log4j2.xml file is located at. They both display what the author's book display.

    Spoiler


    Any help with the Ch_05_12_ApacheLogging class, would be appreciated.
  5. In Topic: How to modify logger to display desired result.

    Posted 11 Jul 2015

    I apologize for the omission.

    The file was named Log4j2.xml, with an uppercase L.

    I renamed it to log4j.xml and restarted eclipse. I get:

    ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
    David Johnson will have $41.666666666666664 per month for retirement.
    monthlyPension is too low.
    12:04:49.882 [main] ERROR Ch_05_12_ApacheLogging - error message
    12:04:49.883 [main] FATAL Ch_05_12_ApacheLogging - fatal message
    
    


    I have since changed it back to Beginning_Java_Porgramming_01\src\log4j2.xml

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

mgrex hasn't added any friends yet.

Comments

mgrex has no profile comments yet. Why not say hello?