jQuery in Action, 2nd edition*
The moose likes JBoss/WildFly and the fly likes JBOSS error with helloworld Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBOSS error with helloworld" Watch "JBOSS error with helloworld" New topic
Author

JBOSS error with helloworld

Kay Tracid
Ranch Hand

Joined: Mar 06, 2002
Posts: 148
Hi,
i get this warning/error with my helloWorld test:
Bean : Hello
Section: 16.2
Warning: The Bean Provider must specify the fully-qualified name of the enterprise bean's home interface in the home element.
15:01:22,887 INFO [EJBDeployer]
Bean : Hello
Section: 16.2
Warning: The Bean Provider must specify the fully-qualified name of the enterprise bean's remote interface in the remote element.
15:01:22,887 INFO [EjbModule] Creating
15:01:22,919 INFO [EjbModule] Deploying Hello
15:01:22,981 WARN [ServiceController] Problem creating service jboss.j2ee:jndiName=Hello,service=EJB
java.lang.ClassNotFoundException: ejb.interfaces.HelloWorldHome
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
i have 3 classes:

Can you help please? i'm new to this topic.
What must i change?
Thanks a lot.
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
The error is referring to your ejb-jar.xml, which is not shown.
lokesh reddy
Ranch Hand

Joined: Sep 15, 2000
Posts: 66
Hi,
It seems that you defined home and remote interfaces in ejb.interfaces package and bean implementation in ejb.client package which is why you are getting the
-------------------------------------------------
15:01:22,981 WARN [ServiceController] Problem creating service jboss.j2ee:jndiName=Hello,service=EJB
java.lang.ClassNotFoundException: ejb.interfaces.HelloWorldHome
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
--------------------------------------------------
error. and regarding
--------------------------------------------------
Bean : Hello
Section: 16.2
Warning: The Bean Provider must specify the fully-qualified name of the enterprise bean's home interface in the home element.
15:01:22,887 INFO [EJBDeployer]
Bean : Hello
Section: 16.2
Warning: The Bean Provider must specify the fully-qualified name of the enterprise bean's remote interface in the remote element.
--------------------------------------------------
errors you just open your ejb-jar.xml file and change <home>HelloHome</home> to <home>ejb.interfaces.HelloHome</home> and <remote>Hello</remote> to <remote>ejb.interfaces.Hello</remoet>

I hope you find this info useful
Loke.
Kay Tracid
Ranch Hand

Joined: Mar 06, 2002
Posts: 148
Thanks to both of you!
I will try it!
[ December 27, 2002: Message edited by: Kay Tracid ]
Kay Tracid
Ranch Hand

Joined: Mar 06, 2002
Posts: 148
Thanks, now it works. I have to write a client as an application. I have an example from this site: http://www.mastertech.net/spumer/Jboss%203%20step-by-step.pdf
My problem is that I want a client based just on the jre 1.4.1. In the example the client isn't independent from some j2ee classes.
Can you help me with a short example how to use the simple beans?
Thanks!
salik salik
Greenhorn

Joined: Jan 29, 2004
Posts: 2
I am having the same problems as Kay. My xml file seems to have been named correctly so I can't see what the problem would be. Classpath?

CODE
HelloWorldHome.java
package com.mastertech.sample;
/**
* HelloWorldHome provides the container the means to
* create and destroy EJB's.
*/
public interface HelloWorldHome extends javax.ejb.EJBHome
{
HelloWorld create() throws java.rmi.RemoteException,
javax.ejb.CreateException;
}
HelloWorldBean.java
package com.mastertech.sample;
import javax.ejb.SessionContext;
/**
* This class is the actual implementation of the business
* logic. This is the EJB for simplicity's sake.
*/
public class HelloWorldBean implements javax.ejb.SessionBean
{
private SessionContext ctx;
public void setSessionContext(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()" )
}
HelloWorld.java
/**
* The method called to display the string "Hello World!"
* on the client.
*/
public String hello()
{
System.out.println( "hello()" );
return "Hello World!";
}
}
package com.mastertech.sample;
/**
* This is the remote interface that the client calls to
* have the EJB do the work.
*/
public interface HelloWorld extends javax.ejb.EJBObject
{
public String hello() throws java.rmi.RemoteException;
}
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8" ?>
- <ejb-jar>
<description>JBoss Hello World Application</description>
<display-name>Hello World EJB</display-name>
- <enterprise-beans>
- <session>
<ejb-name>Hello</ejb-name>
<home>com.mastertech.sample.HelloWorldHome</home>
<remote>com.mastertech.sample.HelloWorld</remote>
<ejb-class>com.mastertech.sample.HelloWorldBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>

