Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: loader constraint violation - KettleURLClassLoader Job Plugin

  1. #1

    Default loader constraint violation - KettleURLClassLoader Job Plugin

    Hi!
    I've had issues where my job plugins that run through spoon 3.2.3 would not run when tried to execute them on carte. I then attempted to upgrade the job plugin to 4.0.1 CE. Now when I attempt to run it through spoon I get the error listed at the bottom of this post.

    I've tried to debug the start up of spoon and it initially loads the class with sun.misc.Launcher$AppClassLoader@fabe9. Am I missing something?

    ERROR 26-08 09:41:42,689 - Error invoking method: jobgraph.runJob()
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:325)
    at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:131)
    at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:119)
    at org.pentaho.ui.xul.swt.tags.SwtToolbarbutton.access$100(SwtToolbarbutton.java:36)
    at org.pentaho.ui.xul.swt.tags.SwtToolbarbutton$1.widgetSelected(SwtToolbarbutton.java:83)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1147)
    at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:6627)
    at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:544)
    Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of org/pentaho/di/core/plugins/KettleURLClassLoader) previously initiated loading for a different type with name "org/w3c/dom/Node"
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at org.pentaho.di.core.plugins.KettleURLClassLoader.loadClass(KettleURLClassLoader.java:68)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
    at java.lang.Class.getDeclaredMethods(Class.java:1791)
    at org.pentaho.di.core.reflection.StringSearcher.findMethod(StringSearcher.java:205)
    at org.pentaho.di.core.reflection.StringSearcher.findMetaData(StringSearcher.java:106)
    at org.pentaho.di.job.JobMeta.getStringList(JobMeta.java:1926)
    at org.pentaho.di.job.JobMeta.getUsedVariables(JobMeta.java:1962)
    at org.pentaho.di.job.JobExecutionConfiguration.getUsedVariables(JobExecutionConfiguration.java:241)
    at org.pentaho.di.ui.spoon.delegates.SpoonJobDelegate.executeJob(SpoonJobDelegate.java:1413)
    at org.pentaho.di.ui.spoon.Spoon.executeJob(Spoon.java:7190)
    at org.pentaho.di.ui.spoon.Spoon.executeFile(Spoon.java:7162)
    at org.pentaho.di.ui.spoon.Spoon.runFile(Spoon.java:7136)
    at org.pentaho.di.ui.spoon.job.JobGraph.runJob(JobGraph.java:2940)
    ... 17 more
    ERROR 26-08 09:41:42,691 - Error calling oncommand event
    org.pentaho.ui.xul.XulException: Error invoking method: jobgraph.runJob()
    at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:329)
    at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:131)
    at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:119)
    at org.pentaho.ui.xul.swt.tags.SwtToolbarbutton.access$100(SwtToolbarbutton.java:36)
    at org.pentaho.ui.xul.swt.tags.SwtToolbarbutton$1.widgetSelected(SwtToolbarbutton.java:83)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1147)
    at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:6627)
    at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:544)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:325)
    ... 12 more
    Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of org/pentaho/di/core/plugins/KettleURLClassLoader) previously initiated loading for a different type with name "org/w3c/dom/Node"
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at org.pentaho.di.core.plugins.KettleURLClassLoader.loadClass(KettleURLClassLoader.java:68)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
    at java.lang.Class.getDeclaredMethods(Class.java:1791)
    at org.pentaho.di.core.reflection.StringSearcher.findMethod(StringSearcher.java:205)
    at org.pentaho.di.core.reflection.StringSearcher.findMetaData(StringSearcher.java:106)
    at org.pentaho.di.job.JobMeta.getStringList(JobMeta.java:1926)
    at org.pentaho.di.job.JobMeta.getUsedVariables(JobMeta.java:1962)
    at org.pentaho.di.job.JobExecutionConfiguration.getUsedVariables(JobExecutionConfiguration.java:241)
    at org.pentaho.di.ui.spoon.delegates.SpoonJobDelegate.executeJob(SpoonJobDelegate.java:1413)
    at org.pentaho.di.ui.spoon.Spoon.executeJob(Spoon.java:7190)
    at org.pentaho.di.ui.spoon.Spoon.executeFile(Spoon.java:7162)
    at org.pentaho.di.ui.spoon.Spoon.runFile(Spoon.java:7136)
    at org.pentaho.di.ui.spoon.job.JobGraph.runJob(JobGraph.java:2940)
    ... 17 more

  2. #2
    Join Date
    Sep 2009
    Posts
    810

    Default

    Hi there,

    you might be providing jar's with your plugin that kettle 4.0 already has in its libext folder. It sounds to me like you were bundling some XML-related API with your plugin, and it fails to load because the plugin would then see Kettle's version of the lib (from libext somewhere) and the plugin's version of the lib (from your plugin directory). Thus the class loader fails with an error, because it will not overwrite class definitions...

    Hope that helps with your debugging

    Cheers

    Slawo

  3. #3

    Default

    Hi Slawo,
    Thats exactly what the problem was - I got past the above exception by removing tidy.jar from my plugin as the class is already present in xml-apis.jar. In Spoon 3.2.3 this was not throwing any exceptions but obviously the changes in 4 were. My next challenge is getting it working on carte and then running it from Jboss 5...so any pointers more than welcome!
    Thanks!
    Last edited by JosephineSoap; 08-27-2010 at 06:13 AM.

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.