aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Hello Bean deployment in JBOSS4.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Hello Bean deployment in JBOSS4.0" Watch "Hello Bean deployment in JBOSS4.0" New topic
Author

Hello Bean deployment in JBOSS4.0

ranga tiru
Greenhorn

Joined: Jan 23, 2006
Posts: 1
Hi ,

I am new to JBOSS.I am working on Microsoft Technologies.I never faced this type of deployment problems with DOTNET.Am i missing something while learning SUN Technologies!!!I am very muc interested in learning J2EE but these type of problems making me loose interest.SUN Techies help me in solving the problem

i am trying to deploy simple HelloWorld application in JBOSS4

when deploying i am getting follwing problem

===============================================================
19:52:45,709 WARN [verifier] EJB spec violation:
Bean : HelloWorld
Section: 16.2
Warning: The Bean Provider must specify the fully-qualified name of the Java class that implements the enterprise bean's
business methods.

19:52:45,709 WARN [verifier] EJB spec violation:
Bean : HelloWorld
Section: 16.2
Warning: The Bean Provider must specify the fully-qualified name of the enterprise bean's home interface in the home ele
ment.

19:52:45,709 WARN [verifier] EJB spec violation:
Bean : HelloWorld
Section: 16.2
Warning: The Bean Provider must specify the fully-qualified name of the enterprise bean's remote interface in the remote
element.

19:52:45,709 ERROR [MainDeployer] Could not create deployment: file:/C:/JBOSS4/server/default/deploy/hello.ear/hello.jar

=================================================================
classes are..i took from sample code
========Home =======
package mypackage;
public interface HelloWorldHome extends javax.ejb.EJBHome {
HelloWorld create() throws java.rmi.RemoteException,

javax.ejb.CreateException;
}
============ Bean ==========
package mypackage;
public class HelloWorldBean implements javax.ejb.SessionBean {
private javax.ejb.SessionContext ctx;
public void setSessionContext(javax.ejb.SessionContext ctx) {
this.ctx = ctx;
}
public void ejbRemove() {
System.out.println( "ejbRemove()" );
}
public void ejbActivate() {
System.out.println( "ejbActivate()" );
}
public void ejbPassivate() {
System.out.println( "ejbPassivate()" );
}
/* The method called to display the string "Hello World!" on the

client. */
public String hello() {
System.out.println( "hello()" );
return "Hello World!";
}
public void ejbCreate() {
System.out.println( "ejbCreate()" );
}
}
========== Remote ===============
package mypackage;
public interface HelloWorld extends javax.ejb.EJBObject {
public String hello() throws java.rmi.RemoteException;
}
======ejb-jar.xml=======================

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC
'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN'
'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
<ejb-jar>
<description>JBoss Hello World Application</description>
<display-name>Hello World EJB</display-name>
<enterprise-beans>
<session>
<ejb-name>HelloWorld</ejb-name>
<home>mypackage.HelloWorldHome</home>
<remote>mypackage.HelloWorld</remote>
<ejb-class>mypackage.HelloWorldBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>

===========Application.xml ========================

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com /xml/ns/j2ee

http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<display-name>Thomas</display-name>
<description>Silly example</description>
<module>
<ejb>hello.jar</ejb>
</module>
</application>
======================================
I need experts help in deploying the bean and writing valid Client app to see the results.

Thanks in Advance

Ranga Tirumalaseti.
Chris Brat
Ranch Hand

Joined: May 22, 2003
Posts: 108
Hi Ranga,

Read up on the XDoclet project/tool that takes much of the head-ache out of deployment descriptors and interfaces needed for EJB - it also handles the vendor specific files such as those for Weblogic and JBoss.

http://xdoclet.sourceforge.net/

Chris


SCJP 1.2, SCJP 5, SCBCD
 
 
subject: Hello Bean deployment in JBOSS4.0