- This topic has 9 replies, 4 voices, and was last updated 21 years, 6 months ago by
Scott Anderson.
-
AuthorPosts
-
Christopher TuckMemberI have a MyEclipse Web project where JSP code changes are not syncing correctly over to the deployment (although there are no errors given). I have to redeploy to see the changes. Java code changes seem to synchronise over fine.
My setup is:
OS: Windows XP Pro SP1
Eclipse: Eclipse 2.1.0 Build id: 200303272130
MyEclipse: 2.6
Server: Tomcat 4.1.27My project is located inside my workspace directory. I am doing an exploded deployment and I do have “Perform build automatically on resource modication” checked.
I also have another possibly related problem when I make a change to web.xml or struts-config.xml. In the Eclipse UI I see the following:
—
Error after saving web.xml:
Save problems
Save could not be completed
Reason:
Errors during build.
java.lang.ClassCastException encountered while running com.genuitec.eclipse.j2eedt.core.builder.DeploymentDescriptorValidator.—
In .log file I can see the following:!ENTRY org.eclipse.core.resources 4 2 Aug 28, 2003 16:12:57.319
!MESSAGE Problems occurred when invoking code from plug-in: “org.eclipse.core.resources”.
!STACK 0
java.lang.ClassCastException
at org.apache.xerces.parsers.SAXParser.<init>(SAXParser.java:95)
at com.genuitec.eclipse.j2eedt.core.builder.XMLResourceParser.<init>(Unknown Source)
at com.genuitec.eclipse.j2eedt.core.builder.XMLValidationChecker.checkFile(Unknown Source)
at com.genuitec.eclipse.j2eedt.core.builder.DeploymentDescriptorValidator.ā(Unknown Source)
at com.genuitec.eclipse.j2eedt.core.builder.DeploymentDescriptorValidator.access$0(Unknown Source)
at com.genuitec.eclipse.j2eedt.core.builder.DeploymentDescriptorValidator$A.visit(Unknown Source)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:71)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:52)
at com.genuitec.eclipse.j2eedt.core.builder.DeploymentDescriptorValidator.ā(Unknown Source)
at com.genuitec.eclipse.j2eedt.core.builder.DeploymentDescriptorValidator.build(Unknown Source)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:427)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:889)
at org.eclipse.core.runtime.Platform.run(Platform.java:413)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:125)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:181)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:191)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:151)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:889)
at org.eclipse.core.runtime.Platform.run(Platform.java:413)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:165)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:243)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:212)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:884)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1600)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:85)
at org.eclipse.ui.texteditor.AbstractTextEditor.performSaveOperation(AbstractTextEditor.java:3033)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSave(AbstractTextEditor.java:2836)
at org.eclipse.ui.editors.text.TextEditor.doSave(TextEditor.java:244)
at org.eclipse.ui.internal.EditorManager$11.run(EditorManager.java:1089)
at org.eclipse.ui.internal.EditorManager$8.run(EditorManager.java:960)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:302)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:252)
at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:431)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:428)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1385)
at org.eclipse.ui.internal.EditorManager.runProgressMonitorOperation(EditorManager.java:966)
at org.eclipse.ui.internal.EditorManager.savePart(EditorManager.java:1094)
at org.eclipse.ui.internal.WorkbenchPage.savePart(WorkbenchPage.java:2353)
at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:2365)
at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:57)
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.sendEvent(Widget.java:840)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1838)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1545)
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:845)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
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:324)
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)Any ideas?
thanks
Chris Tuck
Expert Information Services
support-michaelKeymasterHi Chris,
A few questions:
1) What JDK version are you using?
2) Does JSP deployment function properly if you create a simple sample web application and try the auto-deploy actions?
3) Are you launching Eclipse with any special commandline options and/or are you using the JDK endorse mechanism either through system property or by adding endorsed subdir to your JDK environment? If this question doesn’t make sense then I assume the answer is no.
4) Are you confirming the deployment failure by physical inspection of Tomcat’s web deployment area or by trying to invoke web page and view new changes?
5) Has the project in question ever been used with Sysdeo Tomcat plugin.
6) Please send us a copy of your .project file (support@genuitec.com)Michael
MyEclipse Support
Kev PalfreymanMemberSorry, not a fix, I’m seeing the same error!
java.lang.ClassCastException
at org.apache.xerces.parsers.SAXParser.<init>(SAXParser.java:95)
at com.genuitec.eclipse.j2eedt.core.builder.XMLResourceParser.<init>(Unknown Source)
at com.genuitec.eclipse.j2eedt.core.builder.XMLValidationChecker.checkFile(Unknown Source)
at com.genuitec.eclipse.j2eedt.core.builder.DeploymentDescriptorValidator.ā(Unknown Source)
at com.genuitec.eclipse.j2eedt.core.builder.DeploymentDescriptorValidator.access$0(Unknown Source)
at com.genuitec.eclipse.j2eedt.core.builder.DeploymentDescriptorValidator$A.visit(Unknown Source)……
I’m running MyEclipse2.6, WinXPsp1, Java1.4.2, Tomcat4.1.24, struts1.1, jstl1.03
The other related issue (cause?) is that if I try to edit and save any XML file (web.xml, struts-config.xml) I get a warning:
“web.xml will be saved in windows-1252 encoding which is not the current workbench encoding. This can result in conflicts with other tools. Continue anyway?” {yes/no}
If I say yes then I get another error – save problems, – errors during build, and the details shows:
java.lang.ClassCastException while running com.genuitec.eclipse.j2eedt.core.builder.DeploymentDescriptorValidator.This only started happening this afternoon, and I have no idea what I did to get it in this state. I have not changed the encoding at all within eclipse, and 1252 is the default encoding if I check in prefs. I also tried deleting the web.xml file and updating with a fresh version from CVS, but I get the same issue.
Currently, I’m stuck and can’t test/deploy the project.
Any more ideas, or am I back to re-installing MyEclipse, or trying reverting to 2.5.1? Its odd that it only just started happening… although this may be the first time I edited XML since updating to 2.6.0 yesterday…
Kev
Kev PalfreymanMemberMy answers (not the original poster) to some of your questions:
1) What JDK version are you using?
Sun 1.4.2 on WinXPsp12) Does JSP deployment function properly if you create a simple sample web application and try the auto-deploy actions?
OK – I just tried to create a new web project (everything default, just supply a name), and it failed when I hit finish.
“Error Creating Java Project”,
“!NewProjectCreationWizard.op_error.message!”, “Reason: Error during build.”
Same details as before – ClassCastException in the DeploymentDescriptorValidator.
Close the error dialog, hit finish again, and it seems to then create the project. Does not appear to be deployed at this stage. Add a deployment target and deploy and it seems to deploy OK. However, if I open web.xml, add a blank line and then save, I get the ClassCastEx build error (but not the encoding error interestingly).3) Are you launching Eclipse with any special commandline options and/or are you using the JDK endorse mechanism either through system property or by adding endorsed subdir to your JDK environment? If this question doesn’t make sense then I assume the answer is no.
Startup options:
C:\java\eclipse\eclipse.exe -data \dev\workspace -vm \java\j2sdk1.4.2\bin\javaw.exe -vmargs -Xmx256MNo endorsed directories.
4) Are you confirming the deployment failure by physical inspection of Tomcat’s web deployment area or by trying to invoke web page and view new changes?
Does not deploy when getting this error.
5) Has the project in question ever been used with Sysdeo Tomcat plugin.
No.
6) Please send us a copy of your .project file (support@genuitec.com)
Sure – do you want mine too? (but I’m getting some errors with the empt default project.)
Hope this helps,
Kev
support-michaelKeymasterFor 2.6 there were no changes to the XML editor so our first thought is environment, particularly JDK version. I just ran an experiement with JDK 1.4.2 on Windows and only observed the file encoding warning that you mentiond but with a different encoding. So rolling back to ME2.5.1 will probably not rectify the situation. While we research this here are somethings to try:
1) can you try launching Eclipse/MyEclipse with an early version of the JDK, e.g., 1.3.x, 1.4.[0|1]?
2) disable the XML validation mechanism. See the “Deployment Descriptor option on the preference page: windows->preferences->myeclipse->editors->xml. This should allow you to deploy and test.
Please post any findings back to this thread.
Michael
MyEclipse Support
support-michaelKeymasterHere is a quick update on this situation. I worked on this for several hours yesterday and its definitely an environment problem. I appreciate the support information some of you provided me. I have not isolated the problem yet but I was able to reproduce it but not consistently. 🙁
I will continue working with several environments trying to isolate the problem. I’ll let you know as soon as I find something. This is a freaky wierd one.
Michael
MyEclipse Support
Scott AndersonParticipantWe isolated this problem over the weekend and released version 2.6.1 to address it. There is a full announcement in the ‘Announcements’ forum regarding the new release.
Thanks you to all who worked with us to isolate this problem so that we could address it.
–Scott
MyEclipse Support
Christopher TuckMemberHi Michael,
1) What JDK version are you using?
Java SDK 1.4.1_042) Does JSP deployment function properly if you create a simple sample web application and try the auto-deploy actions?
When I tried to create a new web project I got the following message in eclipse.
Error creating Java Project.
!NewProjectCreationWizard.op_error.message!
Reason:
Errors during build.
java.lang.ClassCastException encountered while running com.genuitec.eclipse.j2eedt.core.builder.DeploymentDescriptorValidator.Then clicking finish and you can see the web project has been created. The exception trace in the .log file is the same as the exception in my initial post.
After deploying the project I was able to confirm that the JSP did automatically update the deployment when I saved changes. So this worked fine. Also updating the web.xml restarted the web container as expected. So this all worked fine apart from the error during the initial creation of the project.
3) Are you launching Eclipse with any special commandline options and/or are you using the JDK endorse mechanism either through system property or by adding endorsed subdir to your JDK environment? If this question doesn’t make sense then I assume the answer is no.
No, just whatever the default MyEclipse shortcut uses.
4) Are you confirming the deployment failure by physical inspection of Tomcat’s web deployment area or by trying to invoke web page and view new changes?
Both, I had the deployed jsp open in an editor that detects the changed files.
5) Has the project in question ever been used with Sysdeo Tomcat plugin.
Yes.
6) Please send us a copy of your .project file (support@genuitec.com)
Will do.thanks
Chris Tuck
Expert Information Services
Christopher TuckMemberThis is in update to my previous post:
I was able to get round the problem above by recreating all my projects from scratch which gave me new .project files (and any other related files presumably). Once I’d done this then when I modified a jsp file or the web.xml then the web container refreshed as expected. I still get the same exception as before when I update the web.xml file but after I ‘ok’ that then the web container still reloads ok. Anyway it sounds like this exception is the one that everyone is getting and not specific to my environment.
I believe the problem must have been due to some sort of corruption to my project files from a previous plugin.
Chris Tuck
Expert Information Services
Scott AndersonParticipantChris,
You’ll still need to upgrade to 2.6.1 to keep this problem from reoccurring. The instructions on how to do this are in the FAQ section. Using the Install / Update perspective is the easiest method, providing you’re not behind a very restrictive firewall the prohibits this.
–Scott
MyEclipse Support -
AuthorPosts