Hitachi Vantara Pentaho Community Forums
Results 1 to 10 of 10

Thread: Intermittent error: Exception while loading class

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Intermittent error: Exception while loading class

    Hello:

    I am getting this error most of the time when I run this job. It seems to work most often (but not always) from the Pentaho Designer, and never seems to work when I run the job from a batch file. Here is a sample of the log. The driver for the table input which is failing is net.sourceforge.jtds.jdbc.Driver, which is pointing to a SQL Server. Pentaho is version 4.2. Since it works sometimes obviously the variable is o.k and the class does exist.

    Code:
    INFO  02-06 22:35:49,717 - write_to_csv_files - Dispatching started for transformation [write_to_csv_files]
    ERROR 02-06 22:35:49,763 - dm_get_prev_quarter - An error occurred, processing will be stopped: 
    Error occured while trying to connect to the database
    
    
    Exception while loading class
    ${CON_DM_DRIVER}
    
    
    
    
    ERROR 02-06 22:35:49,764 - dm_get_prev_month - An error occurred, processing will be stopped: 
    Error occured while trying to connect to the database
    
    
    Exception while loading class
    ${CON_DM_DRIVER}
    
    
    
    
    ERROR 02-06 22:35:49,765 - dm_get_prev_week - An error occurred, processing will be stopped: 
    Error occured while trying to connect to the database
    
    
    Exception while loading class
    ${CON_DM_DRIVER}
    
    
    
    
    ERROR 02-06 22:35:49,765 - dm_get_prev_month - Error initializing step [dm_get_prev_month]
    ERROR 02-06 22:35:49,765 - dm_get_prev_week - Error initializing step [dm_get_prev_week]
    ERROR 02-06 22:35:49,765 - dm_get_prev_quarter - Error initializing step [dm_get_prev_quarter]
    ERROR 02-06 22:35:49,766 - write_to_csv_files - Step [dm_get_prev_month.0] failed to initialize!
    ERROR 02-06 22:35:49,766 - write_to_csv_files - Step [dm_get_prev_quarter.0] failed to initialize!
    ERROR 02-06 22:35:49,766 - write_to_csv_files - Step [dm_get_prev_week.0] failed to initialize!
    INFO  02-06 22:35:49,766 - dm_get_prev_month - Finished reading query, closing connection.
    INFO  02-06 22:35:49,766 - dm_get_prev_quarter - Finished reading query, closing connection.
    INFO  02-06 22:35:49,767 - dm_get_prev_week - Finished reading query, closing connection.
    ERROR 02-06 22:35:49,775 - write_to_csv_files - Unable to prepare for execution of the transformation
    ERROR 02-06 22:35:49,775 - write_to_csv_files - org.pentaho.di.core.exception.KettleException: 
    We failed to initialize at least one step.  Execution can not begin!

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    In spite of your firm believe, the variable named CON_DM_DRIVER isn't resolved:

    Code:
    Exception while loading class
    ${CON_DM_DRIVER}
    So long, and thanks for all the fish.

  3. #3

    Default

    You are right--the database connection had "CON_DM_DRIVER" the the config file and etl sets "CONN_DM_DRIVER". (me stoopid!) When I ran it locally it would work usually because I had set the "CON" var already during testing so it didn't matter it was not getting that from the config file. So there were two issues and I was conflating the two.

    There still is a database connection issue though, but will need to see the error again, I don't have it in saved log files, just in the designer, and it has been working fine. Will keep you posted.

  4. #4

    Default

    So the issue here seems to be if I run it after I haven't run it for awhile, I get:

    Code:
    INFO  03-06 05:13:34,209 - write_to_csv_files - Dispatching started for transformation [write_to_csv_files]
    ERROR 03-06 05:13:40,349 - dm_get_prev_week - An error occurred, processing will be stopped: 
    Error occured while trying to connect to the database
    
    
    Error connecting to database: (using class net.sourceforge.jtds.jdbc.Driver)
    Unable to get information from SQL Server: SQLSERVER1.
    
    
    
    
    ERROR 03-06 05:13:40,349 - dm_get_prev_month - An error occurred, processing will be stopped: 
    Error occured while trying to connect to the database
    
    
    Error connecting to database: (using class net.sourceforge.jtds.jdbc.Driver)
    Unable to get information from SQL Server: SQLSERVER1.
    
    
    
    
    ERROR 03-06 05:13:40,350 - dm_get_prev_week - Error initializing step [dm_get_prev_week]
    Usually if I run after that it runs. I have a solid connection to SQL Server--pings come back solidly. Any idea where to look for the issue?

  5. #5
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Could be a problem with name resolution or anything else.
    Don't you have a java stacktrace for this?
    So long, and thanks for all the fish.

  6. #6

    Default

    I tried using IP address instead of server name and same result--works sometimes and doesn't work other times. Here is the full trace:

    Code:
    WARNING: Using java from path
    DEBUG: _PENTAHO_JAVA_HOME=
    DEBUG: _PENTAHO_JAVA=java.exe
    INFO  03-06 07:35:47,199 - Kitchen - Logging is at level : Basic logging
    INFO  03-06 07:35:47,199 - Kitchen - Start of run.
    INFO  03-06 07:35:47,387 - cms_to_csv_NMIS_batch - Start of job execution
    INFO  03-06 07:35:47,387 - cms_to_csv_NMIS_batch - Starting entry [config_get_cmd]
    INFO  03-06 07:35:47,390 - config_get_cmd - Loading transformation from XML file [file:///D:/Apps/my_app/etl/get_cmd.ktr]
    INFO  03-06 07:35:47,494 - get_cmd - Dispatching started for transformation [get_cmd]
    INFO  03-06 07:35:47,557 - get cmd args - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
    INFO  03-06 07:35:47,558 - set env vars - Setting environment variables...
    INFO  03-06 07:35:47,559 - set env vars - Set variable CONFIG_FILE to value [D:\Apps\my_app\config\dm_to_csv_config.xml]
    INFO  03-06 07:35:47,563 - set env vars - Finished after 1 rows.
    INFO  03-06 07:35:47,563 - set env vars - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
    INFO  03-06 07:35:47,579 - cms_to_csv_NMIS_batch - Starting entry [config_get_dm_conn]
    INFO  03-06 07:35:47,579 - config_get_dm_conn - Loading transformation from XML file [file:///D:/Apps/my_app/etl/get_cms_dm_location.ktr]
    INFO  03-06 07:35:47,601 - get_cms_dm_location - Dispatching started for transformation [get_cms_dm_location]
    INFO  03-06 07:35:47,801 - read_config_file - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
    INFO  03-06 07:35:47,802 - set vars my_dm - Setting environment variables...
    INFO  03-06 07:35:47,802 - set vars my_dm - Set variable CONN_NAME to value [conn_my_dw]
    INFO  03-06 07:35:47,802 - set vars my_dm - Set variable CONN_DM_USER to value [my_user]
    INFO  03-06 07:35:47,802 - set vars my_dm - Set variable CONN_DM_PWD to value [my_pwd]
    INFO  03-06 07:35:47,803 - set vars my_dm - Set variable CONN_DM_URL to value [jdbc:jtds:sqlserver://10.1.75.121/my_db;instance=SS01P]
    INFO  03-06 07:35:47,803 - set vars my_dm - Set variable CONN_DM_DRIVER to value [net.sourceforge.jtds.jdbc.Driver]
    INFO  03-06 07:35:47,803 - set vars my_dm - Set variable CONN_DB to value [mssql_2008]
    INFO  03-06 07:35:47,806 - get conn rows - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
    INFO  03-06 07:35:47,809 - set vars my_dm - Finished after 1 rows.
    INFO  03-06 07:35:47,809 - set vars my_dm - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
    INFO  03-06 07:35:47,826 - cms_to_csv_NMIS_batch - Starting entry [config_get_output_folders]
    INFO  03-06 07:35:47,826 - config_get_output_folders - Loading transformation from XML file [file:///D:/Apps/my_app/etl/get_csv_output_folders.ktr]
    INFO  03-06 07:35:47,826 - get_csv_output_folders - Dispatching started for transformation [get_csv_output_folders]
    INFO  03-06 07:35:47,831 - get output file paths - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
    INFO  03-06 07:35:47,831 - set output folder vars - Setting environment variables...
    INFO  03-06 07:35:47,832 - set output folder vars - Set variable WEEKLY_CSV to value [\\server1\share\directory1\MTMACCW]
    INFO  03-06 07:35:47,832 - set output folder vars - Set variable MONTHLY_CSV to value [\\server1\share\directory1\MTMACCM]
    INFO  03-06 07:35:47,832 - set output folder vars - Set variable QUARTERLY_CSV to value [\\server1\share\directory1\MTMACCQ]
    INFO  03-06 07:35:47,836 - set output folder vars - Finished after 1 rows.
    INFO  03-06 07:35:47,836 - set output folder vars - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
    INFO  03-06 07:35:47,837 - cms_to_csv_NMIS_batch - Starting entry [write_to_csv_files]
    INFO  03-06 07:35:47,838 - write_to_csv_files - Loading transformation from XML file [file:///D:/Apps/my_app/etl/write_to_csv_files.ktr]
    INFO  03-06 07:35:47,972 - write_to_csv_files - Dispatching started for transformation [write_to_csv_files]
    ERROR 03-06 07:35:54,098 - dm_get_prev_month - An error occurred, processing will be stopped: 
    Error occured while trying to connect to the database
    
    
    Error connecting to database: (using class net.sourceforge.jtds.jdbc.Driver)
    Unable to get information from SQL Server: 10.1.75.121.
    
    
    
    
    ERROR 03-06 07:35:54,098 - dm_get_prev_quarter - An error occurred, processing will be stopped: 
    Error occured while trying to connect to the database
    
    
    Error connecting to database: (using class net.sourceforge.jtds.jdbc.Driver)
    Unable to get information from SQL Server: 10.1.75.121.
    
    
    
    
    ERROR 03-06 07:35:54,100 - dm_get_prev_quarter - Error initializing step [dm_get_prev_quarter]
    ERROR 03-06 07:35:54,100 - dm_get_prev_month - Error initializing step [dm_get_prev_month]
    ERROR 03-06 07:35:54,100 - write_to_csv_files - Step [dm_get_prev_month.0] failed to initialize!
    ERROR 03-06 07:35:54,101 - write_to_csv_files - Step [dm_get_prev_quarter.0] failed to initialize!
    INFO  03-06 07:35:54,101 - dm_get_prev_month - Finished reading query, closing connection.
    INFO  03-06 07:35:54,101 - dm_get_prev_quarter - Finished reading query, closing connection.
    INFO  03-06 07:35:54,102 - dm_get_prev_week - Finished reading query, closing connection.
    ERROR 03-06 07:35:54,112 - write_to_csv_files - Unable to prepare for execution of the transformation
    ERROR 03-06 07:35:54,112 - write_to_csv_files - org.pentaho.di.core.exception.KettleException: 
    We failed to initialize at least one step.  Execution can not begin!
    
    
    
    
    	at org.pentaho.di.trans.Trans.prepareExecution(Trans.java:784)
    	at org.pentaho.di.trans.Trans.execute(Trans.java:363)
    	at org.pentaho.di.job.entries.trans.JobEntryTrans.execute(JobEntryTrans.java:1024)
    	at org.pentaho.di.job.Job.execute(Job.java:495)
    	at org.pentaho.di.job.Job.execute(Job.java:634)
    	at org.pentaho.di.job.Job.execute(Job.java:634)
    	at org.pentaho.di.job.Job.execute(Job.java:634)
    	at org.pentaho.di.job.Job.execute(Job.java:634)
    	at org.pentaho.di.job.Job.execute(Job.java:360)
    	at org.pentaho.di.job.Job.run(Job.java:288)
    
    
    INFO  03-06 07:35:54,113 - cms_to_csv_NMIS_batch - Finished job entry [write_to_csv_files] (result=[false])
    INFO  03-06 07:35:54,114 - cms_to_csv_NMIS_batch - Finished job entry [config_get_output_folders] (result=[false])
    INFO  03-06 07:35:54,114 - cms_to_csv_NMIS_batch - Finished job entry [config_get_dm_conn] (result=[false])
    INFO  03-06 07:35:54,114 - cms_to_csv_NMIS_batch - Finished job entry [config_get_cmd] (result=[false])
    INFO  03-06 07:35:54,114 - cms_to_csv_NMIS_batch - Job execution finished
    INFO  03-06 07:35:54,114 - Kitchen - Finished!
    ERROR 03-06 07:35:54,129 - Kitchen - Finished with errors
    INFO  03-06 07:35:54,129 - Kitchen - Start=2013/06/03 07:35:47.199, Stop=2013/06/03 07:35:54.129
    INFO  03-06 07:35:54,129 - Kitchen - Processing ended after 6 seconds.

  7. #7
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    OK, still a connection problem, I would say.
    Try to upgrade your driver from version 1.2.5 to version 1.3.0
    Try to use another jTDS client to see if the problem persists.
    Enable logging in the driver and see if you get information there.
    And don't do it all at once
    So long, and thanks for all the fish.

  8. #8

    Default

    I dropped the 1.3 jar file in the libext\JDBC directory, renamed the 1.25 to .jarold, and restarted Pentaho designer. Now if I do a test connect on the database connection nothing happens, and if I try to preview the table input I get:

    We failed to initialize at least one step. Execution can not begin!

    Am I missing a step? Is there somewhere in Pentaho to point to the correct driver?

  9. #9

    Default

    Any idea on this?

  10. #10
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    The driver is in the right place.
    Keep it or drop it.

    Tell something more about the server configuration.
    Since you are using a named instance, any chance dynamic ports are used?
    So long, and thanks for all the fish.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.