Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 61899 invoked from network); 3 Apr 2008 06:51:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Apr 2008 06:51:41 -0000 Received: (qmail 38681 invoked by uid 500); 3 Apr 2008 06:51:39 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 38653 invoked by uid 500); 3 Apr 2008 06:51:39 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 38642 invoked by uid 99); 3 Apr 2008 06:51:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Apr 2008 23:51:39 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.136.44.61] (HELO smtp106.prem.mail.sp1.yahoo.com) (98.136.44.61) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 03 Apr 2008 06:50:45 +0000 Received: (qmail 58443 invoked from network); 3 Apr 2008 06:51:04 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Mime-Version:In-Reply-To:References:Content-Type:Message-Id:Content-Transfer-Encoding:From:Subject:Date:To:X-Mailer; b=nxspAg2vfVywZFzm1XXFQwy4bL5klKt/2jWkYv60tyq/Q5T0VH/yT2/g6fTeGusfa+KUKXIgvQw9tgsrSHTBG4pJSlZ7XC+va+yzz8PM9pJXNJmzCNBnHhTUExuva2NVIXcwv7ANc0iNXeqCPTK9xg9wrhVlM31AoC0g2x6H87U= ; Received: from unknown (HELO ?192.168.1.102?) (david_jencks@67.102.173.8 with plain) by smtp106.prem.mail.sp1.yahoo.com with SMTP; 3 Apr 2008 06:51:04 -0000 X-YMail-OSG: gGgzFgkVM1noMBGYGiOrx.wBy.hbg.3gVKyA1tmz6uy4boIU02Ffw7iSsF3FuyoYaiA0_oWhDJUL7ZhCCR_wwXHthuP1HgPp.1lPWWUJpGAM1tEORl0- X-Yahoo-Newman-Property: ymail-3 Mime-Version: 1.0 (Apple Message framework v753) In-Reply-To: <16418687.post@talk.nabble.com> References: <16418687.post@talk.nabble.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: David Jencks Subject: Re: Exception by using EJB3 on Geronimo 2 Date: Wed, 2 Apr 2008 23:51:01 -0700 To: user@geronimo.apache.org X-Mailer: Apple Mail (2.753) X-Virus-Checked: Checked by ClamAV on apache.org Thanks for resending with comprehensible formatting :-) I think you left out some information about your environment. I think there is a jndi.properties file in the client's classpath that is directing the use of a corba name service for jndi lookups, using the sun ee corba implementation in the client. It's somewhat tricky to get that to work. Access to ejbs from anything other than a javaee module in the same javaee application is not standardized. I recommend taking the corba and sun stuff out of your client and including the openejb3 client jar in its classpath. This should set the jndi properties correctly for the openejb transport. If you look in the server log as your application starts you should see the global jndi names your ejbs are bound under and that you can use with the openejb jndi provider to look up your ejbs. hope this helps david jencks On Apr 1, 2008, at 8:41 AM, thomas2004 wrote: > > Hi all, > > I am learning the EJB3. I follow a tutorial under: > http://www.webagesolutions.com/knowledgebase/javakb/jkb005/index.html > > and it runs quite well since I use the SUN Application Server. > > So I deployed the EJB Jars onto Geronimo 2. Bu tas I try to start > the client > I got exception as follow: > > Caused by: java.net.ConnectException: Connection refused: connect > at sun.nio.ch.Net.connect(Native Method) > at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:464) > at > com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel > (ORBUtility.java:105) > at > com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket > (IIOPSSLSocketFactory.java:332) > ... 16 more > > Here is my session bean: > > @Stateless(name = "Example", mappedName = "ejb/SimpleBeanJNDI") > public class SimpleBeanImpl implements SimpleBean { > public String sayHello(String name) { > return "Hello, the text you enter is: " + name + "!"; > } > } > > > And here is the client and lookup: > > public class TestClient { > > public void runTest() throws Exception { > InitialContext ctx = new InitialContext(); > SimpleBean bean = (SimpleBean) ctx.lookup("ejb/SimpleBeanJNDI"); > String result = bean.sayHello("Billy Bob, Wei Chen"); > System.out.println(result); > } > > public static void main(String[] args) { > try { > TestClient cli = new TestClient(); > cli.runTest(); > > } catch (Exception e) { > e.printStackTrace(); > } > } > } > > Has someone idea? > > Regards > > Thomas > > > -- > View this message in context: http://www.nabble.com/Exception-by- > using-EJB3-on-Geronimo-2-tp16418687s134p16418687.html > Sent from the Apache Geronimo - Users mailing list archive at > Nabble.com. >