-
1. Re: HTTP ERROR: 404 /fibo/ Not Found
montia Sep 23, 2003 1:32 PM (in response to montia)Here's a list of my environment settings:
Eclipse 2.1.1
JDK 1.4.1_05
JBoss 3.2.1
JBoss-IDE 1.2.0 -
2. Re: HTTP ERROR: 404 /fibo/ Not Found
montia Sep 23, 2003 4:13 PM (in response to montia)Hi,
Looks like I found what the problem is.
Although, I followed the tutorial step by step (checked twice to ensure I did the exact same thing) and Eclipse displayed a "Deployment successful" message, I could see the following errors in the console when deploying:
14:19:22,259 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-3.2.1/server/default/deploy/FiboApp.ear
14:19:25,825 WARN [verifier] EJB spec violation:
Bean : Fibo
Section: 22.2
Warning: The bean provider must specify the fully-qualified name of the enterprise bean's local home interface, if any, in the <local-home> element.
Info : Class not found: tutorial.interfaces.FiboLocalHome
14:19:25,845 WARN [verifier] EJB spec violation:
Bean : Fibo
Section: 22.2
Warning: The bean provider must specify the fully-qualified name of the enterprise bean's local interface, if any, in the element.
Info : Class not found: tutorial.interfaces.FiboLocal
...
I searched for FiboLocal in my Tutorial directory and found that ejb-jar.xml and jboss.xml in the META-INF folder had FiboLocal and FiboLocalHome 'definitions.' I removed those lines from the files, repackaged, and redeployed. Redeployment was succesful and I can now see http://localhost:8080/fibo.
With the exception of this little problem, I really like the tutorial. Very straightforward. :)
Thank you,
Montia -
3. Re: HTTP ERROR: 404 /fibo/ Not Found
letiemble Sep 24, 2003 12:42 AM (in response to montia)Hi,
I think (with some modesty) that the Tutorial runs pretty well.
What I can't understand, is how do you get local interfaces although the Tutorial only deals with a remote EJB ?
Maybe, you should take a look at your XDoclet configuration and see if you haven't has the local subtasks for the EJB generation?
Laurent. -
4. Re: HTTP ERROR: 404 /fibo/ Not Found
montia Sep 24, 2003 12:50 PM (in response to montia)Hi Laurent,
Yes, the tutorial is great for getting me started.
I am attaching a picture of the subtasks I added to the ejbdoclet in my EJB XDoclet Configuration. My settings are the same as those described in the tutorial, yet when I Run XDoclet I get those local configurations in my ejb deployment descriptors. -
5. Re: HTTP ERROR: 404 /fibo/ Not Found
montia Sep 24, 2003 1:04 PM (in response to montia)So, I'm not sure what's going on. At least I can manually remove those lines so that's cool.
I have to say that after I was able to go to http://localhost:/8080/fibo and see the index page, clicking on Compute generated another error.
I saw the following message in my browser:
HTTP ERROR: 503 javax.servlet.ServletException: Lookup of java:/comp/env/ failed
RequestURI=/fibo/Compute
I debugged the application and saw that the error was thrown on the following line in the servlet:
Object ref = context.lookup("java:/comp/env/ejb/Fibo");
The Title was obtained just fine, but somehow the EJB cannot be obtained.
So, I kind of gave up at that point. :)
Thank you for replying to my post and if you have any ideas of why the servlet error occurs I'd really appreciate your sharing them with me.
Monica -
6. Re: HTTP ERROR: 404 /fibo/ Not Found
ecaritos Sep 26, 2003 9:12 AM (in response to montia)Same error as previous post but can't find the solution.
Went to url http://localhost:8080/fibo and I see the index page. I click on the Computer button and generated another error.
10:57:20,892 ERROR [Engine] StandardWrapperValve[ComputeServlet]: Allocate exception for servlet ComputeServlet
javax.servlet.ServletException: Could not dereference object
I debugged the application and saw that the rrow was thrown on the following line in the servlet: Object ref= context.lookup("java:/comp/env/ejb/Fibo");
The Title was obtained just fine, but somehow the EJB cannot be obtained. -
7. Re: HTTP ERROR: 404 /fibo/ Not Found
montia Sep 26, 2003 7:36 PM (in response to montia)Hi,
I found a fix. I stumbled onto this other topic:
http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= mentioned an inconsistency in the EJB JNDI names in jboss.xml and jboss-web.xml.
So, that made me check my respective files. I found the following JNDI names:
"ejb/tutorial/Fibo" in jboss.xml
and
"Fibo" in jboss-web.xml
I'm not sure why I had this problem since the bean's jndi-name was set to "ejb/tutorial/Fibo" in both FiboBean.java and ComputeServlet.java.
Anyway, correcting jboss-web.xml got rid of the exception that was thrown on retrieving the bean. The application works well now.
Sometimes on Running XDoclet I still get those localFibo lines added to my XML files (weirdly, not every time), but I guess I can remove them manually if nothing else works.
Thanks Laurent. The tutorial is great. I'm already working on porting a pretty big application from WebSphere to JBoss, and going through your tutorial really helped me get the big picture. It made my life simpler. :)
Montia -
8. Re: HTTP ERROR: 404 /fibo/ Not Found
letiemble Sep 27, 2003 8:28 AM (in response to montia)Hi,
Please to hear such good things.
I am very interesting in your feedback and your feature requests. So don't hesitate !!!
Laurent.