[Session Beans]Cannot make any queries!

Hello,
I created a simple session bean and find method works fine. Problem comes with queries...I tried to make this simple query:
Query query = em.createQuery("from Employee e where e.name='myName' ")but I get this exception:
>
GRAVE: [!!EXCEPTION!!] An exception occurred while creating a query in EntityManager:
Exception Description: Syntax error parsing the query [from Employee e where e.name='myName'], line 1, column 0: unexpected token [from].
Internal Exception: NoViableAltException(33@[])
>
and this goes for every query I make...I tried different others but result is always the same...

in HQL you can drop the "select" clause, but i don't think you can do that in the JPA query language. did you try something like "select e from Employee e where e.name='myName'"?
More examples here http://docs.oracle.com/javaee/5/tutorial/doc/bnbtg.html .
Edited by: jtahlborn on Apr 13, 2012 1:01 PM

Similar Messages

  • Hello, I have Windows 7, and I have now to install Windows 8 on my Computer, and since, I cannot make any more of update of Apple of itune in Windows 8. Nor to download  the software recent of itune... That have to I make???

    Hello, I have Windows 7, and I have now to install Windows 8 on my Computer, and since, I cannot make any more of update of Apple of itune in Windows 8. Nor to download  the software recent of itune... That have to I make???

    Hello,
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information. <br>
    '''Note''': ''This will cause you to lose any Extensions and some Preferences.''
    *Open websites will not be saved in Firefox versions lower than 25.
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!
    Thank you.

  • My Bridge CC opens in a locked mode - I cannot make any changes (dump cache) - it says "other instances of Adobe Application Manager are running, which must be closed." I have to force quit Bridge to get out of it. I tried to uninstall Bridge and re-insta

    My Bridge CC opens in a locked mode - I cannot make any changes (dump cache) - it says "other instances of Adobe Application Manager are running, which must be closed." I have to force quit Bridge to get out of it. I tried to uninstall Bridge and re-install it but it did the same thing. Any ideas where to go next?
    The fact that I uninstalled Bridge and reloaded it has me concerned as to what to do next.?

    You need to force quit all other (real or fake) instances of the Application Manager.  Instructions differ between Mac or Win.
    A lot more information about your hardware and software is needed.
    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CC", but something like CC2014.v.2.2) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    a screen shot of your settings or of the image could be very helpful too,
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • In iTunes under my device, under the apps tab, Why are all the options shaded out?  I cannot make any changes, select any apps or do anything with the apps.  I was able to load a few apps and sync but cannot sync anymore to my phone.

    In iTunes under my device, under the apps tab, Why are all the options shaded out?  I cannot make any changes, select any apps or do anything with the apps.  I was able to load a few apps and sync but cannot sync anymore to my phone.

    Hi,
    ( I search for iChat questions when I have finished in the iChat Forum)
    So the menu bar reads iChat, File,  Edit,  View, Buddies, Video, Window and Help
    There is no Buddy List open.
    There is no other window for iChat open.
    In the iChat Menu you only have access to Status.
    Is an item ticked in the list ?
    Is this a green (Available item) or  Red ( an Away one) ?
    Can you access the Accounts option ?  (Sitll in the iChat Menu)
    Is anything in here ticked ?
    In the Window menu any Logged in account should appear in the list  (Between the Next Chat and File Transfer items)
    It would be useful to know which version of iChat this is.
    If no account is ticked (iChat Menu > Accounts) or not showing in the Window Menu, plus you cannot determine the Status and you cannot access the Preferences then you need to access your Home Folder/Library/Preferences
    As the Library in the Home Holder is Invisible in Lion you will need the Finder's Go Menu > Go to Folder option  (you can use it in earlier OS versions if you want)
    Type in:-
    ~/Library/Preferences
    Find the file called com.apple.ichat.plist
    Drag it to the Trash and Restart iChat.
    This will lose all the settings in iChat that you have changed from Defaults but there is no way around this.
    9:23 PM      Saturday; August 27, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Cannot make any outbound calls "internal error"

    i can recieve calls but cannot make any outbound calls to mobile or landlines. Please help!

    International Support - Verizon Wireless
    Call them toll free from another phone. You should have got the Global Plan on your device before you went to Mexico.
    If you have a device with a Sim tray, get a local carriers Sim and use their service. It will cost money in either case.
    Good Luck

  • I cannot make any outgoing calls.

    I do have credit but cannot make any outgoing calls to phone numbers. WHen I hit the call button, there is a long silence (while the icon in the screen says "calling" and then, the call ends automatically.
    please help

    I wonder about the response to this problem. I'm currntly in the UAE and have been now for two weeks and I too am haivng the same problem. The reason for my questioning the response is I didn't come alone. Several individuals and I moved here from Bahrain. I logged off my computer, shut it down, packed it up in my computer bag and carried it on the plan with me. Now we all live in the same building and I'm the only one having problems with Skype. Everyone else has continued to enjoy skype but I cna't make a phone call. Not to a landline or Mobile. I can only receive calls. Again no one else out of the eight of us are having any problems except me. I had no problems with Skype the night before I flew over to the UAE and less than 24 hours later I can't make a single call. I'm using Windows 7 /32 bit and Yes I using the lasted version fo Skype. Is there a solution to this problem

  • Hi, Since updating to 10.7.2 I cannot make any changes to my web site. I just keep getting the same stupid message asking if I have an account even though I am already logged in. Any thoughts. Thanks

    Hi, Since updating to 10.7.2 I cannot make any changes to my web site. I just keep getting the same stupid message asking if I have an account even though I am already logged in. Any thoughts. Thanks

    Go and log out of your MobileMe account and then try logging back in again with a dummy username and password.  This can help clear it and then just log back in again with your normal username and password.
    Note though that iWeb does not require a password or username to use it - this is MobileMe.
    Also, start thinking about MobileMe alternatives before you are forced to in June.

  • HT5312 i am in Iraq right now and i cannot make any schedule for having a call with your support team , however, i forgot the answer for security questions , and also previously i have not summited a rescue Email address is there any way to reset my accou

    i am in Iraq right now and i cannot make any schedule for having a call with your support team , however, i forgot the answer for security questions , and also previously i have not summited a rescue Email address is there any way to reset my account?

    Please be aware that you are not communicating with Apple when you post in these forums. These are user-to-user support forums, so in almost all cases the only people who will reply to your posts are, like me, your fellow users.
    As to whether you can work with Apple via email on this issue I can't say for sure, but you can contact them via this web page:
    http://www.apple.com/support/appleid/contact/
    and see if they can help. It's mostly going to be an issue of you being able to prove to them that you are the account owner.
    Regards.

  • When syncing Apps on my iPhone 5 through iTunes, they are all greyed over and I cannot make any changes. How can I fix this. It never happened with my iPhone 4

    When syncing Apps on my iPhone 5 through iTunes, they are all greyed over and I cannot make any changes. How can I fix this. It never happened with my iPhone 4

    Connect your device to iTunes and in the the window were all the apps are greyed out make sure the 'Sync Apps' checkbox (top left corner) is selected.

  • TS2326 I cannot make any calls or receive any calls since my last iOS update. Does anyone know how to fix this problem

    I cannot make any calls or receive calls from my iPhone after my last update. My phone advises callers I am unavailable and when I try to make calls it takes ages whilst it tries to connect then disabled itself and says call failed. Has anybody else had this problem or does anyone know how to fix it?

    Hi Milrclan,
    Thanks for contributing to the Apple Support Communities. 
    If you're not able to send or receive email from the mail accounts on your iPad after updating iOS, start with these troubleshooting tips:
    Get help with Mail on iPhone, iPad, and iPod touch - Apple Support
    Best Regards,
    Jeremy 

  • HT4642 I have an older Imac.  It is running OSX 10.6.8.  We have two new Ipads and wish to open and use a spread sheet developed on the Imac.  Currently I can open the Spread Sheet but cannot make any entries. How can I fix that problem?

    I wish to use Spread Sheets developed on my Imac (OSX 10.6.8 with Numbers 08) on my new Ipad Mini.  Currently they will open but I cannot make entries.
    Is there some software I need to download to my Ipad ?
    If I update my Imac Numbers 08 will it still work with existing spread sheets ?
    If I upgrade my OSX 10.6.8 will it impact my files originated under my old OSX and will all my programs work?
    Is there a work aropund that will allow me to use those Spread Sheets on my Ipad ?
    As informative as Apple is with their products, I see little that addresses compatability issues.  Art they non existant ?
    I hate to make any changes unless I know I am not going to be causig a lot of grief!
    Any assistance would be appreciated.

    On looking at the secure.log on the iMac with OSX10.6.8, I see these entries at each attempt to scp into the iMac:
    Dec 29 11:06:20 molika sshd[7248]: in pam_sm_authenticate(): Failed to determine Kerberos principal name.
    Dec 29 11:06:26 molika sshd[7246]: Accepted keyboard-interactive/pam for prowat from 137.110.243.132 port 35571 ssh2
    Dec 29 11:06:26 molika com.apple.SecurityServer[26]: Session 0x236a14 created
    Dec 29 11:06:26 molika com.apple.SecurityServer[26]: Session 0x236a14 attributes 0x20
    Dec 29 11:06:27 molika com.apple.SecurityServer[26]: Session 0x236a14 dead
    Dec 29 11:06:27 molika com.apple.SecurityServer[26]: Killing auth hosts
    Dec 29 11:06:27 molika com.apple.SecurityServer[26]: Session 0x236a14 destroyed
    I don't know what to make of this.
    Peter R

  • One session bean cannot implement multiple endpoints?

    Hi.
    I have a stateless session bean, and I wanted it to implement two endpoints.
    So, the bean had to be responsible for two web services.
    However, this does not seem to be possible.
    I do not know enough of J2EE to understand why this is, could anyone please enlighten me? :)
    But more important, what should I do now?
    The first webservice consists of a stateless session bean as endpoint which contains a static object, which manages the information needed for the bean to perform it's task. The object is static, because there can only be one instance of the information.
    The second webservice is used to alter the information that the beans of the other webservice use. Thus, the bean that implements this webservice needs to acquire a reference to the information object of the other webservice's beans.
    As you can image, it would have been very handy if both webservices were implemented by the same bean...
    In short, I have two beans that both have to be able to access a single object.
    The best idea I have now is to create a third bean which manages the information, and have both other beans connect to this bean using local interfaces to manage the information? Is this possible?
    Although it's kind of stupid to create a bean for managing the information, as there may only be one instance of the information ... If I would do it with a bean, I would let it have a static field containing the information.
    But that kind of defeats the use of beans right?
    If beans are meant to be pooled, isn't it kind of stupid if they all access a shared object? Why use a bean to represent the information if there can only be one instance of the information? :s
    I'm also thinking of the concurrency ... I suppose x threads changing the fields of that object at the same time isn't really healty ... And locking is so dirty :s .
    However, 99% of the accesses to this object will be read accesses, and the information in the object is expected to be updated only on a daily basis or so ...
    Which makes locking not that dirty after all...
    Anyway, you can see that I'm stuck here!
    Any advice would be really great!

    My original motivation for the use of one object that manages the information needed for the beans to operate was to prevent DB accesses.
    All the session beans need the same information to operate, so it would be stupid to let every bean get it's information from the database if you can read it once into an object and let the beans get their information from the object.
    In other words: do caching for the database.
    However, I'm wondering if this motivation is correct:
    I can imagine the DB does it's own caching at some point, so I wonder if it even has advantages to do any extra caching...
    However, the caching object knows exactly when it needs to update it's information, so it has an advantage...
    Anyway, the idea of having shared information (in the static field of the bean) might seem like a bad idea, I can't really think of a valid reason why it should be.
    99% of the accesses to the shared information will be read accesses, so thread-wise that's no problem. And the writes will be synchronized.
    Anyway I'm going ahead with my initial design, until I get a better suggestion...
    About your suggestions:
    1. -> That resembles the situation where each bean accesses the DB directly I guess.
    2 & 3: -> If you bind an object in JNDI, aren't you just adding extra complexity to your application? Why would I do that if I can access the object directly?
    4: -> How do you mean different position? To access the same bean from two different URI's is exactly what I wanted, but that doesn't seem to be possible.
    5: -> Multi-threading, bah! Nah I'm avoiding that like a big smelly pile of poo :p .

  • After installing Mavericks I cannot make any Administrator required changes?

    I have downloaded Mavericks but ever since then I cannot install any software that requires an Administrator password. I have checked under Preferences and it is still correct but when installing software it simply doesnt ask me to enter the password and then does not progress to actual installation.
    This is incredibly frustrating as you can imagine - any help gratefully received

    Might be corrupted desktop preferenceds ...
    Open the Finder. From the Finder menu bar click Go > Go to Folder
    Type or copy paste the following:
    ~/Library/Preferences/com.apple.desktop.plist
    Click Go then move the com.apple.desktop.plist file to the Trash.
    Restart your Mac. Then try changing the desktop wallpaper.

  • E7 cannot make any calls

    My E7 can no longer make any phone calls. Everytime I try to make a call its goes beep boop "connection problem" eventhou it has full bars. I got i going again by shutting it down, but now that has stopped working as well. Few time when somebody has called me it has dropped the call at the first second saying "connection problem". What gives?

    Four years old SIM sounds pretty old and as said, please try another
    SIM in your phone just to make sure your phone is ok.
    The new smartphones demands some features also from your SIM-card
    that the older ones doesn't.
    At least here in Finland, where I live, it's easy to get a new SIM from your 
    operator. In my hometown here is tens of places where you can do it in 10 mins,
    and depending where you go, it costs some 10€ or nothing. It can be done
    over the internet also (they'll send a new SIM to your home).
    #SwitchToLumia

  • The kerning tool appears to be stuck? Cannot make any changes to text boxes in new or existing files

    When I try to adjust the kerning in any text box, whether it be in a new or existing file, the change will not take place. It will just automatically return to either the default. Please help!

    Thanks, perhaps this might help. as you can see the kerning is set at 300 which should make the T/E very far apart they aren't. The "after" shows the kerning set at (0), even though I made the change to 300. The cursor is in the correct place, even though it doesn't appear on the screenshots.

Maybe you are looking for

  • I can't successfully migrate an account from my backup disk.

    My mac's hard disk broke down. Therefore, I went to the apple store and they gave me a new hard disk. Then, I went home and tried to migrate all of my previous account's data onto my new hard disk using migration assistant.. One account succeeded, bu

  • PerformancePoint Services of Project Server 2010

    Hi guys. Now I am using Business Intelligence Feature in Project Server 2010. I did build a report show all Project by Dashboard Designer. In report i use Analysis Services type of Data Connection. I did build a Analysis Services Project by SQL Serve

  • Delete Purchased iTunes Movies and TV programs

    I have purchased itunes movies and TV programs that I want to delete from itunes permanently.  They were deleted until I purchased Apple TV.

  • Upper left hand corner?

    I just took my new imac 24 out of the box, and I noticed that there's something that looks like it could be a crack (rounded) or a camera/sensor of some kind in the upper left hand corner of the black portion of the display. I can't find anything - s

  • WinXP Clock Loses Time; Will Re-Sync Cause Problems?

    We've recently upgraded to LabView7.1, and have recently noticed that our system clock is losing time at a much greater rate than it has in the past. The clock can be seen hanging every few seconds in the "Date and Time Properties" view where the dat