Log4j 2
  1. Log4j 2
  2. LOG4J2-229

New JDBC, JPA, and NoSQL database Appenders

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta5
    • Fix Version/s: 2.0-beta8
    • Component/s: Appenders, Core
    • Labels:
      None

      Description

      As discussed on the mailing list ([1] and [2]), Log4j 2 is in need of some database appenders. I have added this new feature and will attach a patch shortly. The patch contains:

      • A slight change to PatternLayout. Currently it is not possible to create a PatternLayout that doesn't always handle exceptions. If you leave all exception handling out of the pattern, an exception handler is forcibly added to the end of the pattern. This behavior is controlled by a flag, but that flag is always hard-coded to false. I added a parameter for it. This was necessary for the JDBC appender.
      • o.a.l.l.core.appender.db.AbstractDatabaseManager and AbstractDatabaseAppender, together in concert, take care of some core functionality common across all database appenders, such as buffering and connection state.
      • o.a.l.l.core.appender.db.jdbc.JDBCAppender (and Manager, other classes) supports writing events to a relational database using raw JDBC. It's injection-safe due to the use of prepared statements. It can be configured with URL/username/password, JNDI data source, or a connection factory method.
      • o.a.l.l.core.appender.db.jpa.JPAAppender (and Manager, other classes) supports writing events to a relational database using the Java Persistence API version 2.0.
      • o.a.l.l.core.appender.db.nosql.NoSQLAppender (and Manager, other classes) supports writing to an abstract concept of a NoSQL provider. Providers have been created for MongoDB and Apache CouchDB. Creating a new provider is extremely easy.
      • Thorough unit tests for the abstract classes, the JDBC and JPA appenders, and the abstract parts of the NoSQLAppender. Directly unit testing the MongoDB and CouchDB providers in a platform-independent way is not easy and may not be possible.
      • Thorough documentation (both JavaDoc and Site documentation) for all of the appenders.

      [1] http://markmail.org/thread/z2wpmwelv7p6xh2o
      [2] http://markmail.org/thread/s7pljqdjhjz5xfk5

        Activity

        Hide
        Nick Williams added a comment -

        Patch attached. Current as of 2013-04-29 16:50:00 -05:00.

        Show
        Nick Williams added a comment - Patch attached. Current as of 2013-04-29 16:50:00 -05:00.
        Hide
        Nick Williams added a comment -

        Hi. Any comments on the patch?

        Show
        Nick Williams added a comment - Hi. Any comments on the patch?
        Hide
        Remko Popma added a comment -

        Ralph or Gary, will you be looking at Nick's patch?

        Show
        Remko Popma added a comment - Ralph or Gary, will you be looking at Nick's patch?
        Hide
        Gary Gregory added a comment -

        I'll only be able to look tomorrow afternoon (EST) or later.

        Show
        Gary Gregory added a comment - I'll only be able to look tomorrow afternoon (EST) or later.
        Hide
        Ralph Goers added a comment -

        I will look at it but I have been swamped this week.

        Show
        Ralph Goers added a comment - I will look at it but I have been swamped this week.
        Hide
        Remko Popma added a comment - - edited

        Nick, I've started to look at the DB appenders. I'm still looking and would like to set up test databases and try this out, but initial feedback just from the docs:

        JDBC appender

        • I like your approach with the Columns. The fact they can use standard Layout is very powerful.
        • It would be good to have a sample CREATE TABLE command.
        • I can guess a lot from the JDBC Appender examples, but it would be good if the Column element had documentation.
          Maybe a few words on each of the attributes isEventTimestamp, pattern and literal.
          For example, Columns marked isEventTimeStamp will get the value of event.getMillis, wrapped in a java.sql.Timestamp, or something to that effect. (Especially the fact that the data type is Timestamp.)

        NoSQL appender

        • It may be good to document the keys/field names that are used to create a log event document.
        • The docs mention that writing a custom provider is quite simple, but leave it at that.
          Please provide more detail, maybe explicitly mention the three interfaces that need to be implemented, and that one of these implementation classes should also be a log4j2 Plug-in.

        Overall it looks very nice.

        Show
        Remko Popma added a comment - - edited Nick, I've started to look at the DB appenders. I'm still looking and would like to set up test databases and try this out, but initial feedback just from the docs: JDBC appender I like your approach with the Columns. The fact they can use standard Layout is very powerful. It would be good to have a sample CREATE TABLE command. I can guess a lot from the JDBC Appender examples, but it would be good if the Column element had documentation. Maybe a few words on each of the attributes isEventTimestamp, pattern and literal. For example, Columns marked isEventTimeStamp will get the value of event.getMillis, wrapped in a java.sql.Timestamp, or something to that effect. (Especially the fact that the data type is Timestamp.) NoSQL appender It may be good to document the keys/field names that are used to create a log event document. The docs mention that writing a custom provider is quite simple, but leave it at that. Please provide more detail, maybe explicitly mention the three interfaces that need to be implemented, and that one of these implementation classes should also be a log4j2 Plug-in. Overall it looks very nice.
        Hide
        Nick Williams added a comment -

        All good points, and I will address them all. I also have a few minor improvements to make, but I need to discuss one of them (using JPA 2.1 instead of JPA 2.0) on the developer list.

        However, I really hate having this much uncommitted code, and I prefer to work incrementally. As other people are checking in more and more work, it makes the patch more and more risky. It's the downside of not having committer rights I suppose, but it's frustrating. It would be great if we could get this code that is working checked in and then commit a set of improvements to it.

        Nick

        Show
        Nick Williams added a comment - All good points, and I will address them all. I also have a few minor improvements to make, but I need to discuss one of them (using JPA 2.1 instead of JPA 2.0) on the developer list. However, I really hate having this much uncommitted code, and I prefer to work incrementally. As other people are checking in more and more work, it makes the patch more and more risky. It's the downside of not having committer rights I suppose, but it's frustrating. It would be great if we could get this code that is working checked in and then commit a set of improvements to it. Nick
        Hide
        Gary Gregory added a comment -

        I'm sorry I've no had time to dig into this one because it interest me a great deal. The talk of settings up a database makes it sound like no unit tests are provided. Is that so? If not, let use an H2 in-memory database.

        Show
        Gary Gregory added a comment - I'm sorry I've no had time to dig into this one because it interest me a great deal. The talk of settings up a database makes it sound like no unit tests are provided. Is that so? If not, let use an H2 in-memory database.
        Hide
        Nick Williams added a comment -

        I'm not sure exactly what Remko had planned, but as explained above and on the mailing list there are 62 unit tests for these appenders. The JDBC and JPA appenders are tested against an HSQLDB in-memory database.

        Show
        Nick Williams added a comment - I'm not sure exactly what Remko had planned, but as explained above and on the mailing list there are 62 unit tests for these appenders. The JDBC and JPA appenders are tested against an HSQLDB in-memory database.
        Hide
        Nick Williams added a comment - - edited

        The patch above is no longer clean. It no longer compiles/passes. This is due to changes made to the @Plugin annotation in the last few days (and this is why developing like this is so frustrating ). I have updated to latest revision (1479389), fixed the broken code, and attached a new patch.

        Show
        Nick Williams added a comment - - edited The patch above is no longer clean. It no longer compiles/passes. This is due to changes made to the @Plugin annotation in the last few days (and this is why developing like this is so frustrating ). I have updated to latest revision (1479389), fixed the broken code, and attached a new patch.
        Hide
        Ralph Goers added a comment -

        I apologize for that Nick. I knew it was going to break your patch when I made the change but I had planned on addressing that myself, not forcing you to do it.

        Show
        Ralph Goers added a comment - I apologize for that Nick. I knew it was going to break your patch when I made the change but I had planned on addressing that myself, not forcing you to do it.
        Hide
        Nick Williams added a comment -

        No problem. It happens.

        Show
        Nick Williams added a comment - No problem. It happens.
        Hide
        Ralph Goers added a comment - - edited

        I applied the patch to my workspace. mvn install worked fine but mvn site now fails with an OutOfMemoryError (PermGen). I backed out the patch and am still getting the error.

        Show
        Ralph Goers added a comment - - edited I applied the patch to my workspace. mvn install worked fine but mvn site now fails with an OutOfMemoryError (PermGen). I backed out the patch and am still getting the error.
        Hide
        Remko Popma added a comment -

        I updated to get Ralph's latest commits (incl. upgrading the findbugs version on the child poms) and both mvn clean install and mvn site work without any issues on Win7. This is with Nick's patch.

        Show
        Remko Popma added a comment - I updated to get Ralph's latest commits (incl. upgrading the findbugs version on the child poms) and both mvn clean install and mvn site work without any issues on Win7. This is with Nick's patch.
        Hide
        Nick Williams added a comment -

        Yea, `mvn site` fails for me with OOM errors about one out of every three times. It's actually quite common, and started before my changes. I think the project has just gotten so big that we need to increase the memory for the build.

        Show
        Nick Williams added a comment - Yea, `mvn site` fails for me with OOM errors about one out of every three times. It's actually quite common, and started before my changes. I think the project has just gotten so big that we need to increase the memory for the build.
        Hide
        Ralph Goers added a comment -

        I just started the release vote for 2.0-beta6. I will apply this as soon as the release is final.

        Show
        Ralph Goers added a comment - I just started the release vote for 2.0-beta6. I will apply this as soon as the release is final.
        Hide
        Gary Gregory added a comment -

        I am looking at the patch and I have some questions.

        In this fragment:

        <Jdbc name="databaseAppender" tableName="dmLogEntry">
        <DriverManager jdbcUrl="jdbc:hsqldb:mem:Log4j;ifexists=true" username="sa" password="" />

        Could the attribute jdbcUrl simply be called url? Are there other kinds of URLs a DriverManager supports that would cause us to need to know that this is a JDBC URL as opposed to another kind of URL?

        Show
        Gary Gregory added a comment - I am looking at the patch and I have some questions. In this fragment: <Jdbc name="databaseAppender" tableName="dmLogEntry"> <DriverManager jdbcUrl="jdbc:hsqldb:mem:Log4j;ifexists=true" username="sa" password="" /> Could the attribute jdbcUrl simply be called url? Are there other kinds of URLs a DriverManager supports that would cause us to need to know that this is a JDBC URL as opposed to another kind of URL?
        Hide
        Nick Williams added a comment - - edited

        Yes, it could be called just "url". Feel free to change that in the patch.

        (OT: Why on earth is code formatting disabled in this JIRA? It's the only JIRA installation I've ever seen where you couldn't format code, and it's really frustrating sometimes.)

        Show
        Nick Williams added a comment - - edited Yes, it could be called just "url". Feel free to change that in the patch. (OT: Why on earth is code formatting disabled in this JIRA? It's the only JIRA installation I've ever seen where you couldn't format code, and it's really frustrating sometimes.)
        Hide
        Gary Gregory added a comment -

        (No code formatting: I know, it's so lame)

        Show
        Gary Gregory added a comment - (No code formatting: I know, it's so lame)
        Hide
        Gary Gregory added a comment -

        Having a plain text password in a config file seems like asking for trouble. Maybe we should at least support obfuscation, or access through a -D parameter, env var?

        Show
        Gary Gregory added a comment - Having a plain text password in a config file seems like asking for trouble. Maybe we should at least support obfuscation, or access through a -D parameter, env var?
        Hide
        Gary Gregory added a comment -

        Hm... I guess there is JNDI. Do we have a JNDI-based test?

        Show
        Gary Gregory added a comment - Hm... I guess there is JNDI. Do we have a JNDI-based test?
        Hide
        Ralph Goers added a comment -

        I believe there is a semi-standard way to encrypt the password. I know we encrypt our database passwords for JBoss. Maven also supports encryption of the credentials stored in settings-security.xml.

        Show
        Ralph Goers added a comment - I believe there is a semi-standard way to encrypt the password. I know we encrypt our database passwords for JBoss. Maven also supports encryption of the credentials stored in settings-security.xml.
        Hide
        Nick Williams added a comment -

        First, any environmental variable can be used here, right? Log4J replaces things like $

        {env.whatever}

        , etc. Or do I understand that incorrectly?

        Second, there are three connection providers for the <Jdbc> appender:

        <DriverManager> (URL, username, password)
        <DataSource> (JNDI)
        <ConnectionFactory> (class name + static method that returns a DataSource or Connection)

        There are unit tests (actually more like integration tests, but that's the case all over Log4j2 appender tests) against <Jdbc> configurations with <DriverManager> and <ConnectionFactory>. I can create additional unit tests on pass 2 against <DataSource>.

        Since users can use variable substitution, I see no reason to natively support password obfuscation.

        Show
        Nick Williams added a comment - First, any environmental variable can be used here, right? Log4J replaces things like $ {env.whatever} , etc. Or do I understand that incorrectly? Second, there are three connection providers for the <Jdbc> appender: <DriverManager> (URL, username, password) <DataSource> (JNDI) <ConnectionFactory> (class name + static method that returns a DataSource or Connection) There are unit tests (actually more like integration tests, but that's the case all over Log4j2 appender tests) against <Jdbc> configurations with <DriverManager> and <ConnectionFactory>. I can create additional unit tests on pass 2 against <DataSource>. Since users can use variable substitution, I see no reason to natively support password obfuscation.
        Hide
        Gary Gregory added a comment -

        FYI: As soon as the beta6 VOTE RESULT is announced I'd like to commit this patch. I've been careful not to commit to areas touched by the patch but now I'm in a holding pattern. The VOTE should complete today.

        Show
        Gary Gregory added a comment - FYI: As soon as the beta6 VOTE RESULT is announced I'd like to commit this patch. I've been careful not to commit to areas touched by the patch but now I'm in a holding pattern. The VOTE should complete today.
        Hide
        Ralph Goers added a comment -

        The release is finished. Go ahead and commit this.

        Show
        Ralph Goers added a comment - The release is finished. Go ahead and commit this.
        Hide
        Gary Gregory added a comment -

        OK, in progress...

        Show
        Gary Gregory added a comment - OK, in progress...
        Hide
        Gary Gregory added a comment -

        commit -m "LOG4J2-229 New JDBC, JPA, and NoSQL database Appenders. First commit based on the patch by Nick Williams." (25 paths specified)
        Sending C:/svn/org/apache/log4j2/trunk/checkstyle.xml
        Sending C:/svn/org/apache/log4j2/trunk/core/pom.xml
        Sending C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java
        Sending C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastFileAppender.java
        Sending C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastRollingFileAppender.java
        Sending C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileAppender.java
        Sending C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java
        Sending C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java
        Sending C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/DefaultConfiguration.java
        Sending C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java
        Sending C:/svn/org/apache/log4j2/trunk/core/src/site/xdoc/index.xml
        Sending C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderTest.java
        Sending C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FileAppenderTest.java
        Sending C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/OutputStreamAppenderTest.java
        Sending C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java
        Sending C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/AbstractSocketServerTest.java
        Sending C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/JMSQueueTest.java
        Sending C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/JMSTopicTest.java
        Sending C:/svn/org/apache/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/CategoryTest.java
        Sending C:/svn/org/apache/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggerTest.java
        Sending C:/svn/org/apache/log4j2/trunk/pom.xml
        Sending C:/svn/org/apache/log4j2/trunk/src/changes/changes.xml
        Sending C:/svn/org/apache/log4j2/trunk/src/site/site.vm
        Sending C:/svn/org/apache/log4j2/trunk/src/site/site.xml
        Sending C:/svn/org/apache/log4j2/trunk/src/site/xdoc/manual/appenders.xml
        Transmitting file data ...
        Committed revision 1481025.

        Show
        Gary Gregory added a comment - commit -m " LOG4J2-229 New JDBC, JPA, and NoSQL database Appenders. First commit based on the patch by Nick Williams." (25 paths specified) Sending C:/svn/org/apache/log4j2/trunk/checkstyle.xml Sending C:/svn/org/apache/log4j2/trunk/core/pom.xml Sending C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java Sending C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastFileAppender.java Sending C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FastRollingFileAppender.java Sending C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileAppender.java Sending C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java Sending C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java Sending C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/DefaultConfiguration.java Sending C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java Sending C:/svn/org/apache/log4j2/trunk/core/src/site/xdoc/index.xml Sending C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderTest.java Sending C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FileAppenderTest.java Sending C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/OutputStreamAppenderTest.java Sending C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java Sending C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/AbstractSocketServerTest.java Sending C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/JMSQueueTest.java Sending C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/JMSTopicTest.java Sending C:/svn/org/apache/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/CategoryTest.java Sending C:/svn/org/apache/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggerTest.java Sending C:/svn/org/apache/log4j2/trunk/pom.xml Sending C:/svn/org/apache/log4j2/trunk/src/changes/changes.xml Sending C:/svn/org/apache/log4j2/trunk/src/site/site.vm Sending C:/svn/org/apache/log4j2/trunk/src/site/site.xml Sending C:/svn/org/apache/log4j2/trunk/src/site/xdoc/manual/appenders.xml Transmitting file data ... Committed revision 1481025.
        Hide
        Gary Gregory added a comment -

        commit -m "LOG4J2-229 New JDBC, JPA, and NoSQL database Appenders. Oops, forgot to add new files." (34 paths specified)
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/AbstractDatabaseAppender.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/AbstractDatabaseManager.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/ColumnConfig.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/ConnectionSource.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/DataSourceConnectionSource.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/DriverManagerConnectionSource.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSource.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/JDBCAppender.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/JDBCDatabaseManager.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/package-info.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/JPAAppender.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/JPADatabaseManager.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/LogEventWrapperEntity.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/package-info.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/NoSQLAppender.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/NoSQLConnection.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/NoSQLDatabaseManager.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/NoSQLObject.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/NoSQLProvider.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/couch
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/couch/CouchDBConnection.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/couch/CouchDBObject.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/couch/CouchDBProvider.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/couch/package-info.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/mongo
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/mongo/MongoDBConnection.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/mongo/MongoDBObject.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/mongo/MongoDBProvider.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/mongo/package-info.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/package-info.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/package-info.java
        Transmitting file data ...
        Committed revision 1481026

        Show
        Gary Gregory added a comment - commit -m " LOG4J2-229 New JDBC, JPA, and NoSQL database Appenders. Oops, forgot to add new files." (34 paths specified) Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/AbstractDatabaseAppender.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/AbstractDatabaseManager.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/ColumnConfig.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/ConnectionSource.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/DataSourceConnectionSource.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/DriverManagerConnectionSource.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSource.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/JDBCAppender.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/JDBCDatabaseManager.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/package-info.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/JPAAppender.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/JPADatabaseManager.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/LogEventWrapperEntity.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/package-info.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/NoSQLAppender.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/NoSQLConnection.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/NoSQLDatabaseManager.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/NoSQLObject.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/NoSQLProvider.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/couch Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/couch/CouchDBConnection.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/couch/CouchDBObject.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/couch/CouchDBProvider.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/couch/package-info.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/mongo Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/mongo/MongoDBConnection.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/mongo/MongoDBObject.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/mongo/MongoDBProvider.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/mongo/package-info.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/package-info.java Adding C:/svn/org/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/package-info.java Transmitting file data ... Committed revision 1481026
        Hide
        Gary Gregory added a comment -

        commit -m "LOG4J2-229 New JDBC, JPA, and NoSQL database Appenders. Oops, forgot to add new files." (27 paths specified)
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/AbstractDatabaseAppenderTest.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/AbstractDatabaseManagerTest.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/ColumnConfigTest.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/DataSourceConnectionSourceTest.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/DriverManagerConnectionSourceTest.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSourceTest.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/JDBCAppenderTest.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/JPAAppenderTest.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/TestEntity.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/nosql
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/nosql/NoSQLAppenderTest.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/nosql/NoSQLDatabaseManagerTest.java
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/META-INF
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/META-INF/persistence.xml
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-driver-manager.xml
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-factory-method.xml
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa
        Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-jpa.xml
        Transmitting file data ...
        Committed revision 1481028.

        Show
        Gary Gregory added a comment - commit -m " LOG4J2-229 New JDBC, JPA, and NoSQL database Appenders. Oops, forgot to add new files." (27 paths specified) Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/AbstractDatabaseAppenderTest.java Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/AbstractDatabaseManagerTest.java Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/ColumnConfigTest.java Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/DataSourceConnectionSourceTest.java Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/DriverManagerConnectionSourceTest.java Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSourceTest.java Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/JDBCAppenderTest.java Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/JPAAppenderTest.java Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/TestEntity.java Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/nosql Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/nosql/NoSQLAppenderTest.java Adding C:/svn/org/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/nosql/NoSQLDatabaseManagerTest.java Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/META-INF Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/META-INF/persistence.xml Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-driver-manager.xml Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-factory-method.xml Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa Adding C:/svn/org/apache/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-jpa.xml Transmitting file data ... Committed revision 1481028.
        Hide
        Remko Popma added a comment -

        Gary, it looks like the last commit that added a test for h2 database may have broken the build:

        D:\data\workspace-4.2.1\log4j2>mvn clean install
        [INFO] Scanning for projects...
        [ERROR] The build could not read 1 project -> [Help 1]
        [ERROR]
        [ERROR] The project org.apache.logging.log4j:log4j-core:2.0-beta7-SNAPSHOT (D:\data\workspace-4.2.1\log4j2\core\pom.xml) has 1 error
        [ERROR] 'dependencies.dependency.version' for com.h2database:h2:jar is missing. @ line 107, column 17

        adding <version>1.3.171</version> to core/pom.xml fixes the issue, but this should probably be in the root pom.xml?

        Show
        Remko Popma added a comment - Gary, it looks like the last commit that added a test for h2 database may have broken the build: D:\data\workspace-4.2.1\log4j2>mvn clean install [INFO] Scanning for projects... [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project org.apache.logging.log4j:log4j-core:2.0-beta7-SNAPSHOT (D:\data\workspace-4.2.1\log4j2\core\pom.xml) has 1 error [ERROR] 'dependencies.dependency.version' for com.h2database:h2:jar is missing. @ line 107, column 17 adding <version>1.3.171</version> to core/pom.xml fixes the issue, but this should probably be in the root pom.xml?
        Hide
        Nick Williams added a comment -

        Ralph fixed this with r1482707.

        Show
        Nick Williams added a comment - Ralph fixed this with r1482707.
        Hide
        Remko Popma added a comment -

        Is there any remaining work on this Jira ticket or could it be marked Resolved?

        Show
        Remko Popma added a comment - Is there any remaining work on this Jira ticket or could it be marked Resolved?
        Hide
        Nick Williams added a comment -

        Good question.

        The JDBC and NoSQL Appenders are "done." However, there is always room to add support for additional NoSQL databases. MongoDB and CouchDB were the ones that seemed most obvious to me (MongoDB because it's the most popular NoSQL database in the world, CouchDB because it's an Apache project), but there could be others that make sense to include core support.

        The JPA Appender, in theory, works. However, there's a bug (https://hibernate.atlassian.net/browse/HHH-8111) that's blocking the unit tests from passing. When that bug is fixed and Hibernate 4.3.0.beta3 is released (May 29), I'll should be able to get those tests passing. For now, they're @Ignored.

        So, in theory, we can probably mark it resolved, unless someone feels the status of the JPA Appender is still too uncertain.

        Show
        Nick Williams added a comment - Good question. The JDBC and NoSQL Appenders are "done." However, there is always room to add support for additional NoSQL databases. MongoDB and CouchDB were the ones that seemed most obvious to me (MongoDB because it's the most popular NoSQL database in the world, CouchDB because it's an Apache project), but there could be others that make sense to include core support. The JPA Appender, in theory, works. However, there's a bug ( https://hibernate.atlassian.net/browse/HHH-8111 ) that's blocking the unit tests from passing. When that bug is fixed and Hibernate 4.3.0.beta3 is released (May 29), I'll should be able to get those tests passing. For now, they're @Ignored. So, in theory, we can probably mark it resolved, unless someone feels the status of the JPA Appender is still too uncertain.
        Hide
        Gary Gregory added a comment -

        Leave it open until the JPA tests are fixed, this is a known hole.

        Show
        Gary Gregory added a comment - Leave it open until the JPA tests are fixed, this is a known hole.
        Hide
        Nick Williams added a comment -

        I have significantly improved the documentation. The JPA Appender isn't proved and won't be until the Hibernate bug is fixed, but the JDBC and NoSQL Appenders should be good to do. As far as I'm concerned, we're at a good point for beta7.

        Show
        Nick Williams added a comment - I have significantly improved the documentation. The JPA Appender isn't proved and won't be until the Hibernate bug is fixed, but the JDBC and NoSQL Appenders should be good to do. As far as I'm concerned, we're at a good point for beta7.
        Hide
        Asaf Erlich added a comment -

        Hello, I have never posted here before. I was following the documentation and in it the "DriverManager" under "JDBCAppender" still says "jdbcUrl" instead of just "url". It has been changed (I noticed the comment above requesting the change) and I get an error for "invalid element or attribute "jdbcUrl"" unless I change it to "url". It is only the documentation that needs to be updated.

        Show
        Asaf Erlich added a comment - Hello, I have never posted here before. I was following the documentation and in it the "DriverManager" under "JDBCAppender" still says "jdbcUrl" instead of just "url". It has been changed (I noticed the comment above requesting the change) and I get an error for "invalid element or attribute "jdbcUrl"" unless I change it to "url". It is only the documentation that needs to be updated.
        Hide
        Gary Gregory added a comment -

        Good find! Thank you.

        commit -m "[LOG4J2-229] New JDBC, JPA, and NoSQL database Appenders. Match example in documentation to code.  https://issues.apache.org/jira/browse/LOG4J2-229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13689548#comment-13689548" C:/vcs/svn/apache/log4j2/trunk/src/site/xdoc/manual/appenders.xml
            Sending        C:/vcs/svn/apache/log4j2/trunk/src/site/xdoc/manual/appenders.xml
            Transmitting file data ...
            Committed revision 1495195.
        
        Show
        Gary Gregory added a comment - Good find! Thank you. commit -m "[LOG4J2-229] New JDBC, JPA, and NoSQL database Appenders. Match example in documentation to code. https://issues.apache.org/jira/browse/LOG4J2-229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13689548#comment-13689548" C:/vcs/svn/apache/log4j2/trunk/src/site/xdoc/manual/appenders.xml Sending C:/vcs/svn/apache/log4j2/trunk/src/site/xdoc/manual/appenders.xml Transmitting file data ... Committed revision 1495195.
        Hide
        Nick Williams added a comment -

        This is completed. Tested the JPAAppender with the EclipseLink reference implementation instead of Hibernate ORM 4.3, which is buggy and incomplete.

        Show
        Nick Williams added a comment - This is completed. Tested the JPAAppender with the EclipseLink reference implementation instead of Hibernate ORM 4.3, which is buggy and incomplete.
        Hide
        Remko Popma added a comment - - edited

        I'm seeing 2 failing JUnit tests that break the build.
        Is this test doing

        assertEquals(ex, otherEx)

        on two throwables by any chance? I don't think that would succeed unless the two operands are the same object.

        Failed tests:
          JPAAppenderTest.testBaseJpaEntityAppender:192 The exception column is not correct (2). expected:<...ption: Hello, world![
                at org.apache.logging.log4j.core.appender.db.jpa.JPAAppenderTest.testBaseJpaEntityAppender(JPAAppenderTest.java:154)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
                at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
                at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
                at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
                at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
                at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
                at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
                at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
                at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
                at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
                at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
                at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
                at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
                at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
                at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159)
                at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87)
                at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
        ]       at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)
        > but was:<...ption: Hello, world![
                at org.apache.logging.log4j.core.appender.db.jpa.JPAAppenderTest.testBaseJpaEntityAppender(JPAAppenderTest.java:154)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
                at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
                at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
                at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
                at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
                at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
                at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
                at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
                at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
                at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
                at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
                at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
                at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
                at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
                at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159)
                at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87)
                at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
                at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)]
        >
          JPAAppenderTest.testBasicJpaEntityAppender:254 The exception column is not correct (2). expected:<...oodbye, cruel world![
                at org.apache.logging.log4j.core.appender.db.jpa.JPAAppenderTest.testBasicJpaEntityAppender(JPAAppenderTest.java:216)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
                at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
                at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
                at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
                at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
                at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
                at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
                at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
                at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
                at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
                at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
                at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
                at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
                at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
                at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159)
                at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87)
                at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
        ]       at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)
        > but was:<...oodbye, cruel world![
                at org.apache.logging.log4j.core.appender.db.jpa.JPAAppenderTest.testBasicJpaEntityAppender(JPAAppenderTest.java:216)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
                at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
                at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
                at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
                at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
                at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
                at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
                at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
                at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
                at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
                at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
                at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
                at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
                at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
                at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159)
                at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87)
                at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
                at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)]
        >
        
        Show
        Remko Popma added a comment - - edited I'm seeing 2 failing JUnit tests that break the build. Is this test doing assertEquals(ex, otherEx) on two throwables by any chance? I don't think that would succeed unless the two operands are the same object. Failed tests: JPAAppenderTest.testBaseJpaEntityAppender:192 The exception column is not correct (2). expected:<...ption: Hello, world![ at org.apache.logging.log4j.core.appender.db.jpa.JPAAppenderTest.testBaseJpaEntityAppender(JPAAppenderTest.java:154) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) ] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95) > but was:<...ption: Hello, world![ at org.apache.logging.log4j.core.appender.db.jpa.JPAAppenderTest.testBaseJpaEntityAppender(JPAAppenderTest.java:154) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)] > JPAAppenderTest.testBasicJpaEntityAppender:254 The exception column is not correct (2). expected:<...oodbye, cruel world![ at org.apache.logging.log4j.core.appender.db.jpa.JPAAppenderTest.testBasicJpaEntityAppender(JPAAppenderTest.java:216) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) ] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95) > but was:<...oodbye, cruel world![ at org.apache.logging.log4j.core.appender.db.jpa.JPAAppenderTest.testBasicJpaEntityAppender(JPAAppenderTest.java:216) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)] >
        Hide
        Nick Williams added a comment -

        Remko,

        This doesn't make any sense. First, there's no difference between those two exceptions, so I don't see why the tests would even fail. They're identical. Second, I can't get these tests to fail on my machine. They pass every time, very consistently. And, no, I'm not using assertEquals on two exceptions. I'm printing the stack trace for the exception to a String variable and comparing what's in the variable.

        scratches head

        Show
        Nick Williams added a comment - Remko, This doesn't make any sense. First, there's no difference between those two exceptions, so I don't see why the tests would even fail. They're identical. Second, I can't get these tests to fail on my machine. They pass every time, very consistently. And, no, I'm not using assertEquals on two exceptions. I'm printing the stack trace for the exception to a String variable and comparing what's in the variable. scratches head
        Hide
        Nick Williams added a comment -

        Are you using Windows? It just occurred to me that I may be getting bit by newlines. I'm going to check in a change that might fix it. I won't be able to test the fix since I don't see the problem, so can you test it after I check it in?

        Show
        Nick Williams added a comment - Are you using Windows? It just occurred to me that I may be getting bit by newlines. I'm going to check in a change that might fix it. I won't be able to test the fix since I don't see the problem, so can you test it after I check it in?
        Hide
        Remko Popma added a comment -

        Yes, I'm using windows. Sure I can test after you commit, no problem.

        Show
        Remko Popma added a comment - Yes, I'm using windows. Sure I can test after you commit, no problem.
        Hide
        Nick Williams added a comment -

        Okay, I committed r1500562. If the problem was what I think it was, that should fix it. Tests still pass on my machine like they always have.

        Darn line endings. Why does Microsoft always refuse to follow a standard?

        Show
        Nick Williams added a comment - Okay, I committed r1500562. If the problem was what I think it was, that should fix it. Tests still pass on my machine like they always have. Darn line endings. Why does Microsoft always refuse to follow a standard?
        Hide
        Remko Popma added a comment -

        Nick, I think that worked. Thanks for the quick response!

        The build is now failing on

        Failed tests:
          FastRollingFileManagerTest.testFileTimeBasedOnSystemClockWhenAppendIsFalse:141 null
        

        That's my test! How dare it fail there!

        Show
        Remko Popma added a comment - Nick, I think that worked. Thanks for the quick response! The build is now failing on Failed tests: FastRollingFileManagerTest.testFileTimeBasedOnSystemClockWhenAppendIsFalse:141 null That's my test! How dare it fail there!
        Hide
        Nick Williams added a comment -

        Yea, that one's not my doing.

        I would note, though, that this test also passes on my machine (Mac OS X, Java 1.6.0_45).

        Show
        Nick Williams added a comment - Yea, that one's not my doing. I would note, though, that this test also passes on my machine (Mac OS X, Java 1.6.0_45).

          People

          • Assignee:
            Nick Williams
            Reporter:
            Nick Williams
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 168h
              168h
              Remaining:
              Remaining Estimate - 168h
              168h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development