I am at my wits end with this. For no apparent reason, I can no longer use the "Guess Schema" button. My suspicion is that something has changed on my Windows XP machine and I have no idea what. I've googled like crazy to try to figure this out. When I click "Guess Schema", this is what I get:
2011-02-09 16:50:09,227 WARN org.talend.commons.ui.runtime.exception.ExceptionHandler - Exception in component tJavaFlex_1
java.io.UnsupportedEncodingException: GBK
at sun.nio.cs.StreamEncoder.forOutputStreamWriter(Unknown Source)
at java.io.OutputStreamWriter.<init>(Unknown Source)
at scratch.mock_job_for_guess_schema_0_1.Mock_job_for_Guess_schema.tJavaFlex_1Process(Mock_job_for_Guess_schema.java:610)
at scratch.mock_job_for_guess_schema_0_1.Mock_job_for_Guess_schema.runJobInTOS(Mock_job_for_Guess_schema.java:951)
at scratch.mock_job_for_guess_schema_0_1.Mock_job_for_Guess_schema.main(Mock_job_for_Guess_schema.java:735)
org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaProcess$1: Exception in component tJavaFlex_1
java.io.UnsupportedEncodingException: GBK
at sun.nio.cs.StreamEncoder.forOutputStreamWriter(Unknown Source)
at java.io.OutputStreamWriter.<init>(Unknown Source)
at scratch.mock_job_for_guess_schema_0_1.Mock_job_for_Guess_schema.tJavaFlex_1Process(Mock_job_for_Guess_schema.java:610)
at scratch.mock_job_for_guess_schema_0_1.Mock_job_for_Guess_schema.runJobInTOS(Mock_job_for_Guess_schema.java:951)
at scratch.mock_job_for_guess_schema_0_1.Mock_job_for_Guess_schema.main(Mock_job_for_Guess_schema.java:735)
at org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaProcess.run(Unknown Source)
at org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaController.runShadowProcess(Unknown Source)
at org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaController.access$1(Unknown Source)
at org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaController$4$1.run(Unknown Source)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
at org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaController.useMockJob(Unknown Source)
at org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaController.createButtonCommand(Unknown Source)
at org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaController.access$0(Unknown Source)
at org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaController$1.widgetSelected(Unknown Source)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.talend.rcp.intro.Application.start(Unknown Source)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
Does anyone have any idea what could be going on?
Any other suggestions? I've tried everything I can think of to no avail. The interesting thing is that the guess schema button actually does create the csv file in the temp directory and it looks like TOS just has a problem reading that csv file.
Success!!!
So, I can't really explain what happened, but I completely uninstalled Java 1.6 (SDKs and JREs) from my machine and installed Java 1.5 instead on a whim. Strangely enough, this has fixed my issue. I don't understand it because I've been running Java 1.6 for months without 1.5 on my box. The Windows Support Team at my work did install some updates just the day before my issues, so maybe that was the catalyst that destroyed my life for a week. Anyway, "guess schema" works again and I look forward to spending the rest of eternity cradled in the warm and loving arms of Java 1.5, never again falling prey to the enchanting yet beguiling siren calls of Java 1.6.
You can actually resolve this without having to re-install anything.
Studio is an eclipse-based project and behaves the same as eclipse. Placing a jre directory under the root directory (wherever the executable you launch is located) for studio will force it to use that instance over any other jre installed on the machine.
For example, if my studio root is "C:\talend\", all I need to do is copy a jre directory underneath ("C:\talend\jre").
Where do you get the contents for a jre directory? If you have java installed, it may be under "C:\Program Files\Java\". On my machine, it's "C:\Program Files\Java\jre6". I copy everything under there to c:\talend\jre, relaunch, and voila.