調査 #197
完了[メモ] JAXBがあると、"XMLへの変換に失敗しました。"というエラー出る
0%
説明
「Ubuntu7.10」に「RtcBuilder0.4.2」と「RTリポジトリ(検証用)」が入っている環境における
RtcBuilderの挙動についてのメモ。
検証のため、RtcBuilder0.4.2をインストール後、使用している時には問題がなかったが、
RTリポジトリを使用するためにJAXBが必要とのことで、「/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/endorsed/」内にインストールしたところ、RTリポジトリはようやく利用できるようになったのだが、RtcBuilderで以下のようなエラーが出るようになってしまった。
症状としては、RtcBuilderの画面が開かれるが、RTC.xmlのタブでは、何も(1行も)表示されず、他のプロジェクトからRTC.xmlをopenまたはimportをしようと試みても開けない状態。つまり何も編集が出来ない状態。
そのため、RtcBuilderとRTリポジトリが共存した環境を構築できていない状態。
解決法を探したが、情報も少なく、対処療法として、「jaxb-api.jar」を取り除いてしまうことで、
通常通りRtcBuilderは使用できるため、その都度そのように対処。
$echo JAVA_HOME
/usr/lib/jvm/java-6-sun-1.6.0.03/
$ locate jaxb-api.jar
/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/endorsed/jaxb-api.jar
以下が、RtcBuilderをパースペクティブから開き、「RT」ボタンを押した瞬間に出力されるログ。
----
java.lang.Exception: XMLへの変換に失敗しました。
at jp.go.aist.rtm.toolscommon.profiles.util.XmlHandler.convertToXmlRtc(XmlHandler.java:135)
at
jp.go.aist.rtm.rtcbuilder.generator.ProfileHandler.createInitialRtcXml(ProfileHandler.java:96)
at jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam.<init>(RtcParam.java:107)
at jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam.<init>(RtcParam.java:98)
at jp.go.aist.rtm.rtcbuilder.ui.editors.RtcBuilderEditor.load(RtcBuilderEditor.java:119)
at jp.go.aist.rtm.rtcbuilder.ui.editors.RtcBuilderEditor.init(RtcBuilderEditor.java:208)
at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:842)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:583)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:372)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:290)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:140)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:394)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1144)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1097)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1311)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:455)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:102)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:441)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:111)
at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:60)
at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:217)
at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:207)
at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:822)
at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:721)
at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:682)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2593)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2528)
at org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPage.java:2520)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2505)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2500)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2477)
at
jp.go.aist.rtm.rtcbuilder.ui.action.NewRtcBuilderEditorAction.run(NewRtcBuilderEditorAction.java:38)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:254)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3164)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1930)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.core.launcher.Main.invokeFramework(Main.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: javax.xml.bind.JAXBException: Provider com.sun.xml.bind.v2.ContextFactory not found
- with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:152)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:299)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
at jp.go.aist.rtm.toolscommon.profiles.util.XmlHandler.convertToXmlRtc(XmlHandler.java:126)
... 62 more
Caused by: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory
at org.eclipse.core.runtime.internal.adaptor.ContextFinder.loadClass(ContextFinder.java:121)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:117)
... 67 more