PDA

View Full Version : [j2me] problem with eclipse



robgr85
June 21st, 2007, 10:40 PM
Hi!

Just wanted to configure eclipse on my linux and got following error in 'Device Management'


An error (eclipseme.core.persistence.PersistenceException: Attribute "version" was already specified for element "deviceRegistry".) occurred reading the device registry.
Please consult the error log for more information.

please help me with that :( I like eclipse and do not want to swap to NetBeans. My eclipse version is 3.2 and I got wtk2.5.1 installed,

Thanks for any response,

Robert

ahvargas
June 22nd, 2007, 09:16 AM
How do you install eclipse in your machine?
you installed via apt-get?

robgr85
June 22nd, 2007, 01:40 PM
How do you install eclipse in your machine?
you installed via apt-get?

Yeah, I've installed it via apt-get.

Regards,
Robert

ahvargas
June 22nd, 2007, 05:04 PM
Can you post your log file?

robgr85
June 22nd, 2007, 07:08 PM
Can you post your log file?

Here You have my full eclipse error log

ahvargas
June 23rd, 2007, 03:09 AM
That is a very large log file. :P

Well it seem that your configuration get someway bad. I think if you delete the configuration it make work.
Try in your home

rm -rf .eclipse

If that doesnt do the job you can try to remove the config files in yoyr worksapce directory.

robgr85
June 23rd, 2007, 03:42 AM
That is a very large log file. :P

Well it seem that your configuration get someway bad. I think if you delete the configuration it make work.
Try in your home

rm -rf .eclipse

If that doesnt do the job you can try to remove the config files in yoyr worksapce directory.

I've tried removing eclipse with

dpkg -P

and installing again through apt but it didn't help.
didn't checked if it removed .eclipse directory, I'll try remove it manually tomorrow, as You adviced me.

Robert

robgr85
June 23rd, 2007, 10:27 AM
I removed eclipse with dpkg -P, then manually removed .eclipse directory, installed again.

the same place error


An error (gnu.xml.dom.ls.DomLSException: duplicate attribute: "version") occurred reading the device registry.
Please consult the error log for more information.


log for this error:

exception stack trace:


gnu.xml.dom.ls.DomLSException: duplicate attribute: "version"
at gnu.xml.dom.ls.DomLSParser.doParse(libgcj.so.70)
at gnu.xml.dom.ls.DomLSParser.parse(libgcj.so.70)
at gnu.xml.dom.DomDocumentBuilder.parse(libgcj.so.70)
at javax.xml.parsers.DocumentBuilder.parse(libgcj.so. 70)
at eclipseme.core.internal.utils.XMLUtils.readDocumen t(XMLUtils.java:227)
at eclipseme.core.model.device.DeviceRegistry.load(De viceRegistry.java:235)
at eclipseme.ui.internal.preferences.DeviceManagement PreferencePage.createContents(DeviceManagementPref erencePage.java:225)
at org.eclipse.jface.preference.PreferencePage.create Control(PreferencePage.java:233)
at org.eclipse.jface.preference.PreferenceDialog.crea tePageControl(PreferenceDialog.java:1403)
at org.eclipse.jface.preference.PreferenceDialog$12.r un(PreferenceDialog.java:1162)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner .java:37)
at org.eclipse.core.runtime.Platform.run(Platform.jav a:843)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil. java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnab le.java:149)
at org.eclipse.jface.preference.PreferenceDialog.show Page(PreferenceDialog.java:1156)
at org.eclipse.ui.internal.dialogs.FilteredPreference Dialog.showPage(FilteredPreferenceDialog.java:438)
at org.eclipse.jface.preference.PreferenceDialog$8.se lectionChanged(PreferenceDialog.java:661)
at org.eclipse.jface.viewers.StructuredViewer$3.run(S tructuredViewer.java:839)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner .java:37)
at org.eclipse.core.runtime.Platform.run(Platform.jav a:843)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil. java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnab le.java:149)
at org.eclipse.jface.viewers.StructuredViewer.firePos tSelectionChanged(StructuredViewer.java:837)
at org.eclipse.jface.viewers.StructuredViewer.handleP ostSelect(StructuredViewer.java:1143)
at org.eclipse.jface.viewers.StructuredViewer$5.widge tSelected(StructuredViewer.java:1163)
at org.eclipse.jface.util.OpenStrategy.firePostSelect ionEvent(OpenStrategy.java:236)
at org.eclipse.jface.util.OpenStrategy.access$4(OpenS trategy.java:230)
at org.eclipse.jface.util.OpenStrategy$3.run(OpenStra tegy.java:404)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableL ock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessa ges(Synchronizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(D isplay.java:3157)
at org.eclipse.swt.widgets.Display.readAndDispatch(Di splay.java:2859)
at org.eclipse.jface.window.Window.runEventLoop(Windo w.java:820)
at org.eclipse.jface.window.Window.open(Window.java:7 96)
at org.eclipse.ui.internal.OpenPreferencesAction.run( OpenPreferencesAction.java:65)
at org.eclipse.jface.action.Action.runWithEvent(Actio n.java:499)
at org.eclipse.jface.action.ActionContributionItem.ha ndleWidgetSelection(ActionContributionItem.java:53 9)
at org.eclipse.jface.action.ActionContributionItem.ac cess$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$5. handleEvent(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(Event Table.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.ja va:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents( Display.java:3180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Di splay.java:2856)
at org.eclipse.ui.internal.Workbench.runEventLoop(Wor kbench.java:1930)
at org.eclipse.ui.internal.Workbench.runUI(Workbench. java:1894)
at org.eclipse.ui.internal.Workbench.createAndRunWork bench(Workbench.java:422)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Pl atformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDE Application.java:95)
at org.eclipse.core.internal.runtime.PlatformActivato r$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseA ppLauncher.runApplication(EclipseAppLauncher.java: 92)
at org.eclipse.core.runtime.internal.adaptor.EclipseA ppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.ru n(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.ru n(EclipseStarter.java:177)
at java.lang.reflect.Method.invoke(libgcj.so.70)
at org.eclipse.core.launcher.Main.invokeFramework(Mai n.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java: 280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: org.xml.sax.SAXParseException: duplicate attribute: "version"
at gnu.xml.stream.SAXParser.parse(libgcj.so.70)
at gnu.xml.dom.ls.DomLSParser.doParse(libgcj.so.70)
...57 more
Caused by: javax.xml.stream.XMLStreamException: duplicate attribute: "version"
at gnu.xml.stream.XMLParser.error(libgcj.so.70)
at gnu.xml.stream.XMLParser.readAttribute(libgcj.so.7 0)
at gnu.xml.stream.XMLParser.readStartElement(libgcj.s o.70)
at gnu.xml.stream.XMLParser.next(libgcj.so.70)
at gnu.xml.stream.XMLParser.hasNext(libgcj.so.70)
at gnu.xml.stream.SAXParser.parse(libgcj.so.70)
...58 more

-Session data:


eclipse.buildId=M20070212-1330
java.fullversion=GNU libgcj 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-14ubuntu7)
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=pl_PL
Command-line arguments: -os linux -ws gtk -arch x86


help please, until it is not properly installed I must work on winshit :/

Robert

robgr85
June 24th, 2007, 06:42 PM
noone knows the solution to my problem?

robert

robgr85
June 26th, 2007, 04:52 PM
if noone know how to solve that problem, maybe any suggestions which ide should I choose for j2me programming under linux (but please do not tell me to use netbeans...)

Robert

ahvargas
June 29th, 2007, 06:10 AM
You can try, to install eclipse downloading it of the oficial site instead of usuing the deb.

robgr85
June 29th, 2007, 12:22 PM
You can try, to install eclipse downloading it of the oficial site instead of usuing the deb.

i solved my problem, with help of j2me-mailing list subscribers. What was wrong? I got installed gnu java, and sun-java - the problem was that even if I set paths to sun-java my kubuntu was using gnu java. I removed gnu java and set sun-java as default.

Robert

gorgo
July 2nd, 2007, 07:08 PM
i solved my problem, with help of j2me-mailing list subscribers. What was wrong? I got installed gnu java, and sun-java - the problem was that even if I set paths to sun-java my kubuntu was using gnu java. I removed gnu java and set sun-java as default.

Robert

i have the same problem robgr85. could you please tell me how did you removed gnu java and set sun-java as default?

thanks

robgr85
July 3rd, 2007, 05:02 AM
Hi!

Remove gnujava with aptitude, then use it to install sun-java :>

if You have sun-java installed and do not want to remove gnu java, You can still try to set sun-java as default with this command

sudo update-java-alternatives -s java-1.6.0-sun [depending on sun-java's version installed on Your ubuntu]


more:
https://help.ubuntu.com/community/Java

hope it helps if not ask, I'll help.
Robert

gorgo
July 3rd, 2007, 11:41 PM
thanks robgr85 !!! it finally works!! Thanks so much!
now its time to program :cool:

naughtykid
August 15th, 2007, 06:08 PM
Thanks, this really helps me too. I have googled a lot but was in vain. Appreciate a lot.

erlguta
February 18th, 2008, 11:02 AM
I have the same problem with the same error message.
I have removed java-gcj-compat java-gcj-compat-dev eclipse-gcj and set sun-java with:
sudo update-java-alternatives -s java-6-sun but the error still persist if i go to Eclipse > Preferences > J2ME > Device Management:



An error (eclipseme.core.persistence.PersistenceException: Attribute "version" was already specified for element "deviceRegistry".) occurred reading the device registry.
Please consult the error log for more information.


What i am doing wrong? I only have sun-java6 installed
:(

erlguta
February 20th, 2008, 10:03 AM
I solved the problem. In eclipse i must put the PATH in preferences > j2me and in WTK root i put /opt/j2me/bin (where i installed the wireless toolkits) i i must put "obviously" the root directory: only /opt/root