Multiple persistence.xml files

I've got a situation where I have one persistence.xml file with many persistence-unit's. My problem is that during deployment not all of the persistence-units are useable, so I get errors. My question is can I use multiple persistence.xml files in an application if each persistence.xml file defined only one persistence-unit?
Mark

While JPA supports multiple persistence units in a single persistence.xml most of the tooling options (Eclipse, JDeveloper) focus on supporting a single persistence unit. Using multiple persistence.xml files on different classpath roots should also work. I recall seeing a bug related to this in the EclipseLink queue. Is this the JPA implementation you are using?
Doug

Similar Messages

  • Splitting multiple IDoc XML files into single IDoc messages for R/3

    Hi all. I have a problem splitting IDoc XML files coming in to XI. I currently have an interface that takes in single store sale IDoc transactions (type WPUBON01) in an IDoc XML file. I then have some complex graphical mapping on the IDoc before sending to R/3 via the IDoc adapter. This works fine. However, we now wish to include multiple sales in one file i.e. many WPUBON01 IDocs. I could use message splitting to do this BUT the mapping is so complex, I do not wish to have to change it to enable the processing of many IDocs in one file instead of just one.
    What I want to do: have one mapping splitting a multiple IDoc XML file into single IDoc messages and then another taking these single messages as before and performing the mapping. I cannot find a way to do this in one interface; the main problem I'm having is getting XI to split the multiple IDocs into many single IDoc messages within XI itself. I'd be very grateful for any advice on the best way to do this.
    Thankyou.
    Stuart Richards (Halfords, UK)

    Bhavesh,
    Thanks again for a clear explanation... I'm moving forwards but still struggling. I've been on this all afternoon today (after a break on other things) and just cannot get my message to split properly (though the SOAP adapter problem I had earlier is now fixed!). If my initial IDoc XML file contains this format:
    <WPUBON01><IDOC>....</IDOC>
                          <IDOC>....</IDOC>
                          <IDOC>....</IDOC></WPUBON01>
    .. I'm not sure what the cardinaility on the first message mapping and interface mapping should be. I'd have thought the source interface would be 1 and the target would be 0..unbounded but this isn't working. I'm trying different things but I get different errors each time. Currently, I have the above cardinality in my first interface and I'm passing in the following data:
    <WPUBON01><IDOC><EDI_DC40><TABNAM>EDI_DC40</TABNAM><MANDT /><DOCNUM /><DOCREL>620</DOCREL><DIRECT>2</DIRECT><IDOCTYP>WPUBON01</IDOCTYP><MESTYP>WPUBON</MESTYP><MESCOD>ST6</MESCOD><SNDPOR>WPUX</SNDPOR><SNDPRT>KU</SNDPRT><SNDPRN>0518</SNDPRN><RCVPOR /><RCVPRT>KU</RCVPRT><RCVPRN>0518</RCVPRN><REFINT>00000003832292</REFINT></EDI_DC40><E1WPB01 SEGMENT="1"><POSKREIS>0518</POSKREIS><KASSID>29</KASSID><VORGDATUM>20071029</VORGDATUM><VORGZEIT>160633</VORGZEIT><BONNUMMER>1001</BONNUMMER><KASSIERER>100</KASSIERER><CSHNAME> </CSHNAME><BELEGWAERS>GBP</BELEGWAERS><E1WPB02 SEGMENT="2"><VORGANGART /><QUALARTNR>ARTN</QUALARTNR><ARTNR>000000065601301390</ARTNR><VORZEICHEN>-</VORZEICHEN><MENGE>1</MENGE><AKTIONSNR>0000000000</AKTIONSNR><REFBONNR> </REFBONNR><E1WPB03 SEGMENT="3"><VORZEICHEN /><KONDITION>PN10</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03><E1WPB03 SEGMENT="4"><VORZEICHEN></VORZEICHEN><KONDITION>ZPN1</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03></E1WPB02><E1WPB02 SEGMENT="5"><VORGANGART /><QUALARTNR>ARTN</QUALARTNR><ARTNR>000000065601301390</ARTNR><VORZEICHEN>-</VORZEICHEN><MENGE>1</MENGE><AKTIONSNR>0000000000</AKTIONSNR><REFBONNR> </REFBONNR><E1WPB03 SEGMENT="6"><VORZEICHEN /><KONDITION>PN10</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03><E1WPB03 SEGMENT="7"><VORZEICHEN></VORZEICHEN><KONDITION>ZPN1</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03></E1WPB02><E1WPB02 SEGMENT="8"><VORGANGART /><QUALARTNR>ARTN</QUALARTNR><ARTNR>000000065601301390</ARTNR><VORZEICHEN>-</VORZEICHEN><MENGE>1</MENGE><AKTIONSNR>0000000000</AKTIONSNR><REFBONNR> </REFBONNR><E1WPB03 SEGMENT="9"><VORZEICHEN /><KONDITION>PN10</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03><E1WPB03 SEGMENT="10"><VORZEICHEN></VORZEICHEN><KONDITION>ZPN1</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03></E1WPB02><E1WPB02 SEGMENT="11"><VORGANGART /><QUALARTNR>ARTN</QUALARTNR><ARTNR>000000065601301390</ARTNR><VORZEICHEN>-</VORZEICHEN><MENGE>1</MENGE><AKTIONSNR>0000000000</AKTIONSNR><REFBONNR> </REFBONNR><E1WPB03 SEGMENT="12"><VORZEICHEN /><KONDITION>PN10</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03><E1WPB03 SEGMENT="13"><VORZEICHEN></VORZEICHEN><KONDITION>ZPN1</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03></E1WPB02><E1WPB02 SEGMENT="14"><VORGANGART /><QUALARTNR>ARTN</QUALARTNR><ARTNR>000000065601301390</ARTNR><VORZEICHEN>-</VORZEICHEN><MENGE>1</MENGE><AKTIONSNR>0000000000</AKTIONSNR><REFBONNR> </REFBONNR><E1WPB03 SEGMENT="15"><VORZEICHEN /><KONDITION>PN10</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03><E1WPB03 SEGMENT="16"><VORZEICHEN></VORZEICHEN><KONDITION>ZPN1</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03></E1WPB02><E1WPB06 SEGMENT="17"><VORZEICHEN></VORZEICHEN><ZAHLART>PTCS</ZAHLART><SUMME> </SUMME><KARTENNR /><ZUONR>1001</ZUONR></E1WPB06></E1WPB01></IDOC><IDOC><EDI_DC40><TABNAM>EDI_DC40</TABNAM><MANDT /><DOCNUM /><DOCREL>620</DOCREL><DIRECT>2</DIRECT><IDOCTYP>WPUBON01</IDOCTYP><MESTYP>WPUBON</MESTYP><MESCOD>ST6</MESCOD><SNDPOR>WPUX</SNDPOR><SNDPRT>KU</SNDPRT><SNDPRN>0518</SNDPRN><RCVPOR /><RCVPRT>KU</RCVPRT><RCVPRN>0518</RCVPRN><REFINT>00000003832293</REFINT></EDI_DC40><E1WPB01 SEGMENT="1"><POSKREIS>0518</POSKREIS><KASSID>29</KASSID><VORGDATUM>20071029</VORGDATUM><VORGZEIT>160634</VORGZEIT><BONNUMMER>1002</BONNUMMER><KASSIERER>100</KASSIERER><CSHNAME> </CSHNAME><BELEGWAERS>GBP</BELEGWAERS><E1WPB02 SEGMENT="2"><VORGANGART /><QUALARTNR>ARTN</QUALARTNR><ARTNR>000000065601301390</ARTNR><VORZEICHEN>-</VORZEICHEN><MENGE>1</MENGE><AKTIONSNR>0000000000</AKTIONSNR><REFBONNR> </REFBONNR><E1WPB03 SEGMENT="3"><VORZEICHEN /><KONDITION>PN10</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03><E1WPB03 SEGMENT="4"><VORZEICHEN></VORZEICHEN><KONDITION>ZPN1</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03></E1WPB02><E1WPB02 SEGMENT="5"><VORGANGART /><QUALARTNR>ARTN</QUALARTNR><ARTNR>000000065601301390</ARTNR><VORZEICHEN>-</VORZEICHEN><MENGE>1</MENGE><AKTIONSNR>0000000000</AKTIONSNR><REFBONNR> </REFBONNR><E1WPB03 SEGMENT="6"><VORZEICHEN /><KONDITION>PN10</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03><E1WPB03 SEGMENT="7"><VORZEICHEN></VORZEICHEN><KONDITION>ZPN1</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03></E1WPB02><E1WPB02 SEGMENT="8"><VORGANGART /><QUALARTNR>ARTN</QUALARTNR><ARTNR>000000065601301390</ARTNR><VORZEICHEN>-</VORZEICHEN><MENGE>1</MENGE><AKTIONSNR>0000000000</AKTIONSNR><REFBONNR> </REFBONNR><E1WPB03 SEGMENT="9"><VORZEICHEN /><KONDITION>PN10</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03><E1WPB03 SEGMENT="10"><VORZEICHEN></VORZEICHEN><KONDITION>ZPN1</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03></E1WPB02><E1WPB02 SEGMENT="11"><VORGANGART /><QUALARTNR>ARTN</QUALARTNR><ARTNR>000000065601301390</ARTNR><VORZEICHEN>-</VORZEICHEN><MENGE>1</MENGE><AKTIONSNR>0000000000</AKTIONSNR><REFBONNR> </REFBONNR><E1WPB03 SEGMENT="12"><VORZEICHEN /><KONDITION>PN10</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03><E1WPB03 SEGMENT="13"><VORZEICHEN></VORZEICHEN><KONDITION>ZPN1</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03></E1WPB02><E1WPB02 SEGMENT="14"><VORGANGART /><QUALARTNR>ARTN</QUALARTNR><ARTNR>000000065601301390</ARTNR><VORZEICHEN>-</VORZEICHEN><MENGE>1</MENGE><AKTIONSNR>0000000000</AKTIONSNR><REFBONNR> </REFBONNR><E1WPB03 SEGMENT="15"><VORZEICHEN /><KONDITION>PN10</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03><E1WPB03 SEGMENT="16"><VORZEICHEN></VORZEICHEN><KONDITION>ZPN1</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03></E1WPB02><E1WPB06 SEGMENT="17"><VORZEICHEN></VORZEICHEN><ZAHLART>PTCS</ZAHLART><SUMME> </SUMME><KARTENNR /><ZUONR>1002</ZUONR></E1WPB06></E1WPB01></IDOC><IDOC><EDI_DC40><TABNAM>EDI_DC40</TABNAM><MANDT /><DOCNUM /><DOCREL>620</DOCREL><DIRECT>2</DIRECT><IDOCTYP>WPUBON01</IDOCTYP><MESTYP>WPUBON</MESTYP><MESCOD>ST6</MESCOD><SNDPOR>WPUX</SNDPOR><SNDPRT>KU</SNDPRT><SNDPRN>0518</SNDPRN><RCVPOR /><RCVPRT>KU</RCVPRT><RCVPRN>0518</RCVPRN><REFINT>00000003832294</REFINT></EDI_DC40><E1WPB01 SEGMENT="1"><POSKREIS>0518</POSKREIS><KASSID>29</KASSID><VORGDATUM>20071029</VORGDATUM><VORGZEIT>160634</VORGZEIT><BONNUMMER>1003</BONNUMMER><KASSIERER>100</KASSIERER><CSHNAME> </CSHNAME><BELEGWAERS>GBP</BELEGWAERS><E1WPB02 SEGMENT="2"><VORGANGART /><QUALARTNR>ARTN</QUALARTNR><ARTNR>000000065601301390</ARTNR><VORZEICHEN>-</VORZEICHEN><MENGE>1</MENGE><AKTIONSNR>0000000000</AKTIONSNR><REFBONNR> </REFBONNR><E1WPB03 SEGMENT="3"><VORZEICHEN /><KONDITION>PN10</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03><E1WPB03 SEGMENT="4"><VORZEICHEN></VORZEICHEN><KONDITION>ZPN1</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03></E1WPB02><E1WPB02 SEGMENT="5"><VORGANGART /><QUALARTNR>ARTN</QUALARTNR><ARTNR>000000065601301390</ARTNR><VORZEICHEN>-</VORZEICHEN><MENGE>1</MENGE><AKTIONSNR>0000000000</AKTIONSNR><REFBONNR> </REFBONNR><E1WPB03 SEGMENT="6"><VORZEICHEN /><KONDITION>PN10</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03><E1WPB03 SEGMENT="7"><VORZEICHEN></VORZEICHEN><KONDITION>ZPN1</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03></E1WPB02><E1WPB02 SEGMENT="8"><VORGANGART /><QUALARTNR>ARTN</QUALARTNR><ARTNR>000000065601301390</ARTNR><VORZEICHEN>-</VORZEICHEN><MENGE>1</MENGE><AKTIONSNR>0000000000</AKTIONSNR><REFBONNR> </REFBONNR><E1WPB03 SEGMENT="9"><VORZEICHEN /><KONDITION>PN10</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03><E1WPB03 SEGMENT="10"><VORZEICHEN></VORZEICHEN><KONDITION>ZPN1</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03></E1WPB02><E1WPB02 SEGMENT="11"><VORGANGART /><QUALARTNR>ARTN</QUALARTNR><ARTNR>000000065601301390</ARTNR><VORZEICHEN>-</VORZEICHEN><MENGE>1</MENGE><AKTIONSNR>0000000000</AKTIONSNR><REFBONNR> </REFBONNR><E1WPB03 SEGMENT="12"><VORZEICHEN /><KONDITION>PN10</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03><E1WPB03 SEGMENT="13"><VORZEICHEN></VORZEICHEN><KONDITION>ZPN1</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03></E1WPB02><E1WPB02 SEGMENT="14"><VORGANGART /><QUALARTNR>ARTN</QUALARTNR><ARTNR>000000065601301390</ARTNR><VORZEICHEN>-</VORZEICHEN><MENGE>1</MENGE><AKTIONSNR>0000000000</AKTIONSNR><REFBONNR> </REFBONNR><E1WPB03 SEGMENT="15"><VORZEICHEN /><KONDITION>PN10</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03><E1WPB03 SEGMENT="16"><VORZEICHEN></VORZEICHEN><KONDITION>ZPN1</KONDITION><KONDVALUE>1.00</KONDVALUE><CONDID /><QUALCONDID /></E1WPB03></E1WPB02><E1WPB06 SEGMENT="17"><VORZEICHEN></VORZEICHEN><ZAHLART>PTCS</ZAHLART><SUMME> </SUMME><KARTENNR /><ZUONR>1003</ZUONR></E1WPB06></E1WPB01></IDOC></WPUBON01>
    In the message monitor, I get a chequered flag. Great. However, I get the dreaded error 500 in the SOAP receiver comm channel:
    SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal Server Error
    Exception caught by adapter framework: SOAP Error
    Delivery of the message to the application using connection AFW failed, due to: SOAP Error.
    Any ideas as to what this might be?! I'm getting there.... if I get a solution out of this, I promise to write the blog myself!
    Cheers
    Stuart

  • Share persistence.xml file between two EJB modules in EAR

    Hello, everybody!
    First of all, I would like to say that I already posted this question in another forum:
    [http://community.jboss.org/thread/154128?tstart=0]
    But as I haven't got any answer from there and this issue is very crucial to me I'm posting it here too in the hope that I get an answer. So, here it goes:
    I have two EJB modules in an EAR module. I would like to know how to share a single persistence.xml file with these two EJB modules. If I replicate the persistence.xml file in the two EJB modules, the EAR project deploys ok, but of course that's not what we want. If I remove the persistence.xml file from any of the EJB projects, the EAR doesn't deploy properly. I'm stuck with this. I've already tried many kind of configurations but none worked. I really would like to have some help with this issue to proceed working. This is my EAR structure:
    solicitacoes-ejb.jar       (EJB session beans)
    solicitacoes-dao.jar       (EJB interfaces)
    solicitacoes-dao-jpa.jar   (EJB session beans)
    solicitacoes-ejbClient.jar (entities and EJB interfaces)
    solicitacoes-web.war
    META-INF/This is my application.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <application
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
    version="5">
        <display-name>solicitacoes-ear</display-name>
        <module>
            <ejb>solicitacoes-ejb.jar</ejb>
        </module>
        <module>
            <ejb>solicitacoes-dao-jpa.jar</ejb>
        </module>
        <module>
            <web>
                <web-uri>solicitacoes-web.war</web-uri>
                <context-root>solicitacoes</context-root>
            </web>
        </module>
    </application>If I remove the persistence.xml file from one of the EJB modules, let's say solicitacoes-dao-jpa.jar, I get this error when deploying the EAR file:
    ... 39 more
    Caused by: java.lang.IllegalArgumentException: Can't find a persistence unit named 'null' in AbstractVFSDeploymentContext@28359170{vfs:///C:/jboss-6.0.0.20100429-M3/server/default/deploy/solicitacoes-ear.ear/solicitacoes-dao-jpa.jar/}
    at org.jboss.jpa.resolvers.BasePersistenceUnitDependencyResolver.resolvePersistenceUnitSupplier(BasePersistenceUnitDependencyResolver.java:107) [:1.0.2-alpha-1]
    at org.jboss.ejb3.Ejb3Deployment.resolvePersistenceUnitSupplier(Ejb3Deployment.java:778) [:1.3.1]
    at org.jboss.ejb3.EJBContainer.resolvePersistenceUnitSupplier(EJBContainer.java:1517) [:1.3.1]
    at org.jboss.injection.PersistenceUnitHandler.addPUDependency(PersistenceUnitHandler.java:130) [:1.3.1]
    ... 43 moreI need help with this issue. As you could see, the EJB container doesn't like to see an EJB module without a persistence.xml file. This is clearly a dumb decision though. I agree with it if there was only one EJB module in an EAR. But the container should have been smart enough to require only one persistence.xml file in an EAR module with more than one EJB module, and share that persistece context with the whole EAR.
    Acting the way it is acting now, the container forces us to duplicate the persistece.xml file and kill our application modularity. This is clearly wrong. I've already tried to put the entity classes and persistence.xml file in the lib directory of the EAR, but it didn't work either. The container needs to have the persistence.xml file in both EJB modules.
    I don't know if this is a JBoss implementation decision or if it comes from the Java EE 6 specification. Whatever it is, it goes against all good modular and good design decision. Please if some of you know how to solve this, took a little time to tell me how. I would be very grateful.
    Thank you in advance.
    Marcos

    Dear Mr. gimbal2,
    In another occasion I would not reply to such a 'helpful' answer like the one you gave me (yes, it is undoubtedly an answer because that's how you classified it in the beginning of your reply), but as today I have plenty of time here in my job, for this week we're not working full time as usual, I decided to reply to it.
    You have to completely overhaul your attitude.I really didn't know I was taking so personal on this issue to have to 'completely overhaul my attitude'. Thank you for pointing that out.
    In stead of calling the technology dumb, admit to yourself that perhaps you don't understand it properly and that your ideas of what is correct design perhaps is a little lacking. I didn't call the technology dumb because I stated very clearly that I don't know for sure if it is working this way. I said in the last paragraph:
    +"I don't know if this is a JBoss implementation decision or if it comes from the Java EE 6 specification. Whatever it is, it goes against all good modular and good design decision."+
    So, I let implicit the fact that the technology or the implementation of the technology is dumb only if it doesn't allow this possibility. Regarding the fact that your said that I should
    admit to myself that perhaps I don't understand it properly, where did I stated in my question that I understand it completely? It's clear in the last paragraph that I don't. If I'm asking that's because I have doubts. Maybe my ideas of what is correct is wrong, and that's why I'm here in this forum. But everyone with a good sense knows that what I propose in this discussion is by no means a wrong design decision. Where is it a sin to have more than one EJB module in a EAR and a persisntece.xml file shared for the whole EAR? Does everyone that has more than one EJB module in an EAR module need to connect to more than one database? Is it wrong to want to have your DAO implementation in a separate EJB module in order to make deployment easy and also changes, if you later want to replace that implementation with another one without affecting
    the other modules? I don't think that a design decision that seeks this is lacking. I don't think that Java EE today is a dumb technoloby, but everyone knows that before it gets to the present level, it was a technology known to have made big dumb decisions that the community latter corrected, with ideas like O/R mapping (Hibernate), dependency injection (Spring), Struts and lots of other examples that we all know. No one can deny this and lots of wrong things will continue to be fixed in later releases.
    Maybe when you rise yourself back to that level, you open yourself up again to thinking in correct solutions in stead of trying to hammer through your own poorly chosen one.To be sincere, I see you took very personal about this issue. You really shows to be someone that has no respect to other people and you judge them too. I must say that I got surprised by the way you answered my post. I didn't expect to get such sarcastic answer to what I asked. I personally don't act this way. If I can't help a person, I also don't try to ridicularize him.
    Marcos

  • Multiple iTunes XML Files?

    Hello everyone. I have a problem. I want to move my iTunes library over to my external hard drive. DO NOT post a link on how to do this. I have read all of them. The problem is that I have multiple iTunes XML files. Not just one. I don't know what to do. Can i delete them? Can i combine them or something???

    It is difficult to understand your question as the the number of xml files does not seem to be related to your question. If you have a complex question then you need to explain it fully with your current iTunes set up.
    The simple answer assuming a default iTunes set up is.
    1. Ensure all your music is in the iTunes Music folder in the iTunes folder. Consolidate if it is not.
    2. With iTunes closed, Copy the iTunes folder to the external drive.
    3. Hold down the shift key (Windows) and start iTunes, keep holding the shift key until you are prompted to choose a library. Naviagte to the iTunes folder on the external drive and choose iTunes Library.itl.
    If you ever start iTunes with the drive disconnected it will default back to the internal drive and you have to do another shift key start to connect to the external drive.

  • How dos the application will know the path of persistence.xml file

    Hi ,
    I am seeing examples for ConatierManaged EntityManager
    @PersistenceContext
    public class Test extends HttpServlet
    public void doGet()
    EntityManager em
    // JnDI Lookup code
    em = (EntityManager) ctx.lookup("java:comp/env/persistence/em");
    em.persist(Employee)
    }Inside web.xml file
    <web-app>
    <persistence-context-ref>
    <persistence-context-ref-name>persistence/em</persistence-context-ref-name>
      <persistence-unit-name>my-pu</persistence-unit-name>
    </persistence-context-ref>
    </web-app>Please tell me how the Application will know the path of persistence.xml file .
    Thank you for reading

    it is predefined; JPA always looks for the persistence.xml file in the META-INF folder.

  • Multiple log4j.xml files for single application.

    Hi All,
    How to use multiple log4j.xml files for single application?
    I do have a pluggable application modules. ie, If I add a jar I will get some functionalities. Like that i do have many jars.
    Log4j.xml also will be present in that jar only. So if I add multiple jar files like this, I will get multiple log4j.xml files. What should I do?

    Each logger can have its own file I think. Check the log4j documentation.

  • Multiple library.xml files normal?

    I just made 2 iTunes libraries, both located in the Music folder on my internal HD. One is just called "iTunes" which gets backed up with time machine, and the other is called "iTunes For Backup", which I use for temporary music projects etc that I exclude from backup to save space.
    The one called "iTunes For Backup" has an "iTunes Library.xml" file as normal, but the "iTunes" folder has both an "iTunes Library.xml" file AND an "iTunes Music Library.xml" file.
    After playing around, I discovered that if I start from scratch and create a new library called "iTunes", initially it will create just the "iTunes Library.xml" file, but as soon as I've added songs and quit, it creates a second file called "iTunes Music Library.xml". If I create a new iTunes library and name it anything other than "iTunes", only an "iTunes Library.xml" is ever created, which I think is normal behaviour.
    To be honest I don't even know if this is a problem, but I've never seen multiple Library.xml files inside the same iTunes folder before. And why it would have anything to do with what you name the library seems baffling. It strikes me as very odd behaviour so I thought I would throw it out there out of curiousity to see if this is normal. I'd hate to find out it's a problem after I've built a huge library.

    I'm wondering the exact same thing.
    I'm able to find a lot of resources on the itunes library.xml file, but hardly anything on the itunes music library.xml file…
    I'm also lost as to how I import my playlists back into iTunes. I keep my music on an internal 'Media' partition and am pretty well versed with OSX, but can't seem to figure it out… All the problems relate back to both of these XML files. Importing one will import some of the playlists, but not all… Weird

  • Multiple Project XML files

    Can I have multiple deployment project XML files(which makes descriptor file cleaner and easily maintainable)? If yes, how to specify each file name in Sessions.xml and can I use different datasources for different project XML files or it has to use the same datasource for the entire project? Any help is appreciated.
    Thanks,
    Rafi.

    Not in the sessions.xml, but it is possible to merge two projects together at runtime...
    Re: merging two different MWB projects at run-time

  • JPA - the container - persistence.xml file

    Hi,
    I'm just starting out with JPA so these are basic questions.
    Firstly, this is what I've done:
    1) Created JPA entities from tables
    2) I've used JDeveloper to create a Java Service Facade using the wizards.
    3) Created a persistence unit and added the JPA entities to this.
    The resulting persistence.xml is in a project with only JPA stuff in it (in META-INF).
    The project which is run (some EJB 2.0 session beans and message driven beans, all specified in the ejb-jar.xml) has the JPA's projects classpath on its classpath.
    The JPA code itself accesses the entity manager programatically i.e. it does not make use of any J2EE container services.
    My question is:
    Are my JPA entities fully fledged EJB 3.0 entities i.e. are they being managed by the container? I'm accessing the JPA entities in a J2SE way, they just happen to be running within a J2EE container.

    Are my JPA entities fully fledged EJB 3.0 entities
    i.e. are they being managed by the container? I'm
    accessing the JPA entities in a J2SE way, they just
    happen to be running within a J2EE container.The meaning of "managed" for Entities has changed from EJB 2 to 3. In JPA, Entities are managed by a Persistence Provider and not by the container per se. This is why you can have a managed Entity in a Java SE environment.
    But to answer your question, yes your classes are full fledged JPA Entities if read through, merged, or persisted with an EntityManager. You can find out more about the JPA definition of "managed" in section 3.2 of the JPA Spec.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Configure the persistence.xml file

    Hi experts,
    i want to develop a little JPA-Project in the NWDS 7.3. It was no problem to create entities but i dont know how to configure the persistence.xml-flie to get a connection to the database.? I use an Oracle database.
    Thanks in advance

    I solved the problem. I had no database connection.
    Edited by: jtrebess on Oct 13, 2011 9:28 AM

  • Classnot found exception- persistence.xml

    While Executing Unit test from Eclipse itself, Keep getting exception saying......Unable to load entity class, it's not on the classpath, check your persistence.xml
    if anyone have some clue on that?
    Entity classes are in some different project in eclipse & have added those Entities jars in My classpath.

    Nicky26 wrote:
    While Executing Unit test from Eclipse itself, Keep getting exception saying......Unable to load entity class, it's not on the classpath, check your persistence.xml
    if anyone have some clue on that?
    Entity classes are in some different project in eclipse & have added those Entities jars in My classpath.Java does not agree with you and Java is the boss.
    A thought: perhaps the wrong persistence.xml is loaded? In other words, do you have multiple persistence.xml files on the classpath?

  • Multiple PUs in a single persistence.xml

    Hi,
    I'm trying to define two different PUs for a standalone and Java EE environments, so a single persistence.xml could be used.
    Here goes the persistence.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
      <persistence-unit name="derbyPU" transaction-type="RESOURCE_LOCAL">
        <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
        <class>pl.jaceklaskowski.jsf.tomahawk.entities.Pracownik</class>
        <properties>
          <property name="openjpa.ConnectionDriverName" value="org.apache.derby.jdbc.EmbeddedDriver" />
          <property name="openjpa.ConnectionURL" value="jdbc:derby:target/derbyDB;create=true" />
          <property name="openjpa.ConnectionUserName" value="app" />
          <property name="openjpa.ConnectionPassword" value="app" />
          <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema" />
          <property name="openjpa.Log" value="DefaultLevel=WARN,SQL=TRACE" />
        </properties>
      </persistence-unit>
      <persistence-unit name="Kadry">
        <jta-data-source>jdbc/derby</jta-data-source>
        <class>pl.jaceklaskowski.jsf.tomahawk.entities.Pracownik</class>
      </persistence-unit>
    </persistence>and here goes the managed bean of a JSF application I'm developing.
    package pl.jaceklaskowski.jsf.tomahawk;
    import java.util.List;
    import javax.faces.model.DataModel;
    import javax.faces.model.ListDataModel;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    public class Pracownicy {
        @PersistenceContext(name="Kadry")
        EntityManager em;
        DataModel pracownicy = new ListDataModel();
        public DataModel getLista() {
            List resultList = em.createQuery("SELECT p FROM Pracownik p ORDER BY p.lastName").getResultList();;
            pracownicy.setWrappedData(resultList);
            return pracownicy;
    }When I run it on GF v2b36 I'm getting the following exception:
    com.sun.enterprise.deployment.backend.IASDeploymentException: Deployment Error -- Could not resolve a persistence unit corresponding to the persistence-context-ref-name [Kadry] in the scope of the module called [C:\projs\myfaces-tomahawk\target\myfaces-tomahawk]. Please verify your application.
            at com.sun.enterprise.deployment.BundleDescriptor.findReferencedPUsViaPCRefs(BundleDescriptor.java:689)
            at com.sun.enterprise.deployment.WebBundleDescriptor.findReferencedPUs(WebBundleDescriptor.java:709)
            at com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.getAllPersistenceUnitDescriptors(PersistenceProcessor.java:158)
            at com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.processApplication(PersistenceProcessor.java:119)
            at com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.processApplication(DeploymentEventListenerImpl.java:198)
            at com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.processEvent(DeploymentEventListenerImpl.java:159)
            at com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.notifyDeploymentEvent(DeploymentEventListenerImpl.java:109)
            at com.sun.enterprise.deployment.backend.DeploymentEventManager.notifyDeploymentEvent(DeploymentEventManager.java:66)
            at com.sun.enterprise.deployment.backend.ModuleDeployer.handlePostDeployEvent(ModuleDeployer.java:618)
            at com.sun.enterprise.deployment.backend.ModuleDeployer.postDeploy(ModuleDeployer.java:607)
            at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:172)
            at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:174)
            at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
            at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:892)
            at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
            at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:761)
            at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
            at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)I double-checked that the jar with the Kadry PU is in WEB-INF/lib directory of the web application.
    Does anyone have any idea what might be wrong?
    Jacek
    Jacek Laskowski
    http://www.jaceklaskowski.pl

    Hi Jacek,
    The attribute you should set is unitName(), not name(). name() defines the location of the
    @PersistenceContext dependency within the component environment (java:comp/env). It
    is independent of the dependency type and appears on all Java EE environment annotations :
    @EJB, @Resource, etc.
    unitName() specifies the name of the associated persistence unit. If there is only one defined it's
    not needed. However, in your case there are two so since it's not specified there isn't enough
    information to resolve the correct one.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Non-blocking parsing of multiple xml files

    Hi there,
    I'm trying to parse multiple huge XML files concurrently for a query system over multiple xml streaming systems.
    For each huge xml file, I read them into the memory gradually (the new data would cover the old data in the buffer if the buffer is full). Two questions here:
    1. Do I have to set up a socket and write the buffered data to the socket in order to simuate that the parser can parse infinitely? It sounds not good to use socket across two threads just for the "infinite" nature.
    2. I want to simulate concurrently parsing multiple streams. A straightforward way is to have each parser sit in a thread. Is there any otherway that I can put all parsers in one thread and alternately call them? This requires that each individual parser could parse whatever they have seen so far rather and resume when they are called again.
    I'm curiously awaiting for your answers.
    thanks a lot,
    hong

    just taking a guess: create your own reader by extending java.io.Reader ; and let this reader taking care of fetching the data that the parser will use.

  • Getting data from multiple XML Files

    Could any one please shed some light about the best way to
    read multiple external xml files through Flex? We haveabout 100
    different xml files (of which only few are randomly accessed by the
    users).
    I tried implementing the following generic function which
    takes a filename but when debugging it, it seems that the handler
    never gets call after executing the service.send() line! I will
    greatly appreciate your help!!!
    public function fetchFileContent(fileName:String):void{
    //this method is called upon clicking on a button
    var service:HTTPService = new HTTPService();
    service.url = "filePath/" + fileName ;
    service.useProxy = false;
    service.resultFormat = "e4x";
    service.addEventListener ("result",fileRetrievalHandler)
    service.send();
    public function fileRetrievalHandler(evnt:ResultEvent):void{
    fileContent = evnt.result.feed; //this line never gets
    executed

    "miglara" <[email protected]> wrote in
    message
    news:glhase$5sr$[email protected]..
    > Could any one please shed some light about the best way
    to read multiple
    > external xml files through Flex? We haveabout 100
    different xml files (of
    > which
    > only few are randomly accessed by the users).
    > I tried implementing the following generic function
    which takes a
    > filename
    > but when debugging it, it seems that the handler never
    gets call after
    > executing the service.send() line! I will greatly
    appreciate your help!!!
    >
    > public function fetchFileContent(fileName:String):void{
    //this method is
    > called upon clicking on a button
    > var service:HTTPService = new HTTPService();
    > service.url = "filePath/" + fileName ;
    > service.useProxy = false;
    > service.resultFormat = "e4x";
    > service.addEventListener ("result",fileRetrievalHandler)
    > service.send();
    > }
    >
    > public function
    fileRetrievalHandler(evnt:ResultEvent):void{
    > fileContent = evnt.result.feed; //this line never gets
    executed
    > }
    Try adding a fault handler and seeing if that fires. Also,
    since you're
    using HTTPService instead of URLLoader, be aware that this
    probably won't
    ever work from your development environment unless you've
    either changed the
    output directory to go to the server or you've changed some
    compiler flags
    to allow you to get local and network access at the same
    time. This is why
    I always use URLLoader to load in XML files at a relative
    path...it just
    works, without my needing to change anything.

  • Query multiple XML files

    Hi,
    Is there another way of making queries in multiple different XML files other than using XQuery?
    I use CremeVM for a CDC but it doesn't have desiredAssertionStatus() method in its Class.class so XQuery doesn't work.
    Another option to solve it will be to execute multiple XPath expressions but not a good solution I think.
    Any suggestions?

    Thanks Curt,
    just for others....  My Function for reading XML:-
    let XmlImportedFile = (FilePath, FileName) =>
    let
    Source = Folder.Files(FilePath),
    File = Source{[#"Folder Path"=FilePath,Name=FileName]}[Content],
    ImportedXML = Xml.Tables(File)
    in
    ImportedXML
    in
    XmlImportedFile
    then it's use to combine into a custom Column:-
    let
    Source = Folder.Files("C:\Users\Tim\Data\Education\Collect\XML files January 2014"),
    InsertedCustom = Table.AddColumn(Source, "XmlImportedFiles", each XmlImportedFile([Folder Path],[Name])),
    RemovedColumns = Table.RemoveColumns(InsertedCustom,{"Content", "Name", "Extension", "Date accessed", "Date modified", "Date created", "Attributes", "Folder Path"}),
    #"Expand XmlImportedFiles" = Table.ExpandTableColumn(RemovedColumns, "XmlImportedFiles", {"Name", "Header", "School", "Pupils"}, {"XmlImportedFiles.Name", "XmlImportedFiles.Header", "XmlImportedFiles.School", "XmlImportedFiles.Pupils"})
    in
    #"Expand XmlImportedFiles"
    thanks again and great blog post :-)
    Thank you for you time folks!

Maybe you are looking for

  • HT204053 how to I remove an authorised computer when it is no longer working and accessible?

    I want to deauthorise a couple of computers that is now no longer working. How can I do it as I have no access to the authorised computers.

  • Aperture 3.5 library not comparable with iPhoto 9.5

    I have upgraded to Mavericks, i received the updates fot iPhoto and aperture, so now iPhoto is now 9.5 and Aperture is 3.5.  i previously shared my aperture library with iPhoto, as i work with both apps.  The aperture library had no problems in openi

  • Role workflow generation errr

    Hi gurus, Could you help me with this error, please? Error while processing your query What has happened? The URL call http://grq.kuo.mx:8000/sap/bc/webdynpro/sap/grfn_msmp_wfl_config was terminated because of an error. Note The following error text

  • CMP Entity Bean wrong generated ejbfindByPrimaryKey

    i am using Netbeans 6.1 with GlassFish V2 and JavaDB i wrote a basic CMP Entity Bean and it gives me this exception JDO74004: Bean 'ProducttbBean' method ejbFindByPrimaryKey: com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a

  • Macbook apps want to use my firefox/chrome proxy

    Hi I am new to MacBooks, I have a MacBook Pro 13" with OS X Snow Leopard operating system I use a proxy to watch BBC iPlayer from outside of the UK, I had that set up in Firefox preferences and also a proxy switcher add-on so firefox itself would onl