Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

java.lang.IllegalArgumentException: java.lang.ClassCastException when migrating data between PostreSQL servers

Highlighted
One Star

java.lang.IllegalArgumentException: java.lang.ClassCastException when migrating data between PostreSQL servers

Hello,

 

when starting a simple job as shown in the picture, the following error occurs:

 

java.lang.IllegalArgumentException: java.lang.ClassCastException@42040da3
    at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:461)
    at org.talend.designer.codegen.config.TalendJetEmitter.generate(TalendJetEmitter.java:684)
    at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:441)
    at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:432)
    at org.talend.designer.codegen.proxy.JetProxy.generate(JetProxy.java:54)
    at org.talend.designer.codegen.CodeGenerator.instantiateJetProxy(CodeGenerator.java:446)
    at org.talend.designer.codegen.CodeGenerator.generateTypedComponentCode(CodeGenerator.java:437)
    at org.talend.designer.codegen.CodeGenerator.generateTypedComponentCode(CodeGenerator.java:394)
    at org.talend.designer.codegen.CodeGenerator.generateTypedComponentCode(CodeGenerator.java:380)
    at org.talend.designer.codegen.CodeGenerator.generateProcessCode(CodeGenerator.java:219)
    at org.talend.designer.runprocess.java.JavaProcessor.generateCode(JavaProcessor.java:611)
    at org.talend.designer.runprocess.maven.MavenJavaProcessor.generateCode(MavenJavaProcessor.java:81)
    at org.talend.designer.runprocess.ProcessorUtilities.generateContextInfo(ProcessorUtilities.java:867)
    at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:574)
    at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:1736)
    at org.talend.designer.runprocess.RunProcessContext$1.run(RunProcessContext.java:582)
    at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:466)
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:374)
    at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:527)
    at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:284)
    at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1190)
    at org.talend.designer.runprocess.RunProcessContext.exec(RunProcessContext.java:534)
    at org.talend.designer.runprocess.ui.ProcessComposite.exec(ProcessComposite.java:1401)
    at org.talend.designer.runprocess.ui.views.ProcessView$RunAction.run(ProcessView.java:701)
    at org.talend.designer.runprocess.ui.actions.RunProcessAction.run(RunProcessAction.java:58)
    at org.talend.designer.core.debug.JobLaunchConfigurationDelegate$1.run(JobLaunchConfigurationDelegate.java:84)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.talend.rcp.intro.Application.start(Application.java:265)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)

I am using TOS 7.0.1 and JRE 1.8.0_171 if this matters.

Does anyone know what's the issue here?

Highlighted
Moderator

Re: java.lang.IllegalArgumentException: java.lang.ClassCastException when migrating data between PostreSQL servers

Hello,

Ensure proper version of JDK is installed. For v6 of Talend products JDKv1.8 is required instead of JRE. If that requirement is met, ensure JDK bin is included in your PATH environment variable and is being reached.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog