Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 255088 - [Net] Malformed \uxxxx encoding exception in UnixProxyProvider.getEnv()
Summary: [Net] Malformed \uxxxx encoding exception in UnixProxyProvider.getEnv()
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.5 M4   Edit
Assignee: Pawel Pogorzelski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-12 13:53 EST by Nick Boldt CLA
Modified: 2009-06-03 16:30 EDT (History)
3 users (show)

See Also:


Attachments
screenshot (23.66 KB, image/png)
2008-11-12 13:53 EST, Nick Boldt CLA
no flags Details
screenshot 2 (12.46 KB, image/png)
2008-11-12 13:53 EST, Nick Boldt CLA
no flags Details
results of running `export` (2.95 KB, text/plain)
2008-11-20 11:31 EST, Nick Boldt CLA
no flags Details
Patch_v01 (1.27 KB, patch)
2008-11-21 05:31 EST, Pawel Pogorzelski CLA
no flags Details | Diff
Patch_v02 (1.56 KB, patch)
2008-11-21 07:15 EST, Pawel Pogorzelski CLA
john.arthorne: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Boldt CLA 2008-11-12 13:53:25 EST
Created attachment 117688 [details]
screenshot

Using Eclipse 3.5M3 (Build id: I20081030-1917) and org.eclipse.mylyn.jira_feature_3.0.3.v20081015-1500-e3x, I can no longer connect to my JIRA task repo.

Switching back to Eclipse 3.4.1 (same workspace), I can connect sans probleme. The specific error I get is:

An internal error occurred during: "Synchronizing Task List".
java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
at java.util.Properties.loadConvert(Properties.java:552)
at java.util.Properties.load0(Properties.java:375)
at java.util.Properties.load(Properties.java:325)
at org.eclipse.core.internal.net.proxy.unix.UnixProxyProvider.getEnv(UnixProxyProvider.java:181)
at org.eclipse.core.internal.net.proxy.unix.UnixProxyProvider.getNonProxiedHosts(UnixProxyProvider.java:79)
at org.eclipse.core.internal.net.AbstractProxyProvider.select(AbstractProxyProvider.java:32)
at org.eclipse.core.internal.net.ProxyManager.getProxyDataForHost(ProxyManager.java:344)
at org.eclipse.mylyn.internal.tasks.core.TaskRepositoryLocation.getProxyForHost(TaskRepositoryLocation.java:57)
at org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient.<init>(BugzillaClient.java:197)

I can get this error -- Malformed \uxxxx encoding. -- using the Task List view to do a search, or when trying to revalidate my jira repo connection.

If I try to synch an existing JIRA query, I get:

Synchronization failed
java.lang.NullPointerException
at org.apache.commons.httpclient.SimpleHttpConnectionManager.shutdown(SimpleHttpConnectionManager.java:281)
at org.eclipse.mylyn.internal.jira.core.service.web.JiraWebSession.doInSession(JiraWebSession.java:100)
at org.eclipse.mylyn.internal.jira.core.service.web.rss.JiraRssClient.doInSession(JiraRssClient.java:48)
at org.eclipse.mylyn.internal.jira.core.service.web.rss.JiraRssClient.executeNamedFilter(JiraRssClient.java:53)
at org.eclipse.mylyn.internal.jira.core.service.JiraClient.executeNamedFilter(JiraClient.java:215)
at org.eclipse.mylyn.internal.jira.core.service.JiraClient.search(JiraClient.java:449)
at org.eclipse.mylyn.internal.jira.core.JiraRepositoryConnector.performQuery(JiraRepositoryConnector.java:135)
at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeQueriesJob.synchronizeQuery(SynchronizeQueriesJob.java:343)
at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeQueriesJob.synchronizeQueries(SynchronizeQueriesJob.java:300)
at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeQueriesJob.run(SynchronizeQueriesJob.java:238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Trying to submit this bug using the Mylyn Bugzilla Editor, I also get:

Unexpected error during task submission
java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
	at java.util.Properties.loadConvert(Properties.java:552)
	at java.util.Properties.load0(Properties.java:375)
	at java.util.Properties.load(Properties.java:325)
	at org.eclipse.core.internal.net.proxy.unix.UnixProxyProvider.getEnv(UnixProxyProvider.java:181)
	at org.eclipse.core.internal.net.proxy.unix.UnixProxyProvider.getNonProxiedHosts(UnixProxyProvider.java:79)
	at org.eclipse.core.internal.net.AbstractProxyProvider.select(AbstractProxyProvider.java:32)
	at org.eclipse.core.internal.net.ProxyManager.getProxyDataForHost(ProxyManager.java:344)
	at org.eclipse.mylyn.internal.tasks.core.TaskRepositoryLocation.getProxyForHost(TaskRepositoryLocation.java:57)
	at org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient.<init>(BugzillaClient.java:197)
	at org.eclipse.mylyn.internal.bugzilla.core.BugzillaClientFactory.createClient(BugzillaClientFactory.java:35)
	at org.eclipse.mylyn.internal.bugzilla.core.BugzillaClientManager.getClient(BugzillaClientManager.java:43)
	at org.eclipse.mylyn.internal.bugzilla.core.BugzillaTaskDataHandler.postTaskData(BugzillaTaskDataHandler.java:252)
	at org.eclipse.mylyn.internal.tasks.core.sync.SubmitTaskJob.run(SubmitTaskJob.java:77)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Screenshots attached.
Comment 1 Nick Boldt CLA 2008-11-12 13:53:40 EST
Created attachment 117689 [details]
screenshot 2
Comment 2 Nick Boldt CLA 2008-11-12 13:56:50 EST
FWIW, I'm on linux gtk 32 (Fedora 10, 2.6.27.4-79.fc10.i686), using Sun JDK 1.6.0_10. 
Comment 3 Steffen Pingel CLA 2008-11-12 16:07:58 EST
Nick, could you check if you have Sytem proxy configuration enabled in the Network Connection and switch it to Direct connection?
Comment 4 Steffen Pingel CLA 2008-11-12 18:26:25 EST
Moving bug to platform. It appears that UnixProxyProvider.getEnv() assumes that the environment is in Java properties compatible format which is not necessarily the case, e.g. when a environment value has a backslash (e.g. 'export FOO=\\bar '):

	Properties props = new Properties();
	props.load(Runtime.getRuntime().exec("env").getInputStream()); //$NON-NLS-1$
Comment 5 Pawel Pogorzelski CLA 2008-11-20 10:41:07 EST
Nick, could you attach output from the 'export' command run on the problem machine?
Comment 6 Nick Boldt CLA 2008-11-20 11:31:46 EST
Created attachment 118377 [details]
results of running `export`

(In reply to comment #5)
> Nick, could you attach output from the 'export' command run on the problem
> machine?
> 

Attached.
Comment 7 Pawel Pogorzelski CLA 2008-11-21 05:31:21 EST
Created attachment 118449 [details]
Patch_v01
Comment 8 Pawel Pogorzelski CLA 2008-11-21 07:15:24 EST
Created attachment 118456 [details]
Patch_v02

This one better addresses the issue. It removes the need to invoke `env` command at all because it's based on System.getenv() method.
Comment 9 Szymon Brandys CLA 2008-11-21 11:31:31 EST
Looks good. Thanks Pawel.
Comment 10 Tomasz Zarna CLA 2008-11-24 03:00:28 EST
Released to HEAD.