Hitachi Vantara Pentaho Community Forums
Results 1 to 14 of 14

Thread: problem saving mapping input specification into MySQL repository

  1. #1
    Join Date
    Nov 2007
    Posts
    12

    Default problem saving mapping input specification into MySQL repository

    Hi,

    I tried to design a subtransformation with an input mapping containing two integer fields. While saving this transformation into db repository (MySQL 5.0) I always got this exception:

    java.lang.reflect.InvocationTargetException: Error saving transformation: org.pentaho.di.core.exception.KettleException:
    Error saving transformation to repository!

    Error updating batch
    Duplicate entry '271-field_precision-0' for key 2


    at org.pentaho.di.ui.spoon.dialog.SaveProgressDialog$1.run(SaveProgressDialog.java:71)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
    Caused by: org.pentaho.di.core.exception.KettleException:
    Error saving transformation to repository!

    Error updating batch
    Duplicate entry '271-field_precision-0' for key 2


    at org.pentaho.di.trans.TransMeta.saveRep(TransMeta.java:1925)
    at org.pentaho.di.ui.spoon.dialog.SaveProgressDialog$1.run(SaveProgressDialog.java:67)
    ... 1 more
    Caused by: org.pentaho.di.core.exception.KettleDatabaseBatchException:
    Error updating batch
    Duplicate entry '271-field_precision-0' for key 2

    at org.pentaho.di.core.database.Database.insertFinished(Database.java:1416)
    at org.pentaho.di.repository.Repository.closeStepAttributeInsertPreparedStatement(Repository.java:3161)
    at org.pentaho.di.trans.TransMeta.saveRep(TransMeta.java:1832)
    ... 2 more
    Caused by: java.sql.BatchUpdateException: Duplicate entry '271-field_precision-0' for key 2
    at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:652)
    at org.pentaho.di.core.database.Database.insertFinished(Database.java:1400)
    ... 4 more

    When I remove the Mapping Input Specification step (or at least all its fields) everything works fine.

    The repository was created with the Spoon from 2.5.1 package. Then it was upgraded with Spoon from 3.0.0 GA and the transformation was created with the 3.0.0 GA package. Is it error or am I doing something wrong?

    Petr

  2. #2
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Sorry about that, it's a bug that got fixed in the mean time though.
    I'll give you a patch, hang on.

  3. #3
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Download these 2 files and replace the ones in the lib/ directory:

    http://kettle3.s3.amazonaws.com/kettle-ui-swt-3.0.jar
    http://kettle3.s3.amazonaws.com/kettle-engine-3.0.jar

    Let me know if this fixes things for you,

    HTH,

    Matt

  4. #4
    Join Date
    Nov 2007
    Posts
    12

    Default

    Hello,

    thank you for this very quick fix. Unfortunately after replacing the files in the lib/ directory I cannot start Spoon because of this exception:

    Exception in thread "main" java.lang.NoClassDefFoundError: org/pentaho/versionchecker/IVersionCheckDataProvider
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
    at java.lang.Class.getConstructor0(Class.java:2699)
    at java.lang.Class.newInstance0(Class.java:326)
    at java.lang.Class.newInstance(Class.java:308)
    at org.pentaho.di.ui.spoon.Spoon.initListeners(Spoon.java:6509)
    at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:370)


    I cannot found mentioned class even in the original jars. Maybe I need some additional jar containing this new class? My current version is 3.0.0 GA.

    Petr

  5. #5
    Join Date
    May 2006
    Posts
    4,882

    Default

    Also put following jar file

    http://kettle.pentaho.org/svn/Kettle...ionchecker.jar

    in the libext directory.

    Regards,
    Sven

  6. #6
    Join Date
    Nov 2007
    Posts
    12

    Default

    Hi,

    thank you for the VersionChecker jar package. It solved the previous exception even I still got following message during the Spoon start:

    org.apache.commons.vfs.FileSystemException: Could not read from "file:///home/pema/opt/pentaho/kettle-3.0.0.GA/build-res/version.properties" because it is a not a file

    It could be skipped by the OK button. The mapping input specification now can be saved without any error messages.

    But another problem arrised: I edited an transformation and I cannot save it due to following error:

    java.lang.reflect.InvocationTargetException: Error saving transformation: org.pentaho.di.core.exception.KettleException:
    Error saving transformation to repository!

    Couldn't execute SQL: DELETE FROM R_TRANS_PARTITION_SCHEMA WHERE ID_TRANSFORMATION = 15

    Unknown column 'ID_TRANSFORMATION' in 'where clause'


    at org.pentaho.di.ui.spoon.dialog.SaveProgressDialog$1.run(SaveProgressDialog.java:72)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
    Caused by: org.pentaho.di.core.exception.KettleException:
    Error saving transformation to repository!

    Couldn't execute SQL: DELETE FROM R_TRANS_PARTITION_SCHEMA WHERE ID_TRANSFORMATION = 15

    Unknown column 'ID_TRANSFORMATION' in 'where clause'


    at org.pentaho.di.trans.TransMeta.saveRep(TransMeta.java:1930)
    at org.pentaho.di.ui.spoon.dialog.SaveProgressDialog$1.run(SaveProgressDialog.java:68)
    ... 1 more
    Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
    Couldn't execute SQL: DELETE FROM R_TRANS_PARTITION_SCHEMA WHERE ID_TRANSFORMATION = 15

    Unknown column 'ID_TRANSFORMATION' in 'where clause'

    at org.pentaho.di.core.database.Database.execStatement(Database.java:1510)
    at org.pentaho.di.core.database.Database.execStatement(Database.java:1456)
    at org.pentaho.di.repository.Repository.delPartitionSchemas(Repository.java:3597)
    at org.pentaho.di.repository.Repository.delAllFromTrans(Repository.java:3859)
    at org.pentaho.di.trans.TransMeta.saveRep(TransMeta.java:1789)
    ... 2 more
    Caused by: java.sql.SQLException: Unknown column 'ID_TRANSFORMATION' in 'where clause'
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2975)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1600)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1695)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:3020)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2949)
    at com.mysql.jdbc.Statement.execute(Statement.java:538)
    at org.pentaho.di.core.database.Database.execStatement(Database.java:1479)
    ... 6 more

    Petr

  7. #7
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Upgrade your repository. The fix for your problem is also in the updated jar files you have.

    Sorry for the version checker stupidity. It got committed too soon by one of the developers.

    Matt

  8. #8
    Join Date
    Nov 2007
    Posts
    12

    Default finally it works

    Hello,

    after upgrading the repository Spoon finally works fine. Thank you!

    Petr

  9. #9
    Join Date
    Nov 2008
    Posts
    777

    Default Problem Saving Transformation in MySQL Repo

    I am getting the same error when saving a transformation with an XML Join step in it to a MySQL repository.


    Error saving transformation to repository!
    Error updating batch
    Duplicate entry '930-encoding-0' for key 2

    If I delete the XML Join step, the save works.

    I see you have posted a work-around but that was quite a while ago. I am using pdi-open-3.1.0-826. Does that work-around still apply? If so, you advise to upgrade the repository. How exactly do I do that?
    Last edited by darrell.nelson; 12-17-2008 at 12:57 PM.

  10. #10
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    No that fix obviously does not apply against version 3.1.0-GA.
    You need to get version 3.1.1 or later to fix it. Since 3.1.1 has not been CE'ed yet I suggest you build yourself.

    Matt

  11. #11
    Join Date
    Nov 2008
    Posts
    777

    Question Build?

    Ugh! Not sure I want to do that. Are there instruction on how to get the source and build it?

    Quote Originally Posted by MattCasters View Post
    No that fix obviously does not apply against version 3.1.0-GA.
    You need to get version 3.1.1 or later to fix it. Since 3.1.1 has not been CE'ed yet I suggest you build yourself.

    Matt

  12. #12
    Join Date
    May 2006
    Posts
    4,882

    Default

    Daily builds for 3.1.1 at ftp://download.pentaho.org/client/da...gration/3.1.1/

    If you want to extract yourself, that's described somewhere in the FAQs but daily builds should suffice for you probably.

    Regards,
    Sven

  13. #13
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Pentaho is currently revising its complete build strategy, going for Ivy etc.
    The current Cruise Control nightly builds will vanish as well. It was simply too much work to keep them running properly. For example, the 3.1.1 builds you refer to are actually 3.2.0-M1 builds, simply mislabeled.
    We will be switching to Hudson, doing continuous integration etc.

    At the moment Pentaho produces over 80 jar files from various projects (3 from PDI). The BI Server alone consists of some 20 separate projects now.
    Something had to give in the end. Let's hope the situation regulates itself over time.

    Matt

  14. #14
    Join Date
    Nov 2008
    Posts
    777

    Thumbs up Thanks!

    Thanks for your help Matt/sboden. I'm a power user not a system developer but I will give it the ol' college try. PDI is a great piece of software so I don't want this little bug fowling the air.

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.