EJB getHandle()

Hi guys !!!!
i've a little problem using the function getHandle() to get the handle of an Stateful EJB . My AppServer is Orion 2.0.1
Give a look to this piece of code :
package test;
import java.util.*;
import java.io.*;
import java.rmi.RemoteException;
import javax.naming.*;
import javax.rmi.*;
import javax.ejb.*;
import com.evermind.server.ejb.*;
import myejb.*;
public class ClientHandle
public static void main(String[] args)
   try
     Context context = new InitialContext();
     Mysessionhome homeObj =    (Mysessionhome)context.lookup("ejb/MioSession");
     MySessionRemote Bean = (MySessionRemote)homeObj.create(-666);
     Handle oMyHandle = Bean.getHandle();
     ArrayList oData = new ArrayList();
     oData.add(new String("ciao"));
     Bean.putData(oData);
     oData=null;
     Bean.remove();
   catch (Exception ex) { ex.printStackTrace(); }
}On this line of code : Handle oMyHandle = Bean.getHandle()
is generated the following exception
java.rmi.UnmarshalException: Error deserializing return-value: java.io.InvalidClassException: com.evermind.server.ejb.StatefulSessionHandle; local class incompatible: stream classdesc serialVersionUID = -1212978352730626745, local class serialVersionUID = 631107630195966815
     at com.evermind._al.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(.:1497)
     at com.evermind._al.invokeMethod(.:1420)
     at com.evermind._fr.invoke(.:53)
     at com.evermind._fq.invoke(.:22)
     at com.evermind._jj.invoke(.:31)
     at __Proxy1.getHandle(Unknown Source)
     at test.ClientHandle.main(ClientHandle.java:23)What does it mean? How can i solve the problem?
thanx

That's not what the error message says. It is telling
you explicitely that the (serialized) version returned
from the stream (from the server) is different that
the local one (client). Check again.mhmm...i've checked again. All calsses files are identical. The deployed class files match with the client class files!!!
Edit your code and include the following field in the
offending class:
static final long serialVersionUID =
-1212978352730626745L; Recompile everything and try again...i've included that piece of code inside the definition of the Remote Interface and in the implementation of the EJB without solving the problem. How is it possbile that the bean works fine using his remote interface from the client while using handle the serialID is different?
I'm thinking that my client run using the JBuilder 8 IDE while the deployed version of the EJB is compiled using ANT !!!!
Could be a difference between the two compiled class ?

