[jboss-user] [Installation, Configuration & DEPLOYMENT] - error deploying simple session bean

mpurdy1973 do-not-reply at jboss.com
Tue Aug 19 15:50:11 EDT 2008


i created a simple EJB2 HelloWorldSessionBean and deployed it into jboss 4.2.3 java 6 build (when it failed, i also tried jboss 3.2.7 - got the same errors) and I got the following errors:

system:  mac book pro running windows vista 64 service pack 1
server:   jboss 4.2.3 build using java 6
java:      java 6 update (build 1.6.0_06-b02)
dev env: eclipse 3.4 using ant to build jar file

-------------------------------------------------------------
jboss errors
-------------------------------------------------------------

15:29:08,113 WARN  [verifier] EJB spec violation:
Bean   : HelloWorldSessionEJB
Section: 22.2
Warning: The bean provider must specify the fully-qualified name of the enterprise bean's remote home interface, if any, in the  eleme
nt.
Info   : Class not found on 'prj.ejb2.HelloWorldHomeRemote': No ClassLoaders found for: prj.ejb2.HelloWorldHomeRemote

15:29:08,113 WARN  [verifier] EJB spec violation:
Bean   : HelloWorldSessionEJB
Section: 22.2
Warning: The bean provider must specify the fully-qualified name of the enterprise bean's remote interface, if any, in the  element.

Info   : Class not found on 'prj.ejb2.HelloWorldRemote': No ClassLoaders found for: prj.ejb2.HelloWorldRemote

15:29:08,113 WARN  [verifier] EJB spec violation:
Bean   : HelloWorldSessionEJB
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 on 'prj.ejb2.HelloWorldHomeLocal': No ClassLoaders found for: prj.ejb2.HelloWorldHomeLocal

15:29:08,113 WARN  [verifier] EJB spec violation:
Bean   : HelloWorldSessionEJB
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 on 'prj.ejb2.HelloWorldLocal': No ClassLoaders found for: prj.ejb2.HelloWorldLocal

15:29:08,113 WARN  [verifier] EJB spec violation:
Bean   : HelloWorldSessionEJB
Section: 7.10.1
Warning: The session bean must implement either a remote home and remote, or a local home and a local interface.

15:29:08,113 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss/server/default/deploy/prjEJB.jar

--------------------------------------------------------------
jar file structure
--------------------------------------------------------------
META-INF/
META-INF/MANIFEST.MF
prj/
prj/ejb2/
META-INF/ejb-jar.xml
META-INF/jboss.xml
prj/ejb2/HelloWorldSessionBean.class
prj/ejb2/HelloWorldSessionHomeLocal.class
prj/ejb2/HelloWorldSessionLocal.class
prj/ejb2/HelloWorldSessionRemote.class
prj/ejb2/HelloWorldSessionHomeRemote.class


---------------------------------------------------------------


-------------------------------------------------------------
ejb-jar.xml
-------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
  | <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
  | 
  | <ejb-jar>
  | 
  |   <display-name>prjEJB.jar</display-name>
  |   <enterprise-beans>
  | 
  |     <session>
  |       <display-name>Hello World Session EJB</display-name>
  |       <ejb-name>HelloWorldSessionEJB</ejb-name>
  |       <home>prj.ejb2.HelloWorldHomeRemote</home>
  |       <remote>prj.ejb2.HelloWorldRemote</remote>
  |       <local-home>prj.ejb2.HelloWorldHomeLocal</local-home>
  |       <local>prj.ejb2.HelloWorldLocal</local>
  |       <ejb-class>prj.ejb2.HelloWorldSessionBean</ejb-class>
  |       <session-type>Stateless</session-type>
  |       <transaction-type>Bean</transaction-type>
  |     </session>
  |     
  |   </enterprise-beans>
  | 
  | </ejb-jar>


--------------------------------------------------------------


-------------------------------------------------------------
jboss.xml
-------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
  | 
  | <jboss>
  |   <enterprise-beans>    
  |         
  |     <session>
  |       <ejb-name>HelloWorldSessionEJB</ejb-name>
  |       <jndi-name>HelloWorldSessionHomeRemote</jndi-name>
  |       <local-jndi-name>HelloWorldSessionHomeLocal</local-jndi-name>
  |     </session>
  |             
  |   </enterprise-beans>
  |   
  | </jboss>


-------------------------------------------------------------


-------------------------------------------------------------
HelloWorldSessionBean
-------------------------------------------------------------
package prj.ejb2;
  | 
  | import javax.ejb.*;
  | import javax.naming.*;
  | 
  | public class HelloWorldSessionBean implements SessionBean
  | {
  |    private SessionContext context;
  | 
  |    public String sayHello()
  |    {
  |       
  |       return "Hello World!";
  |       
  |    }
  |    
  |    public void ejbCreate() throws CreateException
  |    {
  |    }
  | 
  |    public void ejbActivate() throws EJBException
  |    {
  |    }
  | 
  |    public void ejbPassivate() throws EJBException
  |    {
  |    }
  | 
  |     public void ejbRemove() throws EJBException
  |    {
  |    }
  |     
  |     public void setSessionContext(SessionContext newContext) throws EJBException
  |     {
  |        this.context = newContext;
  |        
  |     }//end setSessionContext
  |     
  | }

--------------------------------------------------------------


-------------------------------------------------------------
HelloWorldSessionHomeRemote
-------------------------------------------------------------
package prj.ejb2;
  | 
  | 
  | import java.rmi.RemoteException;
  | 
  | import javax.ejb.*;
  | 
  | public interface HelloWorldSessionHomeRemote extends EJBHome
  | {
  | 
  |    public HelloWorldSessionRemote create() throws RemoteException, CreateException;
  |    
  | }


--------------------------------------------------------------


-------------------------------------------------------------
HelloWorldSessionRemote
-------------------------------------------------------------
package prj.ejb2;
  | 
  | import javax.ejb.*;
  | 
  | public interface HelloWorldSessionRemote extends EJBObject
  | {
  |    public String sayHello();
  |    
  | }
--------------------------------------------------------------


-------------------------------------------------------------
HelloWorldSessionHomeLocal
-------------------------------------------------------------
package prj.ejb2;
  | 
  | import javax.ejb.*;
  | import prj.ejb2.*;
  | 
  | public interface HelloWorldSessionHomeLocal extends EJBLocalHome
  | {
  | 
  |    public HelloWorldSessionLocal create() throws CreateException;
  |    
  | }
--------------------------------------------------------------


-------------------------------------------------------------
HelloWorldSessionLocal
-------------------------------------------------------------
package prj.ejb2;
  | 
  | import javax.ejb.*;
  | 
  | public interface HelloWorldSessionLocal extends EJBLocalObject
  | {
  |    public String sayHello();
  | }

--------------------------------------------------------------






View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171369#4171369

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171369



More information about the jboss-user mailing list