Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Carte Web Services

  1. #1
    Join Date
    May 2007
    Posts
    24

    Default Carte Web Services

    I am trying to integrate carte in a web application.
    I have my vibed web server running and I would like to use the carte web services to execute transformations and jobs. While I can successfully execute a transformation using "127.0.0.1:8080/kettle/executeTrans?trans=/home/john/tmTests/kettleRepo/test.ktr" I believe the proper way to achieve a performant result would be to load the transformation(s) on start up and then run them. I have tried "127.0.0.1:8080/kettle/addTrans?xml=N" and this produces the following result. The attached file is the xml I am using in the body of the post. Any guidance or link to some examples would be sincerely appreciated.
    Thanks

    <HTML>
    <HEAD>
    <TITLE>Add transformation</TITLE>
    </HEAD>
    <BODY>
    <p>
    <pre>
    java.lang.NegativeArraySizeException
    at java.lang.AbstractStringBuilder.
    <init>(AbstractStringBuilder.java:68)
    at java.lang.StringBuilder.
    <init>(StringBuilder.java:101)
    at org.pentaho.di.http://www.AddTransServlet.doGet(Add...vlet.java:185)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
    at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:522)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:370)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
    at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
    at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
    at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
    at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
    at java.lang.Thread.run(Thread.java:745)


    </pre>
    <p>
    </BODY>
    </HTML>
    Attached Files Attached Files

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

    Default

    Did you try /addTrans with a simpler transformation?
    You can add your Report later, and output redirection as soon as the Report is run successfully.

    BTW: Documentation says you should use registerTrans instead of addTrans - addTrans is deprecated since version 6.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    May 2007
    Posts
    24

    Default

    Marabu,

    I tried the registerTrans service with no better result using the same xml. The I tried a simpler transformation and still encountered an error which indicates that the fault was a premature eof.

    The xml used is an exact copy of the .ktr file and using the https://www.w3schools.com/xml/xml_validator.asp indicated the file contained valid xml.

    Are there any samples available. Looking at the xml i could not find the execution or configuration tags required according to the documentation.

    Thanks for quick response and the I appreciate any assistance you can provide.

    John

  4. #4
    Join Date
    May 2007
    Posts
    24

    Default

    Too anyone who finds the post,
    I was using the wrong URL which had an error in the path. Secondly, as pointed out by Marabu I should be using registerTrans instead of addTrans. And lastly what was not clear to my experience person is the .ktr file xml simply must be enclosed with a
    <tansformation_configuration> .........</transformation_configuration>
    tag.

Tags for this Thread

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.