-
1. Re: Fibo Tutorial on JBoss 4.0.2
thecompubug May 21, 2005 7:28 PM (in response to rhino)Check on this:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=63994
Apparently having the Interface in more than one place confuses it.
Good Luck,
-Mike -
2. Re: Fibo Tutorial on JBoss 4.0.2
rhino May 22, 2005 1:30 PM (in response to rhino)Thanks Mike.
If I understand the other poster (you directed me in the link above) his problem was a result of having duplicate copies of the interface(s) class files packaged both in the EJB.jar and Web.war files.
The Fibo tutorial specifies that the interface class files should be packaged in FiboEJB.jar and the FiboEJB-client.jar. The FiboEJB-client.jar is then packaged in the FiboWeb.war file. As a result, the interface(s) class files are packaged in two places in the final FiboApp.ear file.
This is how I originally packaged the files.
However, I do not believe it is the source of the problem.
I tried not packaging the FiboEJB-client.jar(which has the second copy of the interfaces) in the FiboWeb.war file and found that the Fibo application still worked on JBoss 3.2.7 but not on JBoss 4.0.2.
Below is the error message displayed in the browser when I click on the "Compute" button which causes the servlet to "try" to get a context with the following lines of code:
Context context = new InitialContext();
Object ref = context.lookup("java:comp/env/ejb/Fibo");
This is the Error Message displayed in the browser:
javax.servlet.ServletException: Lookup of java:comp/env/ failed
tutorial.web.ComputeServlet.init(ComputeServlet.java:72)
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
java.lang.Thread.run(Thread.java:534) -
3. Re: Fibo Tutorial on JBoss 4.0.2
movies1978 May 23, 2005 3:58 AM (in response to rhino)Hi,
I do get the same error, while trying the Fibo Tutorial. My Configuration is Jboss 4.0.2, Java 1.5, latest Jboss-Ide from the online ressource.
What does the Erorr mean anyway?
Does it mean, that the JNDI Service can not locate my ComputeServlet???
Cheers Mathias -
4. Re: Fibo Tutorial on JBoss 4.0.2
movies1978 May 23, 2005 4:44 AM (in response to rhino)PS : I deployed the same FiboApp.Ear on a Jboss 4.01 and it worked!
So the error seems to be Jboss 4.02 related.
Cheers
Mathias -
5. Re: Fibo Tutorial on JBoss 4.0.2
miclon May 23, 2005 5:05 AM (in response to rhino)The same for me App working fine on 4.0.1 and not anymore on 4.0.2 It's seems that version 4.0.2 has intruduced some new bugs.... it's a shame.
-
6. Re: Fibo Tutorial on JBoss 4.0.2
hoyi May 29, 2005 2:31 AM (in response to rhino)I worked on jboss 3.2.7,but i have to change
context.lookup("java:comp/evn/ejb/Fibo");
to
context.lookup("ejb/Fibo");
,who can tell me the reason.
Jboss 4.0.2 not work.
thanks.
Joe -
7. Re: Fibo Tutorial on JBoss 4.0.2
andriniaina Jun 3, 2005 11:58 AM (in response to rhino)Has somebody found a solution for 4.0.2 ?
-
8. Re: Fibo Tutorial on JBoss 4.0.2
fred2210 Jun 5, 2005 6:43 AM (in response to rhino)Hi,
I'm using JBoss 4.0.2 and the last JBoss-IDE for Eclipse.
And this Fibo Tutorial doesn't work :
The EJB and Webapps deploy, but when I post to Fibo servlet, it gives me this exception :
root cause
java.lang.ClassCastException
com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
...
What can I do ?
Thanks
Fred -
9. Re: Fibo Tutorial on JBoss 4.0.2
fred2210 Jun 5, 2005 7:26 AM (in response to rhino)This happen only with 4.0.2 !
Is there a BUG ? or what do we have to change ?
Thanks
Fred -
10. Re: Fibo Tutorial on JBoss 4.0.2
ssteph Jun 8, 2005 2:16 PM (in response to rhino)I have the same problem here with 4.0.2.
--
Stephan -
11. Re: Fibo Tutorial on JBoss 4.0.2
fred2210 Jun 8, 2005 2:51 PM (in response to rhino)The solution I know, and what I have done, is to use the version 4.0.1 !
Good luck ;-)
Fred. -
12. Re: Fibo Tutorial on JBoss 4.0.2
2impulsive Jun 15, 2005 10:14 AM (in response to rhino)Very strange. I'm running jboss 4.0.2.
First I have tried to implement the tutorial by myself.. and guess what! i stuck at he same look up problem.
Then after hours of debugging, I just downloaded the tutorial example and imported it in the workspace. It worked!
I just dont know what to do, I have checked everything, it is almoast exatly the same project, but it doesnt work =(((
May be jboss-people can give us some tips. -
13. Re: Fibo Tutorial on JBoss 3.7
hopperda Jun 15, 2005 7:09 PM (in response to rhino)cannot get it to work even in 3.2.x
-
14. Re: Fibo Tutorial on JBoss 4.0.2
hopperda Jun 15, 2005 7:29 PM (in response to rhino)error: javax.servlet.ServletException: Lookup of java:/comp/env/ failed
open source: jboss 3.2.x eclipse
j2ee1.4 and eclipse 3.0
jboss web.xml
<ejb-ref>
<ejb-ref-name>ejb/Fibo</ejb-ref-name>
<jndi-name>ejb/Fibo</jndi-name>
</ejb-ref>
web.xml
<servlet-name>Compute</servlet-name>
<display-name>Computation servlet</display-name>
<![CDATA[Servlet that compute fibonacci suite]]>
<servlet-class>tutorial.web.ComputeServlet</servlet-class>
<servlet-mapping>
<servlet-name>Compute</servlet-name>
<url-pattern>/Compute</url-pattern>
</servlet-mapping>
<ejb-ref >
<![CDATA[Reference to the Fibo EJB]]>
<ejb-ref-name>ejb/Fibo</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
tutorial.interfaces.FiboHome
tutorial.interfaces.Fibo
</ejb-ref>