Corba Client to a Session Bean deployed in OC4J

Hello!
I'm looking for an example showing how to make a call to some EJBs deployed in OC4J (Orion) through a plain CORBA call in java?... Is this possible? I know that regular EJB uses RMI over IIOP based on CORBA... is it possible to use only the CORBA/iiop layer to communicate with an EJB deployed in OC4J?
If you have any corba client code as an example, it would be very appreciated,
Thanks!
null

<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Pierre ([email protected]):
Hello!
I'm looking for an example showing how to make a call to some EJBs deployed in OC4J (Orion) through a plain CORBA call in java?... Is this possible? I know that regular EJB uses RMI over IIOP based on CORBA... is it possible to use only the CORBA/iiop layer to communicate with an EJB deployed in OC4J?
If you have any corba client code as an example, it would be very appreciated,
Thanks!
<HR></BLOCKQUOTE>
I am reasonably certain that OCJ4 doesn't support RMI over IIOP, only ORMI, which is the native wire protocol from Orion, and won't support this until they release the final version of EJB 2.0 support in OCJ4.
Translating the CORBA/RMI calls to EJB/ORMI calls would be a tad bit on the tricky side. I believe you can do what you want with something like Borland's App server...
null

Similar Messages

  • Adding Set of Session Beans generates client with wrong session bean names

    Hi,
    I am trying to import a set of session beans deployed on Sun Java Sever 8.2 using Netbeans 6.0. on windows XP.
    The problem is that the imported set generated by the IDE has wrong session bean names and out of 8 session beans in the client jar only 6 are shown (and different 6 every time). Also the remote methods of one bean are associated with another bean and every time its a different set of bean clients generated.
    I am really perplexed with this behavior. Any help on this issue will be highly appreciated.

    An RMI/IIOP parameter type must meet one of thefollowing criteria:
    It must be a primitive type, or it must implementeither java.rmi.Remote or java.io.Serializable,
    or it must be an interface for which the runtime typesatisfies the previous criteria,
    or it must be an array containing elements thatsatisfy the previous criteria.This tells you exactly what you need to do.

  • How to run a client program in Session bean using weblogic 8.1

    Hi
    I am new to weblogic server 8.1. I sucessfully deployed session ejb Session Bean. I created sessionbean jar file and put it it classpath also.
    and also i created sessiobeanclient jar file, it included in class path.
    While running client program it throws exception like noclass def found exception
    plz tell me the right way to run the session ejb program.
    bye

    Hi,
    You have to follow the given steps before you are going to run the client program that invokes the session bean .
    1)set the Weblogic Environment using the tool setWLSEnv
    2)place the Session bean jar file in classpath
    3)run the client program
    Note:If the client has to execute on remote machine we need to copy client class,remote interface, home interface and other classes which are used as
    parameters and return types.
    Regards
    Anilkumar kari

  • JDev 10.1.3: Problem deploying a session bean to embedded OC4J

    JDeveloper 10.1.3, TopLink, OC4J, WinXP, java 1.4.2_05.
    I used TopLink to create a set of Java objects from a DB Schema, then created a simple Session Bean to read some of the objects. Everything compiles fine.
    JAVA_HOME points to the JDK (not JRE) and CLASSPATH is empty (undefined).
    When I try to Run my session bean in the jdeveloper embedded oc4j, I get this message. Thanks in advance for your help.
    Milind
    ===============
    [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    C:\Tools\jdev_10_1_3\jdev\system\oracle.j2ee.10.1.3.3.51\oc4j-config>
    C:\Tools\jdev_10_1_3\jdk\bin\javaw.exe -ojvm -classpath C:\Tools\jdev_10_1_3\j2ee\home\oc4j.jar;C:\Tools\jdev_10_1_3\jdev\lib\jdev-oc4j-embedded.jar -Xverify:none -DcheckForUpdates=adminClientOnly -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doracle.dms.sensors=NONE -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config C:\Tools\jdev_10_1_3\jdev\system\oracle.j2ee.10.1.3.3.51\oc4j-config\server.xml
    [waiting for the server to complete its initialization...]
    05/03/22 14:43:50 Node started with id=127765687050882
    05/03/22 14:43:52 Auto-deploying - applications/admin_ejb.jar (orion-ejb-jar.xml had been updated since the previous deployment)...
    05/03/22 14:43:52 Error initializing server: Error initializing ejb-module; Exception null
    05/03/22 14:43:53 Fatal error: server exiting
    Process exited with exit code 1.

    Error initializing ejb-module;
    Is the EJB Jar structured as
    META-INF/
    ejb-jar.xml
    Bean Class
    Home interface Class
    Remote interface Class
    Does the EJBdeploy in some other server?

  • Security problem when trying to connect a CMP Session Bean deployed on J2EE

    I am working through Wrox�s book Professional java Mobile Programming and trying to set up the Mobile Positioning project. The book has instructions for Ericson MPS-SDK 3.0 but the only version available now is the 5.0 and these instructions are no longer valid. I have built the application with the Studio 4 IDE and deployed it on an instance of the J2EE reference Implementation and this seems to work fine. However I have built a CMP session bean which should connect to the Ericsson Emulator running on their supplied Eserver and this connection is failing with a security problem. Following is a snippet of the code I have used to instantiate the connection.
    ConnectionFactory con = null;
    con = new ConnectionFactory(true);
    The code compiles with out errors but when I try to test it I get the following error
    java.security.AccessControlException: access denied (java.util.PropertyPermission sun.net.inetaddr.ttl write)
    Any Hints or suggestions would be appreciated.
    Thanks

    Oops!! I meant Session Bean NOT CMP Session Bean

  • Session bean deployment problem - Fatal Error

    Hi,
    I am using OC4J and could not deploy simple session bean. I created correct ear ( Team and TeamHome classes are included).
    This error message is meaningless.
    Please help !
    Auto-deploying tpcontest (Assembly had been updated)...
    Fatal Error: Syntax error in source
    Team_StatelessSessionBeanWrapper2.java:11: Interface Team of class Team_StatelessSessionBeanWrapper2 not found.
    public class Team_StatelessSessionBeanWrapper2 extends com.evermind.server.ejb.StatelessSessionEJBObject implements Team
    ^
    TeamHome_StatelessSessionHomeWrapper3.java:9: Interface TeamHome of class TeamHome_StatelessSessionHomeWrapper3 not found.
    public class TeamHome_StatelessSessionHomeWrapper3 extends com.evermind.server.ejb.StatelessSessionEJBHome implements TeamHome
    ^
    2 errors
    com.evermind.compiler.CompilationException: Syntax error in source
    at com.evermind.compiler.FileLinkedCompilation.run(FileLinkedCompilation.java:90)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.evermind.compiler.FileLinkedCompiler.compile(FileLinkedCompiler.java:19)
    at com.evermind.compiler.Javac.compile(Javac.java:37)
    at com.evermind.server.ejb.compilation.Compilation.compileClasses(Compilation.java:335)
    at com.evermind.server.ejb.compilation.Compilation.compile(Compilation.java:256)
    at com.evermind.server.administration.ServerApplicationInstallation.finish(ServerApplicationInstallation.java:439)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:80)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    ejb-jar.xml
    <session>
    <ejb-name>TeamBean</ejb-name>
    <home>TeamHome</home>
    <remote>Team</remote>
    <ejb-class>TeamBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    orion-ejb-jar.xml
    <session-deployment name="TeamBean" location="TeamBean" persistence-filename="TeamBean" />

    Piotr -- I think that it is saying that it can't compile the stub source it generated since it can't find your home and remote
    interfaces. Are your interface classes in a package? You show then not in a package in your descriptor. Can you
    double check to make sure your EAR file is correctly constructed. That could be a problem as well.
    Thanks -- Jeff

  • Stateful session bean deploying

    Hello,
              I try to deploy stateful SessionBean with WL 6.0.
              Content of my 'weblogic-ejb-jar.xml' file is:
              <?xml version="1.0"?>
              <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 6.0.0
              EJB//EN' 'http://www.bea.com/servers/wls60/ejb20/dtd/weblogic-ejb-jar.dtd'>
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
              <ejb-name>HashtableSessionBean</ejb-name>
              <stateful-session-descriptor>
              <stateful-session-clustering>
              <home-is-clusterable>true</home-is-clusterable>
              <replication-type>InMemory</replication-type>
              </stateful-session-clustering>
              </stateful-session-descriptor>
              <jndi-name>HashtableSessionBean</jndi-name>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              But I still recive error like bellow:
              ####<2001-03-28 18:15:15 GMT+02:00> <Error> <J2EE> <clikra003> <myserver>
              <Application Manager Thread> <> <> <160002> <Error deploying EJB Component :
              HashtableSessionBean>
              weblogic.ejb20.EJBDeploymentException: Exception in EJB Deployment; nested
              exception is:
              javax.naming.NamingException [Root exception is java.rmi.MarshalException:
              failed to marshal public abstract void
              weblogic.jndi.internal.NamingNode.rebind(java.lang.String,java.lang.Object,j
              ava.util.Hashtable) throws
              javax.naming.NamingException,java.rmi.RemoteException; nested exception is:
               java.rmi.server.ExportException: Failed to invoke contructor for
              RuntimeDescriptor: class weblogic.rmi.internal.BasicRuntimeDescriptor;
              nested exception is:
               java.lang.reflect.InvocationTargetException]
              javax.naming.NamingException. Root exception is java.rmi.MarshalException:
              failed to marshal public abstract void
              weblogic.jndi.internal.NamingNode.rebind(java.lang.String,java.lang.Object,j
              ava.util.Hashtable) throws
              javax.naming.NamingException,java.rmi.RemoteException; nested exception is:
              java.rmi.server.ExportException: Failed to invoke contructor for
              RuntimeDescriptor: class weblogic.rmi.internal.BasicRuntimeDescriptor;
              nested exception is:
              java.lang.reflect.InvocationTargetException
              java.rmi.server.ExportException: Failed to invoke contructor for
              RuntimeDescriptor: class weblogic.rmi.internal.BasicRuntimeDescriptor;
              nested exception is:
              java.lang.reflect.InvocationTargetException
              java.lang.reflect.InvocationTargetException: java.lang.NoClassDefFoundError:
              weblogic/common/managedobject/JavaRemoteManageable
              at java.lang.ClassLoader.defineClass0(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
              at
              weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLo
              ader.java:304)
              at
              weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.
              java:155)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
              at weblogic.rmi.utils.Utilities.classForName(Utilities.java:209)
              at weblogic.rmi.internal.BasicDescriptor.<init>(BasicDescriptor.java:88)
              at weblogic.rmi.internal.BasicDescriptor.<init>(BasicDescriptor.java:141)
              at
              weblogic.rmi.internal.BasicRuntimeDescriptor.<init>(BasicRuntimeDescriptor.j
              ava:59)
              at java.lang.reflect.Constructor.newInstance(Native Method)
              at
              weblogic.rmi.internal.DescriptorManager.resolveClass(DescriptorManager.java:
              81)
              at
              weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java
              :39)
              at
              weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java
              :30)
              at
              weblogic.rmi.internal.OIDManager.getRequestDispatcher(OIDManager.java:279)
              at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:268)
              at weblogic.rmi.internal.OIDManager.replaceObject(OIDManager.java:96)
              at
              weblogic.common.internal.WLObjectOutputStreamBase2.replaceObject(WLObjectOut
              putStreamBase2.java:47)
              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:323)
              at
              weblogic.rmi.internal.CBVOutputStream.writeObjectInternal(CBVOutputStream.ja
              va:220)
              at
              weblogic.rmi.internal.CBVOutputStream.writeObject(CBVOutputStream.java:213)
              at
              weblogic.rmi.internal.CBVOutputStream.writeObject(CBVOutputStream.java:190)
              at weblogic.rmi.internal.ObjectIO.writeObject(ObjectIO.java:19)
              at
              weblogic.rmi.internal.BasicRemoteRef.marshalArgs(BasicRemoteRef.java:121)
              at
              weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
              :246)
              at
              weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
              :225)
              at
              weblogic.jndi.internal.ServerNamingNode_WLStub.rebind(ServerNamingNode_WLStu
              b.java:502)
              at weblogic.jndi.internal.WLContextImpl.rebind(WLContextImpl.java:123)
              at weblogic.jndi.internal.WLContextImpl.rebind(WLContextImpl.java:117)
              at
              weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.deploy(ClientDrivenBeanInfo
              Impl.java:483)
              at weblogic.ejb20.deployer.Deployer.deployDescriptor(Deployer.java:1105)
              at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:908)
              at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:31)
              at weblogic.j2ee.Application.addComponent(Application.java:126)
              at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:115)
              at
              weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
              arget.java:283)
              at
              weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
              arget.java:109)
              at java.lang.reflect.Method.invoke(Native Method)
              at
              weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
              .java:562)
              at
              weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:5
              48)
              at
              weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
              nImpl.java:285)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at
              weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(Confi
              gurationMBeanImpl.java:409)
              at
              weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
              nImpl.java:287)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at
              weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl
              .java:866)
              at
              weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl
              .java:853)
              at
              weblogic.management.internal.DynamicMBeanImpl.add(DynamicMBeanImpl.java:838)
              at
              weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
              .java:566)
              at
              weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:5
              48)
              at
              weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
              nImpl.java:285)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
              at $Proxy8.addTarget(Unknown Source)
              at
              weblogic.management.mbeans.custom.ApplicationManager.autoDeploy(ApplicationM
              anager.java:486)
              at
              weblogic.management.mbeans.custom.ApplicationManager.addApplication(Applicat
              ionManager.java:557)
              at
              weblogic.management.mbeans.custom.ApplicationManager.addApplication(Applicat
              ionManager.java:504)
              at
              weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationManager
              .java:428)
              at
              weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationManager
              .java:380)
              at
              weblogic.management.mbeans.custom.ApplicationManager.update(ApplicationManag
              er.java:152)
              at
              weblogic.management.mbeans.custom.ApplicationManager$ApplicationPoller.run(A
              pplicationManager.java:643)
              ####<2001-03-28 18:15:15 GMT+02:00> <Error> <J2EE> <clikra003> <myserver>
              <Application Manager Thread> <> <> <160001> <Error deploying application
              HashtableSessionBean: Could not deploy: 'HashtableSessionBean.jar'
              Possible reasons include:
              1. The bean or an interface class has been modified but
              the deployment descriptor has not been updated
              2. The database mappings in the deployment descriptor do not
              match the database definition
              3. The jar file is not a valid jar file
              4. The jar file does not contain a valid bean>
              Robert
              

    Hello,
              <stateful-session-clustering>
              <replication-type>InMemory</replication-type>
              </stateful-session-clustering>
              Statement above belongs to 'weblogic-ejb-jar.xml' and it is right in my
              opinion.
              I have another one statement describing SessionBean which deploy it as
              stateful bean (it is 'ejb-jar.xml' file):
              <?xml version="1.0"?>
              <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
              JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
              <ejb-jar>
              <enterprise-beans>
              <session>
              <ejb-name>HashtableSessionBean</ejb-name>
              <home>com.usermgmt.sessionbeans.hashtable.HashtableSessionHome</home>
              <remote>com.usermgmt.sessionbeans.hashtable.HashtableSession</remote>
              <ejb-class>com.usermgmt.sessionbeans.hashtable.HashtableSessionBean</ejb-cla
              ss>
              <session-type>Stateful</session-type>
              <transaction-type>Container</transaction-type>
              </session>
              </enterprise-beans>
              <assembly-descriptor></assembly-descriptor>
              </ejb-jar>
              I think that everything should go right, but SessionBean is not replicated.
              Where is the problem?
              Robert
              Uzytkownik "Prasad Peddada" <[email protected]> napisal w wiadomosci
              news:[email protected]...
              > Its not stateful session descriptor from your xml file instead it is
              > stateful-session-clustering according to the docs.
              >
              > -- Prasad
              >
              > ps: For ejb questions you will get better answers if you post to ejb
              newsgroup.
              >
              >
              > <stateful-session-clustering>
              >
              >
              > ...
              >
              >
              > <replication-type>InMemory</replication-type>
              >
              >
              > </stateful-session-clustering>
              >
              >
              > Robert Zaczynski wrote:
              >
              > > Thanks for help. I resolved this problem but my Stateful SessionBean
              doesn't
              > > replicate.
              > > Have I to use any special statement or settings???
              > >
              > > Robert
              > >
              > > Uzytkownik "Prasad Peddada" <[email protected]> napisal w
              wiadomosci
              > > news:[email protected]...
              > > > Did you modify the weblogic specific deployment descriptor xml file
              after
              > > > running ejbc. If so, you should run ejbc again and then jar it up
              again
              > > and
              > > > trying deploying and your problem should go away.
              > > >
              > > >
              > > > Cheers
              > > >
              > > > -- Prasad
              > > >
              > > > "Robert Zaczyñski" wrote:
              > > >
              > > > > Hello,
              > > > >
              > > > > I try to deploy stateful SessionBean with WL 6.0.
              > > > >
              > > > > Content of my 'weblogic-ejb-jar.xml' file is:
              > > > >
              > > > > <?xml version="1.0"?>
              > > > >
              > > > > <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD
              WebLogic
              > > 6.0.0
              > > > > EJB//EN'
              > > 'http://www.bea.com/servers/wls60/ejb20/dtd/weblogic-ejb-jar.dtd'>
              > > > > <weblogic-ejb-jar>
              > > > > <weblogic-enterprise-bean>
              > > > > <ejb-name>HashtableSessionBean</ejb-name>
              > > > >
              > > > > <stateful-session-descriptor>
              > > > > <stateful-session-clustering>
              > > > > <home-is-clusterable>true</home-is-clusterable>
              > > > > <replication-type>InMemory</replication-type>
              > > > > </stateful-session-clustering>
              > > > > </stateful-session-descriptor>
              > > > >
              > > > > <jndi-name>HashtableSessionBean</jndi-name>
              > > > >
              > > > > </weblogic-enterprise-bean>
              > > > > </weblogic-ejb-jar>
              > > > >
              > > > > But I still recive error like bellow:
              > > > >
              > > > > ####<2001-03-28 18:15:15 GMT+02:00> <Error> <J2EE> <clikra003>
              > > <myserver>
              > > > > <Application Manager Thread> <> <> <160002> <Error deploying EJB
              > > Component :
              > > > > HashtableSessionBean>
              > > > > weblogic.ejb20.EJBDeploymentException: Exception in EJB Deployment;
              > > nested
              > > > > exception is:
              > > > > javax.naming.NamingException [Root exception is
              > > java.rmi.MarshalException:
              > > > > failed to marshal public abstract void
              > > > >
              > >
              weblogic.jndi.internal.NamingNode.rebind(java.lang.String,java.lang.Object,j
              > > > > ava.util.Hashtable) throws
              > > > > javax.naming.NamingException,java.rmi.RemoteException; nested
              exception
              > > is:
              > > > >  java.rmi.server.ExportException: Failed to invoke contructor for
              > > > > RuntimeDescriptor: class
              weblogic.rmi.internal.BasicRuntimeDescriptor;
              > > > > nested exception is:
              > > > >  java.lang.reflect.InvocationTargetException]
              > > > > javax.naming.NamingException. Root exception is
              > > java.rmi.MarshalException:
              > > > > failed to marshal public abstract void
              > > > >
              > >
              weblogic.jndi.internal.NamingNode.rebind(java.lang.String,java.lang.Object,j
              > > > > ava.util.Hashtable) throws
              > > > > javax.naming.NamingException,java.rmi.RemoteException; nested
              exception
              > > is:
              > > > > java.rmi.server.ExportException: Failed to invoke contructor for
              > > > > RuntimeDescriptor: class
              weblogic.rmi.internal.BasicRuntimeDescriptor;
              > > > > nested exception is:
              > > > > java.lang.reflect.InvocationTargetException
              > > > > java.rmi.server.ExportException: Failed to invoke contructor for
              > > > > RuntimeDescriptor: class
              weblogic.rmi.internal.BasicRuntimeDescriptor;
              > > > > nested exception is:
              > > > > java.lang.reflect.InvocationTargetException
              > > > > java.lang.reflect.InvocationTargetException:
              > > java.lang.NoClassDefFoundError:
              > > > > weblogic/common/managedobject/JavaRemoteManageable
              > > > > at java.lang.ClassLoader.defineClass0(Native Method)
              > > > > at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
              > > > > at
              > > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
              > > > > at
              > > > >
              > >
              weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLo
              > > > > ader.java:304)
              > > > > at
              > > > >
              > >
              weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.
              > > > > java:155)
              > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
              > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
              > > > > at weblogic.rmi.utils.Utilities.classForName(Utilities.java:209)
              > > > > at
              > > weblogic.rmi.internal.BasicDescriptor.<init>(BasicDescriptor.java:88)
              > > > > at
              > > weblogic.rmi.internal.BasicDescriptor.<init>(BasicDescriptor.java:141)
              > > > > at
              > > > >
              > >
              weblogic.rmi.internal.BasicRuntimeDescriptor.<init>(BasicRuntimeDescriptor.j
              > > > > ava:59)
              > > > > at java.lang.reflect.Constructor.newInstance(Native Method)
              > > > > at
              > > > >
              > >
              weblogic.rmi.internal.DescriptorManager.resolveClass(DescriptorManager.java:
              > > > > 81)
              > > > > at
              > > > >
              > >
              weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java
              > > > > :39)
              > > > > at
              > > > >
              > >
              weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java
              > > > > :30)
              > > > > at
              > > > >
              > >
              weblogic.rmi.internal.OIDManager.getRequestDispatcher(OIDManager.java:279)
              > > > > at
              weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:268)
              > > > > at
              weblogic.rmi.internal.OIDManager.replaceObject(OIDManager.java:96)
              > > > > at
              > > > >
              > >
              weblogic.common.internal.WLObjectOutputStreamBase2.replaceObject(WLObjectOut
              > > > > putStreamBase2.java:47)
              > > > > at
              java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:323)
              > > > > at
              > > > >
              > >
              weblogic.rmi.internal.CBVOutputStream.writeObjectInternal(CBVOutputStream.ja
              > > > > va:220)
              > > > > at
              > > > >
              > >
              weblogic.rmi.internal.CBVOutputStream.writeObject(CBVOutputStream.java:213)
              > > > > at
              > > > >
              > >
              weblogic.rmi.internal.CBVOutputStream.writeObject(CBVOutputStream.java:190)
              > > > > at weblogic.rmi.internal.ObjectIO.writeObject(ObjectIO.java:19)
              > > > > at
              > > > >
              > >
              weblogic.rmi.internal.BasicRemoteRef.marshalArgs(BasicRemoteRef.java:121)
              > > > > at
              > > > >
              > >
              weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
              > > > > :246)
              > > > > at
              > > > >
              > >
              weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
              > > > > :225)
              > > > > at
              > > > >
              > >
              weblogic.jndi.internal.ServerNamingNode_WLStub.rebind(ServerNamingNode_WLStu
              > > > > b.java:502)
              > > > > at
              weblogic.jndi.internal.WLContextImpl.rebind(WLContextImpl.java:123)
              > > > > at
              weblogic.jndi.internal.WLContextImpl.rebind(WLContextImpl.java:117)
              > > > > at
              > > > >
              > >
              weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.deploy(ClientDrivenBeanInfo
              > > > > Impl.java:483)
              > > > > at
              > > weblogic.ejb20.deployer.Deployer.deployDescriptor(Deployer.java:1105)
              > > > > at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:908)
              > > > > at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:31)
              > > > > at weblogic.j2ee.Application.addComponent(Application.java:126)
              > > > > at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:115)
              > > > > at
              > > > >
              > >
              weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
              > > > > arget.java:283)
              > > > > at
              > > > >
              > >
              weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
              > > > > arget.java:109)
              > > > > at java.lang.reflect.Method.invoke(Native Method)
              > > > > at
              > > > >
              > >
              weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
              > > > > .java:562)
              > > > > at
              > > > >
              > >
              weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:5
              > > > > 48)
              > > > > at
              > > > >
              > >
              weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
              > > > > nImpl.java:285)
              > > > > at
              > > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              > > > > at
              > > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              > > > > at
              > > > >
              > >
              weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(Confi
              > > > > gurationMBeanImpl.java:409)
              > > > > at
              > > > >
              > >
              weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
              > > > > nImpl.java:287)
              > > > > at
              > > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              > > > > at
              > > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              > > > > at
              > > > >
              > >
              weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl
              > > > > .java:866)
              > > > > at
              > > > >
              > >
              weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl
              > > > > .java:853)
              > > > > at
              > > > >
              > >
              weblogic.management.internal.DynamicMBeanImpl.add(DynamicMBeanImpl.java:838)
              > > > > at
              > > > >
              > >
              weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
              > > > > .java:566)
              > > > > at
              > > > >
              > >
              weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:5
              > > > > 48)
              > > > > at
              > > > >
              > >
              weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
              > > > > nImpl.java:285)
              > > > > at
              > > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              > > > > at
              com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1
              > > 523)
              > > > > at
              weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
              > > > > at
              weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
              > > > > at $Proxy8.addTarget(Unknown Source)
              > > > > at
              > > > >
              > >
              weblogic.management.mbeans.custom.ApplicationManager.autoDeploy(ApplicationM
              > > > > anager.java:486)
              > > > > at
              > > > >
              > >
              weblogic.management.mbeans.custom.ApplicationManager.addApplication(Applicat
              > > > > ionManager.java:557)
              > > > > at
              > > > >
              > >
              weblogic.management.mbeans.custom.ApplicationManager.addApplication(Applicat
              > > > > ionManager.java:504)
              > > > > at
              > > > >
              > >
              weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationManager
              > > > > .java:428)
              > > > > at
              > > > >
              > >
              weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationManager
              > > > > .java:380)
              > > > > at
              > > > >
              > >
              weblogic.management.mbeans.custom.ApplicationManager.update(ApplicationManag
              > > > > er.java:152)
              > > > > at
              > > > >
              > >
              weblogic.management.mbeans.custom.ApplicationManager$ApplicationPoller.run(A
              > > > > pplicationManager.java:643)
              > > > > ####<2001-03-28 18:15:15 GMT+02:00> <Error> <J2EE> <clikra003>
              > > <myserver>
              > > > > <Application Manager Thread> <> <> <160001> <Error deploying
              application
              > > > > HashtableSessionBean: Could not deploy: 'HashtableSessionBean.jar'
              > > > > Possible reasons include:
              > > > > 1. The bean or an interface class has been modified but
              > > > > the deployment descriptor has not been updated
              > > > > 2. The database mappings in the deployment descriptor do not
              > > > > match the database definition
              > > > > 3. The jar file is not a valid jar file
              > > > > 4. The jar file does not contain a valid bean>
              > > > >
              > > > > Robert
              > > >
              > > > --
              > > > Cheers
              > > >
              > > > - Prasad
              > > >
              > > >
              >
              > --
              > Cheers
              >
              > - Prasad
              >
              >
              

  • CORBA problem calling stateless session bean

    We are running a bunch of ssbs under 8.1. When I make a call to the first bean, I get the following mysterious stack trace. We have put %BEA_HOME%\weblogic81\server\lib\wlclient.jar on our classpath. Is this not correct? Running on windows2000.
    jdk 1.4.2_04
    Regards
    org.omg.CORBA.UNKNOWN: vmcid: 0x0 minor code: 0 completed: Maybe
         at com.sun.corba.se.internal.core.UEInfoServiceContext.<init>(UEInfoServiceContext.java:33)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at com.sun.corba.se.internal.core.ServiceContextData.makeServiceContext(ServiceContextData.java:112)
         at com.sun.corba.se.internal.core.ServiceContexts.unmarshal(ServiceContexts.java:179)
         at com.sun.corba.se.internal.core.ServiceContexts.get(ServiceContexts.java:367)
         at com.sun.corba.se.internal.core.ServiceContexts.get(ServiceContexts.java:353)
         at com.sun.corba.se.internal.corba.ClientDelegate.invoke(ClientDelegate.java:372)
         at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
         at com.armanta.ejb.user._UserMaster_Stub.login(Unknown Source)
         at com.armanta.security.DefaultLoginModule.validate(DefaultLoginModule.java:364)
         at com.armanta.security.DefaultLoginModule.login(DefaultLoginModule.java:177)
         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:324)
         at javax.security.auth.login.LoginContext.invoke(LoginContext.java:675)
         at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129)
         at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607)
         at javax.security.auth.login.LoginContext.login(LoginContext.java:534)
         at com.armanta.rptgen.DataServer.login(DataServer.java:1608)
         at com.armanta.app.portviewer.PortGui.main(PortGui.java:1307)

    Eric Kaplan <[email protected]> writes:
    You get this for undeclared throwables. You should check the server
    log so see the real exception. You may need to add
    InstrumentStackTraceEnabled to you server config to see it.
    andy
    We are running a bunch of ssbs under 8.1. When I make a call to the first bean, I get the following mysterious stack trace. We have put %BEA_HOME%\weblogic81\server\lib\wlclient.jar on our classpath. Is this not correct? Running on windows2000.
    jdk 1.4.2_04
    Regards
    org.omg.CORBA.UNKNOWN: vmcid: 0x0 minor code: 0 completed: Maybe
         at com.sun.corba.se.internal.core.UEInfoServiceContext.<init>(UEInfoServiceContext.java:33)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at com.sun.corba.se.internal.core.ServiceContextData.makeServiceContext(ServiceContextData.java:112)
         at com.sun.corba.se.internal.core.ServiceContexts.unmarshal(ServiceContexts.java:179)
         at com.sun.corba.se.internal.core.ServiceContexts.get(ServiceContexts.java:367)
         at com.sun.corba.se.internal.core.ServiceContexts.get(ServiceContexts.java:353)
         at com.sun.corba.se.internal.corba.ClientDelegate.invoke(ClientDelegate.java:372)
         at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
         at com.armanta.ejb.user._UserMaster_Stub.login(Unknown Source)
         at com.armanta.security.DefaultLoginModule.validate(DefaultLoginModule.java:364)
         at com.armanta.security.DefaultLoginModule.login(DefaultLoginModule.java:177)
         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:324)
         at javax.security.auth.login.LoginContext.invoke(LoginContext.java:675)
         at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129)
         at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607)
         at javax.security.auth.login.LoginContext.login(LoginContext.java:534)
         at com.armanta.rptgen.DataServer.login(DataServer.java:1608)
         at com.armanta.app.portviewer.PortGui.main(PortGui.java:1307)

  • Stateful session bean hot deployment error?

    Hi,
    i'm getting an exception ...
    1. Deploy a stateful session bean.
    2. Hit the server and create an instance, then remove it.
    3. Change Stateful session bean source compile and hot deploy it.
    4. Hit the server and try creating an instance...exception !!!!
    "IllegalArgumentException: Object is not an instance of declaring class"
    Please help!!!
    Naveen

    Hi Navin,
    Firstly could you let me know , what option did you set in Jdeveloper to perform hot deploy ??
    I would like to hot deploy Stateless Session beans on Embedded OC4J using JDeveloper.
    Bhavesh

  • Execute client for Session Bean without appClient

    Hi,
    I want to execute a standalone client for a Session Bean in a Application Server 8 platform but I don�t want to use the "appClient" script that is used in the J2EE 1.4 Tutorial.
    For example, for the Converter example I want to execute ConverterClient directly.
    For this I suppose that I have to include the following lines of code:
    java.util.Hashtable env = new java.util.Hashtable();
              env.put( Context.INITIAL_CONTEXT_FACTORY, "XXXX" );
              env.put(Context.PROVIDER_URL, "YYYY");
    Context initial = new InitialContext(env);
    Context myEnv = (Context) initial.lookup("java:comp/env");
    BUT WHAT XXXX AND YYYY SHOULD BE IN SUN APPLICATION SERVER 8?
    Thanks

    When you are inside a container these are setup as properties automaticly. When you are outside the container you can setup these properties just the container does, but it is not done for you. When you use that HashTable you are giving it the properties instead of it getting them from system properties. Also, it looks like you need to change the lookup. Once you get the InitailContext you will see that you can't lookup java:comp from outside. You will have to use the fully qualified name. Something like "nodes/node1/servers/server1/ejb/myEjb". Just keep that in mind.

  • To Create a EJB Client program to access the Bean deployed in the Sun app

    Hi
    I am new to the EJB.I need to write a Client ,to access the bean deployed in the Sun application Server 9.0. The Client Program will be running in a Different machine on the Network.
    1)What all things i need to consider along with writing the client program?
    2)Is there any link which provides the Sample client programs/Documents for the Sun Application Server.
    Please help me
    Regards
    Raju

    Probably the simplest way is to replace the MessageServerThread with a synchronized method. The method should be in the MessageServer class.

  • Using local interfaces for EJB (session bean)

    Hi,
    I�ve a question regarding when to use the Local interfaces(EJBLocal and EJBLocalHome) of a enterprise bean. I understand that calls to enterprise bean can be made locally if the client which is invoking is in the same JVM as that of EJB. I�ve written a web client (servlet) which is packaged in a EAR and this servlet is trying to invoke a session bean which is in a �different� EAR using local interfaces. Both the EARs have been deployed in a single server (websphere 6.0 server). It didn�t work for me this way�..If I package the servlet in the same EAR of session bean then it works fine.
    So is this to say that both EARs are not running on the same JVM? Or should it work even if the client and the session bean are in different EARs but in same server?
    Can anyone explain me the fundamentals behind this.
    Thanks in advance

    Local access is only portable within the same .ear. For example, the Java EE SDK and SUN's
    application servers have never supported local EJB access from a web/EJB component in a different
    .ear. One issue is that local access requires that both the caller and target EJB have the same
    classloader. By definition, different Java EE applications have distinct classloaders. In addition,
    in Java EE 5 persistence context propagation does not span applications, so it wouldn't work in the
    local case.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • StreamCorruptedException from Stateless Session bean to java class

    Hi all,
    We have 2 servers, a ColdFusion App server which contains suns jdk 1.4.2 and websphere appserver using Ibm jdk, 1.4.2. On Server 1, we have a standalone java class which does a stateless session bean lookup and requests a service from it. On server 2(websphere), we have a stateless session bean deployed which connects to a database using a jndi lookup, executes a query and returns back a CachedRowSet object (which populates the ResultSet from the above query.) In some cases, session bean returns back an array of objects or String objects or just plain int values.
    When the java class on server 1 invokes the methods returning CachedRowSet, we are getting a StreamCorruptedException, whereas on the server side, there is no exception. everything gets executed fine on websphere. This is the case only for CachedRowSet and not for other return types(as mentioned earlier the session bean returns an array of object in some cases which the java class on server 1 is successfully able to use).
    This is what the piece of code look like on server 1:
    // First gets a StatelessSessionBean using suns InitialContextFactory
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
    env.put(Context.PROVIDER_URL,"iiop://localhost:2809");
    System.out.println("Creating initial context");
    Context ctx = new InitialContext(env);
    System.out.println("Initial context created.");
    Object homeObj = ctx.lookup("cell/nodes/localhost/servers/server1/ejb/SSBHome");
    SSBHome eHome = (SSBHome)PortableRemoteObject.narrow(homeObj,SSBHome.class);
    System.out.println("Got Home");
    SSB eBean = eHome.create();
    CachedRowSet crs = eBean.getAccts(param1, param2);
    //This is the line of code which throws the exception.
    The stacktrace shoows as follows:
    Got Home
    java.io.StreamCorruptedException
         at com.sun.corba.se.internal.io.IIOPInputStream.inputRemoteMembersForReadFields(IIOPInputStream.java:1675)
         at com.sun.corba.se.internal.io.IIOPInputStream.readFields(IIOPInputStream.java:1595)
         at com.sun.corba.se.internal.io.InputStreamHook.readFields(InputStreamHook.java:177)
         at java.math.BigInteger.readObject(BigInteger.java:3034)
         at com.sun.corba.se.internal.io.IIOPInputStream.readObject(Native Method)
         at com.sun.corba.se.internal.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1298)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:908)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:261)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:247)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1084)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:293)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1484)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:1893)
         at com.sun.corba.se.internal.io.IIOPInputStream.defaultReadObjectDelegate(IIOPInputStream.java:424)
         at com.sun.corba.se.internal.io.InputStreamHook.defaultReadObject(InputStreamHook.java:163)
         at java.math.BigDecimal.readObject(BigDecimal.java:1084)
         at com.sun.corba.se.internal.io.IIOPInputStream.readObject(Native Method)
         at com.sun.corba.se.internal.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1298)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObjectUsingFVD(IIOPInputStream.java:1182)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:259)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:247)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:948)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:289)
         at com.sun.corba.se.internal.corba.TCUtility.unmarshalIn(TCUtility.java:266)
         at com.sun.corba.se.internal.corba.AnyImpl.read_value(AnyImpl.java:561)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_any(CDRInputStream_1_0.java:635)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_any(CDRInputStream.java:260)
         at com.sun.corba.se.internal.javax.rmi.CORBA.Util.readAny(Util.java:100)
         at javax.rmi.CORBA.Util.readAny(Util.java:90)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.read_Array(ValueHandlerImpl.java:586)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:244)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1084)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:293)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1577)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:1796)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:913)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:261)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:247)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:948)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:289)
         at com.sun.corba.se.internal.corba.TCUtility.unmarshalIn(TCUtility.java:266)
         at com.sun.corba.se.internal.corba.AnyImpl.read_value(AnyImpl.java:561)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_any(CDRInputStream_1_0.java:635)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_any(CDRInputStream.java:260)
         at com.sun.corba.se.internal.javax.rmi.CORBA.Util.readAny(Util.java:100)
         at javax.rmi.CORBA.Util.readAny(Util.java:90)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.read_Array(ValueHandlerImpl.java:586)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:244)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1084)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:293)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1577)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:1796)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:913)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:261)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:247)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1084)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:293)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1577)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:1796)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:913)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:261)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:247)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1084)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:293)
         at com.EJBProj._SSB_Stub.getAccts(_SSB_Stub.java:240)
         at com.test.Test1.getAccts(Test1.java:101)
         at com.test.Test1.<init>(Test1.java:65)
         at com.test.Test1.main(Test1.java:81)
    java.io.IOException: Unable to read value from underlying bridge : Serializable readObject method failed internally
         at com.sun.corba.se.internal.io.IIOPInputStream.throwExceptionType(Native Method)
         at com.sun.corba.se.internal.io.IIOPInputStream.defaultReadObjectDelegate(IIOPInputStream.java:446)
         at com.sun.corba.se.internal.io.InputStreamHook.defaultReadObject(InputStreamHook.java:163)
         at java.math.BigDecimal.readObject(BigDecimal.java:1084)
         at com.sun.corba.se.internal.io.IIOPInputStream.readObject(Native Method)
         at com.sun.corba.se.internal.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1298)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObjectUsingFVD(IIOPInputStream.java:1182)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:259)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:247)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:948)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:289)
         at com.sun.corba.se.internal.corba.TCUtility.unmarshalIn(TCUtility.java:266)
         at com.sun.corba.se.internal.corba.AnyImpl.read_value(AnyImpl.java:561)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_any(CDRInputStream_1_0.java:635)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_any(CDRInputStream.java:260)
         at com.sun.corba.se.internal.javax.rmi.CORBA.Util.readAny(Util.java:100)
         at javax.rmi.CORBA.Util.readAny(Util.java:90)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.read_Array(ValueHandlerImpl.java:586)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:244)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1084)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:293)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1577)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:1796)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:913)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:261)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:247)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:948)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:289)
         at com.sun.corba.se.internal.corba.TCUtility.unmarshalIn(TCUtility.java:266)
         at com.sun.corba.se.internal.corba.AnyImpl.read_value(AnyImpl.java:561)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_any(CDRInputStream_1_0.java:635)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_any(CDRInputStream.java:260)
         at com.sun.corba.se.internal.javax.rmi.CORBA.Util.readAny(Util.java:100)
         at javax.rmi.CORBA.Util.readAny(Util.java:90)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.read_Array(ValueHandlerImpl.java:586)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:244)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1084)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:293)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1577)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:1796)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:913)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:261)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:247)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1084)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:293)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1577)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:1796)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:913)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:261)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:247)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1084)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:293)
         at com.EJBProj._SSB_Stub.getAccts(_SSB_Stub.java:240)
         at com.test.Test1.getAccts(Test1.java:101)
         at com.test.Test1.<init>(Test1.java:65)
         at com.test.Test1.main(Test1.java:81)
    Again, everything seems to work fine on websphere server.
    Any Clue of why this is happening?
    All suggestions are greatly appreciated.
    Thanks
    Neorav
    Message was edited by:
    NeoravB

    Sorry for the confusion!
    The solution mentioned above is not the right solution.
    The above given code works fine irrespective of having corbaloc in the url, if you are working in the IBMs jvm.
    It fails if you are working in suns jvm.
    Anyone with any idea whats missing here.
    Thanks a lot for any suggestion/ideas
    Neorav

  • How to send message to MessageDrivenBean from Session bean in JDeveloper

    HI I am trying to write a sample program using JDeveloper.
    I am trying to do these steps
    1) client class which gets Session bean and calls its method.
    2) write Stateless Session bean with a method which gets MDB and sends message.
    3) write Message Driven Bean ( which prints message recieved from Session bean )
    Set up
    =======
    jms.xml
    {JDevHome}\jdev\system9.0.5.2.1618\oc4j-config\jms.xml : changed jms.xml file and included
         <topic name="Demo Topic" location="jms/theTopic">
              <description>A dummy topic</description>
         </topic>
         <topic-connection-factory name="Demo Topic Connection Factory" location="jms/theTopicConnectionFactory">
              <description>A dummy topic connection factory</description>
         </topic-connection-factory>
    orion-ejb-jar.xml:
    edited MDB entry to
    <message-driven-deployment name="MessageLogger"
    destination-location="jms/theTopic" connection-factory-location="jms/theTopicConnectionFactory">
    </message-driven-deployment>
    Implementation
    ===============
    In client class:
    I am getting session bean like
    Properties props = System.getProperties();
    props.put( javax.naming.Context.INITIAL_CONTEXT_FACTORY , "com.evermind.server.rmi.RMIInitialContextFactory");
    props.put( javax.naming.Context.SECURITY_PRINCIPAL , "admin" );
    props.put( javax.naming.Context.SECURITY_CREDENTIALS,"welcome");
    props.put( javax.naming.Context.PROVIDER_URL ,"ormi://localhost:23891/current-workspace-app");
    Context ctx = new InitialContext(props);
    MySessionHome home = (MySessionHome)
              javax.rmi.PortableRemoteObject.narrow(obj, MySessionHome.class);
    This part works fine, and I am calling method on session bean created out of home.
    In Session bean:
    I want to get TopicConnectionFactory and tried these two ways:
    a)
    getting the context by setting new environemnt values like
    Properties props = System.getProperties();
    props.put( javax.naming.Context.INITIAL_CONTEXT_FACTORY , "com.evermind.server.jms.EvermindConnectionFactory");
    props.put( javax.naming.Context.SECURITY_PRINCIPAL , "admin" );
    props.put( javax.naming.Context.SECURITY_CREDENTIALS,"welcome");
    props.put( javax.naming.Context.PROVIDER_URL ,"ormi://localhost:9227/current-workspace-app");
    Context ctx = new InitialContext( props);
    When I try this,it is complaining that it cannot instantiate EvermindConnectionFactory.
    I am not sure which factory class we have to use here.i tried all the Factory class in that package.but didn't worked.
    next I used,
    b)
    tried to use default context in session bean to get MDB factory
    String TOPIC_NAME="jms/theTopic";
    String TOPIC_CONNECTION_FACTORY="jms/theTopicConnectionFactory";
    TopicConnectionFactory connectionFactory = (TopicConnectionFactory)new InitialContext().lookup("java:comp/env/" + TOPIC_CONNECTION_FACTORY);
    this gives
    04/06/13 23:46:09 javax.naming.NameNotFoundException: jms/theTopicConnectionFactory not found in MySession
    04/06/13 23:46:09      at com.oracle.naming.J2EEContext.getSubContext(J2EEContext.java:93)
    this may be because JMS server runs on different port than other EJBs and have different namespaces.
    Can any body give info,how we can make use of Message Driven bean from a Session Bean or from a JSP page or from a simple class inside JDeveloper.
    Thanks in advance.
    gopal

    Hi,
    There are some hints in this forum for how to do this.
    I put together and make it working.
    This example creates an MD Bean and have a simple message and a client class send messages to that bean.
    Steps
    =====
    1)
    a)in {JDev Home}\jdev\system9.0.5.2.1618\oc4j-config\jms.xml
         <topic name="Demo Topic" location="jms/demoTopic">
              <description>A dummy topic</description>
         </topic>
         <topic-connection-factory name="Demo Topic Connection Factory" location="jms/theTopicConnectionFactory">
              <description>A dummy topic connection factory</description>
         </topic-connection-factory>
    b) in current project in orion-ejb-jar.xml
    go to orion-ejb-jar properties and add these values there to MDB node
    destination-location=jms/demoTopic
    connection-factory-location=jms/theTopicConnectionFactory
    2) create a dummy session bean and a dummy client for that session bean
    This sets default configuration for the client application we write
    doing so we do not need to set properties to get Initial context.It makes use of
    {JDev Home}\jdev\system9.0.5.2.1618\oc4j-config\.client\jndi.properties
    We can directly get Contexxt ctx = new InitialContext();
    3) Create MDB and put this sample code in method
    onMessage()
    TextMessage tm = (TextMessage) msg;
    try {
    String text = tm.getText();
    System.err.println("Received new message : " + text);
    catch(JMSException e) {
    e.printStackTrace();
    4) go to properties for the MDB and set Destination to Topic
    5) write Client code
    Context ctx =new InitialContext();
    // 1: Lookup ConnectionFactory via JNDI
    TopicConnectionFactory factory =     
    (TopicConnectionFactory) ctx.lookup("jms/theTopicConnectionFactory");
    // 2: Use ConnectionFactory to create JMS connection
    TopicConnection connection = factory.createTopicConnection();
    // 3: Use Connection to create session
    TopicSession session = connection.createTopicSession( false, Session.AUTO_ACKNOWLEDGE);
    // 4: Lookup Desintation (topic) via JNDI
    Topic topic = (Topic) ctx.lookup("jms/demoTopic");
    // 5: Create a Message Producer
    TopicPublisher publisher = session.createPublisher(topic);
    // 6: Create a text message, and publish it
    TextMessage msg = session.createTextMessage();
    msg.setText("This is a test message from My Test Client!!! .");
    publisher.publish(msg);
    6) Run the server and run the client

  • EJB 2.1 session bean calling EJB 3 session bean?

    I have a WL 10 (JDK 1.5/EE 5) server that has several EJB 3 stateless session beans deployed and working well. But now I need to allow a JBoss 3.2.3 (JDK 1.4) EJB 2.1 session bean make remote calls into these EJB 3 EJBs. Can this even work?
    It seems to me that EJB 3 calling EJB 2 would be fine, but not in the reverse?

    I have a WL 10 (JDK 1.5/EE 5) server that has several EJB 3 stateless session beans deployed and working well. But now I need to allow a JBoss 3.2.3 (JDK 1.4) EJB 2.1 session bean make remote calls into these EJB 3 EJBs. Can this even work?
    It seems to me that EJB 3 calling EJB 2 would be fine, but not in the reverse?

Maybe you are looking for