If an app uses JPA with a WAR, where does persistence.xml go?

If I'm constructing an app using JPA entities, but just in a WAR file, not an EAR file, as I'm not using the other EJB components, where does the persistence.xml file get deployed to? Is it just WEB-INF/classes, or do I have to do something like WEB-INF/classes/META-INF (one resource i saw implied this)?

david.karr wrote:If I'm constructing an app using JPA entities, but just in a WAR file, not an EAR file, as I'm not using the other EJB components, where does the persistence.xml file get deployed to? Is it just WEB-INF/classes, or do I have to do something like WEB-INF/classes/META-INF (one resource i saw implied this)?Yes, put it in WEB-INF/classes/META-INF. If you're using JDeveloper or Eclipse Webtools and you put the persistence.xml in src\META-INF compiling will put it into WEB-INF\classes\META-INF for you.
--Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Unable to deploy Web App using JPA TopLink Essentials in Tomcat5.5.17

    Hi All,
    I am trying to deploy a Web App ( used Top Link Essentials ) to Tomcat and i am getting the following Error..
    I am strating tomcat using -javaagent:/Path/To/spring-agaent.jar
    Dec 14, 2006 9:52:46 AM org.apache.catalina.loader.WebappClassLoader loadClass
    INFO: Illegal access: this web application instance has been stopped already.  Could not load oracle.toplink.essentials.internal.weaving.ClassDetails.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
    java.lang.IllegalStateException
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1238)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at oracle.toplink.essentials.internal.weaving.TopLinkWeaver.transform(TopLinkWeaver.java:84)
            at org.springframework.orm.jpa.persistenceunit.ClassFileTransformerAdapter.transform(ClassFileTransformerAdapter.java:56)
            at sun.instrument.TransformerManager.transform(TransformerManager.java:122)
            at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:155)
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
            at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1812)
            at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at java.lang.Class.getDeclaredConstructors0(Native Method)
            at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
            at java.lang.Class.getConstructor0(Class.java:2671)
            at java.lang.Class.newInstance0(Class.java:321)
            at java.lang.Class.newInstance(Class.java:303)
            at org.apache.myfaces.application.ApplicationImpl.createComponent(ApplicationImpl.java:396)
            at com.sun.faces.config.ConfigureListener.verifyObjects(ConfigureListener.java:1438)
            at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:509)
            at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
            at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
            at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)
            at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
            at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
            at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
            at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
            at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
            at org.apache.catalina.core.StandardService.start(StandardService.java:450)
            at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
            at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Thanks
    Sateesh

    Spring 2.0 provides custom support for TopLink Essentials in Tomcat out-of-the-box. You should follow the instructions here: http://static.springframework.org/spring/docs/2.0.x/reference/orm.html#orm-jpa-setup-lcemfb-tomcat
    Essentially, Spring provides a custom class loader for Tomcat and doesn't use an agent.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • When i use firefox with mafia wars none of the pictures display - i think i hit a hide picture button?

    using mafia wars, it does not show any of the pictures only the words so it makes it difficult to know where to click. mafia works fine when i open in chrome - so it is something i did while using firefox.

    With the site on display, click on the site identity button (for details on what that is see [https://support.mozilla.com/kb/Site+Identity+Button]) and then on More Information. This will open up the page info dialog.
    First select the Permissions panel, make sure that "Load Images" is set to allow (selecting Use Default should also work)
    Next select the Media panel, then click on the first item in the list. Use the down arrow key to scroll through the list. If any item has the option "Block images from (domain name)" selected, de-select the option.
    This should hopefully resolve your issue, but also see [https://support.mozilla.com/kb/Images+or+animations+do+not+show].
    Some add-ons can also block images, for example if you have AdBlock Plus installed, make sure that you have not accidentally created a filter to block the images.

  • Please help with setting up native mail app using Gmail with alternate email address

    I have an alternative email address setup such as [email protected] configured to use with my online Gmail account.  In the online account, I use the alternate email services smtp server so emails are sent correctly from that alias.
    Is there a way to setup the native mail app to use Gmail for mail, contacts, and calendar and use an alternate email address as the sender?  Right now I am syncing contacts and the calendar through the native mail app and using the Gmail mail app for my email.  It allows you to select from all of the emails setup on the Gmail account. 
    But for simplicity sake, I would like to consolidate to the native email app for all of my accounts - I also have an Exchange based work account.
    Thank you for the help.

    iCloud Help
    Creating an iCloud account- Frequently Asked Questions
    Apple IDs and iCloud
    iCloud: What version of Windows software am I using for iCloud?

  • ITunes app rejected: app uses the iOS Advertising Identifier but does not include ad functionality

    Hi,
    my latest app version just got rejected for referencing
    class: ASIdentifierManager
    selector: advertisingIdentifier
    framework: AdSupport.framework
    without showing any advertisements. From my understanding they are referenced by the Facebook SDK to "Attribute this app installation to a previously served advertisement", which I checked when submitting the app version to iTunes. I do not serve ads inside the application and have no plans to do so. Anyone with similar experiences? Because the only solution seems to remove Facebook SDK which is no option.

    Well, I lodged the appeal - Apple checked and this is the message we got. We are now getting desperate to chief the launch date - Either Apple or Adobe are wrong - which one is it?  Desperate.
    Graham
    Thank you for contacting us.
    We have verified that your app contains code that is accessing the Advertising Identifier, however, we did not see ads served in your app. As stated in section 3.3.12 of the iOS Developer Program License Agreement, an app must serve ads in order to use the Advertising Identifier:
    We have seen this behavior in apps that include third-party libraries. These libraries are often analytics engines, ad engines, or other types of third-party services.
    We require that you locate and remove this code prior to resubmitting, and recommend that you use the "nm" tool or the command line tools "strings" or "otool -ov" to find the following entities:
    - class: ASIdentifierManager
    - selector: advertisingIdentifier
    - framework: AdSupport.framework
    If you are unable to locate these entities, you may wish to work with an Apple Developer Technical Supportengineer.

  • I have dial-up internet service an use hypernet with my service,Firefox does not recogize the hypernet how can I get them to connect?

    Kcnet provides a Hypernet to help with my dial-up service,Firefox doesn't allow the hypernet to work,how can I make this work.

    AirPort Express 3 is not actually "extending" the network at all, since Apple's "Extend a wireless network" will only allow the wireless signal to be extended one time or one level.
    The trick with AirPort Express 3.....which may nor may not be possible due to your home layout.....is that AirPort Express 3 must be about the same distance from Big AirPort as AirPort Express 1 and 2.......AND......it needs to be closer to Big AirPort than it is to either AirPort Express 1 and 2.
    That way AirPort 3 will pick up a stronger signal from Big AirPort and it extend the network correctly.

  • I will be buying an Ipod nano touch. I want it because I will use it with Nike Plus. Does Att have plans for the Ipod nano touch? If so, give me the link. Or tell me what to do.

    Please be specific.

    The Nano does have 3G or 4G capabilities nor does it have any Wi-Fi hardware and capability, so no need to worry about setting up a plan/service with AT&T.
    B-rock

  • How do I make firefox use a user stylesheet and where does the stylesheet need to be located?

    I want to set up a user stylesheet for firefox to use. How do I get firefox to use it? Where do I need to save if so firefox can find it?

    *Stylish: https://addons.mozilla.org/firefox/addon/2108

  • When you download a movie or tv show on a macbook pro with retina display where does it go?

    Where do downloaded movies and tv shows go once downloaded on a mac book pro?

    It should go to your downloads folder.
    Ciao.

  • App builder problem with Fuzzy Toolkit

    Hi,
    today I wanted to build an app (using LV2009) with some functions from "PID and Fuzzy Control Toolkit".
    Now the app builder is searching for a type definition in vi.lib (as shown in the pic), but it doesn't find the CTL file - but the path used for searching is correct! Then I do the search manually, point to the requested CTL in the correct place (and with correct name of course), and the build will succeed.
    What's up here?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Solved!
    Go to Solution.
    Attachments:
    check.png ‏18 KB

    Hi,
    thanks for your thoughts!
    Answers:
    - I use WinXP SP3, German settings
    - I use LV2009SP1 for that project, toolkits are installed with that version (other LabVIEW versions are installed too, from LV8.5.1 to LV2010SP1)
    - LabVIEW is installed in the "standard" path on drive C: (as can be seen on the attached pic of message #1)
    - the app builder is unable to find the ctl file (the standard search dialog pops up), but the file is located on exactly the path used for searching (as can be seen on the picture)
    - all I have to do (but this really annoys me) is to point LabVIEW to an item in a place it already knows...
    - the type definition is part of the toolkit, it's installed/located in the standard folder of that toolkit, and I never changed/touched any path or file name
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Can't use JPA facet in a Workshop 10.3 EJB project

    Greetings,
    I'm using Oracle Workshop for WebLogic 10.3 to migrate an enterprise application from JBoss 5.0 to WebLogic 10.3. I'm a bit confused as, while I can add the JPA facet to a Dynamic Web project, I cannot do the same with an EJB project. I'd need to take advantage of the IDE automatic facets management instead to manually dealing with libraries and dependencies. I beleive that this is the reason these facets exist. However, after having created a EJB 3.0 project, it is impossible to add to it the JPA facet. I had to define the JPA entities in a Dynamic Web project as this is the only one to which I can add the JPA facet. This is not regular. Additionally, the SLSB facades may only be defined in an EJB project. They reference the JPA entities in the Dynamic Web project which, given the class loading hierarchy, is not possible. So my question is: how is one supposed to use JPA with WTP projects ?
    Many thanks in advance for any help,
    Nicolas

    This isn't supported in Workshop 10.3 and prior, the JPA tooling only works with Dynamic Web Projects in those releases to my knowledge.
    I think this changed in OEPE 11g. Check out this article that shows JPA being used in the context of a Utility Project:
    http://www.oracle.com/technology/pub/articles/cioroianu-eclipse-jpa.html
    OEPE 11g Download: http://www.oracle.com/technology/software/products/oepe/index.html

  • Does every iPhone app also work with an iPod touch??

    I apologize if this is a dumb question, as I have never owned either of these products. I want to purchase an iPod touch and I know the iPhone is known for all its great apps.. so I was just wondering if all of those also work for the touch.. or no? I do realize that an app that requires the internet on the iphone would require a wi-fi connection on the touch, but I just want to make sure it can actually run all of them regardless.
    Thank you very much.

    The best way to put it is MOST apps work on the iPod touch. There are small differences in the hardware because of the phone and such. It would be similar to having a 3G phone and not being able to use apps that use the compass that's in the 3GS, but not the 3G. Does the app use something with the phone, the camera, the mic, the compass, the new 4's gyro? Some of those wouldn't work with the iPod, but we're talking a small percentage of the apps.

  • Does anyone know if you can use dictation with Microsoft Word?

    I am looking to get Moutian Lion but was just wondering if you can use dictation for Microsoft Word or any other word document program.
    Thanks a million!!
    Beau

    I have personally used it with Word and it does work.  I even think I remember reading that you can use it with any program in which you can type.  Go to settings on your macbook to make sure it's turned on.  Chances are your shortcut to access dictation is pressing the Fn key twice.

  • Apps not working with docomo after updating new sw...

    hello brother,
    i have updated my nokia c2-00 sw v3.99 .
    After updating new sw v.3.99 my apps not working with tata docomo only .
    Docomo is my personal sim-card.
    What can do for get ride it.
    Solved!
    Go to Solution.

    Hello, Premkoli. Which specific apps are you referring to? Are these apps downloaded from the Store, or preloaded ones? When you say 'my apps not working with tata docomo only', does it mean that these apps work with other SIM cards aside from TaTa Docomo? How did you update your Nokia C2-00? Is it by going to Settings > Phone > Device Updates > Check for updates, or via Nokia Suite?
    Since the issue started after the software update, you can try to reinstall the phone's SW via Nokia Suite. Just download it on your PC, and then connect the phone via a compatible USB cable. After that, launch Nokia Suite, and the go to SW Updates > Device Software Updates > Reinstall current SW. After that, try opening the same apps and see if they'll work with your Docomo SIM card. Get Nokia Suite from this link: Nokia Suite
    Let us know the outcome. 

  • Problems with deploy on OC4J 10.1.3.2 with hibernate persistence.xml

    Hi all,
    I can't deploy an EAR/WAR into oc4j 10.3.2.0 stand-alone, I have the following error message :
    2008-03-26 19:50:38.721 NOTIFICATION Binding opsky-webapp-1.0-SNAPSHOT web-module for application opsky to site default-web-site under context root /opsky
    08/03/26 19:50:38 oracle.oc4j.admin.internal.DeployerException: [opsky:opsky-webapp-1.0-SNAPSHOT] - Exception creating EntityManagerFactory using PersistenceProvider class org.hibernate.ejb.HibernatePersistence for persistence unit ApplicationEntityManager.
    08/03/26 19:50:38 at com.evermind.server.ejb.exception.DeploymentException.exceptionCreatingEntityManagerFactory(DeploymentException.java:130)
    08/03/26 19:50:38 at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.createContainerEntityManagerFactory(PersistenceUnitManagerImpl.java:197)
    08/03/26 19:50:38 at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initializePersistenceUnit(PersistenceUnitManagerImpl.java:159)
    08/03/26 19:50:38 at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initialize(PersistenceUnitManagerImpl.java:86)
    08/03/26 19:50:38 at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:733)
    08/03/26 19:50:38 at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:414)
    08/03/26 19:50:38 at com.evermind.server.Application.getHttpApplication(Application.java:571)
    08/03/26 19:50:38 at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1990)
    08/03/26 19:50:38 at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:1909)
    08/03/26 19:50:38 at com.evermind.server.http.HttpSite.addHttpApplication(HttpSite.java:1606)
    08/03/26 19:50:38 at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:238)
    08/03/26 19:50:38 at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:99)
    08/03/26 19:50:38 at oracle.oc4j.admin.internal.ApplicationDeployer.bindWebApp(ApplicationDeployer.java:547)
    08/03/26 19:50:38 at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:202)
    08/03/26 19:50:38 at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
    08/03/26 19:50:38 at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
    08/03/26 19:50:38 at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
    08/03/26 19:50:38 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
    08/03/26 19:50:38 at java.lang.Thread.run(Thread.java:619)
    2008-03-26 19:50:38.987 NOTIFICATION Application Deployer for opsky FAILED.
    2008-03-26 19:50:38.987 NOTIFICATION Application UnDeployer for opsky STARTS.
    I'm using hibernate 3 with spring, here is my persistence.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
    <persistence-unit name="ApplicationEntityManager" transaction-type="RESOURCE_LOCAL">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <class>org.appfuse.model.User</class>
    <class>org.appfuse.model.Role</class>
    </persistence-unit>
    </persistence>
    Does enyone know anything about this issue?

    Hi,
    It would be helpful if you copied and pasted the error messages you get.
    For what its worth, it probably isn't a bug, just a configuration problem. You may need to alter more than your application.xml file.
    If you developed the EJBs with JDeveloper, you can create a deployment descriptor that adds the necessary configuration files for the OAS platform, and package them into a WAR or EAR. Use Enterprise Manager to deploy the WAR/EAR to the OAS OC4J and everything will be placed where its needed.
    More info in the JDeveloper and OAS 10.1.3 documentation.
    Jim

Maybe you are looking for