EJB Reference could not be resolved (javax.naming.NameNotFoundException)

I am new to EJBs and am trying to get a simple Java client to run which I've generated from a EJB3.0 session bean.
The code for the client (LoanAppFacadeClient.java) is
package buslogic;
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class LoanAppFacadeClient {
public static void main(String [] args) {
try {
final Context context = getInitialContext();
LoanAppFacade loanAppFacade = (LoanAppFacade)context.lookup("java:comp/env/ejb/LoanAppFacade");
// Call any of the Remote methods below to access the EJB
// System.out.println( loanAppFacade.getLoans( ) );
loanAppFacade.addLoan( "Galactic Loans", 30, "fixed", 6.25 );
String ssn = "123-12-1234";
System.out.println(loanAppFacade.getCreditRating( ssn ));
} catch (Exception ex) {
ex.printStackTrace();
private static Context getInitialContext() throws NamingException {
Hashtable env = new Hashtable();
// Standalone OC4J connection details
env.put( Context.INITIAL_CONTEXT_FACTORY, "oracle.j2ee.naming.ApplicationClientInitialContextFactory" );
env.put( Context.SECURITY_PRINCIPAL, "oc4jadmin" );
env.put( Context.SECURITY_CREDENTIALS, "welcome1" );
env.put(Context.PROVIDER_URL, "ormi://localhost:23791/LoanApp");
return new InitialContext( env );
When the trying to run the client I get a warning:
"WARNING: EJB Reference "ejb/LoanAppFacade" could not be resolved."
followed by the error
"javax.naming.NameNotFoundException: java:comp/env/ejb/LoanAppFacade not found in Lab1_BusinessServices-app-client"
When the client was created I right-clicked on the session bean (LoanAppFacadeBean which implements LoanAppFacade) and chose New Sample Java Client.
This automatically creates the java client and also created the following xml file (application-client.xml)
<?xml version = '1.0' encoding = 'windows-1252'?>
<application-client 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/application-client_1_4.xsd" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee">
<display-name>Lab1_BusinessServices-app-client</display-name>
<ejb-ref>
<ejb-ref-name>ejb/LoanAppFacade</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<remote>buslogic.LoanAppFacade</remote>
<ejb-link>LoanAppFacade</ejb-link>
</ejb-ref>
</application-client>
Could someone please help me to fix these errors?
Thanks,
Andrew

I used windows for years whereby I stored all photos in folders. As macs don't use this concept I am finding it hard to organize my photos.
You can do this on your Mac too. Just don't use iPhoto. But iPhoto is a lot more flexible.
For instance:
I usually sort them by month so when I say move to an album I mean I create an album called for example '2013 March' so I can easily find specific photos/videos.
Click on the Magnifying Glass lower left to reveal the search box. Then click on the magnifying glass in the search box, and select Date. Now you can instantly find all the photos from a particular month, or day.
File -> New Smart Album will allow you to create an automatic album for any date or date range you choose.
Select one of the affected videos in the iPhoto Window and go File -> Reveal in Finder -> Original. A Finder Window should open with the file selected. Does it play?

Similar Messages

  • J2EE JNDI-00009 EJB Reference "ejb/SessionEJBCalled" could not be resolved

    When load (run) the following EJB (JDev 10.1.3.1.0 embedded server) loads with no problem:
    package project2;
    import javax.ejb.Stateless;
    @Stateless
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");   }
    When load the following, only difference is name attribute for the @Stateless annotation:
    package project2;
    import javax.ejb.Stateless;
    @Stateless(name="SessionEJBCalled")
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");    }
    Get the following error message - Why?
    2006-08-24 15:48:54.640 WARNING J2EE JNDI-00009 EJB Reference "ejb/SessionEJBCalled" could not be resolved. Allowing J2EEContext creation to continue anyway
    Finally - If I specify the name as per the following all is well:
    package project2;
    import javax.ejb.Stateless;
    @Stateless(name="SessionEJBCalledBean")
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");   }
    Would be appreciated if someone could tell me what is going on?
    Thanks - Ken

    When load (run) the following EJB (JDev 10.1.3.1.0 embedded server) loads with no problem:
    package project2;
    import javax.ejb.Stateless;
    @Stateless
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");   }
    When load the following, only difference is name attribute for the @Stateless annotation:
    package project2;
    import javax.ejb.Stateless;
    @Stateless(name="SessionEJBCalled")
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");    }
    Get the following error message - Why?
    2006-08-24 15:48:54.640 WARNING J2EE JNDI-00009 EJB Reference "ejb/SessionEJBCalled" could not be resolved. Allowing J2EEContext creation to continue anyway
    Finally - If I specify the name as per the following all is well:
    package project2;
    import javax.ejb.Stateless;
    @Stateless(name="SessionEJBCalledBean")
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");   }
    Would be appreciated if someone could tell me what is going on?
    Thanks - Ken

  • TS5168 some of my pictures say that the necessary data reference could not be resolved. help

    some of my pictures say that the necessary data reference could not be resolved. help

    It means iPhoto can't find the file.
    There are 9 different versions of iPhoto and they run on 9 different versions of the Operating System. The tricks and tips for dealing with issues vary depending on the version of iPhoto and the version of the OS. So to get help you need to give as much information as you can. Include things like:
    - What version of iPhoto.
    - What version of the Operating System.
    - Details. As full a description of the problem as you can. For example, if you have a problem with exporting, then explain by describing how you are trying to export, and so on.
    - History: Is this going on long? Has anything been installed or deleted? - Are there error messages?
    - What steps have you tried already to solve the issue.
    - Anything unusual about your set up? Or how you use iPhoto?
    Anything else you can think of that might help someone understand the problem you have.

  • Used "Duplicate Cleaner for iPhoto" now my video files in iPhoto have an error message "A necessary data reference could not be resolved."

    As the title states, I used the app "Duplicate Cleaner for iPhoto" to get rid of 6 GB of duplicate pictures.  However, now when I go to view a video in iPhoto, I get the error message "A necessary data reference could not be resolved."  I am able to view the video clips (with sound, etc.) in Finder.  However, I want to know if there is a way to restore them in iPhoto?????
    Thanks,
    Leslie
    I see that the suggested solution is to restore from back-up... is there anyway to do that without bringing in ALL of the duplicate photos I just deleted?

    Try going back to QuickTime 7.4, we've seen the same problem occur with the 7.5 update. How did you make the .mov file that plays all of the files? For us, the problem shows up with reference movies (such as that .mov) made on a Mac, but works fine if it is created on Windows.

  • When I want to scroll through My picks why do I get this Error message (A necessary data reference could not be resolved."

    When I want to scroll through My pictures  why do I get this Error message (A necessary data reference could not be resolved)

    Before anyone can help, they need information to work with. Basic stuff:
    - What version of iPhoto.
    - What version of the Operating System.
    - Details. What were you doing when the problem arose?
    - Did it ever work properly?
    - Are there error messages?
    - What steps have you tried already to solve the issue.
    Anything else you can think of that might allow someone else to understand your issue.
    With this kind of information somebody can develop a starting point for troubleshooting the issue.
    Posts that consist of "iPhoto doesn't work. Help" or "iPhoto won't print" or "Suddenly I have no photos!!!!!!!!!!" mean that any helper is simply guessing. With information, s/he may be able to get your issue resolved sooner.

  • Iphoto .MOV issue - "a necessary data reference could not be resolved" when opening certain videos

    I have recently perchaced a brand new Mac Book Pro. The apple store very kindly tranfered everything from my old Mac Book to my new Mac Book Pro. I keep my iphoto library on and external hardrive, which seems to be working fine since I moved everything. BUT..."some' movies won't play from my iphoto library and a window appears saying "a necessary data reference could not be resolved". I can find these videos when I search for them in finder manually (I backed everything up before I transfered everything into a file called TEMP VIDEOS), but why can't my iphoto application find them, like it used to...it still still should right!? Very frustrating.
    Please help..
    Thanks

    Actually this happened to me today and although it would not let me play the file it allowed me to use that same file i had exported from iphotos but could not play and then it allowed me to open it in imovie (you can go to import and then get it from the desktop or wherever) although I made a couple of changes to it the main thing is once you drag it into the space to begin a new project you can then right click and select open in finder and that file actually plays......if its cause i made some changes to it i.e trimmed it slightly then its worth doing so.

  • I cannot access my videos anymore in Iphoto. ' A necessary data reference could not be resolved '

    Hi, I can no longer access the videos in my iphoto library. It still shows the screenshot and the duration of the video, but when i open, i get the following message ' A necessary data reference could not be resolved'. What can i do ?
    Tried also to export, but to no avail.
    Thx for suggestions,
    Oscar

    With the amount of information you've provided it's impossible to offer a solution.  We can't see your computer so we need to know the details of your problem and setup, i.e.:
    what version of iPhoto are you using?
    what system version are you running?
    Did you apply any updates or upgrades to iPhoto or the system between the time you last were able to view the video files and now?
    what fixes have you tried?
    where is your library located?
    did you apply any updates or upgrades just prior to the problem occurring?
    are you running a "managed" or "referenced" library?
    what type of Mac?
    how much free space on your boot drive?

  • Error -2000 necessary data reference could not be resolved-- HELP!!!

    So, I work in a nurse's office at a medical school editing video on an iMac 2.33 GHx Intel Core 2 Duo with 3GB 667 MHz DDR2 SDRAM. Mine is the only mac in the office, the rest of the secretaries, nurses, and grad students are on windows XP.
    My job is basically to edit videos (color correct, blur faces of patients' relatives, etc) from a study they did, and export the videos to a DVD (as a data disk, not a DVD with menus) so they can show them to each other and various committees on their windows machines.
    For the longest time, this went off without a hitch, but most recently, I tried burning some .mov files to disk, and whenever they play on any machine (windows xp) we get "Error -2000 necessary data reference could not be resolved." I re-burned the disks, and now, they are selective! They play on some of the office computers, but not all... including the target machine where they will ultimately be screened for a committee... even on the 2nd batch of disks, that error is still present...
    I know about video editing, and to some degree disk burning (I used the "New-->burn folder" option to create the data disk, burning them at 2x speed for reliability). But I don't know enough about computers to figure out what this error means, or why these disks won't work!! Somebody please help!
    (and you can save the sales pitch... I'm a mac user through and through, and there is no way in heck my office will ever have enough money or motivation to switch over)
    Thanks for your help!!

    I wont address the problem but that you should have your videos. Dont you still have them on your camera? If not, just get it from your friend. Btw, do this the next tíme around ... Whenever you plug in the camera and your  iPhoto/pic Application opens up, BEFORE you have iPhoto import them, use Finder to copy the photos over to your HDD or an external drive. This is so that YOU always have the originals BEFORE your pic Application does.

  • Cannot download iTunes trailers (neccessary data reference could not be...)

    error message: a neccessary data reference could not be resolved
    already have Perian Installed (http://www.perian.org/)
    already have Quicktime X natively installed
    installed Quicktime 7.66 from the Mac OS X v10.6 Snow Leopard install DVD:
    Insert your Mac OS X 10.6 Snow Leopard Install DVD.
    Open the Optional Installs folder and double-click "Optional Installs.mpkg".
    Select the QuickTime 7 option and click Continue.
    QuickTime Player 7 will be installed in your Utilities folder.
    then activated Quicktime 7.66 to PRO.
    Safari preferences in security are set to allow for plug ins and extensions
    Safari Menu Bar/click Help/Installed Plug-ins. (Quicktime PlugIn is NOT there)
    Safari folders NOT showing quicktime PlugIn for quicktime
    in MacIntosh HD/Library/Internet Plugins (Quicktime not there)
    in USER/Library/Internet Plugins (NONE AT ALL)
    with Pacifist (http://www.charlessoft.com) reinstalled Quicktime X
    (1) Dowload and install Pacifist
    (2) Insert your Snow Leopard install DVD
    (3) Run Pacifist and choose "Open Apple Install Disks" (takes a bit)
    (4) Search for "Quicktime Player.app"
    (5) Select "Quicktime Player.app" (in Essentials.pkg/Applications)
    and choose "Install to Default Location". - thank you Roy Levien
    HOWEVER, i noticed during that process above the "Quicktime Player.app" i saw the Plugins" and quicktime plug in was there. i extracted that to the default location and IT DID NOT tell me it was already there. So i installed it.
    also,
    i went to the quicktime 7 app, command i, set to open in 32 bit.
    i went to the safari app, command i, set to open in 32 bit.
    Message was edited by: NikaBrady

    * also i saw this comment on another forum but no comments after it.
    (I had the same problem and managed to fix it as follows: I found that I had two Library folders, one in Macintosh HD, one in my User folder. Each Library folder contained a folder for Internet Plug-Ins. I moved the files QuickTime Plugin.plugin and QuickTime Plugin.webplugin from the Macointosh HD/Library/Internet Plug-Ins to User folder/Library/Internet Plug-Ins, and that fixed it.
    Not sure why there are two Library folders, but QuickTime installation seems to have put the plug-ins into the wrong one, and that was the problem)
    has anyone else encountered this problem or have any ideas on the cause or the fix?
    i have done all that can with my limited capabilities and any advice would be greatly appreciated.
    thank you
    Message was edited by: NikaBrady

  • Javax.naming.NameNotFoundException for foreign JMS Connection factory

    I have a foreign jms server configured and when I try and test it I get a Name not found exception.
              javax.naming.NameNotFoundException: Unable to resolve 'jms.SSLQueueConnectionFactory' Resolved jms [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'jms.SSLQueueConnectionFactory' Resolved jms]; remaining name 'SSLQueueConnectionFactory'
              The config.xml looks ok
              <ForeignJMSServer
              ConnectionURL="ssl://eaid1-jms.ges.symantec.com:7243"
              JNDIProperties="" Name="JMS Proxy Dev" Targets="TeamWorksServer">
              <ForeignJMSConnectionFactory
              LocalJNDIName="jms.SSLQueueConnectionFactory"
              Name="MyForeign JMS Connection Factory"
              PasswordEncrypted="{3DES}Es94ikW1TZzBFyDp+3/gktRtDaHWI6j/"
              RemoteJNDIName="SSLQueueConnectionFactory" Username="weblogicUser"/>
              <ForeignJMSDestination LocalJNDIName="jms.WEBLOGIC.TEST.QUEUE"
              Name="MyForeign JMS Destination" RemoteJNDIName="WEBLOGIC.TEST.QUEUE"/>
              </ForeignJMSServer>
              The code i took from the QueueSend example
              package com.symantec.utils.jms;
              import java.io.BufferedReader;
              import java.io.IOException;
              import java.io.InputStreamReader;
              import java.util.Hashtable;
              import javax.jms.*;
              import javax.naming.Context;
              import javax.naming.InitialContext;
              import javax.naming.NamingException;
              /** This example shows how to establish a connection
              * and send messages to the JMS queue. The classes in this
              * package operate on the same JMS queue. Run the classes together to
              * witness messages being sent and received, and to browse the queue
              * for messages. The class is used to send messages to the queue.
              * @author Copyright (c) 1999-2006 by BEA Systems, Inc. All Rights Reserved.
              public class QueueSend
              // Defines the JNDI context factory.
              public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
              // Defines the JMS context factory.
              public final static String JMS_FACTORY="jms.SSLQueueConnectionFactory";
              // Defines the queue.
              public final static String QUEUE="WEBLOGIC.TEST.QUEUE";
              private QueueConnectionFactory qconFactory;
              private QueueConnection qcon;
              private QueueSession qsession;
              private QueueSender qsender;
              private Queue queue;
              private TextMessage msg;
              * Creates all the necessary objects for sending
              * messages to a JMS queue.
              * @param ctx JNDI initial context
              * @param queueName name of queue
              * @exception NamingException if operation cannot be performed
              * @exception JMSException if JMS fails to initialize due to internal error
              public void init(Context ctx, String queueName)
              throws NamingException, JMSException
              qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
              qcon = qconFactory.createQueueConnection();
              qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
              queue = (Queue) ctx.lookup(queueName);
              qsender = qsession.createSender(queue);
              msg = qsession.createTextMessage();
              qcon.start();
              * Sends a message to a JMS queue.
              * @param message message to be sent
              * @exception JMSException if JMS fails to send message due to internal error
              public void send(String message) throws JMSException {
              msg.setText(message);
              qsender.send(msg);
              * Closes JMS objects.
              * @exception JMSException if JMS fails to close objects due to internal error
              public void close() throws JMSException {
              qsender.close();
              qsession.close();
              qcon.close();
              private static void readAndSend(QueueSend qs)throws IOException, JMSException
                   BufferedReader msgStream = new BufferedReader(new InputStreamReader(System.in));
              String line=null;
              boolean quitNow = false;
              do {
              System.out.print("Enter message (\"quit\" to quit): \n");
              line = msgStream.readLine();
              if (line != null && line.trim().length() != 0) {
              qs.send(line);
              System.out.println("JMS Message Sent: "+line+"\n");
              quitNow = line.equalsIgnoreCase("quit");
              } while (! quitNow);
              private static InitialContext getInitialContext(String url)
              throws NamingException
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
              env.put(Context.PROVIDER_URL, url);
              return new InitialContext(env);
              /** main() method.
              * @param args WebLogic Server URL
              * @exception Exception if operation fails
              public static void main(String[] args) throws Exception
              InitialContext ic = getInitialContext("t3://tus1bpmappdin01.ges.symantec.com:7501");
              QueueSend qs = new QueueSend();
              qs.init(ic, QUEUE);
              readAndSend(qs);
              qs.close();
              Any suggestions would be appreciated
              Regards

    I have a foreign jms server configured and when I try and test it I get a Name not found exception.
              javax.naming.NameNotFoundException: Unable to resolve 'jms.SSLQueueConnectionFactory' Resolved jms [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'jms.SSLQueueConnectionFactory' Resolved jms]; remaining name 'SSLQueueConnectionFactory'
              The config.xml looks ok
              <ForeignJMSServer
              ConnectionURL="ssl://eaid1-jms.ges.symantec.com:7243"
              JNDIProperties="" Name="JMS Proxy Dev" Targets="TeamWorksServer">
              <ForeignJMSConnectionFactory
              LocalJNDIName="jms.SSLQueueConnectionFactory"
              Name="MyForeign JMS Connection Factory"
              PasswordEncrypted="{3DES}Es94ikW1TZzBFyDp+3/gktRtDaHWI6j/"
              RemoteJNDIName="SSLQueueConnectionFactory" Username="weblogicUser"/>
              <ForeignJMSDestination LocalJNDIName="jms.WEBLOGIC.TEST.QUEUE"
              Name="MyForeign JMS Destination" RemoteJNDIName="WEBLOGIC.TEST.QUEUE"/>
              </ForeignJMSServer>
              The code i took from the QueueSend example
              package com.symantec.utils.jms;
              import java.io.BufferedReader;
              import java.io.IOException;
              import java.io.InputStreamReader;
              import java.util.Hashtable;
              import javax.jms.*;
              import javax.naming.Context;
              import javax.naming.InitialContext;
              import javax.naming.NamingException;
              /** This example shows how to establish a connection
              * and send messages to the JMS queue. The classes in this
              * package operate on the same JMS queue. Run the classes together to
              * witness messages being sent and received, and to browse the queue
              * for messages. The class is used to send messages to the queue.
              * @author Copyright (c) 1999-2006 by BEA Systems, Inc. All Rights Reserved.
              public class QueueSend
              // Defines the JNDI context factory.
              public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
              // Defines the JMS context factory.
              public final static String JMS_FACTORY="jms.SSLQueueConnectionFactory";
              // Defines the queue.
              public final static String QUEUE="WEBLOGIC.TEST.QUEUE";
              private QueueConnectionFactory qconFactory;
              private QueueConnection qcon;
              private QueueSession qsession;
              private QueueSender qsender;
              private Queue queue;
              private TextMessage msg;
              * Creates all the necessary objects for sending
              * messages to a JMS queue.
              * @param ctx JNDI initial context
              * @param queueName name of queue
              * @exception NamingException if operation cannot be performed
              * @exception JMSException if JMS fails to initialize due to internal error
              public void init(Context ctx, String queueName)
              throws NamingException, JMSException
              qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
              qcon = qconFactory.createQueueConnection();
              qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
              queue = (Queue) ctx.lookup(queueName);
              qsender = qsession.createSender(queue);
              msg = qsession.createTextMessage();
              qcon.start();
              * Sends a message to a JMS queue.
              * @param message message to be sent
              * @exception JMSException if JMS fails to send message due to internal error
              public void send(String message) throws JMSException {
              msg.setText(message);
              qsender.send(msg);
              * Closes JMS objects.
              * @exception JMSException if JMS fails to close objects due to internal error
              public void close() throws JMSException {
              qsender.close();
              qsession.close();
              qcon.close();
              private static void readAndSend(QueueSend qs)throws IOException, JMSException
                   BufferedReader msgStream = new BufferedReader(new InputStreamReader(System.in));
              String line=null;
              boolean quitNow = false;
              do {
              System.out.print("Enter message (\"quit\" to quit): \n");
              line = msgStream.readLine();
              if (line != null && line.trim().length() != 0) {
              qs.send(line);
              System.out.println("JMS Message Sent: "+line+"\n");
              quitNow = line.equalsIgnoreCase("quit");
              } while (! quitNow);
              private static InitialContext getInitialContext(String url)
              throws NamingException
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
              env.put(Context.PROVIDER_URL, url);
              return new InitialContext(env);
              /** main() method.
              * @param args WebLogic Server URL
              * @exception Exception if operation fails
              public static void main(String[] args) throws Exception
              InitialContext ic = getInitialContext("t3://tus1bpmappdin01.ges.symantec.com:7501");
              QueueSend qs = new QueueSend();
              qs.init(ic, QUEUE);
              readAndSend(qs);
              qs.close();
              Any suggestions would be appreciated
              Regards

  • Javax.naming.NameNotFoundException: Unable to resolve ejb-link.

    Env: JDK 1.3.1_08
    Weblogic: 7.0
    We are attempting to use EJB's (session) and have it all localized in a jar.
    The Business and Custom Logic is all compiled to WEB-INF/classes. All the jars including the EJB jar is under WEB-INF/lib.
    On Startup Weblogic throws the error message
    weblogic.management.ApplicationException: activate failed for application
    Module Name: application, Error: weblogic.j2ee.DeploymentException: Could not setup environment - with nested exception:
    [javax.naming.NameNotFoundException: Unable to resolve ejb-link. Appejb.jar#AppServerBean is not in the context. The context includes the following link bindings: {} Make sure the link reference is relative to the URI of the referencing module.]
    I have tried using the ../ notation before the Appejb.jar in the web.xml and what not, but that does not work either.
    I have sucesfully deployed the EJB jar through the weblogic console.
    Any Clues or suggestions will be most appreciated..
    thanks
    -a

    Create a ear application from the ejb jar and web application war.
    Copy ear application to the applications directory.
    In the ejb-link element in web.xml specify the relative path to the ejb jar.
    <ejb-link>../Appejb.jar</ejb-link>
    thanks,
    Deepak
    Akshay <[email protected]> wrote:
    Env: JDK 1.3.1_08
    Weblogic: 7.0
    We are attempting to use EJB's (session) and have it all localized in
    a jar.
    The Business and Custom Logic is all compiled to WEB-INF/classes. All
    the jars including the EJB jar is under WEB-INF/lib.
    On Startup Weblogic throws the error message
    weblogic.management.ApplicationException: activate failed for application
    Module Name: application, Error: weblogic.j2ee.DeploymentException: Could
    not setup environment - with nested exception:
    [javax.naming.NameNotFoundException: Unable to resolve ejb-link. Appejb.jar#AppServerBean
    is not in the context. The context includes the following link bindings:
    {} Make sure the link reference is relative to the URI of the referencing
    module.]
    I have tried using the ../ notation before the Appejb.jar in the web.xml
    and what not, but that does not work either.
    I have sucesfully deployed the EJB jar through the weblogic console.
    Any Clues or suggestions will be most appreciated..
    thanks
    -a

  • Javax.ejb.EJBException: Could not instantiate bean

    Hi All,
    I get the following exception when i run my EJB Client code.
    Exception in thread "main" java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.ServerException: EJBException:; nested exception is:
    javax.ejb.EJBException: Could not instantiate bean
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:325)
    at sun.rmi.transport.Transport$1.run(Transport.java:153)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
    at java.lang.Thread.run(Thread.java:595)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
    at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
    at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:118)
    at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:227)
    at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:167)
    at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
    at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
    at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
    at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
    at $Proxy1.create(Unknown Source)
    Caused by: javax.ejb.EJBException: Could not instantiate bean
    at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:180)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:78)
    at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:41)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:300)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:146)
    at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:116)
    at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:121)
    My Client Code is as follows:
    package com.css.sample.client;
    import com.css.sample.MyHome;
    import com.css.sample.MyRemote;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    public class MyClient {
    /** Creates a new instance of MyClient */
    public MyClient() { }
    public static void main(String args[]) throws Exception {
    Context ctx = new InitialContext();
    Object objRef = ctx.lookup("MyBean");
    MyHome home = (MyHome) PortableRemoteObject.narrow(objRef, MyHome.class);
    MyRemote remote = home.create();
    String name = remote.printName("Test");
    System.out.println("Name : " + name);
    ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar version="2.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://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
    <display-name>MySampleEjbBean</display-name>
    <enterprise-beans>
    <session>
    <display-name>MyEjbBean</display-name>
    <ejb-name>MyEjbBean</ejb-name>
    <home>com.css.sample.MyHome</home>
    <remote>com.css.sample.MyRemote</remote>
    <ejb-class>com.css.sample.MyEjb</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>MyEjbBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>NotSupported</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    jboss.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <jboss>
    <enterprise-beans>
    <session>
    <ejb-name>MyEjbBean</ejb-name>
    <jndi-name>MyBean</jndi-name>
    <configuration-name>Standard Stateless SessionBean</configuration-name>
    </session>
    </enterprise-beans>
    </jboss>
    I dont know where the problem occurs. Please help.

    There should be a 'caused by' entry in your stack.
    If your ejbCreate() method is connecting to the DB and this error only occurs when the DB is down - what exactly is your question?
    m

  • Javax ejb CreateException: Could not create stateless EJB

    Hi,
    I have a JavaEE (EJB3.0) project deployed on glassfish2.1 as -.ear (exported from eclipse3.4 to the autodeploy-folder) with -.ejb.jar, -.webui.war, general-lib-base.jar (some other...)
    The session bean is invoked by a jsf-managed bean. Have a pure annotation +@ejb+ in managed bean (identifiing the ejb-interface (+@Remote+) ...the ejb is annotated with +@stateless+
    get the following error message:
    *...nested exception is: javax.ejb.CreateException: Could not create stateless EJB*
    as beginner in the JavaEE-field I'm looking for some help concerning the possible causes.
    thank's for any comment...
    (also posted in the Enterprise JavaBeans-forum possibly better there)

    problem fixed: in the deployment-descriptor ejb-jar.xml a spezification of the session-bean hung around ...very annoying!

  • Javax.naming.NameNotFoundException: ejb/collaxa/system/DeliveryBean not fou

    Hi,
    I'm trying to run an esb process that invokes a bpel process but I'm getting the following error invoking bpel:
    oracle.tip.esb.server.common.exceptions.BusinessEventFatalException: Se ha devuelto una excepción no tratada en el sistema ESB. La excepción mostrada es: "java.lang.Exception: Fallo al crear el bean "ejb/collaxa/system/DeliveryBean"; la excepción mostrada es: "javax.naming.NameNotFoundException: ejb/collaxa/system/DeliveryBean not found
         at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:52)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279)
         at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)
         at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:174)
         at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:158)
         at oracle.tip.esb.server.service.impl.bpel.BPELService.processBusinessEvent(BPELService.java:342)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(InitialEventDispatcher.java:106)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:85)
         at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1416)
         at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:105)
         at oracle.tip.esb.server.service.EsbRouterSubscription.onBusinessEvent(EsbRouterSubscription.java:273)
         at oracle.tip.esb.server.dispatch.EventDispatcher.executeSubscription(EventDispatcher.java:138)
         at oracle.tip.esb.server.dispatch.DeferredEventDispatcher.processSubscriptions(DeferredEventDispatcher.java:150)
         at oracle.tip.esb.server.dispatch.EventDispatcher.dispatchRoutingService(EventDispatcher.java:94)
         at oracle.tip.esb.server.dispatch.DeferredEventDispatcher.dispatch(DeferredEventDispatcher.java:67)
         at oracle.tip.esb.server.dispatch.agent.JavaDeferredMessageHandler.handleMessage(JavaDeferredMessageHandler.java:115)
         at oracle.tip.esb.server.dispatch.agent.ESBWork.process(ESBWork.java:162)
         at oracle.tip.esb.server.dispatch.agent.ESBWork.run(ESBWork.java:120)
         at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
         at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
         at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
         at java.lang.Thread.run(Thread.java:595)
         at com.oracle.bpel.client.util.ExceptionUtils.handleServerException(ExceptionUtils.java:82)
         at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:254)
         at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:174)
         at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:158)
         at oracle.tip.esb.server.service.impl.bpel.BPELService.processBusinessEvent(BPELService.java:342)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(InitialEventDispatcher.java:106)
         at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:85)
         at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1416)
         at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:105)
         at oracle.tip.esb.server.service.EsbRouterSubscription.onBusinessEvent(EsbRouterSubscription.java:273)
         at oracle.tip.esb.server.dispatch.EventDispatcher.executeSubscription(EventDispatcher.java:138)
         at oracle.tip.esb.server.dispatch.DeferredEventDispatcher.processSubscriptions(DeferredEventDispatcher.java:150)
         at oracle.tip.esb.server.dispatch.EventDispatcher.dispatchRoutingService(EventDispatcher.java:94)
         at oracle.tip.esb.server.dispatch.DeferredEventDispatcher.dispatch(DeferredEventDispatcher.java:67)
         at oracle.tip.esb.server.dispatch.agent.JavaDeferredMessageHandler.handleMessage(JavaDeferredMessageHandler.java:115)
         at oracle.tip.esb.server.dispatch.agent.ESBWork.process(ESBWork.jav
    I know that the processes work fine because I have deployed them in another server and they are working fine. The esb process invokes the bpel without problems.
    I have read some threads in this forum where this error appears, but they are related to jsps, and the solution given doesn't apply.
    I really appreciate any help. Thanks in advance,
    Zaloa

    here is the detailed properties.
    properties.put("java.naming.factory.initial",                         "com.evermind.server.rmi.RMIInitialContextFactory");
                   properties.put("java.naming.provider.url", "ormi://localhost");
                   properties.put("java.naming.security.principal",
                             "admin");
                   properties.put("java.naming.security.credentials",
                             "welcome"

  • Javax.ejb.EJBException: Could not unmarshal method ID; nested exception is:

    When i am calling a method getewebLevel() from the service layer getting this exception, in the view controller java file, but when i am calling this method from the Model layer, main file it's giving me correct result... but when extending to the view layer getting this :-- i have created the data controls and also added the bindings to the .jsff files
    javax.ejb.EJBException: Could not unmarshal method ID; nested exception is:
         java.rmi.UnmarshalException: Method not found: 'getewebLevel(Ljava.lang.String;)'; nested exception is: java.rmi.UnmarshalException: Method not found: 'getewebLevel(Ljava.lang.String;)'
    java.rmi.UnmarshalException: Method not found: 'getewebLevel(Ljava.lang.String;)'
    Edited by: 971944 on Dec 11, 2012 11:17 PM

    Where is the method getewebLevel located - in Model or ViewController ?

Maybe you are looking for