First I�d like to thanks Richard about ejb.jar (the answer is right!) :) Now I�m having another problem : when I run a JSP file that connect a EJB the following error is reported:

java.rmi.ServerException: Bean exception. Notify the application administrator; nested exception is: javax.ejb.EJBException: Deprecated

 

Here�s the JSP code :

 

<%@ page

language="java"

import="java.io.*,

����������� java.text.*,

����������� java.util.*,

����������� javax.servlet.*,

����������� javax.servlet.http.*,

����������� javax.naming.*,

����������� ejb.demo.*,

����������� javax.ejb.*

����������� "

%>

 

 

<html>

<body>

 

<%

String jndiName = "DemoBeanDD";

Context ctx;

 

try {

����������� System.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");

����������� System.setProperty("java.naming.provider.url","localhost");

����������� System.setProperty("java.naming.factory.url.pkgs","org.jboss.naming;");

�����������������������������������

����������� ctx = new InitialContext();

�����������

����������� try {

����������������������� DemoHome home = (DemoHome)ctx.lookup(jndiName);

����������������������� Demo bean = (Demo) home.create();

�����������������������������������

����������������������� out.print("<p>Using jndi name " + jndiName + "<br>" );

����������������������� out.print("bean's return :"�� + bean.demoSelect() );

����������������������� out.println("\"</p>");

����������� }

����������� catch (Exception e) {

�����������������������������������������������

����������������������� out.println("Call failed... Exception:");

����������������������� out.println("<pre>");

����������������������� out.println(e.toString());

����������������������� out.println("</pre>");

����������������������� e.printStackTrace();

����������� }

 

} catch (Exception e) {

����������� out.println("Context not found: exception message:<pre>");

����������� out.println(e.toString() );

����������� out.println("</pre>");

����������� e.printStackTrace();

}

%>

 

</body>

</html>

 

I�m running Jboss 2.0 with Tomcat 3.1 (with Tomcat Web Server � at port 8080), and when I try to run the JSP page the following error is reported :

 

[DemoBeanDD] setSessionContext called

[DemoBeanDD] BEAN EXCEPTION:Deprecated

[DemoBeanDD] setSessionContext called

[DemoBeanDD] BEAN EXCEPTION:Deprecated

[Tomcat] java.rmi.ServerException: Bean exception. Notify the application administrator; nested exception is:

������� javax.ejb.EJBException: Deprecated

[Tomcat] javax.ejb.EJBException: Deprecated

[Tomcat]������� at org.jboss.ejb.EnterpriseContext$EJBContextImpl.getEnvironment(EnterpriseContext.java:202)

[Tomcat]������� at ejb.demo.DemoBean.setSessionContext(DemoBean.java:52)

[Tomcat]������� at org.jboss.ejb.StatelessSessionEnterpriseContext.<init>(StatelessSessionEnterpriseContext.java:46)

[Tomcat]������� at org.jboss.ejb.plugins.StatelessSessionInstancePool.create(StatelessSessionInstancePool.java:47)

[Tomcat]������� at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:106)

[Tomcat]������� at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:79)

[Tomcat]������� at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:144)

[Tomcat]������� at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)

 

 

�� Thanks for any help again :)

Sergio Stateri Jr

[EMAIL PROTECTED]

Tesla Tecnologia

Sao Paulo (SP) Brazil

 

Reply via email to