Creating and deploying ejb 3.0 session bean with annotated pojo

I try to create and deploy a EJB 3.0 stateless session bean (and associated webservice) with the following steps:
1) Create Interface "Repository"
package de.xxx.config;
import java.rmi.Remote;
import java.rmi.RemoteException;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService
public interface Repository extends Remote {
     @WebMethod(operationName = "findCampaignByChannel")
     public String findCampaignByChannel(String channelName) throws RemoteException;
2) create dummy "RepositoryImpl"
package de.xxx.config;
import java.rmi.RemoteException;
import javax.ejb.Stateless;
import javax.jws.WebService;
@WebService(endpointInterface="de.xxx.config.Repository")
@Stateless
public class RepositoryImpl implements Repository {
     public String findCampaignByChannel(String channelName) throws RemoteException {
          return null;
3) The two class files are packaged into a jar without any further descriptors
4) The jar is deployed with admin_client into the oc4j instance using the commands:
-deploy -file <jarfile> -deploymentName <name>
Result:
An ear was constructed and started but no session bean or webservice is found (using the console). But according to to the docs a jar file without a ejb-jar.xml should be recognized as a EJB 3.0 ejb-jar file and the necessary steps to create session bean and expose webservice should be done automatically.
My question:
Which step do i miss here ?
Tools used:
Eclipse 3.2 for the jar file
SoaSuite 10.1.3.1 for oc4j

another strange problem.
i have an APplication server added ( JBOSS ).
when i create deployment profile (EAR ) application server is showed in the ComboBox .
But when i create Java Test Client for some EJB and when i check " Connect Remote Application server" there is 2 comboboxes
J2EE Application
App Server Connection.
first combo is ok there is EJB applicaiton
Secound is empty .. but i Have App Server.
Another think is that when i create EJB 3.0 its BAD to see J2EE app it must be J EE 5 app or just Java EE app

