Bug 28637 - [Preferences] Import Preferences: Console Message: Content is not allowed in Prolog
Summary: [Preferences] Import Preferences: Console Message: Content is not allowed in ...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-18 13:01 EST by Andrew Irvine CLA
Modified: 2004-06-21 06:56 EDT (History)
4 users (show)

See Also:


Attachments
Preferences to import (3.19 KB, text/plain)
2002-12-18 13:01 EST, Andrew Irvine CLA
no flags Details
another preferences file that generates the error (18.95 KB, text/plain)
2003-02-14 10:38 EST, Rafael Chaves CLA
no flags Details
Latest preference file (3.10 KB, text/plain)
2003-02-14 10:48 EST, Andrew Irvine CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Irvine CLA 2002-12-18 13:01:03 EST
Eclipse 20021217

I change the dialog font (Window>Preferences>Workbench>Font) to a non default 
value.  I then close all the preference pages and then re-open and verify the 
font changes have taken place.  I then proceed to import the preferences I have 
stored via the import button (the preference file is attatched).

I get the following message in the console:
[Fatel Error] :1:1: Content is not allowed in Prolog.
Comment 1 Andrew Irvine CLA 2002-12-18 13:01:56 EST
Created attachment 2835 [details]
Preferences to import
Comment 2 Andrew Irvine CLA 2002-12-18 13:08:04 EST
See also bug 28638 for an import issue on motif
Comment 3 Tod Creasey CLA 2003-01-03 13:02:09 EST
Cannot replicate in 20021218. However I suspect that this is the same problem 
as Bug 28638. Please recheck with latest - I suspect my machine was more 
robust abotu defending against bogus font deletions.
Comment 4 Rafael Chaves CLA 2003-02-14 10:36:11 EST
Just had the same error using build I20030211 on XP. The message "[Fatal 
Error] :1:1: Content is not allowed in Prolog." appeared several times in a row.

I can reproduce the problem after importing the preference file (will attach) a 
few times in a fresh workspace. 

I cannot reopen - should I open another PR?
Comment 5 Rafael Chaves CLA 2003-02-14 10:38:00 EST
Created attachment 3495 [details]
another preferences file that generates the error

Not sure the problem is dependent on something in the preferences file, but
here you are.
Comment 6 Tod Creasey CLA 2003-02-14 10:44:33 EST
Reopening. Andrew has seen this as well and might be able to offer insights.
Comment 7 Andrew Irvine CLA 2003-02-14 10:47:52 EST
Eclipse I20030214
I am also seeing the messages on windows XP.  I installed the new version of 
eclipse pointing to a workspace created by a previous  version.  Don't know if 
that has anything to do with it.

My preferences are attached.  I will see if it is related to any specific 
preference.
Comment 8 Andrew Irvine CLA 2003-02-14 10:48:27 EST
Created attachment 3496 [details]
Latest preference file
Comment 9 Andrew Irvine CLA 2003-02-14 11:15:03 EST
I created a new preference file, with a new eclipse install and a new 
workbench.  I still get the messages.  I deleted all entries in my preference 
file, and then tried importing that.  Still got the messages.  That does not 
make any sense.
Comment 10 Tod Creasey CLA 2003-02-14 11:31:42 EST
You have to have the Java Plugin loaded for this to happen - it is an issue 
with one of the java preferences.
Comment 11 Rafael Chaves CLA 2003-02-14 11:35:54 EST
It looks like they have a listener connected to their preference store which is 
failing when trying to parse one of the XML-based properties. 
Comment 12 Tod Creasey CLA 2003-02-14 11:59:38 EST
The problem is when some of the keys in Java Core get reset to thier default 
value.

The key in question 
is "org.eclipse.jdt.core.classpathContainer.Unicode|org.eclipse.jdt.launching.J
RE_CONTAINER"

which is being reset to newValue= " ##<cp entry ignore>## "

from 

oldValue= "<?xml version="1.0" encoding="UTF-8"?>\n<classpath><classpathentry 
kind="lib" path="D:/ibm jdk 1.3.1/jre/lib/rt.jar" rootpath="src" 
sourcepath="d:/ibm jdk 1.3.1/src.jar"/><classpathentry kind="lib" path="D:/ibm 
jdk 1.3.1/jre/lib/i18n.jar" rootpath="src" sourcepath="d:/ibm jdk 
1.3.1/src.jar"/><classpathentry kind="lib" path="D:/ibm jdk 
1.3.1/jre/lib/ext/ibmjcaprovider.jar" rootpath="" 
sourcepath=""/><classpathentry kind="lib" path="D:/ibm jdk 
1.3.1/jre/lib/ext/indicim.jar" rootpath="" sourcepath=""/><classpathentry 
kind="lib" path="D:/ibm jdk 1.3.1/jre/lib/ext/JawBridge.jar" rootpath="" 
sourcepath=""/></classpath>"


