Uploaded image for project: 'Talend DI components'
  1. Talend DI components
  2. TDI-36364

MongoDB 2.6.4 throwing invalid error after data commit is completed when log4j is activated

Apply templateInsert Lucidchart Diagram
    XMLWordPrintable

Details

    • Bug
    • Status: closed
    • Major
    • Resolution: Fixed
    • None
    • 5.6.1, 6.0.0
    • Components
    • None
    • Hide

      Turn on Log4J,
      Create a simple job to import data into mongodb using component mongodb 2.6.4.
      Run the job, you will see the log4j error occurs at the end of the run and forces mongodb import job to exit with code 1. Checking the mongodb database, you can see the records in it. So therefore this error from log4j should be changed to exit 0 perhaps if mongodb does not error.

      Show
      Turn on Log4J, Create a simple job to import data into mongodb using component mongodb 2.6.4. Run the job, you will see the log4j error occurs at the end of the run and forces mongodb import job to exit with code 1. Checking the mongodb database, you can see the records in it. So therefore this error from log4j should be changed to exit 0 perhaps if mongodb does not error.
    • Talend Platform for MDM with Big Data
    • yes
    • 1.7
    • x86-64
    • EE
    • Windows 7

    Description

      When you try importing data to MongoDB using 2.6.4 component and the Log4j is activated, then you get an exit code of 1 after the job completion. The data gets commited to MongoDB but the exit code shows 1. See below;

      "Starting job No_SQL_MongoDB at 12:58 05/11/2014.

      log4j:WARN Continuable parsing error 34 and column 23
      log4j:WARN The content of element type "log4j:configuration" must match "(renderer*,appender*,plugin*,(category|logger)*,root?,(categoryFactory|loggerFactory)?)".
      log4j:ERROR Could not connect to remote log4j server at [localhost]. We will try again later.
      [INFO ]: hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB - TalendJob: 'No_SQL_MongoDB' - Start.
      [statistics] connecting to socket on port 3783
      [statistics] connected
      [INFO ]: hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB - tMongoDBOutput_1 - Start to work.
      [INFO ]: hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB - tMongoDBOutput_1 - Connecting to [192.168.1.1:27017].
      [INFO ]: hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB - tMongoDBOutput_1 - Start to write data into database [testuk500].
      [INFO ]: hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB - tMysqlInput_1 - Start to work.
      [INFO ]: hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB - tMysqlInput_1 - Connection attempt to 'jdbc:mysql://localhost:3306/uk500?noDatetimeStringSync=true' with the username 'root'.
      [INFO ]: hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB - tMysqlInput_1 - Connection to 'jdbc:mysql://localhost:3306/uk500?noDatetimeStringSync=true' has succeeded.
      [INFO ]: hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB - tMysqlInput_1 - Executing the query: 'SELECT
      `sample_uk500`.`first_name`,
      `sample_uk500`.`last_name`,
      `sample_uk500`.`company_name`,
      `sample_uk500`.`address`,
      `sample_uk500`.`city`,
      `sample_uk500`.`county`,
      `sample_uk500`.`postal`,
      `sample_uk500`.`phone1`,
      `sample_uk500`.`phone2`,
      `sample_uk500`.`email`,
      `sample_uk500`.`web`
      FROM `sample_uk500`'.
      [INFO ]: hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB - tMysqlInput_1 - Retrieving records from the database.
      [INFO ]: hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB - tMysqlInput_1 - Closing the connection to the database.
      Exception in component tMongoDBOutput_1
      java.lang.IllegalStateException: open
      at org.bson.util.Assertions.isTrue(Assertions.java:36)
      at com.mongodb.DBTCPConnector.getServerAddressList(DBTCPConnector.java:353)
      at com.mongodb.Mongo.getServerAddressList(Mongo.java:497)
      at hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB.tMysqlInput_1Process(No_SQL_MongoDB.java:1401)
      at hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB.runJobInTOS(No_SQL_MongoDB.java:1704)
      at hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB.main(No_SQL_MongoDB.java:1538)
      [INFO ]: hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB - tMysqlInput_1 - Connection to the database closed.
      [INFO ]: hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB - tMysqlInput_1 - Retrieved records count: 500 .
      [INFO ]: hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB - tMysqlInput_1 - Done.
      [INFO ]: hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB - tMongoDBOutput_1 - Has been inserted 500 records.
      [INFO ]: hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB - tMongoDBOutput_1 - Closing the connection [192.168.1.1:27017].
      [FATAL]: hk_test_hellweekserver.no_sql_mongodb_0_1.No_SQL_MongoDB - tMongoDBOutput_1 open
      [statistics] disconnected
      Job No_SQL_MongoDB ended at 12:58 05/11/2014. [exit code=1]"

      Attachments

        Activity

          People

            pteyssier pierre teyssier
            hitesh_karsan Hitesh Karsan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h