Exception in JCo used in EJB (WebService)

Hi,
I'm trying to create a webservice of an EJB that has JCo code to call an RFC.
The EJB has no syntactical errors. The WebService generation as well as the EAR deployment is successful.
When trying to test the WebService from WebServices Navigator, I'm getting an exception (SOAP response)
"com.sap.engine.services.ejb.exceptions.BaseEJBException" within the (WS) method.
What can be the possible cause for the JCo code that throws this exception when running in an EJB?
I tried the same method from a standalone JCo Client class and it connects the RFC successfully.
Also when the definition of the method is empty with only one statement as return "hai"; then webservice has no errors.
This is my code... only with "mConnection.connect();" throwing the exception
import com.sap.mw.jco.*;
public class JCo_Connect extends Object {
  JCO.Client mConnection;
  JCO.Repository mRepository;
  public JCo_Connect() {
    try {
      // Change the logon information to your own system/user
      mConnection =
        JCO.createClient("001", // SAP client
          "<userid>",                  // userid
          "****",                         // password
          "en",                             // language
          "<hostname>",            // application server host name
          "00");                           // system number
      mConnection.connect();
      mRepository = new JCO.Repository("SAP", mConnection);
    catch (Exception ex) {
      ex.printStackTrace();
      System.exit(1);
    mConnection.disconnect();
  public static void main (String args[]) {
    JCo_Connect app = new JCo_Connect();
Any help is highly appreciated.
Thanks in advance.
Regards,
Vijay Kalyan G.

It seems that your code is throwing a runtime exception that you don't catch. So the session bean throws an BaseEJBException.
Try to catch full Exceptions in the EJB code and throw a new EJBException with the full trace, so you can look for the real cause.
try {
   <jco code>
} catch (Exception e) {
   throw new EJBException(e.getLocalizedMessage(), e);
Regards.

Similar Messages

  • Problem when using JPA/EJB in webservice

    I wrote a web service that use JPA/EJB to connect to Sybase (the existing tables), and deployed to OC4J, but it got the following error when the web service is invoked:
    <env:Envelope
      xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:ns0="http://prjtestws_9/types/">
     <env:Body>
      <env:Fault>
       <faultcode>env:Server</faultcode>
       <faultstring>Internal Server Error (Caught exception while handling request: java.lang.NullPointerException)</faultstring>
      </env:Fault>
     </env:Body>
    </env:Envelope>
    I have checked that, the query will return some records, and also it works fine if the program executed as a stand alone application.
    Thanks in advance

    I find that I can only have ONE webservice that using JPA/EJB for an OC4J instance, if more than one then the above error will come out, and I have to restart the OC4J instance to run another webservice that using JPA/EJB.
    Is there any solution for this issue?
    Thanks

  • Exception thrown while using JCo in Java agents  in Lotus Domino applns.

    I am trying to use JCo in Java agents in a lotus domino application.  Here is my code:(This Java agent calls a Remote enabled function module in SAP which gives the sum of two given numbers)
    import lotus.domino.*;
    import java.util.*;
    import java.io.*;
    import com.sap.mw.jco.*;
    public class JavaAgent extends AgentBase
    private static JCO.Client jClient;
    public JCO.Client getJCOClient(String poolName) throws IOException, JCO.Exception
           System.out.println("Inside getJCOClient method");          
           System.out.println("Pool Name : "+ poolName);  
              boolean poolExists = false;     
          JCO.PoolManager poolManager  = JCO.PoolManager.singleton();
           String poolNames[] = poolManager.getPoolNames();
          // To check whether the given pool name already exists     
         if(poolNames != null)
                for(int poolIter = 0;poolIter<poolNames.length;poolIter++)
                 if(poolNames[poolIter].equals(poolName))
                        System.out.println("POOL ID =====>> "+poolName);
                        System.out.println("POOL NAMES["+ poolIter "] ========>>"poolNames[poolIter]);
                        poolExists = true;
                        break;
         String s = String.valueOf( poolExists );
          System.out.println("pool Exists :" + s );     
          if(poolExists == false)
               try
                   int maxConnections = 50;
                   String JCOClient = "111";
                   String user = "apabap4";
                   String password = "sap123";
                   String language = "en";
                   String ashost = "172.25.10.68";
                   String sysnr = "00";
                   //To create an instance of a client pool to the remote SAP system
                   System.out.println("Before addClientPool");
                   System.out.println("Pool Name : " + poolName);
                   JCO.addClientPool(poolName,maxConnections,JCOClient,user,password,language,ashost,sysnr);
              //     JCO.createClient(JCOClient, user,password,language, "172.25.10.68");
                   System.out.println("New Connection Pool Created");
               catch(JCO.Exception jcoe)
                    throw new JCO.Exception(jcoe.getGroup(),jcoe.getKey(),"Error in client pool creation "+jcoe.toString());
         try
                  //getClient() method returns a client connection from the specified spool     
                   jClient = JCO.getClient(poolName);
         catch(JCO.Exception jcoe1)
                   throw new JCO.Exception(jcoe1.getGroup(),jcoe1.getKey(),"Error in getting JCO client "+jcoe1.toString());
              return jClient;
         // End of method getJCOClient()     
         public void releaseJCOClient() throws JCO.Exception
          try
                   JCO.releaseClient(jClient);
         catch(JCO.Exception jcoe2)
                   throw new JCO.Exception(jcoe2.getGroup(),jcoe2.getKey(),"Error in releasing client "+jcoe2.toString());
    public void NotesMain()
              try {
                   Session session = getSession();
                   AgentContext agentContext = session.getAgentContext();
                  Document doc = agentContext.getDocumentContext();
       JavaAgent jcoObj = new JavaAgent();
       JCO.Client jClient = null;
       String poolId = new String("EG_POOL");
       IFunctionTemplate   ifun;//For function object
       JCO.Function func;          
       JCO.ParameterList importParams,exportParams,tableParams;
       try{
             jClient = jcoObj.getJCOClient(poolId);
           System.out.println("After Getting Connection");
           System.out.println("Attributes:" + jClient.getAttributes());
            //Create a repository object
            JCO.Repository mRepository = new JCO.Repository("myJCO_REPOSITORY", jClient);
            //Creating a function object
            ifun = mRepository.getFunctionTemplate("ZSUM");// The Function Name
           func = ifun.getFunction();
            System.out.println("Function name " + func.getName());
            //To get the import parameters in the function module
            importParams = func.getImportParameterList();
            System.out.println("Import parameters"+ importParams);
            importParams.appendValue("OPERAND1",importParams.TYPE_INT,4,"25");
           importParams.appendValue("OPERAND2",importParams.TYPE_INT,4,"25");
            jClient.execute(func);//Executing the function 
            //To get the export parameters in the function module
            exportParams = func.getExportParameterList();
               System.out.println("Export parameters" + exportParams);
            int sumVl = exportParams.getInt("SUM");
            Integer sumValue = new Integer(sumVl);
            System.out.println("Sum Value" + sumValue);
             doc.replaceItemValue("txtSum", sumValue.toString());
            //releaseJCOClient();
      catch(IOException ioe)
          ioe.printStackTrace();
      catch(JCO.Exception jcoe1)
          jcoe1.printStackTrace();
              } catch(Exception e) {
                   e.printStackTrace();
    While executing this agent I am getting the following exception.
    08/25/2004 06:27:45 PM  HTTP JVM: java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'  Native Library C:\Lotus\Domino\sapjcorfc.dll already loaded in another classloader
    08/25/2004 06:27:45 PM  HTTP JVM:  at com.sap.mw.jco.JCO.<clinit>(Unknown Source)
    08/25/2004 06:27:45 PM  HTTP JVM:  at JCoCallTrans.getJCOClient(JCoCallTrans.java:42)
    08/25/2004 06:27:45 PM  HTTP JVM:  at JCoCallTrans.NotesMain(JCoCallTrans.java:88)
    08/25/2004 06:27:45 PM  HTTP JVM:  at lotus.domino.AgentBase.runNotes(Unknown Source)
    08/25/2004 06:27:45 PM  HTTP JVM:  at lotus.domino.NotesThread.run(NotesThread.java:208)
    08/25/2004 06:27:45 PM  HTTP JVM: Error cleaning up agent threads
    Also I have placed the jco.jar in lib of jvm in Domino directory i.e.,
    Lotus\Domino\jvm\lib and
    sapjcorfc.dll and librfc32.dll in system32 of WINNT folder.
    Kindly help me to rectify this problem
    Arokiaraj.S

    I had approximate the same problem, and I've fixed it. In my jar file the javaHelpSearch Folder was named with a leading lower case "j". But in my helpset.hs it was with an upper Case "J"
    <name>Search</name>
        <label>Search</label>
        <type>javax.help.SearchView</type>
        <data engine="com.sun.java.help.search.DefaultSearchEngine">JavaHelpSearch</data>
       </view>When the helpset is called from a folder: windows ignore it, but when the helpset is called from into a jar you must type it correct!

  • Using SPML for Identity Management in EJB WebService

    Dear All,
    I have a requirement af using SPML(Service Provisioning Markup Language) for Identity management. Identity management is used to manage the user like deleting a user, modifying, adding a user etc for a application.For that the request for all these functions need to be made using the SPML. The idea is that first the data used to make any request will come from the SAP R3 using an EJB which will retrieve that data by calling a BAPI via JCO and then it is needed to be passed to the entitlement system using the SPML.Thus I have to publish a web service which will get data by calling BAPI and give it to entitlement system using SPML and how can I achieve it?. I have less knowledge about SPML, your guidence will help.
    Thanks & Regards,
    Samir

    There is a document on the SAP Service Market Place that covers the SPML in the UME APIs. This quote is from the [UME documentation|http://help.sap.com/saphelp_nw04s/helpdata/en/5b/5d2706ebc04e4d98036f2e1dcfd47d/frameset.htm]:
    SPML Support
    The UME APIs support access using the Service Provisioning Markup Language (SPML). For more information, see service.sap.com/security > Security in Detail > Secure User Access > Identity Management > SAP Identity Management APIs.
    -Michael
    Edited by: Michael Shea on Jan 17, 2008 9:01 AM

  • Problem in accessing IWDPDFObject from EJB(Webservice)

    Hi All,
    I want to use "<b>IWDPDFObject</b>" api for creating pdfs dynamically, this has to be used in a EJB module project which is converted in webservice. In the EJBModule project i have added the reference locally in the build path but how do I give the runtime reference?.
    In the "<b>application-j2ee-engine.xml</b>" of the Enterprise application project i have added the reference of "<b>tc/wd/webdynpro</b>" which has that <b>"_webdynpro_pdfobject.jar</b>". Still it doesn't work.
    Is there any limitation on accessing webdynpro jar from EJB(webservice)?.
    Kindly help.
    Regards,
    Vishal

    Dear LN,
    I did which you said.But i met this error:
    javax.ejb.EJBException: Exception raised from invocation of public boolean com.yh0571.ejb.PDFObjectBean.createPdf(java.lang.String,java.lang.String,java.lang.String,java.lang.String) method on bean instance com.yh0571.ejb.PDFObjectBean@62843ed2 for bean sap.com/PDF_EJB_EARannotation|PDF_EJB.jarannotation|PDFObjectBean; nested exception is: javax.ejb.EJBException
    I used EJB3 in  SAP NetWeaver CE 7.1
    Regards
    Jiandong

  • I m not getting connected to oracle 9i database using my ejb...

    hi i have made a simple ejb which simply connects to a database of oracle 9i using a datasource on oracle 10g application server...but now my problem is that when i am trying to deploy the ejb ..it is not getting deployed...it shows the following error..
    Deployment failed:nested exception
    resolution:
    base exception:
    com.evermind.server.rmi.OrionRemoteException
    Disconnected:Connection reset. Disconnected:Connection reset.
    the code i am using for EJB class is as follows
    package Simpapp;
    import javax.ejb.*;
    import java.sql.*;
    import javax.naming.*;
    import javax.sql.DataSource;
    public class SimpappBean implements SessionBean {
        static final String DATASOURCE = "bajaj";
        static final String SQL = "select * from login ";
        DataSource ds;
        public String upper (String input) throws java.rmi.RemoteException {
         try {
             Connection conn = ds.getConnection ("bajaj10g","bajaj10g");
             Statement sql = conn.createStatement ();
             //sql.setString (1, input);
             ResultSet results = sql.executeQuery (SQL);
             if (results.next () == false) {
              System.out.println ("No rows for "+ input);
                  throw new java.rmi.RemoteException ("SQL failure");
             } // if
             String result = results.getString ("username");
             results.close ();
             sql.close ();
             conn.close ();
             if (result == null) {
              System.out.println ("NULL result for "+ input);
                  throw new java.rmi.RemoteException ("SQL failure");
             } else
              return (result);
         } catch (SQLException sqle) {
             System.err.println ("While executing SQL: " +
              sqle.getMessage ());
             throw new java.rmi.RemoteException ("SQL failure");
            } catch (Exception e) {
             System.err.println ("Unknown Exception: " +
              e.getMessage ());
             throw new java.rmi.RemoteException ("Bean Exception: " +
              e.getMessage ());
         } // catch
        } // simpapp
        public void ejbCreate () {
             try {
             Context ctx = new InitialContext ();
             ds = (DataSource) ctx.lookup (DATASOURCE);
         } catch (Exception e) {
             System.out.println ("While creating Bean " +
              e.getMessage ());
         } // catch
        } // ejbCreate
        public void ejbRemove () {}
        public void ejbActivate () {}
        public void ejbPassivate () {}
        public void setSessionContext (SessionContext ctx) {}
    } // SimpappBeancan any body suggest me where lies the problem???
    all my Home ,Remote classes are doing well when they are used for any other simple helloworld type of program

    Is that the only Oracle client installed? If you have another one hanging around it could be using the wrong tnsnames file.

  • How to create a cache for JPA Entities using an EJB

    Hello everybody! I have recently got started with JPA 2.0 (I use eclipseLink) and EJB 3.1 and have a problem to figure out how to best implement a cache for my JPA Entities using an EJB.
    In the following I try to describe my problem.. I know it is a bit verbose, but hope somebody will help me.. (I highlighted in bold the core of my problem, in case you want to first decide if you can/want help and in the case spend another couple of minutes to understand the domain)
    I have the following JPA Entities:
    @Entity Genre{
    private String name;
    @OneToMany(mappedBy = "genre", cascade={CascadeType.MERGE, CascadeType.PERSIST})
    private Collection<Novel> novels;
    @Entity
    class Novel{
    @ManyToOne(cascade={CascadeType.MERGE, CascadeType.PERSIST})
    private Genre genre;
    private String titleUnique;
    @OneToMany(mappedBy="novel", cascade={CascadeType.MERGE, CascadeType.PERSIST})
    private Collection<NovelEdition> editions;
    @Entity
    class NovelEdition{
    private String publisherNameUnique;
    private String year;
    @ManyToOne(optional=false, cascade={CascadeType.PERSIST, CascadeType.MERGE})
    private Novel novel;
    @ManyToOne(optional=false, cascade={CascadeType.MERGE, CascadeType.PERSIST})
    private Catalog appearsInCatalog;
    @Entity
    class Catalog{
    private String name;
    @OneToMany(mappedBy = "appearsInCatalog", cascade = {CascadeType.MERGE, CascadeType.PERSIST})
    private Collection<NovelEdition> novelsInCatalog;
    The idea is to have several Novels, belonging each to a specific Genre, for which can exist more than an edition (different publisher, year, etc). For semplicity a NovelEdition can belong to just one Catalog, being such a Catalog represented by such a text file:
    FILE 1:
    Catalog: Name Of Catalog 1
    "Title of Novel 1", "Genre1 name","Publisher1 Name", 2009
    "Title of Novel 2", "Genre1 name","Pulisher2 Name", 2010
    FILE 2:
    Catalog: Name Of Catalog 2
    "Title of Novel 1", "Genre1 name","Publisher2 Name", 2011
    "Title of Novel 2", "Genre1 name","Pulisher1 Name", 2011
    Each entity has associated a Stateless EJB that acts as a DAO, using a Transaction Scoped EntityManager. For example:
    @Stateless
    public class NovelDAO extends AbstractDAO<Novel> {
    @PersistenceContext(unitName = "XXX")
    private EntityManager em;
    protected EntityManager getEntityManager() {
    return em;
    public NovelDAO() {
    super(Novel.class);
    //NovelDAO Specific methods
    I am interested at when the catalog files are parsed and the corresponding entities are built (I usually read a whole batch of Catalogs at a time).
    Being the parsing a String-driven procedure, I don't want to repeat actions like novelDAO.getByName("Title of Novel 1") so I would like to use a centralized cache for mappings of type String-Identifier->Entity object.
    Currently I use +3 Objects+:
    1) The file parser, which does something like:
    final CatalogBuilder catalogBuilder = //JNDI Lookup
    //for each file:
    String catalogName = parseCatalogName(file);
    catalogBuilder.setCatalogName(catalogName);
    //For each novel edition
    String title= parseNovelTitle();
    String genre= parseGenre();
    catalogBuilder.addNovelEdition(title, genre, publisher, year);
    //End foreach
    catalogBuilder.build();
    2) The CatalogBuilder is a Stateful EJB which uses the Cache and gets re-initialized every time a new Catalog file is parsed and gets "removed" after a catalog is persisted.
    @Stateful
    public class CatalogBuilder {
    @PersistenceContext(unitName = "XXX", type = PersistenceContextType.EXTENDED)
    private EntityManager em;
    @EJB
    private Cache cache;
    private Catalog catalog;
    @PostConstruct
    public void initialize() {
    catalog = new Catalog();
    catalog.setNovelsInCatalog(new ArrayList<NovelEdition>());
    public void addNovelEdition(String title, String genreStr, String publisher, String year){
    Genre genre = cache.findGenreCreateIfAbsent(genreStr);//##
    Novel novel = cache.findNovelCreateIfAbsent(title, genre);//##
    NovelEdition novEd = new NovelEdition();
    novEd.setNovel(novel);
    //novEd.set publisher year catalog
    catalog.getNovelsInCatalog().add();
    public void setCatalogName(String name) {
    catalog.setName(name);
    @Remove
    public void build(){
    em.merge(catalog);
    3) Finally, the problematic bean: Cache. For CatalogBuilder I used an EXTENDED persistence context (which I need as the Parser executes several succesive transactions) together with a Stateful EJB; but in this case I am not really sure what I need. In fact, the cache:
    Should stay in memory until the parser is finished with its job, but not longer (should not be a singleton) as the parsing is just a very particular activity which happens rarely.
    Should keep all of the entities in context, and should return managed entities form mehtods marked with ##, otherwise the attempt to persist the catalog should fail (duplicated INSERTs)..
    Should use the same persistence context as the CatalogBuilder.
    What I have now is :
    @Stateful
    public class Cache {
    @PersistenceContext(unitName = "XXX", type = PersistenceContextType.EXTENDED)
    private EntityManager em;
    @EJB
    private sessionbean.GenreDAO genreDAO;
    //DAOs for other cached entities
    Map<String, Genre> genreName2Object=new TreeMap<String, Genre>();
    @PostConstruct
    public void initialize(){
    for (Genre g: genreDAO.findAll()) {
    genreName2Object.put(g.getName(), em.merge(g));
    public Genre findGenreCreateIfAbsent(String genreName){
    if (genreName2Object.containsKey(genreName){
    return genreName2Object.get(genreName);
    Genre g = new Genre();
    g.setName();
    g.setNovels(new ArrayList<Novel>());
    genreDAO.persist(t);
    genreName2Object.put(t.getIdentifier(), em.merge(t));
    return t;
    But honestly I couldn't find a solution which satisfies these 3 points at the same time. For example, using another stateful bean with an extended persistence context (PC) would work for the 1st parsed file, but I have no idea what should happen from the 2nd file on.. Indeed, for the 1st file the PC will be created and propagated from CatalogBuilder to Cache, which will then use the same PC. But after build() returns, the PC of CatalogBuilder should (I guess) be removed and re-created during the succesive parsing, although the PC of Cache should stay "alive": shouldn't in this case an exception being thrown? Another problem is what to do when the Cache bean is passivated. Currently I get the exception:
    "passivateEJB(), Exception caught ->
    java.io.IOException: java.io.IOException
    at com.sun.ejb.base.io.IOUtils.serializeObject(IOUtils.java:101)
    at com.sun.ejb.containers.util.cache.LruSessionCache.saveStateToStore(LruSessionCache.java:501)"
    Hence, I have no Idea how to implement my cache.. Can you please tell me how would you solve the problem?
    Many thanks!
    Bye

    Hi Chris,
    thanks for your reply!
    I've tried to add the following into persistence.xml (although I've read that eclipseLink uses L2 cache by default..):
    <shared-cache-mode>ALL</shared-cache-mode>
    Then I replaced the Cache bean with a stateless bean which has methods like
    Genre findGenreCreateIfAbsent(String genreName){
    Genre genre = genreDAO.findByName(genreName);
    if (genre!=null){
    return genre;
    genre = //Build new genre object
    genreDAO.persist(genre);
    return genre;
    As far as I undestood, the shared cache should automatically store the genre and avoid querying the DB multiple times for the same genre, but unfortunately this is not the case: if I use a FINE logging level, I see really a lot of SELECT queries, which I didn't see with my "home made" Cache...
    I am really confused.. :(
    Thanks again for helping + bye

  • How to connect to R/3 via JCo using MYSAPSSO2?

    Hello!
    I'm developing a J2EE application who resides in an EP with Single Sign On. I have to retrieve some data from R/3, the way I want to connect is via JCo using MYSAPSSO.
    I have read that is possible to connect passing MYSAPSSO2 as <i>user</i> and its value as <i>password</i>. The java code in the jsp is something like this:
    javax.servlet.http.Cookie [] my_cookies = request.getCookies();
    java.util.Hashtable cks = new Hashtable();
    for(int i=0;i<my_cookies.length;i++){
         cks.put(my_cookies<i>.getName(),java.net.URLDecoder.decode(my_cookies<i>.getValue()));
    String user = "$MYSAPSSO2$";
    String pass = (String)cks.get("MYSAPSSO2");
    JCO.Client conex;
    JCO.Repository rep;
    boolean ok=true;
    conex = JCO.createClient("000",user,pass,"es","192.168.0.1","00","","");
    try{
         conex.connect();
         rep = new JCO.Repository("mirep",conex);
    } catch (Exception e){
         out.write("<br>"e"<br>");
         ok = false;
    if (ok)
         conex.disconnect();
    We are working with EP6 SP2, WAS 6.20.
    The error is:
    com.sap.mw.jco.JCO$Exception: (103) RFC_ERROR_LOGON_FAILURE: Se ha recibido un ticket SSP que no se puede interpretar
    (I translate you:)
    RFC_ERROR_LOGON_FAILURE: unable to interpret a retrieved SSP ticket
    Thank you all!!

    Ok!
    I have solve the problem. So, I was trying to connect via SSO within an user that was not registered in R/3 and I forgot it.
    Sorry for the inconvenience.

  • Using an EJB as a source for a Model

    Hi,
    Before starting with this post content it might be helpful to give you the desired output of what I am trying to do. Basically I need to have an HTML table that is populated from an EJB.
    The current proposed solution is as follows: the Model that is associated with a TiledView will be used as client for the EJB. The Model will make use of the methods in the EJB to get different java.util.Collection objects for different Helper classes based on the find criteria.
    For example, if the EJB represent a book and there is a home method to retrieve a list of books based of the book category. In this case the Model will act as a client of the EJB, retrieve the list of books and use the different methods in the Model, such as insert and retrieve, to get the list of books and to add a book up on request.
    I know that my post might not be clear. But as I said, all that is needed is to have a TiledView that displays books information, which are retrieved from an EJB, and allow a user to select a book to display its information.
    My suggested solution could be completely wrong, not visible and reflect a bad design. Please if any one went through such a situation give me a hint.
    Regards,
    Basil Mahdi

    Basil,
    This is some material I snipped from an internal Sun forum I posted to regarding a simple EJB Jato integration example.
    I hate to give just any EJB JATO example because frankly there are so many different use cases with EJBs that no one example will match up against your needs. You can use an EJB
    - in a Custom Model Operation you can encapsulate an EJB Method invocation
    - in a Custom Command you can encapsulate any arbitrary code include calling an EJB
    - as the backingstore for a CustomModel
    - use a BeanAdapterModel to adapt to the value/transfer beans which are uses as parameters or return values of EJB methods
    - use an ObjectAdapterModel to adapt an EJB directly by assigning the EJB reference in setObject() in the constructor of the OAM
    As you can see, an EJB is just another business object API...its just that you acquire the reference with a few lines of ugly JDNI and Home interface APIs.
    Nevertheless, here is some guidance. I would like to reinforce that there is no direct solution for adapting an EJB from BAM; EJBs are not JavaBeans. What is a solution is to have the parameters or return values of your EJBs use value/transfer object patterns in the form of JavaBeans. The BAM may be used to adapt to these parameters or return value of the EJB.
    In short, when using BAM in a tileview to work with an EJB, there is little difference than using BAM at any other time, you the developer, must manage/code the placement of the EJB parameters directly into the BAM or in a scoped attribute to be used by the BAM.
    In another example, you may have a SLSB which models an employee called EmployeeSupport. You may have a transfer object (JavaBean) of type EmployeeRecord. You may have operations on the EJB including:
    public EmployeeRecord findEmployee(String employeeID);
    public EmployeeRecord[] findEmployees(String location);
    public void updateEmployee(EmployeeRecord);
    One could create a BAM in the studio called EmployeeModel
    You would set the JavaBean class to EmployeeRecord
    You would run the Design Action to bootstrap the properties of EmployeeRecord as fields on the model
    Now you have a model which is ready to adapt to EmployeeRecord bean.
    Feel free to add material to the EmployeeModel to make a richer API; for instance you could encapsulate some EJB'ish code in their to act as a service locator for a EmployeeSupprt SLSB.
    protected static EmployeeSupport support;
    static {
    javax.naming.Context context = new javax.naming.InitialContext();
    Object objref = context.lookup("ejb/EmployeeSupport");
    EmployeeSupportHome home = (EmployeeSupportHome)
    javax.rmi.PortableRemoteObject.narrow(objref,EmployeeSupportHome .class);
    support = home.create();
    public static EmployeeSupport getEmployeeSupport() {
    return support;
    If you really wanted to hide the EJB'ishness of the EmployeeSupport you could even wrap the behavior and handle exceptions, etc.
    public static EmployeeRecord findEmployee(String employeeID) {
    return getEmployeeSupport().findEmployee(employeeID);
    public static EmployeeRecord[] findEmployees(String location) {
    return getEmployeeSupport().findEmployees(location);
    public static void updateEmployee(EmployeeRecord record) {
    return getEmployeeSupport().updateEmployee(record);
    You could even help the view developer latch EJB transfer objects into the model for adaption; saving them from the effort
    public void adaptEmployee(String employeeID) {
    setBean(findEmployee(employeeID));
    public void adaptLocation(String location) {
    setBean(findEmployees(location));
    public void save() {
    updateEmployee((EmployeeRecord)getBean());
    Create a search ViewBean, place a text field on it for an EmployeeID and button labeled Find. Leave the EmployeeID model binding default (to use a DefaultModel memory model). Open the handle request event method on the viewbean for the Find button.
    public void handleFindRequest....{
    EmployeeModel model = .....;
    model.adaptEmployee(getEmployeeIDChild().getValue());
    // display Edit page which has fields for editing the employee record
    Create an edit ViewBean, with editable fields bound to the EmployeeModel; add an button labeled update
    public void handleUdpateRequest....{
    EmployeeModel model = .....;
    model.save();
    // do whatever is next ....
    Notice that the we are jumping across request boundaries in this example. Using just default model reference configurations, the EmployeeModel will be created brand new during the Update request and there will be no bean currently adapted. Most likely, you would want to have the model (and hence its adapted bean) stored in HttpSession across at least these related requests. In this case the model reference used by the search ViewBean would have "store in session" true. and the model reference in the edit ViewBean would have "look in session" true.
    What we recommend is that someone who understands the business tier design take the responsibility to create a set of "business delegates" as JATO models. An advanced technique would be to encapsulate these models in a component library JAR which multiple web applications can reuse. As you can imagine, there are so many ways to do the same thing. You could just as easily make a CustomModel or SimpleCustomModel to adapt to your EJB. You can also, if your EJB uses primitives or JavaBeans (or graphs of JavaBeans) for all parameters, use the ObjectAdapterModel to directly connect to an EJB.

  • Exception in creating message-driven ejb : [java.lang.NullPointerException]

    [#|2008-09-17T07:32:06.973-0500|SEVERE|sun-appserver-ee8.2|javax.enterprise.system.container.ejb.mdb|_ThreadID=58;|MDB00050: Message-driven bean [OAHMSTcpIpServer1:eaTCPIP_cmTcpIpServer_Service1]: Exception in creating message-driven ejb : [java.lang.NullPointerException]|#]
    [#|2008-09-17T07:32:06.974-0500|SEVERE|sun-appserver-ee8.2|javax.enterprise.system.container.ejb.mdb|_ThreadID=58;|java.lang.NullPointerException
    java.lang.NullPointerException
         at com.sun.enterprise.util.InvocationManagerImpl.preInvoke(InvocationManagerImpl.java:117)
         at com.sun.ejb.containers.MessageBeanContainer.createMessageDrivenEJB(MessageBeanContainer.java:670)
         at com.sun.ejb.containers.MessageBeanContainer.access$100(MessageBeanContainer.java:71)
         at com.sun.ejb.containers.MessageBeanContainer$MessageBeanContextFactory.create(MessageBeanContainer.java:467)
         at com.sun.ejb.containers.util.pool.NonBlockingPool.preload(NonBlockingPool.java:249)
         at com.sun.ejb.containers.util.pool.NonBlockingPool.doResize(NonBlockingPool.java:473)
         at com.sun.ejb.containers.util.pool.NonBlockingPool$IdleBeanWork.run(NonBlockingPool.java:568)
         at com.sun.ejb.containers.util.pool.NonBlockingPool$IdleBeanWork.service(NonBlockingPool.java:560)
         at com.sun.ejb.containers.util.WorkAdapter.doWork(WorkAdapter.java:44)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:409)
    |#]

    Hello,
    If I make use of the @EJB annotation again a NullPointerException is risen
    package videoclub;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.FocusTraversalPolicy;
    import java.util.Vector;
    import javax.annotation.Resource;
    import javax.ejb.EJB;
    import javax.swing.JOptionPane;
    import vc.bl.ClerkSessionRemote;
    import vc.domain.Customer;
    * @author IOANNIS_PAPAIOANNOU
    @EJB(name="ejb/ClerkSessionBean", beanInterface=ClerkSessionRemote.class, beanName="ClerkSessionBean")
    public class Clerk extends javax.swing.JFrame
        @Resource
        javax.ejb.SessionContext sessionContext;
        ClerkSessionRemote clerkSessionBean = (ClerkSessionRemote) sessionContext.lookup("ejb/ClerkSessionBean");
    }  The line:
    ClerkSessionRemote clerkSessionBean = (ClerkSessionRemote) sessionContext.lookup("ejb/ClerkSessionBean");rises the exception
    the output of the client:
    init:
    init:
    deps-jar:
    compile:
    library-inclusion-in-archive:
    Building jar: C:\Documents and Settings\IOANNIS_PAPAIOANNOU\My Documents\NetBeansProjects\VideoClub\VideoClub-ejb\dist\VideoClub-ejb.jar
    dist:
    deps-jar:
    compile-single:
    run-single:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at videoclub.Clerk.<init>(Clerk.java:33)
    at videoclub.Clerk$2.run(Clerk.java:232)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    BUILD SUCCESSFUL (total time: 2 seconds)
    Yiannis P.

  • Deploying an EJB WebService under WLS 9.1 - port component "Hello" is not found in wsdl.

    Hi,
    I'm trying to deploy a simple EJB webservice example on WLS 9.1. The appc
    compile works fine, but the server deployment throw the following error
    message:
    [java] port component "Hello" is not found in wsdl.
    It's simple JAX-RPC based webservice where a SessionBean method is used as
    the service implementation. The same configuration (webservice.xml,
    mapping.xml and HelloService.wsdl) works fine under JBoss 4.0, but not with
    WLS 9.1. Maybe it's a simple configuration error and someone can help.
    Regards
    Guido
    Appendix
    webservice.xml
    <webservices xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1\.xsd"
    version="1.1">
    <webservice-description>
    <webservice-description-name>HelloService</webservice-description-name>
    <wsdl-file>META-INF/wsdl/HelloService.wsdl</wsdl-file>
    <jaxrpc-mapping-file>META-INF/mapping.xml</jaxrpc-mapping-file>
    <port-component>
    <port-component-name>Hello</port-component-name>
    <wsdl-port>HelloPort</wsdl-port>
    <service-endpoint-interface>com.jcoffee.components.ws.Hello</service-endpoin
    t-interface>
    <service-impl-bean>
    <ejb-link>HelloBean</ejb-link>
    </service-impl-bean>
    </port-component>
    </webservice-description>
    </webservices>
    mapping.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <java-wsdl-mapping version="1.1" xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
    <package-mapping>
    <package-type>com.jcoffee.components.ws</package-type>
    <namespaceURI>http://ws.components.jcoffee.com/types</namespaceURI>
    </package-mapping>
    <package-mapping>
    <package-type>com.jcoffee.components.ws</package-type>
    <namespaceURI>http://ws.components.jcoffee.com/</namespaceURI>
    </package-mapping>
    <service-interface-mapping>
    <service-interface>com.jcoffee.components.ws.HelloService</service-interface
    >
    <wsdl-service-name
    xmlns:serviceNS="http://ws.components.jcoffee.com/">serviceNS:HelloService</
    wsdl-service-name>
    <port-mapping>
    <port-name>HelloPort</port-name>
    <java-port-name>HelloPort</java-port-name>
    </port-mapping>
    </service-interface-mapping>
    <service-endpoint-interface-mapping>
    <service-endpoint-interface>com.jcoffee.components.ws.Hello</service-endpoin
    t-interface>
    <wsdl-port-type
    xmlns:portTypeNS="http://ws.components.jcoffee.com/">portTypeNS:Hello</wsdl-
    port-type>
    <wsdl-binding
    xmlns:bindingNS="http://ws.components.jcoffee.com/">bindingNS:HelloBinding</
    wsdl-binding>
    <service-endpoint-method-mapping>
    <java-method-name>hello</java-method-name>
    <wsdl-operation>hello</wsdl-operation>
    <method-param-parts-mapping>
    <param-position>0</param-position>
    <param-type>java.lang.String</param-type>
    <wsdl-message-mapping>
    <wsdl-message
    xmlns:wsdlMsgNS="http://ws.components.jcoffee.com/">wsdlMsgNS:Hello_hello</w
    sdl-message>
    <wsdl-message-part-name>String_1</wsdl-message-part-name>
    <parameter-mode>IN</parameter-mode>
    </wsdl-message-mapping>
    </method-param-parts-mapping>
    <wsdl-return-value-mapping>
    <method-return-value>java.lang.String</method-return-value>
    <wsdl-message
    xmlns:wsdlMsgNS="http://ws.components.jcoffee.com/">wsdlMsgNS:Hello_helloRes
    ponse</wsdl-message>
    <wsdl-message-part-name>result</wsdl-message-part-name>
    </wsdl-return-value-mapping>
    </service-endpoint-method-mapping>
    </service-endpoint-interface-mapping>
    </java-wsdl-mapping>
    HelloService.wsdl
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="HelloService"
    targetNamespace="http://ws.components.jcoffee.com/"
    xmlns:tns="http://ws.components.jcoffee.com/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <types/>
    <message name="Hello_hello">
    <part name="String_1" type="xsd:string"/>
    </message>
    <message name="Hello_helloResponse">
    <part name="result" type="xsd:string"/>
    </message>
    <portType name="Hello">
    <operation name="hello" parameterOrder="String_1">
    <input message="tns:Hello_hello"/>
    <output message="tns:Hello_helloResponse"/>
    </operation>
    </portType>
    <binding name="HelloBinding" type="tns:Hello">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
    <operation name="hello">
    <soap:operation soapAction=""/>
    <input>
    <soap:body use="literal" namespace="http://ws.components.jcoffee.com/"/>
    </input>
    <output>
    <soap:body use="literal" namespace="http://ws.components.jcoffee.com/"/>
    </output>
    </operation>
    </binding>
    <service name="HelloService">
    <port name="HelloPort" binding="tns:HelloBinding">
    <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
    </port>
    </service>
    </definitions>
    and last but not least the ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" version="2.1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
    <display-name>JCoffee web service sample</display-name>
    <enterprise-beans>
    <session>
    <ejb-name>HelloBean</ejb-name>
    <service-endpoint>com.jcoffee.components.ws.Hello</service-endpoint>
    <ejb-class>com.jcoffee.components.ws.HelloBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <method-permission>
    <unchecked/>
    <method>
    <ejb-name>HelloBean</ejb-name>
    <method-name>*</method-name>
    </method>
    </method-permission>
    <container-transaction>
    <method>
    <ejb-name>HelloBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>

    Hi again,
    I got it - i've forgot the namespace prefix for the wsdl-port.
    Now it works.
    Thanks!
    "Ben" <[email protected]> schrieb im Newsbeitrag
    news:[email protected]...
    Hi,
    I'm trying to deploy a simple EJB webservice example on WLS 9.1. The appc
    compile works fine, but the server deployment throw the following error
    message:
    [java] port component "Hello" is not found in wsdl.
    It's simple JAX-RPC based webservice where a SessionBean method is used as
    the service implementation. The same configuration (webservice.xml,
    mapping.xml and HelloService.wsdl) works fine under JBoss 4.0, but notwith
    WLS 9.1. Maybe it's a simple configuration error and someone can help.
    Regards
    Guido
    Appendix
    webservice.xml
    <webservices xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1\.xsd"
    version="1.1">
    <webservice-description>
    <webservice-description-name>HelloService</webservice-description-name>
    <wsdl-file>META-INF/wsdl/HelloService.wsdl</wsdl-file>
    <jaxrpc-mapping-file>META-INF/mapping.xml</jaxrpc-mapping-file>
    <port-component>
    <port-component-name>Hello</port-component-name>
    <wsdl-port>HelloPort</wsdl-port>
    <service-endpoint-interface>com.jcoffee.components.ws.Hello</service-endpoin
    t-interface>
    <service-impl-bean>
    <ejb-link>HelloBean</ejb-link>
    </service-impl-bean>
    </port-component>
    </webservice-description>
    </webservices>
    mapping.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <java-wsdl-mapping version="1.1" xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
    <package-mapping>
    <package-type>com.jcoffee.components.ws</package-type>
    <namespaceURI>http://ws.components.jcoffee.com/types</namespaceURI>
    </package-mapping>
    <package-mapping>
    <package-type>com.jcoffee.components.ws</package-type>
    <namespaceURI>http://ws.components.jcoffee.com/</namespaceURI>
    </package-mapping>
    <service-interface-mapping>
    <service-interface>com.jcoffee.components.ws.HelloService</service-interface
    >>
    <wsdl-service-name
    xmlns:serviceNS="http://ws.components.jcoffee.com/">serviceNS:HelloService</
    wsdl-service-name>
    <port-mapping>
    <port-name>HelloPort</port-name>
    <java-port-name>HelloPort</java-port-name>
    </port-mapping>
    </service-interface-mapping>
    <service-endpoint-interface-mapping>
    <service-endpoint-interface>com.jcoffee.components.ws.Hello</service-endpoin
    t-interface>
    <wsdl-port-type
    xmlns:portTypeNS="http://ws.components.jcoffee.com/">portTypeNS:Hello</wsdl-
    port-type>
    <wsdl-binding
    xmlns:bindingNS="http://ws.components.jcoffee.com/">bindingNS:HelloBinding</
    wsdl-binding>
    <service-endpoint-method-mapping>
    <java-method-name>hello</java-method-name>
    <wsdl-operation>hello</wsdl-operation>
    <method-param-parts-mapping>
    <param-position>0</param-position>
    <param-type>java.lang.String</param-type>
    <wsdl-message-mapping>
    <wsdl-message
    xmlns:wsdlMsgNS="http://ws.components.jcoffee.com/">wsdlMsgNS:Hello_hello</w
    sdl-message>
    <wsdl-message-part-name>String_1</wsdl-message-part-name>
    <parameter-mode>IN</parameter-mode>
    </wsdl-message-mapping>
    </method-param-parts-mapping>
    <wsdl-return-value-mapping>
    <method-return-value>java.lang.String</method-return-value>
    <wsdl-message
    xmlns:wsdlMsgNS="http://ws.components.jcoffee.com/">wsdlMsgNS:Hello_helloRes
    ponse</wsdl-message>
    <wsdl-message-part-name>result</wsdl-message-part-name>
    </wsdl-return-value-mapping>
    </service-endpoint-method-mapping>
    </service-endpoint-interface-mapping>
    </java-wsdl-mapping>
    HelloService.wsdl
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="HelloService"
    targetNamespace="http://ws.components.jcoffee.com/"
    xmlns:tns="http://ws.components.jcoffee.com/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <types/>
    <message name="Hello_hello">
    <part name="String_1" type="xsd:string"/>
    </message>
    <message name="Hello_helloResponse">
    <part name="result" type="xsd:string"/>
    </message>
    <portType name="Hello">
    <operation name="hello" parameterOrder="String_1">
    <input message="tns:Hello_hello"/>
    <output message="tns:Hello_helloResponse"/>
    </operation>
    </portType>
    <binding name="HelloBinding" type="tns:Hello">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
    style="rpc"/>
    >
    >
    <operation name="hello">
    <soap:operation soapAction=""/>
    <input>
    <soap:body use="literal" namespace="http://ws.components.jcoffee.com/"/>
    </input>
    <output>
    <soap:body use="literal" namespace="http://ws.components.jcoffee.com/"/>
    </output>
    </operation>
    </binding>
    <service name="HelloService">
    <port name="HelloPort" binding="tns:HelloBinding">
    <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
    </port>
    </service>
    </definitions>
    and last but not least the ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" version="2.1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
    <display-name>JCoffee web service sample</display-name>
    <enterprise-beans>
    <session>
    <ejb-name>HelloBean</ejb-name>
    <service-endpoint>com.jcoffee.components.ws.Hello</service-endpoint>
    <ejb-class>com.jcoffee.components.ws.HelloBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <method-permission>
    <unchecked/>
    <method>
    <ejb-name>HelloBean</ejb-name>
    <method-name>*</method-name>
    </method>
    </method-permission>
    <container-transaction>
    <method>
    <ejb-name>HelloBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>

  • Strange exception when deploying BC4J as EJB in 8i CORBA.BAD_PARAM: null Strings are

    I am trying to deploy BC4J as Ejb to 8i (8.1.6). I use the following deployment method with j: my Jdev root.
    setjboenv j: ejb8i
    loadjava - u user/passwd@host:port:sid - thin -v - r grant "SYS,PUBLIC" j:lib\xmlparserv2.jar
    loadjava - u user/passwd@host:port:sid - thin -v - r grant "SYS,PUBLIC" j:lib\jbomt.zip
    loadjava - u user/passwd@host:port:sid - thin -v - r grant "SYS,PUBLIC" j:lib\jboejb.jarI then create a deployment profile for ejb 8i with the ide. (Without deploying)
    I then use loadjava outside the IDE to deploy the 2 jar files created
    MyProject1CommonEJB.jar
    and
    Myproject1.jar
    I then use the ide again to deploy the bean profile
    Package1ModuleServerEJB.prf
    The last step fails with the error :
    Publishing EJBHome...org.omg.CORBA.BAD_PARAM: null Strings are illegal in IIOP. Please correct your application or run the ORB in backward compatibility mode. minor code: 0 completed: No
    void oracle.aurora.ejb.deployment.GenerateEjb.invoke()
    void oracle.aurora.server.tools.sess_iiop.ToolImpl.invoke(java.lang.String[], java.io.InputStream, java.io.PrintStream, java.io.PrintStream)
    void oracle.aurora.ejb.deployment.GenerateEjb.main(java.lang.String[])
    Exception in thread main
    Strangely, when I test this EJB with the tester (middle tier = remote ejb) it works, but from JSP's I get an application error : "Unknown Exception"
    I am using Jdev 3.1
    Also using the deploy option when creating the deployment profile fails apparantly due to the missing grant "SYS,PUBLIC" when loading classes to the database before deploying the bean.
    What can be done ?
    null

    Hi Blaise
    Thanks for the reply. I have tried to do the complete deployment from within Jdev, but now I get the following error right at the end of the deployment.
    /BC4J1AppModuleEjb/EjbObject_RemoteBC4J1AppModuleEjb:ORA-29535: source requires recompilationjava.lang.NullPointerException at sun.tools.java.Environment.error(Environment.java) at sun.tools.java.Environment.error(Environment.java) at sun.tools.java.Environment.error(Environment.java) ..... etc.
    I have tried to deploy to a clean schema with the java privilages granted as described in the Jdev release notes.
    I included the following libraries in my project :
    JBO JDBC816 PATCH
    JBO OSQL Domains
    JDeveloper Runtime
    Oracle 8.1.6 JDBC
    Connection Manager
    JBO Runtime
    JBO VB Runtime
    JBO 8i Runtime
    SQLJ Runtime
    JBO 8i Client
    JBO Vanilla Domains
    JBO EJB Runtime
    JServer
    Oracle XML SQL Utility
    ORACLE XML Parser 2.0
    Then I just used the deployment wizzard
    null

  • Very Urgent !!! Exception in looking up Local EJB from Servlet in WSAD 5.1

    Hi,
    I have a servlet and a local EJB. The servlet and EJB are deployed on same application server but in different J2EE applications i.e. different EAR files.
    When I lookup an EJB with remote interfaces from servlet everything works fine. But when I try to lookup EJB with local interfaces from
    Servlet I get following Exception.
    Exception Stack: -
    ========================================================
    avax.naming.NameNotFoundException: Context: localhost/nodes/localhost/servers/server1, name: TestLocalHome: First component in name TestLocalHome not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_resolve_complete_info(WsnOptimizedNamingImpl.java:968)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:1399)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(Unknown Source)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3491)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1519)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1480)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1187)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1067)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at javax.naming.InitialContext.lookup(InitialContext.java:360)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at org.apache.jsp._DomainClient._jspService(_DomainClient.java:95)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:669)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:767)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
    ========================================================
    Please help asap.
    Regds
    VJ.

    The ejb spec only defines local ejb access within the same application. It's possible some app servers support access from a different application but it wouldn't be portable, nor would it work within the J2EE SDK or Sun Java System App Servers. To access a local ejb from a web component or ejb , define an ejb-local-ref in the client component's standard .xml file (web.xml or ejb-jar.xml) and use the ejb-link element to specify the ejb-name of the target ejb.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Stateless EJB Webservices vs Endpoint.publish() API for a production system

    Hello,
    I am currently designing an SOA JEE application using JAX-WS Webservices for the synchronous calls and JMS (MDB) for asynchronous access.
    It is packaged in a EAR containing one EJB module (no WAR), so I decided first to publish the Webservices using the javax.xml.ws.Endpoint.publish() method via the Spring org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter. It's working very well and I can inject easily spring beans into my JAX-WS webservice, .. but :
    - I cannot see the published webservices in the Weblogic console
    - I have no idea on how the webservices instances are handled (just one ? )
    - Is it robust enough to be used in production in a critical financial application ?
    On the other hand, I just have to add a @Statless annotation to turn my JAX-WS classes into real EJB-Webservice aware, but it probably adds overhead in the Weblogic server and it's a bit more complicated to inject Spring resources.
    Any advice will help.
    Thanks
    GM

    Hi Kaustubh,
    A topic subscriber only receives messages that are published after it is registered with the topic. Your code for send() creates a publisher that sends the message to the topic before you create a new subscriber in your receive() code. Since that subscriber is created after your publisher has sent its message your subscriber will never receive this message!
    Your code will have the expected behaviour if you use a queue instead of a topic. If you have to use a topic, you could create your subscriber and your publisher in the init() method of your EJB and reuse them in your send() and receive() methods.
    Hope it helps.
    Best regards
    Arnaud Simon
    Arjuna Technologies - http://www.arjuna.com

  • XmlMarshalException on using XI generated Webservice with WebDynpro

    Hi,
    i have a problem creating a WebDynpro application using a WebService model created by XI.
    When executing the service:
    public void onActionGO(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionGO(ServerEvent)
    try {
    wdContext.currentRequest_MI_BESCHAFFUNG_MI_BESCHAFFUNGElement().modelObject().execute();
    wdThis.wdFirePlugToMIBeschaffungResultView();
    catch (Exception e) {
    wdComponentAPI.getMessageManager().reportException( e.getLocalizedMessage(), false );
    //@@end
    I get the following error message:
    Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.XmlMarshalException: XML Serialization Error. Property [DATA] of class [de.gisa.mibeschaffung.model.proxies.types.RFC_READ_TABLE] must exist and can not be null. This is required by schema description.
    The classes generated by the WSDL import are prefixed by ComplexType. So could this be the culprit here? Also the generated classes are in the de.gisa.mibeschaffung package not in the de.gisa.mibeschaffung.model.proxies.types package.
    I appreciate your input!
    regards
    Dirk

    How do you suggest converting those inputs?
    Using a Netweaver Developer Studio generated model (from a
    WSDL description in turn generated by XI) should shield one from the actual programming tasks required to do that.
    Am i mistaken about that?

Maybe you are looking for

  • How to display the contents of an array list to a listview?

    Hi. How do I display the contents of an arraylist to a listview? Here is my current code: var c: Control= new Control(); var simpleList: ArrayList = c.ListResult; //ListResult is an ArrayList containing strings var simpleListView : ListView = ListVie

  • How to Detect browser crash

    hi i want to know how to detect browser crash or the way to go about it , i can use any language to any api's plz specify me some solution .It would be really healpfull

  • Unable to open Illustrator CS6 in Mac OS X Yoesemite

    Hope somebody an help me here, every time I try to open Illustrator CS6 it will open almost to the point of being able to open a file but then closes and tells me there "Adobe Illustrator quit unexpectedly" It used o open no problem in an older versi

  • Show the point of focus con Aperture last version.

    Good morning, lately I can not see the point of focus when i open the photo (RAW size) on Aperture also if I select the icon. The strange if that with photographs taken a few months ago all it's OK. Can you help me please? Thanks very much

  • I need 4 channels of audio in MXF OP 1a

    I am using Premiere CS6.  I am exporting to MXF OP 1A, ticking the 4 channels of audio.  However channels 3 & 4 come out empty. The broadcastying station needs them full. I read somewhere else in the forum that you have to enable the master track???