Datasource and JNDI binding

Hi
I'm a beginner in JNDI
i'm used to connect the Oracle DB using JDBC ,
now i want to use the JNDI to get a connection pooling
i've read alot of Documentation about this field and i need to know how to set the LookUp Name to my database
thank you

I am not sure how to add configuration in Oracle App Server. But this how you have to do.
Create a connection object in the app server in the name jdbc/Test . (jdbc/Test is the name of the connection which will be used to get refernece from the JNDI). In the App server you have to create the connection with you userid, password and URL for the connection.
URL - jdbc:oracle:thin:@servername:1521:databasename
You may need to have the connection from EJB or may be from the JSP or bean class. If the connection is required in EJB, then EJB container will get the reference. For JSP or Bean the web container will get the reference. You need to make specific entries in ejb-jar.xml and oracle-ejb-jar.xml (I hope there will be file in this name. Beacause for me I have sun-ejb-jar.xml for Sun App server.) for EJB container and in web.xml and oracle-web.xml for web container.
Here are the entries for web Container -
In web.xml put this entry -
<resource-ref>
<res-ref-name>jdbc/Test</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
In oracle-web.xml put this entry -
<resource-ref>
<res-ref-name>jdbc/asta</res-ref-name>
<jndi-name>jdbc/asta</jndi-name>
</resource-ref>
Here is how you will get the connection -
Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/Test");
Connection conn = ds.getConnection();
Thanks

Similar Messages

  • DataSource and JNDI

    Ight guys i am soo confused... I am creating a connection pool and i have used the little tool to create the pool and the datasource.. Now how do i call the datasource to be able to retrieve the connection.. Sorry for the question i just am not understanding everything that i have been reading

    Well, your question is how to connect to an established connection pool? Are you sure your pool is actually working? You didn't post any code on how you set that up.Also, without the setup portion, we don't know what reference name you gave your connection pool, so we don't know how to look it up. Please post the portion of your server.xml where you created the resource and the portion of your web.xml where you reference it, and we can take it from there.

  • JNDI bind/rebind and object state question

    Hi,
    I have an object that is part of an EAR application that is deployed into an app server. I load a Webapp that initializes an object and then binds it to an initial context under java:comp/env setting some initial state.
    However, when I access the object from an MDB as part of the EAR application, the state, when retrieved from the same context, was not retained. Here is the code I am using to bind the object to the context:
    if (!object.isRunning()) {
           System.out.println("Starting App...");
           object.start();
           try {
               getNamingContext().bind(object);
           } catch (Exception e) {
               System.out.println("Name bound already, rebinding...");
               try {
                   getNamingContext().rebind(object);
                   e.printStackTrace();
               } catch (Exception e1) {
                   e1.printStackTrace();
           System.out.println("Broker started...");
       }When I retrieve the object from the initial context as part of a message received within an MDB, the state is such that the object is always failing the .isRunning method test and subsequently throws an exception.
    What am I doing wrong? Is this related to the fact that possibly the WAR and the MDB create duplicate contexts when I expect there to be only one?
    Any insight is greatly appreciated.
    Thanks,
    John

    following procedure works fine for now, if there is any straight forward solutions,
    that will be helpful.
    1) Create the Subcontexts for each of the sub entries in the jndi name tree
    2) bind the object to the last entry in the tree.
    i.e if the jndi tree name is "one.two.three", and the bind object is Obj
    ctx = ctx.createSubcontext("one");
    ctx = ctx.createSubcontext("two");
    ctx = ctx.bind("three", obj);
    Thanks,
    Gangs.
    "Gangadhar" <[email protected]> wrote:
    >
    Hi,
    I am trying to bind the local object to the Weblogic JNDI, using the
    code below.
    It works fine if the bind name is a straight forward String(not a tree).
    It is
    throwing naming Exception when i am trying to bind into a new tree.
    Thanks,
    Gangs.
    //GETTING THE INITIAL CONTEXT:
    private Context getInitialContext() throws NamingException {
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    h.put(Context.SECURITY_PRINCIPAL, "user");
    h.put(Context.SECURITY_CREDENTIALS, "password");
    h.put(Context.PROVIDER_URL, url);
    return new InitialContext(h);
    } catch (NamingException ne) {
    log("We were unable to get a connection to the WebLogic server
    at "+url);
    log("Please make sure that the server is running.");
    throw ne;
    private registerObject()
    throws NamingException
    // Lookup the beans home using JNDI
    Context ctx = getInitialContext();
    try{
    //This binding works fine.
    String bname = "Ganga";
    ctx.bind("plainname", bname);
    //This one throws an Naming Exception..
    ctx.rebind("one.two.three", bname);
    } catch(javax.naming.NameAlreadyBoundException nlb){
    System.out.print(nlb.getMessage());
    System.exit(0);
    }catch(javax.naming.directory.InvalidAttributesException iae){
    System.out.print(iae.getMessage());
    System.exit(0);
    }catch(NamingException ne){
    System.out.print(ne.getMessage());
    System.exit(0);
    Exception msg is : Unable to resolve 'one.two.three' Resolved: '' Unresolved:'one'

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

  • EJB 3.0 and jndi lookup (simple question)

    hi all,
    i am newbie on Weblogic Application Server and i have some issues,
    i have weblogic application server 10.0, also i have oracle timesten in-memory database, i have configured datasource and deploy my ejb 3.0 application, but i could not done jndi lookup?
    here is my example:
    1. one stateless session bean :
    import javax.ejb.Remote;
    @Remote
    public interface InsertSubscriber {
         public void insertSubscriber(SubscriberT subscriberT);
    } 2. here is it's implementation :
    @Remote(InsertSubscriber.class)
    @Stateless
    public class InsertSubscriberBean implements InsertSubscriber {
         @PersistenceContext(unitName = "TimesTenDS")
         private EntityManager oracleManager;
         public void insertSubscriber(SubscriberT subscriber)
              try {
                   System.out.println("started");
                   oracleManager.persist(subscriber);
                   System.out.println("end");
              } catch (Exception e) {
                   e.printStackTrace();
    }3 and my test client :
    public class Client {
         public static void main(String[] args) {
              Context ctx = null;
              Hashtable ht = new Hashtable();
              ht.put(Context.INITIAL_CONTEXT_FACTORY,
                        "weblogic.jndi.WLInitialContextFactory");
              ht.put(Context.PROVIDER_URL, "t3://192.9.200.222:7001");
              try {
                   ctx = new InitialContext(ht);
                   InsertSubscriber usagefasade = (InsertSubscriber) ctx
                             .lookup("ejb.InsertSubscriberBean");               
              } catch (NamingException e) {
                   e.printStackTrace();
              } finally {
                   try {
                        ctx.close();
                   } catch (Exception e) {
                        e.printStackTrace();
    }what i did incorrect ???
    i got error like this : Name not fount exception
    when i tried to view jndi tree on weblogic server application console i found this :
         Binding Name:     
    TimestenExampleTimestenExample_jarInsertSubscriberBean_InsertSubscriber     
         Class:     
    test.InsertSubscriberBean_o7jk9u_InsertSubscriberImpl_1000_WLStub     
         Hash Code:     
    286     
         toString Results:     
    weblogic.rmi.internal.CollocatedRemoteRef - hostID: '2929168367193491522S::billing_domain:AdminServer', oid: '286', channel: 'null'what does it mean how i can done lookup to jndi ?
    Regards,
    Paata Lominadze,
    Magticom LTD.
    Georgia.

    Hi All,
    I am using the weblogic cluster with session replication and EJB 2.0 with Local entity beans.
    for fail-over session should be replicated to another server so we can achive the same session if 1st server fails.
    Suppose i m using two managed server(server1,server2) in the cluster.I am storing the object of class ABC into session and object contains the instance of Local-EntityBean home but i put that as a transient.I have also override the readObject and write object method.
    when write object is called on 1st server,readObject method should be called on second server so we will be sure that session is replicating properly.
    pleaase find the code below : -
    public IssuerPageBean() {
    initEJB();
    private void readObject(java.io.ObjectInputStream stream) throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    initEJB();
    initializeCommonObject();
    private void writeObject(java.io.ObjectOutputStream stream) throws IOException {
    stream.defaultWriteObject();
    private void initEJB() {
    try {
    ic = new InitialContext();
    issuerHome = (LocalIssuerHome) ic.lookup("java:comp/env/Issuer");
    } catch (NamingException e) {
    e.printStackTrace();
    in my case if i am calling the constructor IssuerPageBean(),it calls the initEJB() method and lookeup the entity local home properly but when readObject method is called on another server only initEJB() method is called directly and getting the exception below :
    WARNING: Error during create -
    javax.naming.NameNotFoundException: remaining name: env/ejb/Client
    at weblogic.j2eeclient.SimpleContext.resolve(Ljavax/naming/Name;Z)Ljavax/naming/Context;(SimpleContext.java:35)
    at weblogic.j2eeclient.SimpleContext.resolve(Ljavax/naming/Name;)Ljavax/naming/Context;(SimpleContext.java:39)
    at weblogic.j2eeclient.SimpleContext.lookup(Ljavax/naming/Name;)Ljava/lang/Object;(SimpleContext.java:57)
    at weblogic.j2eeclient.SimpleContext.lookup(Ljavax/naming/Name;)Ljava/lang/Object;(SimpleContext.java:57)
    at weblogic.j2eeclient.SimpleContext.lookup(Ljava/lang/String;)Ljava/lang/Object;(SimpleContext.java:62)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(Ljava/lang/String;)Ljava/lang/Object;(ReadOnlyCont
    extWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(Ljava/lang/String;)Ljava/lang/Object;(AbstractURLContext.jav
    a:130)
    at javax.naming.InitialContext.lookup(Ljava/lang/String;)Ljava/lang/Object;(InitialContext.java:347)
    at com.lb.equities.veda.tools.salesvault.jsp.ClientPageBean.initEJB()V(ClientPageBean.java:218)
    at com.lb.equities.veda.tools.salesvault.jsp.ClientPageBean.readObject(Ljava/io/ObjectInputStream;)V(ClientPageB
    ean.java:191)
    at java.lang.LangAccessImpl.readObject(Ljava/lang/Class;Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown
    Source)
    at java.io.ObjectStreamClass.invokeReadObject(Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown Source)
    at java.io.ObjectInputStream.readSerialData(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject()Ljava/lang/Object;(Unknown Source)
    at java.util.HashMap.readObject(Ljava/io/ObjectInputStream;)V(Unknown Source)
    at java.lang.LangAccessImpl.readObject(Ljava/lang/Class;Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown
    Source)
    at java.io.ObjectStreamClass.invokeReadObject(Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown Source)
    at java.io.ObjectInputStream.readSerialData(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.defaultReadFields(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readSerialData(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject()Ljava/lang/Object;(Unknown Source)
    at weblogic.common.internal.ChunkedObjectInputStream.readObject()Ljava/lang/Object;(ChunkedObjectInputStream.jav
    a:120)
    at weblogic.rjvm.MsgAbbrevInputStream.readObject(Ljava/lang/Class;)Ljava/lang/Object;(MsgAbbrevInputStream.java:
    121)
    at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(ILweblogic/rmi/spi/InboundRequest;Lweblogic/rmi
    /spi/OutboundResponse;Ljava/lang/Object;)Lweblogic/rmi/spi/OutboundResponse;(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(Lweblogic/rmi/extensions/server/RuntimeMethodDescriptor;Lweblogic
    /rmi/spi/InboundRequest;Lweblogic/rmi/spi/OutboundResponse;)V(BasicServerRef.java:492)
    Please help .
    Thanks in Advance.
    Edited by hforever at 03/04/2008 7:28 AM

  • DataSource and ConnectionPoolDataSource

    Could someone explain how to bind a DataSource with JNDI so that it is pooled? The only way I can get it to work is to bind an OracleConnectionPoolDataSource and then lookup a ConnectionPoolDataSource and get the PooledConnection from that. The documentation says that a client should be able to use the pooled DataSource the same way as a non-pooled one. But, in my scenario the client has to get a PooledConnection then get a Connection from that.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Brad Lane ([email protected]):
    Could someone explain how to bind a DataSource with JNDI so that it is pooled? The only way I can get it to work is to bind an OracleConnectionPoolDataSource and then lookup a ConnectionPoolDataSource and get the PooledConnection from that. The documentation says that a client should be able to use the pooled DataSource the same way as a non-pooled one. But, in my scenario the client has to get a PooledConnection then get a Connection from that.<HR></BLOCKQUOTE>
    Sun's documentation says that you should be able to create a DataSource and call setDataSourceName() with the ConnectionPoolDataSource name. This doesn't seem to be supported in Oracle's implementation. Is this true? If so, Oracle's driver DOES NOT fully support the JDBC 2.0 Optional Package as they state in the documentation.
    Hello JDBC Dev. Team? Anyone out there?
    null

  • Problem with creating Connection pool and JNDI, driver is not detected

    Hi,
    I have an issue with creating Connection Pool and JNDI.
    I'm using:
    - JDK 1.6
    - OS: Linux(ubuntu 8.10)
    - Netbeans IDE 6.5.1
    - Java EE 5.0
    - Apache Tomcat 6.0.18 Its lib directory contains all necessary jar files for Oracle database driver
    - Oracle 11g Enterprise
    My problem is that the Oracle database driver is not detected when I want to create a pool (it works pretty well and is detected without any problem when I create ordinary connection by DriverManager)
    Therefore after running:
    InitialContext ic = new InitialContext();
    Context context = (Context)ic.lookup("java:comp/env");
    DataSource dataSource = (DataSource)context.lookup("jdbc/oracle11g");
    Connection connection = dataSource.getConnection();and right after dataSource.getConnection() I have the following exception:
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.OracleDriver'
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1136)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at servlets.Servlet1.doPost(Servlet1.java:47)
    at servlets.Servlet1.doGet(Servlet1.java:29)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:169)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1130)
    ... 17 more
    My application context file (context.xml) is:
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/WebApplication3">
      <Resource auth="Container"
                      driverClassName="oracle.jdbc.OracleDriver"
                      maxActive="8"
                      maxIdle="4"
                      name="jdbc/oracle11g"
                      username="scott"
                      password="tiger"
                      type="javax.sql.DataSource"
                      url="jdbc:oracle:thin:@localhost:1521:database01" />
    </Context>and my web.xml is:
        <resource-ref>
            <description>Oracle Datasource example</description>
            <res-ref-name>jdbc/oracle11g</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
        </resource-ref>
    ...I found similar threads in different forums including sun, such as
    http://forums.sun.com/thread.jspa?threadID=567630&start=0&tstart=0
    http://forums.sun.com/thread.jspa?threadID=639243&tstart=0
    http://forums.sun.com/thread.jspa?threadID=5312178&tstart=0
    , but no solution.
    As many suggest, I also tried to put context directly in the server.xml (instead of my application context) and referencing it by <ResourceLink /> inside my application context but it didn't work and instead it gave me the following message:
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '   ' for connect URL 'null'
    Has anyone succeeded in creating a connection pool with JNDI by using Tomcat 6 or higher ? If yes, could kindly explain about the applied method.
    Regards,

    Hello again,
    Finally I managed to run my application also with Tomcat 6.0.18. There was only two lines that had to be modified
    in the context.xml file (the context of my application project and not server's)
    Instead of writing
    <Context antiJARLocking="true" path="/WebApplication2">
        type="javax.sql.DataSource"
        factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
    </Context>we had to write:
    <Context antiJARLocking="true" path="/WebApplication2">
        type="oracle.jdbc.pool.OracleDataSource"
        factory="oracle.jdbc.pool.OracleDataSourceFactory"
    </Context>- No modification was needed to be done at server level (niether server.xml nor server context.xml)
    - I just added the ojdbc6.jar in $CATALINA_HOME/lib (I didn't even need to add it in WEB-INF/lib of my project)
    - The servlet used to do the test was the same that I presented in my precedent post.
    For those who have encountered my problem and are interested in the format of the web.xml and context.xml
    with Tomcat 6.0, you can find them below:
    Oracle server: Oracle 11g Enterprise
    Tomcat server version: 6.0.18
    Oracle driver: ojdbc.jar
    IDE: Netbeans 6.5.1
    The context.xml file of the web application
    <?xml version="1.0" encoding="UTF-8"?>
    <Context antiJARLocking="true" path="/WebApplication2">
        <Resource name="jdbc/oracle11g"
                  type="oracle.jdbc.pool.OracleDataSource"
                  factory="oracle.jdbc.pool.OracleDataSourceFactory"
                  url="jdbc:oracle:thin:@localhost:1521:database01"
                  driverClassName="oracle.jdbc.OracleDriver"
                  userName="scott"
                  password="tiger"
                  auth="Container"
                  maxActive="100"
                  maxIdle="30"
                  maxWait="10000"
                  logAbandoned="true"
                  removeAbandoned="true"
                  removeAbandonedTimeout="60" />
    </Context>The web.xml of my web application
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <resource-ref>
            <description>Oracle Database 11g DataSource</description>
            <res-type>oracle.jdbc.pool.OracleDataSource</res-type>
            <res-auth>Container</res-auth>
            <res-ref-name>jdbc/oracle11g</res-ref-name>
        </resource-ref>
        <servlet>
            <servlet-name>Servlet1</servlet-name>
            <servlet-class>servlets.Servlet1</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>Servlet1</servlet-name>
            <url-pattern>/Servlet1</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
    </web-app>Ok, now I'm happy as the original problem is completely solved
    Regards

  • My problem in using weblogic Datasource and proxy user

    Hello
    I create a DataSource in Weblogic that connect to the database by a proxy user and I have a client application that use this DataSource and create a proxy session , I've written my client application (it's a stand alone client application) code below :
    public static void main(String [] args) {
    OracleConnection conn=null;
    javax.sql.DataSource ds=null;
    Hashtable env = new Hashtable();
    env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
    env.put(Context.PROVIDER_URL, "t3://127.0.0.1:7001");
    try{
    Context context=new InitialContext( env );
    ds=(javax.sql.DataSource) context.lookup ("OracleConnection2");
    conn=(OracleConnection) ds.getConnection();
    java.util.Properties prop = new java.util.Properties();
    prop.put(OracleConnection.PROXY_USER_NAME, "web_user1");
    prop.put(OracleConnection.PROXY_USER_PASSWORD,"web_user1");
    conn.openProxySession(OracleConnection.PROXYTYPE_USER_NAME, prop);
    if (conn.isClosed()){
    System.out.println("Connection closed");
    return;
    testJDBC(conn,true);
    for(int k=0;k<10;k++){
    testJDBC(conn,false);
    conn.close(OracleConnection.PROXY_SESSION);
    conn.close();
    }catch(Exception ex){
    ex.printStackTrace();
    It works but my problem is that in line "prop.put(OracleConnection.PROXY_USER_PASSWORD,"web_user1")" or line "prop.put(OracleConnection.PROXY_USER_NAME, "web_user1");"
    Let me to mention a scenario :
    *1- I type a wrong username or password in my client application and I run the client application it shows me this error : invalid username/password*
    *this error is acceptable*
    *2- then I correct the wrong username or password immediately and run the application again , it shows me this error (at line conn.openProxySession(OracleConnection.PROXYTYPE_USER_NAME, prop)) :*
    java.sql.SQLException: Closed Connection
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
         at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
         at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_1032_WLStub.openProxySession(Unknown Source)
         at weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_rmi_internal_ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_1032_WLStub.openProxySession(Unknown Source)
         at oracle.HRFacadeClient.main(HRFacadeClient.java:38)
    *3- I run the application again (by correct username and password) but this time it shows me this error :*
    java.sql.SQLException: Unsupported feature
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
         at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
         at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_1032_WLStub.openProxySession(Unknown Source)
         at weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_rmi_internal_ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_1032_WLStub.openProxySession(Unknown Source)
         at oracle.HRFacadeClient.main(HRFacadeClient.java:38)
    *4 - if I repeat running the application for multi times every time it shows me the previous error*
    *5- I wait about one minute the problem solved and my application can create proxy session *
    the result is that if I wanna create proxy session by wrong username or password and I get "Invalid username/password" error message , then after correcting username or password I have to wait about one minute and then run the application again_
    Do you know how I can overcome this problem ?
    Thank you

    Hi Jamshid,
    There is same problem observed few days back with us, and we have used the below code, and it got solved. Actually there is a problem observed while using proxy connections on weblogic.
    if(conn instanceof weblogic.jdbc.extensions.WLConnection){
         weblogic.jdbc.extensions.WLConnection cn=(weblogic.jdbc.extensions.WLConnection)conn;
         cn.clearStatementCache();
    http://rocksolutions.wordpress.com/2010/06/04/connection-pool-issue-on-weblogic/
    Hope this helps.
    Thanks

  • Message driven beans and object binding

              I want to write a message driven bean, and use javax.naming.Context's "bind(String,
              Object)" method to bind the data to a key and eventually do a unbind(String) to
              look up the data . Is binding/unbinding of object is allowed inside a message
              driven bean or this violates the EJB2.0 spec? Also, does this have any negative
              consequences if I use a Weblogic cluster as opposed to a single instance? Any
              suggestions
              

    Hi Austin,
              - I don't know if it is "legal" in EJB 2.0
              to call bind/unbind within an MDB. I
              would assume so, but I'm not sure. You can try confirming with
              the jndi and ejb newsgroups. Of course, if you don't
              ask, then no one can tell you "no". ;-)
              - Bind/unbind is a relatively expensive call performance-wise. I
              suspect one might want to avoid doing too many of these per
              second (the jndi newsgroup may be able to give pointers here.)
              - Servers in a cluster do not instantly propagate bind/unbind info
              to other servers in cluster, and JNDI may have trouble
              efficiently supporting larger objects: both potential drawbacks
              to using JNDI for data caching purposes.
              Tom, BEA
              Austin P wrote:
              > I want to write a message driven bean, and use javax.naming.Context's "bind(String,
              > Object)" method to bind the data to a key and eventually do a unbind(String) to
              > look up the data . Is binding/unbinding of object is allowed inside a message
              > driven bean or this violates the EJB2.0 spec? Also, does this have any negative
              > consequences if I use a Weblogic cluster as opposed to a single instance? Any
              > suggestions
              

  • Probmel with Local EJB JNDI Binding

    Hi friends,
    I am using jboss server. I need to deployee one session bean and one entity bean. and I have done it. but it show me jndi binding like this
    [BaseLocalProxyFactory] Bound EJB LocalHome 'BookBean' to jndi 'local/BookBean@18722656'
    [BaseLocalProxyFactory] Bound EJB LocalHome 'BookFacadeBean' to jndi 'local/BookFacadeBean@9668715'
    but it should be bind jndi bninding like this
    [BaseLocalProxyFactory] Bound EJB LocalHome 'BookBean' to jndi 'BookBean'
    [BaseLocalProxyFactory] Bound EJB LocalHome 'BookFacadeBean' to jndi 'BookFacadeBean'
    I don't understand where I am comminting mistake. I am giving ejb-jar.xml mapping below.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
         <description>BookEJB</description>
         <display-name>BookEJB</display-name>
         <enterprise-beans>
              <session>
                   <display-name>BookFacade</display-name>
                   <ejb-name>BookFacadeBean</ejb-name>
                   <local-home>com.ejb.book.service.BookFacadeHome</local-home>
                   <local>com.ejb.book.service.BookFacadeLocal</local>
                   <ejb-class>com.ejb.book.service.BookFacadeBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
              </session>
              <entity>
                   <description>EntityBean</description>
                   <display-name>BookEntity</display-name>
                   <ejb-name>BookBean</ejb-name>
                   <local-home>com.ejb.book.persistence.BookLocalHome</local-home>
                   <local>com.ejb.book.persistence.BookLocal</local>
                   <ejb-class>com.ejb.book.persistence.BookLocalBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <abstract-schema-name>book</abstract-schema-name>
                   <cmp-field>
                        <field-name>bookID</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>bookName</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>bookAuthor</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>bookVersion</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>bookPrice</field-name>
                   </cmp-field>
                   <primkey-field>bookID</primkey-field>
                   <query>
                        <description>Query By All</description>
                             <query-method>
                                  <method-name>findAll</method-name>
                                  <method-params></method-params>
                             </query-method>
                             <ejb-ql>SELECT OBJECT(u) FROM book AS u </ejb-ql>
                   </query>
                   <query>
                        <description>Query for findByBookName</description>
                        <query-method>
                             <method-name>findByPrimaryKey</method-name>
                                  <method-params>
                                       <method-param>java.lang.Integer</method-param>
                                  </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(u) FROM book AS u WHERE u.bookID=?1</ejb-ql>
              </query>
                   <query>
                        <description>Query for findByBookName</description>
                        <query-method>
                             <method-name>findByBookName</method-name>
                                  <method-params>
                                       <method-param>java.lang.String</method-param>
                                  </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(u) FROM book AS u WHERE u.bookName=?1</ejb-ql>
              </query>
              <query>
                        <description>Query for findByBookAuthor</description>
                        <query-method>
                             <method-name>findByBookAuthor</method-name>
                             <method-params>
                                  <method-param>java.lang.String</method-param>
                             </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(u) FROM book AS u WHERE u.bookAuthor=?1</ejb-ql>
              </query>
              <query>
                   <description>Query for findByBookVersion</description>
                   <query-method>
                        <method-name>findByBookVersion</method-name>
                        <method-params>
                             <method-param>java.lang.String</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>SELECT OBJECT(u) FROM book AS u     WHERE u.bookVersion=?1</ejb-ql>
              </query>
              <query>
                   <description>Query for findByBookPrice</description>
                   <query-method>
                        <method-name>findByBookPrice</method-name>
                        <method-params>
                             <method-param>java.lang.Float</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>SELECT OBJECT(u) FROM book AS u WHERE u.bookPrice=?1</ejb-ql>
              </query>
              </entity>
         </enterprise-beans>
         <assembly-descriptor>
              <container-transaction>
                   <method>
                        <ejb-name>BookBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
              <container-transaction>
                   <method>
                        <ejb-name>BookFacadeBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
         </assembly-descriptor>
    </ejb-jar>
    I appreciate if you reply me on [email protected].
    Thanks in advance.
    TumoDav (UmaShankar)

    Hi friend,
    Thanks for replying me. But , I am unable to call this EJB by simple EJBClient (simple java file) when I am trying to call this ejb, then it show me this error :-
    javax.naming.NameNotFoundException: BookFacadeBean not bound
         at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
         at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
         at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
         at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
         at sun.rmi.transport.Transport$1.run(Transport.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:595)
         at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
         at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
         at sun.rmi.server.UnicastRef.invoke(Unknown Source)
         at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at EJBClient.EJBClient.BookEJBClient(EJBClient.java:45)
         at EJBClient.EJBClient.main(EJBClient.java:30)
    Here I am giving my ejb client.
    package EJBClient;
    import java.util.Iterator;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import com.ejb.book.service.BookFacadeBean;
    import com.ejb.book.service.BookFacadeHome;
    import com.ejb.book.service.BookFacadeLocal;
    import com.ejb.book.vo.BookVo;
    * @author UmaShankar
    public class EJBClient {
         * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              BookEJBClient();
         public static void BookEJBClient(){
              String providerURL = "jnp://localhost:1099";
              String factoryName = "org.jnp.interfaces.NamingContextFactory"; //org.jnp.interfaces.NamingContextFactory
              String factoryPkgs = "org.jboss.naming:org.jnp.interfaces";
              Properties prop = System.getProperties();
              prop.put("Context.PROVIDER_URL", providerURL);
              prop.put("java.naming.provider.url", providerURL);
              prop.put("java.naming.factory.initial", factoryName);
              prop.put("java.naming.factory.url.pkgs", factoryPkgs);
              try{
                   Context ctx = new InitialContext(prop);
                   Object obj = ctx.lookup("BookFacadeBean");
                   BookFacadeHome home = (BookFacadeHome)PortableRemoteObject.narrow(obj, BookFacadeHome.class);
                   BookFacadeLocal local = home.create();
                   //java.util.Hashtable allD = local.getBookName();
                   System.out.println("-------------Start-------------------");
                   System.out.println("BookName:-"+local.getBookName());
                   System.out.println("BookAuthor:-"+local.getBookAuthor());
                   if(allD.isEmpty()){
                        System.out.println("There is no record. Empty Hash");
                   java.util.Set set = allD.keySet();
                   for(Iterator it = set.iterator();it.hasNext();System.out.println("-----------------------------")){
                        Integer key = (Integer)it.next();
                        BookVo vo = (BookVo)allD.get(key);
                        System.out.println(vo.getBookId());
                        System.out.println(vo.getBookName());
                        System.out.println(vo.getBookAuthor());
                        System.out.println(vo.getBookVersion());
                        System.out.println(vo.getBookPrive());
              }catch(Exception e){
                   e.printStackTrace();
    }

  • Intro ADF Faces Tutorial Issue:  ADF Table Component and ADF Binding

    Hello, friends! I've hit a snag with ADF Faces Tutorial: ADF Table Component and ADF Binding: Step 7
    http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm#t11
    It was suggested by Steve Muench that I most likely have a syntax error and that I should post my problem here. I want to you thank you in advance for you help!
    When I execute the Run command on the main.jspx page, the page completes its load with the "fetching" message hanging over the table component. I get two sets of messages in my OC4J log that I cannot easily decipher, being a JDev/OC4J newbie.
    First, the OC4J startup messages:
    <blockquote>
    [Starting Embedded OC4J Server using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    C:\Documents and Settings\david ctr wilson-bur\My Documents\My Projects\JDev Projects\system11.1.1.0.22.47.96\o.j2ee\embedded-oc4j\config>
    C:\jdev11g\jdk\bin\javaw.exe -client -classpath C:\jdev11g\j2ee\home\oc4j.jar;C:\jdev11g\jdev\lib\jdev-oc4j-embedded.jar -Xverify:none -XX:MaxPermSize=512m -Ddisable.checkForUpdate=true -Doracle.application.environment=development -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false "-Djava.security.policy=C:\Documents and Settings\david ctr wilson-bur\My Documents\My Projects\JDev Projects\system11.1.1.0.22.47.96\o.j2ee\embedded-oc4j\config\java2.policy" oracle.oc4j.loader.boot.BootStrap -config "C:\Documents and Settings\david ctr wilson-bur\My Documents\My Projects\JDev Projects\system11.1.1.0.22.47.96\o.j2ee\embedded-oc4j\config\server.xml"
    [waiting for the server to complete its initialization...]
    Feb 21, 2008 9:10:20 AM oracle.j2ee.xml.XMLMessages warningException
    WARNING: Exception Encountered
    Feb 21, 2008 9:10:21 AM oracle.security.jps.fmw.util.JpsFmwUtil findSystemUser
    WARNING: findSystemUser: System user is not available from Credential Store.
    08/02/21 09:10:28 WARNING: ApplicationServer.enableOC4JDocumentChangeNotifier Alternate DocumentChangeNotifier in use!
    08/02/21 09:10:28 JMS server will listen on port 9227.
    08/02/21 09:10:29 oracle.j2ee.jms.oc4j.JMSServer startup complete
    Feb 21, 2008 9:10:29 AM oracle.security.jps.fmw.util.JpsFmwUtil findSystemUser
    WARNING: findSystemUser: System user is not available from Credential Store.
    Feb 21, 2008 9:10:30 AM oracle.security.jps.fmw.util.JpsFmwUtil findSystemUser
    WARNING: findSystemUser: System user is not available from Credential Store.
    Feb 21, 2008 9:10:35 AM oracle.security.jps.fmw.util.JpsFmwUtil findSystemUser
    WARNING: findSystemUser: System user is not available from Credential Store.
    Feb 21, 2008 9:10:36 AM oracle.security.jps.fmw.util.JpsFmwUtil findSystemUser
    WARNING: findSystemUser: System user is not available from Credential Store.
    Feb 21, 2008 9:10:36 AM oracle.security.jps.fmw.util.JpsFmwUtil findSystemUser
    WARNING: findSystemUser: System user is not available from Credential Store.
    Feb 21, 2008 9:10:36 AM oracle.security.jps.fmw.util.JpsFmwUtil findSystemUser
    WARNING: findSystemUser: System user is not available from Credential Store.
    Feb 21, 2008 9:10:36 AM oracle.j2ee.util.AnnotatedLogger logWithThrowable
    WARNING: J2EE JNDI-00002
    Feb 21, 2008 9:10:36 AM oracle.j2ee.util.AnnotatedLogger log
    WARNING: No javax.jms.ConnectionFactory found at null
    Feb 21, 2008 9:10:36 AM oracle.security.jps.fmw.util.JpsFmwUtil findSystemUser
    WARNING: findSystemUser: System user is not available from Credential Store.
    Feb 21, 2008 9:10:37 AM oracle.security.jps.fmw.util.JpsFmwUtil findSystemUser
    WARNING: findSystemUser: System user is not available from Credential Store.
    Feb 21, 2008 9:10:39 AM oracle.j2ee.jmsrouter.util.JmsRouterMessages logException
    WARNING: oracle.j2ee.jmsrouter.RouterException: JMS Destination, {0}, does not exist
    Ready message received from Oc4jNotifier.
    Embedded OC4J Server startup time: 35016 ms.
    </blockquote>
    Next, message for the Run command:
    <blockquote>
    Target URL -- http://127.0.0.1:8988/Tutorial-adffacesrc-context-root/faces/main.jspx
    Feb 21, 2008 9:10:55 AM com.evermind.server.http.HttpMessages warningHeaderModificationIsRejected
    WARNING: Header modification request was rejected. Because the setter method was called from included servlet. It is restricted by SRV.8.3 of Servlet Specification 2.4. : current-workspace-app
    Feb 21, 2008 9:10:55 AM ComponentMetadataHandler _error
    WARNING: Error parsing component tag in file: /Tutorial-adffacesrc-context-root/simple.jspx/tag:xmlContent/id:null
    org.xml.sax.SAXParseException: <Line 3, Column 44>: XML-20100: (Fatal Error) Expected 'EOF'.
         at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:422)
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:287)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:316)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:212)
         at oracle.xml.jaxp.JXSAXParser.parse(JXSAXParser.java:292)
         at oracle.adfinternal.view.faces.taglib.region.ComponentMetadataHandler._parseContent(ComponentMetadataHandler.java:276)
         at oracle.adfinternal.view.faces.taglib.region.ComponentMetadataHandler.handleContent(ComponentMetadataHandler.java:164)
         at oracle.adfinternal.view.faces.taglib.region.XmlContentTag.doEndTag(XmlContentTag.java:83)
         at simplejspx._ctru6_helper_3(_simple_jspx.java:375)
         at simplejspx._ctru0_helper_1(_simple_jspx.java:105)
         at simplejspx._jspService(_simple_jspx.java:59)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:60)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:488)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:706)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:627)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter$3.run(JAZNFilter.java:434)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:308)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:452)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:585)
         at com.evermind.server.http.ServletRequestDispatcher.unprivileged_include(ServletRequestDispatcher.java:131)
         at com.evermind.server.http.ServletRequestDispatcher.access$000(ServletRequestDispatcher.java:37)
         at com.evermind.server.http.ServletRequestDispatcher$1.oc4jRun(ServletRequestDispatcher.java:80)
         at oracle.oc4j.security.OC4JPrivilegedAction.run(OC4JPrivilegedAction.java:41)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.oc4j.security.OC4JSecurity.internalDoPrivileged(OC4JSecurity.java:374)
         at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:389)
         at com.evermind.server.http.OC4JRequestDispatcher.executeAction(OC4JRequestDispatcher.java:161)
         at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:84)
         at com.evermind.server.http.EvermindPageContext.include(EvermindPageContext.java:486)
         at oracle.adfinternal.view.faces.taglib.region.ComponentRefTag.__include(ComponentRefTag.java:367)
         at oracle.adfinternal.view.faces.taglib.region.ComponentRefTag.doEndTag(ComponentRefTag.java:209)
         at oracle.adfinternal.view.faces.taglib.region.PageTemplateTag.doEndTag(PageTemplateTag.java:75)
         at mainjspx._ctru4_helper_5(_main_jspx.java:367)
         at mainjspx._ctru3_helper_4(_main_jspx.java:307)
         at mainjspx._ctru1_helper_2(_main_jspx.java:232)
         at mainjspx._ctru0_helper_1(_main_jspx.java:173)
         at mainjspx._jspService(_main_jspx.java:105)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:60)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:488)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:706)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:627)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter$3.run(JAZNFilter.java:434)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:308)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:452)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:585)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:334)
         at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:251)
         at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:168)
         at oracle.oc4j.security.OC4JPrivilegedAction.run(OC4JPrivilegedAction.java:41)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.oc4j.security.OC4JSecurity.internalDoPrivileged(OC4JSecurity.java:374)
         at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:389)
         at com.evermind.server.http.OC4JRequestDispatcher.executeAction(OC4JRequestDispatcher.java:161)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:172)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:267)
         at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:178)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:633)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:244)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:204)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adfinternal.view.faces.webapp.rich.SharedLibraryFilter.doFilter(SharedLibraryFilter.java:135)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:69)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
         at oracle.adfinternal.view.faces.activedata.ADSFilter.doFilter(ADSFilter.java:74)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:241)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:198)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:141)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
         at oracle.security.jazn.oc4j.JAZNFilter$3.run(JAZNFilter.java:434)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:308)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:452)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:583)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:334)
         at com.evermind.server.http.HttpRequestHandler.doDispatchRequest(HttpRequestHandler.java:942)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:843)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:646)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:614)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:405)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:168)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:149)
         at oracle.oc4j.network.ServerSocketReadHandler$ClientRunnable.run(ServerSocketReadHandler.java:275)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
         at java.lang.Thread.run(Thread.java:595)
    </blockquote>
    Please let me know if I need to provide any other relevant information.
    Thanks!
    David

    Dear All,
    I am fairly new to ADF development too. While following the Tutorial, I selected the "simple" page template. and check the "Create as XML Document (*.jspx). then click "OK", I got a similar SAXParseException exception, however the main.jspx seemed showed up correctly in the "Design" window. Any idea? Thanks a lot.
    Dachywan
    Customizations are disabled for the node "/C:/OTN/JDev11pv3/adfp/lib/oracle.extapp.view.jar!/WEB-INF/adfc-config.xml" because it is not part of the project contentset.
    Mar 10, 2008 5:41:50 PM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Initializing JavaServer Faces implementation (1_2_04-p02) for context ''
    Mar 10, 2008 5:41:51 PM com.sun.faces.spi.InjectionProviderFactory createInstance
    WARNING: JSF1033: Resource injection is DISABLED.
    Customizations are disabled for the node "/C:/OTN/JDev11pv3/adfp/lib/oracle.extapp.view.jar!/WEB-INF/adfc-config.xml" because it is not part of the project contentset.
    Mar 10, 2008 5:41:54 PM ComponentMetadataHandler _error
    WARNING: Error parsing component tag in file: null/tag:xmlContent/id:dte_171098d
    org.xml.sax.SAXParseException: <Line 9, Column 7>: XML-20100: (Fatal Error) Expected 'EOF'.
         at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:422)
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:287)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:316)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:212)
         at oracle.xml.jaxp.JXSAXParser.parse(JXSAXParser.java:292)
         at oracle.adfinternal.view.faces.taglib.region.ComponentMetadataHandler._parseContent(ComponentMetadataHandler.java:276)
         at oracle.adfinternal.view.faces.taglib.region.ComponentMetadataHandler.handleContent(ComponentMetadataHandler.java:164)
         at oracle.adfinternal.view.faces.taglib.region.XmlContentTag.doEndTag(XmlContentTag.java:83)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer._doEndTag(DesignTimeJspActionRenderer.java:1604)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.doEndTag(DesignTimeJspActionRenderer.java:1718)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeTag(DesignTimeJspActionRenderer.java:2432)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeNodeTag(DesignTimeJspActionRenderer.java:2242)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.executeNodeTag(FacesActionRenderer.java:1971)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderImpl(DesignTimeJspActionRenderer.java:325)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.render(DesignTimeJspActionRenderer.java:203)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.render(FacesActionRenderer.java:175)
         at oracle.jdevimpl.webapp.design.DesignTimeRenderer.renderChild(DesignTimeRenderer.java:996)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderChild(DesignTimeJspActionRenderer.java:1403)
         at oracle.jdevimpl.webapp.design.DesignTimeRenderer.renderChildren(DesignTimeRenderer.java:974)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderChildrenImpl(DesignTimeJspActionRenderer.java:1363)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderChildren(DesignTimeJspActionRenderer.java:1268)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.renderChildren(FacesActionRenderer.java:897)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeInnerAction(DesignTimeJspActionRenderer.java:2578)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeTag(DesignTimeJspActionRenderer.java:2397)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeNodeTag(DesignTimeJspActionRenderer.java:2242)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.executeNodeTag(FacesActionRenderer.java:1971)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderImpl(DesignTimeJspActionRenderer.java:325)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.render(DesignTimeJspActionRenderer.java:203)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.render(FacesActionRenderer.java:175)
         at oracle.jdevimpl.webapp.design.DesignTimeRenderer.renderChild(DesignTimeRenderer.java:996)
         at oracle.jdevimpl.webapp.design.DesignTimeRenderer.renderChildren(DesignTimeRenderer.java:974)
         at oracle.jdevimpl.webapp.jsp.renderers.JSPCoreSyntaxRenderer.render(JSPCoreSyntaxRenderer.java:191)
         at oracle.jdevimpl.webapp.design.support.jsp.DesignTimeJspServlet._renderSource(DesignTimeJspServlet.java:238)
         at oracle.jdevimpl.webapp.design.support.jsp.DesignTimeJspServlet.serviceJsp(DesignTimeJspServlet.java:115)
         at oracle.jdevimpl.webapp.design.support.jsp.DesignTimeJspServlet.service(DesignTimeJspServlet.java:71)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at oracle.jdevimpl.webapp.design.support.http.DesignTimeServletInfo.service(DesignTimeServletInfo.java:251)
         at oracle.jdevimpl.webapp.design.support.http.DesignTimeRequestDispatcher.dispatch(DesignTimeRequestDispatcher.java:271)
         at oracle.jdevimpl.webapp.design.support.http.DesignTimeRequestDispatcher.include(DesignTimeRequestDispatcher.java:81)
         at oracle.jdevimpl.webapp.design.support.jsp.DesignTimePageContext.include(DesignTimePageContext.java:465)
         at oracle.adfinternal.view.faces.taglib.region.ComponentRefTag.__include(ComponentRefTag.java:367)
         at oracle.adfinternal.view.faces.taglib.region.ComponentRefTag.doEndTag(ComponentRefTag.java:209)
         at oracle.adfinternal.view.faces.taglib.region.PageTemplateTag.doEndTag(PageTemplateTag.java:75)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer._doEndTag(DesignTimeJspActionRenderer.java:1604)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.doEndTag(DesignTimeJspActionRenderer.java:1718)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeTag(DesignTimeJspActionRenderer.java:2432)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeNodeTag(DesignTimeJspActionRenderer.java:2242)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.executeNodeTag(FacesActionRenderer.java:1971)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderImpl(DesignTimeJspActionRenderer.java:325)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeInnerAction(DesignTimeJspActionRenderer.java:2572)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeTag(DesignTimeJspActionRenderer.java:2397)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeNodeTag(DesignTimeJspActionRenderer.java:2242)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.executeNodeTag(FacesActionRenderer.java:1971)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderParentElements(DesignTimeJspActionRenderer.java:967)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.renderCustomParentNode(FacesActionRenderer.java:1911)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.renderAsInclude(FacesActionRenderer.java:1778)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderInclude(DesignTimeJspActionRenderer.java:1933)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderImpl(DesignTimeJspActionRenderer.java:233)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.render(DesignTimeJspActionRenderer.java:203)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.render(FacesActionRenderer.java:175)
         at oracle.jdevimpl.webapp.design.DesignTimeRenderer.renderChild(DesignTimeRenderer.java:996)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderChild(DesignTimeJspActionRenderer.java:1403)
         at oracle.jdevimpl.webapp.design.DesignTimeRenderer.renderChildren(DesignTimeRenderer.java:974)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderChildrenImpl(DesignTimeJspActionRenderer.java:1363)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderChildren(DesignTimeJspActionRenderer.java:1268)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.renderChildren(FacesActionRenderer.java:897)
         at oracle.adfdtinternal.view.rich.renderer.ADFFacesActionRenderer.renderChildren(ADFFacesActionRenderer.java:100)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeInnerAction(DesignTimeJspActionRenderer.java:2578)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeTag(DesignTimeJspActionRenderer.java:2397)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeNodeTag(DesignTimeJspActionRenderer.java:2242)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.executeNodeTag(FacesActionRenderer.java:1971)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderImpl(DesignTimeJspActionRenderer.java:325)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.render(DesignTimeJspActionRenderer.java:203)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.render(FacesActionRenderer.java:175)
         at oracle.jdevimpl.webapp.design.DesignTimeRenderer.renderChild(DesignTimeRenderer.java:996)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderChild(DesignTimeJspActionRenderer.java:1403)
         at oracle.jdevimpl.webapp.design.DesignTimeRenderer.renderChildren(DesignTimeRenderer.java:974)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderChildrenImpl(DesignTimeJspActionRenderer.java:1363)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderChildren(DesignTimeJspActionRenderer.java:1268)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.renderChildren(FacesActionRenderer.java:897)
         at oracle.adfdtinternal.view.rich.renderer.ADFFacesActionRenderer.renderChildren(ADFFacesActionRenderer.java:100)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeInnerAction(DesignTimeJspActionRenderer.java:2578)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeTag(DesignTimeJspActionRenderer.java:2397)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeNodeTag(DesignTimeJspActionRenderer.java:2242)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.executeNodeTag(FacesActionRenderer.java:1971)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderImpl(DesignTimeJspActionRenderer.java:325)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.render(DesignTimeJspActionRenderer.java:203)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.render(FacesActionRenderer.java:175)
         at oracle.jdevimpl.webapp.design.DesignTimeRenderer.renderChild(DesignTimeRenderer.java:996)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderChild(DesignTimeJspActionRenderer.java:1403)
         at oracle.jdevimpl.webapp.design.DesignTimeRenderer.renderChildren(DesignTimeRenderer.java:974)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderChildrenImpl(DesignTimeJspActionRenderer.java:1363)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderChildren(DesignTimeJspActionRenderer.java:1268)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.renderChildren(FacesActionRenderer.java:897)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeInnerAction(DesignTimeJspActionRenderer.java:2578)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeTag(DesignTimeJspActionRenderer.java:2397)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.executeNodeTag(DesignTimeJspActionRenderer.java:2242)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.executeNodeTag(FacesActionRenderer.java:1971)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.renderImpl(DesignTimeJspActionRenderer.java:325)
         at oracle.jdevimpl.webapp.design.renderer.DesignTimeJspActionRenderer.render(DesignTimeJspActionRenderer.java:203)
         at oracle.jdevimpl.webapp.design.renderer.FacesActionRenderer.render(FacesActionRenderer.java:175)
         at oracle.jdevimpl.webapp.design.DesignTimeRenderer.renderChild(DesignTimeRenderer.java:996)
         at oracle.jdevimpl.webapp.design.DesignTimeRenderer.renderChildren(DesignTimeRenderer.java:974)
         at oracle.jdevimpl.webapp.jsp.renderers.JSPCoreSyntaxRenderer.render(JSPCoreSyntaxRenderer.java:191)
         at oracle.jdevimpl.webapp.design.support.jsp.DesignTimeJspServlet._renderSource(DesignTimeJspServlet.java:238)
         at oracle.jdevimpl.webapp.design.support.jsp.DesignTimeJspServlet.serviceJsp(DesignTimeJspServlet.java:115)
         at oracle.jdevimpl.webapp.design.support.jsp.DesignTimeJspServlet.service(DesignTimeJspServlet.java:71)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at oracle.jdevimpl.webapp.design.support.http.DesignTimeServletInfo.service(DesignTimeServletInfo.java:251)
         at oracle.jdevimpl.webapp.design.support.http.DesignTimeRequestDispatcher.dispatch(DesignTimeRequestDispatcher.java:271)
         at oracle.jdevimpl.webapp.design.support.http.DesignTimeRequestDispatcher.forward(DesignTimeRequestDispatcher.java:75)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:267)
         at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:178)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:633)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:244)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:204)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
         at oracle.jdevimpl.webapp.design.support.http.DesignTimeServletInfo.service(DesignTimeServletInfo.java:251)
         at oracle.jdevimpl.webapp.design.support.http.DesignTimeRequestDispatcher$DesignTimeFilterChain.doFilter(DesignTimeRequestDispatcher.java:519)
         at oracle.adfinternal.view.faces.webapp.rich.SharedLibraryFilter.doFilter(SharedLibraryFilter.java:135)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:69)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
         at oracle.adfinternal.view.faces.activedata.ADSFilter.doFilter(ADSFilter.java:74)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:241)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:198)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:141)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at oracle.jdevimpl.webapp.design.support.http.DesignTimeFilterInfo.doFilter(DesignTimeFilterInfo.java:346)
         at oracle.jdevimpl.webapp.design.support.http.DesignTimeRequestDispatcher$DesignTimeFilterChain.doFilter(DesignTimeRequestDispatcher.java:481)
         at oracle.jdevimpl.webapp.design.support.http.DesignTimeRequestDispatcher.dispatch(DesignTimeRequestDispatcher.java:267)
         at oracle.jdevimpl.webapp.design.support.http.DesignTimeServletContainerContext._service(DesignTimeServletContainerContext.java:861)
         at oracle.jdevimpl.webapp.design.support.http.DesignTimeServletContainerContext._serviceRequest(DesignTimeServletContainerContext.java:832)
         at oracle.jdevimpl.webapp.design.support.http.DesignTimeServletContainerContext.service(DesignTimeServletContainerContext.java:792)
         at oracle.jdevimpl.webapp.design.DesignTimeRenderWebApp.service(DesignTimeRenderWebApp.java:42)
         at oracle.jdevimpl.webapp.design.DesignTimeEngine.service(DesignTimeEngine.java:200)
         at oracle.jdevimpl.webapp.design.view.DomDesignTimeViewDocument._serviceJsp(DomDesignTimeViewDocument.java:1081)
         at oracle.jdevimpl.webapp.design.view.DomDesignTimeViewDocument.rebuildTreeImpl(DomDesignTimeViewDocument.java:217)
         at oracle.jdevimpl.webapp.design.view.DomDesignTimeViewDocument.rebuildImpl(DomDesignTimeViewDocument.java:125)
         at oracle.jdevimpl.webapp.model.content.dom.view.proxy.DomProxyViewDocument.rebuild(DomProxyViewDocument.java:140)
         at oracle.jdevimpl.webapp.model.content.dom.view.proxy.DomProxyViewDocument.handleActivated(DomProxyViewDocument.java:402)
         at oracle.jdevimpl.webapp.design.view.DomDesignTimeViewDocument.handleActivated(DomDesignTimeViewDocument.java:93)
         at oracle.jdevimpl.webapp.model.content.dom.view.proxy.DomProxyViewDocument.activate(DomProxyViewDocument.java:391)
         at oracle.jdevimpl.webapp.editor.XmlGuiEditor._activateViewDocument(XmlGuiEditor.java:389)
         at oracle.jdevimpl.webapp.editor.XmlGuiEditor.handleEnabled(XmlGuiEditor.java:368)
         at oracle.jdevimpl.webapp.editor.XmlGuiEditor.setEnabled(XmlGuiEditor.java:351)
         at oracle.jdevimpl.webapp.editor.XmlGuiEditor.setEnabled(XmlGuiEditor.java:333)
         at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.enable(AbstractWebAppEditor.java:551)
         at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor._enableIfNecessary(AbstractWebAppEditor.java:649)
         at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.mav$_enableIfNecessary(AbstractWebAppEditor.java:80)
         at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor$2.run(AbstractWebAppEditor.java:636)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

  • Datasource via JNDI vs Driver Manager

    I am really desperate to use Datasource for connectivity to Oracle (rather than using the driver manager) in my little J2EE app (no EJB) on IBM WSAD 5.0.
    I have some example using DB2 datasource via JNDI.
    I replaced the properties with my Oracle database parameters.
    as below
    userid=scott
    password=tiger
    url=jdbc:oracle:thin:@localhost:1521:library
    driver=oracle.jdbc.OracleDriver
    lookupName=jdbc/library
    database=library
    There is an object "DB2DataSource" coming from package COM.ibm.db2.jdbc.DB2DataSource in the example code "CreateDatasource.java" I am using to create the data source.
    I have added JNDI.jar(from oracle), Naming.jar(from WSAD home), nasmingClient.jar(from WSAD home) in to the project.
    By looking at Oracle manual we need import com.evermind.sql.DriverManagerDataSource; and
    com.evermind.server to get initialContext.
    But compiler cant find them.
    Can anyone tell me what is the equivalent in Oracle?
    Thanks
    Mei

    Hold on.
    This is what I think. There will be others here who might be able to build to this and provide you the solution.
    All that you need to do is
    1. Add the Oracle driver to the WebSphere classpath.
    2. Use the Admin Console / WSAD screens to create a JDBC Driver for the Oracle Driver.
    3. Create a datasource within this driver. There is step-by-step documentation on how to do this.
    4. Specify a JNDI name for the datasource.
    5. Lookup the DataSource and cast it to a DataSource object.
    6. Call getConnection method to get a connection.
    Your coding portion is only steps 5 and 6 above.
    Steps 1 through 4 needs to happen in the Admin Console / WSAD tool. I have done it in both the places before and it is a fairly straightforward process. You do not need any of the jars that you are mentioning below or need to do anything special.
    Vijay

  • Problem in datasource and connection factory.

    I am using a connection factory to make connections to the database.
    First I create a connection pool then i created a datasource and finally i used the JNDI Location name which i used inside the BPEL to create a connection factory.
    Does this activity requires a restart of server. I am getting the following error.
    file:/software/product/10.1.3.3.0/bpel/domains/default/tmp/.bpel_IRobo_Workflow1_1.0_e580208857197172fe72bbfca5d9d8b6.tmp/fr_jumper_info.wsdl [ fr_jumper_info_ptt::fr_jumper_info(InputParameters) ] - WSIF JCA Execute of operation 'fr_jumper_info' failed due to: Could not create/access the TopLink Session.
    This session is used to connect to the datastore. [Caused by: VDMT_IROBO_DATASOURCE not found]
    ; nested exception is:
         ORABPEL-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the datastore. [Caused by: VDMT_IROBO_DATASOURCE not found]
    See root exception for the specific exception. You may need to configure the connection settings in the deployment descriptor (i.e. $J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml) and restart the server. Caused by Exception [TOPLINK-7060] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.ValidationException
    Exception Description: Cannot acquire data source [VDMT_IROBO_DATASOURCE].
    Internal Exception: javax.naming.NameNotFoundException: VDMT_IROBO_DATASOURCE not found.
    </summary>
    </part>
    -<part name="detail">
    <detail>
    Exception Description: Cannot acquire data source [VDMT_IROBO_DATASOURCE].
    Internal Exception: javax.naming.NameNotFoundException: VDMT_IROBO_DATASOURCE not found
    </detailException Description: Cannot acquire data source [VDMT_IROBO_DATASOURCE].
    Internal Exception: javax.naming.NameNotFoundException: VDMT_IROBO_DATASOURCE not found
    </detail

    Hi James
    I have created the data source and i can find it in the path C:\product\10.1.3.1\OracleAS_1\j2ee\home\config\data-sources.xml
    <managed-data-source connection-pool-name="IRoboConnectionPool" jndi-name="jdbc/VDMT_IROBO_DATASOURCE" name="VDMT_IROBO_DATASOURCE"/>
    And in C:\product\10.1.3.1\OracleAS_1\j2ee\home\application-deployments\default\DbAdapter\oc4j-ra.xml i can see
         <connector-factory location="eis/DB/VDMT_IROBO" connector-name="Database Adapter">
              <config-property name="xADataSourceName" value="jdbc/VDMT_IROBO_DATASOURCE"/>
              <config-property name="dataSourceName" value="VDMT_IROBO_DATASOURCE"/>
              <config-property name="platformClassName" value="oracle.toplink.platform.database.Oracle9Platform"/>
              <config-property name="usesNativeSequencing" value="true"/>
              <config-property name="sequencePreallocationSize" value="50"/>
              <config-property name="defaultNChar" value="false"/>
              <config-property name="usesBatchWriting" value="true"/>
              <connection-pooling use="none">
              </connection-pooling>
              <security-config use="none">
              </security-config>
         </connector-factory>
    You have said I have given the name for dataSourceName incorrectly , what value should we give I dont know that I thought it is a user defined value.

  • Difference between Datasource and Connection Pool

    Hi,
    What is the major difference between Datasource and Connection Pool.
    Both the Datasource with JNDI and Connectio Pool will serve the pool of connections. Then what is the difference.
    regards,
    Raj

    A datasource is not implicitly a connection pool. You can configure that in the datasource properties. A connection pool is also not implicitly a datasource. You can create your own connection pool using the java.sql interfaces. A datasource just gives the ability to acquire the connections and access the database through JNDI. A connection pool just gives the ability to reuse a set of connections which are created/closed/controlled by the connection pool logic.

  • Dynamic SQL and Bulk Bind... Interesting Problem !!!

    Hi Forum !!
    I've got a very interesting problem involving Dynamic SQL and Bulk Bind. I really Hope you guys have some suggestions for me...
    Table A contains a column named TX_FORMULA. There are many strings holding expressions like '.3 * 2 + 1.5' or '(3.4 + 2) / .3', all well formed numeric formulas. I want to calculate each formula, finding the number obtained as a result of each calculation.
    I wrote something like this:
    DECLARE
    TYPE T_FormulasNum IS TABLE OF A.TX_FORMULA%TYPE
    INDEX BY BINARY_INTEGER;
    TYPE T_MontoIndicador IS TABLE OF A.MT_NUMBER%TYPE
    INDEX BY BINARY_INTEGER;
    V_FormulasNum T_FormulasNum;
    V_MontoIndicador T_MontoIndicador;
    BEGIN
    SELECT DISTINCT CD_INDICADOR,
    TX_FORMULA_NUMERICA
    BULK COLLECT INTO V_CodIndicador, V_FormulasNum
    FROM A;
    FORALL i IN V_FormulasNum.FIRST..V_FormulasNum.LAST
    EXECUTE IMMEDIATE
    'BEGIN
    :1 := TO_NUMBER(:2);
    END;'
    USING V_FormulasNum(i) RETURNING INTO V_MontoIndicador;
    END;
    But I'm getting the following messages:
    ORA-06550: line 22, column 43:
    PLS-00597: expression 'V_MONTOINDICADOR' in the INTO list is of wrong type
    ORA-06550: line 18, column 5:
    PL/SQL: Statement ignored
    ORA-06550: line 18, column 5:
    PLS-00435: DML statement without BULK In-BIND cannot be used inside FORALL
    Any Idea to solve this problem ?
    Thanks in Advance !!

    Hallo,
    many many errors...
    1. You can use FORALL only in DML operators, in your case you must use simple FOR LOOP.
    2. You can use bind variables only in DML- Statements. In other statements you have to use literals (hard parsing).
    3. RETURNING INTO - Clause in appropriate , use instead of OUT variable.
    4. Remark: FOR I IN FIRST..LAST is not fully correct: if you haven't results, you get EXCEPTION NO_DATA_FOUND. Use Instead of 1..tab.count
    This code works.
    DECLARE
    TYPE T_FormulasNum IS TABLE OF VARCHAR2(255)
    INDEX BY BINARY_INTEGER;
    TYPE T_MontoIndicador IS TABLE OF NUMBER
    INDEX BY BINARY_INTEGER;
    V_FormulasNum T_FormulasNum;
    V_MontoIndicador T_MontoIndicador;
    BEGIN
    SELECT DISTINCT CD_INDICATOR,
    TX_FORMULA_NUMERICA
    BULK COLLECT INTO V_MontoIndicador, V_FormulasNum
    FROM A;
    FOR i IN 1..V_FormulasNum.count
    LOOP
    EXECUTE IMMEDIATE
    'BEGIN
    :v_motto := TO_NUMBER('||v_formulasnum(i)||');
    END;'
    USING OUT V_MontoIndicador(i);
    dbms_output.put_line(v_montoindicador(i));
    END LOOP;
    END;You have to read more about bulk- binding and dynamic sql.
    HTH
    Regards
    Dmytro
    Test table
    a
    (cd_indicator number,
    tx_formula_numerica VARCHAR2(255))
    CD_INDICATOR TX_FORMULA_NUMERICA
    2 (5+5)*2
    1 2*3*4
    Message was edited by:
    Dmytro Dekhtyaryuk

