cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.IllegalArgumentException when trying to create debug setting

Former Member
0 Kudos

Hello all,

I have just performed an install of EHP1 on a W2K3 EE machine, and I'm trying to setup to debug my Web Dynpro app on the Java server. I have defined the system instance correctly SAP AS Java in the Window --> Preferences --> SAP AS Java section. My Web Dynpro app deploys and runs without problems.

However, when I use Run -> Open Debug Dialog and then click on "Run on Server" and use the "New launch configuration" option, I get a message box stating "java.lang.IllegalArgumentException (check log file)".

So I switch to Plug-in Development perspective and take a look at the log file. The exception appears in the list of messages; double-clicking the exception provides this data:

Severity: Error

Message: Problems occurred when invoking code from plug-in: "org.eclipse.jface".

Exception Stack Trace:

java.lang.IllegalArgumentException

at org.eclipse.wst.server.core.internal.ResourceManager.getServer(ResourceManager.java:758)

at org.eclipse.wst.server.core.ServerCore.findServer(ServerCore.java:286)

at org.eclipse.wst.server.ui.internal.RunOnServerLaunchConfigurationTab.initializeFrom(RunOnServerLaunchConfigurationTab.java:105)

at org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup.initializeFrom(AbstractLaunchConfigurationTabGroup.java:86)

at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupWrapper.initializeFrom(LaunchConfigurationTabGroupWrapper.java:143)

at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.displayInstanceTabs(LaunchConfigurationTabGroupViewer.java:784)

at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer$8.run(LaunchConfigurationTabGroupViewer.java:658)

at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)

at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.inputChanged(LaunchConfigurationTabGroupViewer.java:676)

at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.setInput0(LaunchConfigurationTabGroupViewer.java:637)

at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.setInput(LaunchConfigurationTabGroupViewer.java:613)

at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.handleLaunchConfigurationSelectionChanged(LaunchConfigurationsDialog.java:975)

at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog$4.selectionChanged(LaunchConfigurationsDialog.java:570)

at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:842)

at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)

at org.eclipse.core.runtime.Platform.run(Platform.java:857)

at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)

at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:199)

at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:840)

at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1153)

at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1178)

at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:250)

at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:244)

at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:418)

at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)

at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:129)

at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)

at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)

at org.eclipse.jface.window.Window.open(Window.java:796)

at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.open(LaunchConfigurationsDialog.java:1133)

at org.eclipse.debug.ui.DebugUITools$1.run(DebugUITools.java:387)

at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)

at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:391)

at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:333)

at org.eclipse.debug.ui.actions.OpenLaunchDialogAction.run(OpenLaunchDialogAction.java:82)

at org.eclipse.debug.ui.actions.OpenLaunchDialogAction.runWithEvent(OpenLaunchDialogAction.java:90)

at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:246)

at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)

at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:546)

at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)

at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)

at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)

at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)

at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)

at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)

at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)

at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)

at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)

at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)

at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)

at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)

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:585)

at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)

at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)

at org.eclipse.equinox.launcher.Main.run(Main.java:1173)

at org.eclipse.equinox.launcher.Main.main(Main.java:1148)

Session Data:

eclipse.buildId=M20080221-1800

I've done some hunting around the internet for this error and I did find a problem that looks quite similar under a JBOSS forum: https://jira.jboss.org/jira/browse/JBIDE-3689 ("Creating new run configuration of type Run in Server fails with exception, jbds eclipse.buildId=1.1.0.GA"). The information presented there is almost exactly what I'm seeing:

<cut>

Steps to Recreate:

1. From Run menu, select "Open Run Dialog..." or "Open Debug Dialog..."

2. Right click on "Run on Server"

3. Select "New"

What you see is an "Error" dialog of Reason "java.lang.IllegalArgumentException".

The error log records the following:

Error

Thu Jan 29 08:13:48 PST 2009

Problems occurred when invoking code from plug-in: "org.eclipse.jface".

</cut>

In the JBOSS case, the response is:

<cut>

It is is a known bug in WTP 2.x and in WTP 3.x this option does not exist anymore thus you should just use Run As -> Run in Server.

Marked as out of date since latest version of WTP 3 has the fix.

</cut>

I have the EHP1 installed on a couple other servers where this is not happening. Anyone run into this before?

Alternatively, anyone know how I can check the WTP of the SAP-specific eclipse released as the EHP1 developer studio?

Thanks very much,

Andy

Accepted Solutions (1)

Accepted Solutions (1)

pravesh_verma
Active Contributor
0 Kudos

Hi Andy,

I think there is a very siple proces which you need to follow for debug. Please have a look:-

Please check you mentioned the correct server and instance name. As you are saying that all you applications are running fine therefore I think you would have mentioned all the required parameters correctly.

After checking all these things, follow the steps below:-

1) From the menu in NWDS -> Click on the Debug symbol. Select "Open Debug Dialoug".

2) Right click on the "Remote Java Application" and select New.

3) Clickon the Source tab. Check whether you application is included under the Defualt folder. Only those projects will be debugged which are under this folder.

4) If you application is not there. Click on Add-> Java Project -> Select your Project - > OK. Doing this will add your project in debug instance.

5) Go to Connect tab. Mention the Host name (Same as server name you have mentioned under Window --> Preferences --> SAP AS Java ) AND the Message server port. Please note that this server port is diffrent from the http port.

6) Just click on Debug.

I hope after all these steps debug should work. If not please revert back.

Thanks and Regards,

Pravesh

Answers (2)

Answers (2)

Former Member
0 Kudos

Found the answer by lots of trial and error.

Former Member
0 Kudos

Hi All,

While Pravesh's answer was helpful, it actually applies to debugging J2EE apps deployed to AS Java (not Web Dynpro). However, it put me on the right track and I have documented in some detail exactly how I got Web Dynpro debugging working. I included the detailed steps in my writeup at http://sites.google.com/site/softwareabnet/sap-adobe-forms-integration-ehp1 (see the doc file I put on there).

Cheers,

Andy