This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 222681 - ResourceSetWorkbenchEditSynchronizer change is causing problem with Web services scenario
Summary: ResourceSetWorkbenchEditSynchronizer change is causing problem with Web servi...
Status: CLOSED DUPLICATE of bug 222321
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: wst.ws (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.0 M6   Edit
Assignee: jst.j2ee CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
: 222682 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-13 18:40 EDT by Trung CLA
Modified: 2008-06-11 16:17 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Trung CLA 2008-03-13 18:40:33 EDT
Build ID: I-I20080313113126

Steps To Reproduce:
1.Follow the tutorial at http://wiki.eclipse.org/Creating_a_Bottom-Up_Java_Web_Service
2. After step 10, see the NPE

More information:
Stack trace:

    java.lang.NullPointerException
    at org.eclipse.jst.ws.internal.consumption.codegen.javamofvisitoractions.JavaMofBeanVisitorAction.visit(JavaMofBeanVisitorAction.java:136)
    at org.eclipse.jst.ws.internal.consumption.codegen.javamofvisitors.JavaMofBeanVisitor.run(JavaMofBeanVisitor.java:41)
    at org.eclipse.jst.ws.internal.consumption.sampleapp.command.JavaToModelCommand.buildModelFromMof(JavaToModelCommand.java:113)
    at org.eclipse.jst.ws.internal.consumption.sampleapp.command.JavaToModelCommand.execute(JavaToModelCommand.java:196)
    at org.eclipse.jst.ws.internal.consumption.ui.widgets.test.wssample.GSTCGenerateCommand.createModel(GSTCGenerateCommand.java:100)
    at org.eclipse.jst.ws.internal.consumption.ui.widgets.test.wssample.GSTCGenerateCommand.execute(GSTCGenerateCommand.java:65)
    at org.eclipse.jst.ws.internal.consumption.ui.widgets.test.ClientTestDelegateCommand.commandFactoryExecution(ClientTestDelegateCommand.java:115)
    at org.eclipse.jst.ws.internal.consumption.ui.widgets.test.ClientTestDelegateCommand.execute(ClientTestDelegateCommand.java:90)
    at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:419)
    at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.visitTop(CommandFragmentEngine.java:359)
    at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.moveForwardToNextStop(CommandFragmentEngine.java:254)
    at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$6.run(SimpleCommandEngineManager.java:294)
    at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:407)
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:347)
    at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)
    at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager.runForwardToNextStop(SimpleCommandEngineManager.java:264)
    at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.runForwardToNextStop(WizardPageManager.java:91)
    at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.performFinish(WizardPageManager.java:262)
    at org.eclipse.wst.command.internal.env.ui.widgets.DynamicWizard.performFinish(DynamicWizard.java:380)
    at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:623)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:982)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3760)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3371)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard.run(DynamicPopupWizard.java:130)
    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:582)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:499)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:410)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:982)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3760)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3371)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2392)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2356)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2222)
    at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:474)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:469)
    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:193)
    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:362)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:564)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1251)
Comment 1 Trung CLA 2008-03-13 19:13:30 EDT
No similar problem found with Axis2 however this might well because:
this problem does not occur when client's scale is only set to 'Deploy'
(in Axis2 there is no test with sample JSP option)
Comment 2 Kathy Chan CLA 2008-03-13 22:20:20 EDT
Looking at CVS, the only changes in Web services plugin that was released yesterday were:

org.eclipse.jst.ws.consumption=v200803122044
org.eclipse.jst.ws.consumption.ui=v200803130435
org.eclipse.jst.ws.creation.ui=v200803122044

I tried using last week's 0306 WTP driver and just replacing the above 3 plugins, the driver still works properly.  So the cause of this failure is likely not due to Web services changes but instead of changes underneath.

Trung, please work with Andrew to try to isolate this problem ASAP since this is affecting main path smoke test scenario.
Comment 3 Kathy Chan CLA 2008-03-14 08:32:57 EDT
I also tried replacing the 3 changed Web services plugin from the 03/06 I-build into the wtp-sdk-I-I20080314073909-20080314073909 driver and got the same problem.  So it does not look like it's the Web services changes that's causing the problem.  The problem seems to point to Java MOF model but I can see that none of the prereq has changed.