Maybe you are looking for

  • My Macbook Pro (Mid-2012) won't connect to an external display using my MiniDP to VGA Cable.

    I'm on a Macbook Pro (Mid-2012) on Mac OS X 10.8.3 (currently downloading the update to 8.4). When I plug in my Mini Displayport to VGA adapter to my Mac, the screen flickers blue for a second and the Display Settings window detects the other monitor

  • Ocal client on kubuntu linux

    The university I work for is using Ocal, I have the client working in windows, and had it installed fine and working in Gentoo, but in kubuntu I get these errors upon attempting to install. The referenced libs are all in place in /usr/lib Any suggest

  • Business Process Set up -  Begineer Questtion

    In our company we are planning to implement business process and monitoring in coming months. I am from the basis admin group and would like to know from the system side what need to be done to implement the Business process  in SLM. What my understa

  • Global Parameters in SEM

    I see where the User's optional parameters, like group, unit, version, fiscperiod, and fiscyear can be accessed in Table UCMP020. Where can the hard configured values, ie currency, cons chart of acct, dimension, and fiscal year variant be seen? Are t

  • Sending of mails to email accounts

    Hi Friends, Sending of mails to email accounts. Can it be consolidated like UWL? Currently, the supporting & approval process of the appraisal form is not done through the SAP workflow framework. But our clients would like to request whether there is