- This topic has 19 replies, 4 voices, and was last updated 18 years, 1 month ago by Chandni.
-
AuthorPosts
-
xsunMember– System Setup ——————————-
Operating System and version:
Eclipse version: 2.1.2
Eclipse build id: 200311030802
Fresh Eclipse install (y/n): n
If not, was it upgraded to its current version using the update manager? n
Other installed external plugins: perforce
Number of plugins in the <eclipse>/plugins directory that begin with org.eclipse.pde.*: 7
MyEclipse version: 2.7.1
Eclipse JDK version: java.version=1.4.1_01
Application Server JDK version: 1.4.1
Are there any exceptions in the Eclipse log file?
!SESSION Apr 08, 2004 17:44:54.933 ———————————————
java.version=1.4.1_01
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86 -install file:E:/eclipse/
!ENTRY com.genuitec.eclipse.cross.easystruts.eclipse 1 1 Apr 08, 2004 17:44:54.933
!MESSAGE Unable to load StrutsProjectwebui
!STACK 0
java.io.FileNotFoundException: C:\Empirix\eloadSrc\webui\.mystrutsdata (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:103)
– Message Body ——————————-The deployment of my web app appears to be successful. I start up JBoss in debug mode in MyEclipse. I start my web app, fail on the first page, which is index.jsp. I go into the work folder in tomcat, I see that a folder for my web app is created as expected, I drill down from that folder:
server\default\work\jboss.web\localhost\[myWebApp]\org\apache\jsp
in this folder I see index_jsp.java is created, but the web server doesn’t create index_jsp.class for me, I get an exception instead:
——————————-
18:36:24,887 ERROR [Engine] StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo.<init>(Ljava/lang/String;ZLjava/lang/String;ZZ)V
at org.apache.jasper.compiler.TagLibraryInfoImpl.createAttribute(TagLibraryInfoImpl.java:588)
at org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:435)
at org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:291)
at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:205)
———————————————My Web App used to work, I don’t remember exactly when it starts to have this problem.
I think my src code is written correctly, because I just built and deployed my web app using an ant file, the web app works well. I notic the war file I deployed through MyEclipse is slightly(1KB) smaller than the war file I got through ant file.
Any thoughts? Thank you!
xsun
Riyad KallaMemberFrom this error:
java.lang.NoSuchMethodError
It sounds like you are trying to use something that isn’t there, which is usually indicitive of having developed code against a newer API, then trying to run the app against older versions of the same API. More specifically, I’m wondering if you developed your app against J2EE 1.4 and are now running it on a J2EE 1.3 compliant container. OR if you developed your app against Tomcat 5 and are trying to run it against Tomcat 4 (Default for JBoss 3.2).
Do any of these situations sound possible?
xsunMemberI am using JBoss3.2.4, which uses tomcat5. I am wondering if MyEclipse supports that. Or when I deploy I should choose JBoss4 instead of JBoss3?
Thank you.xsun
Riyad KallaMemberxsun,
Did you upgrade your version of JBoss recently (from 3.2.3 to 3.2.4 for example)? I don’t think changing your server connector config will help, since you problem is stemming from an exception on the server itself. Have you tried running your app with JBoss 3.2.3 (Tomcat 4) and see if it works? I’m still curious if you upgraded some libs or your app server recently and that is why you are getting the tagext MethodNotFoundException.If your server is starting/stopping correctly then MyEclipse seems to be working fine, the problem will be with the app server. Also, something you can check is to see if you have any additional JARs on your app server’s classpath from MyEclipse, go here: Window > Preferences > MyEclipse > App. Servers > JBoss 3 > Paths, and double check the JARs (if any) that are added here.
Also look at your project’s build path, if you have the “J2EE 1.3 Library Set” added to your build path, you can try and remove it, and add the servlet-api.jar and jsp-api.jar files from your Tomcat 5 common/lib directory instead. Then rebuild your project to see if it still compiles correctly, if it doesn’t then your probably is a library issue like I mentioned above. More specifically, you are developing against J2EE 1.3 libs, and then Tomcat 5 supports the newer JSP 2.0 and Servlet 2.4 specs (part of J2EE 1.4) which is where your conflict is likely comming from. A solution is to either update your code to use the newer spec, or downgrade your server to Tomcat 4.
xsunMemberYes, U R right. My teammates recently upgraded us to JBoss3.2.4. I will try the things you suggested.
Riyad KallaMemberKeep us posted when you get a chance to try it, I’m very curious to know what the problem was 😉
xsunMemberIf your server is starting/stopping correctly then MyEclipse seems to be working fine, the problem will be with the app server. Also, something you can check is to see if you have any additional JARs on your app server’s classpath from MyEclipse, go here: Window > Preferences > MyEclipse > App. Servers > JBoss 3 > Paths, and double check the JARs (if any) that are added here.
Yes my server is starting/stopping correctly.
I checked “Window > Preferences > MyEclipse > App. Servers > JBoss 3 > Paths”, there are nothing specified there.Also look at your project’s build path, if you have the “J2EE 1.3 Library Set” added to your build path, you can try and remove it, and add the servlet-api.jar and jsp-api.jar files from your Tomcat 5 common/lib directory instead. Then rebuild your project to see if it still compiles correctly, if it doesn’t then your probably is a library issue like I mentioned above. More specifically, you are developing against J2EE 1.3 libs, and then Tomcat 5 supports the newer JSP 2.0 and Servlet 2.4 specs (part of J2EE 1.4) which is where your conflict is likely comming from. A solution is to either update your code to use the newer spec, or downgrade your server to Tomcat 4.
I don’t have “J2EE 1.3 Library Set” in my build path. I have servlet-api.jar, but I don’t have jsp-api.jar, so I added that. Then I compiled my web project, compiled successfully. I started JBoss, still had the same problem.
I am very confused 🙁 I read through my ant file and make sure the classpath in my ant file is correctly reflected in MyEclipse settings, but still having the same failure… This is not a “Good Friday” for me …
Any more thoughts on this?
Thank you.xsun
Riyad KallaMemberDoes your application need an EJB container (like JBoss) or can it run in a straight Servlet Container (Tomcat)? If it can run in a Servlet container, I’d suggest downloading Tomcat 4 and Tomcat 5 and unzipping both. Then set them up in MyEclipse. Now deploy your app to both, and run one at a time (with JBoss shut down of course) and see if it runs in either of them.
You said that your team upgraded from 3.2.3 to 3.2.4 recently; can you download JBoss 3.2.3 again, and see if you app works in it? As I mentioned in my previous message, if that does work you have two choices of how to proceed.
xsunMemberYes, my web app needs EJB container.
Our old version was JBoss3.0.7. Sounds like I need to dig that out and try it. It worked in 3.0.7, now if I go back to it, I hope it’d still work. Either way, I hope I don’t have to downgrade the JBoss server. Would you please elaborate on the other choice, which is “update your code to use the newer spec”?You have any idea why starting JBoss using run.bat, the web app works fine?
Thanks.
xsun
Riyad KallaMemberYou have any idea why starting JBoss using run.bat, the web app works fine?
This is the first time you have mentioned this… you are saying that with JBoss 3.2.4, if you run JBoss from the console using run.bat, your application works just fine without any exception?
Would you please elaborate on the other choice, which is “update your code to use the newer spec”?
What I meant is that if you app was developed against an older API (which it sounds like it was, since it worked under JBoss 3.0.7), then it looks like some of your method calls depend on that older API. When you deployed your app on an updated version of JBoss, you are getting an exception now because a certain method that your application needs, is no longer there (it was likely deprecated, and then removed at some point in the API’s lifetime). So what you should do is setup your classpath for your project to exactly mirror all the libs from the new JBoss install (it sounds like you have with servlet-api.jar and jsp-api.jar, and any other JARs you need). Now rebuild your project, most likely you will see a compilation error at some point because of the missing method. You can track down the part of code that is having the problem, and fix it.
However, looking at your exception:
java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo.<init>(Ljava/lang/String;ZLjava/lang/String;ZZ)V
It looks like you have a problem with some out of date taglibs, either your own, or using some old taglibs. This might be harder to find, although a compile error should occur if you setup the project corretly.
xsunMember@support-rkalla wrote:
You have any idea why starting JBoss using run.bat, the web app works fine?
This is the first time you have mentioned this… you are saying that with JBoss 3.2.4, if you run JBoss from the console using run.bat, your application works just fine without any exception?
I thought I mentioned this, but actually I missed out. Yes, if I run JBoss3.2.4 using run.bat provided in bin directory, I can run my web app just fine without any exception.
This must be crucial for you to make educated guesses. I am sorry. 😳
xsun
Scott AndersonParticipantThat simply implies that there are additional libraries or jars that are now added as part of the default startup that you need. You need to add all the jars in the <jboss>/lib directory to the classpath used by the JBoss 3 connector on the preference page that Riyad told you earlier. The JBoss guys no longer load all those jars automatically like they used to in prior versions.
xsunMemberI added <jboss>/lib by doing Window > Preferences > MyEclipse > App. Servers > JBoss 3 > Paths > Append to classpath > Add Dir. I restarted JBoss3 in MyEclipse, I got the same error.
Thanks,
xsun
xsunMemberHere is a copy of my .classpath file, I’ve taken out all the src path, I hope this helps.
<?xml version=”1.0″ encoding=”UTF-8″?>
<classpath>
<classpathentry kind=”con” path=”org.eclipse.jdt.launching.JRE_CONTAINER”/>
<classpathentry kind=”lib” path=”eload.war/WEB-INF/lib/commons-beanutils.jar”/>
<classpathentry kind=”lib” path=”eload.war/WEB-INF/lib/commons-collections.jar”/>
<classpathentry kind=”lib” path=”eload.war/WEB-INF/lib/commons-digester.jar”/>
<classpathentry kind=”lib” path=”eload.war/WEB-INF/lib/commons-fileupload.jar”/>
<classpathentry kind=”lib” path=”eload.war/WEB-INF/lib/commons-lang.jar”/>
<classpathentry kind=”lib” path=”eload.war/WEB-INF/lib/commons-logging.jar”/>
<classpathentry kind=”lib” path=”eload.war/WEB-INF/lib/commons-validator.jar”/>
<classpathentry kind=”lib” path=”eload.war/WEB-INF/lib/jakarta-oro.jar”/>
<classpathentry kind=”lib” path=”eload.war/WEB-INF/lib/struts-legacy.jar”/>
<classpathentry kind=”lib” path=”eload.war/WEB-INF/lib/struts.jar”/>
<classpathentry kind=”var” path=”JBOSS_ROOT/jboss-system.jar”/>
<classpathentry kind=”var” path=”JBOSS_ROOT/jboss-common.jar”/>
<classpathentry kind=”var” path=”JBOSS_ROOT/jboss-jmx.jar”/>
<classpathentry kind=”var” path=”JBOSS_WEB/servlet-api.jar”/>
<classpathentry kind=”var” path=”JBOSS_WEB/jsp-api.jar”/>
<classpathentry kind=”output” path=”eload.war/WEB-INF/classes”/>
</classpath>Thank you for your time and efforts.
xsun
Scott AndersonParticipantI added <jboss>/lib
Did you add the directory itself, or each individual jar file within the directory. You need to add each jar, not the directory itself.
-
AuthorPosts