• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JBOSS error with helloworld

 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error is referring to your ejb-jar.xml, which is not shown.
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks to both of you!
I will try it!
[ December 27, 2002: Message edited by: Kay Tracid ]
 
Kay Tracid
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the erroe I met is calss not found. is there anything to do with classpath?
I am new for this area........
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic