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...

Similar Messages

  • Problem using excel file as odbc data source

    hi, I have followed the instruction in
    "Creating a Repository Using the Oracle Business Intelligence Administration Tool"
    [http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/bi_admin/biadmin.html]
    and established a odbc data source using an excel file.
    however, I found that the Microsoft Excel Driver always unable to handle complex column formula.
    for example,
    FILTER(sourceTable$.NoOfItem USING (sourceTable$.Kind = 'Lemon'))
    when there are two columns using FILTER, there is an error about the ODBC driver.
    =============================================================
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 16001] ODBC error state: 37000 code: -3100 message: [Microsoft][ODBC Excel Driver] Syntax error (missing operator) in query expression 'sum(case when T3552.[Kind] = 'Orange' then T3552.[NoOfItem] end )'.. [nQSError: 16014] SQL statement preparation failed. (HY000)
    SQL Issued: SELECT "sourceTable$".Market saw_0, FILTER("sourceTable$".NoOfItem USING ("sourceTable$".Kind = 'Orange')) saw_1, FILTER("sourceTable$".NoOfItem USING ("sourceTable$".Kind = 'Lemon')) saw_2 FROM excel_source ORDER BY saw_0
    =============================================================
    However, I change the data source using SQL SERVER, no error occurs and it shows the result correctly.
    how to slove this problem?

    I have the same issue. Does anyone know how to solve it?

  • Using Two-Phase Commits and Data Sources does not work with OCI

    Hi,
    i tried to configure 2pc with OCI.
    when i use thin like shown in :
    http://download-west.oracle.com/docs/cd/B14099_19/web.1012/b14012/datasrc.htm#sthref578
    everything works.
    If i change the url from thin -> oci
    the transaction is rolled back.
    The documentation says
    http://download-west.oracle.com/docs/cd/B14099_19/web.1012/b14012/datasrc.htm#i1085507
    for using oci. But if i use this in thin mode, it breaks even the thin mode.... ;-(
    Can anybody help?

    It is fixed in 10.1.3

  • Creation of connection pools and data sources

    Hi,
    is there a possibility to create jdbc connection pools and data sources not manually, with a script or a mbean?
    That would be helpfull, because at the moment every developper has to do that for himself (because of the individuals generated passwords).
    Thanxs

    The weblogic.management.configuration.JDBCDataSourceMBean
    defines a non-transactional JDBC data source.
    http://e-docs.bea.com/wls/docs90/javadocs_mhome/weblogic/management/configuration/JDBCDataSourceMBean.html
    The JDBCConnectionPoolMBean defines a JDBC connection pool.
    http://e-docs.bea.com/wls/docs90/javadocs_mhome/weblogic/management/configuration/JDBCConnectionPoolMBean.html

  • [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.

  • [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.

  • 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.

  • Problems with OC4J EJB deployment and the data-sources.xml file

    I am running 2 Windows 2000 Machines one with the 8.1.7 database another with iAS 1.0.2.2.1 and OC4J.
    I am trying to deploy a 3rd party EJB-based application whic seems to have deployed successfully except when I try to test the EJB deployment via a jsp it can't connect to the database, giving the error:
    1/16/02 4:52 PM VerySimple: Servlet error
    java.lang.NoClassDefFoundError: com.netexp.user.UserManagerHome
    at com.netexp.beans.BeanHelper.class$(Unknown Source)
    at com.netexp.beans.BeanHelper.getUserManagerBean(Unknown Source)
    at /very_simple.jsp._jspService(/very_simple.jsp.java:48) (JSP page line 27)
    at com.orionserver[Oracle9iAS (1.0.2.2.1) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:54)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.HttpApplication.serviceJSP(HttpApplication.java:5459)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.JSPServlet.service(JSPServlet.java:31)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:508)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:177)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:576)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    I try to update the file using the installdatasource switch thus:
    C:\Oracle\iSuites\j2ee\home>java -jar admin.jar ormi://localhost admin adm_pwd -application apptricityII -installDataSource -jar %ORACLE_HOME%\jdbc\lib\classes12.zip -url jdbc:oracle:thin:@db_host.unitas.com:1521:db_name -connectionDriver oracle.jdbc.driver.OracleDriver -location jdbc/pool/OracleDataSource -username scott -password tiger
    And get the following error:
    Exception passing by from remote server: java.lang.InstantiationException: No class specified for jdbc/pool/OracleDataSource
    java.lang.InstantiationException: No class specified for jdbc/pool/OracleDataSource
    <<no stack trace available>>
    Error adding source: No class specified for jdbc/pool/OracleDataSource
    Please advise.
    I have followed the instructions in 'EJB Primer' and 'Using Oracle9iAS Containers for J2EE' to no avail. And I can't find any meaningfull data-sources.xml samples. I have been struggling with this for some time.
    Is there any other file, do I need to bind anything?
    I'd appreciate your assistance.
    Thank you
    Louiza

    Hi Louiza,
    Show us your web.xml and ejb-jar.xml files as well as your
    data-source.xml file.
    Thanks,
    Avi.

  • How do I use a JNDI datasource in my application?

    Not sure how to access the JNDI datasource i setup in my config.xml. I tried to browse it at rmi://localhost:1099/ but it only shows jmxrmi in the tree.
    My config.xml looks like
    <n1:config xsi:schemaLocation="http://www.bea.com/ns/wlevs/config/server wlevs_server_config.xsd" xmlns:n1="http://www.bea.com/ns/wlevs/config/server" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <netio>
        <name>NetIO</name>
        <port>9002</port>
      </netio>
      <work-manager>
        <name>JettyWorkManager</name>
        <min-threads-constraint>5</min-threads-constraint>
        <max-threads-constraint>10</max-threads-constraint>
      </work-manager>
      <jetty>
        <name>JettyServer</name>
        <network-io-name>NetIO</network-io-name>
        <work-manager-name>JettyWorkManager</work-manager-name>
      </jetty>
      <rmi>
        <name>RMI</name>
        <http-service-name>JettyServer</http-service-name>
      </rmi>
      <jndi-context>
        <name>JNDI</name>
      </jndi-context>
      <exported-jndi-context>
        <name>exportedJndi</name>
        <rmi-service-name>RMI</rmi-service-name>
      </exported-jndi-context>
      <jmx>
        <jndi-service-name>JNDI</jndi-service-name>
        <rmi-service-name>RMI</rmi-service-name>
        <rmi-registry-port>1099</rmi-registry-port>
        <rmi-jrmp-port>9999</rmi-jrmp-port>
      </jmx>
      <transaction-manager>
          <name>transactionmanager</name>
          <!--max-resource-requests-on-server>1</max-resource-requests-on-server>
          <max-resource-unavailable-millis>1000</max-resource-unavailable-millis-->
      </transaction-manager>
      <data-source>   
          <name>hqsqlconn</name>   
          <driver-params>     
            <url>jdbc:hsqldb:hsql://localhost/wlevdb</url>
            <driver-name>org.hsqldb.jdbcDriver</driver-name>
            <properties>
              <element>
                <name>user</name>
                <value>sa</value>
              </element>
              <element>
                <name>password</name>
                <value></value>
              </element>
            </properties>
            <use-xa-data-source-interface>true</use-xa-data-source-interface>   
          </driver-params>   
          <connection-pool-params>     
            <initial-capacity>1</initial-capacity>     
            <max-capacity>5</max-capacity>     
            <test-table-name>test_table</test-table-name>   
          </connection-pool-params>   
          <data-source-params>     
            <jndi-names>
              <element>hqsqlconn</element>
            </jndi-names>
            <global-transactions-protocol>TwoPhaseCommit</global-transactions-protocol>
          </data-source-params> 
      </data-source>
    </n1:config>

    I see what you are saying.
    The JNDI approach should work-we will try to reproduce this internally.
    I would recommend leveraging the OSGi service registry, instead of using JNDI, however. The Event Server is a modular server based on OSGi, so one should use the OSGi service registry whenever possible instead of using the jndi registry. Jndi is primarily there to support legacy code that requires Jndi.
    Any data sources that you configure are automatically registered in the OSGi service registry. When there is more than one data source they can be distinguished using their name.
    There are a couple of options.
    If you want to inject a reference to your datasource into a Spring bean, you can use an annotation, @Service, to annotate a setter method on your bean (see my previous post). The container will then inject a reference to the data source into the bean.
    You can also put the following in your spring application context file
    <osgi:reference id="myDataSource"
    interface="javax.sql.DataSource"/>
    This creates a bean proxy that references the datasource by looking up the datasource in the OSGi service registry. It works similarly to JndiObjectFactoryBean, but it uses the OSGi service registry instead of the JNDI registry. You can read more about it here
    http://www.springframework.org/osgi/specification
    (Look in section 3.3)
    Hope that helps.
    Seth
    Edited by swhite at 08/01/2007 6:19 PM

  • Use of cache_scheme in data-sources.xml

    Hi guys.
    I have posted a couple of similar topics before - without any response ! I can't believe with all of the gurus out there that NOBODY knows the answer to this ! :-)
    Anyway, we are providing a 'vanilla' type implementation of Oracle's Connection Pooling - just using Oracle's DataSource to open and close connections, and having Oracle dynamically take care of the pooling itself. ( Apparently, under this scenario, even max and min connections are set as required ).
    However, if I specify the cache_scheme property within data-sources.xml, will it take effect using this basic implementation ? In other words, will changing it's value effect the behaviour once the max limit is reached and more connections are requested ?
    Many thanks.
    Steve.

    Timo,
    thanks for your respone! I managed to configure the application to use a data-source connection created on the application server. Also in order to be able to deploy the same EAR to a number of containers on different DB's.
    I know it's possible to connect to a DB without using a data-sources.xml file .. but it seemed like my application was storing some 'old' connection information because it was able to connect to the db without having the data sources configured on the AS.
    Do you need to restart JDeveloper after unchecking the 'Bunde default data-sources.xml during deployment' checkbox? Because it is working correctly right now ... .
    Thanks,
    Koen Verhulst

  • Creation of a generic extractor and data source for the FAGLFLEXA table

    Hi All,
    Need to create a generic extractor and data source for the FAGLFLEXA table to support AR reporting. This table contains the necessary profit center information to perform LOB reporting against the AR data.
    Please advice on how to do this.
    Regards, Vishal

    Hi Vishal,
    Its seems a simple a work out.
    1.Go to RSO2 & choose the relevant option ie. whether you want to create Transactional DS, Master Data DS or Text DS.
    2. Name it accordingly & then create.
    3. Give description to it & then give table name FAGLFLEXA.
    4. Save it & activate. If you need it to be delta enabled then click over Delta & you can choose accordingly.
    If you still face some problem then do mail me at [email protected]
    Assign points if helpful
    Regards,
    Himanshu

  • UME using SAP R/3 as Data Source

    Hi,
    We are trying to set User authentication to SAP R/3 system, not load balanced system, on the User Management Configuration values: Client=501, Userid=sapjsf, Password=pwd, sys id=RS1, Group and Message server= blank, Application server= server.company.com, Sys. number=00, Max pool=10, Max wait=300000.
    When testing connection, I get this message:
    (System ID): com.sap.mw.jco.JCO$Exception: (101) RFC_ERROR_PROGRAM: 'mshost' missing
    (System ID & System Number): OK
    Is this an error? since our SAP R/3 is not a load balanced system.
    Did we miss any item for the setup, in dataSourceConfiguration_r3.xml? The SAPJSF "communication user" got the right sap role and authorizations.
    Portal version : EP6 SR1
    Regards
    Huzaifah

    Hi,
    If u want to Use The SAP R3 System as Data source u may
    do it from config tool if u got following message.
    WARNING! You are not allowed to select dataSourceConfiguration_r3.xml as active configuration file.
    (For Portal Patch less than SP13 u must download two data source file which is attached with note - 718383
    and upload it to portal which is described in the note)
    the following are the procedure which i apply ,
    Go to System Administration -> System Configuration ->UM  Configuration
    Now Do not change Data source from Here.
    Make sure  your data source is "Database Only"
    (dataSourceConfiguration_database_only.xml)
    Now enter the following value under SAP System Tab.
    Client : - Your sap system client
    User:-  Sap user
    password: - password
    System language:- your system language
    Application server: - Host name or IP of sap system
    System Number : -  SAP instance number
    Maximum Size of Connection Pool : -  As per req.
    Maximum Wait Time in Milliseconds :- 10000
    Now, save the changes and shutdown the portal server.
    Using Config Tool change the data source. Run the following
    <drive:\> usr\sap\<sid>\JC<instance number>\J2EE\configtool\configtool.bat
    (Make sure the portal system is shutdown)
    Under Cluster Data -> Global Server Configuration -> services -> com.sap.security.core.ume.services
    Now find the key: -  ume.persistence.data_source_configuration     
    The default was : - dataSourceConfiguration_database_only.xml
    change the value to :- dataSourceConfiguration_r3.xml     
    click on set and from flie-> apply
    Now restart the portal server ur data source changer to SAP R3 System
    Regards,
    Kaushal

  • Any reported problems using jdbc over a WAN?

    If im trying to connect to a Database that's on a WAN will I experience any issues in using jdbc to connect and execute queries to that database?
    I know problems would come up if my wan network is slow, but has jdbc been able to handle long distance database queries? timeout values?

    but why?
    is it because of security? If a company had a database with your personal info hanging out on the Web for anyone to query without any validation or security, how would you feel about it?
    design pattern issues? It's just good layered design.
    just doesnt make sense?Not in my opinion.
    have u experienced/heard of any problems of
    connecting to a database over a WAN and executing
    queries?You don't say anything about who the client is. If the database is behind a firewall, outside clients shouldn't be able to access the port where the listener is running. Only port 80 should be open on that firewall.
    So you either write a servlet that listens on port 80 for HTTP requests from a browser-based client OR you ask your firewall admin to punch a hole in the firewall and open up the port on which your database is listening for queries and use a Swing client.
    If s/he agrees to do it, quit immediately. It means your company doesn't know anything about security.
    %

  • Using COGNOS as an infoprovider/data source for WebI...?

    I saw a job posting today that listed a requirement that I am pretty sure is IMPOSSIBLE...
    WebIntelligence report experience with using COGNOS as an infoprovider/data source for BOBJ is an important skill.
    Data sources for client will be both COGNOS and SAP.
    Now, it wouldn't be the first time that a client spec asked for the IMPOSSIBLE- but it got me to wondering if maybe I am wrong in my understanding that COGNOS 8 still uses PowerPlay cubes that are 100% proprietary and can only be read with the CONGOS report-design tools.
    Is there actually a "supported" way to use COGNOS as an infoprovider/data source for BOBJ...?
    Maybe using some COGNOS equivalent of QAAS...?
    I have no intention of applying for this job - but would like to know if it is technically possible.

    It's been more than a week since I posted this question and nobody came up with a "YES" here or on the BOB Forums...so I am going to close this question as an IMPOSSIBLE request.
    Based on the current technology - COGNOS cubes can not be used as an infoprovider/data source for WebIntelligence.

  • Data View and Data Source buttons Greyed out

    I have Site Admin permissions on an On Prem SharePoint 2013 site.
    In SharePoint Designer 2013 the Data View and Data Source buttons are greyed out.
    Can anyone shed some light as to why this is occurring?

    Hi grantzre,
    Could you provide a screenshot about the location you want to insert the Data View web part and Data Source?
    I think you may put the mouse cursor in the incorrect place to add the data view web part, please try putting the cursor before the tag </ZoneTemplate> and see if "Data View" button is enabled, then you can insert an empty
    dataview web part and then insert the data source in tag <DataSources> by clicking ribbon button "Data Source" (also click the ribbon button "Parse HTML" of the page if needed).
    Thanks
    Daniel Yang
    TechNet Community Support

