org.eclipse.swt.SWTException

tip

Update "latest" to Java 8 on DockerHub.

tip

This might be caused by and outdated version of Java, SonarQube now uses Java 8 as default. You might upgrade java or use an older version of SonarQube.

tip

You're using an older version of java with classes compiled for java7

tip

If you're using intellij plugin of sonarqube, you might have to set the JAVA_HOME ambient variable manually.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • When double-clicked on the Table Output step, the following error was thrown: "java.lang.UnsupportedClassVersionError: org/osjava/sj/SimpleContextFactory : Unsupported major.minor version 51.0" Steps to reproduce: 1- Open Spoon 2- Open the Transformation located on: data-integration/samples/transformations/Getting\ Started\ Transformation.ktr 3- Double-click output step "Write to Database" (an exception error occurs) {code} org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.UnsupportedClassVersionError: org/osjava/sj/SimpleContextFactory : Unsupported major.minor version 51.0) at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Unknown Source) at org.eclipse.swt.widgets.Display.runAsyncMessages(Unknown Source) at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source) at org.pentaho.di.ui.core.dialog.ErrorDialog.showErrorDialog(ErrorDialog.java:266) at org.pentaho.di.ui.core.dialog.ErrorDialog.<init>(ErrorDialog.java:89) at org.pentaho.di.ui.spoon.delegates.SpoonStepsDelegate.editStep(SpoonStepsDelegate.java:186) at org.pentaho.di.ui.spoon.Spoon.editStep(Spoon.java:8712) at org.pentaho.di.ui.spoon.trans.TransGraph.editStep(TransGraph.java:3061) at org.pentaho.di.ui.spoon.trans.TransGraph.mouseDoubleClick(TransGraph.java:747) at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source) at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.notifyListeners(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:1319) at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7939) at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9190) at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:654) 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.commons.launcher.Launcher.main(Launcher.java:92) Caused by: java.lang.UnsupportedClassVersionError: org/osjava/sj/SimpleContextFactory : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:249) at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.<init>(InitialContext.java:175) at org.pentaho.di.core.database.util.DatabaseUtil.getDataSourceFromJndi(DatabaseUtil.java:77) at org.pentaho.di.core.database.util.DatabaseUtil.getNamedDataSource(DatabaseUtil.java:55) at org.pentaho.di.core.database.Database.connectUsingJNDIDataSource(Database.java:467) at org.pentaho.di.core.database.Database.normalConnect(Database.java:403) at org.pentaho.di.core.database.Database.connect(Database.java:358) at org.pentaho.di.core.database.Database.connect(Database.java:311) at org.pentaho.di.core.database.Database.connect(Database.java:301) at org.pentaho.di.ui.trans.steps.tableoutput.TableOutputDialog$26.run(TableOutputDialog.java:1083) at org.eclipse.swt.widgets.RunnableLock.run(Unknown Source) ... 27 more {code} See the attached screenshot This is a regression, because I have tested it with 5.3 GA and the error didn't occur.
    via by Paula Clemente,
  • When running an existing transformation that worked in 5.2.0, I get the errors below. The errors are related to an Insert/Update step, and seem to be specifically related to initializing the database connection. Creating a new insert/update step using the existing MySQL database connection causes the program to hard crash, as does opening the one in this existing transformation. See reproduction steps for more details. 2015/06/10 13:33:14 - Version checker - OK 2015/06/10 13:33:26 - Spoon - Transformation opened. 2015/06/10 13:33:26 - Spoon - Launching transformation [google_analytics_basic]... 2015/06/10 13:33:26 - Spoon - Started the transformation execution. 2015/06/10 13:33:26 - google_analytics_basic - Dispatching started for transformation [google_analytics_basic] 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - ERROR (version 5.4.0.0-128, build 1 from 2015-06-03_13-41-59 by buildguy) : Error initializing step [Update fct_referral_traffic] 2015/06/10 13:33:26 - Insert / Update.0 - ERROR (version 5.4.0.0-128, build 1 from 2015-06-03_13-41-59 by buildguy) : Error initializing step [Insert / Update] 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - ERROR (version 5.4.0.0-128, build 1 from 2015-06-03_13-41-59 by buildguy) : java.lang.UnsupportedClassVersionError: org/osjava/sj/SimpleContextFactory : Unsupported major.minor version 51.0 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.lang.ClassLoader.defineClass1(Native Method) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.lang.ClassLoader.defineClass(ClassLoader.java:621) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.net.URLClassLoader.access$000(URLClassLoader.java:58) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.net.URLClassLoader$1.run(URLClassLoader.java:197) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.security.AccessController.doPrivileged(Native Method) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.net.URLClassLoader.findClass(URLClassLoader.java:190) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.lang.ClassLoader.loadClass(ClassLoader.java:306) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.lang.ClassLoader.loadClass(ClassLoader.java:247) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.lang.Class.forName0(Native Method) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.lang.Class.forName(Class.java:249) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at javax.naming.InitialContext.init(InitialContext.java:223) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at javax.naming.InitialContext.<init>(InitialContext.java:175) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.core.database.util.DatabaseUtil.getDataSourceFromJndi(DatabaseUtil.java:77) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.core.database.util.DatabaseUtil.getNamedDataSource(DatabaseUtil.java:55) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.core.database.Database.connectUsingNamedDataSource(Database.java:441) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:4691) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.core.database.Database.normalConnect(Database.java:414) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.core.database.Database.connect(Database.java:358) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.core.database.Database.connect(Database.java:311) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.trans.steps.insertupdate.InsertUpdate.init(InsertUpdate.java:480) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.trans.step.StepInitThread.run(StepInitThread.java:69) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.lang.Thread.run(Thread.java:695)
    via by Jason Yau,
  • When running an existing transformation that worked in 5.2.0, I get the errors below. The errors are related to an Insert/Update step, and seem to be specifically related to initializing the database connection. Creating a new insert/update step using the existing MySQL database connection causes the program to hard crash, as does opening the one in this existing transformation. See reproduction steps for more details. 2015/06/10 13:33:14 - Version checker - OK 2015/06/10 13:33:26 - Spoon - Transformation opened. 2015/06/10 13:33:26 - Spoon - Launching transformation [google_analytics_basic]... 2015/06/10 13:33:26 - Spoon - Started the transformation execution. 2015/06/10 13:33:26 - google_analytics_basic - Dispatching started for transformation [google_analytics_basic] 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - ERROR (version 5.4.0.0-128, build 1 from 2015-06-03_13-41-59 by buildguy) : Error initializing step [Update fct_referral_traffic] 2015/06/10 13:33:26 - Insert / Update.0 - ERROR (version 5.4.0.0-128, build 1 from 2015-06-03_13-41-59 by buildguy) : Error initializing step [Insert / Update] 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - ERROR (version 5.4.0.0-128, build 1 from 2015-06-03_13-41-59 by buildguy) : java.lang.UnsupportedClassVersionError: org/osjava/sj/SimpleContextFactory : Unsupported major.minor version 51.0 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.lang.ClassLoader.defineClass1(Native Method) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.lang.ClassLoader.defineClass(ClassLoader.java:621) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.net.URLClassLoader.access$000(URLClassLoader.java:58) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.net.URLClassLoader$1.run(URLClassLoader.java:197) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.security.AccessController.doPrivileged(Native Method) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.net.URLClassLoader.findClass(URLClassLoader.java:190) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.lang.ClassLoader.loadClass(ClassLoader.java:306) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.lang.ClassLoader.loadClass(ClassLoader.java:247) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.lang.Class.forName0(Native Method) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.lang.Class.forName(Class.java:249) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at javax.naming.InitialContext.init(InitialContext.java:223) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at javax.naming.InitialContext.<init>(InitialContext.java:175) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.core.database.util.DatabaseUtil.getDataSourceFromJndi(DatabaseUtil.java:77) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.core.database.util.DatabaseUtil.getNamedDataSource(DatabaseUtil.java:55) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.core.database.Database.connectUsingNamedDataSource(Database.java:441) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:4691) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.core.database.Database.normalConnect(Database.java:414) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.core.database.Database.connect(Database.java:358) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.core.database.Database.connect(Database.java:311) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.trans.steps.insertupdate.InsertUpdate.init(InsertUpdate.java:480) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at org.pentaho.di.trans.step.StepInitThread.run(StepInitThread.java:69) 2015/06/10 13:33:26 - Update fct_referral_traffic.0 - at java.lang.Thread.run(Thread.java:695)
    via by Jason Yau,
  • Problem while modifying sample code
    via by 807581,
  • Compatible?
    via by Dinesh,
    • org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.UnsupportedClassVersionError: org/osjava/sj/SimpleContextFactory : Unsupported major.minor version 51.0) at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Unknown Source) at org.eclipse.swt.widgets.Display.runAsyncMessages(Unknown Source) at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source) at org.pentaho.di.ui.core.dialog.ErrorDialog.showErrorDialog(ErrorDialog.java:266) at org.pentaho.di.ui.core.dialog.ErrorDialog.<init>(ErrorDialog.java:89) at org.pentaho.di.ui.spoon.delegates.SpoonStepsDelegate.editStep(SpoonStepsDelegate.java:186) at org.pentaho.di.ui.spoon.Spoon.editStep(Spoon.java:8712) at org.pentaho.di.ui.spoon.trans.TransGraph.editStep(TransGraph.java:3061) at org.pentaho.di.ui.spoon.trans.TransGraph.mouseDoubleClick(TransGraph.java:747) at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source) at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.notifyListeners(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:1319) at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7939) at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9190) at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:654) 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.commons.launcher.Launcher.main(Launcher.java:92) Caused by: java.lang.UnsupportedClassVersionError: org/osjava/sj/SimpleContextFactory : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:249) at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.<init>(InitialContext.java:175) at org.pentaho.di.core.database.util.DatabaseUtil.getDataSourceFromJndi(DatabaseUtil.java:77) at org.pentaho.di.core.database.util.DatabaseUtil.getNamedDataSource(DatabaseUtil.java:55) at org.pentaho.di.core.database.Database.connectUsingJNDIDataSource(Database.java:467) at org.pentaho.di.core.database.Database.normalConnect(Database.java:403) at org.pentaho.di.core.database.Database.connect(Database.java:358) at org.pentaho.di.core.database.Database.connect(Database.java:311) at org.pentaho.di.core.database.Database.connect(Database.java:301) at org.pentaho.di.ui.trans.steps.tableoutput.TableOutputDialog$26.run(TableOutputDialog.java:1083) at org.eclipse.swt.widgets.RunnableLock.run(Unknown Source) ... 27 more

    Users with the same issue

    Unknown visitor1 times, last one,
    Eric Henderson
    1 times, last one,
    andyglick
    1 times, last one,
    Unknown visitor1 times, last one,
    Casper
    2 times, last one,
    192 more bugmates