Eric, please try to isolate the problem further.
Comment 4 Kathy Chan CLA 2008-03-14 08:37:51 EDT
*** Bug 222682 has been marked as a duplicate of this bug. ***
Comment 5 Eric Peters CLA 2008-03-14 11:25:16 EDT
This defect likely a dup of https://bugs.eclipse.org/bugs/show_bug.cgi?id=222758
After a web service is created by the web service wizard, the server status is restart, and subsequent generation of web service client fails with exceptions when trying to test (i.e. client slider set to "test"). Workaround is similar to that for new project new wsdl, i.e. restart the server first before creating the client.
Comment 6 Andrew Mak CLA 2008-03-14 15:36:00 EDT
w.r.t duplicate bug 222682.  I can sometimes get a ClassNotFoundException after closing/re-opening project.
Comment 7 Kathy Chan CLA 2008-03-14 17:45:29 EDT

*** This bug has been marked as a duplicate of bug 222758 ***
Comment 8 Trung CLA 2008-03-14 18:14:28 EDT
This bug is caused by the new fix for Bug 222321.
Reversing the to prev version of the class 'ResourceSetWorkbenchEditSynchronizer'
will make the problem disappear.

"Thanks for the patch, Chuck.  What happens to older code that does not call the
new method?" as can be read near the end of that 222321 bug.

Should be mark as duplicate for Bug 222758
Comment 9 Trung CLA 2008-03-14 18:15:33 EDT
sorry for the typo in pre comment:
"Should NOT be mark as duplicate for Bug 222758"
instead of 
"Should be mark as duplicate for Bug 222758"
Comment 10 Kathy Chan CLA 2008-03-14 19:33:03 EDT
Trung was able to isolate the problem to be caused by the latest change made to 'ResourceSetWorkbenchEditSynchronizer' which was changed for bug 222321.

To reproduce the Web services problem, just select a WSDL file in a Web project that has not been added to a Tomcat server, move client slider to Test and click Finish, you'll see the error:

java.lang.NullPointerException
    at
org.eclipse.jst.ws.internal.consumption.codegen.javamofvisitoractions.JavaMofBeanVisitorAction.visit(JavaMofBeanVisitorAction.java:136)
    at
org.eclipse.jst.ws.internal.consumption.codegen.javamofvisitors.JavaMofBeanVisitor.run(JavaMofBeanVisitor.java:41)
    at
org.eclipse.jst.ws.internal.consumption.sampleapp.command.JavaToModelCommand.buildModelFromMof(JavaToModelCommand.java:113)
    at
org.eclipse.jst.ws.internal.consumption.sampleapp.command.JavaToModelCommand.execute(JavaToModelCommand.java:196)
    at
org.eclipse.jst.ws.internal.consumption.ui.widgets.test.wssample.GSTCGenerateCommand.createModel(GSTCGenerateCommand.java:100)
    at
org.eclipse.jst.ws.internal.consumption.ui.widgets.test.wssample.GSTCGenerateCommand.execute(GSTCGenerateCommand.java:65)
    at
org.eclipse.jst.ws.internal.consumption.ui.widgets.test.ClientTestDelegateCommand.commandFactoryExecution(ClientTestDelegateCommand.java:115)
    at
org.eclipse.jst.ws.internal.consumption.ui.widgets.test.ClientTestDelegateCommand.execute(ClientTestDelegateCommand.java:90)
    at
org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:419)
    at

Another symptom is if we try to create a bottom-up Web service in a project that we have already run a bottom-up Web service creation scenario on, we would get:

The NPE is:

IWAB0019E Error in getting method from Java bean.
    java.lang.NullPointerException
    at
org.eclipse.jst.ws.internal.axis.creation.ui.command.JavaToWSDLMethodCommand.execute(JavaToWSDLMethodCommand.java:85)
    at
org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:419)

This is described in bug 222682.

The symptom of the problem shows up as Java MOF returning a null class.  We are concern that other components who do similar calls might be affected by the change in this class. We've discussed this problem with Carl and he suggested to have Chuck look at it Monday to assess how other teams might be affected by this change.
Comment 11 Carl Anderson CLA 2008-03-17 15:38:11 EDT
Trung posted patches to fix this problem to 222321 and they have been committed and released.

*** This bug has been marked as a duplicate of bug 222321 ***
Comment 12 Kathy Chan CLA 2008-06-11 16:17:22 EDT
Bug cleanup.  Closing on behalf of the originator.