Accessing ejb classes directly on J2EE server (no EARs)

Hi everyone,
I was wondering how to run EJBs directly from their
class directories for development purposes, without deploying them as an ear file.
I'm running Sun's J2EE server.
Any help would be much appreciated.
cheers,
Paul.

We are doing that all the time with WebLogic 6.1
Add the classes to the default class loader by making sure they are in the classpath given to the JVM that starts the application server.
Put the ejb.jar XML file and the app. server specific XMl file if your app. server requires one in the appropriate META-INF directory at the application server.

Similar Messages

  • Problem with Dynamically accessing EJB Class objects in WL 7.0 SP1

    I am trying to build a component which has the ability to instantiate and execute
    an known EJB method on the fly.
    I have managed to build the component but when I try and execute it I get a ClassNotFoundException.
    I know that the EJB I am trying to invoke is deployed and available on the server,
    as I can see it in the console, I also seen to have been able to get the remote
    interface of the object, my problem occurs when I try and access the class object
    so I can perform a create on the object and then execute my method
    The code I have written is below:
    private Object getRemoteObject(Context pCtx, String pJNDIName, String pHomeBean)
    throws Exception {
         String homeCreate = "create";
         Class []homeCreateParam = { };
         Object []homeCreateParamValues = {};           
    try {  
    //This call seems to work and doesn't throw an exception     
    Object home = pCtx.lookup(pJNDIName);
    //However this call throws a java.lang.ClassNotFoundException
    Class homeBean = Class.forName(pHomeBean);
    Method homeCreateMethod = homeBean.getMethod(homeCreate,homeCreateParam);
    return homeCreateMethod.invoke(home, homeCreateParamValues);
    } catch (NamingException ne) {             
    logStandardErrorMessage("The client was unable to lookup the EJBHome.
    Please make sure ");
    logStandardErrorMessage("that you have deployed the ejb with the JNDI
    name "+pJNDIName+" on the WebLogic server ");
    throw ne;
    } catch (Exception e) {
    logStandardErrorMessage(e.toString());
    throw e;     
    Any advice would be really appreciated, I'm fast running out of ideas, I suspect
    it has something to do with the class loader but I'm not sure how to resolve it
    Regards
    Jo Corless

    Hello Joanne,
    Congratulations! I'm very happy that you've managed to fix your problem. It's
    always essential to understand how to package applications when deploying on BEA
    WebLogic. Usually, by throwing everything into an EAR file solves just about all
    the class loader problems. :-) Let us know if you have any further problems that
    we can assist you with.
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Joanne Corless" <[email protected]> wrote:
    >
    >
    I've fixed it!!!!!!!!
    Thanks to everyone who gave me help!!!!
    The class loader was the culprit which is what I suspected all along.
    As soon
    as I put the 2 jar files I was using into an EAR file the problem went
    away!!!!!
    Thanks again
    Jo Corless
    "Ryan LeCompte" <[email protected]> wrote:
    Hello Joanne,
    As Mr. Woollen mentioned, I also believe it's a problem with the class
    loader.
    You need to be careful how you arrange your EJBs, because WebLogic has
    a specific
    method in which it loads classes in an EAR, JAR, and WAR file(s). Please
    refer
    to http://dev2dev.bea.com/articles/musser.jsp for more information about
    BEA WebLogic
    class loading mechanisms and caveats. Also, try printing out the various
    methods
    that are available on the object that was returned to you via reflection.
    For
    example, use the getMethods() method, which returns an array of Method
    objects
    that you can subsequently cycle through and print out the various method
    names.
    This way you can discover if the class found/returned to you is indeed
    the one
    you intend to locate.
    Hope this helps,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    Rob Woollen <[email protected]> wrote:
    I believe the issue is the home interface class for this EJB is not
    available in the class loader which is doing the reflection.
    If you do:
    getClass().getClassLoader().loadClass(homeInterfaceClassName)
    I suspect it will fail. Reflection still requires that the class be
    loadable.
    -- Rob
    Joanne Corless wrote:
    Hi Slava,
    If I make my code look like you describe below I get a compliationerror telling
    me that
    home.getMethod() is not recognised (no such method)
    If I change it slightly and use
    Method homeCreateMethod =
    home.getClass().getMethod(homeCreate,homeCreateParam);
    The code will compile OK but when executed it still throws a NoSuchMethodException
    Any ideas ?
    Thanks for your help so far
    Regards
    Jo Corless
    Your code should look like
    Object home = pCtx.lookup(pJNDIName);
    Method homeCreateMethod =
    home.getMethod(homeCreate,homeCreateParam);
    return homeCreateMethod.invoke(home, homeCreateParamValues);
    Regards,
    Slava Imeshev
    "Joanne Corless" <[email protected]> wrote in message
    news:[email protected]...
    Hi Ryan,
    I also wanted to mention that if you do a "header search" in this
    particular
    newsgroup
    with the search query as "reflection", you will see many previousmessages
    regarding
    reflection and EJBs. I believe you could learn a lot from thedifficulties
    that
    others have faced and solved.I tried that and although there was a number of similar cases noneof them
    actually
    seem to fix my issue. Thanks for the suggestion though
    Are the EJBs that you are trying to access accessible via your
    system
    classpath?
    Try to avoid having them accessible via the main system classpath,and
    only bundle
    them in your appropriate EJB jar files (contained in an EAR file,for
    example).Maybe I should have laid the problem out a little clearer.
    I have a number of EJB's bundled up in a JAR file which is hot deployedto
    the
    server. Within this first JAR file is an EJB (SSB) component that
    needs
    to
    be
    able to invoke a known method on another EJB. This second EJB may
    or
    may
    not be
    within the first JAR file but it also will be hot deployed.
    The component trying to invoke the method on the 2nd EJB has to
    be
    able to
    create
    an instance of the 2nd EJB without actually knowing anything bar
    a
    JNDI
    Name which
    is passed in at runtime.
    I can get as far as doing the
    Object home = pCtx.lookup(pJNDIName);
    This returned a class with the name
    "com.csc.edc.projects.allders.httppostoffice.postman.PostmanBean_mp8qy2_Home
    Impl_WLStub"
    My problem seems to occur when I try and invoke the create method
    Method homeCreate = home.getClass().getMethod("create", new Class[0]);
    My code throws a java.lang.NoSuchMethodException at this point so
    I
    am
    unable
    to progress to the next step of :
    Object bean = homeCreate.invoke(home, null);
    So I can return the instantiated bean back to the calling client.
    Why am I getting the NoSuchMethodException, is is because I am gettinga
    stub
    back rather than the home interface and if so how do I get the truehome
    interface
    from the bean
    Thanks in advance
    Jo Corless

  • AM and accessing EJB's directly

    We are protecting our web applications using AM. There are also several batch jobs running that use direct ejb access. We want to authenticate/authorize access to these ejb's as well. Has anyone tried this? Is there a way to do this without coding a new JAAS login module?
    Message was edited by:
    Stalis
    Message was edited by:
    Stalis

    Please reference a later posting on this very same question.
    -- Lou Caraballo
    Sr. Systems Engineer
    BEA Systems Inc., Denver Telco Group
    719-332-0818 (cell)
    720-528-6073 (denver)
    Aleksey Bukavnev <[email protected]> wrote in message
    news:[email protected]..
    Thank you!
    Aleksey.
    Bill Lloyd wrote:
    There is a java to IDL mapping, which is quite complex. To use it, you
    must
    have an ORB which supports, at minimum, CORBA 2.3. ORBs I know of which
    support this include Orbix 2000 for Java, Visibroker 4.0 for Java, and
    Orbacus 4.0 for Java.
    Also, check out the June 2000 "Java Report" which has an article onthis.
    >>
    To be perfectly honest, though, the best solution is to write a bridge,in
    Java. One side is IDL, which CORBA clients use. The implementation ofthat
    IDL makes RMI requests to get the necessary info. This solution willwork,
    guaranteed. The portion of the spec for the java to IDL mapping isstill
    quite new, and I would expect some, uh, "unexpected features" at thistime.
    >>
    -B
    "Aleksey Bukavnev" <[email protected]> wrote in message
    news:[email protected]..
    Hi!
    Can someone answer one badly important question?
    Is it possible to access EJB's from CORBA clients directly, as if the
    beans were ordinary CORBA objects? I mean DIRECT access - WIDHOUT
    CORBA/Java server application as a liason between CORBA client and EJB
    server!
    I'm using WebLogic Enterprise 5.0.1.
    Thanks in advance.
    Aleksey.

  • Problem accessing EJB located on remote application server

    Hi there,
    I am working on a project where I need to use a remote EJB in my project....
    I am able to do it but having a problem after that....
    The problem is that for the first time when I get a remote object using JNDI lookup and call a function of the object, it works well....
    But, next time when I try to get the same remote object and call the same function again, I get the following exception...
    The following exception was logged java.lang.NullPointerException
    at com.ibm.ISecurityLocalObjectBaseL13Impl.CSICredentialsManager.getClientSubject(CSICredentialsManager.java:389)
    at com.ibm.ISecurityLocalObjectBaseL13Impl.CSIClientRI$2.run(CSIClientRI.java:454)
    at java.security.AccessController.doPrivileged1(Native Method)
    at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
    at com.ibm.ISecurityLocalObjectBaseL13Impl.CSIClientRI.send_request(CSIClientRI.java:450)
    at com.ibm.rmi.pi.InterceptorManager.iterateSendRequest(InterceptorManager.java:404)
    at com.ibm.rmi.iiop.ClientRequestImpl.<init>(ClientRequestImpl.java:136)
    at com.ibm.rmi.iiop.GIOPImpl.createRequest(GIOPImpl.java:141)
    at com.ibm.rmi.iiop.GIOPImpl.createRequest(GIOPImpl.java:97)
    at com.ibm.rmi.corba.ClientDelegate._createRequest(ClientDelegate.java:1854)
    at com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1132)
    at com.ibm.CORBA.iiop.ClientDelegate.createRequest(ClientDelegate.java:1285)
    at com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1065)
    at com.ibm.CORBA.iiop.ClientDelegate.createRequest(ClientDelegate.java:1251)
    at com.ibm.rmi.corba.ClientDelegate.request(ClientDelegate.java:1731)
    at com.ibm.CORBA.iiop.ClientDelegate.request(ClientDelegate.java:1207)
    at org.omg.CORBA.portable.ObjectImpl._request(ObjectImpl.java:460)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:502)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1171)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:676)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:203)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:300)
    at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:246)
    at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:458)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:936)
    I do get the object reference without any issue but on calling the function, I get the exception mentioned above.
    I tried to lookup on the internet if anyone else has the same problem but no luck...
    Appreciate any help!!!
    Thanks in advance...

    Hi!
    I have the same problem, but i never runs ok, the first time that I get a remote object i have these exception... java.lang.NullPointerException.
    I send you my client app code.
    The exception appears when execute the .create method.
    Can you send me your code?
    Good luck
    Mike
    [email protected]
    ==============================000
    package estacion;
    import servidor.InteresesRemote;
    import servidor.InteresesRemoteHome;
    import java.util.Properties;
    import javax.rmi.PortableRemoteObject;
    import javax.naming.*;
    public class Main {
    /** Creates a new instance of Main */
    public Main() {
    public static void main(String[] args) {
    // TODO code application logic here
    Properties env = new Properties();
    // Definir las propiededas y ubicaci�n de b�squeda de Nombres
    JNDI.
    env.setProperty("java.naming.factory.initial",
    "com.sun.jndi.cosnaming.CNCtxFactory");
    env.setProperty("java.naming.provider.url",
    "iiop://localhost:3700");
    try
    // Traer el Contexto de Nombre
    InitialContext jndiContext = new InitialContext(env);
    System.out.println("Contexto Disponible");
    // Traer la Referencia del EJB
    Object ref = jndiContext.lookup("ejb/InteresesBean");
    System.out.println("Se encontr� Referencia del EJB!");
    // Traer la referencia del "Home Interface "
    InteresesRemoteHome home = (InteresesRemoteHome)
    PortableRemoteObject.narrow (ref, InteresesRemoteHome.class);
    // Crear un Objeto a partir del "Home Interface"
    InteresesRemote interes = home.create();
    // Llamar la funci�n
    System.out.println("Inter�s de 10,000 Capital, a tasa 10%,
    bajo 2 plazos anuales:");
    System.out.println(interes.calcularInteres(10000, 0.10, 2));
    catch(Exception e)
    System.out.println(e.toString());
    Run Trace:
    ====================================================
    Contexto Disponible
    Se encontr� Referencia del EJB!
    java.lang.NullPointerException

  • Accessing EJBs as COM objects.

    Hi,
    I want to access deployed EJBs from Visual Basic.
    I've used Sun's COM-CAS bridge inside a VB application to access EJBs deployed in their J2EE server and it worked OK.
    How do I do the same thing with EJBs in Oracle8i (8.1.5)?
    Does Oracle provide a similar package to Sun's COM-CAS bridge?
    Do I deploy to OAS instead of Oracle8i to achieve what I want to do?
    Any help would be appreciated.
    Thanks

    A search of the forum using "Java COM" turned this up:
    http://forum.java.sun.com/thread.jsp?forum=54&thread=106901
    Try it on your machine and see what you get back. Searches are always a good thing, especially if you're new. - MOD

  • How to access an EJB in another J2ee server?

    Dear experts:
    I have a jsp file that is a client of a J2ee server A, and I am going to access an EJB that is situated in J2ee server B from this jsp file.
    It will be very appreciate if you can tell me how to do that. My current program is:
    try
    Properties props = new Properties();
    props.setProperty(Context.PROVIDER_URL, "rmi://ip:port");
    Context initial = new InitialContext(props);
    Object objref = initial.lookup("MyUserEJB");
    UserHome home = (UserHome) PortableRemoteObject.narrow(objref, UserHome.class);
    Collection users = home.findByName("alin");               
    for(Iterator i=users.iterator(); i.hasNext();)
    User user = (User)i.next();
    System.out.println("User " + user.getFirstName() + " details:\n");
    System.out.println("     email     : " + user.getEmail() + "\n");
    catch (Exception e)
    System.err.println("Caught an exception.");
    e.printStackTrace();
    In which, the MyUserEJB is an EJB in ip:port J2ee server (server B). The server A is localhost:1050. This program does not work.
    Best regards,
    Alan

    Hi,
    Have a look at
    http://forum.java.sun.com/thread.jsp?thread=365927&forum=136&message=1543094

  • Not Using Index on File Server When Accessing User Files Directly on Server

    It appears to me that on a server with an indexed network share (Desktop Experience and Search Indexing roles/features installed), if you access the share directly on the server using its drive path, you can search the folders using the index, which
    is much faster and supports finding words inside of the files in seconds). However, if you access the same shared folder via its network path from the server itself, the server ignores the index. I have this experience/problem across all shared folders on
    the Windows 2012 R2 Server. Details and my most specific goal follows.
    In addition to a laptop, I frequently work directly on a Windows Server 2012 R2 computer. We have Redirected Folders set up on DFS (for failover redundancy) so that my Documents folder is in:
    \\network\redirections\user\documents. This all works fine on Windows 7 and 8 client computers connected to the network via Offline Files.
    The problem is on the server itself. The server has Desktop Experience enabled and Windows Search is installed. If I navigate manually through the DFS root folder to my documents folder, I can search and it properly uses the index. This proves the location
    is properly indexed. However, if I access the folders through the official "Documents" folder from the Folder Redirection (a network share pointing to the same server computer I'm working on), it performs an un-indexed search (slow and ignores file
    contents, but does find files eventually if the search term is in their filename). Is there a way to force the server to use the indexed search on the Redirected Folders (my Documents folder in particular) when working on that server when logged in locally
    on that server?
    I suspect a workaround would be to go into the Registry and manually change the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders to point to the local DFS folder instead of the network share name, but at least one problem
    with this is then if I save files with links to other files (e.g., a linked Excel table in a PowerPoint, a mail merge to Access database in Word, etc.) on the server computer, those links will point to d:\DFSroot\... (a physical drive on the computer) instead
    of \\network\redirections\user\... (a universally accessible network path) and so none of the other computers will be able to find the linked files, defeating one of the
    major benefits of using Redirected Folders.
    I can't believe that I need to choose between indexed searching and proper path names in saved files. Surely there is a way to use an indexed search on the server itself?
    If you need any more info to help me troubleshoot, please let me know.
    Thanks for any help,
    Colin

    Hi Colin,
    It seems that we can not use indexed search on DFS shares. Windows Search works well when users directly access the server. That is, the server is not made available through Distributed File System (DFS).
    For more detailed information, you could refer to the links below:
    Windows Search Service, Clustered File Services, DFS, Win7 Libraries
    https://social.technet.microsoft.com/Forums/windowsserver/en-US/31ac4c16-948b-4ca4-b18f-3a339cdfd5b9/windows-search-service-clustered-file-services-dfs-win7-libraries?forum=winserverfiles
    Windows Browse and Organize Features
    https://technet.microsoft.com/en-us/library/dd744693(WS.10).aspx
    Best Regards,
    Mandy 
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Full EJBs status in J2EE server

    Is it possible to get all EJB(s) status in J2EE server.
    If could, what command or method can help me.
    TIA

    You havent really explained what you want. I believe
    what are expecting is a status of all beans in the
    container. The status means whether the bean has been
    activated or passivated, etc.
    Kindly explain and I may be able to help you out.
    Regards
    Rohit Parik
    [email protected]
    I am sorry that I didn't explain my question clearly.
    Suppose I write an EJB to do some Database query function, and my problem is
    1. EJB container can give me what information?
    2. May I get how many transactions have been process by EJB.
    Sorry for my poor English.
    BTW, thanks your reply.

  • Access to different application in same server

    Any know an easy way to access the JNDI/EJB of a different application
    running in the same server?
    Perry Hoekstra, MS
    E-Commerce Architect
    Talent Software Services

    Only the classfiles of any user-defined classes/interfaces that are possibly used
    as parameters or return values from the methods in the home/remote interfaces. If
    you aren't doing that, then the home and remote interfaces is all you need.
    Bill
    Perry Hoekstra wrote:
    [email protected] wrote:
    Hrm. It's no different from accessing EJB's deployed in the same application
    (EAR) except that local calls are no longer possible.
    Perry Hoekstra <[email protected]> wrote:
    Any know an easy way to access the JNDI/EJB of a different application
    running in the same server?
    Perry Hoekstra, MS
    E-Commerce Architect
    Talent Software Services--
    DimitriI should have explained myself better. I was thinking more from a
    packaging point of view. Beside the remote and home interfaces of the
    called bean, are there any other files necessary to be packaged with the
    calling bean ejb.jar?
    Perry Hoekstra, MS
    E-Commerce Architect
    Talent Software Services
    [email protected]

  • Access to network services in Yosemite Server

    I have healthy Yosemite Servers and when I click on the Users tab I can select the users I'm looking at from one of 4 choices:
    I also have a "sick" server that I'm having trouble accessing from the Internet. I can ssh to it and log in with a local user account but I can't access it from any Network accounts. And when I click on the Users tab in server app I'm only presented 3 choices:
    How do I turn on "access to services" so my Users can reach them. I have File Sharing on, for example, and everything looks fine but when trying to access a file share via afp://myserver.mydomain.com all i get is the cryptic "Access to your account on the server has been denied. Contact your system administrator for more information".
    Other notes. I cannot log in locally on machine with Network accounts. Nor can I reset the password of Network account users. Some other cryptic "error" message. Thoughts? Perhaps an easy way to rebuild my OD Master?
    Thoughts?

    Only the classfiles of any user-defined classes/interfaces that are possibly used
    as parameters or return values from the methods in the home/remote interfaces. If
    you aren't doing that, then the home and remote interfaces is all you need.
    Bill
    Perry Hoekstra wrote:
    [email protected] wrote:
    Hrm. It's no different from accessing EJB's deployed in the same application
    (EAR) except that local calls are no longer possible.
    Perry Hoekstra <[email protected]> wrote:
    Any know an easy way to access the JNDI/EJB of a different application
    running in the same server?
    Perry Hoekstra, MS
    E-Commerce Architect
    Talent Software Services--
    DimitriI should have explained myself better. I was thinking more from a
    packaging point of view. Beside the remote and home interfaces of the
    called bean, are there any other files necessary to be packaged with the
    calling bean ejb.jar?
    Perry Hoekstra, MS
    E-Commerce Architect
    Talent Software Services
    [email protected]

  • Unable to access EJB with servlet as client

    Hi,
    I am Naga, a java developer trying to work with Weblogic6.1 at present.
    When i try to use Servlet as a client to my EJB, I am getting an error
    saying that Home class not found.
    i have kept the Servlet class file under
    E:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\classe
    s
    folder.
    i mentioned the EJB-ref tags in web.xml too, But it is not working.
    How to make the EJB home and remote interfaces visible to Servlet with
    weblogic6.1 ?
    If i put the EJB.jar file under
    E:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\lib
    directory the application is working. Is this is the only way to do ?
    After reading the article "EJB 2 and J2EE Packaging, Part II" at http://www.onjava.com/pub/a/onjava/2001/07/25/ejb.html,
    i came to know that their is another way to do this, but i could not get it properly.
    If any one could explain about the series of steps involved, that would be
    really great and appreciated.
    Thanks in advance
    Naga.

    Hi Naga,
    If webApp and EJB are deployed as separate components,then you need to have EJB
    classes in WEB-INF/classes of your webApp.
    If the app is in EAR format then the servlet can see the EJb classes directly.
    Thanks,
    Vijay
    "Nagamahesh" <[email protected]> wrote:
    >
    Hi,
    I am Naga, a java developer trying to work with Weblogic6.1 at present.
    When i try to use Servlet as a client to my EJB, I am getting an error
    saying that Home class not found.
    i have kept the Servlet class file under
    E:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\classe
    s
    folder.
    i mentioned the EJB-ref tags in web.xml too, But it is not working.
    How to make the EJB home and remote interfaces visible to Servlet with
    weblogic6.1 ?
    If i put the EJB.jar file under
    E:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\lib
    directory the application is working. Is this is the only way to do ?
    After reading the article "EJB 2 and J2EE Packaging, Part II" at http://www.onjava.com/pub/a/onjava/2001/07/25/ejb.html,
    i came to know that their is another way to do this, but i could not
    get it properly.
    If any one could explain about the series of steps involved, that would
    be
    really great and appreciated.
    Thanks in advance
    Naga.

  • Error while stating j2ee server

    I 'm working on Win xp professional operating system.
    While starting the j2ee server from command line
    with the command
    j2ee -verbose
    earlier it was working perfectly but from 2 days its not starting even...even i have reinstalled the j2ee software ....i think there is some internal problem which is not related to setting up the enviornment variables and incorrectly typing of command... plz help me as soon as possible.. i wil be thankful ....
    I am getting error message as follows
    C:\Documents and Settings\Sunita Khilnaney>j2ee
    J2EE server listen port: 1050
    java.io.FileNotFoundException: C:\j2sdkee1.3\logs\compaq\j2ee\j2ee\system.out (A
    ccess is denied)
    at java.io.FileOutputStream.openAppend(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:100)
    at com.sun.enterprise.server.J2EEServer.redirectStreams(J2EEServer.java:
    534)
    at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:209)
    at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:913)
    java.io.FileNotFoundException: C:\j2sdkee1.3\logs\compaq\j2ee\j2ee\system.out (A
    ccess is denied)
    at java.io.FileOutputStream.openAppend(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:100)
    at com.sun.enterprise.server.J2EEServer.redirectStreams(J2EEServer.java:
    534)
    at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:209)
    at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:913)
    java.lang.RuntimeException: C:\j2sdkee1.3\logs\compaq\j2ee\j2ee\system.out (Acce
    ss is denied)
    at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:350)
    at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:913)
    J2EE server reported the following error: C:\j2sdkee1.3\logs\compaq\j2ee\j2ee\sy
    stem.out (Access is denied)
    Error executing J2EE server ...
    C:\Documents and Settings\Sunita Khilnaney>

    1) This is the third thread and second forum you have posted on this same topic. Please cease and desist.
    2) I don't know why you think a JDBC forum is a good place for your J2EE configuration problems anyway.
    3) You didn't bother to respond to the last poster who offered you guidance.
    All in all I wouldn't recommend anyone wasting their time trying to help you until you can stay put in one thread and respond to those who do take the time to try and help you.

  • Problem with Embedded OC4J - Can find EJB class???

    I am getting the following error when starting my application within JDeveloper.
    05/06/22 16:11:35 Error instantiating application 'current-workspace-app' at file:/C:/developc/developc-oc4j-app.xml: Error initializing ejb-module; Exception Error loading class 'com.syncra.ct.server.AggregatesManagerBean': java.lang.ExceptionInInitializerError: java.lang.NullPointerException
    It never reaches breakpoints in the class. So, I assume that it can't find the class in the classpath. But, when I look at the developc-oc4j-app.xml file see the following:
    <ejb-module path="file:/C:/developc/Model/classes/"/>
    <web-module id="developc-ViewController-webapp" path="C:\developc\ViewController\public_html"/>
    and the ejb class is in the correct spot. Any help would be greatly appreciated. I am on JDeveloper 10.1.2.
    Thanks.

    I put a static method in the class to print out when it is loaded. And the class exists in the classpath. It is never making it to the class.
    Also, I do have both the JAVA_HOME and ORACLE_HOME environment variables set.
    The ejb definitions are:
    ejb-jar.xml
    <session>
    <ejb-name>ct.AggregatesManagerHome</ejb-name>
    <home>com.syncra.ct.server.api.AggregatesManagerHome</home>
    <remote>com.syncra.ct.server.api.AggregatesManager</remote>
    <ejb-class>com.syncra.ct.server.AggregatesManagerBean</ejb-class>
    <session-type>Stateful</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    orion-ejb-jar.xml
    <session-deployment name="ct.AggregatesManagerHome" location="ct.AggregatesManagerHome"/>
    Because JDeveloper forces me to split the code into Model and ViewController I am wondering if there is something special that needs to be done for OC4J to see everything. Any ideas?
    Nick

  • JTA/JTS for non-EJB & non-J2EE server used

    I have a standalone java program which calls methods on 2 java classes (c1, c2) These are Non-EJB/non-RMI/non-CORBA plain java classes.
    the method in c1 updates table t1 in database db1
    the method in c2 updates table t2 in database db2
    I would like to use JTA for conducting a 2PC based transaction. I know this can be done in an application/server or a J2EE container environment because they have built-in Transaction Managers (TM). and one just has to use JNDI to look up the UserTransaction object and then define the transaction boundaries. However, how do I all the above if I don't have access to a J2EE server and an EJB server?
    It seems like I would have to use a standalone Transaction Manager (not bundled with the app-server).

    Hi,
    My company has just released a (beta!) version of a generic java transaction manager. Although it offers some lightweight beans as standard development model, this does not have to be the case: the core idea is an extensible and very advanced transaction kernel. JTA comptable.
    This software is server-oriented: the transactional kernel (which also does recovery) startup and shutdown events trigger the start (initialization) and shutdown of your 'extension' classes. This is necessary because otherwise your resources will not be recoverable: if the transaction manager starts up, then it will first do recovery, and therefore your resources need to be available.
    You can ask for a beta version through our website:
    http://www.atomikos.com
    Note, however: we did not yet implement the XA DataSources. Rather, we have a kind of 'external' stored procedures that allow distributed transactions over regular JDBC connections. You would have to implement your solution along this line, or wait for the XA datasources.
    If there proves to be a lot of demand,
    we can of course speed up development on XA. It is not a very big effort.
    Best regards,
    Guy
    Guy Pardon ( [email protected] )
    Atomikos Software Technology: Transactioning the Net
    http://www.atomikos.com/

  • Can't access non ejb classes from JSP - NoClassDefFound error

              Hi,
              I have one session ejb which has a method returning a collection of non ejb class objects (say of Class 'Foo').
              The method signature is like :
              "Collection getFinacialData() throws RemoteException"
              It is working fine with normal java clients. Now when I run this from a JSP it gives a "NoClassDefFoundError". I kept class 'Foo' and the remote interface of the session bean in the same package and also in the same ejb jar file. Also I am running JSP and ejb in same WL server(ver 5.1, SP8 on solaris). What I have done is only deployed the bean jar file. Do I need to do anything more?
              thanks in advance.
              

    I ran into a similar problem. I solved it by putting the client classes for
              accessing my EJB in the WebLogic POST_CLASSPATH in the startWebLogic script
              file:
              set POST_CLASSPATH=d:\weblogic\myserver\myClient.jar
              For more information on class visibility between the JSP and EJB class
              loaders, check out
              http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_deployover.html#1056256
              Rick
              "niroja" <[email protected]> wrote in message
              news:3a6ed903$[email protected]..
              >
              > Hi,
              >
              > I have one session ejb which has a method returning a collection of non
              ejb class objects (say of Class 'Foo').
              > The method signature is like :
              > "Collection getFinacialData() throws RemoteException"
              > It is working fine with normal java clients. Now when I run this from a
              JSP it gives a "NoClassDefFoundError". I kept class 'Foo' and the remote
              interface of the session bean in the same package and also in the same ejb
              jar file. Also I am running JSP and ejb in same WL server(ver 5.1, SP8 on
              solaris). What I have done is only deployed the bean jar file. Do I need to
              do anything more?
              >
              > thanks in advance.
              >
              

Maybe you are looking for

  • Remote Desktop Problems from OSX

    We are using RDS (Server2008R2) to publish RemoteApps and this works really well in Windows 7 & 8 clients and also using the Microsoft Remote Desktop App for iOS. This also used to work well in OSX, but since we changed our domain name the version ru

  • How to modify a default transition?

    how to do you change the values for the default transition? for exmple, i want to apply a cross dissolve to a series of clips. but i want to change the duration of the cross-dissolve before i apply this transition. i can see how to edit a single inst

  • How to create an image that when scrolled over automatically scrolls between 3 image

    What i am trying or rather what i want to achive is, when an image is scrolled over it automaticly scrolls between 3 pictures and when it is rolled off of goes back to a specific image. How do i do something like this i know its going to have to be a

  • Idoc outbound errors05(error during translation) 07(error during syntax ch)

    hi,         i found all idocs in the system fails with status 07(error during syntax check) idoc got different stats:   flow of status:01                       30                       03                       18                       24             

  • Why cant we play pogo games with then flash player we have

    I tried to download current adobe flash player..the version we got should have been 11.7.700.202 but we got 11.4 something or other. we are confused as to how to get the right version installed on our computer..can you help?