- This topic has 14 replies, 3 voices, and was last updated 19 years, 10 months ago by
Riyad Kalla.
-
AuthorPosts
-
kremensMemberI’ve purchased myEclipse, but I’m having the following problems:
If I attempt to edit and save an xml file, the file becomes corrupted
and unusable. The only way I can safely edit the file is with
Notepad, which sort of undermines the value of working in Eclipse!I’m fairly sure it’s some kind of encoding issue, and I’ve tried
UTF-8, bigEndian, UNIX line endings, etc – to no avail.Note that I’m working on a Windows XP machine. Also, I’m using Ant. I’m afraid that Ant is trying to parse standard xml files, for some reason, although that makes no sense.
Any ideas?
Jim Kremens
September 13, 2005 at 2:03 pm #237215
kremensMember//
September 13, 2005 at 2:56 pm #237218
Brian FernandesModeratorKkremens,
Could you please answer all relevant questions in the Posting Guidelines thread at the top of this forum? That’ll help us run down your issue quickly.
A few additional questions:
1) How do you create the XML file, do you use one of our wizards or did it exist already?
2) If you create the xml file in notepad, are you specifying encoding in the xml file – something like this perhaps<?xml version = "1.0" encoding = "UTF-8"?>
3) When you open an externally created XML file in our editor, does it show up fine initially and get corrupted only after you save it?
If you aren’t using MyEclipse 4.0GA and Eclipse 3.1 Final, I suggested you download both these, install in a new location and try again since there are several incompatabilities with earlier versions of Eclipse 3.1.
To help run this down, create a new Simple Project, reset the encoding preference for New XML files to UTF-8 (line delimiters don’t matter) and create a new XML file in that project using one of our wizards. Modify, save, close, reload – does that work for you?
If that does not work, can you try a brand new workspace, restart eclipse with a -clean switch just to be sure.Let us know how it turns out,
Best,
Brian.September 13, 2005 at 3:38 pm #237222
Riyad KallaMemberJim, in addition to all of Brian’s questions above, please also include your Eclipse Build ID (Help > About) and your MyEclipse Version (Window > Preferences > MyEclipse)
September 15, 2005 at 6:10 am #237355
kremensMemberHi,
I can’t seem to find any posting guidelines. Can you provide a link?
re: other questions:
1) How do you create the XML file, do you use one of our wizards or did it exist already?
It already existed.2) If you create the xml file in notepad, are you specifying encoding in the xml file – something like this perhaps
<?xml version = “1.0” encoding = “UTF-8″?>
Yes. Actually, it says:
<?xml version=”1.0″ encoding=”iso-8859-1”?>
Although I’ve used yours in the past as well. I’ve gotten lazy about this, as none of the editors I’ve used before cared about it. Candidly, I’m not sure which I should use, if any.
3) When you open an externally created XML file in our editor, does it show up fine initially and get corrupted only after you save it?
Yes.
4. If you aren’t using MyEclipse 4.0GA and Eclipse 3.1 Final, I suggested you download both these, install in a new location and try again since there are several incompatabilities with earlier versions of Eclipse 3.1.
I think I am using all of the latest.
Eclipse Build id: I20050627-1435
MyEclipse 4.0 Milestone 3 (3.9.310)“To help run this down, create a new Simple Project, reset the encoding preference for New XML files to UTF-8 (line delimiters don’t matter) and create a new XML file in that project using one of our wizards. Modify, save, close, reload – does that work for you?
If that does not work, can you try a brand new workspace, restart eclipse with a -clean switch just to be sure. ”I’m trying these options now, but have to run before I can give you results.
Thanks,
Jim Kremens
September 15, 2005 at 6:18 am #237356
Brian FernandesModeratorKevin,
MyEclipse 4.0M3 is not the latest, 4.0GA is – I would suggest you download and install that to a new location and try again. Please note, an upgrade from 4.0M3 to GA is not possible, you have to download the complete install. After that, please try out the steps I mentioned regarding the simple project above.
Having said that, I cannot understand why you would see this error in M3 either, but it will be better if we try and resolve this matter using GA.
Best,
Brian.September 15, 2005 at 9:16 am #237366
kremensMemberEgads, I can’t upgrade? That kind of breaks the whole Software Updates thing in Eclipse, no? Will I have to reset all of my myEclipse preferences? That’s a lot of stuff….
Before reinstalling, I’d like to make sure I’m going to do it right. Do I need to uninstall my version of myEclipse first? Should I then remove the folders in the plugins and fetures directories? Should I remove the main myEclipse folder in the Programs folder?
I don’t want to break anything. Does the new version guide me through this process?September 15, 2005 at 9:23 am #237367
kremensMemberAlso, when I go to the downloads link on your site, I only see 4.0 offered as an option. Can you provide a link?
Thanks,
Jim Kremens
September 15, 2005 at 9:48 am #237370
Riyad KallaMemberEgads, I can’t upgrade? That kind of breaks the whole Software Updates thing in Eclipse, no?
There’s a technical reason behind it, but the short version is that Eclipse uses the same version numbers for their software during the *entire* pre-release process (M-builds), and since the update manager is run off of version numbers, we are unable to upgrade our dependent libraries appropriately (EMF/GEF/JEM). So instead of having half our users end up breaking their installs we just force everyone to do a manual reinstall. It’s a pain for us too.
Will I have to reset all of my myEclipse preferences? That’s a lot of stuff….
All that stuff is stored in your workspace, when you reinstall Eclipse/MyEclipse add “-clean” to your command line and launch them and point at your existing workspace.
Before reinstalling, I’d like to make sure I’m going to do it right. Do I need to uninstall my version of myEclipse first? Should I then remove the folders in the plugins and fetures directories? Should I remove the main myEclipse folder in the Programs folder?
Step 1) Unzip fresh copy of Eclipse 3.1 SDK GA
Step 2) Install MyEclipse 4.0 GA against that new unzipped version
Step 3) Edit your shortcut to point ot the new install AND add -clean
Step 4) Start it up and point at your old workspace dir
Step 5) If everything worked, go erase your old Eclipse and MyEclipse dir (the “Uninstall” of MyEclipse just erases the dir).You should be back in tip top shape.
September 15, 2005 at 10:40 am #237408
kremensMemberWill this break other installs of other plugins I’m using? Some are free, some not. Will I have to reinstall them all?
September 15, 2005 at 12:02 pm #237435
Riyad KallaMemberWill this break other installs of other plugins I’m using? Some are free, some not. Will I have to reinstall them all?
Yes you would need to reinstall each plugin into the new clean install. I would suggest doing the parallel install I suggest above and using it for a week or so to make sure everything is working before installing your other plugins, then if you install the other plugins and something breaks you can begin to track down what caused the break.
September 15, 2005 at 12:13 pm #237439
kremensMemberOuch.
I’m leery of going through all of this based on an earlier comment from you guys:
“Having said that, I cannot understand why you would see this error in M3 either, but it will be better if we try and resolve this matter using GA. ”
I just don’t want to redo my whole setup only to have the same problem I’d be happier if you could say something like “oh yeah, we used to see that problem with the old version, but we fixed it.”
I’m wondering if you might be willing to help me debug a little with my current version, as I don’t really need the new version anyway.
Basically, If I create a new file from scratch and SAVE it, everything is OK. If I then make any changes and save it again, it breaks the file and I get an ‘unexpected node’ error. If I then rename the file, it will work again. Does that ring any bells?
Thanks,
Jim Kremens
September 15, 2005 at 12:23 pm #237445
Riyad KallaMemberI just don’t want to redo my whole setup only to have the same problem I’d be happier if you could say something like “oh yeah, we used to see that problem with the old version, but we fixed it.”
I don’t want you to go through all that leg work either for nothing, that’s why I suggested just doing the parallel install with Eclipse/ME for a few days/week before you spent all the time upgrading everything. I would note that there were a 186 bugs fixed against 4.0 GA from our M3 release, so it’s not a pointless upgrade. Also after getting 4.0 GA installed you will be able to use Update agent in the future to upgrade.
I’m wondering if you might be willing to help me debug a little with my current version, as I don’t really need the new version anyway.
Sure, I can try.
Basically, If I create a new file from scratch and SAVE it, everything is OK. If I then make any changes and save it again, it breaks the file and I get an ‘unexpected node’ error. If I then rename the file, it will work again. Does that ring any bells?
I’ve never heard/seen this before. But let’s check your log file anyway: <workspace dir>\.metadata\.log, look for an exception that might occur immediately after doing this and see if this can help us.
September 16, 2005 at 8:30 pm #237547
kremensMemberHey,
I feel like an idiot, but I found the problem. It’s not a problem with your software, but with my usage of Eclipse. I had assigned a keyboard shortcut to trigger my Ant build. I set it so it would work from anywhere in the workspace. But, if the myEclipse xml editor was in focus when I clicked my shortcut, it would try to run a build of just the xml file (or something). At any rate, it wouldn’t run the Ant build and would throw an error. I assumed it was corrupting my file, but instead, I just can’t have the xml editor in focus when I run my Ant build! I can live with that, of course.
Thanks for your patience and help! I don’t think I’lll upgrade just now, as I have all I need.
Best,
Jim Kremens
September 16, 2005 at 9:04 pm #237548
Riyad KallaMemberJim,
Glad to hear it was nothing dire and thank you for following up. -
AuthorPosts