Similar Messages

  • EJB 3.0 - Stateful... getHandle()???

    Hello,
    I just start working with EJB 3.0 and it's much better if we compare with EJB 2.x... It's easier, cleaner, etc. However I'm about to throw all away and return the EJB 2.x
    I simply cannot efficiently call getHandle() on a stateful session bean. Well, actually withing the bean itself I can do cxt.getEJBObject().getHandle() but that's weird. I want a handle in the client side and I can't. Here's the situation
    I'm developing an app that will have a number of different clients. Web and desktop. In my project it's defined that the user session will be in the EJB tier and will be a Stateful Session Bean. So far so good.
    The thing is, for the web client, I want to store each user's session in the HttpSession. With EJB 2.x I would get the ejb handle and would serialize it in the httpsession, then when the user get's back in a few minutes we can restore the EJB from the handle. Another weird thing is the way we're forced to declare:
    public class ServletTest extends HttpServlet {
        @EJB
        private UserSessionRemote session;With the above declaration I understand that for every single time someone access ServletTest all web users will get the very same stateful. Well I made that test :-/
    We have no control of stateful session bean in EJB 3.
    How to control that from the web side? In a swing/swt client I can keep the reference...
    Thanks in advance
    Aurelio

    I have posted this one in the wrong place - it should go in EJB. I have posted in there, please disregard this one and go to http://forum.java.sun.com/thread.jspa?threadID=5175863

  • Problems clustering a Weblogic  Stateful EJB 3.0

    Hello!
    I'm developing a Stateful EJB 3.0 with clustering configuration for weblogic 11G. My client gets a reference to the RemoteInterface, invoke a method and it's working. Then I shutdown the server where the EJB was created and the client reinvoke (using the same reference) a method and get's this error:
    javax.ejb.EJBException: Exception waiting for response; nested exception is:
         java.io.EOFException: Connection closed by peer; nested exception is: java.io.EOFException: Connection closed by peer
    java.io.EOFException: Connection closed by peer
         at weblogic.iiop.EndPointImpl.handleCloseConnection(EndPointImpl.java:602)
         at weblogic.iiop.EndPointImpl.processMessage(EndPointImpl.java:545)
         at weblogic.iiop.EndPointImpl.handleMessage(EndPointImpl.java:500)
         at weblogic.iiop.EndPointImpl.dispatch(EndPointImpl.java:324)
         at weblogic.iiop.ConnectionManager.dispatch(ConnectionManager.java:126)
         at weblogic.iiop.MuxableSocketIIOP.dispatch(MuxableSocketIIOP.java:302)
         at weblogic.socket.BaseAbstractMuxableSocket.dispatch(BaseAbstractMuxableSocket.java:298)
         at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:915)
         at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:844)
         at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:335)
         at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
         at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
    javax.ejb.EJBException: Exception waiting for response; nested exception is:
         java.io.EOFException: Connection closed by peer; nested exception is: java.io.EOFException: Connection closed by peer
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:109)
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:91)
         at $Proxy0.getMas(Unknown Source)
         at com.ibermatica.pruebas.pruebaEJB30SF.getPrueba(pruebaEJB30SF.java:79)
         at com.ibermatica.pruebas.pruebaEJB30SF.main(pruebaEJB30SF.java:26)
    Caused by: java.io.EOFException: Connection closed by peer
         at weblogic.iiop.EndPointImpl.handleCloseConnection(EndPointImpl.java:602)
         at weblogic.iiop.EndPointImpl.processMessage(EndPointImpl.java:545)
         at weblogic.iiop.EndPointImpl.handleMessage(EndPointImpl.java:500)
         at weblogic.iiop.EndPointImpl.dispatch(EndPointImpl.java:324)
         at weblogic.iiop.ConnectionManager.dispatch(ConnectionManager.java:126)
         at weblogic.iiop.MuxableSocketIIOP.dispatch(MuxableSocketIIOP.java:302)
         at weblogic.socket.BaseAbstractMuxableSocket.dispatch(BaseAbstractMuxableSocket.java:298)
         at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:915)
         at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:844)
         at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:335)
         at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
         at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
    The description of my test is:
    +I have a Weblogic cluster (c1, c2)
    +I have developed an 3.0 Stateful EJB (configurated for replication)
    +My client  gets an EJB Instance from c1 and invoke one method (debugging)
    +I stops my client
    +I shutdown my server (c1)
    +My client invokes another EJB method end gets the error described before.
    It seems like the Server don't replicate the EJB.
    My replicatión ejb deployment descriptor is (weblogic.xml):
    <weblogic-enterprise-bean>
    <ejb-name>Session30EJBSFBean</ejb-name>
    <stateful-session-descriptor>
    <stateful-session-clustering>
    <!--<home-is-clusterable>true</home-is-clusterable>
    <home-load-algorithm>random</home-load-algorithm>
    <replication-type>InMemory</replication-type>-->
    <use-serverside-stubs>true</use-serverside-stubs>
    <replication-type>InMemory</replication-type>
    </stateful-session-clustering>
    </stateful-session-descriptor>
    </weblogic-enterprise-bean>
    My ejb bean class is:
    @Stateful(name = "Session30EJBSF", mappedName = "clustering30-cluster301-Session30EJBSF")
    @Remote
    public class Session30EJBSFBean implements Session30EJBSF {
    private SessionContext _context;
    private int contador= 0;
    private String user="";
    public Session30EJBSFBean() {
    public void inicio(String user){
    this.user= user;
    contador=0;
    public void mas(){
    contador++;
    public int getMas(){
    return contador;
    public String getUser(){
    return this.user;
    My Remote EJB:
    import javax.ejb.Remote;
    @Remote
    public interface Session30EJBSF {
    public void inicio(String user);
    public void mas();
    public int getMas();
    public String getUser();
    My client:
    public class pruebaEJB30SF {
    public pruebaEJB30SF() {
    super();
    public static void main(String[] args) {
    pruebaEJB30SF pruebaEJB30SF = new pruebaEJB30SF();
    try {
    pruebaEJB30SF.getPrueba();
    } catch (Exception e) {
    e.printStackTrace();
    public Context getInitialContext() throws NamingException {
    //String url="t3://c1:8001";
    String url="iiop://c1:8001";
    String user="any";
    String password="any";
    Properties p= new Properties();
    //p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.T3InitialContextFactory");
    p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL,url);
    p.put(Context.SECURITY_PRINCIPAL,user);
    p.put(Context.SECURITY_CREDENTIALS,password);
    return new InitialContext(p);
    public void getPrueba() throws NamingException, RemoteException,
    CreateException {
    // <PROFILING>
    Context ctx= getInitialContext();
    //2.0 Stateful
    Object ref= ctx.lookup("clustering30-cluster301-Session30EJBSF#.Session30EJBSF");
    Session30EJBSF home= (Session30EJBSF)PortableRemoteObject.narrow(ref, Session30EJBSF.class);
    Session30EJBSF ejb=home;
    ejb.inicio("User1");
    ejb.mas();
    System.out.println( ejb.getMas());// I put here a breakpoint and I shutdown the serer c1
    ejb.mas();
    System.out.println( ejb.getMas());
    ejb.mas();
    System.out.println( ejb.getMas());//Caida
    ejb.mas();
    System.out.println( ejb.getMas());
    I have developed a EJB 2.1 and a EJB 2.1 client and it's working. The most important change betwin ejb 3.0 client and my 2.1 client is that in 2.1 I use the getHandle method and a Home, not a Remote.
    Please, can anyone help me.
    Thanks.

    Hi,
    Please change your Client Code as below: URL must be pointing to the comma Separated address of your ManagedServers Address/Port which are part of Cluster like For Example Suppose you have 2 managedServers in ClusterA ..... t3://MS1Host:8003,MS2Host:8005
    public Context getInitialContext() throws NamingException {
    <strike><font color=red>String url="t3://c1:8001";</font></strike>
    <b>String url="t3://ManagedServer1HostName:port,ManagedServer2HostName:port";</b>
    String user="any";
    String password="any";
    Properties p= new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL,url);
    p.put(Context.SECURITY_PRINCIPAL,user);
    p.put(Context.SECURITY_CREDENTIALS,password);
    return new InitialContext(p);
    Thanks
    Jay SenSharma
    http://weblogic-wonders.com/weblogic (WebLogic Wonders Are here)

  • Weblogic Server 8.1 giving weird error while deploying EJB

    Hi All,
    I am using weblogic8.1 server with service pack 4.
    I am trying to deploy an entitybean (ejb2.0) specification. I am getting following error.
    ==========================================================
    [Deployer:149033]preparing application sum.LDN on MyServer
    [Deployer:149033]failed application sum.LDN on MyServer
    [Deployer:149034]An exception occurred for task [Deployer:149026]Deploy application sum.LDN on MyServer.:
    Exception:weblogic.management.ApplicationException: prepare failed for sumEJB.jar
    Module: sumEJB.jar Error: Exception preparing module: EJBModule(sumEJB.jar,status=NEW)
    Unable to deploy EJB: sumEJB.jar from sumEJB.jar:
    [EJB:011017]Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:
    In bean com.csfb.csar.sum.ods.TradeSetlmtMapping, the abstract method, getHandle(), does not correspond to any container-managed field and is not implemented in the bean class or any of its superclasses.
    In bean com.csfb.csar.sum.ods.TradeSetlmtMapping, the abstract method, getEJBHome(), does not correspond to any container-managed field and is not implemented in the bean class or any of its superclasses.
    In bean com.csfb.csar.sum.ods.TradeSetlmtMapping, the abstract method, isIdentical(javax.ejb.EJBObject), does not correspond to any container-managed field and is not implemented in the bean class or any of its superclasses.
    at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:255)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:407)
    at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:493)
    at weblogic.ejb20.deployer.EJBDeployer.compileJar(EJBDeployer.java:784)
    at weblogic.ejb20.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:700)
    at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1339)
    at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:498)
    at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:3142)
    at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1583)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1227)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1070)
    at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2513)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2463)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2379)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    ==========================================================
    This is very surprising error I am getting. Because getHandle(), getEJBHome(), isIdentical() are no where declared in business interface extending EJBObject.
    Descriptor File is perfectly fine.
    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    <weblogic-rdbms-bean>
    <ejb-name>com.csfb.csar.sum.ods.TradeSetlmtMapping</ejb-name>
    <data-source-name>com.csfb.csar.ODSDataSource</data-source-name>
    <table-map>
    <table-name>ODS_CNS_ELIGIBLE_TRADES</table-name>
    <field-map>
    <cmp-field>auditCreatedDate</cmp-field>
    <dbms-column>STAMP_ADD_DTIME</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>auditCreatedBy</cmp-field>
    <dbms-column>PROCESS_ADD_ID</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>transId</cmp-field>
    <dbms-column>TRANS_ID</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>transVersId</cmp-field>
    <dbms-column>TRANS_VERS_ID</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>transItemSequenceId</cmp-field>
    <dbms-column>TRANS_ITEM_SEQUENCE_ID</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>externalReference</cmp-field>
    <dbms-column>EXTERNAL_REFERENCE</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>setLmtStatus</cmp-field>
    <dbms-column>SETLMT_STATUS</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>setLmtDate</cmp-field>
    <dbms-column>SETLMT_DATE</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>stampUpdateDtime</cmp-field>
    <dbms-column>STAMP_UPDATE_DTIME</dbms-column>
    </field-map>
    </table-map>
    <weblogic-query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params/>
    </query-method>
    </weblogic-query>
    </weblogic-rdbms-bean>
    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    Please Help..

    <p>I could not find any documentation that suggested LIMIT or OFFSET where supported. Some of our developers needed to use limit, in the end all I could suggest was using a dynamic query and setting the maximum number of results see here
    .</p>
    <p>
    Hussein Badakhchani</br>
    </p>

  • No longer able to build ejb using appc (WLS 8.1)

    I'm in the process of re-writing some build files to make use of the new
    appc compiler, but I started to get a rather confusing error. Although
    the EJB builds (using ejbc) and deploys fine on WLS 7, when I try to
    build using appc I get a slew of messages such as "In EJB MyEJB, the
    bean class must implement directly or indirectly the
    javax.ejb.SessionBean interface" (which it does), or "In EJB MyEJB,
    method remove() defined in the local interface either does not exist in
    the bean class, or it is not a public method in the bean class". A
    portion of the error message is listed below. I'm sure it must be some
    kind of problem with my configuration...has anyone seen this before?
    Any suggestions?
    Thanks in advance,
    Tim
    weblogic.utils.compiler.ToolFailureException: [J2EE:160121]Errors
    encountered wh
    ile compiling module 'D:\workspace\TRIPS\deployment\build':
    In EJB VASKeyGeneratorEJB, the bean class must implement directly or
    indirectly
    the javax.ejb.SessionBean interface.
    In EJB VASKeyGeneratorEJB, method remove() defined in the local
    interface either
    does not exist in the bean class, or it is not a public method. Each
    method in
    the local interface must have a corresponding public method in the bean
    class.
    In EJB VASKeyGeneratorEJB, method getEJBHome() defined in the local
    interface ei
    ther does not exist in the bean class, or it is not a public method.
    Each method
    in the local interface must have a corresponding public method in the
    bean clas
    s.
    In EJB VASKeyGeneratorEJB, method getPrimaryKey() defined in the local
    interface
    either does not exist in the bean class, or it is not a public method.
    Each met
    hod in the local interface must have a corresponding public method in
    the bean c
    lass.
    In EJB VASKeyGeneratorEJB, method getHandle() defined in the local
    interface eit
    her does not exist in the bean class, or it is not a public method. Each
    method
    in the local interface must have a corresponding public method in the
    bean class
    In EJB VASKeyGeneratorEJB, method isIdentical(javax.ejb.EJBObject)
    defined in th
    e local interface either does not exist in the bean class, or it is not
    a public
    method. Each method in the local interface must have a corresponding
    public met
    hod in the bean class.
    In EJB VASKeyGeneratorEJB, method remove() defined in the local
    interface either
    does not exist in the bean class, or it is not a public method. Each
    method in
    the local interface must have a corresponding public method in the bean
    class.
    In EJB VASKeyGeneratorEJB, method getPrimaryKey() defined in the local
    interface
    either does not exist in the bean class, or it is not a public method.
    Each met
    hod in the local interface must have a corresponding public method in
    the bean c
    lass.
    In EJB VASKeyGeneratorEJB, method isIdentical(javax.ejb.EJBLocalObject)
    defined
    in the local interface either does not exist in the bean class, or it is
    not a p
    ublic method. Each method in the local interface must have a
    corresponding publi
    c method in the bean class.
    In EJB VASKeyGeneratorEJB, method getEJBLocalHome() defined in the local
    interfa
    ce either does not exist in the bean class, or it is not a public
    method. Each m
    ethod in the local interface must have a corresponding public method in
    the bean
    class.
    - with nested exception:
    In EJB VASKeyGeneratorEJB, the bean class must implement directly or
    indirectly
    the javax.ejb.SessionBean interface.
    In EJB VASKeyGeneratorEJB, method remove() defined in the local
    interface either
    does not exist in the bean class, or it is not a public method. Each
    method in
    the local interface must have a corresponding public method in the bean
    class.
    In EJB VASKeyGeneratorEJB, method getEJBHome() defined in the local
    interface ei
    ther does not exist in the bean class, or it is not a public method.
    Each method
    in the local interface must have a corresponding public method in the
    bean clas
    s.
    In EJB VASKeyGeneratorEJB, method getPrimaryKey() defined in the local
    interface
    either does not exist in the bean class, or it is not a public method.
    Each met
    hod in the local interface must have a corresponding public method in
    the bean c
    lass.
    In EJB VASKeyGeneratorEJB, method getHandle() defined in the local
    interface eit
    her does not exist in the bean class, or it is not a public method. Each
    method
    in the local interface must have a corresponding public method in the
    bean class
    In EJB VASKeyGeneratorEJB, method isIdentical(javax.ejb.EJBObject)
    defined in th
    e local interface either does not exist in the bean class, or it is not
    a public
    method. Each method in the local interface must have a corresponding
    public met
    hod in the bean class.
    In EJB VASKeyGeneratorEJB, method remove() defined in the local
    interface either
    does not exist in the bean class, or it is not a public method. Each
    method in
    the local interface must have a corresponding public method in the bean
    class.
    In EJB VASKeyGeneratorEJB, method getPrimaryKey() defined in the local
    interface
    either does not exist in the bean class, or it is not a public method.
    Each met
    hod in the local interface must have a corresponding public method in
    the bean c
    lass.
    In EJB VASKeyGeneratorEJB, method isIdentical(javax.ejb.EJBLocalObject)
    defined
    in the local interface either does not exist in the bean class, or it is
    not a p
    ublic method. Each method in the local interface must have a
    corresponding publi
    c method in the bean class.
    In EJB VASKeyGeneratorEJB, method getEJBLocalHome() defined in the local
    interfa
    ce either does not exist in the bean class, or it is not a public
    method. Each m
    ethod in the local interface must have a corresponding public method in
    the bean
    class.
    at weblogic.appc.compileEJB(appc.java:714)
    at weblogic.appc.compileInput(appc.java:446)
    at weblogic.appc.runBody(appc.java:167)
    at weblogic.utils.compiler.Tool.run(Tool.java:146)
    at weblogic.utils.compiler.Tool.run(Tool.java:103)
    at weblogic.appc.main(appc.java:961)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke
    (NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke
    (DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at weblogic.ant.taskdefs.j2ee.CompilerTask.invokeMain
    (CompilerTask.java:
    275)
    at weblogic.ant.taskdefs.j2ee.Appc.execute(Appc.java:179)
    at org.apache.tools.ant.Task.perform(Task.java:341)
    at org.apache.tools.ant.Target.execute(Target.java:309)
    at org.apache.tools.ant.Target.performTasks(Target.java:336)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
    at org.apache.tools.ant.taskdefs.CallTarget.execute
    (CallTarget.java:143)
    at org.apache.tools.ant.Task.perform(Task.java:341)
    at org.apache.tools.ant.Target.execute(Target.java:309)
    at org.apache.tools.ant.Target.performTasks(Target.java:336)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
    at org.apache.tools.ant.Task.perform(Task.java:341)
    at org.apache.tools.ant.Target.execute(Target.java:309)
    at org.apache.tools.ant.Target.performTasks(Target.java:336)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
    at org.apache.tools.ant.taskdefs.CallTarget.execute
    (CallTarget.java:143)
    at org.apache.tools.ant.Task.perform(Task.java:341)
    at org.apache.tools.ant.Target.execute(Target.java:309)
    at org.apache.tools.ant.Target.performTasks(Target.java:336)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
    at org.apache.tools.ant.taskdefs.CallTarget.execute
    (CallTarget.java:143)
    at org.apache.tools.ant.Task.perform(Task.java:341)
    at org.apache.tools.ant.Target.execute(Target.java:309)
    at org.apache.tools.ant.Target.performTasks(Target.java:336)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    at org.apache.tools.ant.Project.executeTargets
    (Project.java:1255)
    at org.apache.tools.ant.Main.runBuild(Main.java:609)
    at org.apache.tools.ant.Main.start(Main.java:196)
    at org.apache.tools.ant.Main.main(Main.java:235)
    Total time: 11 seconds

    Hello Tim,
    Which version of WLS 8.1 are you using (beta or GA) ?
    Also, make sure that you don't have any jar files from WLS 7 still on your classpath,
    so that appc doesn't get confused. Also, how are you invoking appc?
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    Tim Perrigo <[email protected]> wrote:
    I'm in the process of re-writing some build files to make use of the
    new
    appc compiler, but I started to get a rather confusing error. Although
    the EJB builds (using ejbc) and deploys fine on WLS 7, when I try to
    build using appc I get a slew of messages such as "In EJB MyEJB, the
    bean class must implement directly or indirectly the
    javax.ejb.SessionBean interface" (which it does), or "In EJB MyEJB,
    method remove() defined in the local interface either does not exist
    in
    the bean class, or it is not a public method in the bean class". A
    portion of the error message is listed below. I'm sure it must be some
    kind of problem with my configuration...has anyone seen this before?
    Any suggestions?
    Thanks in advance,
    Tim
    weblogic.utils.compiler.ToolFailureException: [J2EE:160121]Errors
    encountered wh
    ile compiling module 'D:\workspace\TRIPS\deployment\build':
    In EJB VASKeyGeneratorEJB, the bean class must implement directly or
    indirectly
    the javax.ejb.SessionBean interface.
    In EJB VASKeyGeneratorEJB, method remove() defined in the local
    interface either
    does not exist in the bean class, or it is not a public method. Each
    method in
    the local interface must have a corresponding public method in the bean
    class.
    In EJB VASKeyGeneratorEJB, method getEJBHome() defined in the local
    interface ei
    ther does not exist in the bean class, or it is not a public method.
    Each method
    in the local interface must have a corresponding public method in the
    bean clas
    s.
    In EJB VASKeyGeneratorEJB, method getPrimaryKey() defined in the local
    interface
    either does not exist in the bean class, or it is not a public method.
    Each met
    hod in the local interface must have a corresponding public method in
    the bean c
    lass.
    In EJB VASKeyGeneratorEJB, method getHandle() defined in the local
    interface eit
    her does not exist in the bean class, or it is not a public method. Each
    method
    in the local interface must have a corresponding public method in the
    bean class
    In EJB VASKeyGeneratorEJB, method isIdentical(javax.ejb.EJBObject)
    defined in th
    e local interface either does not exist in the bean class, or it is not
    a public
    method. Each method in the local interface must have a corresponding
    public met
    hod in the bean class.
    In EJB VASKeyGeneratorEJB, method remove() defined in the local
    interface either
    does not exist in the bean class, or it is not a public method. Each
    method in
    the local interface must have a corresponding public method in the bean
    class.
    In EJB VASKeyGeneratorEJB, method getPrimaryKey() defined in the local
    interface
    either does not exist in the bean class, or it is not a public method.
    Each met
    hod in the local interface must have a corresponding public method in
    the bean c
    lass.
    In EJB VASKeyGeneratorEJB, method isIdentical(javax.ejb.EJBLocalObject)
    defined
    in the local interface either does not exist in the bean class, or it
    is
    not a p
    ublic method. Each method in the local interface must have a
    corresponding publi
    c method in the bean class.
    In EJB VASKeyGeneratorEJB, method getEJBLocalHome() defined in the local
    interfa
    ce either does not exist in the bean class, or it is not a public
    method. Each m
    ethod in the local interface must have a corresponding public method
    in
    the bean
    class.
    - with nested exception:
    In EJB VASKeyGeneratorEJB, the bean class must implement directly or
    indirectly
    the javax.ejb.SessionBean interface.
    In EJB VASKeyGeneratorEJB, method remove() defined in the local
    interface either
    does not exist in the bean class, or it is not a public method. Each
    method in
    the local interface must have a corresponding public method in the bean
    class.
    In EJB VASKeyGeneratorEJB, method getEJBHome() defined in the local
    interface ei
    ther does not exist in the bean class, or it is not a public method.
    Each method
    in the local interface must have a corresponding public method in the
    bean clas
    s.
    In EJB VASKeyGeneratorEJB, method getPrimaryKey() defined in the local
    interface
    either does not exist in the bean class, or it is not a public method.
    Each met
    hod in the local interface must have a corresponding public method in
    the bean c
    lass.
    In EJB VASKeyGeneratorEJB, method getHandle() defined in the local
    interface eit
    her does not exist in the bean class, or it is not a public method. Each
    method
    in the local interface must have a corresponding public method in the
    bean class
    In EJB VASKeyGeneratorEJB, method isIdentical(javax.ejb.EJBObject)
    defined in th
    e local interface either does not exist in the bean class, or it is not
    a public
    method. Each method in the local interface must have a corresponding
    public met
    hod in the bean class.
    In EJB VASKeyGeneratorEJB, method remove() defined in the local
    interface either
    does not exist in the bean class, or it is not a public method. Each
    method in
    the local interface must have a corresponding public method in the bean
    class.
    In EJB VASKeyGeneratorEJB, method getPrimaryKey() defined in the local
    interface
    either does not exist in the bean class, or it is not a public method.
    Each met
    hod in the local interface must have a corresponding public method in
    the bean c
    lass.
    In EJB VASKeyGeneratorEJB, method isIdentical(javax.ejb.EJBLocalObject)
    defined
    in the local interface either does not exist in the bean class, or it
    is
    not a p
    ublic method. Each method in the local interface must have a
    corresponding publi
    c method in the bean class.
    In EJB VASKeyGeneratorEJB, method getEJBLocalHome() defined in the local
    interfa
    ce either does not exist in the bean class, or it is not a public
    method. Each m
    ethod in the local interface must have a corresponding public method
    in
    the bean
    class.
    at weblogic.appc.compileEJB(appc.java:714)
    at weblogic.appc.compileInput(appc.java:446)
    at weblogic.appc.runBody(appc.java:167)
    at weblogic.utils.compiler.Tool.run(Tool.java:146)
    at weblogic.utils.compiler.Tool.run(Tool.java:103)
    at weblogic.appc.main(appc.java:961)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke
    (NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke
    (DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at weblogic.ant.taskdefs.j2ee.CompilerTask.invokeMain
    (CompilerTask.java:
    275)
    at weblogic.ant.taskdefs.j2ee.Appc.execute(Appc.java:179)
    at org.apache.tools.ant.Task.perform(Task.java:341)
    at org.apache.tools.ant.Target.execute(Target.java:309)
    at org.apache.tools.ant.Target.performTasks(Target.java:336)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
    at org.apache.tools.ant.taskdefs.CallTarget.execute
    (CallTarget.java:143)
    at org.apache.tools.ant.Task.perform(Task.java:341)
    at org.apache.tools.ant.Target.execute(Target.java:309)
    at org.apache.tools.ant.Target.performTasks(Target.java:336)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
    at org.apache.tools.ant.Task.perform(Task.java:341)
    at org.apache.tools.ant.Target.execute(Target.java:309)
    at org.apache.tools.ant.Target.performTasks(Target.java:336)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
    at org.apache.tools.ant.taskdefs.CallTarget.execute
    (CallTarget.java:143)
    at org.apache.tools.ant.Task.perform(Task.java:341)
    at org.apache.tools.ant.Target.execute(Target.java:309)
    at org.apache.tools.ant.Target.performTasks(Target.java:336)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
    at org.apache.tools.ant.taskdefs.CallTarget.execute
    (CallTarget.java:143)
    at org.apache.tools.ant.Task.perform(Task.java:341)
    at org.apache.tools.ant.Target.execute(Target.java:309)
    at org.apache.tools.ant.Target.performTasks(Target.java:336)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    at org.apache.tools.ant.Project.executeTargets
    (Project.java:1255)
    at org.apache.tools.ant.Main.runBuild(Main.java:609)
    at org.apache.tools.ant.Main.start(Main.java:196)
    at org.apache.tools.ant.Main.main(Main.java:235)
    Total time: 11 seconds

  • EJB Handle return remote ref fails??

    Having a problem getting a remote reference on an EJB using a handle. Create a remote ref to an EJB and store three items and display said items - okay
    Get a handle to the remote ref and serialize and store - okay
    Deserialize - okay
    Cast to remote ref - NOT okay wants a home ref?
    This example is, by and large, similar to the example in section 6.8 of the EJB 2.0 Spec.
    Need to know why I cannot get the remote ref returned? Is there an OC4J issue? Please let me know when you can as would like to use this in a class.
    THANKS - Ken Cooper
    public class CartClient {
    public static void main(String[] args) {
    CartClient cartClient = new CartClient();
    try {
    Context context = getInitialContext();
    CartHome cartHome = (CartHome) PortableRemoteObject.narrow(context.lookup(
    "Cart"), CartHome.class);
    Cart cart;
    // Use one of the create() methods below to create a new instance
    cart = cartHome.create();
    // Call any of the Remote methods below to access the EJB
    // cart.getItems( );
    // cart.addItems( java.lang.String p );
    cart.addItems("Truck");
    cart.addItems("Car");
    cart.addItems("Boat");
    System.out.println(cart.getItems());
    // Serialize and store in C:\cartHandle
    Handle cartHandle = cart.getHandle();
    FileOutputStream out = new FileOutputStream("C:/cartHandle");
    ObjectOutputStream so = new ObjectOutputStream(out);
    so.writeObject(cartHandle);
    so.flush();
    System.out.println("Serialized");
    // Deserialize from C:\cartHandle
    FileInputStream in = new FileInputStream("C:/cartHandle");
    ObjectInputStream si = new ObjectInputStream(in);
    cartHandle = (Handle) si.readObject();
    System.out.println("DeSerialized");
    Cart cart2 = (Cart) PortableRemoteObject.narrow(cartHandle.getEJBObject(),
    Cart.class);
    System.out.println("Second: " + cart2.getItems());
    } catch (Throwable ex) {
    ex.printStackTrace();
    private static Context getInitialContext() throws NamingException {
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "admin");
    env.put(Context.SECURITY_CREDENTIALS, "welcome");
    env.put(Context.PROVIDER_URL,
    "ormi://localhost:23891/current-workspace-app");
    return new InitialContext(env);
    OUTPUT AND ERROR FROM EXECUTION
    C:\JDev9031\jdk\bin\javaw.exe -ojvm -classpath C:\JDev9031\jdev\mywork\del15aug\Project4\classes;......
    Start: TruckCarBoat
    Serialized
    DeSerialized
    com.evermind.server.rmi.OrionRemoteException: Error looking up EJBHome at location 'Cart'
    javax.ejb.EJBObject com.evermind.server.ejb.StatefulSessionHandle.getEJBObject()
    StatefulSessionHandle.java:56
    void mypackage4.CartClient.main(java.lang.String[])
    CartClient.java:53 (NOTE: The highlighted line above is line 53)

    Thank you all guys for your suggests, and sorry for my (long) silence: i was at home with hard cough. I think that unfortunally the problem is more in deep. This because:
    1) at the beginnnig, in my (many) attempts I've tried to give the server url in a lot of ways:
    a) only the IP;
    b) http://<IP>;
    c) http://<IP>: <port>;
    d) http://<server-name>;
    e) http://<server-name>:<server-port>;
    b) iiop://<IP>;
    c) iiop://<IP>: <port>;
    d) iiop://<server-name>;
    e) iiop://<server-name>:<server-port>;
    In this cases, using init.put(org.omg.CORBA.ORBInitialHost,<param-value>) (init is Java Properties object), I didn't get what I would: always AppServer running on Win2000 responded me, instead of the one running on Linux.
    Using instead using init.put(Context.PROVIDER_URL,<param-value>) , in case a) I got the error message Root exception is java.net.MalformedURLException: no protocol:<IP-number>. In case b), c), d) and e) I got invalid url - connection refused error message (Invalid URL: http://gandalf.engiweb.com. Root exception is java.net.ConnectException: Connection refused: connect).
    A collegue of mine is using WebSphere and everything seems to work correctly. I'm afraid that there is a problem (of misconfiguration?) in the Borland Application Server. This is a problem, because, if I have (suppose) server gandalf running, with the correct EJB, and the server Saruman running too, but with the scorrect EJB, or the ejb container down, always respond me Saruman, not Gandalf: my tests gave me this result.
    At the moment I don't know what to do, except migrate to WebSphere, or another Application Server.
    Thank you a lot for your interest. Bye!

  • Error trying to deserialize EJB HomeHandle and EJB Handle classes

    I get the following exception when I try to deserialize both a javax.ejb.HomeHandle and a javax.ejb.Handle.  I serialize and immediately deserialize within the same application using the same classloader so there are not alot of external variables that may cause the problem.  Any ideas on why I can't deserialize an ejb handle?
    The reason I am doing this is to try and get around the need to reference another application just to call a remote method in that application.  I want to serialize the remote home interface handle or the remote component interface handle and deserialize it using my local application classloader.  Does anybody know if this would work?
    #1#java.lang.ClassNotFoundException: Loader /L_service:ejb could not load class turtle.registry.SBRegistryRemoteHome
         at com.sap.vmc.core.impl.sapjvm.sharing.NativeSharedClassLoaderImpl.loadClass(NativeSharedClassLoaderImpl.java:609)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:265)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:333)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at java.io.ObjectInputStream.resolveProxyClass(ObjectInputStream.java:656)
         at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1499)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1462)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1698)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
         at com.sap.engine.services.ejb3.runtime.impl.LocalHandleDelegate.readStub(LocalHandleDelegate.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.ServerHandleDelegate.readStub(ServerHandleDelegate.java:64)
         at com.sap.engine.services.ejb3.runtime.impl.LocalHandleDelegate.readEJBHome(LocalHandleDelegate.java:101)
         at com.sap.engine.services.ejb3.runtime.impl.StatelessHomeHandleImpl.readObject(StatelessHomeHandleImpl.java:73)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1818)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1718)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
         at turtle.common.util.SerializationHelper.convertObject(SerializationHelper.java:43)
         at turtle.common.server.connect.RemoteFactory.getRemoteSAPWAS(RemoteFactory.java:206)
         at turtle.common.server.connect.RemoteFactory.getRemote(RemoteFactory.java:46)
         at turtle.common.server.connect.RemoteProxyFactory.getRemote(RemoteProxyFactory.java:99)
         at turtle.common.server.connect.RemoteProxyFactory.create(RemoteProxyFactory.java:91)
         at turtle.common.server.connect.RemoteProxyFactory.createProxy(RemoteProxyFactory.java:52)
         at turtle.server.runtime.registry.RegistryFacade.connectToRegistry(RegistryFacade.java:932)
         at turtle.server.runtime.registry.RegistryFacade.getGenericRegistryBI(RegistryFacade.java:987)
         at turtle.server.runtime.registry.RegistryFacade.unbindObjectsInProject(RegistryFacade.java:857)
         at turtle.registry.ProjectRegistrar$1$1.run(ProjectRegistrar.java:130)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAs(Subject.java:337)
         at turtle.common.security.auth.AuthenticatorBase.doAs(AuthenticatorBase.java:387)
         at turtle.registry.ProjectRegistrar$1.run(ProjectRegistrar.java:172)
         at java.util.TimerThread.mainLoop(Timer.java:512)
         at java.util.TimerThread.run(Timer.java:462)

    Has anyone been able to get this to work?  Or can anyone confirm that this is a bug?
    As a simpler test, I modified the UserManagementBean of the Car Rental example application.  I added some code in the register method that serializes and deserializes the Handle object obtained from the SessionContext.getEJBObject().getHandle() method.  The serialization completes without issue.  However, I get the same error when trying to deserialize the Handle object:
    java.lang.ClassNotFoundException: Loader /L_service:ejb could not load class com.sap.engine.examples.epf.ejb.controller.customer.UserManagementHome
         at com.sap.vmc.core.impl.sapjvm.sharing.NativeSharedClassLoaderImpl.loadClass(NativeSharedClassLoaderImpl.java:609)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:265)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:333)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at java.io.ObjectInputStream.resolveProxyClass(ObjectInputStream.java:656)
         at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1499)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1462)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1698)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
         at com.sap.engine.services.ejb3.runtime.impl.LocalHandleDelegate.readStub(LocalHandleDelegate.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.ServerHandleDelegate.readStub(ServerHandleDelegate.java:64)
         at com.sap.engine.services.ejb3.runtime.impl.LocalHandleDelegate.readEJBHome(LocalHandleDelegate.java:101)
         at com.sap.engine.services.ejb3.runtime.impl.StatelessHomeHandleImpl.readObject(StatelessHomeHandleImpl.java:73)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1818)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1718)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1917)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1841)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1718)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
         at com.sap.engine.examples.epf.ejb.controller.customer.SerializationUtils.deSerialize(SerializationUtils.java:33)
         at com.sap.engine.examples.epf.ejb.controller.customer.SerializationUtils.deepClone(SerializationUtils.java:59)
         at com.sap.engine.examples.epf.ejb.controller.customer.UserManagementBean.register(UserManagementBean.java:75)

  • Jdev3.1;EJB deploy;ORA-29535: source requires recompilationjava.lang.NullPointer

    Hi,
    I got problem with deploying an EJB session component (error log below).
    My working environnement:
    Oracle8.1.6 release2, Jdev31, WindowsNT server4.0.
    Also, I' m not able to download any soft from oratechnet; when I click on the zip file to download I get the " Page cannot be displayed".
    Compilation errors in oracle/aurora/ejb/gen/_test_JYM_ejb_test2Pkg/Test2PkgModule/EjbObject_RemoteTest2PkgModule:ORA-29535: source requires recompilationjava.lang.NullPointerException at sun.tools.java.Environment.error(Environment.java) at sun.tools.java.Environment.error(Environment.java) at sun.tools.java.Environment.error(Environment.java) at sun.tools.java.OracleClassLocator.getHandle(OracleClassLocator.java) at sun.tools.java.OracleClassLocator.getLocationEntry(OracleClassLocator.java) at sun.tools.java.OracleClassLocator.getClassLocation(OracleClassLocator.java) at sun.tools.java.OracleClassLocator.getClassLocation(OracleClassLocator.java) at sun.tools.java.OracleClassLocator.getBinaryClassLocation(OracleClassLocator.java) at sun.tools.java.OracleClassLocator.getBinaryClassLocation(OracleClassLocator.java) at sun.tools.java.LocatorFinder.find(LocatorFinderFactory.java) at oracle.aurora.compiler.SqljInterface$MyFinder.find(SqljInterface.java) at oracle.aurora.compiler.MemoizedFinder.find(Mem
    izedFinder.java) at oracle.aurora.compiler.CacheUsingFinders$Key.<init>(CacheUsingFinders.java) at oracle.aurora.compiler.CacheUsingFinders.get(CacheUsingFinders.java) at oracle.aurora.compiler.CacheUsingFinders.get(CacheUsingFinders.java) at sun.tools.javac.AuroraEnvironment.classExists(AuroraEnvironment.java) at sun.tools.java.Environment.classExists(Environment.java) at sun.tools.java.Environment.classExists(Environment.java) at sun.tools.java.Environment.classExists(Environment.java) at sun.tools.java.Environment.resolvePackageQualifiedName(Environment.java) at sun.tools.java.ClassDefinition.resolveName(ClassDefinition.java) at sun.tools.java.Environment.resolveNames(Environment.java) at sun.tools.java.Environment.resolveNames(Environment.java) at sun.tools.javac.SourceMember.resolveTypeStructure(SourceMember.java) at sun.tools.javac.SourceClass.resolveTypeStructure(SourceClass.java) at sun.tools.javac.SourceClass.basicCheck(SourceClass.java) at sun.tools.java.ClassDeclaration.getClassDefin
    tion(ClassDeclaration.java) at oracle.aurora.jdkcompiler.JdkDriver.compile(JdkDriver.java) at oracle.aurora.rdbms.Compiler.doCompile(Compiler.java) at oracle.aurora.rdbms.Compiler.compile(Compiler.java)<no file>: An exception has occurred in the compiler; This is a compiler bug not an error in source. Info: 1 errors
    thanks in advance for any advice and help

    Hi,
    I got problem with deploying an EJB session component (error log below).
    My working environnement:
    Oracle8.1.6 release2, Jdev31, WindowsNT server4.0.
    Also, I' m not able to download any soft from oratechnet; when I click on the zip file to download I get the " Page cannot be displayed".
    Compilation errors in oracle/aurora/ejb/gen/_test_JYM_ejb_test2Pkg/Test2PkgModule/EjbObject_RemoteTest2PkgModule:ORA-29535: source requires recompilationjava.lang.NullPointerException at sun.tools.java.Environment.error(Environment.java) at sun.tools.java.Environment.error(Environment.java) at sun.tools.java.Environment.error(Environment.java) at sun.tools.java.OracleClassLocator.getHandle(OracleClassLocator.java) at sun.tools.java.OracleClassLocator.getLocationEntry(OracleClassLocator.java) at sun.tools.java.OracleClassLocator.getClassLocation(OracleClassLocator.java) at sun.tools.java.OracleClassLocator.getClassLocation(OracleClassLocator.java) at sun.tools.java.OracleClassLocator.getBinaryClassLocation(OracleClassLocator.java) at sun.tools.java.OracleClassLocator.getBinaryClassLocation(OracleClassLocator.java) at sun.tools.java.LocatorFinder.find(LocatorFinderFactory.java) at oracle.aurora.compiler.SqljInterface$MyFinder.find(SqljInterface.java) at oracle.aurora.compiler.MemoizedFinder.find(Mem
    izedFinder.java) at oracle.aurora.compiler.CacheUsingFinders$Key.<init>(CacheUsingFinders.java) at oracle.aurora.compiler.CacheUsingFinders.get(CacheUsingFinders.java) at oracle.aurora.compiler.CacheUsingFinders.get(CacheUsingFinders.java) at sun.tools.javac.AuroraEnvironment.classExists(AuroraEnvironment.java) at sun.tools.java.Environment.classExists(Environment.java) at sun.tools.java.Environment.classExists(Environment.java) at sun.tools.java.Environment.classExists(Environment.java) at sun.tools.java.Environment.resolvePackageQualifiedName(Environment.java) at sun.tools.java.ClassDefinition.resolveName(ClassDefinition.java) at sun.tools.java.Environment.resolveNames(Environment.java) at sun.tools.java.Environment.resolveNames(Environment.java) at sun.tools.javac.SourceMember.resolveTypeStructure(SourceMember.java) at sun.tools.javac.SourceClass.resolveTypeStructure(SourceClass.java) at sun.tools.javac.SourceClass.basicCheck(SourceClass.java) at sun.tools.java.ClassDeclaration.getClassDefin
    tion(ClassDeclaration.java) at oracle.aurora.jdkcompiler.JdkDriver.compile(JdkDriver.java) at oracle.aurora.rdbms.Compiler.doCompile(Compiler.java) at oracle.aurora.rdbms.Compiler.compile(Compiler.java)<no file>: An exception has occurred in the compiler; This is a compiler bug not an error in source. Info: 1 errors
    thanks in advance for any advice and help

  • Problem in getting handle to EJB Object

    Hi All,
    I am getting following exception when i try to get handle on my ejb object.
    My Client Program:
    import synch.*;
    import javax.naming.*;
    import java.rmi.*;
    import javax.rmi.*;
    import javax.ejb.*;
    import java.io.*;
    public class SearlizeClient
         public static void main(String[] args) throws Exception
              Context ic = new InitialContext();
                   Object o = ic.lookup("NameBean"); // replace with YOUR JNDI name for the bean
                   NameHome nameHome = (NameHome) PortableRemoteObject.narrow(o, NameHome.class);
                   synch.Name obj1 = nameHome.create();
                   obj1.setName("Balaji");
                   Handle myHandle= obj1.getHandle();// Getting exception at this place
                   FileOutputStream out = new FileOutputStream("MyHandle.txt");
                   ObjectOutputStream s = new ObjectOutputStream(out);
                   s.writeObject(obj1);
                   s.flush();
                   out.close();
    I got following excetion when i try to get handle on EJBObject
    Dec 6, 2005 11:20:19 AM com.sun.corba.se.impl.encoding.CDRInputStream_1_0 read_value
    WARNING: "IOP00810257: (MARSHAL) Could not find class"
    org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemExcep
    tion.java:7756)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1013
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
    1_0.java:873)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
    1_0.java:863)
    at com.sun.corba.se.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java
    :269)
    at synch._Name_Stub.getHandle(Unknown Source)
    at SearlizeClient.main(SearlizeClient.java:20)
    Caused by: java.lang.ClassNotFoundException
    ... 7 more
    Exception in thread "main" java.rmi.MarshalException: CORBA MARSHAL 1398079745 Maybe; nested excepti
    on is:
    org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
    at com.sun.corba.se.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:197)
    at javax.rmi.CORBA.Util.mapSystemException(Util.java:67)
    at synch._Name_Stub.getHandle(Unknown Source)
    at SearlizeClient.main(SearlizeClient.java:20)
    Caused by: org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemExcep
    tion.java:7756)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1013
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
    1_0.java:873)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
    1_0.java:863)
    at com.sun.corba.se.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java
    :269)
    at synch._Name_Stub.getHandle(Unknown Source)
    ... 1 more
    Caused by: java.lang.ClassNotFoundException
    ... 7 more
    Enviroment: This bean is hosted on Sun J2ee Appserver 8.0 and normal client prg is working fine .. But it is failing in getting handle
    Please suggest,
    Thanks in advance

    The only way is to create your own equivalent of HttpSessionContext.
    Its simple enough, just create a class that implements HttpSessionListener (responds to session creation, and destruction)
    You can get the sessions as they are created, and keep a global reference to them, and manipulate it as much as you like. In your case you would probably want to index the sessions by userId rather than sessionId for easy access.
    Good luck,
    evnafets

  • Error retriving session EJB with getEJBObject() from handle

    the Code i use is
    CREATE:
    Handle handle = user.getHandle();
    session.setAttribute("user",handle);
    GET:
    Handle handle = (Handle)session.getAttribute("user");
    UserEJB user = (UserEJB)handle.getEJBObject();
    // the abowe row gets the error.
    Error:
    java.lang.ClassCastException: org.omg.stub.javax.ejb._EJBObject_Stub
    ive read several topics that say that this should work but it doesnt??
    The bean is a Stateful Session EJB.
    Ive tried to recompile both client and server serveral times, to prevent te stubs from beeing different. But no result.
    Help please !!!!!!

    try like this..
    Create--
    session.setAttribute("searchremote",tsremote.getHandle());
    and get it like this....
    Handle handle = (Handle)session.getAttribute("searchremote");
    tsremote = (TradesSearchRemote)handle.getEJBObject();
                   if (tsremote == null)
                        tsremote = getBeanReference();
                        session.setAttribute("searchremote",tsremote.getHandle());
    I am doing like this and it is working fine....

  • Unable to handle  Handle(In EJB)!!!!

    hi,
    i have a problem in EJBObject interface getHandle method.
    i have two clients.
    client one is doing
    Properties p = new Properties();
                   p.put(Context.INITIAL_CONTEXT_FACTORY,
                             "org.jnp.interfaces.NamingContextFactory");
                   p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
                   p.put(Context.PROVIDER_URL, "localhost:11099");
                   c = new InitialContext(p);
                   HelloHomeInterface hhi = (HelloHomeInterface) PortableRemoteObject
                             .narrow(c.lookup("Raghu"), HelloHomeInterface.class);
                   //HelloHomeInterface hhi = //(HelloHomeInterface)c.lookup("Raghu");
                   HelloComponentInterface hci = hhi.create();
                   Handle h = hci.getHandle();
                   FileOutputStream out = new FileOutputStream("Handlefile");
                   ObjectOutputStream s = new ObjectOutputStream(out);
                   s.writeObject(h);while the client2 is reading that handle and try to get back the EJBObject out of it
    ie
    FileInputStream in = new FileInputStream("Handlefile");
                   ObjectInputStream s = new ObjectInputStream(in);
                   Handle h = (Handle) s.readObject();
                   Object o = h.getEJBObject();//error here
                   HelloComponentInterface hci = (HelloComponentInterface) PortableRemoteObject
                             .narrow(o, HelloComponentInterface.class);but I am getting the exception
    java.rmi.ServerException: Could not get EJBObject; nested exception is:
         javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
         at org.jboss.proxy.ejb.handle.StatelessHandleImpl.getEJBObject(StatelessHandleImpl.java:83)
         at client.TestClint2.main(TestClint2.java:50)
    Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at org.jboss.proxy.ejb.handle.StatelessHandleImpl.getEJBObject(StatelessHandleImpl.java:76)
         ... 1 more
    why so??
    how to give the initial Context to the handle???

    no one knows the answer??????????????????????

  • Communication between EJB's in 8i EE

    How can I communicate 2 different EJB's deployed in the same
    machine?
    We want to use the 'lookup()' method provided, not as the EJB
    implementation class is accesible from the other bean then
    instantiate it using this class.
    We've implemented the logical way, this is, using the same code
    (of course adapted) that in a client that wants to access to an
    EJB (instancing a Hashtable object, a Context object, etc) into
    the bean implementation and the result was a message (sorry but
    I can't include it) that tells as it couldn3t reach the server
    but it's impossible because the server is just the same and we
    can trace the TCP frame if we change to a different IP.
    Many thanks
    null

    I am able to lookup the object from a client. But i am passing the reference to
    ejb2 to ejb1 and trying to call gethandle on ejb2 remote interface in ejb1. here
    i am getting an error
    rohini
    "Ade Barkah" <[email protected]> wrote:
    Can you give more details on how its failing? Are you able to get an
    JNDI context to the
    2nd server? Are you able too lookup the ejb2's home interface? If there's
    a stack trace
    maybe you can post it?
    -Ade
    "rohini" <[email protected]> wrote in message news:3d604ba9$[email protected]..
    Hello,
    I have deployed two different ejb's in two different weblogic serverson seperate
    machines. EJB 1 deployed in server 1 in trying to access ejb 2 in server2. However
    this is not working. Can anyone tell me what all i need to check tomake this
    work. I have put all the interfaces and help classes of ejb 1 in server1 clientclasses
    and serverclasses directory. The same for ejb 2.
    Rohini

  • JCA 1.0 inbound communication with javax.ejb.Handle...?

    Hello,
    I made a study regarding inbound communication in JCA. The assumption is about that resource adapter is effectively the client of the EJB container; so I implemented the JCA 1.0 resource adapter as it was a client.
    In detail: when I got a connection from resource container I pass the session bean's Handle (it is reachable through javax.ejb.EJBObject::getHandle). When resource adapter wants to deliver something asynchronously it retrieves the session bean by its Handle and calls one of its method (e.g. receive). This works.
    I ported this simple app to weblogic, websphere and Sun ref 1.4 without problems. Do anyone knows about standard or specs which prevents performing inbound communication this way ?
    Thanks in advance, best regards.

    This is a interesting solution. Did you get any answer?
    regards,
    Kristoffer

  • Cant deploy ejb to jserver from jdeveloper

    hello all
    just migrated to jdeveloper 3.1 and 8i 8.1.6. while deploying an ejb to 8i
    (which faced no problems previously in jdeveloper 3.0 and 8i 8.1.5),
    following were encountered :
    Generating EJBHome and EJBObject on the server...
    Compilation errors in
    oracle/aurora/ejb/gen/test_PolicyFactory/EjbObject_PolicyFactory:ORA-29535:
    source requires recompilationjava.lang.NullPointerException
    at sun.tools.java.Environment.error(Environment.java)
    at sun.tools.java.Environment.error(Environment.java)
    at sun.tools.java.Environment.error(Environment.java)
    at sun.tools.java.OracleClassLocator.getHandle(OracleClassLocator.java)
    at
    sun.tools.java.OracleClassLocator.getLocationEntry(OracleClassLocator.java)
    at
    sun.tools.java.OracleClassLocator.getClassLocation(OracleClassLocator.java)
    at
    sun.tools.java.OracleClassLocator.getClassLocation(OracleClassLocator.java)
    at
    sun.tools.java.OracleClassLocator.getBinaryClassLocation(OracleClassLocator.
    java)
    at
    sun.tools.java.OracleClassLocator.getBinaryClassLocation(OracleClassLocator.
    java)
    at sun.tools.java.LocatorFinder.find(LocatorFinderFactory.java)
    at oracle.aurora.compiler.SqljInterface$MyFinder.find(SqljInterface.java)
    at oracle.aurora.compiler.MemoizedFinder.find(MemoizedFinder.java)
    at
    orace.aurora.compiler.CacheUsingFinders$Key.<init>(CacheUsingFinders.java)
    at oracle.aurora.compiler.CacheUsingFinders.get(CacheUsingFinders.java)
    at oracle.aurora.compiler.CacheUsingFinders.get(CacheUsingFinders.java)
    at sun.tools.javac.AuroraEnvironment.classExists(AuroraEnvironment.java)
    at sun.tools.java.Environment.classExists(Environment.java)
    at sun.tools.java.Environment.classExists(Environment.java)
    at sun.tools.java.Environment.classExists(Environment.java)
    at sun.tools.java.Environment.resolvePackageQualifiedName(Environment.java)
    at sun.tools.java.ClassDefinition.resolveName(ClassDefinition.java)
    at sun.tools.java.Environment.resolveNames(Environment.java)
    at sun.tools.java.Environment.resolveNames(Environment.java)
    at sun.tools.javac.SourceMember.resolveTypeStructure(SourceMember.java)
    at sun.tools.javac.SourceClass.resolveTypeStructure(SourceClass.java)
    at sun.tools.javac.SourceClass.basicCheck(SourceClass.java)
    at sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.jav)
    at oracle.aurora.jdkcompiler.JdkDriver.compile(JdkDriver.java)
    at oracle.aurora.rdbms.Compiler.doCompile(Compiler.java)
    at oracle.aurora.rdbms.Compiler.compile(Compiler.java)<no file>:
    An exception has occurred in the compiler; This is a compiler bug not
    an error in source. Info: 1 errors
    *** Errors occurred while deploying the EJB to JServer ***
    *** Deployment completed ***
    any resolutions? thanks!
    null

    For CMP beans to JBoss, they'll have to be managed by JBoss (not OC4J). We don't have any jdev specific documentation for that. The jboss docs and forums on jboss.org have alot of info about how to configure jaws, etc.
    Hope this helps,
    Rob

  • Re: User Session using ServletSession and Stateful EJB in Cluster

              Sorry , I didn't use WLS 6.0, we use wls 5.1 in production.
              But in Wls 6.0, in some situations , the state of the stateful session bean can be lost. So it's not so reliable. You have to deal with it in the client code. Instead, servlet is a reliable solution.
              In order to test under wls6.0, you can store the handle of the EJBObject in the HttpSession, not in jndi, cos if the instance fails, all its objects will be removed by remaining instances from jndi. In another instance, you get the handle, and try to get the EJBObject.
              In wls5.1, some information like the server url must be embeded inside the handle. But in wls6.0, I don't know how they deal with it.
              I am looking forward to your results
              "Anuj Soni" <[email protected]> wrote:
              >
              >What kind of clustering problems you had with WL6.0 for Stateful session beans ? It will be helpful for me to know before hand.
              >
              >BTW, how were you able to test stateful session beans in a cluster under WL6.0 i.e. were you storing the Handle or EJBObject in HttpSession or did you store it in JNDI ?
              >
              >Thanks,
              >
              >Anuj
              >"Tao Zhang" <[email protected]> wrote:
              >>Although it's very advanced to take advantage of both http session and
              >>stateful session bean replication, but if you rely on the stateful session
              >>bean's state, you will be in trouble. Because the support of stateful
              >>session bean's replication is not perfect in wls6.0. We already chaned
              >>almost all stateful session beans into servlets or entity beans.
              >>
              >>I am not sure about the handle of the EJBObject. I think it should be able
              >>to reconstruct for us otherwise we can't use the handle any more.
              >>
              >>You can do a test. BTW, could you tell me the result?
              >>
              >>Thanks.
              >>
              >>Anuj Soni <[email protected]> wrote in message
              >>news:[email protected]...
              >>>
              >>> Hi,
              >>>
              >>> I am designing the workflow for my web application using a Stateful
              >>session bean. As Weblogic 6.0 supports clustering of stateful session bean
              >>and HttpSession(in-memory replication), I want to use the combination of
              >>both techniques to provide load-balancing and fail-over safety for user
              >>sessions and their corresponding workflows.
              >>>
              >>> The question I have is that, Is Handle obtained using
              >>EJBObject.getHandle(), fail-over safe (for a clusterable stateful bean), so
              >>that I can reconstruct the reference to EJBObject on the secondary server
              >>incase of primary server crash.
              >>>
              >>> My understanding is that I should store Handle in the HttpSession as it is
              >>Serializable not the EJBObject. The weblogic 6.0 document only talks about
              >>the replica-awareness of EJBObject.
              >>>
              >>> If my above assumption is incorrect, Can you tell me how else I can
              >>achieve my goal ?
              >>>
              >>> Thanks in advance.
              >>>
              >>> Anuj Soni
              >>
              >>
              >
              

    Any one tested this scenario yet? i.e: storing the handle to an EJB object and then trying to re-use after the HttpSession is restored?
              Thanks.
              

Maybe you are looking for