This generates an error [Fatal Error] :1:1: Content is not allowed in prolog.

This is in JavaModelManager$PluginPreferencesListener

Reassigning.
Comment 13 Philipe Mulet CLA 2003-02-14 13:04:33 EST
Tod, is there any specification about what's forbidden in a preference value ?
Comment 14 Tod Creasey CLA 2003-02-14 13:12:53 EST
No - the issue is that it is malformed XML you are using and trying to pass it 
to your own XML parser - our only issues is that it is valid for the format of 
java.util.Properties which essentially means that we can serialize it (they 
have to be stored as strings).

I believe the problem is that ##<cp entry ignore>## has a mix of prolog tags 
(#) and content tags (<>).
Comment 15 Philipe Mulet CLA 2003-02-15 05:27:47 EST
I see. Actually the offending value isn't supposed to be persisted ever. This 
is the default value we use internally but should get filtered out by the 
preference store. This feels like a duplicate of bug 31458 where the preference 
store incorrectly did only treat empty strings as default one.

Comment 16 Philipe Mulet CLA 2003-02-15 05:29:41 EST
David - pls verify my previous assertion
Comment 17 David Audel CLA 2003-02-17 07:29:20 EST
I cannot reproduce the problem.
Could you give me exact steps to reproduce it and the stacktrace.
Comment 18 Tod Creasey CLA 2003-02-17 08:13:25 EST
1) Open a new workbench
2) Switch to the Java Perspective
3) Import the preferences attached

An important thing here is to be self hosting or running from a terminal or 
else you won't see the errors being written to the log.
Comment 19 David Audel CLA 2003-02-17 11:02:37 EST
The problem is the spaces in the default value (" ##<cp entry ignore>## ").
Change the default value to "##<cp entry ignore>##"

Fixed.
Comment 20 David Audel CLA 2003-03-04 11:10:16 EST
Verified.
Comment 21 DJ Houghton CLA 2004-06-19 11:06:36 EDT
I got this error message ("[Fatal Error] :1:1: Content is not allowed in
prolog.") in my console with build i0618-1804.

- started Eclipse on a clean workspace.
- switched to the CVS perspective
- started checking out projects
- turned off auto-build
- changed default text font along with some other prefs
- changed SWT classpath file to be the win32 one
- hit Ctrl-B to build
- waited

Noticed the error message in my console.
No other side effects.

Here is a list of projects in my workspace:
org.eclipse.help.ui.win32
org.eclipse.update
platform-launcher
org.apache.lucene
org.eclipse.compare
org.eclipse.core.filebuffers
org.eclipse.core.resources
org.eclipse.core.runtime
org.eclipse.core.runtime.compatibility
org.eclipse.debug.core
org.eclipse.debug.ui
org.eclipse.help
org.eclipse.help.appserver
org.eclipse.help.base
org.eclipse.help.ide
org.eclipse.help.ui
org.eclipse.help.webapp
org.eclipse.jdt.core
org.eclipse.jdt.debug
org.eclipse.jdt.debug.ui
org.eclipse.jdt.junit
org.eclipse.jdt.junit.runtime
org.eclipse.jdt.launching
org.eclipse.jdt.ui
org.eclipse.jface
org.eclipse.jface.text
org.eclipse.osgi
org.eclipse.osgi.services
org.eclipse.osgi.util
org.eclipse.pde.build
org.eclipse.pde.core
org.eclipse.pde.runtime
org.eclipse.pde.ui
org.eclipse.search
org.eclipse.swt
org.eclipse.team.core
org.eclipse.team.cvs.core
org.eclipse.team.cvs.ssh
org.eclipse.team.cvs.ui
org.eclipse.team.ui
org.eclipse.text
org.eclipse.tomcat
org.eclipse.ui
org.eclipse.ui.editors
org.eclipse.ui.ide
org.eclipse.ui.views
org.eclipse.ui.workbench
org.eclipse.ui.workbench.texteditor
org.eclipse.update.core
org.eclipse.update.ui
Comment 22 DJ Houghton CLA 2004-06-19 11:07:04 EDT
Sorry, forgot to change the state.
Comment 23 David Audel CLA 2004-06-21 06:55:48 EDT
This problem is probably not the same as the first problem.

I filled a new bug report for the new problem (bug 67980) and i close this bug