ADF application to access WLS data source .

Hi,
I have developed an ADF application in Jdeveloper 10.3.3 and deployed on Weblogic server. Now I want my application to access the data from data source created in WLS. I have created a data source (ds_demo) using the WebLoigc server option Services -> JDBC -> Data Sources.Target has been set to the default server where application is running.
Now I want application to access the database over the data source ds_demo. How can I do that?. Please provide any pointers.
Thanks & Regards,
MB

You should be able to use Java code like this to directly obtain the WLS data source if you're using a POJO/DAO :
Context ctx = null;
DataSource ds;
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL, "t3://localhost:7001");
ctx = new InitialContext(ht);
ds = (DataSource)ctx.lookup("DataSourceJNDINameHere");
This assumes you're deploying this on the same server hosting the datasource and that it's on port 7001.

Similar Messages

  • Problem while deploying ADF application to standalone WLS server

    Hi,
    I am facing a problem while deploying ADF application to standalone WLS Server.
    Following is the error message that I am getting.
    [07:24:03 PM] ----  Deployment started.  ----
    [07:24:03 PM] Target platform is  (Weblogic 10.3).
    [07:24:07 PM] Retrieving existing application information
    [07:24:08 PM] Running dependency analysis...
    [07:24:08 PM] Building...
    [07:24:13 PM] Deploying 2 profiles...
    [07:24:14 PM] Wrote Web Application Module to D:\WorkSpace3\DashboardUi\deploy\Dashboard.war
    [07:24:14 PM] Wrote Enterprise Application Module to D:\WorkSpace3\deploy\Dashboard.ear
    [07:24:14 PM] Deploying Application...
    [07:24:22 PM] [Deployer:149191]Operation 'deploy' on application 'Dashboard' is initializing on 'msDevServer1'
    [07:24:27 PM] [Deployer:149193]Operation 'deploy' on application 'Dashboard' has failed on 'msDevServer1'
    [07:24:27 PM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application Dashboard on msDevServer1.: .
    [07:24:27 PM] Weblogic Server Exception: weblogic.application.ModuleException:
    [07:24:27 PM] Caused by: weblogic.common.ResourceException: DataSource DashboardDb already exists
    [07:24:27 PM]   See server logs or server console for more details.
    [07:24:27 PM] weblogic.application.ModuleException:
    [07:24:27 PM] ####  Deployment incomplete.  ####
    [07:24:27 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)Any suggestion how to fix this.
    Thanks
    Ajay

    I logged into console and browsed to 'Home >Summary of JDBC Data Sources' but not able to locate DashboardDb. Please let me know where to find DashboardDB on wls console.
    Also, please let me know how to configure the app to not to auto-deploy JDBC data sources

  • Excel, PowerView error in SharePoint 2013: "An error occurred while loading the model for the item or data source 'EntityDataSource'. Verify that the connection information is correct and that you have permissions to access the data source."

    I've installed SQL Server 2012 SP1 + SP server 2012 + SSRS and PowerPivot add-in.
    I also configured excel services correctly. Everything works fine but the powerview doesn't work!
    While I open an excel workbook consist of a PowerView report an error occurs: "An error occurred while loading the model for the item or data source 'EntityDataSource'. Verify that the connection information is correct and that you have permissions
    to access the data source."
    error detail: 
    <detail><ErrorCode xmlns="http://www.microsoft.com/sql/reportingservices">rsCannotRetrieveModel</ErrorCode><HttpStatus xmlns="http://www.microsoft.com/sql/reportingservices">400</HttpStatus><Message xmlns="http://www.microsoft.com/sql/reportingservices">An
    error occurred while loading the model for the item or data source 'EntityDataSource'. Verify that the connection information is correct and that you have permissions to access the data source.</Message><HelpLink xmlns="http://www.microsoft.com/sql/reportingservices">http://go.microsoft.com/fwlink/?LinkId=20476&amp;EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&amp;EvtID=rsCannotRetrieveModel&amp;ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&amp;ProdVer=11.0.3128.0</HelpLink><ProductName
    xmlns="http://www.microsoft.com/sql/reportingservices">Microsoft SQL Server Reporting Services</ProductName><ProductVersion xmlns="http://www.microsoft.com/sql/reportingservices">11.0.3128.0</ProductVersion><ProductLocaleId
    xmlns="http://www.microsoft.com/sql/reportingservices">127</ProductLocaleId><OperatingSystem xmlns="http://www.microsoft.com/sql/reportingservices">OsIndependent</OperatingSystem><CountryLocaleId xmlns="http://www.microsoft.com/sql/reportingservices">1033</CountryLocaleId><MoreInformation
    xmlns="http://www.microsoft.com/sql/reportingservices"><Source>ReportingServicesLibrary</Source><Message msrs:ErrorCode="rsCannotRetrieveModel" msrs:HelpLink="http://go.microsoft.com/fwlink/?LinkId=20476&amp;EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&amp;EvtID=rsCannotRetrieveModel&amp;ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&amp;ProdVer=11.0.3128.0"
    xmlns:msrs="http://www.microsoft.com/sql/reportingservices">An error occurred while loading the model for the item or data source 'EntityDataSource'. Verify that the connection information is correct and that you have permissions to access the
    data source.</Message><MoreInformation><Source>Microsoft.ReportingServices.ProcessingCore</Source><Message msrs:ErrorCode="rsErrorOpeningConnection" msrs:HelpLink="http://go.microsoft.com/fwlink/?LinkId=20476&amp;EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&amp;EvtID=rsErrorOpeningConnection&amp;ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&amp;ProdVer=11.0.3128.0"
    xmlns:msrs="http://www.microsoft.com/sql/reportingservices">Cannot create a connection to data source 'EntityDataSource'.</Message><MoreInformation><Source></Source><Message>For more information about this error navigate
    to the report server on the local server machine, or enable remote errors</Message></MoreInformation></MoreInformation></MoreInformation><Warnings xmlns="http://www.microsoft.com/sql/reportingservices" /></detail>
    Please help me to solve this issue. I don't know if uploading the excel workbook is enough or maybe It needed to connect to another data source.
    I Appreciate in advance.

    Hi Ali.y,
    Based on the current error message, the error can be related to the
    Claims to Windows Token Service (C2WTS) and is an expected error under certain conditions. To verify the issue, please check the aspects below:
         1. The C2WTS Windows service and C2WTS SharePoint service are both running.
         2. Check the SQL Server Browser service is running on the machine that has the PowerPivot instance of SSAS.
         3. Check the domain. You're signing into SharePoint with a user account in some domain (call it Domain A).  When Domain A is equal to Domain B which SharePoint server itself is located (they're the same domain), or Domain
    A trusts Domain B.
    In addition, the error may be caused by Kerberos authentication issue due to missing SPN. In order to make the Kerberos authentication work, you need to configure the Analysis Services to run under a domain account, and register the SPNs for the Analysis
    Services server.
    To create the SPN for the Analysis Services server that is running under a domain account, run the following commands at a command prompt:
    • Setspn.exe -S MSOLAPSvc.3/Fully_Qualified_domainName OLAP_Service_Startup_Account
    Note: Fully_Qualified_domainName is a placeholder for the FQDN.
    • Setspn.exe -S MSOLAPSvc.3/serverHostName OLAP_Service_Startup_Account
    For more information, please see:
    How to configure SQL Reporting Services 2012 in SharePoint Server 2010 / 2013 for Kerberos authentication
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • An error occurred accessing a data source.

    Hi,
    I have seen many posts talking about this error but still i am facing the same issue. The process i have followed is:
    1) created infopath form with receive data connection to SQL DB with plain username/pwd
    2) placed the repaeating table of receive dataconnection, form has full trust
    3) converted the dataconnection to udcx and stored it in data connection library of site collection
    4) published the form for admin approval, and as i am the admin i have uploaded it and activated it
    5) approved the dataconnection
    6) i have modified the infoath settings to use SQL authen, data connection files , cross domain
    But still i am getting this error:
    An error occurred accessing a data source.
    An entry has been added to the Windows event log of the server.
    Log ID:6932
    Regards,
    Amarnath.
    Regards, Amar.

    hi,
    I have found below log:
    DataAdapterException, Exception Message: The database returns an error. Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.)
    but i am receiving data only here is my query:
    SELECT [Service Request],[Task Order],COUNT(*) as TotalTestCases,SUM(CASE WHEN [Status] = 'Completed' THEN 1 ELSE 0 END) AS Completed,
          SUM(CASE WHEN [Status] = 'Blocked' THEN 1 ELSE 0 END) AS Blocked,SUM(CASE WHEN [Status] not in('Completed','Blocked') THEN 1 ELSE 0 END) AS InProgress FROM
          DashBoardView where SRStatus = 'Active' group by [Service Request],[Task Order] 
    is my calculated columns is giving error? but when i run my wuery its giving correct output
    Regards, Amar.

  • Integrating ADF Business Components from heterogenous data sources

    Hi all,
    has anybody experience in integrating ADF Business Components from heterogenous data sources like ViewObjects from a DB2 database as LOV in a ViewObject from a Oracle 11g?
    What is the best practice approach to integrate such different ADF Business Components in declarative and programmatic ways?
    Thank you!

    thank you for the answer! We already updated out BC according to http://www.oracle.com/technetwork/developer-tools/jdev/multidatabaseapp-085183.html
    The DB2 ViewObjects are exported as ADF Libraries and imported in the BC of the project with Oracle DB ViewObjects. In the root AM I created instances from the imported DB2-ViewObjects as well as from the Oracle-ViewObjects, but when I start AM test environment it takes the preconfigured Data Source of the root AM. So I probably will pesneed to create two AMs for the different ViewObject types and for the two connection types. My question is what will be best practices to use data from the DB2-VO of AM_DB2 in the OracleDB-VOs as part of AM_Oracle? Should it be done only programmatically or can it be done also declaratively and any suggestions how to proceed?
    Thank you!
    Edited by: nbo on Jun 3, 2012 2:53 AM

  • SRS Browser Role Cannot Access Shared Data Sources

    I've created some reports using VS and shared data sources and deployed. I can run reports (I'm a domain admin), but users I've given system administrator roles within SRS cannot access shared data sources. However, if I embed the data source, everything
    is fine. I'm pulling data from three different servers, so the shared data sources are somewhat important.  I'm using SQL Native userid/passwords not windows authentication.  Anybody got any ideas?  I'm new to SRS.  Thanks.

    Hi Janetb,
    I’m confused about the meaning of “cannot access shared data sources”. Are you saying the user cannot see the Shared Data Sources in Report Server, but he can render the report well? Or the user cannot render the report well because he have no permission
    to access shared data sources?
    If in this first scenario, means that the role of the user have no permission to View data sources. To fix this issue, we can add View data sources task to the current role in SQL Server Management Studio.
    If in the second scenario, it is so strange. In my test, I add Browser role of the report to one user which has no permission to access the shared data sources, but he can render the report which retrieve data from the shared data sources very well.
    To troubleshooting this issue more efficiently, could you tell us the scenario you occurred and the error message you received? So that we can make further analysis and help you out.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • rib-rms /application-deployments/rib-rms/data-sources.xml

    Hi,
    Support note 1314377.1 "Call To GetNextPublisher Service In RIB-RMS Fails With "Unable To Publish Message To JMS" Exception" says:
    Solution
    "The issue was resolved with the below suggestion:
    Modify $ORACLE_HOME/j2ee/<rib-rms>/application-deployments/rib-rms/data-sources.xml to have below entries and bounce the <rib-rms> instance:
    min-connections="10"
    max-connections="20"
    initial-limit="5"
    used-connection-wait-timeout="10"
    inactivity-timeout="10"
    login-timeout="0"
    connection-retry-interval="1"
    max-connect-attempts="3"
    validate-connection="true"
    validate-connection-statement="select count(*) from dual"
    num-cached-statements="10"
    time-to-live-timeout="-1"
    abandoned-connection-timeout="6"
    disable-server-connection-pooling="false"
    property-check-interval="2"
    lower-threshold-limit="20" "
    However it is not at all clear to me how to enter these elements in the data-sources.xml XML structure.
    I have searched OTN and Google for it but can't find a good/complete reference. E.g. http://download.oracle.com/docs/cd/B25016_08/doc/dl/web/B14012_02/datasrc.htm documents some of the above attributes, but not all.
    Not all attributes go into the same XML element in data-sources.xml.
    Can someone give an example of how to set this?
    Thanks,
    Erik
    Edited by: ErikYkema on Jul 19, 2011 4:29 PM

    Hi Erik,
    All of these are attributes to <connection-pool> tag.
    So it will ideally look like
    <connection-pool name="connectionPool" min-connections="10"  max-connections="20" >
    <connection-factory factory-class="oracle.jdbc.pool.OracleDataSource"      user="RPM_ADAPTOR_AQ"
                   password="RPM_ADAPTOR_AQ"
                   url="jdbc:oracle:thin:@//+hostname+/RMS131K" >
              </connection-factory>
    Please modify the same are restart rib oc4j instance.
    Regards,
    PPS
    Edited by: ppskannan on Jul 19, 2011 8:19 PM
    Edited by: ppskannan on Jul 19, 2011 8:21 PM

  • Access odbc data sources from PL/SQL

    Dear All,
    I would like to know is there any way where i could access odbc data sources from pl/sql (i.e i would like to insert, update records into MSAccess table from pl/sql procedures, triggers). Would appreciate any help regarding this.

    The only way I know of how is to write and external function library and use that to access ODBC datasource ...if someone else knows something else I would be interesting in hearing about that also.

  • Accessing two data sources in one method

    I wanted to access two connection pools in one EJB project. I manage to create two connection pools in weblogic server and I successfully wrote the lookup code. I wanted to call these two data sources in one method. But it only gives result from one data source connection. other is null. Im getting following message also
    Connection has already been created in this tx context for pool named jdbc_informix_pool. Illegal attempt to create connection from another pool: JDBC_informix_webdata
    "jdbc_informix_pool" and "JDBC_informix_webdata" is the names of my connection pools. the two data sources works perfectly when they are accessed separately. but whenever im tryng to call two data sources in one method it retrive data from only one data source and gives me above message.
    anyone know how to fix it.?
    thnx
    sameera

    hi...
    thnx man.. it worked. But there is another problem. I cant close my data source connection. whenever im tryng to close it, it says
    Result set already closed
    i manage to run my program without closing the data source connection. but after a while it says
    No resources currently available in pool JDBC_informix_webdata to allocate to applications, please increase the size of the pool and retry
    i can increase the size of the pool and run my program. but i guess if I close the data source connection this will be resolved. But how can I close my data source connection. I tried finally clause. but it gives me the result set already closed message
    how can i do it.?
    thnx
    sameera
    Edited by: Sameera on Jun 18, 2009 8:35 PM
    Edited by: Sameera on Jun 18, 2009 8:40 PM

  • Problem when using MS Access as data source

    I want to get the source data from MS Access Database and load the data into a Oracle Database by OWB.
    I created a ODBC for the Access Database,and added the correlative informations in the files such as hs/admin/initmsaces.ora��network/admin/listener.ora��network/admin/tnsname.ora.
    Then I created a new module under the "DataBase->Other->ODBC" in OWB,the schema I selected is "Undefine"��it is the only one selection��Then I created some mappings.All these steps are successful.
    But when I was deploying the project,OWB reported a wrong: Talbe or View is not exist.
    I want to know how can I resolve the problem.
    Thanks!

    I think we are having the same problem and (I think) set up everything as described in the note.
    We are using an ODBC connection to an MS-Access database with OWB 9.2. We have successfully defined the data source to OWB, and imported 2 target tables, then mapped one of the tables to a staging table.
    The mapping process “validates” correctly. From Deployment Manager, we “register” the source file location, which asks for a schema owner, username, and
    password. We supply the value “admin” for each of these as Location Registration windows requires a value for each [no blanks allowed] and the registration is successful.
    However, when we Generate/Deploy the mapping, the Generate succeeds, but deployment fails with the error “PL/SQL: ORA-00942: table or view does not exist”. Looking at the generated code, we see that the SELECT statement in the generated mapping code specifies the source table as owner.table_name@db_link.
    From SQL*Plus, the table_name@db_link can be described correctly. Trying to describe owner.table_name@db_link fails with “object does not exist” error, which is similar to the OWB “table does not exist” error.
    MS-Access has no concept of “schema-owner”. Is there a way to generate the Mapping without specifying the “schema-owner” ??.

  • Safari permanently disallow web application from access location data

    I have a web application that access user's location using the latest Safari's geolocation API. I have accidentially click "don't allow" when asked if it should be allowed to use location service. This seems to ban the web site permanently. I cannot find any way to reset this.
    I have tried General Setting > Reset > Rest Location Warnings. After this when I return, Safari ask:
    Safari would like to use your location?
    [Don't Allow] [ok]
    This seems to apply to Safari as a whole. For example google can access my location. But my particularly application is still banned. I also tried to clear history/cache/cookie. It still does not do it. It seems Safari is keep a blacklist in some place that is not resettable.

    DaVBMan wrote:
    I have always noticed that web pages (Safari) would never remember a site, only apps did.
    But with that said, there is a place in settings to Reset Location Warnings. However this will reset every location warning (so all apps will ask you again).
    How do you know it is accessing your location? As I mentioned, any page I ever hit that wanted to, always keeps asking.
    Ah, I didn't know to look in Reset in Settings. I was just looking in the Safari section. Selecting that did indeed make Safari prompt me again.
    I know it is accessing my location because the page has a visual indication of when it has successfully read the location.
    Nathan C wrote:
    In addition to reseting locations services as previously suggested, it is
    possible for web pages to guess your location based on other information. For
    example whenever you access a webpage that includes your IP address. The IP
    address is often assigned a reverse lookup by whomever is providing the data
    connection. That reverse lookup may include location information such as city,
    state, country, etc.
    In this case, I wrote the page, so I know that it is attempting to access the location. I wanted to test the page again without location access being enabled.
    Thanks,
    Cameron

  • Using InfoPath and the Web service GetUserProfileByName-An error occurred accessing a data source

    Hi, Everyone,
    I want to realize the function that when user fills out the infopath form the form can automatically get current users' name and I've searched that I can use the Web service GetUserProfileByName method. When I preview the form it is all right, however, when
    I fill the form online, it occurs this error as folllowing. Anyone knows why and how to solve this problem?
    Thanks forward!
    Warning
    An error occurred querying a data source.
    Click OK to resume filling out the form. You may want to check your form data for errors.
    Hide error details
    An error occurred while trying to connect to a Web service.
    An entry has been added to the Windows event log of the server.
    Log ID:5566
    Correlation ID:9c23d39c-18fa-1025-c7ec-600a1582a54a

    Hi,
    According to your post, my understanding is that you get error when using the Web service GetUserProfileByName in InfoPath.
    Have the InfoPath form template call web service in code? If yes, please see following KB and check if it is the cause.
    http://support.microsoft.com/kb/981684
    You can also
    follow the steps in the article to resolve this error in InfoPath. Please refer to:
    Auto Populate User Information in InfoPath with Claims Based Authentication in SharePoint – Part 2 of 3
    In addition, you need to disable the Loopback check.
    Here is a similar thread for your reference:
    https://social.technet.microsoft.com/Forums/en-US/d6d20308-a5d0-45fa-881d-0626c68c4e73/infopath-an-entry-has-been-added-to-the-windows-event-log-of-the-server-logid-5566?forum=sharepointcustomizationprevious
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Web Analyzer - ability to access external data sources?

    Documentation on help.sap.com for the 2004s Web Analyzer notes it can render queries, query views, infoproviders, and <b>external data sources</b> for ad-hoc analysis in the standardized reporting template.
    Can anyone clarify exactly what constitutes external data?  To my knowledge, I didn't think it was possible to report on something outside of the BI instance (let's say an Oracle table on another server, for example).
    Thanks in advance for your help.

    Hi Scott,
    in the Web Analyzer you can use external OLAP data sources(ODBO or XMLA) . Relational data sources are not supported in NW2004s.
    You can set this up in the portal system landscape.
    Please have a look on
    http://help.sap.com/saphelp_nw2004s/helpdata/de/8e/020597f9b4486492e69283fab424fa/frameset.htm
    and
    http://help.sap.com/saphelp_nw2004s/helpdata/de/8e/020597f9b4486492e69283fab424fa/frameset.htm
    Depending on the data source different capabilities are supported, so that some options are only available when you are using the BI OLAP Processor and won't be supported when using external data sources.
    Heike

  • Error in ADF application deployment to wls server

    Dear Friends,
    Kindly , i facing error when deploy an ADF sample application to weblogic Managed server
    error in oracle/adf/share/logging/ADFlogger
    however the JRF templated applied to the managed server .
    Please advise
    Thanks & Regards,

    How do you think we can help?
    We don't even know which version you or your client use.
    We actually don't no nothing about the app and the environment.
    What has changed since the last deployment?
    Have the other deployments tested with FF and IE?
    Which versions of FF,IE and Chrome do you use?
    Timo

  • Error accessing selected data source: PAS Cube not available

    Hi all,
    we were running SSM 7.0 SP04 and updated to SP05. After that accessing to PAS cubes is not possible anymore. We have tried from de SSM administrator (set kpi option), and also from the user interface (scorecard tab).
    I have check the model connections (manage models) and test has been succesful.
    Any help on this matter will be appreciated.
    Thanks in advance.
    Regards,
    Alfonso

    Hello Alfonso,
    Have you checked the Set Scorecard Defaults option in the Admin interface? Is the PAS model still assigned to the context?
    If the Model Connection test was successful, the only other option would be that you are using PAS security and your user is not associated with any PAS user under the existing Application Server Connections for that Model.
    As of SP5 HF3, the application displays clear messages when encountering model connection problems. Perhaps upgrading to this HF or to SP6 it will be easier for you to troubleshoot this situation.
    By the way, the SP6 is already released for customer (See SAP Note 1308704).
    Hope this helps!
    Best regards,
    Ricardo Vieira

Maybe you are looking for