Similar Messages

  • Cannot deploy a EJB 3.0 Session bean to the OAS 10.1.3.4

    Hi All,
    I am unable to deploy a EJB 3.0 Session bean with no deployment descriptors to OAS 10.1.3.4 App server.This Session bean is also exposed as a web service using annotations. I am able to deploy this bean to a standalone oc4j 10.1.3.x containers and test it successfully.
    i have written a simple stateless session bean ( exposed as webservice) and every bean is having issues with deployment having the same exception stated below
    Can some one please help as i need to deploy this urgently.
    below is the session bean code:
    import javax.ejb.Stateless;
    @Stateless(name="SiebelQuoteEJB")
    public class SiebelQuoteEJBBean implements SiebelQuoteEJBLocal,
    SiebelQuoteEJBWebService {
    public SiebelQuoteEJBBean() {
    public String publishMessage(String message,String type) throws java.rmi.RemoteException {
    client.publishMessage(message,type);
    return "SUCCESS";
    Below is the error while deploying:
    11/01/06 15:03:49 WARNING: Application.setConfig Application: javasso is in failed state as initialization failed.
    java.lang.NullPointerException
    11/01/06 15:03:50 WARNING: Application.setConfig Application: SiebelQuoteEJB is in failed state as initialization failed.
    java.lang.InstantiationException: Error initializing ejb-modules: null Error parsing application-server config file: null
    11/01/06 15:03:50 java.lang.NullPointerException
    at com.evermind.server.ObjectReferenceCleaner.cleanupApplicationLogLevels(ObjectReferenceCleaner.java:166)
    at com.evermind.server.ObjectReferenceCleaner.loaderDestroyed(ObjectReferenceCleaner.java:88)
    at oracle.classloader.EventDispatcher.loaderDestroyed(EventDispatcher.java:248)
    at oracle.classloader.PolicyClassLoader.close(PolicyClassLoader.java:1113)
    at oracle.classloader.PolicyClassLoader.close(PolicyClassLoader.java:1041)
    at com.evermind.server.ApplicationStateRunning.destroyClassLoaders(ApplicationStateRunning.java:1171)
    at com.evermind.server.Application.stateCleanUp(Application.java:3635)
    at com.evermind.server.Application.setConfig(Application.java:506)
    at com.evermind.server.Application.setConfig(Application.java:355)
    at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1895)
    at com.evermind.server.ApplicationServer.initializeDeployedApplications(ApplicationServer.java:1651)
    at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1034)
    at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131)
    at java.lang.Thread.run(Thread.java:736)

    which jdk version? Had this with 1.6 and had to install an up-to-date jdbc.

  • How to lookup a EJB 3.0 session bean which is deployed in WebLogic 10.3

    Now Jdeveloper 11.1.1, is giving WebLogic server 10.3.
    With internal WebLogic server, when I created a Sample client, it generated code as:
    private static Context getInitialContext() throws NamingException {
        Hashtable env = new Hashtable();
        // WebLogic Server 10.x connection details
        env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
        env.put(Context.PROVIDER_URL, "t3://127.0.0.1:7101");
        return new InitialContext( env );
    public static void main(String [] args) {
        try {
            final Context context = getInitialContext();
            DefaultSession defaultSession = (DefaultSession)context.lookup("property-DefaultSession#com.vs.property.model.session.DefaultSession");
        } catch (Exception ex) {
    }How to update the above code to lookup the EJB 3.0 session beans with an external WebLogic server 10.3?
    Is there any documentation available on how to install weblogic, troubleshoot, debug, WebLogic server 10.3?
    regds
    -raju

    Raju,
    Hi, to start, here is a tutorial on a quickstart web application using an EJB 3.0 stateless session bean that fronts a container managed EclipseLink JPA entity manager on WebLogic 10.3, you will find references there to other general WebLogic documentation.
    [http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial]
    using @EJB injection on the client instead of a JNDI lookup as below
    [http://edocs.bea.com/wls/docs103/ejb30/annotations.html#wp1417411]
    1) in your second env.put I noticed that your t3 port is 7101, I usually use the default 7001 - but It looks like this port is valid for the JDeveloper embedded version of WebLogic server runs - just verify that it matches the port of your server.
    2) your name#qualified-name lookup looks ok. Verify that the jndi-name element is set in your weblogic-ejb-jar.xml for non injection clients like the following
    &lt;weblogic-ejb-jar&gt;
    &lt;weblogic-enterprise-bean&gt;
    &lt;ejb-name&gt;ApplicationService&lt;/ejb-name&gt;
    &lt;jndi-name&gt;ApplicationService&lt;/jndi-name&gt;
    3) as a test outside of your application - launch the WebLogic admin console and goto the testing tab of your bean in [Home &gt; Summary of Deployments &gt; "application" &gt; "session bean name"
    thank you
    /michael : http://www.eclipselink.org                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How create  EJB 2.1 Stateful Session Bean in a EJB 3.0 Session Bean

    Hi All,
    We have been developing on EJB 2.1. We are now adding a module on EJB 3.0.
    How can we "create" a stateful session bean with create method signature similar to create(String id)?
    We have tried
    // this is the remote interface
    @EJB AddressBean abean;
    But not working
    Any help will be appreciated.

    There is no explicit create() call for EJB 3.0 session beans. It doesn't really matter though
    since you can accomplish the same thing by defining your own business method to act
    as an initializer for whatever state you'd like. E.g.
    @Remote
    public interface FooInterface {
    public void initialize(String id);
    // ... other business methods
    @EJB FooInterface fooRef;
    fooRef.initialize("foo");
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • EJB 2.1 session bean calling EJB 3 session bean?

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

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

  • How can i design a EJB application using session Beans?

    Hello,
    I am designing a Find application using EJB. Here a user is prompted a search page, where he can enter the search criteria's. Then on click of submit, the query is formed at the server side depending on what criteria's were selected. Then a jdbc query is performed and the results are returned back to the user. Here no session is maintained for the users. Can anyone suggest me how to design this application using EJB. Should i use entity beans for this or session beans will suffice? Should the jdbc query be performed in the bean itself or should it be outside in a helper class? Please kindlu suggest me the design for this application...
    Regards,
    Subbu

    Hi,
    First of all, I'm unable to figure out why you need to use EJB for this scenario. You can write a helper class to frame and execute the query.
    If you really want to use EJB, then I suggest you use a stateless Session Bean with transaction attribute as TX_NOT_SUPPORTED. From the session bean, you can call the helper class. But, by avoiding the session bean, you can eliminate remote calls, thus improving your performance. Also, check if the database & the db driver you are using supports sql caching.
    Regards,
    Raj.

  • How to create and deploy a simple jstl applicaton in weblogic 10.3.3

    How to create and deploy a simple jstl applicaton in weblogic 10.3.3

    1) Since JSTL libraries are provided as Web application libraries, they must be deployed before the Web application that is using JSTL functionality is deployed. The libraries can be deployed using the Administration Console or with the command-line weblogic.Deployer tool.
    Here’s an example of deploying a JSTL 1.2 library using the weblogic.Deployer command-line:
    java weblogic.Deployer -adminurl t3://localhost:7001
    -user weblogic -password weblogic
    -deploy -library
    d:/beahome/wlserver_10.3/common/deployable-libraries/jstl-1.2.war
    This command deploys the JSTL 1.2 library using the default library-name, specification-version and implementation-version defined by the MANIFEST.MF in the library.
    After a library is deployed, the extension-name, specification-version and implementation-version of the library can be found in Administration console. This information can also be found in the MANIFEST.MF file of the library WAR file.
    For more information on deploying a Web module refer below URL
    http://docs.oracle.com/cd/E15051_01/wls/docs103/deployment/deployunits.html
    2) To reference a JSF or JSTL library, a standard web application can define a <library-ref> descriptor in the application’s weblogic.xml file. Here is an example:
    <library-ref>
    <library-name>jsf</library-name>
    <specification-version>1.2</specification-version>
    <implementation-version>1.2.0</implementation-version>
    <exact-match>false</exact-match>
    </library-ref>
    For more information on referencing a Web application library refer below URL
    http://docs.oracle.com/cd/E15051_01/wls/docs103/programming/libraries.html
    3) Create a sample JSP in your application and JSP should look as shown below
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <html>
    <head>
    <title>TestJSTL</title>
    </head>
    <body>
    <c:set var="topic" value="JSTL" />     
    <c:out value="${topic}" />
    </body>
    </html>
    4) Create WAR and deploy and test.
    Edited by: Murali Veligeti on Jul 26, 2012 9:00 AM

  • How to build and deploy ejb in j2ee!!

    HI there!!
    Newbie Question. I know this is very rude to ask a question "How to build and deploy ejb in j2ee server??", but please help me. I just learned some servlets worked with tomcat. Now I want to learn more about ejb, could anyone suggest me any online tutorial or book where in it is explained step by step builiding and deploying ejb's in j2ee server, please help me. I would be grateful to you.

    A good book to start with is Enterprise JavaBeans by Monson-Haefel (O'Reilly press). It covers deployment of EJBs on J2EE servers. Also check out sites specific to your server, sometimes they have specific requirements (like Weblogic).

  • How to Create and Deploy Web Services Using Oracle 9i JDeveloper

    Hi,
    My Question is how to create and deploy Web Services using Oracle 9i JDeveloper.Anybody please give me a detailed Reply.Please Reply to [email protected]
    Hopr to Hear From you,
    Regards,
    G Sreekumar

    You could use datasources. You should do this in your BC4J Configuration. Then when deploying your applicaiton use the command -installDataSource (from admin.jar) to create the right datasource.
    You could probably use the name of your connection + "DS" so you can also use it locally in JDeveloper as JDev seesm to create this automaticly for your Connections.

  • Can Visual Composer applications only be created and deployed on EP?

    We are working with Visual Composer on our Enterprise Portal box and I like it a lot. However, our company is investigating Microsoft Sharepoint as a possible candidate for Portals. This could mean that we are not going to use EP. I would like to know if it is possible to create and deploy Visual Composer applications if we don't have EP installed.
    As VC is dedicated SAP technology I don't think this can work but I want to be be 100 % sure. Maybe there are other ways to run VC in a sharepoint portal that I don't know off?
    kr
    Angelique Heutinck

    Hi Angelique,
    You need the SAP Enterprise Portal to run Visual Composer.
    In the VC you create pages and iviews that need the enterprise portal services to run.
    "... Visual Composer operates on top of the SAP NetWeaver portal, utilizing the portal’s connector-framework interfaces to enable access to a range of data services, including SAP and third-party enterprise systems. In addition to accessing mySAP ERP systems, users can access SAP Business Warehouse and any open/JDBC stored procedures..."
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/42/ef8270370a1bcae10000000a11466f/frameset.htm
    Best regards,
    José

  • Programmatically create and deploy process definition

    1. It seems that PAPI does not support process definition creation and deployment. We need to programmatically create and deploy process definitions, what should we use?
    2. Is it possible to programmatically add variable definitions to a process instance? We have an external program that creates the process instance but sometimes the process instance may need to add some additional variables.
    Thank you for your help,
    shirley

    Hi Shirley,
    You're right PAPI wasn't intended to deploy processes, however, you can deploy processes automatically using ANT.
    You'd need to republish and redeploy (again using ANT) to add additional variables to a deployed process. Simplest thing to do would be to add attributes to an existing BPM Object. If you just added a new variable, you'd need to change argument mapping troughout the project.
    hth,
    Dan

  • What's the difference between the LRU and NRU strategy for stateful session bean?

    Hi,
    Does anybody know the difference between the LRU and NRU strategy for
    stateful session bean?
    Thanks,
    Levi

    LRU makes the assumption that the bean that has been used a lot recently is
    likely to be used again.
    NRU simply removes the beans that have not been used for a stipulated amount
    of time.
    The algorithm for the LRU is much more complicated than the NRU. I think BEA
    recommends LRU for better performance and NRU when you have memory
    constraints.
    "levi" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    Does anybody know the difference between the LRU and NRU strategy for
    stateful session bean?
    Thanks,
    Levi

  • Create and deploy sda file in NWDS 7.0

    Hi,
    Could u pls tel me how to import , create and deploy sda file.
    I hav got an .sda file, i need to import ,made changes to that nd deploy it again in NWDS 7.0
    help me by providing some links or turorials...
    thanks
    raji

    Hi,
    As i told you earlier, there is no option to import a .sda file in NWDS 7.0.
    So you have to follow the approach which i mentioned in your earlier thread.
    https://www.sdn.sap.com/irj/scn/profile?userid=3978830
    That is the only way which you can do.
    Regards,
    Saleem

  • Looking up a EJB 3.0 Session Bean in JSP Scriptlet

    Hello There,
    Somebody please enlighten me. I have a bean named
    a.b.MyBeanextending local interface
    a.b.MyLocalNow I want to use this bean in a JSP (Maybe just for fun, but the point is I am not using resource injection).
    So the question is, What is the default JNDI name of the session bean with only a local interface, which I can use to look-it-up in jsp scriptlet code.
    Cheers. Am trying for last hour, nothings turned up
    Bye

    It's the classname under the initial context or a.b.MyLocal in your case.
         <% MyLocal intf = null;
              try {
                   InitialContext context = new InitialContext();
                   intf = (MyLocal) context.lookup(MyLocal.class.getName());
              } catch (Exception ex) {
                   System.err.println("Error looking up MyLocal: " + ex.getMessage());
              } %>

  • Example of using session bean with webservices

    Hello,
    I am working with netbeans 5.5 (with JAX-WS 2.0 library) and using Tomcat.
    I have created webservices and everything is working well so far. However, each webservice is making a connection to my database.
    I would like to use a session bean so that I make the connection only once (at the begining of the client session for example) and store it into my session bean.
    I am a newbie in those things, I search on the Web and on this forum some code examples. The only thing I have found is this article http://weblogs.java.net/blog/ramapulavarthi/archive/2006/06/maintaining_ses.html
    When I tried this, the session doesn't seem to work at all : I get the same result (counter=1) twice.
    Does anybody have a complete example of how to use a session with webservices please?
    Thanks a lot!

    Sorry, I was not very clear in my last message.
    I need all my webservices to share the same bean during one user session.
    Then, if a page calls 2 different web services, only 1 database connection is made instead of 2. And if the user opens other pages which call other webservices, they will use the connection kept into the session bean.
    Anyway, I tried to do like it is said in your website but I can not build my project. I have an error : java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/.../build/web/WEB-INF/lib/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. I do not understand because I have downloaded the jax-ws 2.1.1 api and no other libraries are imported in my project. :-(
    I wonder if it is not related to netbeans...

Maybe you are looking for

  • HT5622 looking to take off my photo's off my phone and store them on my computer, how does this work with the new update on a iphone 3g

    trying to take photos off my 3G since the upgrade,,,   I am not seeing the popup to take photo's off and store them on my computer

  • HELP NEEDED - iTunes.exe -Corrupt File

    I am getting this error message everytime I plug in my iPod to update thru iTunes. iTunes.exe - Corrupt File The file or directory/iPod_ControliTunes/TempFile is corrupt & unreadable. Please run the Chkdsk utility. So my question is....how do I backu

  • Flash scrollbars - faster when you press

    Hi, I'm trying to create a scrolling timeline.  I want an arrow on each side that when you rollover it, it scrolls the masked area, and when you press the arrows, it scrolls faster.  Does anyone know of a flash component that already exists that does

  • Printing problem in the Sp01 t.code

    Hi,    I am working on cheque printout using fbz5 t.code. In the Sp01 t.code .when i select and  click the print button..It is printing like this Spool no          Type        Date            Time         Status        Pages        Title.....But i wa

  • Validating one field based on another

    Hi. I have freshly started with ABAP programming.Inside an RFC--OUTBOUND_SHIPLIST I need to validate a field called "shipment number" which is TKNUM in R/3 in side table shipment list so that only those shipment number(TKNUM) are displayed for which