Maybe you are looking for

  • How can you 'block' your Iphone, if somebody stole it? so that they can not mess with your social network accounts or anything alike?

    Yesterday night, somebody stole my Iphone. Now I'm trying to safe my privacy and everything trough itunes. But how can I 'block' the Iphone, so the thief won't be able to access my phone, or at least not my apps and stuff? is there anyway, -besides t

  • Retrieve tables and column names in a universe

    Hi - Is there a way to retrieve tables and columns used in a given universe? We have to do analysis and need to know the tables as well as fields used anywhere in any object defined in the universe. I tried Query Builder and did some selection on ci_

  • Dumb Q on Properties Inspector and missing Font tools

    I just upgraded to DW CS5.  In the Properties Inspector I somehow clicked off some options and can now no longer see font alignment or options like Bold or Italics.  Now I have to access it via the FORMAT option at the top.  I know this has to be sim

  • BAPI to update batch characteristics

    Hi, We have a requirement to update batch characteristics in SAP. I used the VB_BATCH_CHANGE to update the batch characteristics. Below is my code. After the call, I don't get any error from this BAPI/RFC, but batch chararacteristcis values are not u

  • How do I open a JPG in ACR.

    I was shown, and have read that to do this I have to right click on the file and select 'Open in Adobe raw' but do not have this option appear when I right click.I am using Elements 11.