Using Session EJB from MDB in Weblogic 11G

I am having trouble with what should be a very simple operation. I have created an MDB and deployed it successfully on the Weblogic managed server. Then in a separate application, I created a Stateless session bean that I would also like to call from the MDB. My SSB deploys and works fine. I added an @EJB annotation to the MDB so I could instantiate and access the SSB from the MDB. In order to resolve the interface class in jDeveloper, I went to my MDB project properties under libraries and classpath and added the jar file for my ejb.
When I try to redeploy the MDB, I get a java.lang.ClassNotFoundException on the SSB interface class.
Is there an example somewhere of how to properly create and configure all of the deployment packages and refereneces I need on the weblogic server? The SSB is a common service that going to be called by a lot of other MDBs in my system. Optimally, what I would like to do is to deploy the ejb-client.jar as a shared library so all of my MDBs can use it.
Thanks for any pointers!

I am using jDeveloper 11g, so both my MDB and SLSB were built and deployed using the wizzards in the IDE.
The MDB is inside of an ejb-jar and deployed to a managed server. I am doing my development on a box that is resource challenged so I setup my WLS on a different box. There is an admin server (AdminServer) and a separate soa server (soa_server1) on which I have installed all of the SOA Suite packages.
The SLSB represents a primary service for the system I am building. Service1SessionBean is deployed targeted to soa_server1. The MDB is also deployed to soa_server1. At least it was until I tried to add the EJB reference. Now it won't deploy at all.
I would like to avoid packaging the Service1SessionBean client jar in with the MDB because there are several other EJBs that will also need to call the service. I would like to deploy the client jar as a shared library on soa_server1 so that any EJB artifacts that need to call it may do so, I have tried to deploy the client jar as a shared library using jDeveloper but when it deploys, it seems to be under the name "j2ee-app" rather than Service1SessionBean.

