This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 182012 - Run on Server a JSP fails on web 2.5 modules : JSFFileURL should not refer to WebArtifactEdit for JEE Web 2.5 modules : classcastexception
Summary: Run on Server a JSP fails on web 2.5 modules : JSFFileURL should not refer t...
Status: CLOSED FIXED
Alias: None
Product: Java Server Faces
Classification: WebTools
Component: JSF Tools (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: 2.0 RC2   Edit
Assignee: Gerry Kessler CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 187703
Blocks:
  Show dependency tree
 
Reported: 2007-04-11 15:31 EDT by Raj Mandayam CLA
Modified: 2007-06-06 10:13 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raj Mandayam CLA 2007-04-11 15:31:11 EDT
Build ID: WTP 2.0 M6

Steps To Reproduce:
1. create web 2.5 project targeted to tomcat 6
2. create a jsp
3. run on server  (in M6 it breaks because of bug 181271, but when we started fixing it, it still breaks because of the JSFFileURL

java.lang.ClassCastException: org.eclipse.jst.javaee.web.internal.util.WebResourceImpl
	at org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit.getDeploymentDescriptorRoot(WebArtifactEdit.java:332)
	at org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit.getWebApp(WebArtifactEdit.java:623)
	at org.eclipse.jst.jsf.core.internal.launch.JSFFileURL.getFileURL(JSFFileURL.java:58)
	at org.eclipse.jst.jee.ui.internal.deployables.WebDeployableArtifactUtil.getModuleObject(WebDeployableArtifactUtil.java:163)
	at org.eclipse.jst.jee.ui.internal.deployables.WebDeployableArtifactAdapterFactory.getModuleArtifact(WebDeployableArtifactAdapterFactory.java:30)
	at org.eclipse.wst.server.core.model.ModuleArtifactAdapterDelegate.getModuleArtifacts(ModuleArtifactAdapterDelegate.java:46)
	at org.eclipse.wst.server.core.internal.ModuleArtifactAdapter.getModuleArtifacts(ModuleArtifactAdapter.java:181)
	at org.eclipse.wst.server.core.internal.ServerPlugin.getModuleArtifacts(ServerPlugin.java:892)
	at org.eclipse.wst.server.ui.internal.actions.RunOnServerActionDelegate.selectionChanged(RunOnServerActionDelegate.java:713)
	at org.eclipse.wst.server.ui.internal.ServerLaunchShortcut.launch(ServerLaunchShortcut.java:38)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(LaunchShortcutExtension.java:430)
	at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.run(LaunchShortcutAction.java:66)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
	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:3673)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2337)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2301)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2176)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:463)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:458)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:146)
	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:356)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:171)
	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:476)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1141)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1116)

Right now we will comment that section of the code

More information:
Comment 1 Gerry Kessler CLA 2007-04-12 15:02:58 EDT
Hi Chuck,

I'm glad you added yourself (or someone did that for you) to the CC list.   The class cast exception is occurring in the j2ee code.  All we are doing is requesting the webApp via the WebArtifactEdit (read only).  There is no reason why I cannot do that, is there?

Who is the appropriate person/component to assign this to?  

GK
Comment 2 Gerry Kessler CLA 2007-04-18 12:38:45 EDT
Raj,  I am unable to reproduce this problem.  Why did you say that I should not refer to WebArtifactEdit with 2.5 Web Modules?   

Chuck, please comment.  The class cast exception was real, but in j2ee code.     

Comment 3 Gerry Kessler CLA 2007-05-17 11:07:18 EDT
Fixed in S2.0RC0-200705170850
Comment 4 Gerry Kessler CLA 2007-05-17 18:52:25 EDT
Problem discovered and fixed.  Must wait for 187703 for verification.  
Comment 5 Raghunathan Srinivasan CLA 2007-05-24 17:01:17 EDT
Not fixed in wtp-S-2.0RC1-200705241537
Comment 6 Gerry Kessler CLA 2007-06-01 11:35:56 EDT
fix is verified in for S-2.0RC2-20070531
Comment 7 John Lanuti CLA 2007-06-06 10:13:23 EDT
Closing as verified.