Managing persistence units across different EJB modules

Hi,
I'm testing some things and I have the following situation :
1 EJB module (.JAR) with basic EJBs and entities
1 EJB module (.JAR) with EJBs and entities that extend some base entities
Now, I've placed a persistence.xml in each both defining a persistence unit with the same name (I want both EJB modules, or more specifically the injected EntityManagers therein to know about both the basic as well as the extended entities).
My question is, what is the correct way to set up a project so you can have some core functionality EJBs and entities, and some optional extension EJBs and entities in such a way that a single persistence unit is used for all entities.
I hope anyone can help me out here. Thanks.

Persistence unit will not share references to entity in terms of the inheritance you want to achieve.
I think the only way you can do that is you the @MappedSuperClass on a class. THis is because the class so annotated is not entered in any of the persistence unit and thus can be shared. I have used it and it works.
Regards,
Michael

Similar Messages

  • Defining cmp-relation to EB contained in different ejb module project

    Hello,
    I have to migrate an existing J2EE Application to SAP NetWeaver and WebAS. My task is to keep the structure as similar as possible to increase the recognition factor although using Developer Studio as IDE.
    In this application there are cmp relations defined that reference EntityBeans from other sub projects (that I tried to create in different ejb module projects).
    References in the same ejb module project seem to work fine but I cannot select referenced EntityBeans of other projects as relation target.
    Another remark:
    In the given application the ejb-jar.xml-file of the referencing component contains entries of the referenced one. The Developer Studio allows to Add EJBs to ejb-jar.xml, even referenced Beans. But when I select to add referenced EJBs only the Beans of the current project can be chosen. (I did not forget to enter an ejb-local-ref from the referencing to the referenced Bean in ejb-jar.xml as well)
    Can anyone give me a hint on how to solve this task? Or where I have forgotten to add a reference?
    Thanks
    Daniel

    Hello Viliana,
    Hello everybody else!
    I'm currently writing the corresponding masterthesis to my project. That's why I have to deal with this "problem" again.
    I tried to look up the part of the spec Viliana's hint ("When you create and use cmp-relationships your beans must be included in one and the same JAR file (that's according to the EJB specification)") bases on.
    But the only thing I found addressing this issue tells something else:
    "[...]Container-managed relationships can exist only among entity beans within the same local relationship
    scope,[...]" (EJBSpec2.1, section 10.3.2)
    In my opinion this does not necessarily mean that they have to be in the same JAR but in the same EAR file...
    This would mean, that the chosen cmp-relationships strategy with ejb-module-projects is too restrictive.
    Can anyone help me with this... Does anyone know further hints on how Entity Beans have to be deployed when belonging to cmp-relationships?
    Thanks a lot for any hint on this
    Best regards,
    Daniel

  • Can i pass the persistence unit to the Ejb before it inject the entity mana

    Hey,
    The user in my system can create his personal schema, so i need to work with multiple schemas.
    As i understand i need to create at run time persistence unit for each schema.
    The problem is that my DAO i inject the entity manager in the following way:
    @PersistenceContext(persistenceUnit="bla-bla")
    public void setEntityManager(EntityManager em) {
    this.em = em;
    }i need to write the persistence unit name hard coded.
    How can i solve this?
    Thank you

    There's no way to get this kind of dynamic association to a persistence unit for container-managed
    persistence contexts. You'll need to explicitly create an EntityManager using the
    EntityManagerFactory API, where you specify the name of the persistence unit at runtime. Even in
    that case, the persistence unit must already be defined.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Persistence shared across EJB and WAR projects

    Hi,
    I have created an Enteprise Application in netbeans which has an EJB project and a web archive. This may be expanded further at a later time by having an application client as well. I am still fairly new to this so you'll have to forgive me if this is a simple problem. I have a persistence unit (persistence.xml) that I need to share across both WAR and EJB, but so far am not having much luck. I have read various responses and they say I should have the EAR constructed as the following:
    project.ear
    =======
    META-INF/MANIFEST.MF
    lib/persistence.jar
    ---> META-INF
    ---> META-INF/persistence.xml
    project-ejb.jar
    project-war.war
    When I try and compile it though I get the following messages from both EE modules:
    Note: The persistence xml file [META-INF/persistence.xml] was not found. NO GENERATION will occur!! Please ensure a persistence xml file is available either from the CLASS_OUTPUT directory [META-INF/persistence.xml] or using the eclipselink.persistencexml property to specify its location.
    I have tried copying the persistence.xml into the main META-INF directory in the EAR file and setting the eclipselink.persistencexml=META-INF/persistence.xml, but it still shows the same thing. Is this a classpath issue or is there something else wrong?
    Many thanks

    The EAR is a good idea, but you put the META-INF/persistence.xml in your ejb module. The EJB is where you want to do all your (container managed) transactional stuff, so make calls into your EJBs from the WAR in stead of trying to share a persistence unit across modules.

  • 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

  • Application Client Enity Manager cannot find Persistence Unit with JWS

    I have an Enterprise Application Project in Netbeans 6.7.1.
    The enterprise application client module has the business code and the
    persistence unit (TopLink) defined in the app-client.jar. I can run this
    application clinet from NB without a problem. I can also run it with JWS
    if I remove the EnityManager.
    I'm using JPA (EnityManager) in a Java SE environment.
    When I try and run the app-client from Java Web Start I get an error
    that the EnityManager cannot find the PU. The persistence unit is packaged in the app.ear->app-client.jar->META-INF->persistence.xml.
    There's not a wealth of information, that I could find on the net, but this
    seems to be correct.
    The error I get is:
    INFO: ACC009: Load Application Class: [jws.Main]
    hello world! From JWS
    Dec 3, 2009 11:44:21 AM com.sun.enterprise.appclient.MainWithModuleSupport <init>
    WARNING: ACC003: Application threw an exception.
    javax.persistence.PersistenceException: No Persistence provider for EntityManager named JWS-app-clientPU: The following providers:
    oracle.toplink.essentials.PersistenceProvider
    oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
    Returned null to createEntityManagerFactory.
    Any ideas on what I need to do to properly package the PU for an Enterprise Application Client ??
    Thanks,
    David

    I solved this problem.
    When we call resources from EAR application, WebLogic adds "Cache-Control=private, no-cache, no-store, s-maxage=0, must-revalidate" to all responses header.
    It was the reason of error occurence.
    I used filter from http://flavio.tordini.org/http-headers-filter to remove Cache-Control from header when calling jar resources.
    After that, applicatiom started to work again.

  • How do I fix colour picker to work across different colour-managed monitors?

    Hey everyone!
    I'm assuming this problem I'm having stems from having colour-calibrated monitors, but let me know if I'm wrong!
    To preface, this is the setup I have:
    Windows 7
    3 monitors as follows, all have individual colour profiles calibrated using the Spyder 3
    Cintiq 12WX
    Dell U2410
    Dell 2409WFP
    Photoshop CS6 - Proofed with Monitor RGB, and tested with colour-managed and non-colour-managed documents
    I usually do most of my work on the Cintiq 12WX, but pull the photoshop window to my main monitor to do large previews and some corrections. I noticed that the colour picker wouldn't pick colours consistently depending on the monitor the Photoshop window is on.
    Here are some video examples:
    This is how the colour picker works on my Dell U2410: http://screencast.com/t/lVevxk5Ihk
    This is how it works on my Cintiq 12WX: http://screencast.com/t/tdREx4Xyhw9
    Main Question
    I know the Cintiq's video capture makes the picture look more saturated than the Dell's, but it actually looks fine physically, which is okay. But notice how the Cintiq's colour picker doesn't pick a matching colour. It was actually happening the opposite way for a while (Dell was off, Cintiq was fine), but it magically swapped while I was trying to figure out what was going on. Anyone know what's going on, and how I might fix it?
    Thanks for *any* help!
    Semi-related Question regarding Colour Management
    Colour management has always been the elephant-in-the-room for me when I first tried to calibrate my monitors with a Spyder colourimeter years ago. My monitors looked great, but Photoshop's colours became unpredictable and I decided to abandon the idea of calibrating my monitors for years until recently. I decided to give it another chance and follow some tutorials and articles in an attempt to keep my colours consistent across Photoshop and web browsers, at least. I've been proofing against monitor colour  and exporting for web without an attached profile to keep pictures looking good on web browsers. However, pictures exported as such will look horrible when uploaded to Facebook. Uploading pictures with an attached colour profile makes it look good on Facebook. This has forced me to export 2 versions of a picture, one with an attached colour profile and one without, each time I want to share it across different platform. Is there no way to fix this issue?
    Pictures viewed in Windows Photo Viewer are also off-colour, but I think that's because it's not colour managed... but that's a lesser concern.

    I think I've figured out the colour management stuff in the secondary question, but the weird eyedropper issue is still happening. Could just be a quirk from working on things across multiple monitors, but I'm hoping someone might know if this is a bug/artifact.
    Going to lay out what I inferred from my experiments regarding colour management in case other noobs like me run into the same frustrations as I did. Feel free to correct me if I'm wrong - the following are all based on observation.
    General Explanation
    A major source of my problems stem from my erroneous assumption that all browsers will use sRGB when rendering images. Apparently, most popular browsers today are colour-managed, and will use an image's embedded colour profile if it exists, and the monitor's colour profile if it doesn't. This was all well and good before I calibrated my monitors, because the profile attached to them by default were either sRGB or a monitor default that's close to it. While you can never guarantee consistency on other people's monitors, you can catch most cases by embedding a colour profile - even if it is sRGB. This forces colour-managed browsers to use sRGB to render your image, while non-colour-managed browsers will simply default to sRGB. sRGB seems to be the profile used by Windows Photo Viewer too, so images saved in other wider gamut colour spaces will look relatively drab when viewed in WPV versus a colour-managed browser.
    Another key to figuring all this out was understanding how Profile Assignment and Conversion work, and the somewhat-related soft-proofing feature. Under Edit, you are given the option to either assign a colour profile to the image, or convert the image to another colour profile. Converting an image to a colour profile will replace the colour profile and perform colour compensations so that the image will look as physically close to the original as possible. Assigning a profile only replaces the colour profile but performs no compensations. The latter is simulated when soft-proofing (View > Proof Colors or ctrl/cmd-Y). I had followed bad advice and made the mistake of setting up my proofing to Monitor Color because this made images edited in Photoshop look identical when the same image is viewed in the browser, which was rendering my images with the Monitor's colour profile, which in turn stemmed from yet another bad advice I got against embedding profiles .  This should formally answer Lundberg's bewilderment over my mention of soft-proofing against Monitor Colour.
    Conclusion and Typical Workflow (aka TL;DR)
    To begin, these are the settings I use:
    Color Settings: I leave it default at North American General Purpose 2, but probably switch from sRGB to AdobeRGB or  ProPhoto RGB so I can play in a wider gamut.
    Proof Setup: I don't really care about this anymore because I do not soft-proof (ctrl/cmd-Y) in this new workflow.
    Let's assume that I have a bunch of photographs I want to post online. RAWs usually come down in the AdobeRGB colour space - a nice, wide gamut that I'll keep while editing. Once I've made my edits, I save the source PSD to prep for export for web.
    To export to web, I first Convert to the sRGB profile by going to Edit > Convert to Profile. I select sRGB as the destination space, and change the Intent to either Perceptual or Relative Colorimetric, depending on what looks best to me. This will convert the image to the sRGB colour space while trying to keep the colours as close to the original as possible, although some shift may occur to compensate for the narrower gamut. Next, go to Save for Web. The settings you'll use:
    Embed Color Profile CHECKED
    Convert to sRGB UNCHECKED (really doesn't matter since you're already in the sRGB colour space)
    and Preview set to Internet Standard RGB (this is of no consequence - but it will give a preview of what the image will look like in the sRGB space)
    That's it! While there might be a slight shift in colour when you converted from AdobeRGB to sRGB, everything from then on should stay consistent from Photoshop to the browser
    Edit: Of course, if you'd like people to view your photos in glorious wide gamut in their colour-managed browsers, you can skip the conversion to sRGB and keep them in AdobeRGB. When Saving for Web, simply remember to Embed the Color Profile, DO NOT convert to sRGB, and set Preview to "Use Document Profile" to see what the image would look like when drawn with the embedded color profile

  • Bean-managed persistence (BMP) in EJB 3.0

    I've been on the google for a few days now and haven't found one single notion on bean-managed persistence in EJB 3.0 specification. Even the official specification PDFs don't mention it :(
    Help! I need BMP! Does anybody know what's the situtation in EJB 3.0? Can I and how mark an entity bean to be bean-managed persistent and use ejbLoad and ejbStore functions like in the EJB 2.0 or something like that?
    Tnx in advance,
    Igor

    Tnx Frank, I was afraid of that :(
    I think that is a step back for the EJB technology. Now it is fixed to the table structure, every change in the database calls for a re-desing, re-compilation and re-deplyoment.
    With BMP in EJB 2.1 one was able to build a bean that modifies itself according to the table structure dinamically. Is there any way to do it in EJB 3.0?
    Igor

  • EJB 3.0 - problem with persistence unit.

    Hi everybody, I got this problem I would like you to help me.
    I'm doing a proyect with EJB 3.0 using Netbeans 5.5 and Jboss
    The data source is MySQL.
    When I deploy the proyect, the Jboss Log show me this:
    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
    ObjectName: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    State: FAILED
    Reason: javax.naming.NameNotFoundException: jdbc not bound
    I Depend On:
    jboss.jca:service=ManagedConnectionFactory,name=jdbc/connectionPool
    Depends On Me:
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3
    [Please help me, I'm kind of new in EJB]
    [ENTIRE JBOSS LOG]
    10:08:37,375 INFO [TomcatDeployer] undeploy, ctxPath=/DecmoCVLAC-war, warUrl=.../tmp/deploy/tmp16823DecmoCVLAC.ear-contents/DecmoCVLAC-war-exp.war/
    10:08:37,515 INFO [EARDeployer] Undeploying J2EE application, destroy step: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
    10:08:37,515 INFO [EARDeployer] Undeployed J2EE application: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
    10:08:37,546 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
    10:08:39,281 INFO [Ejb3Deployment] EJB3 deployment time took: 47
    10:08:39,296 INFO [JmxKernelAbstraction] installing MBean: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU with dependencies:
    10:08:39,296 INFO [JmxKernelAbstraction]      jboss.jca:name=jdbc/connectionPool,service=ManagedConnectionFactory
    10:08:39,312 WARN [ServiceController] Problem starting service persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    javax.naming.NameNotFoundException: jdbc not bound
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
    at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
    at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:240)
    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.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:99)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
    at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:417)
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy91.start(Unknown Source)
    at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:82)
    at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:626)
    at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:475)
    at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:139)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
    at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:417)
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy36.start(Unknown Source)
    at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:449)
    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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
    at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
    at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
    at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
    at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy37.start(Unknown Source)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
    at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy6.deploy(Unknown Source)
    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
    10:08:39,812 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3 with dependencies:
    10:08:39,812 INFO [JmxKernelAbstraction]      persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    10:08:39,828 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3 with dependencies:
    10:08:39,828 INFO [JmxKernelAbstraction]      persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    10:08:39,859 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp16824DecmoCVLAC.ear-contents/DecmoCVLAC-ejb.jar
    10:08:39,859 INFO [TomcatDeployer] deploy, ctxPath=/DecmoCVLAC-war, warUrl=.../tmp/deploy/tmp16824DecmoCVLAC.ear-contents/DecmoCVLAC-war-exp.war/
    10:08:40,046 INFO [EARDeployer] Started J2EE application: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
    10:08:40,062 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
    --- MBeans waiting for other MBeans ---
    ObjectName: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    State: FAILED
    Reason: javax.naming.NameNotFoundException: jdbc not bound
    I Depend On:
    jboss.jca:service=ManagedConnectionFactory,name=jdbc/connectionPool
    Depends On Me:
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3
    ObjectName: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
    State: NOTYETINSTALLED
    I Depend On:
    persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    ObjectName: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3
    State: NOTYETINSTALLED
    I Depend On:
    persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
    ObjectName: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    State: FAILED
    Reason: javax.naming.NameNotFoundException: jdbc not bound
    I Depend On:
    jboss.jca:service=ManagedConnectionFactory,name=jdbc/connectionPool
    Depends On Me:
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3

    Reason: javax.naming.NameNotFoundException: jdbc not bound
    Although i am quite new to this as well i would say that there is a problem with your connection with the database.
    It seems it cannot connect to Mysql.
    have you download the mysql package library and imported it ?
    Also in your deploy folder in you Jboss
    have you altered the jdbc to connect to you database in your dataset ? ( i am not sure about mysql, but postgre reguired this)
    Most probably it would be the same in mysql.
    <connection-url>jdbc:postgresql://127.0.0.1:5432/Dissertation</connection-url>
    Not sure if this is what you reguire, i am new at this my self

  • EJB Diagram doesn't prompt to Associate with Persistence Unit

    I'm new to EJB/Faces world.
    I did the tutorial Build a Web Application with JDeveloper 11g Using EJB, JPA, and JavaServer Faces.
    But when I add the EJB Diagram, am not prompted to pick a persistence unit and hence am not able to drop my JPA's.
    Any ideas why I might be seeing this?

    I don't remember specifically. I think it was caused at a point during the tutorial that I double clicked on one of the files it created to try to get a feel for what was going on. This may have corrupted that file. I restarted the tutorial and the second time around didn't open any of the extraneous files and the prompt appeared as expected.

  • Retrofit in SAP Solution Manager 7.1 Supported Across Different OS's?

    Is Solution Manager 7.1 Retrofit Capability supported with a different enhancement pack level and across different Operating Systems (HP-UX & AIX)?
    The specific scenario would be setup of a dual landscape where traditional Dev -> QAS-> PRD is on HP UX 11.31. Then we would create a parallel 'Upgrade Project" landscape on IBM AIX 7.1 uDEV -> uQA (on AIX), perform an enhancement pack upgrade on uDeV and uQA and use Solution Manager Retrofit Capability to synchronize transports between the two landscapes.
    Thanks in Advance!
    -Patrick

    Hi we are configuring Google SMTP getting below error..
    No delivery to xxx.com, authentication required
    Message no. XS856
    Diagnosis
    The message was processed successfully in the SAP system. The mail server that is to receive the message for further processing requires authentication. Probably there is no logon data specified in the SAPconnect configuration.
    Information from external system (if available)
    smtp.gmail.com:587
    530 5.7.0 Must issue a STARTTLS command first. i91sm11178241qgd.25 - gsmtp
    Procedure
    Enter the logon data in the SAPconnect node.
    Using Gmail SMTP server using "smtp.gmail.com" with port 587
    Please advise.
    Regards,
    Sudarshan

  • How to manage ApplicationDomain for loaded SWFs across different domains?

    I've been getting this following error -- when I'm loading a subsidiary SWF into a main one. The sub swf contains the overlays. OverlayOne is a subclass of Overlay.
    TypeError: Error #1034: Type Coercion failed: cannot convert OverlayOne@18684f89 to Overlay.
         at HSRawVideoPlayer/setCurrentOverLay()
         at HSRawVideoPlayer/showOverlay()
         at HSRawVideoPlayer/dotRoll()
    I googled and found that I should probably be setting the applicationDomain of the loader context of the loaded swf to be that of the loading SWF (as per Senocular's article on the subject) -- although I thought that in cases of conflict this would resolve to the loading SWFs ApplicationDomain, so not necessary.
    But I've also read that this won't work across different domains, and that's the situation here -- the client wants the urls of loading and loaded swf's to be fully qualified . Will setting the ApplicationDomain of the loaded SWF to be that of the parent solve the problem above, even if they are in different domains? Can someone show me a short code snippet? Thanks!

    Hi,
    DSS has inbuilt functionalities to compare the transactions against the in built rules.If the transactions take place not in accordance with the in-built rules,it is treated as a "violation" and is reporetd.
    Virsa is an example of DSS tool.Here you can build rules for access and process ;constantly compare the actuals Vs the rules;report the violations.
    In SAP R3 for example,the T/code:pfcg is tailored for access control,while the invoice parking [f-63] is tailored for process control.Using VIRSA,you can address to risks involved both,namely,access and process control.This is an example of how DSS can help in Risk integration.
    In these tools,we have an Engine for building the rules-based on this we build the rules.These rules are stored in a table.when a transaction-for which we have built a rule - takes place,the system compares the rules VS actuals.The inconsistencies if any are reported as violations.
    Hope this helps.
    Regards,
    Ramesh

  • Lack of modularity in Projects for EJB module

    Problem
    For a project you have many enterprise bean components. In JDeveloper, currently, all the information like persistence-type,
    resource-reference, etc reside in the ejb-jar.xml which is project specific.
    (1) In the real-world, developers work on different modules with small individual work spaces with a small number of
    enterprise components and web compoents with a CVS system to manage version of the source code
    (2) The developer works on the source and check it in the CVS repository
    (3) A packager will take components from the CVS repository and make a build for a customer according to the order
    (Build-to-Order approach)
    (4) In JDeveloper he might have to make the ejb-jar.xml again which is very cumbersome and timeconsuming
    Suggestion
    (1) The current system of maintaining ejb-jar.xml in the project is OK
    (2) But the information in the ejb-jar xml ABOUT EACH EJB COMPONENT should also be maintained at the EJB component level like
    a small ejb-jar.xml file specific to the one and only one component.
    (3) Whenever the EJB component id edited, this modular ejb-jar.xml file will be edited too.
    (4) Later while making the main ejb-jar xml for deployment, the info in these small modular xml files will be read, the main
    project level ejb-jar xml will be prepared.
    (5) The main project level ejb-jar.xml can also be prepared when the project is rebuilt (clean/force compile) and all te
    small modular files are updated.
    With regards
    Amit

    Hello,
    Yes we do read every OTN message, though we often have some internal discussion before we post a reply.
    In your specific situation, you could just break up the EJBs into different projects:
    - Each EJB module in a separate project.
    - Each EJB project builds a separate EJB JAR.
    - When assembling the EAR, pull in as many EJB JAR files as necessary to support the WAR and other pieces.
    JDeveloper already has support for the above setup. Starting with JDev 9.0.3, you can also establish dependencies between projects to make the classes built by one project visible to another project's classpath.
    For us to implement a complete solution where small ejb-jar.xml files are merged into one large ejb-jar.xml file, we'd like to understand how you'd go about resolving conflicts in elements being merged:
    - conflicting <method-permission>
    - conflicting <container-transaction>
    - conflicting <relationship-role>
    - conflicting <env-entry>
    - ... a number of other potential conflicts ...
    We could do automatic merges when there are no conflicts. For the situations where there are conflicts, can you describe some solutions that you would consider acceptable?

  • Weblogic 12c not picking up persistence unit in WAR

    I'm trying to get an example CRUD application to run on WebLogic 12c (for the app see: http://henk53.wordpress.com/2012/04/15/jsf2-primefaces3-ejb3-jpa2-integration-project/)
    So far the applications runs on JBoss AS 7.1, GlassFish 3.1.2 and TomEE beta 2. In all those application servers persistence.xml is picked-up, and processed so I'm at a loss what's wrong with WebLogic. I'm using Eclipse 3.7.2 and the Oracle WebLogic 12C WTP server adapter for the deployment.
    I'm getting the following exception:
    java.lang.IllegalArgumentException: No persistence unit named 'entityManager' is available in scope jsf_ejb_jpa. Available persistence units: []
         at weblogic.persistence.ModulePersistenceUnitRegistry.getPersistenceUnit(ModulePersistenceUnitRegistry.java:130)
         at weblogic.persistence.BasePersistenceContextProxyImpl.<init>(BasePersistenceContextProxyImpl.java:40)
         at weblogic.persistence.TransactionalEntityManagerProxyImpl.<init>(TransactionalEntityManagerProxyImpl.java:31)
         at weblogic.persistence.EntityManagerInvocationHandlerFactory.createTransactionalEntityManagerInvocationHandler(EntityManagerInvocationHandlerFactory.java:20)
         at weblogic.persistence.PersistenceManagerObjectFactory.createPersistenceContextProxy(PersistenceManagerObjectFactory.java:66)
         at weblogic.persistence.PersistenceManagerObjectFactory.getObjectInstance(PersistenceManagerObjectFactory.java:31)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
         at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:251)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:406)
         at weblogic.j2eeclient.java.ClientReadOnlyContextWrapper.lookup(ClientReadOnlyContextWrapper.java:35)
         at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at javax.naming.InitialContext.doLookup(InitialContext.java:265)
         at com.oracle.pitchfork.inject.Jsr250Metadata.jndiLookup(Jsr250Metadata.java:307)
         at com.oracle.pitchfork.inject.Jsr250Metadata.resolveByName(Jsr250Metadata.java:303)
         at com.oracle.pitchfork.inject.Jsr250Metadata.resolve(Jsr250Metadata.java:266)
         at com.oracle.pitchfork.inject.Jsr250Metadata.applyInjections(Jsr250Metadata.java:228)
         at com.oracle.pitchfork.inject.Jsr250Metadata.inject(Jsr250Metadata.java:219)
         at com.oracle.pitchfork.spi.BaseComponentBrokerImpl.getBean(BaseComponentBrokerImpl.java:63)
         at com.oracle.pitchfork.spi.EjbComponentCreatorBrokerImpl.getBean(EjbComponentCreatorBrokerImpl.java:33)
         at weblogic.ejb.container.injection.EjbComponentCreatorImpl.getBean(EjbComponentCreatorImpl.java:76)
         at weblogic.ejb.container.manager.BaseEJBManager.createNewBeanInstance(BaseEJBManager.java:209)
         at weblogic.ejb.container.manager.BaseEJBManager.allocateBean(BaseEJBManager.java:235)
         at weblogic.ejb.container.manager.StatelessManager.createBean(StatelessManager.java:293)
         at weblogic.ejb.container.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:185)
         at weblogic.ejb.container.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:114)
         at weblogic.ejb.container.manager.StatelessManager.preInvoke(StatelessManager.java:174)
         at weblogic.ejb.container.internal.BaseLocalObject.getBeanInstance(BaseLocalObject.java:146)
         at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:103)
         at weblogic.ejb.container.internal.BaseLocalObject.__WL_preInvoke(BaseLocalObject.java:67)
         at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:20)
         at com.example.dao.jpa.JpaUserDAO_wrkew_UserDAOImpl.add(Unknown Source)
         at com.example.backing.IndexBacking.addUser(IndexBacking.java:38)
    Notice that "entityManager" is the name of the instance variable in which injection is being performed:
    @PersistenceContext(name="example")
    private EntityManager entityManager;
    If I rename this variable to "em: as follows:
    @PersistenceContext(name="example")
    private EntityManager em;
    Then, lo and behold, the exception changes into:
    java.lang.IllegalArgumentException: No persistence unit named 'em' is available in scope jsf_ejb_jpa. Available persistence units: []
    As the example uses a data-source defined in web.xml, which is only marginally supported in most application servers, I tried to define a WebLogic specific application scoped data-source instead and let the persistence unit use that. I couldn't find a way to do this in a .war (is this even possible?), so I created an .ear archive instead. When deploying the EAR, the data-source is clearly being created, but I'm getting the same exception again.
    I finally created an EJB module with a persistence.xml and a simple Singleton that's injected with the entityManager, and added that to the EAR. This works for the EJB module, but in the web module injection of the other entity manager still fails.
    Any idea what might be the problem?

    After some more fiddling, I discovered it's not WebLogic itself that's at fault here, but most likely Oracle's WTP adapter. Apparently it doesn't include persistence.xml in the archive that gets deployed. When I export the project as an .ear archive and copy this to WebLogic's autodeploy directly, things do work.
    I tried to find out what the main difference was between the deployments, but I could not find where the Oracle WTP adapter creates the deployment. I tried to test where a resource inside the EAR resides on the filesystem via the following code inside a backing bean:
    URL url = Thread.currentThread().getContextClassLoader().getResource("com/example/backing");
    It looks like there isn't a real .war or .ear being created and deployed, but there's a link back to the workspace, as the URL resolves to:
    file:/Users/henk/eclipse37ee/workspace/jsf_ejb_jpa/build/classes/com/example/backing/
    If I execute the same code for the ear in the autodeploy folder, the URL resolves to some jar inside:
    /Users/henk/eclipse37ee/wls1211_dev/mydomain/servers/myserver/tmp/_WL_user/_appsdir_jsf_ejb_jpa_ear_ear/2jzks6/war/WEB-INF/lib/
    In case of the WTP 'deployment' linking back to the Eclipse workspace, META-INF/persistence.xml is actually there too, but for some reason Weblogic can't find it there?
    Edited by: Henk on Apr 29, 2012 2:57 PM

  • Problems with duplicate persistence units

    I suppose that Weblogic 10.3 do not support some locations of persistence.xml.
    For example. On Jboss server I can succesfully deploy ear with this structure
    -services-ejb.jar
    -services-ws.jar
    -/APP-INF/lib
    -/APP-INF/lib/services-jpa.jar with persistence.xml i META-INF
    -/META-INF/application.xml
    But on Weblogic 10.3 it is impossible. Weblogic got an error with duplicate PU in the same location...
    <2009-06-04 16:06:18 CEST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.management.DeploymentException:
    at weblogic.application.internal.flow.JpaFlow.prepare(JpaFlow.java:59)
    weblogic.deployment.EnvironmentException: duplicate persistence units with name servicesJPA in scope services-ear.
    First PU location: file:D:/apache/bea10.3/wlserver_10.3/samples/domains/wl_server/servers/examplesServer/tmp/_WL_user/services-ear/skzpn4/APP-INF/lib/services-jpa.jar.
    Second PU location: file:D:/apache/bea10.3/wlserver_10.3/samples/domains/wl_server/servers/examplesServer/tmp/_WL_user/services-ear/skzpn4/APP-INF/lib/services-jpa.jar
    My application.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5">
    <description>services ear</description>
    <display-name>services-ear</display-name>
    <module>
    <ejb>services-ejb.jar</ejb>
    </module>
    <module>
    <web>
    <web-uri>services-ws.war</web-uri>
    <context-root>/services-ws</context-root>
    </web>
    </module>
    <library-directory>APP-INF/lib</library-directory>
    </application>
    Is any solution to keep persistence in library directory?

    Edwin,
    I have tried the same thing that you describe in question one in the attached VI. If you change the data ranges and then run the VI, you will note that the numeric value will only ba allowed in the new range. (If the current value is outside of the range that you have set, then you will need to change the value of the cotrol to be in the new range before the new range properties will take effect.)
    As for your second question, can you expand upon this? I am not sure that I understand what you mean. Is an example VI possible? Thanks
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask
    Attachments:
    Data_Range_with_Units.vi ‏22 KB

Maybe you are looking for