Similar Messages

  • Trying to call stateless session bean from MDB

    Folks,
    Am working on RAD and WAS 8.
    I have an MDB. And a stateless session bean (AOBean under EJB project).
    While the listener listens to the messages from queue, it also tries to persist to db. I want to achieve this via a method of AOBean (through instantiating session bean or by injection).
    I have been sucessful by invoking a method from AOBean class -  that method just returns a string (without any objects being passed)
    Problem:
    I am getting IllegalStateException when I try to invoke a method of AOBean class, that has an object as a parameter
    For eg:
    MDB
    @EJB(name="ejb/TransactionMgrAOBean", mappedName="ejb/TransactionMgrAOBean")
    ITransactionMgrAO tranAO;
        public void onMessage(Message message) {
         TextMessage textMessage = (TextMessage) message;
         boolean status = false;
      try {
       TransactionVO tranVO =  getTransactionVO();//Here building the object to be passed to session bean
       String status1  = tranAO.getVersion(tranVO);
      }catch(Exception e){
    AOBean
    @Stateless
    @Remote({ ITransactionMgrAO.class })
    @WebService
    public class TransactionMgrAOBean {
    public String getVersion(TransactionVO tranVO) throws Exception{
      try{
    //business logic 
      } catch(Exception e){
      throw e;
      return true;
    TransactionVO implements Serializable has also inner static classes that are not Serializable.
    EXCEPTION: At runtime we are getting exception saying that the inner classes are not serialized.
    REASON why we are invoking session bean from MDB? We found that if we invoke any service from AOBean the transaction management was successful. We are using sessionContext.setRollBackonly when an exception occurs. Tranasactions are not rolled back when any db exception occurs if we invoke business logic methods from Model layer of another NON-EJB package.
    Hope I have provided enough information!

    My concret problem is that I want to call an ejb session contained in an ejb project from a session bean in a different web project. When I include the code in my web session bean I get the error adjunted:
    - Code:
    @EJB
    private UserRemote userSessionBean;
    - Error:
    Exception Details: javax.naming.NameNotFoundException
    pac.UserRemote#pac.UserRemote not found
    Possible Source of Error:
    Class Name: com.sun.enterprise.naming.TransientContext
    File Name: TransientContext.java
    Method Name: doLookup
    Line Number: 216
    Any suggestion?

  • How to call session EJB from EP service in EP 7.0?

    Hi,
    I am trying to invoke stateless session EJB from my portal service. Both the service and EJB are deployed on the same server which is EP 7.0.
    I found [this|http://help.sap.com/saphelp_nw70/helpdata/EN/42/9ddcc9bb211d72e10000000a1553f6/frameset.htm] in SAP help and tried to implement it (added PrivateSharingReference to portalapp.xml and implemented the code), but everytime I try to lookup the session bean and cast it using P4ObjectBroker.narrow() method, I get java.lang.ClassCastException. The object found in JNDI and my portal service have different classloaders, so I suppose this is the problem, but I don't know how to handle it...
    Can anyone please help me?
    Regards,
    Tomas

    Hi Satya ,
              please go though following blog for used DC concept.
    Componentization of Webdynpro Application in CE7.1
    In netweaver 7.1 interface controler is abstract and component controller is implementing interface controller so the context data and methods have to be implemented by component controller

  • Deploying session Ejbs 1.1 in Weblogic 6

    I am deploying a session EJB 1.1 in Weblogic 6.0, this ejb contains a class that it connects to a JMS queue, this works perfectly in weblogic 5.1 but when I try to deploying in weblogic 6.1 the exception weblogic.rmi.extensions.UnknownHostIDException arises. I'd checked the weblogic.jar file, in fact this file do not contain that class, why should I do to deploy my EJB in weblogic 6.1?

    Alex,
    Are you experiencing the problem on 6.1 or 6.0? Your posting is confusing regarding which version of the server you are trying to deploy the bean on. Have you rebuilt the ejb, or are you trying to deploy the bean directly without rebuilding it from 5.1?
    Glenn Dougherty
    Developer Relations Engineer
    BEA Support
    Alex wrote:
    I am deploying a session EJB 1.1 in Weblogic 6.0, this ejb contains a class that it connects to a JMS queue, this works perfectly in weblogic 5.1 but when I try to deploying in weblogic 6.1 the exception weblogic.rmi.extensions.UnknownHostIDException arises. I'd checked the weblogic.jar file, in fact this file do not contain that class, why should I do to deploy my EJB in weblogic 6.1?

  • Calling an ejb from glassfish to weblogic server

    I'd like to be able to call a stateless session bean from a glassfishV3 server that is residing on weblogic 9.2.3. (Ejb spec 2.1 NOT 3.0 please)
    I've done this successfully from Tomcat to weblogic, but there are a few hiccups when trying this on glassfish.
    Basically what I've attempted is this:
    1.) I add these jvm properties to the glassfish startup:
    -Dorg.omg.CORBA.ORBClass=weblogic.corba.orb.ORB
    -Dorg.omg.CORBA.ORBSingletonClass=weblogic.corba.orb.ORB
    -Djavax.rmi.CORBA.PortableRemoteObjectClass=weblogic.iiop.PortableRemoteObjectDelegateImpl
    -Djavax.rmi.CORBA.UtilClass=weblogic.iiop.UtilDelegateImpl
    2.) Copy weblogic.jar, tools.jar, and webservices.jar from the weblogic/server/lib directory to the glassfish lib/ext directory
    ...glassfish won't start then because of the weblogic.jar...
    3.) Move the weblogic.jar to the WEB-INF/lib directory of my war in glassfish.
    Now I try it and get:
    (I'm skipping some of the stacktrace at the start)
    .....java.lang.IllegalAccessError: tried to access method weblogic.kernel.KernelStatus.initialized()V from class weblogic.kernel.Kernel at weblogic.kernel.Kernel.ensureInitialized......
    I'm guessing that this has to do with the "weblogic kernel" not being initialized. So now I'm stuck.
    Am I going down the wrong path?
    I've also tried these other proposed solutions:
    1.) Changing the connection properties of the InitialContext to use these properties:
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, "t3://localhost:7001");
    env.put(Context.SECURITY_PRINCIPAL, "weblogic");
    env.put(Context.SECURITY_CREDENTIALS, "weblogic");
    2.) Using RMI over IIOP instead of T3.
    None of these with any luck.
    If anyone has done this successfully I'd appreciate some insight.
    Regards,
    Eric

    I'd like to be able to call a stateless session bean from a glassfishV3 server that is residing on weblogic 9.2.3. (Ejb spec 2.1 NOT 3.0 please)
    I've done this successfully from Tomcat to weblogic, but there are a few hiccups when trying this on glassfish.
    Basically what I've attempted is this:
    1.) I add these jvm properties to the glassfish startup:
    -Dorg.omg.CORBA.ORBClass=weblogic.corba.orb.ORB
    -Dorg.omg.CORBA.ORBSingletonClass=weblogic.corba.orb.ORB
    -Djavax.rmi.CORBA.PortableRemoteObjectClass=weblogic.iiop.PortableRemoteObjectDelegateImpl
    -Djavax.rmi.CORBA.UtilClass=weblogic.iiop.UtilDelegateImpl
    2.) Copy weblogic.jar, tools.jar, and webservices.jar from the weblogic/server/lib directory to the glassfish lib/ext directory
    ...glassfish won't start then because of the weblogic.jar...
    3.) Move the weblogic.jar to the WEB-INF/lib directory of my war in glassfish.
    Now I try it and get:
    (I'm skipping some of the stacktrace at the start)
    .....java.lang.IllegalAccessError: tried to access method weblogic.kernel.KernelStatus.initialized()V from class weblogic.kernel.Kernel at weblogic.kernel.Kernel.ensureInitialized......
    I'm guessing that this has to do with the "weblogic kernel" not being initialized. So now I'm stuck.
    Am I going down the wrong path?
    I've also tried these other proposed solutions:
    1.) Changing the connection properties of the InitialContext to use these properties:
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, "t3://localhost:7001");
    env.put(Context.SECURITY_PRINCIPAL, "weblogic");
    env.put(Context.SECURITY_CREDENTIALS, "weblogic");
    2.) Using RMI over IIOP instead of T3.
    None of these with any luck.
    If anyone has done this successfully I'd appreciate some insight.
    Regards,
    Eric

  • Calling Local Stateless session bean from Spring in weblogic 10.3

    We are in the process of upgrading to Weblogic 10.3 from OC4J (OAS). We are using Spring and Stateless Session EJB 3 Local beans (Don't ask me why, it is decided before I came to the project).
    Previously (OC4J):
    -> There is no ejb-jar.xml. EJBs are configured with annotation @Stateless. No "name" or "mappedName" are defined.
    Spring POJOs access EJBs by using "EJBMODULENAME_<<EJBBeanClass>>Local" as JNDI Name. I think this strange JNDI name is what OC4J assigns when there is no explicit JNDI name defined.
    Sample Spring Bean configuration -
    <bean name="securityEJB" class="org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean" lazy-init="true">
              <property name="jndiName">
                   <value>myapp-ejb_SecurityEJBImplLocal</value>
              </property>
              <property name="resourceRef">
                   <value>false</value>
              </property>
              <property name="businessInterface">
                   <value>my.package.SecurityEJB</value>
              </property>
         </bean>
    I understand that weblogic 10.x doesn't give any global JNDI name (JNDI tree is empty) and also looked at the blog, Link: [http://m-button.blogspot.com/2008/07/reminder-on-how-to-use-ejb3-with.html]
    So far I have tried,
    1. @EJB annotation works but, I don't want to add @EJB annotations in the entire application. Since we are using Spring and EJB3, I am trying to avoid mixing them -
    2. java:comp/env is supposed to work (since it is a local session bean), but it doesn't for me.
    I haven't added weblogic-ejb-jar.xml as I don't think it is going to help, as there is no global JNDI name defined. Am I missing some thing?
    Thx

    Hi,
    if you don't want to use @EJB to inject the EJB, then you'll need declare the EJB reference in deployment descriptor.
    Here is an example copied from EJB3 spec:
    <ejb-local-ref>
    <description>
    This is a reference to the local business interface
    of an EJB 3.0 session bean that provides a payroll
    service.
    </description>
    <ejb-ref-name>ejb/Payroll</ejb-ref-name>
    <local>com.aardvark.payroll.Payroll</local>
    </ejb-local-ref>
    then you can lookup the local ejb from "java:comp/env/ejb/Payroll".

  • Deploying Session EJB From Jdev9i(Beta) - OC4J 9i

    Hi All ,
    I wanted from u , i have recently Upgraded to Oracle 9i 1.0.2.2.1 (OC4J) . Now i want a simple Step wise process as how can i deploy my Ejb (Session Bean ) into the OC4J container and Use its DataSource .
    Is it possible to deploy using Jdev 9i (Beta) .
    Can any one please help me out to point to a Documentaion , give me a breif process .
    Regards
    Asif

    Asif -
    Yes you can use Jdeveloper 9i beta to deploy your session ejb.
    Step 1 should be setting up your Data Source. In the System
    Navigator Panel expand the "Connections" listing. Right-click
    on "Database" and select "New Connection..." - follow the
    wizard's instructions to set up your data source. Step 2 should
    be setting up a connection to the OC4J container - again on the
    System Navigator Panel ->Connections->Application Servers -
    follow the instructions there. I am assuming that you have
    developed your session ejb using Jdeveloper, right click on
    your .jpr entry (or wherever suits you) and choose "New..." then
    Deployment Profiles. You need to package your session ejb into a
    jar file and I would recommend packaging your jar file into an
    ear file (it really helps for clean deployment). If you have a
    web portion, package that and make it dependent on the jar file
    just to keep it straight. Once you have these, you will be able
    to right click on the jar or web file and deploy to an ear file,
    or straight to the server. If this is what you are looking for,
    you will then just select this and away you go.
    Apparently there are some howtos here:
    http://otn.oracle.com/docs/products/jdev/howto.html
    although I don't know how good they are.
    I wasn't quite sure what you were looking for so this post is
    vague. If you have specific questions, let me know and I will
    try and answer them!
    Cheers
    Ray

  • Use another ejb in MDB

    I've got an EJB that can be used in servlet and another ejb. but when I tried to use it in a MDB(message-driven bean), it can find the home, but it will fail if invoking
    the create method on the home.
    WHY????
    Any input would be appreciated.
    Thanks

    I've got an EJB that can be used in servlet and another ejb. but when I tried to use it in a MDB(message-driven bean), it can find the home, but it will fail if invoking
    the create method on the home.
    WHY????
    Any input would be appreciated.
    Thanks

  • Call one session EJB3 from jboss to weblogic 10

    Hi everyone.
    I have a big problem. I have a session ejb3 in a weblogic server. I need start this session from jboss server.The code I used is as follows:
    Environment env = new Environment();
         env.setInitialContextFactory(weblogic.jndi.Environment.DEFAULT_INITIAL_CONTEXT_FACTORY);
         env.setProviderURL("t3://ip:7001");
         env.setSecurityPrincipal("weblogic");
         env.setSecurityCredentials("cajamar1");
         Hashtable props = env.getProperties();
    I copied all the libraries that I have been asking in the JBOSS server. In the end I managed to work but when I do the lookup on my session I get this error message.
    ++14:51:46,939 ERROR [STDERR] 09-sep-2010 14:51:46 weblogic.utils.classloaders.ClassPreProcessor$ClassPreProcessorSupport preProcess++
    ++ADVERTENCIA: Error pre-processing class com.gh.conn.GHBackEndConnectorInterface with weblogic.ejb.container.deployer.RemoteBizIntfClas++
    ++sPreProcessor@b1c3bc3'++
    ++java.lang.NoSuchMethodError: <init>++
    ++at weblogic.ejb.container.deployer.RemoteBizIntfClassPreProcessor.preProcess(RemoteBizIntfClassPreProcessor.java:52)++
    ++at weblogic.utils.classloaders.ClassPreProcessor$ClassPreProcessorSupport.preProcess(ClassPreProcessor.java:102)++
    ++at weblogic.utils.classloaders.GenericClassLoader.doPreProcess(GenericClassLoader.java:341)++
    ++at weblogic.ejb.container.deployer.RemoteBizIntfClassLoader.enhanceClass(RemoteBizIntfClassLoader.java:143)++
    ++at weblogic.ejb.container.deployer.RemoteBizIntfClassLoader.loadClass(RemoteBizIntfClassLoader.java:129)++
    ++at weblogic.ejb.container.internal.RemoteBusinessIntfGenerator.generateRemoteInterface(RemoteBusinessIntfGenerator.java:67)++
    ++at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.readObject(RemoteBusinessIntfProxy.java:234)++
    ++at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)++
    ++at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)++
    ++at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)++
    ++at java.lang.reflect.Method.invoke(Method.java:585)++
    ++at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)++
    ++at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)++
    ++at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)++
    ++at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)++
    ++at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)++
    ++at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)++
    ++at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)++
    ++at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)++
    ++at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)++
    ++at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:197)++
    Any help on the issue. Thanks for all.

    Hi,
    Please make sure that you have generated the Client Side Artifacts of your EJB3.0 App and Placed then at the JBoss side (Client side). Please refert to ": *http://weblogic-wonders.com/weblogic/2010/04/02/generating-ejb3-clientjar/*
    Also make sure that you have "weblogic.jar" file at Cleint Application Side.
    Thanks
    Jay SenSharma

  • Problem on Query from deployed application WEBLOGIC 11g

    HI all, i got an application developed on Jdeveloper 11g when i run in the Integrated weblogic server it runs perfect querying all the data.
    but my problem is when i deployed on Web Logic Server 11gR1 it doesn't query anything of my Oracle 10G database what's wrong????
    The deployment is correct and i can access my aplication on the browser, my webservices are java based but i don't think thats a mistake
    below is the log presented on the screen Start Admin Server:
    Error capaMedia.jsp HTTP transport error: java.net.ConnectException: Tried all:
    '1' addresses, but could not connect over HTTP to server: 'localhost', port: '71
    01'com.sun.xml.ws.client.ClientTransportException: HTTP transport error: java.ne
    t.ConnectException: Tried all: '1' addresses, but could not connect over HTTP to
    server: 'localhost', port: '7101'
    at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(Ht
    tpClientTransport.java:138)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTr
    ansportPipe.java:187)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest
    (HttpTransportPipe.java:124)
    at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(Deferre
    dTransportPipe.java:121)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:866)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:815)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:778)
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:680)
    at com.sun.xml.ws.client.Stub.process(Stub.java:272)
    at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:153)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.
    java:115)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.
    java:95)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
    at $Proxy88.cargarSelectEspecifico(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(Client
    InstanceInvocationHandler.java:84)
    at $Proxy89.cargarSelectEspecifico(Unknown Source)
    at jsp_servlet.__capamedia.capaMedia(__capamedia.java:77)
    at jsp_servlet.__capamedia._jspService(__capamedia.java:181)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
    (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
    tyHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:300)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(Servlet
    StubImpl.java:416)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:326)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:183)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.wrapRun(WebAppServletContext.java:3717)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: java.net.ConnectException: Tried all: '1' addresses, but could not co
    nnect over HTTP to server: 'localhost', port: '7101'
    at weblogic.net.http.HttpClient.openServer(HttpClient.java:333)
    at weblogic.net.http.HttpClient.openServer(HttpClient.java:425)
    at weblogic.net.http.HttpClient.New(HttpClient.java:252)
    at weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:18
    9)
    at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(Ht
    tpClientTransport.java:136)
    ... 37 more
    com.sun.xml.ws.client.ClientTransportException: HTTP transport error: java.net.C
    onnectException: Tried all: '1' addresses, but could not connect over HTTP to se
    rver: 'localhost', port: '7101'
    at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(Ht
    tpClientTransport.java:138)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTr
    ansportPipe.java:187)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest
    (HttpTransportPipe.java:124)
    at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(Deferre
    dTransportPipe.java:121)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:866)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:815)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:778)
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:680)
    at com.sun.xml.ws.client.Stub.process(Stub.java:272)
    at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:153)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.
    java:115)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.
    java:95)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
    at $Proxy87.cargarSelectEspecifico(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(Client
    InstanceInvocationHandler.java:84)
    at $Proxy89.cargarSelectEspecifico(Unknown Source)
    at jsp_servlet.__capamedia.capaMedia(__capamedia.java:77)
    at jsp_servlet.__capamedia._jspService(__capamedia.java:181)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
    (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
    tyHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:300)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(Servlet
    StubImpl.java:416)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:326)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:183)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.wrapRun(WebAppServletContext.java:3717)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: java.net.ConnectException: Tried all: '1' addresses, but could not co
    nnect over HTTP to server: 'localhost', port: '7101'
    at weblogic.net.http.HttpClient.openServer(HttpClient.java:333)
    at weblogic.net.http.HttpClient.openServer(HttpClient.java:425)
    at weblogic.net.http.HttpClient.New(HttpClient.java:252)
    at weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:18
    9)
    at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(Ht
    tpClientTransport.java:136)
    ... 37 more
    thanks your help any light will be apreciated
    Thanks for your time!!!
    Edited by: user3095203 on 24-mar-2011 12:50

    capaMedia.jsp
    HTTP transport error: java.net.ConnectException: Tried all:
    '1' addresses, but could not connect over HTTP to server: *'localhost', port: '7101*
    I believe when you are deploying the application through the Jdev on the Integrated Server , the server is running on the same machine with the address and port as : localhost and 7101.
    However when you are using the same application to deploy on Web Logic Server 11gR1 which is not integrated server, then you much check what is the hostname and port of the Server from the config.xml file and make change in the capaMedia.jsp accordingly.
    thanks,
    Sandeep

  • Oracle.oc4j.rmi.OracleRemoteException while calling EJB from MDB

    Hi All,
    From Client am sending a request to a In_queue, MDB picks from that queue and sends to EJB. EJB processes it and sends back to the MDB and MDB to Client. This works fine for 20 requests. When i increase to 30 am getting EXCEPTION : oracle.oc4j.rmi.OracleRemoteException: An exception occurred during transaction completion: ; nested exception is: javax.transaction.RollbackException: Timed out
    I have increased the transaction-timeout to "999999" in orion-ejb-jar.xml. Still i get the same error. Can anybody please help me on this.
    Thank you in advance

    Hi all,
    Got the way to solve this. I increased the time of transaction-timeout to "100" in transaction-manager.xml. by default it is "30"

  • Use an EJB from a C++ application

    Hello,
    How could i call an EJB which lives in a JBoss application server from a C++ application which runs on a Windows client ?
    Cheers.
    Stefano

    Greetings,
    Hello,
    How could i call an EJB which lives in a JBoss
    application server from a C++ application which runs
    on a Windows client ?Three or four steps must be completed to accomplish this, the details of all of which are beyond the "scope" of this forum. In summary, however, they are:
    1. Configure JBoss 3 for RMI-IIOP communication - the quick solution is to start the server in '-all' mode.
    2. Generate IDL stubs for your beans. Use 'rmic -idl ...'.
    3. Create communication stubs for and integrate them into your C++ application.
    4. Of course, if the application doesn't already have CORBA support it will have to be integrated as well.
    That's the quick "1, 2[, er... 3, 4]". :)
    Cheers.
    StefanoRegards,
    Tony "Vee Schade" Cook

  • Inject EJB using @EJB in Servlet Filter on Weblogic 11g

    Hi All,
    I want to inject the EJB (Local interface) into the Servlet Filter and the EAR is deployed on Weblogic 11g.
    My question is:
    Shall the @EJB Annotation work on Weblogic 11g or it will be ignored in case of Servlet or Servlet Filter?
    OR
    I have to do look up as below and mention the references in web.xml and weblogic xml file:
    I know below code should be used when you have remote interface.
    Hashtable env = new Hashtable();
    env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
    Context ctx = new InitialContext( env );
    ctx.lookup( "myejb" );
    Thanks

    Hi,
    It should work in 11g.
    Regards,
    Kal

  • WebLogic 11g EAR EJB Classpath and class loaders

    All,
    I have been having issues migrating Spring based EJB applications from OC4J to WebLogic 11g (10.3.1). I have been in communication with Oracle who has suggested a work around however I am keen to see if anyone else can suggest a solution.
    The application is dependant on stateless session EJB beans that communicate with a Spring managed service tier to perform the business logic and database access. PitchFork is used to inject the Spring managers into the EJB’s using the spring-ejb-jar.xml configuration file. Note originally I was using the SpringBeanAutowiringInterceptor however I could not get this to work. See WebLogic 11g and Spring beens injected into EJB for details.
    When the application is deployed packaging all the dependant jars within the APP-INF\lib folder I get a verity of errors from the following InvalidClassException, NoSuchMethodError, AbstractMethodError and IllegalArgumentException. I am using Spring 2.5.3 to match the supported WebLogic version. Note within the EAR application.xml the library-directory is set to APP-INF/lib. The issue appears to be Spring, PitchFork, commons-logging and aspectj libraries are being loaded form WebLogic and do not have visibility on jars within the application or have been modified when bundled for WebLogic. An example of this is the PitchFork jar within WebLogic has been changed excluding the spi package resulting in java.lang.ClassNotFoundException: org.springframework.jee.spi.PitchforkUtilsImpl errors.
    Moving the jars to the domain library path does not resolve any of the issues. I have been unable to successfully deploy the application picking up the application jars using the prefer-application-packages configuration.
    Oracle has advised me to deploy the libraries into the WebLogic system classpath by modifying the startWebLogic command to load the libraries into the classpath. I am concerned that modifying the system classpath will result in an unstable WebLogic server as I will be replacing modified jar files packages with WebLogic (such as PitchFork). This will also limit the applications that can be deployed within the server as each application must use the same libraries and versions (as the application ibraries are leing ignored).
    Has anyone else hit this issue and corrected it? Can anyone think of an alternative solution?
    Regards
    Neil

    Hi,
    I am in the process of updating the tracking bug# 331569 with copies of the eclipse EAR/WAR projects and the EAR for these scenarios. Here are some details on how I got past the 2nd CCE on the org.eclipse.persistence.jpa.PersistenceProvider class (not the javax one)
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=331569
    Essentially an SE persistence unit running both JPA 2.0 api and the 2.0 XSD schema work fine. I will next retest the EE case with variations of the 3 types of injection on the SSB or Servlet.
    Update: There are 3 (possibly 4) issues here (all of these may become obsolete when the next WLS version ships)Initially I got the same 2.0 schema error and the ClassCastException on org.eclipse.persistence.jpa.PersistenceProvider
    It turns out that my import of the 2 eclipse projects from my bug # 296271 for WebLogic 10.3.2.0 lost their facets(specifically the dynamic web facet) because I associated them with a different WebLogic 10.3.3.0. - this caused the CCE I was experiencing like Sri.
    Anyways, after creating an EAR/Web project combination from scratch in eclipse associated with the 10.3.3.0 instance - I predeployed/deployed/ran fine - even with the 2.0 schema - in SE bootstrap mode (no EE yet).
    Reproduction Procedure:
    redoing project from scratch as I noticed that the war was not at the root of the ear - it was a jar in the app-inf/lib dir - my imported eclipse project was not referenced correctly as a web module facet- create empty EAR and WAR project with references
    - download and open my EAR and WAR project code from bug # 296271
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=296271
    - do essentially all the steps in the page below (I paraphrase for re-verification)
    http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#DI_1.1:_Alternative_3:_Application_Level_Shared_Library_-InUse
    - copy applicationService, entity and FrontController servlet code into new projects
    - create persistence.xml and MANIFEST.MF manifest in src\META-INF
    - update manifest
    Class-Path: APP-INF/lib/eclipselink.jar
    APP-INF/lib/javax.persistence_2.0.0.v200911041116.jar
    - copy both javax.persistence 2.0 and eclipselink 2.x jars to APP-INF/lib
    - change ordering of WebLogic library modules classpath reference (javax.persistence 1.0) to ear reference (2.0 version)
    - update web.xml with servlet tags
    - update weblogic.xml with new context root
    - make the persistence unit name the same in persistence.xml and ApplicationManagedService
    - update weblogic-application.xml with prefer-application-packages overrides
    <wls:prefer-application-packages>
    <wls:package-name>javax.persistence.*</wls:package-name>
    <wls:package-name>org.eclipse.persistence.*</wls:package-name>
    </wls:prefer-application-packages>
    - enable server redirect logging
    <!-- new for 10.3.3.0 http://wiki.eclipse.org/EclipseLink/Examples/JPA/Logging#Server_Logging -->
    <property name="eclipselink.logging.logger" value="DefaultLogger"/>
    - start WebLogic 10.3.3.0
    - deploy (run on) server from eclipse or export ear to auto deploy directory
    1) JPA 2.0 XSD usage on 10.3.3.0
    - I reproduced this issue with a bad EAR
    - was able to use the 2.0 schema within the WAR-only application managed EAR
    persistence.xml<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
    <!-- persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"-->
    <persistence-unit name="example2" transaction-type="JTA">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>localJTA</jta-data-source>
    <class>org.eclipse.persistence.example.business.Cell</class>
    <shared-cache-mode>NONE</shared-cache-mode>
    <properties>
    <property name="eclipselink.target-server" value="WebLogic_10"/>
    <property name="eclipselink.logging.level" value="FINEST"/>
    <property name="eclipselink.target-database" value="Derby"/>
    <!-- new for 10.3.3.0 http://wiki.eclipse.org/EclipseLink/Examples/JPA/Logging#Server_Logging -->
    <property name="eclipselink.logging.logger" value="DefaultLogger"/>
    <!-- property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/>
    <property name="javax.persistence.jdbc.url" value="jdbc:derby://127.0.0.1:1527/dataparallel;create=true"/>
    <property name="javax.persistence.jdbc.user" value="APP"/>
    <property name="javax.persistence.jdbc.password" value="APP"/-->
    <!-- turn off DDL generation after the model is stable -->
    <!-- property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
    <property name="eclipselink.ddl-generation.output-mode" value="both"/-->
    </properties>
    </persistence-unit>
    </persistence>
    2) CCE on JPA provider implementation class
    Error instantiating the Persistence Provider class org.eclipse.persistence.jpa.PersistenceProvider of the PersistenceUnit example2: java.lang.ClassCastException: org.eclipse.persistence.jpa.PersistenceProvider
    - I reproduced and fixed this one (was Eclipse project facet issue) - EAR was wrong
    - was able to run JPA 2.0 code fine on an SE PU (predeploy/deploy together)
    - EE injection should not work but I will post an example EAR anyway
    log[EL Example]: enterprise: JPA 2.0 Metamodel: MetamodelImpl@56287508 [ 3 Types: , 1 ManagedTypes: , 1 EntityTypes: , 0 MappedSuperclassTypes: , 0 EmbeddableTypes: ]
    3) CCE on JPA spec interface class
    - I could not reproduce this one
    Re: WebLogic 11g EAR EJB Classpath and class loaders
    Error processing persistence unit PT of module pt: Error instantiating the Persistence Provider class org.eclipse.persistence.jpa.PersistenceProvider of the PersistenceUnit PT: java.lang.ClassCastException: org.eclipse.persistence.jpa.PersistenceProvider cannot be cast to javax.persistence.spi.PersistenceProvider
    4) CCE on fallback Kodo JPA provider (if an invalid say 2.1 JPA XSD schema is referenced)
    java.lang.ClassCastException: kodo.persistence.PersistenceProviderImpl
    at javax.persistence.Persistence.findAllProviders(Persistence.java:186)
    java.lang.NoSuchMethodError: javax/persistence/EntityManager.getMetamodel()Ljavax/persistence/metamodel/Metamodel;
    - reproduced by using the 1.0 javax.persistence jar (but named as the 2.0 one in APP-INF/lib)
    - fixed by using either the 1.0 or 2.0 JPA XSD schema and using the correct 2.0 spec jar
    thank you
    /michael

  • Porting EJB 3 MDB from OC4J to WLS

    Posting this again since my last post didn't seem to take.
    I get the following three deployment error messages when attempting to deploy an application to WebLogic Server 10.3 technical preview. The problem is centered around my deployment of an EJB 3 message driven bean.
    1. An error occurred during activation of changes, please see the log for details.
    2. Exception preparing module: EJBModule(EngineEjb.jar) Unable to deploy EJB: Requestor from EngineEjb.jar: [EJB:011026]The EJB container failed while creating the java:/comp/env namespace for this EJB deployment. weblogic.deployment.EnvironmentException: [EJB:010176]The resource-env-ref 'jms/demoQueue' declared in the ejb-jar.xml descriptor or annotation has no JNDI name mapped to it. The resource-ref must be mapped to a JNDI name using the resource-description element of the weblogic-ejb-jar.xml descriptor or corresponding annotation. at weblogic.ejb.container.deployer.EnvironmentBuilder.addResourceEnvReferences(EnvironmentBuilder.java:641) at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentContext(EJBDeployer.java:246) at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentFor(EJBDeployer.java:1013) at weblogic.ejb.container.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:907) at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1211) at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:387) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:381) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191) at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:16) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:197) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:89) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:723) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1190) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:517) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    3. Substituted for missing class [EJB - 11026]The EJB container failed while creating the java:/comp/env namespace for this EJB deployment. weblogic.deployment.EnvironmentException: [EJB:010176]The resource-env-ref 'jms/demoQueue' declared in the ejb-jar.xml descriptor or annotation has no JNDI name mapped to it. The resource-ref must be mapped to a JNDI name using the resource-description element of the weblogic-ejb-jar.xml descriptor or corresponding annotation.
    My MDB uses an annotation like the following:
    @MessageDriven(mappedName = "jms/demoQueue", name = "MyMDB",
    activationConfig =
    @ActivationConfigProperty(propertyName = "destinationType",
    propertyValue = "javax.jms.Queue")
    @ActivationConfigProperty(propertyName = "messageSelector", propertyValue =
    "RECIPIENT = 'MyRecipient'")
    Earlier, I did create a JMS Module named demoQueue with the following resources:
    Name Type JNDI Name
    testQueue Queue jms/demoQueue
    ConnectionFactory-0 Connection Factory jms/QueueConnectionFactory
    Any suggestions to fix the WLS deployment error?
    For continuing compatibility with my OC4J deployment, I would like to continue using a connection factory with the following JNDI name "jms/QueueConnectionFactory" shown above.
    So I plan to add the following properties to the @MessageDriven annotation above. These are needed to continue working with our OC4J deployment. However, my primary concern is to get this MDB working with WLS. Does this strategy seem reasonable for allowing deployment to both OC4J and WLS?
    @ActivationConfigProperty(propertyName = "connectionFactoryJndiName",
    propertyValue =
    "jms/QueueConnectionFactory") ,
    @ActivationConfigProperty(propertyName = "destinationName", propertyValue =
    "jms/demoQueue")
    Thanks,
    Travis

    Travis, you pose a very good question. If I understand your goal, you would like to use code that compiles and works in OC4J and WLS. For example, you want to use javax.ejb.MessageDriven instead of weblogic.ejbgen.MessageDriven.
    Using something like mappedName as it is referred to here allows you specify the JNDI name in WLS if it is not defined elsewhere, but it appears to be specific to the WLS implementation.
    I've seen several other questions posed about finding all of the available ActivationConfigProperty name / value pairs and I have been unable to find it myself.
    I tried several permutations of annotations, and I can't figure out why something like this would even work, but it does. The mapped name is my JNDI name, but I never specify that it is a javax.jms.Queue or which connection factory to use. How does WLS figure that out?
    @MessageDriven(     
         mappedName = "exampleQueue", name = "HelloWorldMDB"
    public class HelloWorldMDB implements MessageListener {
         @Override
         @TransactionAttribute(value = javax.ejb.TransactionAttributeType.REQUIRED)
         public void onMessage(Message message) {
              System.out.println( "received message " + message );
    }This is a good question for support as the documentation seems to be incomplete here.

Maybe you are looking for