As the exception says: "Deprecated" According to the documentation, EJBContext.getEnvironment() is deprecated (and, IIRC, it has been for some time).
"Deprecated. Use the JNDI naming context java:comp/env to access enterprise bean's environment." Dan. -- Danny Yates -----Original Message----- From: David McLoughlin [mailto:[EMAIL PROTECTED] Sent: 18 August 2003 12:44 To: [EMAIL PROTECTED] Subject: [JBoss-user] Entity Context Error When I call the following method I get the following error. This is a method in my Entity Bean public void setEntityContext(EntityContext ctx) throws RemoteException { public void setEntityContext(EntityContext ctx) throws RemoteException { this.ctx = ctx; env = ctx.getEnvironment(); } Client file: Properties prop = System.getProperties(); prop.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); prop.put("java.naming.provider.url", "jnp://192.168.1.70:1099"); prop.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); //for (Enumeration e = prop.propertyNames(); e.hasMoreElements();) //System.out.println(e.nextElement() +" : " +prop.getProperty((String)e.nextElement())); Context ctx = new InitialContext(prop); //InitialContext ctx = new InitialContext(); AccountHome home = (AccountHome) ctx.lookup("ejb/Account"); THIS IS THE ERROR FROM THE JBOSS SERVER javax.ejb.EJBException: Deprecated at org.jboss.ejb.EnterpriseContext$EJBContextImpl.getEnvironment(EnterpriseCont ext.java:340) at AccountBean.setEntityContext(AccountBean.java:210) at org.jboss.ejb.EntityEnterpriseContext.<init>(EntityEnterpriseContext.java:76 ) at org.jboss.ejb.plugins.EntityInstancePool.create(EntityInstancePool.java:86) at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:209 ) at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInt erceptor.java:78) THIS IS FROM THE CLIENT java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.ServerException: EJBException:; nested exception is: javax.ejb.EJBException: Deprecated at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:7 01) at java.lang.Thread.run(Thread.java:536) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC all.java:247) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133) at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source) at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProx y.java:138) at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108) at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77 ) at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80) at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198) at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76) at $Proxy0.create(Unknown Source) at Client.main(Client.java:27) Caused by: java.rmi.ServerException: EJBException:; nested exception is: javax.ejb.EJBException: Deprecated at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:357 ) any help would be appreciated thanks D __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user _____________________________________________________________________ Notice to recipient: The information in this internet e-mail and any attachments is confidential and may be privileged. It is intended solely for the addressee. If you are not the intended addressee please notify the sender immediately by telephone. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to external clients any opinions or advice contained in this internet e-mail are subject to the terms and conditions expressed in any applicable governing terms of business or client engagement letter issued by the pertinent Bank of America group entity. If this email originates from the U.K. please note that Bank of America, N.A., London Branch, Banc of America Securities Limited and Banc of America Futures Incorporated are regulated by the Financial Services Authority. _____________________________________________________________________ ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user