File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem while running the client

 
Pratibha Gayake
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to run my first bean(WelcomeBean). After one day of hard work I came upto successfull deployment. And while running client I get following error:
Any help is really appriciated.
I am using weblogic 4.5.
javax.naming.NameNotFoundException: 'WelcomeHome'; remaining name 'WelcomeHome'
at weblogic.rmi.extensions.BasicRequest.sendReceive(BasicRequest.java:44
)
at weblogic.jndi.WLContext_WLStub.lookup(WLContext_WLStub.java:192)
at weblogic.jndi.toolkit.WLContextStub.lookup(WLContextStub.java:545)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at WelcomeClient.main(WelcomeClient.java:24)
 
Manjunath B.S
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Pratiba,
I haven't worked on Weblogic 4.5.
But looking at the messages weblogic has shown, i think that
the the bean hasen't been deployed.Check or redeploy your
application.
regards,
Manjunath
 
Muhammad Asif
Ranch Hand
Posts: 202
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I haven't used weblogic 4.5 either but the problem seems obvious if u consider weblogic 5.1 (and this may help u!) !
The JNDI name that you have specified for your EJB cannot be found!
Now there can be two problems
1) Either EJB is not deployed correctly
2) Or It is not bound to the JNDI name with which you are trying to look it up! For this purpose check ur descriptor where you are specifying the JNDI Name!

Hope this helps
Muhammad Asif
 
Pratibha Gayake
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thnaks Asif,
I deployed the bean using following code.
//This is DeploymentDecriptor.txt
(SessionDescriptor
beanHomeName WelcomeHome
enterpriseBeanClassName WelcomeBean
homeInterfaceClassName WelcomeHome
remoteInterfaceClassName Welcome
isReentrant false
; Session EJBean-specific properties:
stateManagementType STATELESS_SESSION
sessionTimeout 10; seconds
; end session EJBean-specific properties
(accessControlEntries
; DEFAULT [admin managers]
); end accessControlEntries
(controlDescriptors
(DEFAULT
isolationLevel TRANSACTION_SERIALIZABLE
transactionAttribute TX_REQUIRED
runAsMode CLIENT_IDENTITY
; runAsIdentity WelcomeBeanAdmin
); end DEFAULT
); end controlDescriptors
(environmentProperties
; Application-specific environment properties
; end Application-specific environment properties
; realmName "my.realm"
; homeClassName
; ejbObjectClassName
maxBeansInFreePool 100
maxBeansInCache 100
idleTimeoutSeconds 60
); end environmentProperties
); end SessionDescriptor

Here in this code I do not have to use JNDI name. Where are you pointing please explain.
When I deployed the bean using following command:
java weblogic.ejb.utils.DDCreator -d classes deployment/DeploymentDescriptor.txt
I have not got any error.
I am again going through the documentation.
Any input will be helpful
Pratibha
 
anup vachali
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prathiba,
I havent worked with 4.5 but I think u have to put the location of ur jar file in the weblogic.properties file. The JNDI name would be the name of ur bean ..in ur case WelcomeHome
When u start ur weblogic server u should see a message saying that EJB was successfully deployed.
Thanks,
Anup
 
Marcos Maia
Ranch Hand
Posts: 977
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simillar error Sorry long post but I�m trying to solve this problem for more than a week now).pls help.
Hi,
Im running the examples of Enterprise Java Beans from Monson-Haefel book in WebLogic 6.0 and I?m havin the error:
java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError: com.titan.cabin.CabinHome
java.lang.NoClassDefFoundError: com.titan.cabin.CabinHome
I was debuggin it and I discovered tha the error occurs right after I get a remote reference to the bean with
Object ref = ctx.lookup("java:comp/env/ejb/Cabin");
I got the reference but then when I try to do:
CabinHome home = (CabinHome)(javax.rmi.PortableRemoteObject.narrow(ref, CabinHome.class));
the error occurs.

Here goes a fragment of code showing the reference I recovered:
Object ref = ctx.lookup("java:comp/env/ejb/Cabin");
// this next line prints: com.titan.cabin.CabinEJBHomeImpl_WLStub
System.out.println(ref.getClass().toString());
here goes a fragment of my ejb-jar.xml:
<session>
<description>stateless ejb que manuseia Cabin ejb</description>
<ejb-name>TravelAgent</ejb-name>
<home>com.titan.travelagent.TravelAgentHome</home>
<remote>com.titan.travelagent.TravelAgent</remote>
<ejb-class>com.titan.travelagent.TravelAgentEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-ref>
<ejb-ref-name>ejb/Cabin</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>com.titan.cabin.CabinHome</home>
<remote>com.titan.cabin.Cabin</remote>
</ejb-ref>
</session>

and a fragment of weblogic-ejb-jar.xml:
<ejb-reference-description>
<ejb-ref-name>ejb/Cabin</ejb-ref-name>
<jndi-name>Cabin</jndi-name>
</ejb-reference-description>

Any help will be wellcome.
txs in advance.
PS - If I set the classpath to
C:\bea\wlserver6.0\config\mydomain\applications\Cabin.jar
it works but I�m sure thats not the wright thing to do.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic