JPA problem need help on JoinColumn, OneToMany, and ManyToOne annotations

I made a mistake in placing a foreign key.
but I don't really get what wrong with it
I have followed what shown on the book
Could somebody help me out? thanks!
package com.h2o;
import javax.persistence.*;
import java.util.*;
@Entity
@IdClass(h2oUserId.class)
@NamedQuery(name="findAllUsers", query="SELECT h FROM h2oUser h")
public class h2oUser {
     @Id @GeneratedValue(strategy=GenerationType.SEQUENCE) @Column(name="H2O_ID")
     private Long id;
     @Id
     @Column ( nullable = false)
     private String email;
     @Column ( nullable = false)
     private String nickName;
     @Column ( nullable = false)
     private String password;
     private String basePath;
     private String avatorPath;
     private boolean activated;
     @Temporal(TemporalType.DATE)
     private Date createDate;
     @Transient
     private static final String LARGE = "original";
     @Transient
     private static final String SMALL = "thumbernail";
     @OneToMany(mappedBy="h2oUser")
     private Collection<ImageBase> images;
        //getters and setters
package com.h2o;
import javax.persistence.*;
@Entity
public class ImageBase {
     @Id @GeneratedValue(strategy=GenerationType.SEQUENCE)
     private Long id;
     @Column(unique=true)
     private String imgFile;
     @Column(nullable=true)
     private String imgOriginalFile;
     @ManyToOne
     @JoinColumn
     private h2oUser user;
        //getters and setters
Caused by: org.hibernate.MappingException: Could not determine type for: com.h2o.h2oUser, at table: ImageBase, for columns: [org.hibernate.mapping.Column(user)]
     at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:304)
     at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:288)
     at org.hibernate.mapping.Property.isValid(Property.java:216)
     at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:467)
     at org.hibernate.mapping.RootClass.validate(RootClass.java:268)
     at org.hibernate.cfg.Configuration.validate(Configuration.java:1287)
     at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1729)
     at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)
     at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
     ... 9 more

