Hi Aaron,
yes :) this was the problem. I had the jboss installed in the 'Program
Files' folder, however in all the environment variables on my Windows2000
system I had defined the folder as 'Progra~1'.
Anyway thanks for your feedback :)
Have a nice day,
Kamen.
----- Original Message -----
From: "Aaron Mulder" <[EMAIL PROTECTED]>
To: "jBoss" <[EMAIL PROTECTED]>
Sent: Monday, September 25, 2000 2:20 PM
Subject: Re: [jBoss-User] EJB-ref problem
> Did you install jBoss in a directory with spaces in the name? The
> "no protocol: Files/..." message looks suspiciously like you installed
> into "Program Files". If so, please install into a directory without
> spaces and try again.
>
> Aaron
>
>
> On Mon, 25 Sep 2000, Kamen wrote:
> > > From the exception, it looks like there's a problem in the
> > > ejbCreate or ejbPostCreate method. The only thing that leaps out at
me
> > > there is that it looks up a number of beans - are they all there?
> >
> > yes - they are probably the easiest way is to concentrate on the account
> > manager and the account beans example - I sent you the server trace
> > including the successfull deployment messages for these two beans.
> > Once again:
> > > > [Container factory] Deploying:file:/S:/Program
> > > > Files/jboss/jBoss20/deploy/seb.ja
> > > > r
> > > > [Container factory] S:\Program Files\jboss\jBoss20\tmp\deploy
> > > > [Container factory] Loading ejb-jar.xml : jar:file:/S:/Program
> > > > Files/jboss/jBoss
> > > > 20/tmp/deploy/tmpejbjar30889.jar!/META-INF/ejb-jar.xml
> > > > [Container factory] Loading standardjboss.xml : jar:file:/S:/Program
> > > > Files/jboss
> > > > /jBoss20/lib/ext/jboss.jar!/org/jboss/metadata/standardjboss.xml
> > > > [Verifier] Verifying file:/S:/Program
> > > > Files/jboss/jBoss20/tmp/deploy/tmpejbjar30
> > > > 889.jar
> > > > [Verifier] Account: Verified.
> > > > [Verifier] AccountManager: Verified.
> > > > [Container factory] Deploying Account
> > > > [Container factory] Container Invoker Optimize='false'
> > > > [Container factory] Deploying AccountManager
> > > > [Container factory] Container Invoker Optimize='false'
> > > > [Container factory] Binding an EJBReference Account
> > > > [Container factory] Binding Account to internal JNDI source: Account
> > > > [JAWS] Initializing JAWS plugin for Account
> > > > [JAWS] Loading standardjaws.xml : jar:file:/S:/Program
> > > > Files/jboss/jBoss20/lib/e
> > > > xt/jboss.jar!/org/jboss/ejb/plugins/jaws/metadata/standardjaws.xml
> > > > [Container factory] Table 'Account' already exists!
> > > > [Container factory] Bound AccountManager to AccountManager
> > > > [Container factory] Bound Account to Account
> > > > [Container factory] Deployed application: file:/S:/Program
> > > > Files/jboss/jBoss20/d
> > > > eploy/seb.jar
> >
> >
> >
> > > The
> > > easiest way to troubleshoot this is probably to put an
> > > e.printStackTrace() in the ejbCreate where it catches Exception, and
see
> > > what exception is showing up there.
> >
> >
> > I did that. Here is the result:
> >
> > [Verifier] Account: Verified.
> > [Verifier] AccountManager: Verified.
> > [Container factory] Deploying Account
> > [Container factory] Container Invoker Optimize='false'
> > [Container factory] Deploying AccountManager
> > [Container factory] Container Invoker Optimize='false'
> > [Container factory] Binding an EJBReference Account
> > [Container factory] Binding Account to internal JNDI source: Account
> > [JAWS] Initializing JAWS plugin for Account
> > [JAWS] Loading standardjaws.xml : jar:file:/S:/Program
> > Files/jboss/jBoss20/lib/e
> > xt/jboss.jar!/org/jboss/ejb/plugins/jaws/metadata/standardjaws.xml
> > [Container factory] Table 'Account' already exists!
> > [Container factory] Bound AccountManager to AccountManager
> > [Container factory] Bound Account to Account
> > [Container factory] Deployed application: file:/S:/Program
> > Files/jboss/jBoss20/d
> > eploy/seb.jar
> > [Default] JRMPCI:invokeHome create
> > [Default] Tx is null
> > [AccountManager] TX_REQUIRED for create
> > [AccountManager] begin tx
> > [AccountManager] commit tx 0
> > [AccountManager] TX_REQUIRED for login
> > [AccountManager] begin tx
> > [AccountManager] Trying to get account home...
> > [AccountManager] Got initial context!
> > javax.naming.CommunicationException. Root exception is [AccountManager]
> > java.ne
> > t.MalformedURLException: no protocol:
> > Files/jboss/jBoss20/tmp/deploy/tmpejbjar35
> > 341.jar
> > at java.net.URL.<init>(Unknown Source)
> > at java.net.URL.<init>(Unknown Source)
> > at java.net.URL.<init>(Unknown Source)
> > at sun.rmi.server.LoaderHandler.pathToURLs(Unknown Source)
> > at sun.rmi.server.LoaderHandler.getClassLoader(Unknown Source)
> > at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown
> > Source)
> > at java.io.ObjectInputStream.inputProxyClassDescriptor(Unknown
> > Source)
> > at java.io.ObjectInputStream.readObject(Unknown Source)
> > at java.io.ObjectInputStream.readObject(Unknown Source)
> > at java.io.ObjectInputStream.inputObject(Unknown Source)
> > at java.io.ObjectInputStream.readObject(Unknown Source)
> > at java.io.ObjectInputStream.readObject(Unknown Source)
> > at java.rmi.MarshalledObject.get(Unknown Source)
> > at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:284)
> > at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:265)
> > at javax.naming.InitialContext.lookup(Unknown Source)
> > at
> > org.jboss.zol.accountmanager.bean.AccountManagerBean.getAccountHome(o
> > rg/jboss/zol/accountmanager/bean/AccountManagerBean.java:100)
> > at
> > org.jboss.zol.accountmanager.bean.AccountManagerBean.login(org/jboss/
> > zol/accountmanager/bean/AccountManagerBean.java:62)
> > at java.lang.reflect.Method.invoke(Native Method)
> > at
> > org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(S
> > tatelessSessionContainer.java:445)
> > at
> > org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat
> > elessSessionInstanceInterceptor.java:83)
> > at
> > org.jboss.ejb.plugins.TxInterceptor.invokeNext(TxInterceptor.java:128
> > )
> > at
> > org.jboss.ejb.plugins.TxInterceptor.runWithTransactions(TxInterceptor
> > .java:196)
> > at
org.jboss.ejb.plugins.TxInterceptor.invoke(TxInterceptor.java:96)
> > at
> > org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
> > java:140)
> > at
> > org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:156)
> > at
> > org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContai
> > ner.java:264)
> > at
> > org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPCon
> > tainerInvoker.java:202)
> > at
> > org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPCon
> > tainerInvoker.java:179)
> > at java.lang.reflect.Method.invoke(Native Method)
> > at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
> > at sun.rmi.transport.Transport$1.run(Unknown Source)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at sun.rmi.transport.Transport.serviceCall(Unknown Source)
> > at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown
Source)
> > at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown
> > Sour
> > ce)
> > at java.lang.Thread.run(Unknown Source)
> > [AccountManager] rollback tx 1
> > [AccountManager] Exception occurred; nested exception is:
> > java.lang.NullPointerException
> > [AccountManager] TX_REQUIRED for login
> > [AccountManager] begin tx
> > [AccountManager] Trying to get account home...
> > [AccountManager] Got initial context!
> > javax.naming.CommunicationException. Root exception is [AccountManager]
> > java.ne
> > t.MalformedURLException: no protocol:
> > Files/jboss/jBoss20/tmp/deploy/tmpejbjar35
> > 341.jar
> > at java.net.URL.<init>(Unknown Source)
> > at java.net.URL.<init>(Unknown Source)
> > at java.net.URL.<init>(Unknown Source)
> > at sun.rmi.server.LoaderHandler.pathToURLs(Unknown Source)
> > at sun.rmi.server.LoaderHandler.getClassLoader(Unknown Source)
> > at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown
> > Source)
> > at java.io.ObjectInputStream.inputProxyClassDescriptor(Unknown
> > Source)
> > at java.io.ObjectInputStream.readObject(Unknown Source)
> > at java.io.ObjectInputStream.readObject(Unknown Source)
> > at java.io.ObjectInputStream.inputObject(Unknown Source)
> > at java.io.ObjectInputStream.readObject(Unknown Source)
> > at java.io.ObjectInputStream.readObject(Unknown Source)
> > at java.rmi.MarshalledObject.get(Unknown Source)
> > at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:284)
> > at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:265)
> > at javax.naming.InitialContext.lookup(Unknown Source)
> > at
> > org.jboss.zol.accountmanager.bean.AccountManagerBean.getAccountHome(o
> > rg/jboss/zol/accountmanager/bean/AccountManagerBean.java:100)
> > at
> > org.jboss.zol.accountmanager.bean.AccountManagerBean.login(org/jboss/
> > zol/accountmanager/bean/AccountManagerBean.java:62)
> > at java.lang.reflect.Method.invoke(Native Method)
> > at
> > org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(S
> > tatelessSessionContainer.java:445)
> > at
> > org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat
> > elessSessionInstanceInterceptor.java:83)
> > at
> > org.jboss.ejb.plugins.TxInterceptor.invokeNext(TxInterceptor.java:128
> > )
> > at
> > org.jboss.ejb.plugins.TxInterceptor.runWithTransactions(TxInterceptor
> > .java:196)
> > at
org.jboss.ejb.plugins.TxInterceptor.invoke(TxInterceptor.java:96)
> > at
> > org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
> > java:140)
> > at
> > org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:156)
> > at
> > org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContai
> > ner.java:264)
> > at
> > org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPCon
> > tainerInvoker.java:202)
> > at
> > org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPCon
> > tainerInvoker.java:179)
> > at java.lang.reflect.Method.invoke(Native Method)
> > at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
> > at sun.rmi.transport.Transport$1.run(Unknown Source)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at sun.rmi.transport.Transport.serviceCall(Unknown Source)
> > at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown
Source)
> > at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown
> > Sour
> > ce)
> > at java.lang.Thread.run(Unknown Source)
> > [AccountManager] rollback tx 2
> >
> > Looking forward for you reply,
> > Regards,
> > Kamen
> >
> >
> >
> >
> > > Aaron
> > >
> > > On Mon, 25 Sep 2000, Kamen wrote:
> > > > Here is the source code for the AllTypes bean. It's actually
supposed to
> > be
> > > > the same as the one that jboss distribution is bundled with.
> > > >
> > > > package org.jboss.zol.testbean2.bean;
> > > >
> > > > import java.rmi.*;
> > > > import javax.ejb.*;
> > > > import java.util.Collection;
> > > > import java.util.ArrayList;
> > > >
> > > > import org.jboss.zol.testbean.interfaces.StatefulSession;
> > > > import org.jboss.zol.testbean.interfaces.StatefulSessionHome;
> > > > import org.jboss.zol.testbean.interfaces.StatelessSession;
> > > > import org.jboss.zol.testbean.interfaces.StatelessSessionHome;
> > > > import org.jboss.zol.testbean.interfaces.EnterpriseEntity;
> > > > import org.jboss.zol.testbean.interfaces.EnterpriseEntityHome;
> > > > import javax.naming.Context;
> > > > import javax.naming.InitialContext;
> > > > import java.sql.Date;
> > > > import java.sql.Timestamp;
> > > > import org.jboss.zol.testbean2.interfaces.MyObject;
> > > >
> > > >
> > > > public class AllTypesBean implements EntityBean {
> > > > public boolean aBoolean;
> > > > public byte aByte;
> > > > public short aShort;
> > > > public int anInt;
> > > > public long aLong;
> > > > public float aFloat;
> > > > public double aDouble;
> > > > // public char aChar;
> > > > public String aString;
> > > > public Date aDate;
> > > > public Timestamp aTimestamp;
> > > >
> > > > public MyObject anObject;
> > > >
> > > > public StatefulSession statefulSession;
> > > > public StatelessSession statelessSession;
> > > > public EnterpriseEntity enterpriseEntity;
> > > >
> > > > public Collection aList;
> > > >
> > > > private EntityContext entityContext;
> > > >
> > > >
> > > > public String ejbCreate(String pk) throws RemoteException,
> > > > CreateException {
> > > > return ejbCreate(true, (byte)1, (short)2, (int)3, (long)4,
(float)5.6,
> > > > (double)7.8, /*'9',*/ pk, new Date(System.currentTimeMillis()),
> > > > new Timestamp(System.currentTimeMillis()), new MyObject());
> > > > }
> > > >
> > > > public void ejbPostCreate(String pk)
> > > > throws RemoteException, CreateException {}
> > > >
> > > >
> > > > public String ejbCreate(boolean aBoolean, byte aByte, short
aShort,
> > int
> > > > anInt,
> > > > long aLong, float aFloat, double aDouble, /*char aChar,*/ String
> > aString,
> > > > Date aDate, Timestamp aTimestamp, MyObject anObject )
> > > >
> > > > throws RemoteException, CreateException {
> > > >
> > > > this.aBoolean = aBoolean;
> > > > this.aByte = aByte;
> > > > this.aShort = aShort;
> > > > this.anInt = anInt;
> > > > this.aLong = aLong;
> > > > this.aFloat = aFloat;
> > > > this.aDouble = aDouble;
> > > > this.aChar = aChar;
> > > > this.aString = aString;
> > > > this.aDate = aDate;
> > > > this.aTimestamp = aTimestamp;
> > > > this.anObject = anObject;
> > > >
> > > > try {
> > > > Context ctx = new InitialContext();
> > > >
> > > > StatefulSessionHome sfHome =
> > > > (StatefulSessionHome)ctx.lookup("java:comp/env/ejb/stateful");
> > > > statefulSession = sfHome.create();
> > > >
> > > > StatelessSessionHome slHome =
> > > > (StatelessSessionHome)ctx.lookup("java:comp/env/ejb/stateless");
> > > > statelessSession = slHome.create();
> > > >
> > > > EnterpriseEntityHome eeHome =
> > > > (EnterpriseEntityHome)ctx.lookup("java:comp/env/ejb/entity");
> > > > try {
> > > > enterpriseEntity = eeHome.findByPrimaryKey(aString);
> > > > } catch (FinderException e) {
> > > > enterpriseEntity = eeHome.create(aString);
> > > > }
> > > >
> > > > } catch (Exception e) {
> > > > throw new CreateException(e.getMessage());
> > > > }
> > > >
> > > > aList = new ArrayList();
> > > >
> > > > return null;
> > > > }
> > > >
> > > >
> > > > public void ejbPostCreate(boolean aBoolean, byte aByte, short
> > aShort,
> > > > int anInt,
> > > > long aLong, float aFloat, double aDouble, /*char aChar,*/ String
> > aString,
> > > > Date aDate, Timestamp aTimestamp, MyObject anObject )
> > > >
> > > > throws RemoteException, CreateException {}
> > > >
> > > > public void ejbActivate() throws RemoteException {}
> > > >
> > > > public void ejbLoad() throws RemoteException {}
> > > >
> > > > public void ejbPassivate() throws RemoteException {}
> > > >
> > > > public void ejbRemove() throws RemoteException, RemoveException
{}
> > > >
> > > > public void ejbStore() throws RemoteException {}
> > > >
> > > >
> > > > public void setEntityContext(EntityContext context) throws
> > > > RemoteException {
> > > > entityContext = context;
> > > > }
> > > >
> > > > public void unsetEntityContext() throws RemoteException {
> > > > entityContext = null;
> > > > }
> > > >
> > > >
> > > > public String callBusinessMethodA() throws RemoteException {
> > > > // test external ejb-ref in testbeans.jar
> > > > return statefulSession.callBusinessMethodA();
> > > > }
> > > >
> > > >
> > > >
> > > > public void updateAllValues(boolean aBoolean, byte aByte, short
> > aShort,
> > > > int anInt,
> > > > long aLong, float aFloat, double aDouble, /*char aChar,*/ String
> > aString,
> > > > Date aDate, Timestamp aTimestamp, MyObject anObject ) {
> > > >
> > > > this.aBoolean = aBoolean;
> > > > this.aByte = aByte;
> > > > this.aShort = aShort;
> > > > this.anInt = anInt;
> > > > this.aLong = aLong;
> > > > this.aFloat = aFloat;
> > > > this.aDouble = aDouble;
> > > > file://this.aChar = aChar;
> > > > this.aString = aString;
> > > > this.aDate = aDate;
> > > > this.aTimestamp = aTimestamp;
> > > > this.anObject = anObject;
> > > >
> > > > try {
> > > > Context ctx = new InitialContext();
> > > >
> > > > EnterpriseEntityHome eeHome =
> > > > (EnterpriseEntityHome)ctx.lookup("java:comp/env/ejb/entity");
> > > > try {
> > > > enterpriseEntity = eeHome.findByPrimaryKey(aString);
> > > > } catch (FinderException e) {
> > > > enterpriseEntity = eeHome.create(aString);
> > > > }
> > > >
> > > > } catch (Exception e) {
> > > > // ignore
> > > > }
> > > >
> > > > }
> > > >
> > > > public void addObjectToList(Object anObject) throws RemoteException
{
> > > > aList.add(anObject);
> > > > }
> > > >
> > > > public void removeObjectFromList(Object anObject) throws
> > RemoteException {
> > > > aList.remove(anObject);
> > > > }
> > > >
> > > > public Collection getObjectList() throws RemoteException
return
> > > > aList; }
> > > >
> > > > public boolean getBoolean() throws RemoteException { return
aBoolean; }
> > > > public byte getByte() throws RemoteException { return aByte; }
> > > > public short getShort() throws RemoteException { return aShort; }
> > > > public int getInt() throws RemoteException { return anInt; }
> > > > public long getLong() throws RemoteException { return aLong; }
> > > > public float getFloat() throws RemoteException { return aFloat; }
> > > > public double getDouble() throws RemoteException { return
aDouble; }
> > > > public char getChar() throws RemoteException { return aChar; }
> > > > public String getString() throws RemoteException { return
aString; }
> > > > public Date getDate() throws RemoteException { return aDate; }
> > > > public Timestamp getTimestamp() throws RemoteException { return
> > > > aTimestamp; }
> > > >
> > > > public MyObject getObject() throws RemoteException { return
anObject; }
> > > >
> > > > public Handle getStateful() throws RemoteException
> > > >
> > > > return statefulSession.getHandle();
> > > > }
> > > >
> > > > public Handle getStateless() throws RemoteException {
> > > > return statelessSession.getHandle();
> > > > }
> > > >
> > > > public Handle getEntity() throws RemoteException {
> > > > return enterpriseEntity.getHandle();
> > > > }
> > > >
> > > >
> > > > }
> > > >
> > > > Another piece of code that doesn't work for the same reason I
suppose
> > is:
> > > > package org.jboss.zol.accountmanager.bean;
> > > >
> > > > /*
> > > > * Class org.jboss.zol.accountmanager.bean.AccountManagerBean;
> > > > * Copyright (C) 2000 Juha Lindfors
> > > > *
> > > > * This program is free software; you can redistribute it and/or
> > > > * modify it under the terms of the GNU General Public License
> > > > * as published by the Free Software Foundation; either version 2
> > > > * of the License, or (at your option) any later version.
> > > > *
> > > > * This program is distributed in the hope that it will be useful,
> > > > * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > > > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> > > > * GNU General Public License for more details.
> > > > *
> > > > * You should have received a copy of the GNU General Public License
> > > > * along with this program; if not, write to the Free Software
> > > > * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307,
> > > > USA.
> > > > *
> > > > * This package and its source code is available at www.jboss.org
> > > > * $Id: AccountManagerBean.java,v 1.1.1.1 2000/04/27 19:45:34 juha
Exp $
> > > > *
> > > > * You can reach the author by sending email to
[EMAIL PROTECTED]
> > > > */
> > > >
> > > > // standard imports
> > > > import javax.ejb.*;
> > > > import javax.rmi.*;
> > > > import java.rmi.*;
> > > > import javax.naming.*;
> > > > import java.util.*;
> > > >
> > > > // non-standard class dependencies
> > > > import org.jboss.zol.account.interfaces.AccountHome;
> > > > import org.jboss.zol.account.interfaces.Account;
> > > > import org.jboss.zol.account.interfaces.InvalidLoginException;
> > > >
> > > >
> > > > /**
> > > > * AccountManager stateless session bean implementation. This bean
acts
> > > > * as a mediator between the client and the Account entity bean.
> > > > *
> > > > * For more detailed documentation, refer to the
> > > > * <a href=""> << INSERT DOC LINK HERE >> </a>
> > > > *
> > > > * @see << OTHER RELATED CLASSES >>
> > > > *
> > > > * @author Juha Lindfors
> > > > * @version $Revision: 1.1.1.1 $
> > > > * @since JDK 1.2
> > > > */
> > > > public class AccountManagerBean implements SessionBean {
> > > >
> > > > private final static String ACCOUNT_REF =
> > > > "Account";
> > > >
> > > >
> > > > public void login(String name, String passwd) throws
> > > > InvalidLoginException {
> > > >
> > > > try {
> > > > AccountHome home = getAccountHome();
> > > > Account account = home.findByPrimaryKey(name);
> > > > account.validateLogin(name, passwd);
> > > > }
> > > > catch (FinderException e) {
> > > > throw new InvalidLoginException("Account not found: " +
> > > > e.getMessage());
> > > > }
> > > > catch (NamingException e) {
> > > > throw new InvalidLoginException("Account bean not found:
" +
> > > > e.getMessage());
> > > > }
> > > > catch (RemoteException e) {
> > > > throw new InvalidLoginException("Yeah this was it, Juha
you
> > > > dumbass" + e.getMessage());
> > > > }
> > > > }
> > > >
> > > > public void createAccount(String name, String passwd) throws
> > > >
> > CreateException {
> > > >
> > > > try {
> > > > AccountHome home = getAccountHome();
> > > > home.create(name, passwd);
> > > > }
> > > > catch (NamingException e) {
> > > > throw new CreateException("Account bean not found: " +
> > > > e.getMessage());
> > > > }
> > > > catch (RemoteException e) {
> > > > throw new CreateException("Yeah I need EJB for dummies
> > edition:
> > > > " + e.getMessage());
> > > > }
> > > >
> > > > }
> > > >
> > > > private AccountHome getAccountHome() throws NamingException {
> > > > System.out.println("Trying to get account home...");
> > > > Context root = new InitialContext();
> > > > System.out.println("Got initial context!");
> > > >
> > > > file://***************** please note -it did not work neither
> > this::*************
> > > > file://Object obj = root.lookup("java:comp/env/" +
> > ACCOUNT_REF);
> > > > // ***************** nor this way :
> > > > Object obj = root.lookup(ACCOUNT_REF);
> > > > System.out.println("Got an object reference...");
> > > > Object ref = PortableRemoteObject.narrow(obj,
> > > > AccountHome.class);// an exception is thrown here - see the server
trace
> > > > below
> > > > System.out.println("Object reference narrowed successfully!");
> > > > /*
> > > > * [TODO] handle ClassCastException of narrow
> > > > */
> > > > return (AccountHome)ref;
> > > > }
> > > >
> > > > public void ejbCreate() throws CreateException {};
> > > > public void ejbRemove() {}
> > > > public void ejbActivate() {}
> > > > public void ejbPassivate() {}
> > > > public void setSessionContext(SessionContext sc) {}
> > > > }
> > > >
> > > > As you know at some point in it's business life the AccountManager
bean
> > is
> > > > trying to 'talk' to the 'Account' bean for which reason it's trying
to
> > get
> > > > the AccountHome and it's using the private AccountHome
getAccountHome()
> > > > throws NamingException
> > > > function for this.
> > > > As you've probably noticed I added some comments in this function,
> > except
> > > > this everything else is untouched from the original source code
> > (including
> > > > the client source code).
> > > > I managed to deploy the AccountManager and the Account home and
remote
> > > > interfaces as well as the beans themselves.
> > > > The server output is as follows:
> > > >
> > > > [Container factory] Deploying:file:/S:/Program
> > > > Files/jboss/jBoss20/deploy/seb.ja
> > > > r
> > > > [Container factory] S:\Program Files\jboss\jBoss20\tmp\deploy
> > > > [Container factory] Loading ejb-jar.xml : jar:file:/S:/Program
> > > > Files/jboss/jBoss
> > > > 20/tmp/deploy/tmpejbjar30889.jar!/META-INF/ejb-jar.xml
> > > > [Container factory] Loading standardjboss.xml : jar:file:/S:/Program
> > > > Files/jboss
> > > > /jBoss20/lib/ext/jboss.jar!/org/jboss/metadata/standardjboss.xml
> > > > [Verifier] Verifying file:/S:/Program
> > > > Files/jboss/jBoss20/tmp/deploy/tmpejbjar30
> > > > 889.jar
> > > > [Verifier] Account: Verified.
> > > > [Verifier] AccountManager: Verified.
> > > > [Container factory] Deploying Account
> > > > [Container factory] Container Invoker Optimize='false'
> > > > [Container factory] Deploying AccountManager
> > > > [Container factory] Container Invoker Optimize='false'
> > > > [Container factory] Binding an EJBReference Account
> > > > [Container factory] Binding Account to internal JNDI source: Account
> > > > [JAWS] Initializing JAWS plugin for Account
> > > > [JAWS] Loading standardjaws.xml : jar:file:/S:/Program
> > > > Files/jboss/jBoss20/lib/e
> > > > xt/jboss.jar!/org/jboss/ejb/plugins/jaws/metadata/standardjaws.xml
> > > > [Container factory] Table 'Account' already exists!
> > > > [Container factory] Bound AccountManager to AccountManager
> > > > [Container factory] Bound Account to Account
> > > > [Container factory] Deployed application: file:/S:/Program
> > > > Files/jboss/jBoss20/d
> > > > eploy/seb.jar
> > > > [Default] JRMPCI:invokeHome create
> > > > [Default] Tx is null
> > > > [AccountManager] TX_REQUIRED for create
> > > > [AccountManager] begin tx
> > > > [AccountManager] commit tx 0
> > > > [AccountManager] TX_REQUIRED for login
> > > > [AccountManager] begin tx
> > > > [AccountManager] Trying to get account home...
> > > > [AccountManager] Got initial context!
> > > > [AccountManager] commit tx 1
> > > > [AccountManager] Account bean not found: null
> > > >
> > > > If you need some more information please let me now :)
> > > > Regards,
> > > > Kamen.
> > > >
> > > > ----- Original Message -----
> > > > From: "Aaron Mulder" <[EMAIL PROTECTED]>
> > > > To: "Kamen" <[EMAIL PROTECTED]>
> > > > Sent: Monday, September 25, 2000 12:43 PM
> > > > Subject: Re: EJB-ref problem
> > > >
> > > >
> > > > > On Mon, 25 Sep 2000, Kamen wrote:
> > > > > > Ok - sorry for skipping the mailing list - I'm new to the
'mailing
> > lists
> > > > > > system'.
> > > > > > Please accept my appologies :)
> > > > > > I'll send you the bean source code ASAP.
> > > > > > Best regards,
> > > > > > Kamen
> > > > >
> > > > > No problem. It's just that it doesn't help anyone else if we talk
> > > > > about it privately, and then we have to do it again if anyone else
has
> > the
> > > > > same issue.
> > > > >
> > > > > Aaron
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > --------------------------------------------------------------
> > > To subscribe: [EMAIL PROTECTED]
> > > To unsubscribe: [EMAIL PROTECTED]
> > > Problems?: [EMAIL PROTECTED]
> > >
> >
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > Problems?: [EMAIL PROTECTED]
> >
>
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]