Datasource Lookup in OIM

I would like to use the OC4J connection pooling for the database operations in the adapter. Could anyone please let me know how to achieve this?

You could create one process task with one adapter. The first step, add the value to the lookup containing the appropriate role name. Second step, insert that value into their child table for their roles. This will trigger teh insert role task already configured.
Trigger this task above when your create user task completes.
-Kevin

Similar Messages

  • Using Portable datasource lookup for a java client in OC4J 10g

    Hi,
    I'm in the process of porting a standalone java client to j2ee. At the moment I have a thick java client which uses jndi to access a global datasource configured on the OC4J server (10.1.2.0.2) and it works fine.
    Using the 'Services Guide' I decided the next step was to deploy the client as a J2EE application. At the moment the j2ee application only contains the descriptors (i.e application-client.xml and orion-application-client.xml packaged under META-INF in a .jar. This is, in turn, packaged in an .ear along with application.xml (again under META-INF.)
    This is where I'm hitting problems. The following config produces a 'javax.naming.NameNotFoundException' error
    application.xml
    <application>
         <display-name>appName</display-name>
         <description>appDescription</description>
    </application>
    application-client.xml :-
    <application-client>
         <display-name>appName</display-name>
         <resource-ref>
              <res-ref-name>jdbc/MaptoTest</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
         </resource-ref>
    </application-client>
    orion-application-client.xml :-
    <orion-application-client>
         <resource-ref-mapping name="jdbc/MaptoTest" location="jdbc/Test"/>
    </orion-application-client>
    jndi.properties :-
    java.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory
    java.naming.provider.url=opmn:ormi://<machine>:6004:<OC4J_INSTANCE>/appName
    java.naming.security.principal=<USERNAME>
    java.naming.security.credentials=<PASSWORD>
    client.class
    ctx = new InitialContext();
    ds = (DataSource)ctx.lookup("java:comp/env/jdbc/jdbc/MaptoTest"));
    "jdbc/Test" was configured through OAS and is present in data-sources.xml (it is the ejb-location property).
    I'm running the client through Jdeveloper. I've used SJSAS previously and was use to configuring and deploying a application module through it's own tool. SJSAS also has a tool (appclient) for running the client. Is there something similar I should be using in OC4J?
    The services guide only mentions web.xml and ejb-jar for portable datasource lookup but I assume it's also possible using application-client.xml.
    It seems to me that my descriptors don't mention the j2ee application explicitly. Am I missing an entry in one of the xml descriptors. Any help would be appreciated this is driving me crazy!
    Thanks in advance for any advice.

    Hi Geoff,
    The configurations for your client.xml files look ok. Question: where did you configure the datasources.xml i.e. under j2ee/<OC4J_Name>/config or under the application-deployments/<appname>, kindly check and let us know.
    Thanks,
    Deepak

  • Exception in dataSource lookup

    HI,
    I get Exception in dataSource lookup everytime in my code. How to solve this problem.
    I use java,tomcat and sql server
    ERROR [ajp-apr-8009-exec-9] 08:37:18,898 com.general.EditBean - Exception in dataSource lookup.
    java.sql.SQLException: Exception in dataSource lookup.
        at com.dbmodel.DSUtil.getConnection(DSUtil.java:41)
        at com.dbmodel.DSUtil.getConnection(DSUtil.java:49)
        at com.general.EditBean.getEditRecord(EditBean.java:91)
        at org.apache.jsp.lr.blendedtrainingplan_jsp._jspService(blendedtrainingplan_jsp.java:873)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at com.upside.lms.servlets.GlobalFilter.doFilter(GlobalFilter.java:54)
        at com.upside.lms.servlets.GlobalFilter.doFilter(GlobalFilter.java:38)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:208)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
        at com.googlecode.psiprobe.Tomcat60AgentValve.invoke(Tomcat60AgentValve.java:30)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:197)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1812)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)
    Caused by: javax.naming.NameNotFoundException: Name [null] is not bound in this Context. Unable to find [null].
        at org.apache.naming.NamingContext.lookup(NamingContext.java:820)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:154)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:831)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:154)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:831)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
        at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
        at javax.naming.InitialContext.lookup(InitialContext.java:411)
        at com.dbmodel.DSUtil.getConnection(DSUtil.java:39)
        ... 30 more

    Hello,
    "JNDI names are registered in the registry, if you try to access the name which is not registered or by the wrong format, you would get the javax.naming.NameNotFoundException"
    Source:
    http://www.javabeat.net/javax-naming-namenotfoundexception/
    Please look at the following resource too:
    http://stackoverflow.com/questions/6468109/javax-naming-namenotfoundexception-name-jdbc-is-not-bound-in-this-context
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • DataSource lookup: where to put it ?

    Hi all,
    I have the following question: what's the most correct method for DataSource lookup in a Session Bean? I look it up in the setSessionContext method:
    DataSource ds;
    public void setSessionContext(SessionContext ctx) { 
    this.ctx = ctx;
    ds = (javax.sql.DataSource) new InitialContext().lookup ("myPool");
    do you have other suggestions? for example I have read somewhere in this forum to use static-inizializers to populate instance variables of SSB....
    comments?
    thanks
    Francesco

    hi ,
    i am also facing the same problem ,
    if u had sol. for it, then try to give sol. for it
    but i have error as the following
    i am getting a problem (Exception)when my bean trys to connect with database.
    SQLException: java.sql.SQLException: Io exception: Connection refused(DESCRIPTI
    ON=(TMP=)(VSNNUM=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)))
    and i am using following in resource properties file
    jdbcDataSource.5.name=jdbc/TimeSpanDB
    jdbcDataSource.5.url=jdbc:oracle:thin:@myserver:1521:timeDB,scott,tiger;create=true
    and also i try out with following changes
    jdbcDataSource.5.name=jdbc/TimeSpanDB
    jdbcDataSource.5.url=jdbc:oracle:thin:@99.0.0.201:1521:timeDB,scott,tiger;create=true
    but both the time it is giving same sql connection exception
    waiting for ur sol.
    deepal

  • NameNotFoundException for DataSource lookup

    Hi,
    I have a requirement where i need to push message from a client code (deployed in oc4j 10.1.3) to a remote queue which is deployed on weblogic server. i have used
    Context.INITIAL_CONTEXT_FACTORY = "weblogic.jndi.WLInitialContextFactory". I could send the message to the weblogic 9.2 server queue from oc4j 10.1.3 client code. But all my datasources lookups are failing in oc4j container.
    My lookup code looks as follows : context.lookup("java:comp/env/jdbc/DB");
    If the lookup is done using "jdbc/DB" , it succeeds. But currently, context.lookup("java:comp/env/jdbc/DB"); code is available in 700 places. So it is not possible to change the code.
    Any suggestions why existing data source lookup fails if initial context is set to weblogic specific. I also closed and nullified the initialcontext object related to weblogic server after usage.
    Regards,
    Prashant

    Your code is this:
    javax.sql.DataSource ds = (javax.sql.DataSource) context2.lookup ("mydbsrc");So you're trying to find your DataSource at JNDI location "mydbsrc".
    Your configuration is this:
    <JDBCTxDataSource JNDIName="myserver" Name="mydbsrc" PoolName="MyJDBC Connection Pool" Targets="myserver" />
    So your DataSource is at JNDI location "myserver".
    Change the configuration so that your DataSource's JNDIName is "mydbsrc":
    <JDBCTxDataSource JNDIName="mydbsrc" Name="mydbsrc" PoolName="MyJDBC Connection Pool" Targets="myserver" />
    You can do this via the WebLogic console if you want.
    Hope this helps.

  • Lookup in OIM

    Hi,
    I am getting a value from self registration page (which we have created ) in OIM user form.I want to insert that in the roles lookup child form in SAP.Does anyone know how to insert a field value in lookup in child form?
    Thanks

    You could create one process task with one adapter. The first step, add the value to the lookup containing the appropriate role name. Second step, insert that value into their child table for their roles. This will trigger teh insert role task already configured.
    Trigger this task above when your create user task completes.
    -Kevin

  • Oracle datasource lookup in JBOSS application server

    Hi friends
    i have the below problem while configuring the datasource in JBOSS for oracle pls any body can help me out..........
    i just want to create a data source for oracle in JBOSS 3.2.5 application server and i want to access that datasource from my session bean while accessing it cant finding the JNDI name of the datasource my oracle-ds.xml code is like as below
    <local-tx-datasources>
    <jndi-name>java:OracleDS</jndi-name>
    <use-java-context>false</use-java-context>
    <connection-url>jdbc:oracle:thin:@localhost:1521:EPS</connection-url>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <user-name>system</user-name>
    manager
    </local-tx-datasources> my session bean method is like as below
    public void businessMethod1(){
    try{
    javax.naming.Context ctx = new javax.naming.InitialContext();
    javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup("OracleDS");
    java.sql.Connection con = ds.getConnection();
    java.sql.PreparedStatement ps = con.prepareStatement("select * from employee");
    java.sql.ResultSet rs = ps.executeQuery();
    while(rs.next()){
    System.out.println("Employee ID "+rs.getInt("empid")+"Employee Name "+rs.getString("ename")+"Employee Designation "+rs.getString("designation"));
    }catch(Exception e){
    e.printStackTrace();
    } but the error i am getting wasl like as below
    14:14:14,039 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
    14:14:14,164 INFO [ChannelSocket] JK2: ajp13 listening on /0.0.0.0:8009
    14:14:14,164 INFO [JkMain] Jk running ID=0 time=0/47 config=null
    14:15:00,883 INFO [STDOUT] javax.naming.NameNotFoundException: OracleDS not bound
    14:15:00,883 INFO [STDOUT] at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
    14:15:00,883 INFO [STDOUT] at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
    14:15:00,883 INFO [STDOUT] at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
    14:15:00,883 INFO [STDOUT] at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
    14:15:00,883 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:530)
    14:15:00,883 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:509)
    14:15:00,883 INFO [STDOUT] at javax.naming.InitialContext.lookup(InitialContext.java:347)
    14:15:00,883 INFO [STDOUT] at com.ness.training.ejb.FirstSessionBean.businessMethod1(FirstSessionBean.java:13)
    14:15:00,883 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    14:15:00,883 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    14:15:00,883 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    14:15:00,883 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
    14:15:00,883 INFO [STDOUT] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.j
    ava:683)
    14:15:00,883 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterce
    ptor.java:185)
    14:15:00,883 INFO [STDOUT] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterc
    eptor.java:72)
    14:15:00,883 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
    14:15:00,883 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
    14:15:00,883 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
    14:15:00,883 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:120)
    14:15:00,883 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
    14:15:00,883 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:1
    22)
    14:15:00,883 INFO [STDOUT] at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
    14:15:00,883 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:723)
    14:15:00,883 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    14:15:00,883 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    14:15:00,883 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    14:15:00,883 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
    14:15:00,883 INFO [STDOUT] at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
    14:15:00,883 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
    14:15:00,883 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
    14:15:00,883 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    14:15:00,883 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
    14:15:00,883 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
    14:15:00,883 INFO [STDOUT] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:360)
    14:15:00,883 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    14:15:00,883 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    14:15:00,883 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    14:15:00,883 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
    14:15:00,883 INFO [STDOUT] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
    14:15:00,883 INFO [STDOUT] at sun.rmi.transport.Transport$1.run(Transport.java:148)
    14:15:00,883 INFO [STDOUT] at java.security.AccessController.doPrivileged(Native Method)
    14:15:00,883 INFO [STDOUT] at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
    14:15:00,883 INFO [STDOUT] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
    14:15:00,883 INFO [STDOUT] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
    14:15:00,883 INFO [STDOUT] at java.lang.Thread.run(Thread.java:536)

    make the changes like this.
    javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup("java:/OracleDS");
    Regards
    vanan

  • Problem with DataSource lookup(Urgent)

    HI,
    I am facing a unique problem. I am migratinga application from weblogic to WAS. In a web module I wrote a normal class which will get the initial context of the server and create a connection object for the use of servlets. It is working fine in weblogic but when i have deployed the samething in WAS it is giving exception
    com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of MLJNDI.
    where MLJNDI is my DataSource jndi name.
    can anybody suggest me the solution?.This is very urgent.
    Thanks in advance.
    Ashok.

    It is not clear if you already created a Datasource to a specified database. This can be done via the Visual Admin.
    Services --> JDBC Connector. There you can upload vendor specific drivers and bind it to a database.
    This is possible usings the standards. JDBC 1.x and 2.0 way.
    Success.

  • DataSource lookup error in bpel 10.1.3

    Hi,
    i have a java client program in jdeveloper 10.1.3 from which i am trying to connect bpel 10.1.3 datasource but it is not able to find the datasource even it is able to connect bpel server RMI port where all datasouces has been defined.
    as part of code is-
    Hashtable env = new Hashtable();
    env.put("java.naming.factory.initial",
    "com.evermind.server.ApplicationClientInitialContextFactory");
    env.put("java.naming.provider.url", "ormi://localhost:12401");
    \\ loacl bpel server RMI port connection
    env.put("java.naming.security.principal", "oc4jadmin"); \\username
    env.put("java.naming.security.credentials", "sadmin01"); \\Password
    context = new InitialContext(env);
    \\Till here it is able to create initial context using hashtable
    dataSource = (DataSource) context.lookup("jdbc/XRefFunctionsSource");
    \\ Here it failed to lookup datasource
    I had defined the datasouce in bpel sever through enterprise manager.
    I tried to connect all by default datasources which are there initially but it failed.
    Please tell any suggestion to change in my code to connect datasource.
    Thanks.

    This is the complete piece of code in which i am trying to get DB Connection from jdeveloper 10.1.3 -
    public class Test
    public Test() throws Exception
    static Test instance= null;
    Context context;
    Connection connection;
    DataSource dataSource;
    try{
    * Create access to the naming context, initialized from the
    * Hashtable parameter to the constructor.
    Hashtable env = new Hashtable();
    env.put("java.naming.factory.initial",
    "com.evermind.server.ApplicationClientInitialContextFactory");
    env.put("java.naming.provider.url", "ormi://localhost:12401");
    env.put("java.naming.security.principal", "oc4jadmin");
    env.put("java.naming.security.credentials", "sadmin01");
    context = new InitialContext(env);
    System.out.println("InitialContext created using Hashtable...");
    * Lookup the jdbc/BPELSamplesDataSource object.
    dataSource = (DataSource)
    context.lookup("jdbc/XRefFunctionsSource");
    System.out.println("jdbc/XRefFunctionsSource found...");
    System.out.println("Connecting to database ...");
    //dataSource =
    connection = dataSource.getConnection("orabpel","orabpel");
    System.out.println("Got database connection ...");
    catch(Exception e)
    System.out.println("" + e);
    throw e;
    private static Test instance() throws Exception
    if (instance== null)
    instance = new Test();
    return instance;
    private Connection getConnection() throws Exception
    return connection;
    public static void main(String[] args)
    Connection con = Test.instance().getConnection();
    I tried a lot with different options but still it is not working..
    As i told the same code is working for bpel 10.1.2 using jdeveloper 10.1.2.
    Is there any other way to get DB connection here?
    Thanks,
    Anil
    Message was edited by:
    user516357

  • Datasource Lookup from WSAD using POJO - CastException looking up DB2 Data

    I try to look up datasource from WSAD test server using stand alone POJO.
    Code is like:
    Hashtable properties = new Hashtable();
    properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
    properties.put(Context.PROVIDER_URL, serviceURL);
    properties.put(Context.PROVIDER_URL, "iiop://localhost:2813");
    Context context = new InitialContext(properties);
    ds = (DataSource) context.lookup("jdbc/myDS");
    Context and datasource are set properly.
    I get exception below when I look up datasource:
    Exception in thread "P=646891 =0:CT" java.lang.ClassCastException: javax.naming.Reference
    I think additional jar files are needed in class path.
    What additional jar files do I need in build path to look up datasource?
    I am using DB2. Datasource is properly configured in WSAD test server.

    Refer to this article.
    http://www-128.ibm.com/developerworks/websphere/library/techarticles/0310_bhogal/bhogal.html
    It provides all the information you need to perform a JNDI lookup. Quoting from the artice;
    To execute our external Java application, make sure your environment is prepared and use a Java command of the following form to invoke the client application:
    %JAVA_HOME%/bin/java -Xbootclasspath/p:%WAS_BOOTCLASSPATH%
    -classpath <list of the referenced jars, classes, and resource directories>
    -Djava.ext.dirs=%WAS_EXT_DIRS%
    -Djava.naming.provider.url=iiop://<server:orb port>
    -Djava.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory
    %SERVER_ROOT% %CLIENTSAS% <fully qualified main class of the application client>;

  • Sun App Sever 8.1  /  JNDI - datasource lookup problems

    I get an error when calling the ctx.lookup function. I have the datasource and the resource set up in the server OK. I can ping successfully and view the table data. I am using NetBeans 4.1 / Sun 8.1
    I have been up all night (11pm - 4:30am) trying to figure this out.
        <%
            java.sql.Connection conn = null;
            java.util.Hashtable env = new java.util.Hashtable();
            javax.naming.Context ctx ;
            javax.sql.DataSource cachedDataSource;
            try {
            env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,  "com.sun.jndi.cosnaming.CNCtxFactory");
            ctx = new javax.naming.InitialContext();
            cachedDataSource  = (javax.sql.DataSource)ctx.lookup("jdbc/mysql"); 
            if (cachedDataSource == null)
                {out.println("<h2>The datasource is not getting set properly</h2>");
                conn = cachedDataSource.getConnection();}
            else
            { out.println("<h2>the datasource is not null and seems like it gets initialized.<h2>"); }
            } catch (javax.naming.NamingException ne) {}
              catch (java.sql.SQLException se) {}
            env = null;
            ctx = null;
            conn.close();
            conn = null;
            cachedDataSource = null;
        %>

    RTFM
    http://docs.sun.com/app/docs/doc/819-0079
    The resource lookup in the application code looks like this:
    InitialContext ic = new InitialContext();
    String dsName = "java:comp/env/jdbc/HelloDbDs";
    DataSource ds = (javax.sql.DataSource)ic.lookup(dsName);
    Connection connection = ds.getConnection();
    The resource being queried is listed in the res-ref-name element of the web.xml file as follows:
    <resource-ref>
    <description>DataSource Reference</description>
    <res-ref-name>jdbc/HelloDbDs</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    The resource-ref section in a Sun Java System specific deployment descriptor, for example sun-web.xml, maps the res-ref-name (the name being queried in the application code) to the JNDI name of the JDBC resource. The JNDI name is the same as the name of the JDBC resource as defined in the resource file when the resource is created.
    <resource-ref>
    <res-ref-name>jdbc/HelloDbDs</res-ref-name>
    <jndi-name>jdbc/HelloDbDataSource</jndi-name>

  • Configure Lookups in OIM

    Hi,
    For our project we have to create a large no. of lookup definition tables containing large stack of data and need to update it on continuous basis. I am just wondering if we can have any script/scheduled task which we can provide to admin for initial and subsequent data load. Please, if anyone came across this situation and found the way, help me. Thanks....

    As Martin told, it is not a big deal. Just create a schedule task or you can some other code which wil be executed out of OIM.
    It is not difficult but you should know how to use APIs
    http://otndnld.oracle.co.jp/document/products/id_mgmt/idm_903/doc_cd/javadocs/operations/Thor/API/Operations/tcLookupOperationsIntf.html

  • Error in using Lookup Query - OIM 11g

    Hi Guys,
    I am trying to use following lookup query:
    select usr_key, usr_login from USR where usr_status = 'Active' and have following mapping defined in the process form:
    Column Width = 200
    Lookup Column Name = usr_login
    Column Names = usr_key, usr_login
    Column Captions = USER_KEY, USER_LOGIN
    The values are getting populated properly while searching for the lookup. But when I click on 'SELECT' button. It throws error. saying 'A system error occurred'
    I see following error in the log:
    <Jul 4, 2011 7:19:07 PM IST> <Error> <XELLERATE.WEBAPP> <BEA-000000> <Class/Method: tcLookupFieldAction/selectedValue encounter some problems: {1}
    Thor.API.Exceptions.tcColumnNotFoundException
    at Thor.API.tcMetaDataSet.getStringValue(tcMetaDataSet.java:368)
    at com.thortech.xl.webclient.actions.tcLookupFieldAction.selectedValue(tcLookupFieldAction.java:1723)
    ### Steps to Reproduce Problem ###
    1. Create a new process form
    2. For one of the column, assign following properties:
    Lookup Query = select usr_key, usr_login from USR where usr_status = 'Active'
    Column Width = 200
    Lookup Column Name = usr_login
    Column Names = usr_key, usr_login
    Column Captions = USER_KEY, USER_LOGIN
    3. Activate the form
    4. Open the resource in Web Console
    5. Search for that lookup.
    6. Select any of the value
    7. Press 'Select' button. Error is thrown.
    Could somebody please help me out with this issue?
    Thanks,

    Got the solution:
    tcColumnNotFoundException with Lookup Query

  • Problem in creating a lookup in oim.

    when i am trying to create a lookup in jsp, it is directly printing on jsp page.
    the code is:
    row.add(TableCellFactory.createText("<input type=\"text\" name=\"selectedValuesToMove" +
    objectInstanceKey +
    "maxlength=\"50\" tabindex=\"\" "+
    i +
    "\" value=\"\" readonly=\"readonly\" class=\"Fields\"><a href='' onClick='openLookupWindow(\"LookupForm.do?method=Lookup+By+API&lookupAPI=-19&property=selectedValuesToMove" +
    objectInstanceKey +
    "&columnLabelKey=global.label.managerid&htmlFormName=serviceAccountsForm&className=Thor.API.Operations.tcUserOperationsIntf&methodName=findUsersFiltered&fixedFilter=Users.Status%3AActive&columnNames=Users.User+ID%2CUsers.Last+Name%2CUsers.First+Name&selectionColumn=Users.User+ID\",\"Lookup\",\"height=500,width=500,scrollbars=yes,status=yes, resizable\");return false;'><img src='images/lookup.gif' border=0></a>  \n" +
    "                              <a href=\"#\" onClick='clearLookupField(\"selectedValuesToMove" +
    objectInstanceKey +
    "\");' >Clear</a>"));
    can any one help me.
    it is important to my project.
    Edited by: anu on Jul 22, 2011 4:32 AM
    Edited by: anu on Jul 22, 2011 4:35 AM
    Edited by: anu on Jul 22, 2011 6:36 AM

    Hi Dharmi
    Here is a quote of Dafna's post in [another thread in this forum|Re: Copy VC controls]
    CE7.1.1 will be released at September 2008 for ramp-up customers.
    There are many improvements and new capabilities in the new release of Visual Composer for CE7.1.1. Among the new features you can find:
    The missing features from Visual Composer 7.0 (Html view, portal Eventing support (EPCM), JDBC, Undo/Redo, and more..)
    Many layout & modeling improvements
    Additional ALV table functionality - export to Excel, switch to chart, configure ALV behavior at design time
    Integration of Visual Composer in Eclipse - additional entry point to the Visual Composer models from the NWDS. This integration provides the option to add a WD component (in case of missing functionality in Visual Composer), as a black box component to the Visual Composer model. Right-clicking the component will open the Web Dynpro perspective for creating/modifying the component.
    Regards,
       Shai

  • Dynamic Lookups in OIM 11gR2

    Hi,
    Is it possible to have dynamic look up . Seems lookup query is no more supported.
    any pointer will be helpful.
    thanks in advance.

    http://docs.oracle.com/cd/E27559_01/dev.1112/e27150/uicust.htm#BABFFACA
    http://docs.oracle.com/cd/E27559_01/dev.1112/e27150/uicust.htm#BABFFACA

Maybe you are looking for

  • How can i display image in RTF template when Oracle Apps running in Windows

    Can any body help how can i display image in RTF template when oracle apps running in Windows Server. Thanks Ravi

  • My daughter has disabled her iPhone 4 due to incorrect password. how do i fix

    My daughter has disabled her iPhone 4. Due to incorrect password. It shows phone is disabled connect to itunes. It  only lets me make Emergency calls. I have never synced it to computer or anything. Please help me fix. I've been told I have to go to

  • Combining password protected PDF files

    Hi, I need to combine two pdf files into one. But one of the file is Password Protected for Page Extraction.  It has no other restrctions other than password protection for Page Extraction. When I try to use File-->Combine-->Merge Files into Single P

  • MSS General Information (Employee Search iview Fetching wrong Manager)

    Hi, In MSS we have General Information page which has Employee Search iview. This iview display the information in a table which has several columns... (Name, Personal Number, Manager, Position, Staffing Ration, Job... etc) The problem is under the M

  • ICal and "To Do List"

    Thanks for taking the time to read my post! I just switched from a PC to an iMac last week so please bear wtih me if the answer to my question seems obvious. I run a small business and live and die by my calendar and customer database. I have success