"GsonDataFormat cannot be resolved to a type" when publishing

Five Stars

"GsonDataFormat cannot be resolved to a type" when publishing

I downloaded the jar files that were indicated by the Studio and tried to publish. Error.

I restarted the Studio and tried to publish. Error.

 

My colleague did the same thing, he can publish without error.

 

How can I solve this? I am using the same version of the Studio, it's the same project, but of course we have different PCs.

Employee

Re: "GsonDataFormat cannot be resolved to a type" when publishing

Hi,

 

   I would highly recommend you to share the error you are getting, screenshot of the jobs you are doing and in what stage you are getting error etc. 

 

    Please also provide the version of the Studio and the product you are using for further verification.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)


Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for spending their time for your query. If your query is answered, please mark the topic as resolved :-)
Five Stars

Re: "GsonDataFormat cannot be resolved to a type" when publishing

The exact error message:

 

org.talend.designer.runprocess.ProcessorException: Job compile errors
At least job "WebshopContactService" has a compile errors, please fix and export again.
Error Line: 234
Detail Message: GsonDataFormat cannot be resolved to a type
There may be some other errors caused by JVM compatibility. Make sure your JVM setup is similar to the studio.
at org.talend.designer.runprocess.JobErrorsChecker.checkLastGenerationHasCompilationError(JobErrorsChecker.java:328)
at org.talend.designer.runprocess.DefaultRunProcessService.checkLastGenerationHasCompilationError(DefaultRunProcessService.java:380)
at org.talend.designer.runprocess.RunProcessService.checkLastGenerationHasCompilationError(RunProcessService.java:292)
at org.talend.designer.runprocess.ProcessorUtilities.generateBuildInfo(ProcessorUtilities.java:656)
at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:943)
at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:741)
at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:1338)
at org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobScriptsManager.generateJobFiles(JobScriptsManager.java:602)
at org.talend.repository.ui.wizards.exportjob.scriptsmanager.esb.JobJavaScriptOSGIForESBManager.getExportResources(JobJavaScriptOSGIForESBManager.java:168)
at org.talend.repository.ui.wizards.exportjob.action.JobExportAction.exportJobScript(JobExportAction.java:186)
at org.talend.repository.ui.wizards.exportjob.action.JobExportAction.run(JobExportAction.java:119)
at org.talend.camel.designer.ui.wizards.actions.JavaCamelJobScriptsExportWSAction.exportRouteBundle(JavaCamelJobScriptsExportWSAction.java:393)
at org.talend.camel.designer.ui.wizards.actions.JavaCamelJobScriptsExportWSAction.run(JavaCamelJobScriptsExportWSAction.java:197)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:466)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:374)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1059)
at org.talend.designer.publish.esb.wizards.PublishRouteWizard.publishToRepository(PublishRouteWizard.java:49)
at org.talend.designer.publish.di.wizards.AbstractPublishWizard.performFinish(AbstractPublishWizard.java:116)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:853)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:438)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
at org.eclipse.jface.window.Window.open(Window.java:808)
at org.talend.designer.publish.di.actions.AbstractPublishAction.doRun(AbstractPublishAction.java:118)
at org.talend.repository.ui.actions.AContextualAction$2.run(AContextualAction.java:632)
at org.talend.repository.RepositoryWorkUnit.executeRun(RepositoryWorkUnit.java:99)
at org.talend.core.repository.model.AbstractRepositoryFactory.executeRepositoryWorkUnit(AbstractRepositoryFactory.java:258)
at org.talend.repository.localprovider.model.LocalRepositoryFactory.executeRepositoryWorkUnit(LocalRepositoryFactory.java:3377)
at org.talend.repository.svnprovider.SvnRepositoryFactory.executeRepositoryWorkUnit(SvnRepositoryFactory.java:336)
at org.talend.repository.remoteprovider.RemoteRepositoryFactory.executeRepositoryWorkUnit(RemoteRepositoryFactory.java:850)
at org.talend.core.repository.model.ProxyRepositoryFactory.executeRepositoryWorkUnit(ProxyRepositoryFactory.java:2109)
at org.talend.repository.ui.actions.AContextualAction.run(AContextualAction.java:641)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:519)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
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:261)
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(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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)

 

This happens after clicking Finish when trying to Publish a certain route. As said before, my colleague has no trouble doing this on his machine.

 

Studio version:

Talend ESB

Version: 6.5.1
Build id: 20180917_0707-patch

Employee

Re: "GsonDataFormat cannot be resolved to a type" when publishing

Hi,

 

   Could you please check the Java version where Talend is pointing? It should be Java 1.8. Please verify it under Windows -> Preferences.

image.png

 

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

 

 


Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for spending their time for your query. If your query is answered, please mark the topic as resolved :-)
Five Stars

Re: "GsonDataFormat cannot be resolved to a type" when publishing

It is 1.8.0_181

Employee

Re: "GsonDataFormat cannot be resolved to a type" when publishing

Hi,

 

   In that case, could you please go to the code section and see the compile error.

 

   Most probably one of your components is missing some jars.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)


Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for spending their time for your query. If your query is answered, please mark the topic as resolved :-)
Five Stars

Re: "GsonDataFormat cannot be resolved to a type" when publishing

This is the compile error. And yes, I know that it's complaining about a missing JAR. The Studio pointed it out to me, I downloaded it. I even restarted the Studio. But it doesn't solve the error.

Employee

Re: "GsonDataFormat cannot be resolved to a type" when publishing

Hi,

 

    A clean reinstall of the Studio is the most easy way to solve the issue. But lets wait for others' opinions also.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)


Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for spending their time for your query. If your query is answered, please mark the topic as resolved :-)
Five Stars

Re: "GsonDataFormat cannot be resolved to a type" when publishing

And this is what Studio says today. So I need to install stuff, but it won't let me. Oh, and these JARs are already on my PC.

Five Stars

Re: "GsonDataFormat cannot be resolved to a type" when publishing

These are the libraries that the Studio claims are missing:

gson-2.3.1.jar
camel-jaxb-2.17.6.jar
camel-gson-alldep-2.17.6.jar

 

I looked them up in the Modules view. They have all been installed, already. So that explains why Studio won't let me install them. But it doesn't explain the compile error. Or the red/white exclamation point in the view.

Five Stars

Re: "GsonDataFormat cannot be resolved to a type" when publishing

Today I re-installed the Studio. I got the chance to install the libraries. I had to restart the Studio to get rid of the red icons.

 

But still not able to deploy, still the error "GsonDataFormat cannot be resolved to a type"

Moderator

Re: "GsonDataFormat cannot be resolved to a type" when publishing

Hello,

Did you install your studio completely? What's OS are you using?

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.
Four Stars

Re: "GsonDataFormat cannot be resolved to a type" when publishing

Hello everyone,,

    A clean reinstall of the Studio is the most easy way to solve the issue. But lets wait for others' opinions also.

 

Warm Regards,
Booooo

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.