Do JNDI look up for entity beans from a session bean  in different  jars

I have a problem doing entity beans JNDI look up from a session bean which is deployed
as a separate package (session.jar) from the entity beans (entity.jar)
I believe if both session bean and entity beans are deployed into one jar and
I specify ejb-local-reference-description for session bean, it should work. However,
due to some reason, they have to be in separated packages but still in the same
container. Then question how to do JNDI lookup given entity beans only have local
interfaces?
FYI.
1 both session.jar and entity.jar are self-contained. i.e., no deployment error.
each JNDI name can be viewed from JNDI tree
2. weblogic-ejb-jar.xml for session.jar
<weblogic-ejb-jar>
<description><![CDATA[Generated by XDoclet]]></description>
<weblogic-enterprise-bean>
<ejb-name>PetstoreLogic</ejb-name>
<stateless-session-descriptor>
</stateless-session-descriptor>
<reference-descriptor>
</reference-descriptor>
<jndi-name>PetstoreLogic</jndi-name>
<local-jndi-name>PetstoreLogicLocal</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
3. weblogic-ejb-jar.xml (code snip) for entity.jar
<weblogic-enterprise-bean>
<ejb-name>Account</ejb-name>
<entity-descriptor>
<persistence>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
</persistence-use>
</persistence>
</entity-descriptor>
<reference-descriptor>
</reference-descriptor>
<local-jndi-name>net.sourceforge.cpetstore/AccountLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
4. if I do
accountLocalHome = (AccountLocalHome) ic.lookup("net/sourceforge/cpetstore/AccountLocalHome");
get error like:
javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException:
While trying to look up /app/ejb/net.sourceforge.cpetstore-entity.jar#Account/local-home
in /app/ejb/cpetstore-ejb.jar#PetstoreLogic.; remaining name '/app/ejb/net/sourceforge/cpetstore-entity/jar#Account/local-home'
     at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:869)
     at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNamingNode.java:150)
     at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:338)

In weblogic-ejb-jar.xml use jndi-name instead of local-jndi-name in reference-descriptor
element.
"Qiming He" <[email protected]> wrote:
>
I have a problem doing entity beans JNDI look up from a session bean
which is deployed
as a separate package (session.jar) from the entity beans (entity.jar)
I believe if both session bean and entity beans are deployed into one
jar and
I specify ejb-local-reference-description for session bean, it should
work. However,
due to some reason, they have to be in separated packages but still in
the same
container. Then question how to do JNDI lookup given entity beans only
have local
interfaces?
FYI.
1 both session.jar and entity.jar are self-contained. i.e., no deployment
error.
each JNDI name can be viewed from JNDI tree
2. weblogic-ejb-jar.xml for session.jar
<weblogic-ejb-jar>
<description><![CDATA[Generated by XDoclet]]></description>
<weblogic-enterprise-bean>
<ejb-name>PetstoreLogic</ejb-name>
<stateless-session-descriptor>
</stateless-session-descriptor>
<reference-descriptor>
</reference-descriptor>
<jndi-name>PetstoreLogic</jndi-name>
<local-jndi-name>PetstoreLogicLocal</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
3. weblogic-ejb-jar.xml (code snip) for entity.jar
<weblogic-enterprise-bean>
<ejb-name>Account</ejb-name>
<entity-descriptor>
<persistence>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
</persistence-use>
</persistence>
</entity-descriptor>
<reference-descriptor>
</reference-descriptor>
<local-jndi-name>net.sourceforge.cpetstore/AccountLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
4. if I do
accountLocalHome = (AccountLocalHome) ic.lookup("net/sourceforge/cpetstore/AccountLocalHome");
get error like:
javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException:
While trying to look up /app/ejb/net.sourceforge.cpetstore-entity.jar#Account/local-home
in /app/ejb/cpetstore-ejb.jar#PetstoreLogic.; remaining name '/app/ejb/net/sourceforge/cpetstore-entity/jar#Account/local-home'
     at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:869)
     at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNamingNode.java:150)
     at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:338)

