[jboss-user] [JBoss Tools (users)] - java.io.UnsupportedEncodingException then build an archive

Stephen Davidson gorky at freenet.carleton.ca
Tue Sep 25 09:12:31 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yep.  Gotta love MS, and in this case, Eclipse Defaults on MS, which
tend to go to MS-proprietary formats ( CP-Something or Other)

Windows -> Preferences -> General -> Workspace -> Text File Encoding
Change that to UTF-8 or UTF-16.  On MS, it defaults to CP-something or
other, and that's not supported on Linux/Unix.  Other platforms may have
other defaults, but as long as the default is UTF-8 or UTF-16, the other
platforms will be able to read the generated file.

UTF-8 is fine for North American, and most European languages.  UTF-16
should properly cover everything else.

Now, in regards to chasing down and FIXING the file giving you the
current issue;
File -> Properties -> Resource -> Text File Encoding.

This needs to be set to UTF-8 or UTF-16 for whatever file is causing the
issue.  Unfortunately, your log excerpt does not actually give the file
that the error occurred on, so you are going to have to do some digging
(sorry).

Regards,
Steve

vtysh wrote:
> Platform: Java 1.5 + Eclipse Europa + Jboss Tools 2.0 beta3
> Locale: ru
> I am trying to package war file in the "Project archive" view and getting no results. Workspace log file gives me next exception information:
> 
>   | !ENTRY org.eclipse.ui 4 0 2007-09-25 12:59:26.265
>   | !MESSAGE Unhandled event loop exception
>   | !STACK 0
>   | java.nio.charset.UnsupportedCharsetException: IBM437
>   | 	at de.schlichtherle.io.archive.spi.AbstractArchiveDriver.<init>(AbstractArchiveDriver.java:72)
>   | 	at de.schlichtherle.io.archive.zip.Zip32Driver.<init>(Zip32Driver.java:111)
>   | 	at de.schlichtherle.io.archive.zip.Zip32Driver.<init>(Zip32Driver.java:58)
>   | 	at org.jboss.ide.eclipse.archives.core.util.internal.TrueZipUtil$JarArchiveDetector.getArchiveDriver(TrueZipUtil.java:171)
>   | 	at de.schlichtherle.io.File.init(File.java:846)
>   | 	at de.schlichtherle.io.File.init(File.java:764)
>   | 	at de.schlichtherle.io.File.<init>(File.java:475)
>   | 	at org.jboss.ide.eclipse.archives.core.util.internal.ModelTruezipBridge.getFile(ModelTruezipBridge.java:239)
>   | 	at org.jboss.ide.eclipse.archives.core.util.internal.ModelTruezipBridge.deleteArchive(ModelTruezipBridge.java:54)
>   | 	at org.jboss.ide.eclipse.archives.core.build.ArchiveBuildDelegate.fullArchiveBuild(ArchiveBuildDelegate.java:80)
>   | 	at org.jboss.ide.eclipse.archives.ui.views.ArchivesMenuHandler.buildSelectedNode(ArchivesMenuHandler.java:343)
>   | 	at org.jboss.ide.eclipse.archives.ui.views.ArchivesMenuHandler.access$14(ArchivesMenuHandler.java:338)
>   | 	at org.jboss.ide.eclipse.archives.ui.views.ArchivesMenuHandler$6.run(ArchivesMenuHandler.java:179)
>   | 	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
>   | 	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
>   | 	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
>   | 	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
>   | 	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
>   | 	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
>   | 	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
>   | 	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
>   | 	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
>   | 	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
>   | 	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
>   | 	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
>   | 	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
>   | 	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
>   | 	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
>   | 	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
>   | 	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
>   | 	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
>   | 	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
>   | 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
>   | 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
>   | 	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:504)
>   | 	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
>   | 	at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
>   | Caused by: java.io.UnsupportedEncodingException: Cp437
>   | 	at sun.io.Converters.getConverterClass(Unknown Source)
>   | 	at sun.io.Converters.newConverter(Unknown Source)
>   | 	at sun.io.ByteToCharConverter.getConverter(Unknown Source)
>   | 	at java.lang.StringCoding.decode(Unknown Source)
>   | 	at java.lang.String.<init>(Unknown Source)
>   | 	at java.lang.String.<init>(Unknown Source)
>   | 	at de.schlichtherle.io.archive.spi.AbstractArchiveDriver.<init>(AbstractArchiveDriver.java:70)
>   | 	... 40 more
>   | 
> Is anybody know how to avoid this?
> 
> View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4088328#4088328
> 
> Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088328
> _______________________________________________
> jboss-user mailing list
> jboss-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-user

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFG+Qk/PtiPEDq7o8YRAij4AKDZn3PsxaFKWpJz+5ntpjMUtRtVkQCfak3B
HiF8eAZTbLhBJJSYqwen0cg=
=xd3C
-----END PGP SIGNATURE-----



More information about the jboss-user mailing list