- This topic has 35 replies, 10 voices, and was last updated 20 years, 5 months ago by Riyad Kalla.
-
AuthorPosts
-
Kyle AdamsMemberI was playing around with my evaluation version of MyEclipse, attempting to set it up with some existing projects, including a Struts 1.1 web project. After setting up the Web project, I right-clicked on the project, selected MyEclipse > Add Struts Capabilities… and ran into this error:
Invalid struts 1.0 config file found.
org.apache.commons.logging.LogConfigurationException:
java.lang.ClassNotFoundException:
org.easystruts.struts.config.EasyStrutsLogFactory:
java.lang.ClassNotFoundException:
org.easystruts.struts.config.EasyStrutsLogFactoryA bit puzzling, since this is a Struts 1.1 project, but there was an OK button, so I clicked on it. A dialog opened up titled “Struts Support for MyEclipse Web Project”; I tried to set the Struts specification option to “Struts 1.1”. That brought up this (pretty much identical) error:
Invalid struts 1.1 config file found.
org.apache.commons.logging.LogConfigurationException:
java.lang.ClassNotFoundException:
org.easystruts.struts.config.EasyStrutsLogFactory:
java.lang.ClassNotFoundException:
org.easystruts.struts.config.EasyStrutsLogFactoryMy guess is that something is off-kilter in regards to MyEclipse 3.7 Struts Support plugin/Eclipse 3.0. Any ideas?
Riyad KallaMemberAre you using Eclipse 3.0M7? What are the <xml> and DTD header lines from your struts-config.xml file? Are you using multiple struts-config.xml files? When you clicked on “Add struts cap” did a little dialog popup telling you how many forms, actions, etc. were found? (this is an existing project right?)
Does your project compile correctly when its just a Web Project?
Kyle AdamsMember> Are you using Eclipse 3.0M7?
Yes.
> What are the <xml> and DTD header lines from your struts-config.xml file?
<?xml version=”1.0″ encoding=”ISO-8859-1″ ?>
<!DOCTYPE struts-config PUBLIC “-//Apache Software Foundation//DTD Struts Configuration 1.1//EN” “http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd”>> Are you using multiple struts-config.xml files?
No.
> When you clicked on “Add struts cap” did a little dialog popup telling you how many forms, actions, etc. were found? (this is an existing project right?)
It is an existing project, and no, I did not get a little dialog popup*.
> Does your project compile correctly when its just a Web Project?
Yes.
* An update–I tried installing the Easy Struts plugin (version 0.63, yes, I know there’s a 0.64, but for some reason only 0.63 is available through the update site and I detest installing plugins from .zip files) to see if that would resolve the “ClassNotFoundException”. Even though there’s no mention of 3.0M7 capatibility on the Easy Struts web site, it seemed to work fine. When I retried the “MyEclipse > Add Struts capability”, it ran fine, gave me the little popup dialog, the whole 10 yards.
I suspect (though I haven’t tried) I could replicate my problem just by uninstalling the Easy Struts plugin and trying to add Struts capabilities to another existing project.
For the record, besides MyEclipse, the only features I had installed at the time of the problem were JFaceDbc 2.2.1 and PMD 2.0.2v3. Since then, the only plugin I’ve added was Easy Struts 0.6.3.
Riyad KallaMemberCan you give us a quick overview of your project organization? Is it a standard exploded WAR format? I’ll bring this to the attention of the dev team as this sounds very strange and we haven’t ecountered this report before.
Kyle AdamsMemberPretty standard web project organization:
src/ – java source code
web/ – JSPs, web.xml, tlds, etc.About the only thing different from MyEclipse defaults is that the libraries are stored under a lib/ directory, rather than web/WEB-INF/lib. Our Ant buildfile moves them over to web/WEB-INF/lib when created the exploded WAR. Due to that difference, I have the Web Project Build Path Policy set to “No, I will manually manage Web Project build paths.”
Thanks for the quick replies, btw.
support-michaelKeymasterWhile I’m wouldn’t bet on it since this is Eclipse 3M7, plugin first principles lead me to believe that installation of EASY Struts has nothing to do with the problem resolution. That is unless there is a bug in the Eclipse 3.0 Mx classloader model which does not maintain class isolation between plugins. (I’ll research Eclipse bugz on this.) Also MyEclipse incorporated radical changes to EASY Struts wizard code to work with our project model and XML editor. Thus EASY Struts code should have no affect on ME’s Struts operation. Instead I’m wondering if the problem stems from Eclipse 3.0’s OSGI and .config cached model state?
Can you try this experiment:
1) remove EASY Struts plugins
2) start MyEclipse
3) stop MyEclipse
4) start MyEclipse
5) create Web Project and test adding Struts Capabilities
6) if no luck try deleting the <eclipse install>/eclipse/.config directory and repeating 2-5
Kyle AdamsMemberExperiment run, same error message, even after removing the .config directory.
Just to verify, here are the steps I went through:
1) Removed the web project (without deleting the contents of the web project on the file system)
2) Shutdown MyEclipse
3) Clean out all MyEclipse/Eclipse files from the web project
4) Removed Easy Struts plugin
5) Restarted MyEclipse
6) Shutdown MyEclipse
7) Restarted MyEclipse
8) Created new web project, pointing to same existing project
9) Attempted add of Struts capabilities* Error *
10) Shutdown MyEclipse
11) Removed .config
12) Restarted MyEclipse
13) Repeated steps #8-9, with same results:* Error *
I’m afraid I can’t be of any technical assistance in debugging Eclipse’s internals, as I know nothing about Eclipse plugin dev. That being said, I’m willing to keep running experiments and feeding info, for what help that is 🙂
Richard DallawayMemberJust FYI, this issue isn’t an one-off. I’m experiencing the same problems with pretty much the same set up, with the exception that we’re using multiple struts-config.xml files.
However, I did create a new (dummy) project and add struts support to that. I then came back into my project in MyEclipse perspective and tried again.
This time, rather than selecting multiple struts-config files I just selected the directory of struts-config files and it appears to all be… OK.
Regards
Richard
support-michaelKeymasterHmm! I’m really interested in replicating this behavior since we have not seen it in our test-cases. For preexisting projects does your struts-config.xml reside under your <web-root folder>/WEB-INF? I would most appreciative if you can describe a scenario that reproduces this problem, e.g., dir structure, location of preexisting struts-config.xml and other resources, ….
Kyle AdamsMemberOut for the weekend, caught a cold over the weekend, etc., yadda yadda.
Once I get back on top of things, I’ll see if I can setup a reproducable case using a publicly available webapp (an example webapp posted in an online Struts tutorial perhaps). If I can reproduce the problem, I’ll include system profile info, exact steps taken, etc.
Riyad KallaMemberkadams,
We really appreciate you hanging in there and helping us track this down. Sometimes we don’t see what the users are seeing but don’t want to leave them in a state where they cannot use our tool to be more productive.
Youssef EnnaciriMemberIm having the same problem, this is happening when enableing the ‘Struts Capabilities’ on an existing project. You can easily reproduce this by downloading the example form the O’reilly @
http://examples.oreilly.com/jakarta/ ( dowload the storefront example storefront-dev.zip )
you can then create a project then try to enable the struts.thanks.
Youssef
Riyad KallaMemberYoussef,
I just downloaded and unzipped that project and create a new project with MyEclipse, I added Struts capabilities to the project, fixed a few HTML problems with the JSP pages and the project worked fine. I don’t have any errors at all.I’m using Eclipse 2.1.3/MyEclipse 2.7.1 on Linux with JDK 1.4.2_04.
Kyle AdamsMember– System Setup ——————————-
Operating System and version: Windows 2000, SP 4
Eclipse version: 3.0.0 (M7)
Eclipse build id: 200402122000
Fresh Eclipse install (y/n): y
If not, was it upgraded to its current version using the update manager?
Other installed external plugins: none
Number of plugins in the <eclipse>/plugins directory that begin with org.eclipse.pde.*: 8
MyEclipse version: 3.7.1
Eclipse JDK version: 1.4.2_02
Application Server JDK version: NA
Are there any exceptions in the Eclipse log file? No– Message Body ——————————-
Hopefully these instructions will help reproduce the problem on anyone’s machine.
1) Clean install of Eclipse 3.0M7
2) Clean install of MyEclipse 3.7.1
3) Downloaded Struts Example webApp from http://www.onjava.com/onjava/2001/10/31/examples/StrutsPartII.jar
4) Made following modifications:
– All *.java files (and associated packaging structure) moved from StrutsSample to peer src directory
– build.xml and strutsSample.war deleted
– Renamed StrutsSample/web-inf to StrutsSample/WEB-INF
– StrutsSample/lib directory moved to StrutsSample/WEB-INF/lib
– Moved all *.tld files from StrutsSample/WEB-INF/lib to StrutsSample/WEB-INF
– Moved META-INF directory to StrutsSample/META-INF
5) Launched MyEclipse
6) Created new J2EE Web Project (via wizard) with the following selections:
– Project Name: strutsSample
– Use Default Location: No
– Directory: <selected project’s base directory>
– Source Folder: src
– Web Folder: StrutsSample
– Context Root: /strutsSample
7) Added WEB-INF/lib/struts.jar to build path
8) Right-clicked on “strutsSample” project directory in the Package Explorer pane
9) Selected MyEclipse > Add Struts Capabilities…
10) Error
11) Shutdown MyEclipse
12) Removed all MyEclipse-related files/dirs from project:
– StrutsSample/WEB-INF/classes
– .project
– .classpath
– .myeclipse
13) Removed $ECLIPSE_HOME/.config directory
14) Started MyEclipse
15) Shutdown MyEclipse
16) Started MyEclipse
17) Repeated steps 6-10, same error
Riyad KallaMemberThank you for the very detailed test case, we will run through this ASAP and see what we find.
-
AuthorPosts