Your solution may be there:
http://www.insideria.com/2010/02/using-coldfusion-9-orm-in-flex.html
Check out what Pedro did in the Flex class:
Note the tag:
[Entity]
[Id]
[ManyToOne
...etc...
package com.pcsilva.insideria.one.mxml.entity
[Bindable]
// pointing to an entity in ColdFusion
[RemoteClass(alias='com.pcsilva.insideria.one.cfml.entity.User')]
// declare entity
[Entity]
public class User
[Id] //statement identifier
public var id:Number = 0; // NaN is not going to ColdFusion
public var name:String;
public var lastname:String;
public var email:String;
// statement of relationship
[ManyToOne(targetEntity="com.pcsilva.insideria.one.cfml.entity.Group", fetchType="EAGER", cascadeType='ALL')]
[JoinColumn(name="group_id", referencedColumnName="id")]
// start property for use in getter groupname
public var group:Group = new Group();
[Transient] //add property read-only, which is not reflected in ColdFusion
public function get fullname():String
return name+' '+lastname;
[Transient] //add property read-only,  simplifies access the property
public function get groupname():String
return group.name;

Similar Messages

  • Need help FLASH not launching and not uninstalling "licensing for this product has stopped working".

    Need help FLASH not launching and not uninstalling "licensing for this product has stopped working" and " you can only install one adobe product at a time please complete the other installation"  Flash was working absolutely fine before, I have no idea why this happened.

    I am having similar problem.  Can't open any of CS3 programs after trying to download Dreamweaver Trial, which wouldn't work because "couldn't remove DLM extention" error message.  So now I can not run Illustrator, Photoshop, or even Adobe Reader.  These are properly licensed for about a year. I get "License for product has stopped working".  Have 2 pending cases open with Adobe support (one for Dreamweaver trial, one for license problem) since 8/3 with NO ANSWERS - It says answers within 1-3 business days.  Was on phone support hold today for over 3 hours before line went dead with no help.  What is up with adobe support?  Can anyone help?

  • I need help, yesterday I installed and reinstalled the Yosemite system and take long to turn on my laptop, the bar takes to fill, and I'm worried. Can you help? thank

    I need help, yesterday I installed and reinstalled the Yosemite system and take long to turn on my laptop, the bar takes to fill, and I'm worried.
    Can you help? thank

    revert back to Maverick that is what I had to finally do. This was the worst upgrade I have ever seen. Hopefully you have Time Machine backup and can revert back. It was pretty painless except for a few issues. I will wait until Apple gets their stuff together on this upgrade or may never will.

  • Need help with Blog, Wiki and Gallery

    Hi Team,
    Need help with Blog, Wiki and Gallery startup. I have newly started visiting forums and quite interested to contribute towards these areas also.
    Please help.
    Thanks,
    Santosh Singh
    Santosh Singh

    Hello Santhosh,
    Blog is for Microsoft employees only. However, you can contribute towards WIKI and GALLERY using the below links.
    http://social.technet.microsoft.com/wiki/
    http://gallery.technet.microsoft.com/

  • I need help importing navigation bars and rollover buttons from fireworks?

    I need help importing navigation bars and rollover buttons from fireworks, drop down menus and rollover states won't work!
    Thanks

    In my experience, the code created by graphics apps is less than satisfactory. And image based menus are very awkward for several reasons. 
    #1 If you decide to change your menu later, you must go back to your graphics app and re-craft the whole thing.  After 2-3 times of this, it gets old in a hurry.
    #2 Image based menus cannot be "seen" by search engines, screen readers and language translators.
    #3 CSS styled text menus are better for your site's visibility, accessibility and they are a snap to edit in Dreamweaver.
    That said, if you're still married to image based menus, use Fireworks to create images only. Use Dreamweaver's Image Rollover Behaviors to create your rollover scripts.
    Nancy O.

  • Need help with Apple ID and broken phone problem!!

    My iPhone is broken and apple are goin to exchange it for a new one. Thing is before they do this they need my apple I'd and password. I thought I had forgot and wouldn't mind as av had two id's. Now I think I might mind it, but since I can't check my phone is there any other way of finding out if this is the one connected to my phone? Maybe by seriel number or phone number..

    Welcome to the Apple Community Frances.
    You may be able to find your Apple ID at Look up your old and forgotten Apple ID

  • Need help with Airport Express and so on.

    Ok so my main problem before getting into what I need help with here is that our MacBooks and now my iPhone 6 plus isn't staying online. Keep getting booted off and then I either have to select the network again or it will eventually go back on. If anyone has a solution or so please feel free to answer that as well. I'm running on Roadrunner with a Netgear 600 wireless router and a motorola modem. Both of which I'll leave the link to below for a better look.
    My Main Question: So I'm looking at a new wireless router mainly and possibly a new modem. I know Apple products are trustworthy but how good is the Airport Express and other Airport products. Also what is the Maximum speed and Maximum data speed for the cheapest express station and if anyone knows the speeds of the other devices it would be greatly appreciated.

    DSL Router to Netgear 5-port Switch and I used the switch to connect to Airport Extreme, TV, Blue-Ray DVD player and DirecTV Receiver.
    The AirPort Extreme base station (AEBS) is a router so it will do what you need.
    You need to reconfigure your setup. Connect the WAN port of the AEBS to the DSL router. Then connect the Netgear switch to one of the LAN ports on the AEBS. The AEBS will properly share the connection.

  • FCP Novice needs help with video quality and FCP 5!!

    Hi,
    I have a real problme that I cannot seem to fix. I think its because I am doing something really wrong!
    I have a Sony HC42E MiniDV Camcorder which by default records video in full widescreen. I recorded several tapes this way and have now begun trying to edit them in FCP 5.04 (Tiger 10.4.6). Whenever I log and capture my clips they appear to be fuzzzy and unclear on the Mac monitor whilst being totally crisp and sharp on the camcorder viewfinder. I tried capturing using the DV PAL 48Khz Anamorphic Preset which keeps everything the right size (the final output needs to be true widescreen and not with black bars added) but the resulting video on screen is blurry and bitty. I then tried capturing using the DV PAL 720 x 576 normal preset and the video is a little clearer on the screen (for both presets I have chosen lower field dominance) but when I play back it plays back in widescreen on the mac canvas window but at 4:3 on the camera's viewfinder.
    I then assumed that maybe this is just becuase the mac screen (CRT by the way) doesn't use fields. So I exported the sequence as a QT movie using DV PAL 16:9 and used quicktime (OS9 Classic - my compressor has never worked because of the dreaded "unable to connect to baackground process" problem which I've never managed to correct) to convert it to MPEG2. When I import this as an asset into DVD Studio pro 4 and set the track size to 16:9 it comes through at the right aspect ratio. However it looks blurry on screen. Thinking that this will be fine on a TV I burned the disc - inserted it into my DVD player (a good one!) and watched it on my new 32" widescreen TV (a good one!) and the picture qualitty is poor. Its so much blurrier and bittier than the original footage looks when played through the camcorder's viewfinder!
    The final footaage looks like an old VHS recording that's a year or two old!
    Does anyone know how I can capture my footage in FCP with the maximum quality, edit it without quality loss and the export it for DVD again without such significant quality loss whilst all the time keeping it at proper 16:9 widescreen?
    Is there some presets I should be working to?
    I'm tearing my hair out! Help!

    Hi Guys,
    thanx for your replies.
    here's the latest:
    Brian, I followed your instructions and the DVD burned successfully. However the video quality of the dvd when viewed on my TV ('ve tried on all 3 of my tvs now) is still a lot poorer than the quicktime movie that was imported into DVDSP4. When I play the original QT Movie on my Mac CRT monitor it looks a little blurry and grainy because I guess its non interlaced however when viewed on an external Video monitor it looks great - very sharp.
    When I view the burned DVD on my television the picture quality looks like the non interlaced version of the original QT Movie that appeared on my Mac CRT and not the sharp interlaced (lower field) version that appeared on my external video monitor.
    Its almost like taking a sharp jpeg into Photoshop and applying a gaussian blur of about 0.3 followed by jepg compression compressing it down to 5% quality!
    I'm totally mystified. Can the conversion to Mpeg2 be removing all interlacing so that you get the less sharp computer monitor look? I just want the video on my final DVDs to be as good as the original source footage! I appreciate that along the way there might be loss of some quality but surely not that much?
    Does this make sense to you guys or am I still doing something very wrong?
    Robert: I have tried setting all manner of drives including a fresh external firewire HD with nothing on it (clean out of the box) but it doesn't seem to help.
    Brian: I tried the no network suggestion a few months back but I'm not sure if I got it right. At the moment I have broadband through an external speedtouch usb modem and am also connected (occasionally although not for the last 3 months) via a crossover cable to my PCs ethernet card. When I last tried the No Network solution I had immense trouble getting my internet to work again! Can you please help me by directing me to the best ay to do this while protecting my internet settings?
    any more help guys would be greatfully appreciated.

  • Need Help with FCP7 import and plug in question.

    Hello,
    I just registered and would like to ask two questions. Everything else I'll use the search function for but I need the answer right away.
    Ok First question. I have a mac pro at home and a intel macbook both with FCS4 during the holiday season I'd like to work on a project on my laptop. Now I have all my files on a 2.0 USB drive(I know its not that fast for video) but this is only temp. while traveling. I'm trying to figure out why it wont import the files into another project. Even when I'm at my home Mac Pro when I try to import a projects footage into another project it doesn't read it. This comes up
    "File Error: 0 file(s) recognized, 0 access denied 254 unknown"
    But all the files will work in the project that it was originally captured too.
    If this helps the codec is sonys HDV 1080 60i converted to Apple ProRes 422(HQ) which I found out I should only use the regular Apple ProRes 422. I'm stuck now b/c I cannot import the files into a new project to work in on my laptop. Plus my Macbook doesn't have Firewire800 so I have no way to get the footage from tape to my laptop other then my USB Hard Drive.
    I also have problem importing the files in Motion and Cinema Tools they also are not recognizing the files which is getting me upset since they are FCP7 generated files after I convert them to ProRes.
    Whenever I try to import/use the files in anything other the original project they are grey'ed out.
    I'm also confused on how to import effects plug-ins I've downloaded effects from apple only to have now directions to import them into the program.
    Sorry for the Noob questions I'm a film student learning FCP7 by myself so I have the upper hand come next semester. Thanks in advance.

    Can't tell for sure but it sounds as if the drive is not properly formatted, or you do not have correct read/write permissions for it. There is no way you can use this drive with HQ video. You're going to get into problem if you even try.

  • Zen Vision:M problem, NEED HELP!

    My zen vision:m is starting to run slowly. It started right after my player froze and i reset it.Now its really slow and barely even switches screens sometimes.Right now its just a black screen with the keypad lit up.Whats wrong with it'sI NEED HELP!

    johnnnyp wrote:
    hi, i have a problem with my creative vision m. i wanted to watch a movie and it froze. i tried to shut it down but it wouldnt respond, and now is frozen. please help me if you can!
    You know its kinda rude to derail XBenzinoFla thread with your own problems, make your own thread next time.
    But to the both of you especially XBenzinoFla, try putting your ZVM in rescue mode and run scan disk to see if it hel
    ps.

  • Audigy SE and AL ADA885 problem needs to be solved once and for

    I just purchased the Audigy SE (I'm on a budget) and installed it. I have the Altec Lansing ADA885 THX 4. digital surround speakers. This sound card DOES NOT work correctly with them. I have been all over the net trying everything that I have seen suggested to make it work. The specs say it should work. It does not. I have tried every possible wiring configuration to no avail. One thing that I find rather annoying is that I have seen several people say that changing the SPDIF to passthrough fixes the problem, yet I cannot find anywhere to change that setting, as I cannot find Audio HQ on the driver CD or on the net to install and change that setting. Can someone, for the love of god, please come up with a valid solution to this problem? I have seen so many people with this same problem who get the run around and answers that just don't help at all. What is needed is "Here, do a, then do b, download c, and BAM! problem solved". Not "Here, do f, do h, download c, j, k, m, and p, then go back and do f again, then a, then b, then come back here and let us know that none of it fixed the problem". I don't wish to be a whiner or a jerk about this, but it is a bit frustrating to be "upgrading" to a card that won't even work right. On behalf of all those with the same problem, thanks in advance to anyone who has a valid solution to this very big, very real problem.

    OK...
    . Do you have the complete application suie of the Audigy SE installed?
    2. If so, in Control Panel do you have the Audio Console or Audio Control Panel?
    3. If you do, change the settings for Decoder Settings to SPDIF passthrough. (THis is however only of AC-3 content, it doesn't affect other formats) (I am not sure the Audigy SE does have a decoder, if not, you need to change the setting in the AC-3 decoder you use)
    4. Then go to Device settings and change the Digital Output sampling rate to 48kHz.
    Now if you cannot find Audio Console, then you should download the latest drivers. They specifically state they allow you to change the "SPDIF output Sampling rate", so you should be able to access the option. I believe your problem lies to the fact your SPDIF is configured for 96kHz output and most probably these very old speakers do not support more than 48kHz.
    PS: The instruction I posted above, are based on an Audigy 2 ZS setup, so the naming of the settings and access programs could be different on the SE, but nevertheless present.

  • Zen Micro problem need help

    Today i was listening to music and my zen micro just froze while playing and no buttons could be pressed and the lock button wasnt on. So i took the battery out and rebooted the player but it froze at the creative screen. I went home and i went to recovery mode and tried to reload the firmware but it said erasing firmware for more than 2 hours. So then i tried a format but it said formating for the same amount of time. I need help please. Also, recently i've had problems witht the headphone jack. When ever i would stick it in it would sound distorted and i would have to move it around until i got it to a certain spot to hear it good again. If anyone else has this problem please tell me. One more thing i had returned my other micro zen in for hard dri've probems and this was my new one do u think if i have to return in (hopefully not) that they would accept it.

    If the functions in Rescue Mode aren't working properly then you need to contact Creative Support.

  • Serius project problems - Need help please

    Hi,
    I'm using adobe premiere and after effects to my last film (this is not the first time). I'm using DV 1280*720 default sound settings (as I did before in other movies). I have an Imac C2D and plenty of hard disk space.
    Yesterday when I import new takes and done some light fx's (blur 10% and tint) when I saved the premiere frozen for 30 minutes and then I had to force quit.
    When I've tried to open that project again, it just don't open. I've tried everything. See if there was any corrupted file, checked for Hard drive problem (it doesn't have any) and I delete the previous rendered files (as I saw on some tutorial).
    At least I could recover that project using autosaved and previous project backup (I take care always of saving backups).
    But when I saved again (the new recovered and rendered project) it freezes on quit and there comes again. (it seems that premiere it is getting something from the old(damaged) project and just stack there !!!!!!
    The project then it just don't open (I don't see any error message) I just see after 1 hour my premiere freezed and there is no way to see the timeline to fix anything.
    I assume that I have to recover again and to all work over and over. I saw some forums talking about adobe "broken links" something related to video files source and corrupted files, but I still don't get it (since premiere doesn't tells me what is going wrong!!!!!!). They talk about deleting MACC file on windows but I'm on a mac. I didn't saw any tutorial about recovering.
    whe this thing happens I see my timeline with video and audio. I can render but when I quit the program doesn't load the project again.
    Please any help...... I'm working since a month ago on this movie and I need to deleiver that asap.
    Is it better to export the video in parts and them join in a new project or there is any other thing that I can do without missing my month of work.
    ohhh man I just want to scream

    For any reason that I can't explain when I arrived home after day work, I've tried last time before looking my backups and Premiere loaded my project
    Before save and quit I've take a look in all file (check the link and where is the source) I found 2 still frames (photos) were lost ( i mean from my hard drive).
    My biggest clue now it is, when I deleted some video file before, when I enter the premiere project 1st thing that show it is a windows asking me to "point" where is that file.
    But when happens with a photo, premiere doesn't say that this files are lost. It just stucks your project. Any tip to prevent this again?
    Hardware Overview:
      Model Name:    iMac
      Model Identifier:    iMac7,1
      Processor Name:    Intel Core 2 Duo
      Processor Speed:    2.4 GHz
      Number Of Processors:    1
      Total Number Of Cores:    2
      L2 Cache:    4 MB
      Memory:    4 GB
      Bus Speed:    800 MHz
    Intel ICH8-M AHCI:
      Vendor:    Intel
      Product:    ICH8-M AHCI
      Speed:    3 Gigabit
      Description:    AHCI Version 1.10 Supported
    WDC WD3200AAJS-40VWA1:
      Capacity:    298.09 GB
      Model:    WDC WD3200AAJS-40VWA1
      Revision:    58.01D02
      Native Command Queuing:    Yes
      Queue Depth:    32
      Removable Media:    No
      Detachable Drive:    No
      BSD Name:    disk0
      Mac OS 9 Drivers:    No
      Partition Map Type:    GPT (GUID Partition Table)
      S.M.A.R.T. status:    Verified
      Volumes:
    iMac:
      Capacity:    297.77 GB
      Available:    158.68 GB
      Writable:    Yes
      File System:    Journaled HFS+
      BSD Name:    disk0s2
      Mount Point:    /
    ps: about your question "Next, please verify your Project/Sequence Presets. Do they match your footage 100%?" I've changed 2 video files, they were pretty bigger than the part I was taking for this project, so I edit and save just the part that I am using.
    Btw I've heard that Journaled HFS+ it is not good on Imac to use premiere render option. Is that right?
    Many thanks in advance.

  • I need help understanding export options and optimizing for web

    I have been using FCP X for a short while now and have a pretty good grasp on the editing capabilities. What I'm having a horrible time figuring out is the export/share options. The videos I create are typically approximately 1 minute in length and get posted to a web site (we have our own CMS and video player so I'm not using YouTube or Vimeo or anything like that). In order to post them I need them to be MP4s and then I have to create .webm and .ogv files. The source material I work with is generally great, high quality stuff, so I end up with very large output files from the initial FCP share master file options.
    When I use MPEG Streamclip to make my MP4s I end up with files that are still quite large and I can't seem to ever get the file size manageable without losing tons of quality. I do not have Compressor, though if that will solve my problem I will put in for the expense of it. What I'm trying to understand is what sorts of settings I should be trying out to get my file sizes to be manageable without completely compromising my quality. And I know this can be done, because the company I work for pays for a great quantity of video work each year (from an outside production firm) and the clips provided are beautiful in quality and small in file size -- for example, I recently worked on a video and got it into the 40MB range before quality went to crap, working off the same material the production company we do work with had theirs down into the teens and looking beautiful!
    To throw an even greater wrench in the works, I am working off a mac. But when my boss, on a pc, saves the mp4s I create (raw files -- not what is posted to the web) locally on his machine and views them from there the sound is always off a tad and the people in the videos look like they're lip synching.
    Any advice on either of these is MUCH appreciated. I've been trying to figure this out properly for months, and only today decided to stop seeing if someone else had the same question and just post my own.
    Bronwyn

    Thank you Karsten, this was helpful I have utilized the Quality slider and the frame size options before though with limited results. I've never messed with the Limit Date Rate option as I don't know what I'm doing with it, I see you put 5Mbps. Is that a typical setting that I could use?
    Using stream info, here's info on my original source file:
    Stream: Charles_0023_2.mov
    Duration: 0:00:51
    Data Size: 96.51 MB
    Bit Rate: 15.77 Mbps
    Video Tracks:
    H.264, 1920 × 1080, 29.97 fps, 15.64 Mbps
    Audio Tracks:
    MPEG-4 Audio stereo, 48 kHz, 127 kbps
    Stream Files:
    Charles_0023_2.mov (96.51 MB)
    As a comparison, here's the info on a similar clip that the company we sometimes use created:
    Stream: Charles_0019_4.mp4
    Duration: 0:00:49
    Data Size: 4.66 MB
    Bit Rate: 0.80 Mbps
    Video Tracks:
    JVT/AVC Coding, 710 × 400, 29.97 fps, 635 kbps
    Audio Tracks:
    MPEG-4 Audio stereo, 48 kHz, 162 kbps
    Stream Files:
    Charles_0019_4.mp4 (4.66 MB)
    I'm fine with bringing the frame size down some and modifying the limit data rate, but sometimes I feel like I'm forcing my video into something it's not and the quality suffers -- this is where my understanding of video work breaks down LOL. Any suggestions of how I can get my .mov into something like the the .mp4 above?
    Also have you had any experience with mp4s not playing back properly on pcs?
    Again, thank you!
    Bronwyn

  • IPhone 5 screen wont turn on. (Need help or info, please and thank you.)

    So i got an Iphone 5, and i accedently droped it in the sink. i took it out, whipped it off,  i put it in my pocket and left it alone.
    the next day the screen was not working, moments later, it(Iphon5) turned off.  tried turnng it back on but it wouldnt work.
    so, again i left it. everything still works, its just that the screen wont turn on, i could still play music snapshot stuff,
    but my screen wont tun on.
    I NEED HELP.

    I don't beleive this is a known problem and you should probably bring your phone to a local Genius Bar (make an appointment here) as this is likely a hardware issue (a problem with your phone realizing that you removed it from your ear).
    If you're willing to tinker with it a bit, you can determine if this is a software issue by backing up your iPhone (separately ensure your photos, videos and music is backed up) and then "Restore" your phone. If the restoration solves the problem, you're dealing with a software issue. If the problem still exists, you're almost definitely dealing with a hardware issue.

Maybe you are looking for

  • IPhone 4s with ios 6 shows full wifi signal but can't access to the internet while other idevice can

    Hi everyone, I updated my iphone 4s to ios 6 a few months ago and there was no problem until I change my sim card to other carriers last two days.  This second sim card is the same sim card that I used it earlier this year with no problem.  But the p

  • Updated to loin now i can't drag and drop videos

    i update my mac mini to loin now i can't drag and drop vidoes or songs to a flie or to a external hard drive

  • Please pick the Pro for me!

    hi, i will be starting grad school (online) soon. this will be my MAIN computer. i plan on eventually getting an ipad or 11inch Air for travel. i do NOT do gaming. basic user!!  movies, music, school stuff..  money is no issue. 2.0 processor 15 inch

  • Mapping issue: from unbound node to two single fields

    Hello, I have a source message with a node that is 0... unbounded. The node contains a field named "component_name" with occurence  1..1. The target message contains only two single fields (component1, component2) and the task is to provide the first

  • Problem meeting condition in jsp

    Hi, I have written a small test jsp, which is basically just an input form that allows the user to select a value from a drop down box. When the form is submitted depending on what value was submitted, I want to display some stocks prices using a spe