Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Exception in thread "main" java.lang.NoSuchMethodError: method java.lang.Class.asSubc

  1. #1

    Default Exception in thread "main" java.lang.NoSuchMethodError: method java.lang.Class.asSubc

    Hi All,
    I have PDI3.2 running on Linux platform.When I login as one user run a job using shell script it executes successfully. But when I login as "root" user run the same the shell script i get the following error. For your reference I have set $JAVA_HOME to jdk1.6/bin directory before running the script. Please help in resolving this issue ASAP.

    java.lang.NoSuchMethodError: method java.lang.Class.asSubclass with signature (Ljava.lang.ClassLjava.lang.Class; was not found.
    at org.pentaho.di.core.config.KettleConfig$2.end(KettleConfig.java:122)
    at org.apache.commons.digester.Digester.endElement(Digester.java:1222)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1827)
    at org.pentaho.di.core.config.KettleConfig.<init>(KettleConfig.java:62)
    at org.pentaho.di.core.config.KettleConfig.getInstance(KettleConfig.java:79)
    at org.pentaho.di.trans.step.BaseStep.<clinit>(BaseStep.java:80)
    at java.lang.Class.initializeClass(libgcj.so.7rh)
    at org.pentaho.di.trans.StepLoader.readNatives(StepLoader.java:125)
    at org.pentaho.di.trans.StepLoader.init(StepLoader.java:110)
    at org.pentaho.di.trans.StepLoader.init(StepLoader.java:120)
    at org.pentaho.di.kitchen.Kitchen.main(Kitchen.java:154)
    Exception in thread "main" java.lang.NoSuchMethodError: method java.lang.Class.asSubclass with signature (Ljava.lang.ClassLjava.lang.Class; was not found.
    at org.pentaho.di.core.config.KettleConfig$2.end(KettleConfig.java:122)
    at org.apache.commons.digester.Digester.endElement(Digester.java:1222)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1827)
    at org.pentaho.di.core.config.KettleConfig.<init>(KettleConfig.java:62)
    at org.pentaho.di.core.config.KettleConfig.getInstance(KettleConfig.java:79)
    at org.pentaho.di.trans.step.BaseStep.<clinit>(BaseStep.java:80)
    at java.lang.Class.initializeClass(libgcj.so.7rh)
    at org.pentaho.di.trans.StepLoader.readNatives(StepLoader.java:125)
    at org.pentaho.di.trans.StepLoader.init(StepLoader.java:110)
    at org.pentaho.di.trans.StepLoader.init(StepLoader.java:120)
    at org.pentaho.di.kitchen.Kitchen.main(Kitchen.java:154)

  2. #2
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Quote Originally Posted by spavankumar06 View Post
    But when I login as "root" user run the same the shell script i get the following error.
    Easy fix: Don't run PDI as root.
    In Unix (and Linux) root should be used only when necessary. Since you say it works as a general user, then you don't need to run it as root.
    **THIS IS A SIGNATURE - IT GETS POSTED ON (ALMOST) EVERY POST**
    I'm no expert.
    Take my comments at your own risk.

    PDI user since PDI 3.1
    PDI on Windows 7 & Linux

    Please keep in mind (and this may not apply to this thread):
    No forum member is going to do your work for you. We will help you sort out how to do a specific part of the work, as best we can, in the timelines that our work will allow us.
    Signature Updated: 2014-06-30

  3. #3

    Default

    The other user don't have privilege to run cron job. I want this job to be scheduled using crontab. Only root user has this privilege. Please help me to resolve this.

  4. #4
    Join Date
    Sep 2009
    Posts
    810

    Default

    Hi there,

    please read this: http://www.linuxhelp.net/guides/cron/ It contains instructions on how to run cron jobs as a different user.
    Check out field 6.

    Cheers

    Slawo

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.