- - PR -
MacOS X 10.3, Eclipse 2.1.2 & Lomboz 2.1.2でEJBモジュール作成が出来ません
1
| 投稿者 | 投稿内容 | ||||
|---|---|---|---|---|---|
|
投稿日時: 2003-12-15 19:07
MacOS X 10.3でEclipse 2.1.2とLomboz 2.1.2を使用しようと思っているのですが、EJBモジュール作成が上手くいきません。http://www.objectlearn.comのインストール方法に従ってLombozをインストールし、http://www.atmarkit.co.jp/bbs/phpBB/viewtopic.php?topic=4385&forum=12に従いtools.jarの代わりにclasses.jarを選択しました。その後、Lomboz J2EE Projectを作成し、EJBモジュールを追加してOKを押すとダイアログは閉じずに下記のエラーがログに出力されます。
!ENTRY org.eclipse.ui 4 4 12 15, 2003 18:38:48.917 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 12 15, 2003 18:38:48.930 !MESSAGE java.lang.NoSuchMethodError !STACK 0 java.lang.NoSuchMethodError at com.objectlearn.jdt.j2ee.templates.FileTemplate.resolveVariable(FileTemplate.java:207) at com.objectlearn.jdt.j2ee.templates.FileTemplate.resolveProperties(FileTemplate.java:199) at com.objectlearn.jdt.j2ee.templates.FileTemplate.getResolvedBuffer(FileTemplate.java:159) at com.objectlearn.jdt.j2ee.templates.ModuleCreater.createBuildProperties(ModuleCreater.java:452) at com.objectlearn.jdt.j2ee.templates.ModuleCreater.createModule(ModuleCreater.java:509) at com.objectlearn.jdt.j2ee.templates.ModuleCreater.createEjbModules(ModuleCreater.java:181) at com.objectlearn.jdt.j2ee.templates.ModuleCreater.createModules(ModuleCreater.java:153) at com.objectlearn.jdt.j2ee.ui.wizards.WizardInsertModulePage.createModules(WizardInsertModulePage.java:166) at com.objectlearn.jdt.j2ee.ui.wizards.J2EEProjectWizard.performFinish(J2EEProjectWizard.java:145) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:608) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:321) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:423) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1012) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2079) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1795) at org.eclipse.jface.window.Window.runEventLoop(Window.java:583) at org.eclipse.jface.window.Window.open(Window.java:563) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:136) at org.eclipse.ui.internal.NewWizardDropDownAction.run(NewWizardDropDownAction.java:96) at org.eclipse.jface.action.Action.runWithEvent(Action.java:842) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1012) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2079) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1795) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:291) at org.eclipse.core.launcher.Main.run(Main.java:747) at org.eclipse.core.launcher.Main.main(Main.java:583) at java.lang.reflect.Method.invoke(Native Method) at apple.launcher.LaunchRunner.run(LaunchRunner.java:88) at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50) at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52) Lomboz J2EE Moduleを新規に作成しようとすると下記のエラーが出力されます。 !ENTRY org.eclipse.ui 4 4 12 15, 2003 18:57:15.116 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 12 15, 2003 18:57:15.119 !MESSAGE java.lang.NullPointerException !STACK 0 java.lang.NullPointerException at com.objectlearn.jdt.j2ee.ui.wizards.ModuleWizard.addPages(ModuleWizard.java:126) at org.eclipse.jface.wizard.WizardSelectionPage.getNextPage(WizardSelectionPage.java:105) at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:677) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:316) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:423) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1012) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2079) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1795) at org.eclipse.jface.window.Window.runEventLoop(Window.java:583) at org.eclipse.jface.window.Window.open(Window.java:563) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:136) at org.eclipse.ui.internal.NewWizardDropDownAction.run(NewWizardDropDownAction.java:96) at org.eclipse.jface.action.Action.runWithEvent(Action.java:842) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1012) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2079) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1795) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:291) at org.eclipse.core.launcher.Main.run(Main.java:747) at org.eclipse.core.launcher.Main.main(Main.java:583) at java.lang.reflect.Method.invoke(Native Method) at apple.launcher.LaunchRunner.run(LaunchRunner.java:88) at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50) at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52) WindowsXPでは上記の手順(tools.jarを使用)で問題ありませんでした。 MacOS Xを使用し始めたばかりの素人で、どこから解析を行えばよいかわかりません。 どなかたご存知の方がいらっしゃいましたらご教授願います。 | ||||
|
投稿日時: 2003-12-15 22:06
boosuzukiさん、こんにちは。
1.FileTemplate.javaの207行目で何のクラスのメソッドを呼び出そうと しているか調べてはどうでしょうか? 2.同様に、ModuleWizard.javaの126行目で nullになりそうなものは 何か調べると原因がわかるかも知れません。 私がソース見てあげる余裕がないので、チャレンジしてみてください。 | ||||
|
投稿日時: 2003-12-15 22:37
早速のご返答、有り難うございます。
早速調べてみます。 | ||||
|
投稿日時: 2003-12-15 22:53
ソースコードが未だ利用できないようです。(アメリカ時間で12月15日なので明日?)
ソースを見つけ次第報告します。 ありがとうございました。 | ||||
|
投稿日時: 2003-12-18 14:15
ソースコードが未だリリースされていないようなので問題の本質の解決にはなりませんが、Lomboz 2.1.1を使用すると問題無く動きました。
ありがとうございました。 | ||||
|
投稿日時: 2004-01-05 11:23
ソースが公開されたようです。FileTemplateの207行目は、
java.lang.StringBufferのJDK1.4から追加された メソッドを呼び出しているようです。 Windowsなら環境変数とかEclipseの参照を1.4にすれば良いと思うのですが。 (すいません、Macはよく分かりません。) | ||||
|
投稿日時: 2004-01-05 11:40
unibon です。こんにちわ。
以下、余談に近くなりますが、 http://www.atmarkit.co.jp/bbs/phpBB/viewtopic.php?topic=3770&forum=12 のような状況だったのかなと思います。 なお、NoSuchMethodError は、見つけることのできなかったメソッド名は表示してくれないのでしたっけ。たしか表示する場合もあったと思いますが、表示する・しないは、なにで決まるのでしょうかね。 | ||||
|
投稿日時: 2004-01-08 10:33
ソースコードの公開情報をお知らせいただき有り難うございました。
さて、早速ソースを見てみました。問題の箇所はFileTemplate.javaのresolveVariable()の先頭の一行の int start = buffer.indexOf(START + name + END); でした。(ソースの一部を最後に添付してあります。) bufferはStringBufferタイプでSTARTとENDはstatic final Stringタイプです。 Mac版EclipseはJ2SE 1.3.1で開発され、MacOS X 1.3(Panther)の標準JREのバージョンも1.3.1です。 (1.4.1も標準でインストールはされています。) その為、bufferにはindexOf()が無く、java.lang.NoSuchMethodErrorが出ていました。 bufferをStringにキャストすればこの部分の問題は解決できると思いますが、 その他の箇所にも互換性の問題が有るでしょうね。 (すみません、まだコンパイルして確認していません。) 今後はソースを修正しての動作検証とJRE1.4.1での動作検証を行っていこうと思います。 (時間が無くて出来なかったらすみません。m( )m) public class FileTemplate { private String templateFile ; private StringBuffer buffer; private File file; private static final String START = "${"; private static final String END = "}"; ... private void resolveVariable(String name, String value) { try { int start = buffer.indexOf(START + name + END); if (start < 0) return ; int end = start + START.length() + END.length() + name.length(); buffer.replace(start,end,value); resolveVariable(name, value); } catch (Exception e) { } } ... } | ||||
1
