[HELP] data-sources.xml on META-INF for deployment

Hello,
I'm having a problem in the configuration of POOL OF CONNECTIONS, I created the file and data-sources.xml orion-application.xml, and I am not able to add the same folder META-INF when I create the deploy the application (EAR). What can I do for the time that I generate the deploy the files have to go to the right folder.
Thank now ...
I am using:
JDeveloper 10.1.3.3

If application is to run on embedded OC4J, a EAR file is not required.
1. Create a datasource, either declaratively in the data-sources.xml file or in the Connections Navigator or in the Global/Project DataSources.
2. Specify the data source in the application.
3. Run the application in the embedded OC4J.

Similar Messages

  • [HELP] data-sources.xml on META-INF for deployment - Jdev

    Hello,
    I'm having a problem in the configuration of POOL OF CONNECTIONS, I created the file and data-sources.xml orion-application.xml, and I am not able to add the same folder META-INF when I create the deploy the application (EAR). What can I do for the time that I generate the deploy the files have to go to the right folder.
    Thank now ...
    I am using:
    JDeveloper 10.1.3.3

    If application is to run on embedded OC4J, a EAR file is not required.
    1. Create a datasource, either declaratively in the data-sources.xml file or in the Connections Navigator or in the Global/Project DataSources.
    2. Specify the data source in the application.
    3. Run the application in the embedded OC4J.

  • Does JDeveloper deploy the data-sources.xml file?

    Hi,
    My project has a data-sources.xml file. When I deployed the project, JDeveloper created a .war file. The data-sources.xml file is not in the .war file. How will the application server pick up the data source if the xml file is not getting deployed?
    Thanks,
    Merced

    data-sources.xml configures the datasource with the oc4j server.
    A <Application>-data-sources.xml file also gets added for a project to the project directory.

  • 903/902/BC4J can't get data-sources.xml conn pooling to work in production; help

    I have several BC4J ears deployed to a 903 instance of OC4J being configured as a standalone
    instance. I've had this problem since I started deploying in development on 902. So it's
    some basic problem that I've not mastered.
    I can't get data-sources.xml managed connection pooling to actually pool conn's. I'm wanting
    to declare my jndi jdbc source connection pool in j2ee/home/config/data-sources.xml.
    Have all BC4J apps get conns from this JNDI JDBC pool. I've removed all data-sources.xml from my BC4J ears,
    and published the jndi jdbc source in my oc4j common data-sources.xml. I've tested that this is
    the place controlling the conn URL/login passwd by commenting it out of config/data-sources.xml
    and my BC4J apps then throw exceptions, can't get conn.
    I've set the oc4j startup cmd line with the BC4J property to enabled connection pooling:
    -Djbo.doconnectionpooling=true
    symptom
    Connections are created and closed. Instead of being put back into the pool managed by oc4j,
    what ever BC4J is doing or my data-sources.xml is doing, the connections are just being created and
    closed.
    I can verify this via (solaris) lsof and netstat, where I see my oc4j instance under test load
    with only 1 or 2 conns to the db box, and the ephemeral port is tumbling, meaning a new socket is
    being opened for each conn. ;( grrrrrrr
    Does anyone have a clue as to why this is happening?
    Thanks, curt
    my data-sources.xml
    <data-sources>
         <data-source
            class="com.evermind.sql.DriverManagerDataSource"
            connection-driver="oracle.jdbc.driver.OracleDriver"
            ejb-location="jdbc/DEVDS"
            location="jdbc/DEVCoreDS"
            name="DEVDS"
            password="j2train"
            pooled-location="jdbc/DEVPooledDS"
            url="jdbc:oracle:thin:@10.2.1.30:1521:GDOC"
            username="jscribe"
            xa-location="jdbc/xa/DEVXADS"
            inactivity-timeout="300"
            max-connections="50"
            min-connections="40"
        />
    </data-sources>

    I've run another test using local data-source.xml, that's packaged in the .ear. Still
    pooling under BC4J doesn't work??
    A piece of info is that the 903 oc4j release notes states that global conn pooling doesn't
    work. Infering that the j2ee/home/config/data-sources.xml data sources aren't pooled or ??
    I just tested so called local connection pooling, where I edited the data-sources.xml that
    gets packaged in the ear, to include the min/max params and re-ran my test.
    Still, the AM creates a new conn, it's to a new socket, and closes the conn when done. Causing
    each conn to not be pooled, rather opened then closed to the DB box. As verified with lsof and
    netstat, checking the ephemeral port # on the DB box side, always changes, meaning it's a
    new socket and not an old pooled conn socket.
    ???? What the heck??
    Surely if the AM conn check out / return code works properly, OC4J's pooling JDBC driver would
    pool and not close the socket??
    Has anywone gotten JDBC Datasource connections in BC4J to actually be pooled under OC4J??
    Since I couldn't get this to work in my early 902 oc4j testing, and now can't get it to work
    still under 903 OC4J, either it's my config or BC4J AM's code or OC4J?
    Any thoughts on how to figure out what's not configed correctly or has a bug?
    Thanks, curt

  • 903/902/BC4J can't get OC4J data-sources.xml conn pooling to work in production: help

    [cross posted to the j2ee forum]
    I have several BC4J ears deployed to a 903 instance of OC4J being configured as a standalone
    instance. I've had this problem since I started deploying in development on 902. So it's
    some basic problem that I've not mastered.
    I can't get data-sources.xml managed connection pooling to actually pool conn's. I'm wanting
    to declare my jndi jdbc source connection pool in j2ee/home/config/data-sources.xml and
    have all BC4J apps get conns from this JNDI JDBC pool. I've removed all data-sources.xml from
    my BC4J ears, and published the jndi jdbc source in my oc4j common data-sources.xml.
    I've tested that this is the place controlling the conn URL/login passwd by commenting it
    out of config/data-sources.xml and my BC4J apps then throw exceptions, can't get conn.
    I've set the oc4j startup cmd line with the BC4J property to enabled connection pooling:
    -Djbo.doconnectionpooling=true
    symptom
    Connections are created and closed. Instead of being put back into the pool managed by oc4j,
    what ever BC4J is doing or my data-sources.xml is doing, the connections are just being created and
    closed.
    I can verify this via (solaris) lsof and netstat, where I see my oc4j instance under test load
    with only 1 or 2 conns to the db box, and the ephemeral port is tumbling, meaning a new socket is
    being opened for each conn. ;( grrrrrrr
    Does anyone have a clue as to why this is happening?
    Thanks, curt
    my data-sources.xml
    <data-sources>
         <data-source
            class="com.evermind.sql.DriverManagerDataSource"
            connection-driver="oracle.jdbc.driver.OracleDriver"
            ejb-location="jdbc/DEVDS"
            location="jdbc/DEVCoreDS"
            name="DEVDS"
            password="j2train"
            pooled-location="jdbc/DEVPooledDS"
            url="jdbc:oracle:thin:@10.2.1.30:1521:GDOC"
            username="jscribe"
            xa-location="jdbc/xa/DEVXADS"
            inactivity-timeout="300"
            max-connections="50"
            min-connections="40"
        />
    </data-sources>

    Thanks Leif,
    Yes, set it to the location jndi path.
    A piece of info is that the 903 oc4j release notes states that global conn pooling doesn't
    work. Infering that the j2ee/home/config/data-sources.xml data sources aren't pooled or ??
    I just tested so called local connection pooling, where I edited the data-sources.xml that
    gets packaged in the ear, to include the min/max params and re-ran my test.
    Still, the AM creates a new conn, it's to a new socket, and closes the conn when done. Causing
    each conn to not be pooled, rather opened then closed to the DB box. As verified with lsof and
    netstat, checking the ephemeral port # on the DB box side, always changes, meaning it's a
    new socket and not an old pooled conn socket.
    ???? What the heck??
    Surely if the AM conn check out / return code works properly, OC4J's pooling JDBC driver would
    pool and not close the socket??
    Has anywone gotten JDBC Datasource connections in BC4J to actually be pooled under OC4J??
    Since I couldn't get this to work in my early 902 oc4j testing, and now can't get it to work
    still under 903 OC4J, either it's my config or BC4J AM's code or OC4J?
    Any thoughts on how to figure out what's not configed correctly or has a bug?
    Thanks, curt

  • Different data-sources.xml files for each build

    Any thoughts on how to do this:
    I have two sets of data-sources. When I deploy the EAR to my stage box, I need to go to the "stage" data source of the other repositories. When I deploy the EAR to my production box, I need to use the production data sources for the other repositories
    I am using jdev 10.1.3
    There is a single data-sources.xml file - where, currently, I am manually editing the connection strings between deployments.
    I am using ant to build the EAR file.
    What is a more elegant way to do this?

    Use ANT script to build the EAR file.
    Have 2 different data-sources file one for production and one for stage.
    Based on the environment you want to deploy tell ANT to copy those files into the EAR.
    Just a suggestion.

  • How to prevent data-sources.xml from being included in EAR

    I cannot get rid of the data-sources.xml file in my EAR file in the meta-inf folder.
    Deselecting the "Bundle Default data-sources.xml during deployment" in my preferences didn't have any effect. I also tried shutting down/restarting JDeveloper just in case it was cached.
    I also tried adding an exclude filter for data-sources.xml in my deploy profile for both Web files and WEB-INF/classes.

    The way I resolved this was to create the data-sources.xml, right click it, select Properties then uncheck Auto-update data sources.xml. That way it stays empty (hopefully).

  • Problem with embedded data-sources.xml and custom UserManager

    Hi all,
    Our application uses a custom UserManager, which is basically extended from the JDBC UserManager, declared as follows in orion-application.xml:
         <user-manager class="com.infocorpnow.a2g.security.oracle.A2GUserManager">
              <property name="table" value="pos.users" />
              <property name="userNameField" value="username" />
              <property name="passwordFiled" value="password" />
              <property name="dataSource" value="jdbc/A2GDS" />
              <property name="groupMemberShipTableName" value="pos.user_roles" />
              <property name="groupMemberShipGroupFieldName" value="role_name" />
              <property name="groupMemberShipUserNameFieldName" value="login_id" />
         </user-manager>
    Since we want to be able to deploy the application several times on the application server, and therefore have each deployment of the ear point to its own datasource (i.e. its own local "A2GDS"), we've found out how to embed data-sources.xml inside the EAR file we're deploying, and modify the orion-application.xml as follows:
         <data-sources path="./data-sources.xml" />
    And then place data-sources.xml in the same meta-inf folder as the orion-application.xml.
    This has worked fine when deploying to the standalone OC4J.
    Now when I try to deploy the exact same EAR file in Oracle 9iAS, and I get to the User Manager screen, the Custom User Manager does not show up correctly. It did show up prior to me embedding the data-sources.xml. Please help? This is fairly urgent.
    Thanks
    Jason

    I should also mention I'm using the Java Edition of 9iAS R2 (9.0.3 container) on Solaris.

  • How to add a data-source.xml to the project to config DB connections and to be SCM'ed

    I'd like to explicitly manage a data-sources.xml for my JSP + BC4J project.
    Any helps on getting the released Jdev to add a data-source.xml that would then
    be what the .ear deploys to OC4J?
    Thanks, curt

    I have a JSP + BC4J project:
    So far my naive experiments to explicitely add data-sources.xml to a
    project that is picked up by the deploy to .ear step and put in the
    root of the .ear have failed.
    Is this one of those gaps like the orion-application.xml file, that has no
    solution at present?
    Or is the back-door via adding an EJB component to my project, then deleting it??
    Thanks, curt

  • Data-sources.xml

    Hi All,
    In the 'Connections-Navigator' I have made some database connections, when I deploy my application JDev creates a file data-sources.xml ant put it under META-INF directory of ear file. But I am not able to see this file anywhere in my source tree. Is there any way to see and edit this file? Actually I want to enter some pooling related options in this file.
    Thanks,
    Vinod

    hi Vinod
    In my "SomeApp" workspace it appears in the same directory as SomeApp.jws, named SomeApp-data-sources.xml
    see also:
    "JDev 10g : no control over data-sources.xml"
    JDev 10g : no control over data-sources.xml
    success
    Jan Vervecken

  • Data-source.xml location

    Hi.
    I have a web application, so I included the file data-source.xml and orion-application.xml in the project.
    If I run the application through JDeveloper every thing is ok.
    But if I make a deploy in the server, I get the following error:
    javax.naming.NameNotFoundException: jdbc/smCoreDS not found
    I was checking the ear and war file and I realized that the data-sources and orion-appications.xml were in the war file instead of the ear file.
    How can I make to JDeveloper puts the file in the path META-INF in the ear.file instead of in the path WEB-INF\classes\META-INF in the war file
    regards

    To the web.xml of the web application add
    <resource-ref>
      <res-ref-name>jdbc/smCoreDS</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
    </resource-ref>

  • OC4J data-source.xml other data base like postgresql

    Hi i need to use a DataSource in OC4J with other database (any), i am setting the data-source.xml like:
    <\datasource
    class="com.evermind.sql.DriverManagerDataSource"
    name="DSPropiedades" location="jdbc/DSPropiedadesCoreDS"
    xa-location="jdbc/xa/DSPropiedadesXADS"
    ejb-location="jdbc/DSPropiedades"
    connection-driver="com.borland.datastore.jdbc.DataStore"
    username="sample"
    password="sample"
    url="jdbc:borland:dslocal:D:/seguridaddb/seguridad.jds"
    inactivity-timeout="300"
    />
    and i had put the database.jar in the OC4j directory's
    D:\ora10i\jdbc\lib
    D:\ora10i\j2ee\home\lib
    D:\ora10i\lib
    but i always obtain the same error
    Error initializing data-source 'jdbc/DSPropiedadesCoreDS': DriverManagerDataSource Driver 'com.borland.datastore.jdbc.DataStore' not found

    Liliana,
    From the [lack of] information you have posted, I am assuming you are using OC4J stand-alone version 10g -- but I'm not sure because I couldn't find any of those details in your post. It always helps to include version and platform information.
    If my assumption is correct, then the default location for third-party JAR files (including your JDBC driver) is the
    "j2ee/home/applib"
    subdirectory of the OC4J installation. For example, on my Windows XP machine (again, I couldn't see what platform you are using, so I am assuming it is also Windows), the actual path is:
    C:\OC4J_10_0_3\j2ee\home\applib
    If you want to see other examples of "data-sources.xml" files (apart from the one that comes with OC4J), try searching the following Web sites:
    http://www.orionserver.com
    http://www.orionsupport.com
    http://kb.atlassian.com
    Good Luck,
    Avi.

  • Problem using JDBC (JNDI) DataSource and data-sources.xml w/ OC4J

    I have a JClient application developed in JDev X. It works fine when using a JDBC URL for the connection (which then writes the connection into the BC4J.xcfg files, one for each application module). However, I would like the app to retrieve the data source from the server's data-sources.xml file. However, when, on the configurations tab of the application module I set the connection type to JDBC DataSource, and give it the JNDI name, it does not work, either with the embedded OC4J or the stand-alone OC4J. Any suggestions???
    In the stand alone OC4J I verified that the data source exists (using java -jar admin.jar ormi://nemethzoltan3 admin welcome -application adatklinika -testDataSource -location jdbc/adatklinikaCoreDS) ... so the data source is defined in the data-sources.xml. Of course the error I get is JBO-30003.
    If I just try to "test" the data source in Jdeveloper (using the context menu of the app module, and setting it to use the adatklinikaCoreDS) I get a JNDI error: unable to lookup data source and at level 3 a "javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial". I checked, the data source is defined under tools->embedded OC4J properties->data sources.
    If I try to run the main form, simply nothing happens.
    Please help!!!

    Ok, figured out why running from jdeveloper wasn't working: the embedded OC4J server wasn't started (start it by running an html page from your project or something...and make sure you don't have a stand-alone oc4j running). AND more importantly it didn't have the library "embedded oc4j client" library included (project properties -> profiles -> development -> libraries)...which is needed for whatever reason.
    Now to try and get it working with the stand-alone OC4J...

  • How Get JDev to Omit data-sources.xml from every .war deployment

    I want a global data-sources.xml file to be used for all deployments. I do not want a copy of my standard data-sources.xml file to be included in every single deployment. I want my global data-sources.xml file to reside in the standard J2EE location of:
    oc4j_home/oc4j_instance_name/j2ee/config/data-sources.xml
    JDeveloper, for whatever reason, includes a data-sources.xml into every .war file. How do we configure JDev to omit the data-sources.xml? How do we set up JDev to automatically configure the .xml files (orion-application.xml, application.xml, etc) to use the global data-sources.xml? I do not want to manually do this for every deployment.
    I've been trying hard to find the answer in JDev online help and other OAS manuals. I read everywhere that I can have a "global" data-sources.xml, but I find no way to easily configure JDeveloper to do it this way.
    I would be grateful for you insights/help.
    thanks
    -Paul Janda

    I found the answer:
    In JDeveloper, Go to Tools | Preferences
    Select Deployment
    Uncheck the option for "Bundle default data-sources.xml during deployment"
    Upon the next generation of the .ear or .war file (including the next deployment), data-sources.xml will be omitted.
    -paul janda

  • ConnectionCacheName not read from data-sources.xml

    I created a simple web application to test the use of the ConnectionCacheBean (from the jdbc 3.0 examples page). I read through the code and some other articles regarding data sources and noted that you "should" be able to set the connection cache name and caching enabled, as well as failover support, even in oc4j 9.0.4 and 10.1.2. I tried this (at least the first two), and it would NOT set the cache name.
    The data-sources.xml entry was the same as in the one documented here:
    http://www.oracle.com/technology/tech/java/newsletter/articles/oc4j_data_sources/oc4j_ds.htm
    What gives?
    Also, I tried to simulate the database going down - I killed all the sessions rather than doing a shutdown, but anyway... even with a connection cache property of validatelogin (i think that's the name) to true, and a refresh of invalid connections (they'd all be invalid if I killed them), it would only reactivate ONE SESSION. If I refreshed ALL Sessions, then it would do 9 of the 10 sessions (10 being my initial cache limit).
    Any ideas?
    I can post the code if that is an issue.

    A response I got back from Frances Zhao regarding the two issues that I experienced was:
    Issue#1: Cannot set the connectionCacheName via data-sources.xml
    1. This is very likely because of an OC4J bug that affects the actual order of
        setting each <property> specified in data-sources.xml.  The connection cache
        in OracleDataSource requires the cache-name property be set after the cache
        is enabled; but OC4J may not always follow this order, causing the name
        to be null.  If you really need the cache name, you have to do it in the code
        for now.
    Issue#2: Can't refresh the invalid connections
    2. These are known issues in the Oracle JDBC driver in both 10.1.0.4 and
        10.2.0.1.  The fix for the REFRESH_INVALID case will be in the next
        patch release for both 10.1.x and 10.2.x; the fix for the REFRESH_ALL
        case will come later.

Maybe you are looking for

  • Is there a Better Way to do This? (C++, Qt)

    Inside a Qt application I'm using ImageMagick to create an image (from variable text) on-the-fly and save it to the hard drive. Then right afterwards I'm telling Qt to load that image in an object (called currQorA). I know it would be more efficient

  • Windows XP SP3 and Dreamweaver 8.0.2 - "Error"

    Windows XP SP3 and Dreamweaver 8.0.2 I am recently receiving this error message whenever I open a file - "The following translators were not loaded due to errors: ColdFusion.htm: has configuration information that is invalid. JSP.htm: has configurati

  • MIDI Drums

    Hi, The MIDI drum loops I select sound OK when listening to them, however, when I drag them up to create a new track, the sound is not the same and is often pitched? Anyone got any suggestions?

  • User-exit / Badi for changin vendors(fk01/02) and customers(fd01/02)

    Hi, I'm looking for an user-exit or an Badi which can be used, when creating/changing a vendor or customer. Has anybody used it? Thanks. Regards, Dieter

  • Can't install itunes, closes internet explorer

    I have just got a new computer it is a Compaq laptop and it meets way over the requirements. I am trying to download itunes to it so I can transfer my music from my desktop to my laptop and when i click on the download now button for itunes it closes