- This topic has 44 replies, 9 voices, and was last updated 19 years, 5 months ago by John Sawers.
-
AuthorPosts
-
Joseph LiMemberAs I mentioned before, it seems that if my JSP page is using any JSP tags that is not recognized by MyEclipse, then the JSP page failed to open in the editor. In version 3.8, it was ok, is there a way to get that behavior back?
Riyad KallaMemberAs I understand your problem you get the “cannot create part” error when opening a JSP in a normal Java Project. The *only* work around for that now (until we get the bugs fixed) is to add your webroot directory to your sources dir in our Java Build Path settings for your project. Have you tried this and it not worked? In your posts I didn’t not see if you tried this or not.
Keith FettermanMemberRiyad,
After installing MyEclipse 3.8.1 with Eclipse 3.0, I encountered the “cannot create part” error when trying to open a JSP file. I didn’t receive this error with beta 2 version 3.8.
I tried your suggestion of adding the webroot directory to the sources dir in the Java Builde Path. It didn’t work. I still receive the error above when opening a JSP file.
When I saved the dialog box that added the webroot defined in the sources dir, I received another dialog box that contained the following errors:
Update JSP Index (Error: An internal error occurred during: “Updating JSP Index”.)
When I clicked on the error, I received the following stack trace:
!ENTRY org.eclipse.core.runtime 4 2 Sep 07, 2004 21:58:38.732
!MESSAGE An internal error occurred during: “Update JSP Index”.
!STACK 0
java.lang.NullPointerException
at com.ibm.sse.model.jsp.contentmodel.tld.TLDCMDocumentManager$DirectiveStructuredDocumentRegionHandler.processInclude(Unknown Source) at com.ibm.sse.model.jsp.contentmodel.tld.TLDCMDocumentManager$DirectiveStructuredDocumentRegionHandler.processInclude(Unknown Source) at com.ibm.sse.model.jsp.contentmodel.tld.TLDCMDocumentManager$DirectiveStructuredDocumentRegionHandler.nodeParsed(Unknown Source)
at com.ibm.sse.model.xml.internal.parser.XMLSourceParser.fireNodeParsed(Unknown Source)
at com.ibm.sse.model.jsp.parser.JSPSourceParser.parseNodes(Unknown Source)
at com.ibm.sse.model.xml.internal.parser.XMLSourceParser.getDocumentRegions(Unknown Source)
at com.ibm.sse.model.internal.text.BasicStructuredDocument.setText(Unknown Source)
at com.ibm.sse.model.internal.text.BasicStructuredDocument.set(Unknown Source)
at com.ibm.sse.model.jsp.modelquery.ModelQueryAdapterFactoryForJSP$TaglibSupportModelLifecycleListener.setDocument(Unknown Source)
at com.ibm.sse.model.jsp.modelquery.ModelQueryAdapterFactoryForJSP$TaglibSupportModelLifecycleListener.processPostModelEvent(Unknown Source)
at com.ibm.sse.model.LifecycleNotificationManager.signalLifecycleEvent(Unknown Source)
at com.ibm.sse.model.AbstractStructuredModel.signalLifecycleEvent(Unknown Source)
at com.ibm.sse.model.AbstractStructuredModel.setStructuredDocument(Unknown Source)
at com.ibm.sse.model.xml.internal.document.XMLModelImpl.setStructuredDocument(Unknown Source)
at com.ibm.sse.model.AbstractModelLoader.load(Unknown Source)
at com.ibm.sse.model.ModelManagerImpl._commonGetModel(Unknown Source)
at com.ibm.sse.model.ModelManagerImpl._commonGetModel(Unknown Source)
at com.ibm.sse.model.ModelManagerImpl.getModelForRead(Unknown Source)
at com.ibm.sse.model.jsp.internal.java.search.JSPSearchDocument.createCompilationUnit(Unknown Source)
at com.ibm.sse.model.jsp.internal.java.search.JSPSearchDocument.<init>(Unknown Source)
at com.ibm.sse.model.jsp.internal.java.search.JSPSearchSupport.addJspFile(Unknown Source)
at com.ibm.sse.model.jsp.internal.java.search.JSPIndexManager$2.visit(Unknown Source)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:68)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:49)
at com.ibm.sse.model.jsp.internal.java.search.JSPIndexManager$1.run(Unknown Source)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
Joseph LiMemberI tried the suggestions too, but was having the same problem as reported by keithdfetterman above. Here is the stack trace of the update index err :
An internal error occurred during: “Update JSP Index”.
java.lang.NullPointerException
com.ibm.sse.model.jsp.contentmodel.tld.TLDCMDocumentManager$DirectiveStructuredDocumentRegionHandler.processInclude(Unknown Source)
com.ibm.sse.model.jsp.contentmodel.tld.TLDCMDocumentManager$DirectiveStructuredDocumentRegionHandler.processInclude(Unknown Source)
com.ibm.sse.model.jsp.contentmodel.tld.TLDCMDocumentManager$DirectiveStructuredDocumentRegionHandler.nodeParsed(Unknown Source)
com.ibm.sse.model.xml.internal.parser.XMLSourceParser.fireNodeParsed(Unknown Source)
com.ibm.sse.model.jsp.parser.JSPSourceParser.parseNodes(Unknown Source)
com.ibm.sse.model.xml.internal.parser.XMLSourceParser.getDocumentRegions(Unknown Source)
com.ibm.sse.model.internal.text.BasicStructuredDocument.setText(Unknown Source)
com.ibm.sse.model.internal.text.BasicStructuredDocument.set(Unknown Source)
com.ibm.sse.model.jsp.modelquery.ModelQueryAdapterFactoryForJSP$TaglibSupportModelLifecycleListener.setDocument(Unknown Source)
com.ibm.sse.model.jsp.modelquery.ModelQueryAdapterFactoryForJSP$TaglibSupportModelLifecycleListener.processPostModelEvent(Unknown Source)
com.ibm.sse.model.LifecycleNotificationManager.signalLifecycleEvent(Unknown Source)
com.ibm.sse.model.AbstractStructuredModel.signalLifecycleEvent(Unknown Source)
com.ibm.sse.model.AbstractStructuredModel.setStructuredDocument(Unknown Source)
com.ibm.sse.model.xml.internal.document.XMLModelImpl.setStructuredDocument(Unknown Source)
com.ibm.sse.model.AbstractModelLoader.load(Unknown Source)
com.ibm.sse.model.ModelManagerImpl._commonGetModel(Unknown Source)
com.ibm.sse.model.ModelManagerImpl._commonGetModel(Unknown Source)
com.ibm.sse.model.ModelManagerImpl.getModelForRead(Unknown Source)
com.ibm.sse.model.jsp.internal.java.search.JSPSearchDocument.createCompilationUnit(Unknown Source)
com.ibm.sse.model.jsp.internal.java.search.JSPSearchDocument.<init>(Unknown Source)
com.ibm.sse.model.jsp.internal.java.search.JSPSearchSupport.addJspFile(Unknown Source)
com.ibm.sse.model.jsp.internal.java.search.JSPIndexManager$2.visit(Unknown Source)
org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:68)
org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:49)
com.ibm.sse.model.jsp.internal.java.search.JSPIndexManager$1.run(Unknown Source)
org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
Riyad KallaMemberGuys are you unable to add Web Capabilities to these projects? That is currently the workaround, and the fix for this problem has been checked into CVS and will be available for our 3.8.2 release, but not right now.
Joseph LiMemberhi Riyad,
Maybe I wasn’t very clear on my original post, The project containing the JSPs are “Simple” projects only and doesn’t not have web cap nor adding web cap to it as an option. So your previous suggestion about adding web cap is not an option. What I tried instead was to include the folder, which holds the JSPs, in the “Java” project’s src directory that it references. But that didn’t work either and produce the err as reported above.
Its fine with me as long as its adderssed future version. For now, I can always fall back to the old trusty vim.
By the way, any projected date where 3.8.2 is going to be beta/released?
Thanks for the help.
Joseph
Keith FettermanMember@support-rkalla wrote:
Guys are you unable to add Web Capabilities to these projects? That is currently the workaround, and the fix for this problem has been checked into CVS and will be available for our 3.8.2 release, but not right now.
I can add “Web Capabilities” to my project, but I would like to know what it will do first.
What will adding “Web Capabilities” do or how will it affect my project? Can I get remove it if it causes problems?
Riyad KallaMemberJoseph,
The project containing the JSPs are “Simple” projects only and doesn’t not have web cap nor adding web cap to it as an option.
Do you mean a File > New > Project > Simple > Project? If so, we do not support this. We have to draw the line somewhere, and with a simple project there is no context information for us to key off of.
What I tried instead was to include the folder, which holds the JSPs, in the “Java” project’s src directory that it references.
I’m confused, because the Simple projects in Eclipse do not hav a build path or source paths… can you clarify what kind of project you are trying to get this to work with?
Riyad KallaMemberI can add “Web Capabilities” to my project, but I would like to know what it will do first.
What will adding “Web Capabilities” do or how will it affect my project? Can I get remove it if it causes problems?Keith this is certainly understandable. Web capabilities first and foremost will let ME know where your webroot is, WEB-INF dir, web.xml file, /lib and /classes dir. This allows ME to handle all class, autocomplete, TLD resolution and the like.
Assuming you set your webroot such that it contains a dir named WEB-INF and a file under that named web.xml, nothing will be added to your project. I believe MyEclipse will create a .myeclipse dir in the root of your project used as a temp dir for compilation, and it will also create a .mymetadata file and add 4 or 5 builders to your .project file and 2 natures.
To remove web capabilities you can erase the builders and natures from your .project file, then kill the .mymetadata file and .myeclipse folder. I know we had a bug filed for “Adding ability to remove web caps” but I can’t find it right now, so this will likely be covered in a future enhancement (removing web capabilities that is).
Joseph LiMemberDo you mean a File > New > Project > Simple > Project? If so, we do not support this. We have to draw the line somewhere, and with a simple project there is no context information for us to key off of.
Yes, thats what I meant in my original post. Then is there an option to default the JSP editors to an external one? I know “Right Click –> Open With –> System Editor” will have the JSP file opened in system default editor, but it would be nice to have a default setting where I don’t have to do it on individual files.
I’m confused, because the Simple projects in Eclipse do not hav a build path or source paths… can you clarify what kind of project you are trying to get this to work with?
In my original post, I mentioned I have two separate projects, one with all the Java sources (in “Java” project) and one with JSP files (in “Simple”) project. What I did was adding the JSP folder to the source of the “Java” project. I guess it wouldn’t work either as its not web cap-ed, and I won’t be putting web-cap and restructuring the app’s dir just to get this to work, its just too time consuming.
In my opinion, failing to open a JSP file just because the project is not web-cap is absurd. There is not a single IDE I have worked with (NetBean, JBuilder, WSAD, Bea Workshop) would not open a JSP file because I didn’t mount the correct dir or something like that. Yes, the code completion would not work but at least they still open in a proper editor with simple syntax highlighting that doesn’t requires project context info.
Riyad KallaMemberbut it would be nice to have a default setting where I don’t have to do it on individual files.
Window > Preferences > Workbench > File Associations
In my opinion, failing to open a JSP file just because the project is not web-cap is absurd.
I don’t follow… I just created a Simple Project, and added a JSP file to it, and double clicked it. It opened up in the MyEclipse JSP editor and gave me basic autocomplete that was working… this sounds like exactly what you want… am I misunderstanding your request? Again double check your JSP associations via the menus I gave above, maybe the JSP files are associated with some other editor? Make sure to open them with “MyEclipse JSP Editor”, it should work fine.
Joseph LiMemberRiyad ,
Thanks for pointing me to the setting.
As for reproducing the problem, u have to use some taglib to make it breaks.
Joseph
Scott AndersonParticipantAs for reproducing the problem, u have to use some taglib to make it breaks.
Problems with taglib and include file usage in plain Java projects, not MyEclipse Web Projects, is a known problem that will be fixed in 3.8.2.
Joseph LiMemberHow about for “Simple” project? Is that going to be addressed in 3.8.2 as well?
Joseph
Scott AndersonParticipantJoseph,
JSP’s in simple projects? I don’t see how that can work when the classpath is needed for libraries, such as taglibs and the
JSP libs needed for compilation, validation, and content assist. -
AuthorPosts