Can't get EJB injection to work, Please Help!

I'm new to EJB 3.0, so I tried the "sample" EJB 3.0 stateless session bean sample from Oracle for JDev. (I'm using JDev 10.1.3.1.0 bld. 3984), very simple stuff:
package project1;
import javax.ejb.Remote;
@Remote
public interface Hello {
void sayHello(String inStr);
and
package project1;
import javax.ejb.Stateless;
@Stateless(name="Hello")
public class HelloBean implements Hello {
public HelloBean() {
public void sayHello(String inStr) {
System.out.println("Hello " + inStr );
I can deploy the Bean w/ no problems to the embedded OC4J (in JDev) by just clicking "Run" on it, and I can successfully run the "Client" based on the "Older" implicit JNDI look up as follows:
package project1;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class HelloClient {
public static void main(String [] args) {
try {
final Context context = getInitialContext();
Hello hello = (Hello)context.lookup("Hello");
Call any of the Remote methods below to access the EJB
hello.sayHello("John Doe");
} catch (Exception ex) {
ex.printStackTrace();
private static Context getInitialContext() throws NamingException {
// Get InitialContext for Embedded OC4J
// The embedded server must be running for lookups to succeed.
return new InitialContext();
The above client code works fine, too.
But when I try to run the following client (It compiles fine):
package project1;
import javax.ejb.EJB;
public class HelloClient {
@EJB private static Hello hello;
public static void main(String [] args) {
try {
hello.sayHello("John Doe");
} catch (Exception ex) {
ex.printStackTrace();
It DOES NOT work, the @EJB private static Hello hello seem to never get executed, as "hello" is always null and I get a null pointer exception on (hello.sayHello("John Doe"));.
I even tried to be more explicit and tried:
@EJB(name="Hello"") private static Hello hello
with no luck either.
What am I doing wrong?
I read all the threads here and no one seems to have problems w/ the provided sample, I even did a fresh re-install of my JDev with no help.
Thanks,
Reza

Hi,
duplicate post of
OC4J don't FULLY support injection of EJB implementing multiple interfaces?
Frank

Similar Messages

  • I can not get my iTunes to work, please help

    ok when i click to open itunes, i get the window asking me whether or not I agree to the Itunes software license agreement. I click agree and then i get an error message stating that "The itunes application could not be opened. An unknown error occured [-48].
    Can somebody please help me or if anyone even knows a number i could call for support regarding itunes, i would greatly appriciate that.
    Thank you

    Do you have a valid payment method entered in your account? If yes then contact iTunes.
    Contact iTunes

  • Can not get my iphone to work please help

    i done every thing to get my iphone to work with straight talk please help me i need a phone i have bad health famiy members

    https://discussions.apple.com/message/23872549#23872549

  • I am a new ipod touch user; have gone through all the dowload/install stuff, plugged the device into my computer but ipod screen still shows plug in to tunes.  I am totally computer useless - how can I get my ipod to work, please?  Charles Jones.

    I am a new ipod touch user; have gone through all the dowload/install stuff, plugged the device into my computer but ipod screen still shows plug in to tunes.  I am totally computer useless - how can I get my ipod to work, please?  Charles Jones.

    You did install the latest iTunes (10.5) right?  If the problem was that iTunes does not see the iPod try:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows
    or
    iPhone, iPad, iPod touch: Device not recognized in iTunes for Mac OS X

  • I down loaded about 100 cds to my library and I can no longer view the downloaded artwork it's shows a black picture or blank. How can I get the artwork back? Please help! Thank you

    I downloaded about 100 cds to my library and I can no longer view the downloaded artwork it's shows a black picture or blank. How can I get the artwork back? Please help! Thank you.

    Hi- apparently I also had a similar moment of madness and thought that 'freeride games' would be fun. Well, so much for that! It added a ton of things to my tool bar, I would like to uninstall it, any suggestions for this one?
    thanks :)

  • Can't get on internet.. PLEASE HELP!!

     I thought I was computer savvy and told a friend at work that has an issue with her internet that I could fix it. I am having more trouble than I thought. She told me it was a Windows 7 and it is a Dell Windows XP Professional service pack 3. I am not
    very familiar with them. 
    She told me that she had uninstalled some programs she felt were slowing her computer down and now her wireless is not working the light is not on, the switch is on but when I go into network adapters all there is, is a 1394 Net Adapter and a Broadcom NetXtreme
    and it acts like it needs a cable plugged in to get online when she has never had to use a cable before. I can not find anywhere where there is wireless settings or anything.
    Someone please help, this lady is super nice and I would hate to let her down. I have the computer here with me now and if anyone could help I would appreciate is so much

    I think you are confusing the connection to your AirPort as being the same thing as a connection to the internet. The fact that you are connecting to the AirPort is great, but you can get a legitimate DHCP address and full signal strength even if the AirPort is completely disconnected from your cable/DSL modem.
    1) Crack open AirPort Admin Utility and click the "Internet" tab. What address does the AirPort have? Hopefully not one that starts with 169. Tell us what you have for IP addrss, subnet, router and DNS (even if the DNS are any greyed out).
    2) In the Utility folder crack open Network Utility and ping this: 64.142.120.111 the address for just-ping.com. They won't mind! Do you get dropped packets or does the ping return? If the packets are dropped, then your AirPort has no connection to the net. If the packets successfully return, then your IP connection is good, but you have no DNS service.
    3) Open Safari, enter 64.142.120.111 into the address field. Does it resolve to just-ping.com? Again, if it does, then your connection is good, but you have no DNS service. If it times out, then the internet connection is NFG.
    Let us know!

  • Getting EJB spec violation error - please help

    I'm getting following error while trying to deploy my stateless SB.
    17:13:30,399 WARN [verifier] EJB spec violation:
    Bean : UnifiedMsg
    Method : public abstract UnifiedMsg create() throws CreateException, RemoteExcep
    tion
    Section: 7.10.6
    Warning: The method return values in the home interface must be of valid types f
    or RMI/IIOP.
    17:13:30,399 ERROR [MainDeployer] could not create deployment: file:/C:/AddOnPkg
    /jboss-3.2.5/server/all/deploy/webmail_ejb_session_umm.jar
    org.jboss.deployment.DeploymentException: Verification of Enterprise Beans faile
    d, see above for error messages.
    at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:517)
    at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
    at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    I've double check the section 7.10.6 requiremnts and do not find anything wrong. Stuck at this from many days,PLEASE HELP
    SB home interface is as follow:
    import java.util.*;
    import javax.ejb.*;
    import java.rmi.*;
    public interface UnifiedMsgHome extends EJBHome {
    public UnifiedMsg create() throws CreateException, RemoteException;

    Hai,
    My dear friends, I am getting some problem. In my system only. mean. I am getting from the CVS and as our batch file i am deploying. I thing, this problem i am only getting in my team. By givein this error. i repleace the JBoss server from my backup softwares. Even it is giving same error. three of our team also check the bug, but not able to resolve. Let me know any external errors instemd of ejb method errors. because it is working in the other systems.
    the bug details:
    14:20:56,717 INFO [EARDeployer] Init J2EE application: file:/D:/jboss-4.0.2/server/default/deploy/matrix.ear
    14:21:02,530 WARN [verifier] EJB spec violation:
    Bean : AddressManagerSessionBean
    Section: 22.2
    Warning: The Bean Provider must specify the fully-qualified name of the Java class that implements the enterprise bean's busines
    Info : Class not found on 'uk.ses.matrix.address.bean.AddressManagerSessionBean': Unexpected error during load of: uk.ses.matr
    14:21:02,530 WARN [verifier] EJB spec violation:
    Bean : ADMCustomerSessionBean
    Section: 22.2
    Warning: The Bean Provider must specify the fully-qualified name of the Java class that implements the enterprise bean's busines
    Info : Class not found on 'uk.ses.matrix.address.bean.ADMCustomerSessionBean': Unexpected error during load of: uk.ses.matrix.
    14:21:02,530 WARN [verifier] EJB spec violation:
    Bean : ADMServicePointSessionBean
    Section: 22.2
    14:21:02,608 ERROR [MainDeployer] could not create deployment: file:/D:/jboss-4.0.2/server/default/tmp/deploy/tmp17389matrix.ear
    org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
    at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:553)
    at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
    at org.jboss.deployment.MainDeployer.create(MainDeployer.java:910)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
    at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    please give suggestions to solve this.

  • Problem getting wi-fi to work. please help me.

    Hi,
    In my home, I have AT&T/Bellsouth DSL internet service with a download speed of 1.5 megabits and a Belkin wireless router. I have never had any problems whatsoever in getting any device to work with the network. I currently use two laptop computers, and stream Sirius internet radio over it. Well now with my new iPhone, it doesn't work on my network at all. I can connect my iphone to my network, it shows that I'm connected with a strong signal with all 3 bars on the icon on the screen, though I get zero internet usage with the phone. I went to the Apple Store yesterday and it connected to their network just fine and I had blazing speed, so I know that there doesn't seem to be anything wrong with my iPhone. Would someone please help me? I would greatly appreciate it.
    Thanks,
    Harbeth
    iMac G5 & BlackBook Mac OS X (10.4.10)

    Okay, I now have a solution. I found this information in another thread. I implemented it, and now my iPhone works on my network.
    "After reading many posts with many helpful suggestions:
    I was able to make my iphone work on my home wirless connection by choosing from the main screen
    "settings" then "Wi-fi" then under "Choose a Network" I selected my home network (Belkin) (little blue arrow at the end) then under "IP Address" I chose the "static" button clicked on the "DNS" numbers and entered the the DNS addresses of my router as shown on the summary page when I logged on to my router from my home computer. As for how to log on to your router and find your DNS addresses refer to your router documentation. I tried many of the other solutions and this is so far the only way I could get a connection to actually work. It would always show the strong network signal on my phone but would not be able to connect to the internet and find the server. Like some others who have posted, until this solution I was able to borrow a connection from my neighbor with no problems but his router was a linksys. Hopefully Apple will be patching up all these issues soon.
    I have no idea if this solution is permanent or even a good idea but it worked for me. Your mileage may vary. I do love the phone."
    Thanks to everyone for responding.
    Happy iPhoning,
    Harbeth
    iMac G5 & BlacBook

  • BlackBerry z10 can't get access to mobile network, please help!

    Hi, i got my unlocked z10 a few days ago and still i can't get access to mobile network. Only wifi have worked for me till now.. i used the same sim card as my old phone (where i i got access fine). I've tried rebooting and switched every setting on and off etc. Could any one please help me with this..

    Since you are using the same sim I suggest you contact your service provider to check your provisioning.
    Let me know if this help.

  • My Creative Cam wont work properly in MSN Messenger! I cant get the effects to work PLEASE HELP!

    When I open the webcam centre everything works fine I can get all the effects...BUT when I open messenger (MSN) I get a good picture but when I open the effects window I cant get the effects to work in there.... I went to the creative site which tells me I can use this cam ok in MSN Messenger....Please help before I pull my hair outThankyouBillie-Jean x

    I had the exact same issue but finally after much reading found that the Advanced Video FX utility must be activated first, then open the Web Cam Center.
    On the upper left side just above your image is a Device Selection box. You may not redily recognize it as such.. Click on the down arrow just to the left of the Format tab and select the "Creative WebCam(With Video Effects)". Now try the effects. This did the trick for me. Hope it works for you!

  • Can't get passed this install problem - Please help Adobe.

    I've downloaded the TRIAL version of PRODUCTION PREMIUM CS6. Once running / installed and tested it I will purchase it.
    But cannot get past this ERROR problem.
    Here is my install ERROR log ADOBE..  Please help.
    URGENT.
    Exit Code: 6
    Please see specific errors and warnings below for troubleshooting. For example,  ERROR: DF027, DW063 ...
    -------------------------------------- Summary --------------------------------------
    - 0 fatal error(s), 4 error(s), 0 warning(s)
    ----------- Payload: {9124DF4E-617D-486B-A970-8FA632244F24} Adobe Photoshop CS6 Core 13.0.0.0 -----------
    ERROR: DF027: Unable to copy file from "/private/tmp/.tempdir6Qpuljrb/Assets1/Application/Adobe Photoshop CS6.app/Contents/Resources/PS_LevelsIcon.icns" to "/Applications/Adobe Photoshop CS6/Adobe Photoshop CS6.app/Contents/Resources/PS_LevelsIcon.icns" (Seq 1205)
    ERROR: DW063: Command ARKCopyFileCommand failed.(Seq 1205)
    ERROR: DW050: The following payload errors were found during install:
    ERROR: DW050:  - Adobe Photoshop CS6 English Language Pack_AdobePhotoshop13-en_US: Install failed
    ERROR: DW050:  - Adobe Photoshop CS6 Core: Failed due to Language Pack installation failure

    You can try resolving your issue using following document :
    http://helpx.adobe.com/creative-suite/kb/error-exit-6-exit-7.html
    and
    http://helpx.adobe.com/creative-suite/kb/error-unable-copy-file-tmp.html
    Regards,
    Sharath Holla.

  • Can't get back my Apple ID, please help.

    Hello,
    Yesterday, like everyone else, I wanted to sync my account to iCloud, the thing is my Apple ID wasn't verified, and whatever I did, I couldn't send a "Verify mail" via the https://appleid.apple.com/ site. So after searching here and there, I read that what you needed to enter a new apple ID, verify it, and then change it back to the prior Apple ID, The first part worked (of course...) but now for some reason I cannot go back to my original Apple ID, when I try to save it, the screen just load, refreshes like nothing changed...
    Could someone please help me?
    Thank you.
    Jharryone

    Click here, explain to them that you can't call, and see what they say.
    (120676)

  • I have a new MacBook Air and I set my password the other night and forget what I selected. Now I can't start using the computer because I can't get through password gates! Please help!!

    I have a new MacBook Air. I set my password the other night when I was half asleep and can't remember it. Im still working on my old MacBook Air and can't get through the password gate on my new one. How can I reset it on that computer? I can't even get to the internet.
    Thanks!

    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Select Terminal from the Utilities menu. At the Terminal prompt enter:
    resetpassword
    Press RETURN. You will get a GUI in which you can reset your password.

  • Problems with getting BB world to work :( Please help MME

    Hi there So I've installed BB World onto my phone, but when I go onto it this is what happens;
    1. 'Blackberry ID
         App World requires the latest version of Blackberry ID.
         Close   or     Update'
    2. So I click update, then this is what it says;
        ' App World requires the latest version of Blackberry ID.'
        'The software upgrade was interrupted. Please try again.'
        'Close   or     Retry'
    3. I press on retry multiple times, but nothing happens. So, I give up and press the escape button. Then this         pops up;
    'Blackberry ID installation failed. Please try again later. (80002)' So then I press 'OK' and it brings me back to the homescreen.
    Please help me, I've been trying to search for a solution for two days all over the internet, but no luck.
    Thanks, replies much appreciated. 
    Solved!
    Go to Solution.

    RachelRawr wrote:
    I deleted the AppWorld, did a bat pull (You said do a batt pull as the 2nd step if you look at your last post)
    Yes, but step 1 was to remove AW, which, based on your question, you'd not yet done...so you'd not yet have been on to step 2...
    RachelRawr wrote:
    (And when I said downloading I meant downloading Blackberry ID)
    Oh! So you'd proceeded before I had answered that question...OK...I think I'm understanding you now...
    RachelRawr wrote:
    So I'm installing a fresh copy of appworld at the moment, I'll let you know how it goes within half and hour.
    Cool.
    RachelRawr wrote:
    Sorry, I must seem like a real pain in the backside 
    Not at all! I wouldn't volunteer my time here if I didn't want to help!
    Cheers!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Can I get a phone that works please?

    My Droid Bionic is probably the worst phone I have ever had. The battery is terrible, lasting only about 3-4 hours. I purchased the extended battery; thank you for that extra hour after spending nearly $40 for the extended battery. It is also very slow when trying to go from inactive to active, but my favorite (please hear my sarcasm when I say favorite) is when it turns itself off while I am in the middle of a call, a reminder, a text, you name it. WOW!! and I still have more than a year left on my contract. Any suggestions???

    You could try a system cache clear; shouldn't erase any of your data.  You could purchase a phone off ebay or swappa or somewhere until you're eligible for an upgrade.  Verizon also has their Certified Pre-Owned Replacement Program: 
    Certified Pre-Owned Replacement Program | Verizon Wireless*
    System cache clear:
    Power down phone
    Hold volume up/down & power simultaneously
    Use volume down to navigate to 'Recovery', use volume up to select
    Should see screen with triangle and exclamation point next to an Android
    Press volume up/down simultaneously
    Use volume rocker to navigate to 'wipe cache' and use power button to select
    Once finished, use volume rocker to navigate to 'reboot system now' and use power button to select

Maybe you are looking for

  • OLK folder delete Office 2010

    I am trying to delete the content of Outlook 2010. The location is right. Using the following script as a logoff script to delete the content (location of Office2010 is the right one there are the files but they stay there after several restart of th

  • Charged Rs. 60 for setting up Ipad through I Tunes

    I bought new Ipad 4 yesterday. Why i was charged Rs. 60 for setting up Ipad through I Tunes. Is it one time or recurring?? This is surprising.... How can one charge when i have not downloaded anything from I Tune

  • What's the difference between MBA 13' mid 2011 and 2014 model?

    Well so I bought my current MacBook Air 13 inch mid 2011 model about 2+ years ago. Recently the screen got cracked and it's getting slower so I'm tinking of buying a new laptop. I looked at spects of the current 2014 model and my MBA from About My Ma

  • Scanning but not printing with Lexmark P3120 on OS X 10.4.11

    Hi all, Im having some trouble to set up my Lexmark printer on my MacBook (OS X 10.4.11). Its a USB printer and Ive downloaded the most recent drivers from Lexmarks site, the scanner feature works fine, but cant really print... Keeps on saying "Print

  • Best settings to fix interlacing

    So now that I've been working in HD, my video looks fine as I edit, but once I export I get this really ugly interlacing going on. It looks awful when I play it on my computer, but if I put the video on a DVD it plays smoothly on Standard and HD TV's