TRACE:
10:20:09,681 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss
-3.0.0_tomcat-4.0.3/server/default/deploy/HelloWorld.jar
10:20:10,172 INFO [EJBDeployer]
Bean : Hello
Section: 16.2
Warning: The Bean Provider must specify the fully-qualified name of the Java cla
ss that implements the enterprise bean's business methods.
10:20:10,212 INFO [EJBDeployer]
Bean : Hello
Section: 16.2
Warning: The Bean Provider must specify the fully-qualified name of the enterpri
se bean's home interface in the home element.
10:20:10,312 INFO [EJBDeployer]
Bean : Hello
Section: 16.2
Warning: The Bean Provider must specify the fully-qualified name of the enterpri
se bean's remote interface in the remote element.
10:20:10,372 INFO [EjbModule] Creating
10:20:10,382 INFO [EjbModule] Deploying Hello
10:20:10,702 INFO [EjbModule] Remove JSR-77 EJB Module: jboss.management.single
:J2EEApplication= ,J2EEServer=Single,j2eeType=EJBModule,name=HelloWorld.jar
Stanley Adam
Greenhorn

Joined: May 06, 2004
Posts: 1
Hi forummates,
I suffer from similar problem for very long time. You could download the source from http://hk.geocities.com/stanley1610/jbosside.htm
I am trying how to use J2EE but I failed to deploy it, although I
compiled it successfully. It shows the following error;
01:10:16,628 WARN [verifier] EJB spec violation:
Bean : Fibo
Section: 22.2
Warning: The Bean Provider must specify the fully-qualified name of
the Java class that implements the enterprise bean's business methods
in the <ejb-class> element.
Info : Class not found on 'tutorial.ejb.FiboBean': No ClassLoaders
found for: tutorial.ejb.FiboBean
What wrong did I do? What should I do to solve this problem? Please help.
-stan
yuvaraj vanarase
Greenhorn

Joined: Sep 29, 2004
Posts: 9
hi

i had same problem an i solved it...

those getin 'ejb spec violtion' ...absolutely problem is with ejb-jar.xml

what u need to see is :

(offcourse tags in .xml must be right...and according to classpaths of files (home/remote/bean etc.) )

1. the exact class paths for all class files ther in jar file you
are deploying on jboss
2. ej-jar.xml must be in META-INF folder

generaly u may hav.....

* ur package and META-INF right on c:\ or d:\
complile all java classes
create jar
deploy

try it...i will work..provided othr hings (jboss an ur prog r allrigh)

bye
yuvaraj


-------<br />yuvaraj
zhi liu
Greenhorn

Joined: Nov 10, 2004
Posts: 3
hi, I am using this tutorial and I met the same error, can anyone here please show me detailly how to fix it?
many thanks!!
zhi liu
Greenhorn

Joined: Nov 10, 2004
Posts: 3
the erroe I met is calss not found. is there anything to do with classpath?
I am new for this area........
Dupon David
Greenhorn

Joined: Aug 11, 2006
Posts: 19
When running JBoss I found the folowing warning and error :


Bean : EntityRef
Section: 22.2
Warning: The Bean Provider must specify the fully-qualified name of the Java class that implements the enterprise bean's business methods in the <ejb-class> element.
Info : Class not found on 'com.spim.ejb.EntityRefBean': No ClassLoaders found for: com.spim.ejb.EntityRefBean

17:08:37,421 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-3.2.3/server/default/deploy/testejb.jar


WHAT'S HAPPENING? CAN SOME ONE HELP ME? WHAT CAN I CHANGE?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10102
    
165

Class not found on 'com.spim.ejb.EntityRefBean'


This class is not found in the classpath. Is it present in your testejb.jar?
Through the command prompt move to "C:/jboss-3.2.3/server/default/deploy/" folder and run the following command and post the output:



This will show the contents of the testejb.jar file. This will let us know whether the jar is properly packaged


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JBOSS error with helloworld