Similar Messages

  • Problems accessing fields in a CMP entity bean from a session bean

    Hello everybody,
    I'm getting the next problem: when I try to access a field in a CMP entity bean that I have instantiated from a session bean (trhoug entitybean.getNameOfField), I get the error "the entity bean does not exist in the database".
    This entity bean is accessing a table in an external database (not the DB of the WAS), but I know that it's getting the correct data from the table, since  I check the entitybean.size() and the entitybean.findByPrimaryKey(), and I get the right information. For some reason, the only thing that it doesn't work in the entity bean are the getter/setter methods (I created them automatically after having created the entity fields).
    I access the entity bean through its local interface...
    I know it's really difficult to give an answer with so few details, but... does anybody think I forgot something important to configure??
    Thank very much in advance!!
    Isidro

    getter and setter methods for cmp-fields are abstract.
    getter and setter methods for cmr-fields are abstract.
    "John Lee" <[email protected]> wrote:
    >
    Hi:
    Which method in a CMP Entity bean should be abstract? just only SetXXX
    and
    GetXXX?
    Thanks!
    John Lee

  • Parsing XML from a session bean

    Hi,
    I am trying to use a Sax parser for parsing xml received from a back end
    legacy system. The code is executed from a Session bean.
    Debugging learned me that the parse() method on the parser hangs the
    container without any error or exception trace. The code works fine outside
    a container.
    All help will be highly appreciated.
    Kurt

    I found out that the InputStream implementation used parsing source inside
    the container is different
    then from the one outside (other type of VM of course!). The Weblogic
    implementation blocks at the end of
    the stream, while the normal SUN JDK 1.3 returns. This is not a bug, the bug
    I found is in my proxy that allows
    the connection to the backend. This proxy allows HTTP connections, and I
    parse the XML received over HTTP.
    Regards,
    Kurt
    "Todd Karakashian" <[email protected]> wrote in message
    news:[email protected]..
    That's seems odd. Perhaps there is something going on in your document
    handler code that triggers a hang in the environment of the server.
    When you see the hang, instruct the VM to give you a thread dump (type
    control-<break> on Windows, <control>-\ (backslash) on UNIX in the
    window in which the server is running; the results are dumped to
    stderr). That will show what every thread in the server is doing. If you
    email or post the thread dump, I will take a look at it and see if I can
    see what is going on. Also, let us know which platform, VM, parser, and
    WebLogic version you are using.
    Regards,
    -Todd
    Kurt Quirijnen wrote:
    Hi,
    I am trying to use a Sax parser for parsing xml received from a back end
    legacy system. The code is executed from a Session bean.
    Debugging learned me that the parse() method on the parser hangs the
    container without any error or exception trace. The code works fine
    outside
    a container.
    All help will be highly appreciated.
    Kurt--
    Todd Karakashian
    BEA Systems, Inc.
    [email protected]

  • A question about entity manager in stateless session bean.

    JSR 220 ejbcore, page 47 : stateless session bean: All business object references of the same interface type for the same stateless session bean have the "same object identity", which is assigned by the container.
    So, if we have two session beans in client code...
    @EJB Cart cart1;
    @EJB Cart cart2;
    then cart1.equals(cart2)==true
    If we declare entity manager in stateless session bean:
    @PersistenceContext( unitName="ds" ,type=PersistenceContextType.TRANSACTION)
    private EntityManager em;If cart1 and cart2 are the same reference, do we have any problem when using the same reference(maybe the same em? ) to get data from db?

    If cart1 and cart2 are the same reference, do we have
    any problem when using the same reference(maybe the
    same em? ) to get data from db?No. In EJB, there is a distinction between the EJB reference and the bean instance.
    Each time you make an invocation on an EJB reference for a stateless session bean,
    the container can choose any instance of that bean's bean class to process the
    invocation. That's true whether you invoke the same reference multiple times or
    two difference references to the same bean.
    Each bean instance is guaranteed to be single-threaded.

  • Error while calling a Web Service from a Session Bean

    I am trying to call a Web Service from a Session Bean using an Axis client, but I am getting the next exception:
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException: org/apache/axis/client/Service
         at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.wrapException(Util.java:364)
         at javax.rmi.CORBA.Util.wrapException(Util.java:277)
         at com.ing.mx.seguros.siniestros.litigios.ejb._SisaServiceRemote_Stub.invocarWebSericeProveedorLegal(Unknown Source)
         at com.ing.mx.seguros.siniestros.litigios.proxy.SisaWsProxy.solicitarApoyoLegal(SisaWsProxy.java:132)
         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 org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:402)
         at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:309)
         at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
         at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
         at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
         at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
         at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:158)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:850)Thanks for any help provided.
    Does any one have insights about it?

    Hi Swapna,
    from your screenshot it seems that you actually try to call the service in your Data Source Expression field. You should set path to the WSDL file here actually - this could be either URL to SAP or to filesystem, as Anton suggested (this could be faster). Have you created endpoint binding for your service in transaction SOAMANAGER? If yes, then simply download the corresponding WSDL with binding or copy the URL which leads to it. But also test whether you are able to retrieve the WSDL without logging into SAP (close all browser windows and then open a new one otherwise session ID from other browser windows can be reused).
    If you have to give username and password, then setup anonymous alias in transaction SICF, for example.
    Pleas, check my previous post on the same subject here: Re: BCM7 IVR : SOAP request for client identification in CRM .
    Maybe it could help.
    Regards,
    Dawood.

  • How to get access via RMI from a session bean to a remote session bean?

    I have 2 J2EE applications in two different Sun Application Servers (8.0 PE). I would like to get access from one Session Bean "SB1" into Application A to Session Bean "BrickFacade" within Application B.
    My Java Code from "SB1":
             Context ic = new InitialContext();
             Object o = ic.lookup("java:comp/env/ejb/BrickFacade");
             BrickFacadeHome brickFacadeHome2 = (BrickFacadeHome) PortableRemoteObject.narrow(o, BrickFacadeHome.class);
             brickFacade = brickFacadeHome2.create();
             Collection col = brickFacade.doSomething();
             ...I configured the remote App.server in sun-ejb-jar.xml. I found the syntax within documentation (http://docs.sun.com/source/817-6087/dgjndi.html#wp24622) but I'm not sure if I this is the right usage.
         <ejb-ref>
            <ejb-ref-name>ejb/BrickFacade</ejb-ref-name>
            <jndi-name>corbaname:iiop://161.90.176.213:3700#webclient/BrickFacade</jndi-name>
          </ejb-ref>The context lookup throws the exception:
    "IOP00110603: (BAD_PARAM) Bad host address in -ORBInitDef"
    and
    Invalid URL or IOR: corbaloc:iiop://161.90.176.213:3700
    javax.naming.ConfigurationException: Invalid URL or IOR: corbaloc:iiop://161.90.176.213:3700 [Root exception is org.omg.CORBA.BAD_PARAM:   vmcid: SUN  minor code: 603  completed: No]
    Could anyone help me? Many thanks!
    Stacktrace:
    "IOP00110603: (BAD_PARAM) Bad host address in -ORBInitDef"
    org.omg.CORBA.BAD_PARAM: vmcid: SUN minor code: 603 completed: No
         at com.sun.corba.ee.impl.logging.NamingSystemException.insBadAddress(NamingSystemException.java:148)
         at com.sun.corba.ee.impl.logging.NamingSystemException.insBadAddress(NamingSystemException.java:166)
         at com.sun.corba.ee.impl.naming.namingutil.CorbalocURL.badAddress(CorbalocURL.java:104)
         at com.sun.corba.ee.impl.naming.namingutil.CorbalocURL.handleColon(CorbalocURL.java:140)
         at com.sun.corba.ee.impl.naming.namingutil.CorbalocURL.handleIIOPColon(CorbalocURL.java:115)
         at com.sun.corba.ee.impl.naming.namingutil.CorbalocURL.<init>(CorbalocURL.java:67)
         at com.sun.corba.ee.impl.naming.namingutil.INSURLHandler.parseURL(INSURLHandler.java:41)
         at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.operate(INSURLOperationImpl.java:103)
         at com.sun.corba.ee.impl.orb.ORBImpl.string_to_object(ORBImpl.java:774)
         at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:338)
         at com.sun.jndi.cosnaming.CNCtx.initUsingCorbanameUrl(CNCtx.java:321)
         at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:247)
         at com.sun.jndi.cosnaming.CNCtx.createUsingURL(CNCtx.java:85)
         at com.sun.jndi.url.iiop.iiopURLContextFactory.getUsingURLIgnoreRest(iiopURLContextFactory.java:56)
         at com.sun.jndi.url.iiop.iiopURLContext.getRootURLContext(iiopURLContext.java:44)
         at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:182)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:702)
         at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:108)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at de.emilberlinerstudios.va.ejb.testrh.sb.TestRemoteEjbBean.getBrickFacade(TestRemoteEjbBean.java:108)
         at de.emilberlinerstudios.va.ejb.testrh.sb.TestRemoteEjbBean.startTest(TestRemoteEjbBean.java:79)
         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 com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:930)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
         at $Proxy7.startTest(Unknown Source)
         at de.emilberlinerstudios.va.ejb.testrh.sb._TestRemoteEjb_Stub.startTest(Unknown Source)
         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 com.sun.forte4j.j2ee.ejbtest.webtest.InvocableMethod$MethodIM.invoke(InvocableMethod.java:231)
         at com.sun.forte4j.j2ee.ejbtest.webtest.EjbInvoker.getInvocationResults(EjbInvoker.java:96)
         at com.sun.forte4j.j2ee.ejbtest.webtest.DispatchHelper.getForward(DispatchHelper.java:189)
         at org.apache.jsp.dispatch_jsp._jspService(dispatch_jsp.java:75)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:102)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:282)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:263)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:210)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         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 org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:214)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:168)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:133)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:539)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:272)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:114)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:936)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:165)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:683)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:604)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:542)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:647)
         at java.lang.Thread.run(Thread.java:534)
    |#]
    [#|2006-10-02T13:52:55.390+0200|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.stream.out|_ThreadID=11;|2006-10-02 13:52:55 [8080-Processor4] INFO .va.ejb.testrh.sb.TestRemoteEjbBean - RemoteException when getting BrickFacade. Message:Invalid URL or IOR: corbaloc:iiop://161.90.176.213:3700
    javax.naming.ConfigurationException: Invalid URL or IOR: corbaloc:iiop://161.90.176.213:3700 [Root exception is org.omg.CORBA.BAD_PARAM:   vmcid: SUN  minor code: 603  completed: No]
         at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:367)
         at com.sun.jndi.cosnaming.CNCtx.initUsingCorbanameUrl(CNCtx.java:321)
         at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:247)
         at com.sun.jndi.cosnaming.CNCtx.createUsingURL(CNCtx.java:85)
         at com.sun.jndi.url.iiop.iiopURLContextFactory.getUsingURLIgnoreRest(iiopURLContextFactory.java:56)
         at com.sun.jndi.url.iiop.iiopURLContext.getRootURLContext(iiopURLContext.java:44)
         at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:182)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:702)
         at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:108)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at de.emilberlinerstudios.va.ejb.testrh.sb.TestRemoteEjbBean.getBrickFacade(TestRemoteEjbBean.java:108)
         at de.emilberlinerstudios.va.ejb.testrh.sb.TestRemoteEjbBean.startTest(TestRemoteEjbBean.java:79)
         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 com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:930)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
         at $Proxy7.startTest(Unknown Source)
         at de.emilberlinerstudios.va.ejb.testrh.sb._TestRemoteEjb_Stub.startTest(Unknown Source)
         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 com.sun.forte4j.j2ee.ejbtest.webtest.InvocableMethod$MethodIM.invoke(InvocableMethod.java:231)
         at com.sun.forte4j.j2ee.ejbtest.webtest.EjbInvoker.getInvocationResults(EjbInvoker.java:96)
         at com.sun.forte4j.j2ee.ejbtest.webtest.DispatchHelper.getForward(DispatchHelper.java:189)
         at org.apache.jsp.dispatch_jsp._jspService(dispatch_jsp.java:75)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:102)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:282)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:263)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:210)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         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 org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:214)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:168)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:133)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:539)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:272)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:114)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:936)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:165)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:683)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:604)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:542)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:647)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: org.omg.CORBA.BAD_PARAM: vmcid: SUN minor code: 603 completed: No
         at com.sun.corba.ee.impl.logging.NamingSystemException.insBadAddress(NamingSystemException.java:148)
         at com.sun.corba.ee.impl.logging.NamingSystemException.insBadAddress(NamingSystemException.java:166)
         at com.sun.corba.ee.impl.naming.namingutil.CorbalocURL.badAddress(CorbalocURL.java:104)
         at com.sun.corba.ee.impl.naming.namingutil.CorbalocURL.handleColon(CorbalocURL.java:140)
         at com.sun.corba.ee.impl.naming.namingutil.CorbalocURL.handleIIOPColon(CorbalocURL.java:115)
         at com.sun.corba.ee.impl.naming.namingutil.CorbalocURL.<init>(CorbalocURL.java:67)
         at com.sun.corba.ee.impl.naming.namingutil.INSURLHandler.parseURL(INSURLHandler.java:41)
         at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.operate(INSURLOperationImpl.java:103)
         at com.sun.corba.ee.impl.orb.ORBImpl.string_to_object(ORBImpl.java:774)
         at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.j|#]

    Problem solved:
    configuration in jndi-name was wrong:
    <jndi-name>corbaname:iiop:161.90.176.213:3700#ejb/BrickFacade</jndi-name>

  • Web Service from stateful Session Bean deleted after server restart

    Hi,
    i created a stateful session bean and from this a web service.
    I am able to deploy it and it works really fine.
    My problem is: after a server restart the web service is gone and i
    have to deploy it again.
    I have some other web services (but these are web services from stateless session beans)
    but they "survive" the server restart.
    I don't want to deploy the web service after every server restart, did I forget something or
    is it a general problem of stateful session beans or web services?
    Thanks in advance
    Jens

    Hello Björn,
    I am not quite sure what your problem is but did you have a look at these articles:
    http://help.sap.com/saphelp_nw04/helpdata/en/4d/993441c73cef23e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/be/2e2c4142aef623e10000000a155106/frameset.htm
    I hope they can give you some idea.
    Regads
    Vyara

  • Calling an RPG (AS400) program from a Session Bean

    Hi, does anyone know if there is a kind of connector that makes possbile to call an RPG program in an AS400 host from a session bean, allowing the application server (i.e. : JBoss or WAS or WLB) to maintain the transaction ?
    Thanks,
    Klaus Koenig
    Italy

    Yes, it is called "AS/400 Toolbox for Java".

  • Error when returning Vector from EJB Session Bean

    I am testing the EJB functionality within JDeveloper(9.0.3). I simply expanded on the tutorial that is in the documentation (departments and employees). I created a method in the stateless session bean that retrieves a Collection of employees for a department, then converts it to a Vector. When I try to return the Vector from the session bean to a sample client, I get an error indicating that the Object is NOT serializable. I know that Vector IS serializable. Why do I get this error? (The error displays on the client message log, NOT the OC4J message log). I tried dumping the Vector to System.out.println - this works fine, so I l know I'm getting data.
    Here is the stack trace and errors that display:
    com.evermind.server.rmi.OrionRemoteException: Error (de-)serializing object: EmployeeLocal_EntityBeanWrapper4
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneSerialize(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:404
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneObject(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:377
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneOneObjectInstance(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:419
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneArrayList(java.util.ArrayList, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:599
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneObject(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:357
         java.util.Collection hrApp_StatelessSessionBeanWrapper2.getEmployeesByDepartment(java.lang.Long)
              hrApp_StatelessSessionBeanWrapper2.java:323
         java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
              native code
         void com.evermind.server.rmi.RMICallHandler.run(java.lang.Thread)
              RMICallHandler.java:119
         void com.evermind.server.rmi.RMICallHandler.run()
              RMICallHandler.java:48
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:803
         void java.lang.Thread.run()
              Thread.java:484
    at connection to localhost/127.0.0.1 as admin
         void com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(java.lang.Throwable)
              RMIConnection.java:1558
         java.lang.Object com.evermind.server.rmi.RMIConnection.invokeMethod(com.evermind.server.rmi.RMIContext, long, long, java.lang.reflect.Method, java.lang.Object[])
              RMIConnection.java:1511
         java.lang.Object com.evermind.server.rmi.RemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
              RemoteInvocationHandler.java:53
         java.lang.Object com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
              RecoverableRemoteInvocationHandler.java:22
         java.lang.Object com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
              StatelessSessionRemoteInvocationHandler.java:50
         java.util.Collection __Proxy1.getEmployeesByDepartment(java.lang.Long)
         javax.swing.table.DefaultTableModel hr.hrAppClientFrame.getTableModel()
              hrAppClientFrame.java:150
         void hr.hrAppClientFrame.jbInit()
              hrAppClientFrame.java:122
         void hr.hrAppClientFrame.<init>()
              hrAppClientFrame.java:58
         void hr.hrAppClientFrame.main(java.lang.String[])
              hrAppClientFrame.java:141
         Nested exception is:
    java.io.NotSerializableException: EmployeeLocal_EntityBeanWrapper4
         void java.io.ObjectOutputStream.outputObject(java.lang.Object)
              ObjectOutputStream.java:1148
         void java.io.ObjectOutputStream.writeObject(java.lang.Object)
              ObjectOutputStream.java:366
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneSerialize(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:390
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneObject(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:377
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneOneObjectInstance(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:419
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneArrayList(java.util.ArrayList, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:599
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneObject(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:357
         java.util.Collection hrApp_StatelessSessionBeanWrapper2.getEmployeesByDepartment(java.lang.Long)
              hrApp_StatelessSessionBeanWrapper2.java:323
         java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
              native code
         void com.evermind.server.rmi.RMICallHandler.run(java.lang.Thread)
              RMICallHandler.java:119
         void com.evermind.server.rmi.RMICallHandler.run()
              RMICallHandler.java:48
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:803
         void java.lang.Thread.run()
              Thread.java:484
    at connection to localhost/127.0.0.1
         void com.evermind.server.rmi.OrionRemoteException.receive(java.net.InetAddress, java.lang.String)
              OrionRemoteException.java:130
         void com.evermind.server.rmi.RMIConnection.handleMethodInvocationResponse()
              RMIConnection.java:1673
         void com.evermind.server.rmi.RMIConnection.run(java.lang.Thread)
              RMIConnection.java:532
         void com.evermind.server.rmi.RMIConnection.run()
              RMIConnection.java:275
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:797
         void java.lang.Thread.run()
              Thread.java:484
    Any ideas?
    Thanks

    I would suggest opening a case with [email protected] FWIW, I recall seeing
              something like this in WLS 6.0. I believe it is fixed in WLS 6.1
              -- Rob
              Chris Dupuy wrote:
              > Btw, this occurs when I create an stateful session bean that ends up
              > throwing an exception and setRollbackOnly() is called. From that point
              > forward, my logs fill with this message.
              >
              > Chris
              >
              > "Chris Dupuy" <[email protected]> wrote in message
              > news:[email protected]..
              > > anyone know what this means, and what you can do about it?
              > >
              > >
              > > <Error> <ConnectionManager> <atossd03> <cbeyondServer> <ExecuteThread:
              > '14'
              > > for queue: 'd
              > > efault'> <> <> <000000> <Closing:
              > 'weblogic.rjvm.t3.T3JVMConnection@488831'
              > > because of: 'Server received a message over an uniniti
              > > alized connection: 'JVMMessage from: 'null' to:
              > >
              > '5825313123619479267S:10.6.6.40:[8000,8000,8001,8001,8000,8001,-1]:cbeyond:c
              > > beyond
              > > Server' cmd: 'CMD_REQUEST', QOS: '101', responseId: '2', invokableId: '1',
              > > flags: 'JVMIDs Not Sent, TX Context Not Sent', abbrev o
              > > ffset: '204'''>
              > >
              > >
              > >
              

  • How to achieve Entity Bean methods ONLY by calling them from a Session Bean

    Hi,
    I used a session bean as a business facade to a entity bean.
    In the session bean I achieve the entity bean with a jndiContext.lookup("java:comp/env/ejbEntityBean").
    Now I am looking for a solution that it is only possible to call the entity bean methods or the whole entity bean from the corresponding session bean.
    In other words: "How can I forbid the access to the entity bean, if the calling object is not the corresponding session bean?"
    --->
    I only found a way the regulate the access to the entity bean methods by declaring a security-role.
    But the existence of the security-role at runtime depends on the calling user-authorizations!
    Is there a way to set the entity-security-role within the session bean context?
    Best Regards
    Steffen

    Hi Srikanth Reddy.T,
    sorry, I am not looking for a special tag  <entity-security-role>.
    I am looking for a way to specifiy that my session bean "has" the special security-role (in my case "WebZaehlerEjbRole") of my entity bean "in my case "WebZaehlerEjbRole") that is necessary to call the methods (findAlleEntries, findByWindowId,...) of my entity-bean.
    Here is the relevant part of my ejb-jar.ml:
         <assembly-descriptor>
              <security-role>
                   <role-name>WebZaehlerEjbRole</role-name>
              </security-role>
              <method-permission>
                   <description>method-permission</description>
                   <role-name>WebZaehlerEjbRole</role-name>
                   <method>
                        <ejb-name>WebZaehlerBean</ejb-name>
                        <method-name>findAllEntries</method-name>
                        <method-params/>
                   </method>
                   <method>
                        <ejb-name>WebZaehlerBean</ejb-name>
                        <method-name>findByWindowId</method-name>
                        <method-params>
                             <method-param>java.lang.Long</method-param>
                        </method-params>
                   </method>
    Regards,
    Steffen

  • JNDI Naming Problem accessing Session Bean from Message Driven Bean

    Hi,
         I am facing a very strange problem in JNDI look up accessing a Session Bean from a Message Driven Bean. I have a session fa�ade bean(Remote Bean) which is being called from Struts Action class getting the home reference from the ServiceLocator (I have implemented ServiceLocator pattern to obtain JNDI reference for all EJBs). When I am calling the session fa�ade EJB from the Struts Action class everything is working fine.
         But when I am trying to call the same EJB from my Message Driven Bean, I am getting a JNDI exception (NameNotFoundException - No Object bound to name �java:comp/env/ejb/EJBJNDIName�). I am trying to get the remote reference from the same ServiceLocator which is successfully providing me a reference while calling from the struts action class. But the same ServiceLocator is not able to provide me a reference while calling from the Message Driven Bean. If I use the JNDI name directly like �EJBJNDIName� in the lookup it is working fine. The lookup for the name is working fine and I am able to call the Session Fa�ade bean with that reference.
         I am really not sure what exactly the problem is. If I have any problem in the ServiceLocator, it should have given me the same error while calling from Struts Action class. But it is working fine with the full name �java:comp/env/ejb/EJBJNDIName� calling from the struts action class. I am not sure whether Message Driven Bean has something to do with it. Why I am not able to get a reference of the EJB with the full name? Please Help.
    Thanks
    Amit

    Hi Bhagya,
    Thanks for your response. I think from EJB container we can call Local EJBs with the full JNDI name. The session facade bean which is being called is a remote bean. From the session facade bean I am calling a local stateless session bean for database access. I am getting the reference of the local EJB from my session facade bean with full JNDI name "java:comp/env/ejb/EJBJNDIName". It is working fine with out any problem. My servicelocator is able to provide me the reference of the local EJB from the session facade remote bean with Full JNDI name. I am only having this problem calling from the MDB. I am really not sure whether what is causing it?
    Thanks
    Amit

  • What to look out for when upgrading from 10.4.5 to 10.4.6

    I'm thinking about upgrading our server from 10.4.5 to 10.4.6 (I've delayed it because I remember hearing a few things were broken in the process on some setups). So, being the novice that I am, what should I look out for?

    The best thing you can do is to take a full backup of your system and then apply the latest update.
    Also, it is safer to apply the combo update.
    If you do not hear problems in here, there are probably not any problems
    Mihalis.

  • 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

  • Calling IP from a Session Bean

    I am looking to put some security on our EJBs based on the callers IP address. I can't seem to figure out how to get the calling IP from within the session bean. Does security need to be enabled to get this information? Is there something that I am missing?

    believe the functions that you mentioned are only available within the HttpRequestObject. What I am >>actually looking for is a way to get the IP from within the SessionContext of the Session EJB or simply >>thin any part of the EJB. if you REALLY want to access IP from EJB you have to pass it as parameters to your EJB functions. Request/Response objects are not available from EJBs because you don't want to tie any other architecture(Request/Response based clients) with EJB... EJBs are designed to be accessible from any type of clients(which might not be IP based).
    Because of this we are forced to implement our own. Is there a way to enable GROUPS/ROLES without >>having the EJB security enable in WebSphere?YES....you can define your groups and roles using JAAS and then in your application code...you have to to write some code to do checks before calling any Entity Beans. I am not aware of any methods to tie up the JAAS to EJB either in the deployment descriptor or any other method.
    Another thing that I want to emphasize is that using IP you might not be able to accomplish what you are doing..because lets say you are assigning some rights to people with a specific IP but if u r using DHCP they might not have the same IP next time..so u will end up in more trouble. :-)
    all the best....
    sanjay.

  • Sending jms message from bc4j session bean

    Hi,
    i need to send some message from my bc4j (deployed as session bean).
    i have successfully deployed my mdb to listen for these message via Queue. I try to send some message from test client it works well, this the code snippet :
    String connectionFactoryName = "java:comp/env/jms/QueueConnectionFactory";
    String queueName = "java:comp/env/jms/demoQueue";
    JMSSender sender = new JMSSender(connectionFactoryName,queueName);
    sender.send("test");
    sender.close();
    when i move this code to my bc4j(session bean), message is sent, but my mdb doesn't receive it !( onMessage procedure doesn't come out )
    Really appreciate for help,
    Ricky H.P.

    sorry, this is JMSSender class source code:
    public class JMSSender{
    Context jndiContext;
    QueueConnectionFactory connectionFactory;
    QueueConnection connection;
    QueueSession session;
    TextMessage message;
    QueueSender queueSender;
    Queue queue;
    public JMSSender(String connectionFactoryName,String queueName){
    init(connectionFactoryName,queueName);
    void init(String connectionFactoryName,String queueName){
    * Create a JNDI InitialContext object.
    try {
    jndiContext = new InitialContext();
    } catch (NamingException e) {
    e.printStackTrace();
    * Look up connection factory and queue. If either does
    * not exist, exit.
    try {       
    //connectionFactory = (QueueConnectionFactory)jndiContext.lookup("java:comp/env/jms/QueueConnectionFactory");
    //queue = (Queue)jndiContext.lookup("java:comp/env/jms/demoQueue");
    connectionFactory = (QueueConnectionFactory)jndiContext.lookup(connectionFactoryName);
    queue = (Queue)jndiContext.lookup(queueName);
    }catch (Exception e) {
    e.printStackTrace();
    public void send(String strMessage){
    try {
    connection = connectionFactory.createQueueConnection();
    session = connection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
    String correlationId = Long.toString(System.currentTimeMillis());
    message = session.createTextMessage();
    message.setText(strMessage);
    queueSender = session.createSender(queue);
    queueSender.send(message);
    } catch (Exception ex) {
    ex.printStackTrace();
    } finally {
    System.out.println("message sent success !!!");
    public void close(){
    try {
    queueSender.close();
    session.close();
    connection.close();
    } catch (Exception ex) {
    ex.printStackTrace();
    } finally {
    public static void main(String args[]){
    new JMSSender("java:comp/env/jms/QueueConnectionFactory","java:comp/env/jms/trgBctQueue");
    }

Maybe you are looking for

  • Adobe Reader/Acrobat and Screen Readers, 50 page default?

    The company I work for creates large print PDF for our customers.  A lot of these documents are larger than 50 pages.  Is there a reason that the default setting for reading PDF's is set to 50 pages?  Is there a way that adobe can change this setting

  • Checkbox by group

    Hi All, I used the below code for generating the value for checkbox by group. I want a add a description to my check box so that while display on run time , the key value(L1) along the description(level management) should be displayed. Can any one he

  • Netbeans and javadoc

    Hi all, Please, can I integrate javadoc with netbeans in such a way that netbeans will display the helps as one works? Also which is better, netbeans or forte?

  • PLS-00320: the declaration of the type of this expression is incomplete or malformed

    hello my friend please help I have this Error in PL /SQL procedure ORA-06550: line 6, column 12: PLS-00320: the declaration of the type of this expression is incomplete or malformed ORA-06550: line 6, column 12: PL/SQL: Item ignored where this is my

  • Pro Tools/Logic bouncing issue URGENT

    I have an urgent Logic/Pro Tools question. I've asked several people and searched online but I can't find the problem. For some reason, my bounced Logic files come out as 5 mono tracks in Pro Tools.. but they're bounced as interleaved in Logic. I'm n