[prev in list] [next in list] [prev in thread] [next in thread]
List: jboss-user
Subject: [jboss-user] [Beginners Corner] - Can't find the SessionBean
From: arres04 <do-not-reply () jboss ! com>
Date: 2008-08-30 17:23:43
Message-ID: 21682726.1220117023598.JavaMail.jboss () colo-br-02 ! atl ! jboss ! com
[Download RAW message or body]
Hi all,
I am trying to setup my first jboss application, but I have some kind of a problem.
During the access of the Bean I get the following exception:
| javax.naming.NameNotFoundException: CalculatorBean not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
|
This is the Bean:
| @Stateless(name="CalculatorBean")
| public class CalculatorBean implements CalculatorRemote, CalculatorLocal {
|
| public int sum(int add1, int add2) {
| return add1+add2;
| }
|
| public int multiply(int mul1, int mul2) {
| return mul1*mul2;
| }
|
| }
|
And these are the interfaces:
| @Local
| public interface CalculatorLocal extends Calculator{
|
| }
|
| @Remote
| public interface CalculatorRemote extends Calculator{
|
| }
|
And next the Client:
| public void setUp() {
| try {
| Properties properties = new Properties();
| properties.put("java.naming.factory.initial", \
"org.jnp.interfaces.NamingContextFactory"); | \
properties.put("java.naming.factory.url.pkgs", \
"=org.jboss.naming:org.jnp.interfaces"); | \
properties.put("java.naming.provider.url", "localhost:1099"); | \
InitialContext ctx = new InitialContext(properties); | remote = \
(CalculatorRemote) ctx.lookup("CalculatorBean/remote"); | } catch (Exception \
e) { | e.printStackTrace();
| }
| }
|
I have no idea what kind of a problem this is. I also checked the JNDI-Namespace \
inside the jboss, but this seems to be finde:
| +- c-backend-1-SNAPSHOT (class: org.jnp.interfaces.NamingContext)
| | +- CalculatorBean (class: org.jnp.interfaces.NamingContext)
| | | +- local (proxy: $Proxy67 implements interface \
de.backend.bean.calculator.CalculatorLocal,interface org.jboss.ejb3.JBossProxy) | \
| | +- remote (proxy: $Proxy65 implements interface \
de.backend.bean.calculator.CalculatorRemote,interface org.jboss.ejb3.JBossProxy) |
It would be very nice, if someone could help me resolving my problem :(
Thank you,
Arres
View the original post : \
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173447#4173447
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173447
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic