- This topic has 8 replies, 3 voices, and was last updated 20 years ago by Riyad Kalla.
-
AuthorPosts
-
vecernikMemberHi everbody,
I’m quite new to J2EE, thus I assume I’m doing something wrong. My configuration is:
Eclipse 3.0M8 on Win XP Pro SP1
JDK 1.4.2_03
MyEclipse 3.7.2
Tomcat 5.0.19, Jonas 4.0.0, JBoss 3.2.3Everthing works fine, deployment works with some other pages, but if I run helloWorld.jsp I always get the same error (independant from app server):
HTTP Status 500 –
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 29 in the jsp file: /helloWorld.jsp
Generated servlet error:
[javac] Compiling 1 source fileC:\Programme\apache\jakarta-tomcat-5.0.19\work\Catalina\localhost\HelloWorld\org\apache\jsp\helloWorld_jsp.java:6: package com.genuitec.test does not exist
import com.genuitec.test.HelloWorld;
^
C:\Programme\apache\jakarta-tomcat-5.0.19\work\Catalina\localhost\HelloWorld\org\apache\jsp\helloWorld_jsp.java:78: cannot resolve symbol
symbol : class HelloWorld
location: class org.apache.jsp.helloWorld_jsp
HelloWorld hw = new HelloWorld();
^
[…]Tomcat complains that the package com.genuitec.test.HelloWorld is not found. What do I have to change?
Thanks,
Oliver
Pascal DeMillyMemberOliver,
package com.genuitec.test does not exist
import com.genuitec.test.HelloWorld;It looks like either you forgot to put your HelloWorld class in a package or in the wrong package or you didn’t deploy it. Look at your HelloWorld class and make sure that the 1st uncommented line matches: package com.genuitec.test;
HTH
Pascal
PS: I am not tech support and new also at the j2ee stuff. So I coulb be completely off base.
Riyad KallaMemberOliver,
Pascal has it exactly right. It sounds like you are either missing this class (in your source folder, look for com/genuitec/test/HelloWorld) OR you have it, but you just forgot to change the package name either in the class, or in the JSP page.If you expand your source folder, what classes are in there? Do you have a HelloWorld class? What is the package statement at the top of the file? (what Pascal was hinting at).
vecernikMemberPascal,
@pdemilly wrote:
Oliver,
package com.genuitec.test does not exist
import com.genuitec.test.HelloWorld;It looks like either you forgot to put your HelloWorld class in a package or in the wrong package or you didn’t deploy it. Look at your HelloWorld class and make sure that the 1st uncommented line matches: package com.genuitec.test;
HTH
Pascal
PS: I am not tech support and new also at the j2ee stuff. So I coulb be completely off base.
I followed the instructions in the tutorial and I have a HelloWorld class with the correct package statement. But I didn’t deploy it manually. My build path consists of HelloWorld/src and the default output folder is HelloWorld/WebRoot/WEB-INF/classes. But this directory is empty!
After I did a manual ‘Rebuild Project’ it worked. I thought, this is done automatically. This is also why hot deployment does not work. Can this be achieved?
BTW: I have no ‘External Preview’ view in my debug perspective and couldn’t find it. Is this normal in 3.0M8? But it works with an external browser. 🙂
Thanks,
Oliver
Riyad KallaMemberOliver,
You bring up some good questions:I followed the instructions in the tutorial and I have a HelloWorld class with the correct package statement. But I didn’t deploy it manually. My build path consists of HelloWorld/src and the default output folder is HelloWorld/WebRoot/WEB-INF/classes. But this directory is empty!
You need to check Windows > Preferences > Workbench, and turn on the first 2 checkboxes. This will automatically build and deploy changed files for you. Without those options checked, you will run into the situation where you need everything manually.
This is also why hot deployment does not work. Can this be achieved?
Yes, see above.
BTW: I have no ‘External Preview’ view in my debug perspective and couldn’t find it. Is this normal in 3.0M8? But it works with an external browser.
The external preview is provided by the base Eclipse installation. Its actually part of the Update Manager. In Eclipse 2.x you can find out how to open it here:
http://myeclipseide.com/FAQ+index-myfaq-yes-id_cat-30.html#132I think it will be something similar in Eclipse 3.
vecernikMemberRiyad,
@support-rkalla wrote:
Oliver,
You bring up some good questions:I followed the instructions in the tutorial and I have a HelloWorld class with the correct package statement. But I didn’t deploy it manually. My build path consists of HelloWorld/src and the default output folder is HelloWorld/WebRoot/WEB-INF/classes. But this directory is empty!
You need to check Windows > Preferences > Workbench, and turn on the first 2 checkboxes. This will automatically build and deploy changed files for you. Without those options checked, you will run into the situation where you need everything manually.
This is also why hot deployment does not work. Can this be achieved?
Yes, see above.
BTW: I have no ‘External Preview’ view in my debug perspective and couldn’t find it. Is this normal in 3.0M8? But it works with an external browser.
The external preview is provided by the base Eclipse installation. Its actually part of the Update Manager. In Eclipse 2.x you can find out how to open it here:
http://myeclipseide.com/FAQ+index-myfaq-yes-id_cat-30.html#132I think it will be something similar in Eclipse 3.
Thanks for your hints, deploying and debugging now works like a charme. 🙂
But I haven’t found ‘Window > Show View > Other… > Update Manager’ in 3.0M8.
Riyad KallaMemberBut I haven’t found ‘Window > Show View > Other… > Update Manager’ in 3.0M8.
Hmm… if you go to Window > Show View > Other… and start looking around in the nodes, do you see “External Preview” anywhere?
P.S.> There is no Update Manager Perspective in 3.0 anymore, the last I heard it was a View in 3.0 I believe.
vecernikMemberRiyad,
@support-rkalla wrote:
But I haven’t found ‘Window > Show View > Other… > Update Manager’ in 3.0M8.
Hmm… if you go to Window > Show View > Other… and start looking around in the nodes, do you see “External Preview” anywhere?
P.S.> There is no Update Manager Perspective in 3.0 anymore, the last I heard it was a View in 3.0 I believe.
I scanned all folder, but didn’t succeed. I’ll ask the eclipse people…
Thanks anyway,
Oliver
Riyad KallaMemberSure thing, at the least I’m glad the other stuff is working now.
-
AuthorPosts