• 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:

EJBC

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
iam getting the following errors when creating a simple EJB.
please let me know what to do. & how to deploy it when we get such error
1) I compiled all the java classes(Home, Remote & Bean classes)
D:\javaPrac>javac -d . HelloBean.java HelloHome.java HelloRemote.java HelloClient.java
============================================================================
2) It was successful. it generated the classes & the directory SLSB.
D:\javaPrac\slsb>
======================================================================
3) I have created both (ejb-jar.xml & weblogic-ejb-jar.xml)files in META-INF & put them in SLSB.
& I created the JAR file. it was successful.
D:\javaPrac\slsb>jar -cvf gops.jar *.class META-INF
added manifest
adding: HelloBean.class(in = 708) (out= 379)(deflated 46%)
adding: HelloHome.class(in = 255) (out= 186)(deflated 27%)
adding: HelloRemote.class(in = 230) (out= 175)(deflated 23%)
ignoring entry META-INF/
adding: META-INF/ejb-jar.xml(in = 801) (out= 366)(deflated 54%)
adding: META-INF/weblogic-ejb-jar.xml(in = 364) (out= 219)(deflated 39%)
==========================================================================
4) Iam getting the problem here, when running EJBC to create the target jar file it is throwing the following error, i have pasted all the output here..what i have to do now. ask your friends.
please iam suffering with this problem since so many days.
D:\javaPrac\slsb>java weblogic.ejbc gops.jar paddu.jar
ERROR: Error from ejbc: Unable to load a class specified in your ejb-jar.xml: slsb.HelloBean
ERROR: ejbc found errors
 
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
check the package name and actual class name of the bean in your ejb-jar.xml. It must be a fully qualified name.
for e.g. <ejb-class>com.test.bean.HelloBean</ejb-class>
where package name is - com.test.bean
and bean name is - HelloBean
 
Vankipuram Padmanaban
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Rashmi
thanks for your reply.
but i have already given the fully qualified name.
i.e.
The <ejb-class> name of the bean in my ejb-jar.xml is "slsb.HelloHome".
where slsb is my package.(meaning Stateless Session Bean).
what still can i do to run the EJB.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI Venki
The COmmand for jar which was done at
D:\javaPrac\slsb>jar -cvf gops.jar *.class META-INF
Why don't u try doing it this way
D:\javaPrac> jar -cvf slsb META-INF
This should work
 
Vankipuram Padmanaban
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rashmi & Tushar !
Thank you guys, i have been able to identify the problem and successfully created the target-jar and deployed in weblogic 6.1.
but now the problem is...
when i call the EJB from client, iam getting this...
.............................
D:\javaPrac>java HelloClient
Unable to resolve slsb.HelloHome Resolved: '' Unresolved:'slsb'
......................................
please help!!!
Vankipuram padmanaban
[ December 29, 2003: Message edited by: Vankipuram Padmanaban ]
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you tell where exactly you are getting this issue i.e. at the time of acessing bean home interface or calling some method on bean's remote interface.
I believe this issue may be bacuse of incorrect JNDI name specified in the weblogic-ejb-jar.xml for HelloBean ejb.
Regards,
Ashish
 
The world's cheapest jedi mind trick: "Aw c'mon, why not read this tiny ad?"
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic