JPA: How do I get an EntityManager into a javabean
I have a javabean in a web app and I am trying to get an EntityManger but I don't think I can use resource injection. My web app is in an EAR file and my persistence unit is in a jar file that is also in the EAR file. Using the Persistence.createEntityManagerFactory doesn't work perhaps because it is only looking for a classpath?
Any ideas?
thanks,
Peter
Hey it is actually an Oracle Web Service not a Java Bean (sorry new code). But it is packaged as a war file so I added this to the web xml:
<persistence-context-ref>
<persistence-context-ref-name>
myEM
</persistence-context-ref-name>
<persistence-unit-name>VISIT_IDSM</persistence-unit-name>
</persistence-context-ref>
on this line:
em = (EntityManager) new InitialContext().lookup("java:comp/env/myEM");
it throws this error:
08/06/04 15:58:00 com.evermind.server.ejb.exception.DeploymentException: [VIPS:vips-whit-rqs-ws-1.3-b1-001-SNAPSHOT
] - Unknown persistence unit with name "VISIT_IDSM".
looks like it still can't find that persistence unit. Both my war file and persistence jar file are packaged in an EAR file
let me know if you need any more info.
Peter
Similar Messages
-
I have alot of loose photos at home (old) and I would love to make a bunch of iphoto books and make the pages like whole page collages? How do I get my photos into iphoto in order to do this? Can I make a DVD at the drugstore and add them to iphoto?
You can make the collages easily if you have iWork. Just open a letter sized page in landscape mode and drag the photos onto the page, rotate and postiion as necessary. Then do a Print ➙ PDF ➙ Save PDF to iPhoto to get a 200 dpi jpeg version of the Pages page into iPhoto. From there you can add it to your book and use a blank page with the option to have an image as the backbround.
If you have a 3rd party image editor that supports layers you can create the collage with it.
OT -
I purchased many alert tones in itunes and then updated my itunes. Now my alert tones do not show up, although if I were to go re-purchase those items, itunes says I already purchased them. Where do I find those tones and how do I get them back into my phone without having to repurchase???? This is so frustrating! Please Help!
1. iTunes won't offer cloud downloads for songs that it "thinks" are in your library, even if it "knows" the files are missing. If you've exhaustively searched for the missing files and there is no prospect of repair by restoring to them to their original locations, or connecting to new ones, then delete that tracks that display both the missing exclamation mark and are of media kind Purchased/Protected AAC audio file. Don't hide from iTunes in the cloud when asked, close iTunes, then reopen. You can download from the cloud links or iTunes Store > Quicklinks > Purchased > Music > Not on this computer > All songs > Download all.
2. Why? Not sure, perhaps 3rd party tools or accidental key presses combined with previously hidden warning messages when trying to organize the library. There is a hint that using the feature to downsample media as it is synced to a device may also be involved, though I've not replicated it. Whatever the reason a backup would protect your media.
tt2 -
My computer has been wiped and I've lost everything including itunes. I have the songs on my ipod how do i get them back into my newly downloaded itunes?
Please see the Knowledge Base from turingtest2 below
https://discussions.apple.com/docs/DOC-3991 -
How do you get your contacts into groups?
how do you get your contacts into groups?
When you ask a question, please include the version of Mac OS X on your computer. iOS is not a Mac operating system.
Assuming you are running OS 10.9.1:
Open Contacts. Click File in the menu bar and select New Group. Enter the name of the group in Contacts on the left.
Go back to All Contacts (on the left) then drag and drop the names you want in that group on to the folder you just named.
Repeat as necessary for other groups.
Note that the names remain, as they should, in All Contacts, even after you have added them to a group.. You can delete a group if you want. The names will still remain in All Contacts. -
my computer had to be restored and i lost everything on my computer and i had to redownload everything including itunes and now the songs that were on my ipod arnt in my itunes library i need to know how i can get them back into my library or if i even can
Download Past Purchases
http://support.apple.com/kb/HT2519
Log into iTunes using the account the Purchase was made with... Click on Buy... and a notice will come up saying you already have it... do you wish to download it again... Click Yes... -
I downloaded iOS 7 and now in my music library all my songs are not in the order of the original albums. How do I get them back into order?
go to settings>general>reset>reset home screen layout and see if they appear.
-
When I copy and paste a chapter from MS Word into Pages my tables and equations are trashed. But importing them results in no control over my template How do I get my chapter into my template without copying?
Try just Opening the Word .doc from within Pages and see if that gets closer to what you want, then copy the chapter you want from the Pages version.
Peter -
Hi, all.
How do you get information entered into iCal and Contacts on an equipped iPhone to push to an equipped MacPro? So far it's been a one way street Macpro to phone, and that's not what I was told it would be. I've been through all settings on both devices and see no way to do this. Help! If I synch the old fashioned way, what's going to happen?First check that all your settings are correct, that contact syncing is checked on all devices (system preferences > iCloud on a mac and settings > iCloud on a iPhone, iPad or iPod).
Make sure the contacts you are adding are added to your 'iCloud' group and not an 'On My Mac', 'On My Phone' or other non iCloud group (you can do this by checking in groups), non iCloud contacts will not sync.
If you are sure that everything is set up correctly and your contacts are in the iCloud group, you might try unchecking contact syncing in the iCloud settings, restarting your device and then re-enabling contact syncing.
First check that all your settings are correct, that calendar syncing is checked on all devices (system preferences > iCloud on a mac and settings > iCloud on a iPhone, iPad or iPod).
Make sure the calendars you are using are in your 'iCloud' account and not an 'On My Mac', 'On My Phone' or other non iCloud account (you can do this by clicking/tapping the calendar button in the top left corner of the application ), non iCloud calendars will not sync.
If you are sure that everything is set up correctly and your calendars are in the iCloud account, you might try unchecking calendar syncing in the iCloud settings, restarting your device and then re-enabling calendar syncing settings. -
When downloading a CD album, if it contains different artists, the album is split up into separate albums/icons. How do I get all songs into one album (just like the original CD)?
Generally, in iTunes, all you need to do is fill in an appropriate Album Artist to keep things together. For older iPods each track from the same album should have the same artist, or be marked as a compilation where appropriate. For iOS devices you may need to go to Settings > Music > Group By Album Artist > On.
For more details see my article on Grouping Tracks Into Albums, in particular the topic One album, too many covers.
tt2 -
Hi, I accidentally deleted a project in trash. How do I get it back into final cut pro X. It is still sitting in trash.
If your working on an external hard drive, just drag/drop back in the Final Cut Projects folder, and re-open FCPX
-
Working alternating with iPhoto and FCE tgrying to import pictures from iPhoto into FCE suddenly all my 22300 pictures disappeared leaving empty frames. Does somebody know where the pictures could have gone and how can I get them back into iPhoto? Lothar
The ! turns up when iPhoto loses the connection between the thumbnail in the iPhoto Window and the file it represents.
Option 1
Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
If that fails:
Option 2
Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
Regards
TD -
How do I get my file into the time line in Premiere Pro CC?
How do I get my file into the time line in Premiere Pro CC? I am use to Premier Pro CS6 and unfortunately my labtop took a crash and I lost all of my adobe products. I wanted to check out a trial version and I cannot seem to find one for CS6! Please Help Me! My project is due tonight!!!!!
Hi Aneumann,
Welcome to the Forums.
You have to just right click on the clip imported, in the project panel and select new sequence from clip. You can also go to file menu>new>sequence and create a sequence and then drag the clips after importing them , into the timeline.
Regards,
Vinay -
If I buy music from iTunes using my ipod touch instead of the computer, how do I get the music into iTunes also so that I can back it up on CD?
File>Transfer Purchases
-
i recently got some video but some of it is in .wmv format and i need to know how to convert these to .mov format
or
how do i get .wmv files into iTunes.
plz helpIntervideo sells software that will convert your files into a format that can be read by an Ipod.
Maybe you are looking for
-
I have a Windows Server 2012 R2 virtualization cluster. All the hosts are connected to an external storage system, and virtual machines' files are stored on external volumes (CSVs). All the hosts and virtual machines are a part of the same AD domain
-
How to install Studio, DataTools, SSIS and SSAS to SQL Server 2014 RTM DataWarehousing
I have fresh installation of VM. Plan is to build DW and SSAS OLAP Cube. How to install needed services and tools as they are not installed as default? If I click SQL Server Installation Center and choose Installation and New SQL Server, I'm guided t
-
Alert for VM CPU percentage remain "Not activated"
We created an alert rule for the CPU percentage of a VM with a low threshold (10%) for testing. The threshold was exceeded for several minutes - longer than the alert evaluation window. The rule was enabled, of course. However, there was neither an e
-
Everytime I try to start photoshop, I get an error that the scrartch disks are full. I have 2 1 TB hard disks in raid 0. They are definatly not full! I tried crtl-shift-alt and deleted the presets, but get the same error. I am running win 7 64 bit!
-
Hello: Is there anyone using SAP-Manugistic Adapters for XI? or if anyone is interfacing with Manugistics from/to SAP, is the connection mostly with JDBC comm channels? Thanks George