"Errored while looking up datasource: PWC4216: Name myDB is not bound in th

hi all,
am trying to deploy my web application (.war which has a servlet which connects to a db and fetches records and displays in jsp) file in SunOne web server V7 but i cant get past this error :
[29/Jun/2010:15:14:46] failure (24218): for host 146.171.59.144 trying to POST /BbaMigrationQueryTool/BBAMigrationQuery, service-j2ee reports: NamingExcep
tion caught: Errored while looking up datasource: PWC4216: Name myDB is not bound in this Context
my java code to lookup the jndi name :
   1.     //looks up a datasource 
   2.     private static synchronized DataSource getDataSource(String jndiName) throws NamingException { 
   3.  
   4.         DataSource dataSource = null; 
   5.  
   6.         try { 
   7.             Context c = new InitialContext(); 
   8.              Context envContext = (Context) c.lookup("java:comp/env"); 
   9.             Logger.getLogger(DBUtilities.class.getName()).log(Level.INFO, "Found sub context"); 
  10.               dataSource = (DataSource) envContext.lookup(jndiName); 
  11.  
  12.         } catch (NamingException e) { 
  13.             e.printStackTrace(); 
  14.             throw new NamingException("Errored while looking up datasource: " + e.getMessage()); 
  15.         } 
  16.  
  17.         return dataSource; 
  18.     } 
  i call the above method with "jdbc/myDB" and have created a JDBC recourse within the SunOne web server via the admin console.
my web.xml i have an entry for the resource as follows :
   1.             <resource-ref> 
   2.         <res-ref-name>jdbc/myDB</res-ref-name> 
   3.         <res-type>javax.sql.DataSource</res-type> 
   4.         <res-auth>Container</res-auth> 
   5.         <res-sharing-scope>Shareable</res-sharing-scope> 
   6.     </resource-ref> 
in my sun-web.xml i have an entry as follows :
   1.     <resource-ref> 
   2.         <res-ref-name>jdbc/myDB</res-ref-name> 
   3.         <jndi-name>jdbc/myDB</jndi-name> 
   4.     </resource-ref> 
server.xml has this entry in it :
   1.   <jdbc-resource> 
   2.     <jndi-name>jdbc/myDB</jndi-name> 
   3.     <datasource-class>oracle.jdbc.pool.OracleDataSource</datasource-class> 
   4.     <property> 
   5.       <name>password</name> 
   6.       <value>76765</value> 
   7.     </property> 
   8.     <property> 
   9.       <name>user</name> 
  10.       <value>56756</value> 
  11.     </property> 
  12.     <property> 
  13.       <name>url</name> 
  14.       <value>jdbc:oracle:thin:@serveretc etc</value> 
  15.     </property> 
  16.     <description/> 
  17.   </jdbc-resource>
  what could be wrong ??
thanks in advance.
Edited by: cesarNZ on Jun 29, 2010 7:58 PM
Edited by: cesarNZ on Jun 29, 2010 8:00 PM

try to not split the attributes in server.xml
use them like
<Context path="/myPath" docBase="myDocBase" debug="5" reloadable="true" crossContext="true" source="org.eclipse.jst.j2ee.server:myDocBase">
                      <Resource name="jdbc/myDB"
                                                 auth="Container"
                                                 type="javax.sql.DataSource"
                                                 maxActive="100"
                                                 maxIdle="30"
                                                 maxWait="10000"
                                                 username="$$$"
                                                 password="$$$"
                                                 driverClassName="com.mysql.jdbc.Driver"
                                                 url="jdbc:mysql://localhost/myTest" />
                 </Context>and i dont know why you define two resources
try to look at
http://forums.sun.com/thread.jspa?messageID=11013089&#11013089

Similar Messages

  • RMAN-06010: error while looking up datafile: 82

    Iam building dataguard - Physical Standby database by using the RMAN duplicate command and we are not using the recovery catalog but control file.
    Iam getting the following error while running the duplicate command.
    set newname for datafile 82 to
    "/dflx02/flx/o01flx3rbs/rbs02_02.O01FLX3";
    RMAN-06010: error while looking up datafile: 82
    Actually we dropped the datafile(tablespace) before taken the backup but it is giving error though we are using the latest control file.
    I do not see this file is available in the database as we dropped it successfully.
    Could some one let me know what could be the problem and how to resolve it.
    Your early response is greatly appreciated.
    Note:
    backup script -- It went successfully.
    # Script to be used to backup the production in preparation of creating a DataGuard instance
    YYYY=`date +"%Y"`
    mmdd=`date +"%m%d"`
    hh=`date +"%H"`
    mm=`date +"%M"`
    ss=`date +"%S"`
    hhmmss=${hh}${mm}${ss}
    dt=${YYYY}${mmdd}_${hhmmss}
    echo "Starting backup on O01FLX3"
    $ORACLE_HOME/bin/rman nocatalog <<EOF >> /dflx02/flx/oracle/log/full_backup_run_$dt.log
    connect target /
    configure device type disk clear;
    configure channel device type disk maxpiecesize 4G;
    configure device type disk backup type to compressed backupset parallelism 8;
    run{
    change archivelog all validate;
    backup current controlfile for standby format '/tmp/stby_snapcf_O01FLX3.f';
    backup database format '/dflx02/flx/o01flx3dump/rman/O01FLX3_%s_%p_%T_%t.bak';
    sql 'alter system archive log current';
    backup archivelog all format '/dflx02/flx/o01flx3dump/rman/O01FLX3_%s_%p_%T_%t.arc';
    EXIT
    EOF
    duplicate Script:
    #!/bin/ksh
    # Script to create standby database for production.
    YYYY=`date +"%Y"`
    mmdd=`date +"%m%d"`
    hh=`date +"%H"`
    mm=`date +"%M"`
    ss=`date +"%S"`
    hhmmss=${hh}${mm}${ss}
    dt=${YYYY}${mmdd}_${hhmmss}
    echo "Starting dataguard instance on O01FLX3DR"
    $ORACLE_HOME/bin/rman nocatalog <<EOF >> /dflx02/flx/oracle/log/cr_stdby_O01FLX3$dt.log
    connect target /
    connect auxiliary sys/xxxxxx@O01FLX3DR
    configure channel device type disk maxpiecesize 4G;
    configure device type disk backup type to compressed backupset parallelism 8;
    run {
    set until time "to_date('20080217:19:00', 'YYYYMMDD:HH24:MI')";
    duplicate target database for standby dorecover nofilenamecheck;
    exit;
    EOF
    set newname for datafile 82 to
    "/dflx02/flx/o01flx3rbs/rbs02_02.O01FLX3";

    Thank you for your reply. Actually Iam not renaming the datafile but building the
    dataguard instance and some how control file is looking for old datafile that was deleted.
    Actually both primary and dataguard instances are running on 10.2.0.3 . Oracle control file is listing the datafile 82 as old deleted file, while building the dataguard.
    ---- This file was deleted long time back but still oracle control file is looking for this file while building the dataguard. Iam using the latest control file.
    set newname for datafile 82 to
    "/dflx02/flx/o01flx3rbs/rbs02_02.O01FLX3"
    When I listed the datafile 82, it is showing the correct datafile.
    RMAN> list backup of datafile 82;
    List of Backup Sets
    ===================
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    50234 Incr 2 26.93M DISK 00:04:03 18-FEB-08
    BP Key: 101470 Status: AVAILABLE Compressed: YES Tag: DATABASE_BACKUP
    Piece Name: /dflx02/flx/o01flx3dump/rman/O01FLX3_51757_1_20080218_647031779.bak
    List of Datafiles in backup set 50234
    File LV Type Ckp SCN Ckp Time Name
    82 2 Incr 7953177017970 18-FEB-08 /dflx02/flx/o01flx3ndx15/flx_ndx3_18.O01FLX3
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    50334 Incr 2 27.76M DISK 00:04:16 19-FEB-08
    BP Key: 101587 Status: AVAILABLE Compressed: YES Tag: DATABASE_BACKUP
    Piece Name: /dflx02/flx/o01flx3dump/rman/O01FLX3_51857_1_20080219_647119328.bak
    List of Datafiles in backup set 50334
    File LV Type Ckp SCN Ckp Time Name
    82 2 Incr 7953257549488 19-FEB-08 /dflx02/flx/o01flx3ndx15/flx_ndx3_18.O01FLX3
    So Iam thinking that there should be a problem in control file and let me know how to resolve it.
    Please let me know if you have any questions.
    Thanks for your help.
    Suresh.D

  • ERROR WHILE ACTIVATING THE DATASOURCE

    Hi Experts,
    I'M WORKING ON BW3.0B.I'M GETTING  ERROR WHILE ACTIVATING THE DATASOURCE
    1. EVENT WITH ERRORS EXTRACT IN DATA SOURC 2LIS_11_VAHDR

    Hi,
    where you are getting error in ECC?. or in BW?. If it is already in use, then you need to clear all Queues and then try to activate it.
    Thanks
    Reddy

  • Error while activating BC datasources

    Hi guys,
    I am getting this error while activating BC datasources...it is only with my login, rest of the users can work well.
    Error:
    DataSource 0BP_ACTITLE_TEXT; switch to package BUPA_CENTRAL_DATA_BW is off
    this happened with all DS in the BC, the problem occured because while activating initially my connection got disconnected and then this problem started.....
    how do i rectify this? any help would be highly appreciated.....

    make sure that the server from which ur data source gets the values are also logged on

  • Error - Name jdbc is not bound in this Context

    Hi,
    i wanted to use Datasource in JDBC to make connection with mysql
    suport and want to excute Jsp page but not able to execte some error is
    getting.
    1)Jsp Page: data_source.jsp
    <%@ page session="true" import="java.sql.*,javax.sql.*,javax.naming.*" %>
    <HTML>
    <body bgcolor="blue">
    <H1 align = "center" >
    Welcome to User and can see the DataSource Connection
    <%
    InitialContext ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("jdbc/test");
    Connection conn = ds.getConnection();
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT * from emp");
    if(rs.next())
    %>
    <table width="100%" border="1" >
    <tr align="left">
    <th>Name</th>
    <th>Dept</th>
    </tr>
    <%
    do
    %>
    <TD> <%= rs.getString("Name") %> </TD>
    <TD> <%= rs.getString("Dept") %> </TD>
    <%
    }while(rs.next());
    %>
    </table>
    <%
    }else {
    %>
    No Results from Query:
    <%
    rs.close();
    stmt.close();
    conn.close();
    ctx.close();
    %>
    </body>
    </html>
    2) web.xml file content
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <description>MySQL Test App</description>
    <resource-ref>
    <description>Mysql DB Connection</description>
    <res-ref-name>jdbc/test</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <servlet>
    <servlet-name>s1</servlet-name>
    <servlet-class>first</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>s1</servlet-name>
    <url-pattern>/test</url-pattern>
    </servlet-mapping>
    </web-app>
    3) myhealth.xml or server.xml
    <?xml version='1.0' encoding='utf-8'?>
    <Context docBase="C:/Program Files/Apache Software Foundation/Tomcat
    5.0/myhealth" path="/myhealth" reloadable="true" privileged="true">
    <Resource name="jdbc/test"
    scope="Shareable" type="javax.sql.DataSource"
    auth="Container" description="hOME.."/>
    <ResourceParams name="jdbc/test">
    <parameter>
    <name>driverClassName</name>
    <value>com.mysql.jdbc.Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:mysql://localhost:3306/test?autoReconnect=true</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>root</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>test</value>
    </parameter>
    </ResourceParams>
    </Context>
    4) Error which i got during execution of data_Source.jsp page.
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it
    from fulfilling this request.
    exception
    javax.servlet.ServletException: Name jdbc is not bound in this Context
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
    org.apache.jsp.Data_005fSource_jsp._jspService(Data_005fSource_jsp.java:115)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    root cause
    javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
    org.apache.naming.NamingContext.lookup(NamingContext.java:815)
    org.apache.naming.NamingContext.lookup(NamingContext.java:198)
    org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
    javax.naming.InitialContext.lookup(InitialContext.java:351)
    org.apache.jsp.Data_005fSource_jsp._jspService(Data_005fSource_jsp.java:56)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    As i made datasource Context using Tomcat apache. But i still get same error.
    I tried so much from Google search, please give me proper solution.
    Coz this is the common problem most of the programmers face initally
    Thanks,
    Prabhat

    i installed tomcat. the installation is done successfully..
    But i can't connect to the db(MySQL)
    i am getting some errors regarding some exception like
    **org.apache.jasper.JasperException: An exception occurred processing JSP page /TestTomcatToMySQLConn.jsp at line 16**
    **13:          Context ctx = new InitialContext();**
    **14:*          if(ctx == null )*
    *15:              throw new Exception("Boom - No Context");*
    *16:           ds = (DataSource)ctx.lookup("java:comp/env/jdbc/testDB");*
    *17:*
    *18:   if(ds == null )*
    *19:       throw new Exception("Boom - No Datasource");*
    Stacktrace:_
    *     org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)*
    *     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)*
    *     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)*
    *     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)*
    *     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)*
    root cause_
    javax.servlet.ServletException: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context_
    *     org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)*
    *     org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)*
    *     org.apache.jsp.TestTomcatToMySQLConnjsp._jspService(TestTomcatToMySQLConn_jsp.java:88)*_
    *     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)*
    *     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)*
    *     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)*
    *     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)*
    *     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)*
    *     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)*
    please Help

  • Error while accessing secure store: File "SecStore.properties" does not exi

    Hi ,
    I have a java desktop application, and i am trying to get a connection from a datasource deployed on one SAP AS Java, I can get the datasource succsfullly but when i try to get a connection from the DS, it throughs this exception, I put the secstore..properties file in the classpath even after that it is not happy,
    any solution/hint/light please!!!!
    com.sap.sql.log.OpenSQLException: Error while accessing secure store: File "SecStore.properties" does not exist although it should..
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:106)
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:145)
         at com.sap.sql.connect.OpenSQLDataSourceImpl.setDataSourceName(OpenSQLDataSourceImpl.java:226)
         at com.sap.sql.connect.OpenSQLDataSourceImpl.setDataSourceName(OpenSQLDataSourceImpl.java:197)
         at com.sap.customcode.ConflictingActionFixture.(ConflictingActionFixture.java:53)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at fit.FixtureClass.newInstance(Unknown Source)
         at fit.FixtureLoader.instantiateFixture(Unknown Source)
         at fit.FixtureLoader.instantiateFirstValidFixtureClass(Unknown Source)
         at fit.FixtureLoader.disgraceThenLoad(Unknown Source)
         at fit.Fixture.loadFixture(Unknown Source)
         at fit.Fixture.getLinkedFixtureWithArgs(Unknown Source)
         at fit.Fixture.doTables(Unknown Source)
         at fit.FitServer.process(Unknown Source)
         at fit.FitServer.run(Unknown Source)
         at fit.FitServer.main(Unknown Source)
    Caused by: com.sap.security.core.server.secstorefs.FileMissingException: File "SecStore.properties" does not exist although it should.
         at com.sap.security.core.server.secstorefs.StorageHandler.openExistingStore(StorageHandler.java:372)
         at com.sap.security.core.server.secstorefs.SecStoreFS.openExistingStore(SecStoreFS.java:1946)
         at com.sap.sql.connect.OpenSQLConnectInfo.getStore(OpenSQLConnectInfo.java:802)
         at com.sap.sql.connect.OpenSQLConnectInfo.lookup(OpenSQLConnectInfo.java:783)
         at com.sap.sql.connect.OpenSQLDataSourceImpl.setDataSourceName(OpenSQLDataSourceImpl.java:209)
         ... 18 more
    caused by

    the SecStore.key file was not there, I changed the passwd and checked the 'Encryption' on, after that my sever instance is not starting.
    Any idea?
    -Puneet

  • Error while trying to login to ecc6: Caller J2EE_ADMIN not authorized, only

    After installation fo ECC6,When I am trying to connect to visual admin,I am getting given below error.
    I am also not able to login to NWA
    Application cannot be started.
      Details:      
      com.sap.engine.services.deploy.container.ExceptionInfo: Naming error.
    System/Server/VisualAdministrationTool#Plain###Error while trying to login to ecc6: Caller J2EE_ADMIN not authorized, only role administrators is allowed to access JMX#
    #1.5#C000C0A8016400010000000001A6B16F0004A600094A9828#1308418992937#/System/Server/VisualAdministrationTool##com.sap.engine.services.adminadapter.gui.tasks.LoginTask#######Thread[Thread-13,6,main]##0#0#Error#1#/System/Server/VisualAdministrationTool#Plain###Error while trying to login to ecc6: Cannot authenticate the user.#
    #1.5#C000C0A8016400020000000001A6B16F0004A6000C292AF0#1308419041078#/System/Server/VisualAdministrationTool##com.sap.engine.services.adminadapter.gui.tasks.LoginTask#######Thread[Thread-24,6,main]##0#0#Error#1#/System/Server/VisualAdministrationTool#Plain###Error while trying to login to ecc6: Caller J2EE_ADMIN not authorized, only role administrators is allowed to access JMX#
    #1.5#C000C0A8016400030000000001A6B16F0004A6001D1853B8#1308419325187#/System/Server/VisualAdministrationTool##com.sap.engine.services.adminadapter.gui.tasks.LoginTask#######Thread[Thread-35,6,main]##0#0#Error#1#/System/Server/VisualAdministrationTool#Plain###Error while trying to login to ecc6: Caller J2EE_ADMIN not authorized, only role administrators is allowed to access JMX#
    #1.5#C000C0A8016400000000000001CA1A680004A6008F78FF48#1308421244125#/System/Server/VisualAdministrationTool##com.sap.engine.services.adminadapter.gui.tasks.LoginTask#######Thread[Thread-2,5,main]##0#0#Error#1#/System/Server/VisualAdministrationTool#Plain###Error while trying to login to ecc6: Caller J2EE_ADMIN not authorized, only role administrators is allowed to access JMX#
    #1.5#C000C0A8016400010000000001CA1A680004A600919BB068#1308421279953#/System/Server/VisualAdministrationTool##com.sap.engine.services.adminadapter.gui.tasks.LoginTask#######Thread[Thread-13,6,main]##0#0#Error#1#/System/Server/VisualAdministrationTool#Plain###Error while trying to login to ecc6: Cannot authenticate the user.#
    #1.5#C000C0A8016400020000000001CA1A680004A6009220F598#1308421288687#/System/Server/VisualAdministrationTool##com.sap.engine.services.adminadapter.gui.tasks.LoginTask#######Thread[Thread-24,6,main]##0#0#Error#1#/System/Server/VisualAdministrationTool#Plain###Error while trying to login to ecc6: Caller J2EE_ADMIN not authorized, only role administrators is allowed to access JMX#
    #1.5#C000C0A8016400030000000001CA1A680004A60097A70598#1308421381359#/System/Server/VisualAdministrationTool##com.sap.engine.services.adminadapter.gui.tasks.LoginTask#######Thread[Thread-35,6,main]##0#0#Error#1#/System/Server/VisualAdministrationTool#Plain###Error while trying to login to ecc6: Cannot authenticate the user.#
    #1.5#C000C0A8016400040000000001CA1A680004A6009867E880#1308421394000#/System/Server/VisualAdministrationTool##com.sap.engine.services.adminadapter.gui.tasks.LoginTask#######Thread[Thread-46,6,main]##0#0#Error#1#/System/Server/VisualAdministrationTool#Plain###Error while trying to login to ecc6: Cannot authenticate the user.#
    #1.5#C000C0A8016400000000000001402EEB0004A600E643EE28#1308422700265#/System/Server/VisualAdministrationTool##com.sap.engine.services.adminadapter.gui.tasks.LoginTask#######Thread[Thread-2,5,main]##0#0#Error#1#/System/Server/VisualAdministrationTool#Plain###Error while trying to login to ecc6: Caller J2EE_ADMIN not authorized, only role administrators is allowed to access JMX#
    Any help would be highly appreciated.
    Thanks
    Sukrut

    Hello,
    If you have a installation of dual stack(ABAP + JAVA) system.. check in SU01 transaction if SAP_J2EE_ADMIN role is assigned to the J2EE_ADMIN user. If not, please assign it.
    For only JAVA stack systems, default administrator user is Administrator.
    thanks
    ashish

  • Exception is thrown "mydb is not bound"(needs urgent help)

    We r three students and our final project is a BPM(Business peocess Management)system.
    BPM is actually a workflow system(managing the business processes)and all the rules and constraints are applied from the Rule Management System.
    we have started the implementation, and therefore we need some help related to the implementation.
    We r using EJB2.0 with JBuilder9, JBoss3.2 as the application server and tomcate as the web server.
    problem:
    I want to create manual database connection using DataSource,
    I am using mysql and database name is mydb.
    I have done all the reqiured configration of mysql with Joss and it is working.
    After getting the initial context, when i try to lookup the datasource, exception is thrown "mydb is not bound"
    Initial context is correct because i have tried entity beans asd it works well.
    code is
    Hashtable contextValues = new Hashtable();
    contextValues.put(Context.PROVIDER_URL, "jnp://loopback:1099");
    contextValues.put(Context.INITIAL_CONTEXT_FACTORY,
    "org.jnp.interfaces.NamingContextFactory");
    Context context = new InitialContext(contextValues);
    context.lookup("java://mydb");
    Kindly help me if u find time,
    regards!

    try java:comp/env/jdbc/mydb or java:comp/env/mydb

  • "Name jdbc is not bound in this Context" when conncetiong from different pa

    Hi,
    I'm just a beginner at this so I'll have to explain everything in details as i have no idea what could be wrong.
    I have a working connection to mydatabase using the following method in a CommonMethods.java file in WEB-INF; this file belongs to the "package mrkt.app;" package.
        public Connection getDataBaseConnection() {
            Connection conn = null ;
            try {
                Context ctx = new InitialContext();
                DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/myproject");
                conn = ds.getConnection();
            } catch (Exception ex) {
                ex.printStackTrace();
            return conn ;
        }     I needed to create a new class in package "package mrkt.app.cat.shop;", in this new java file i need access to the database so i just copied and pasted the above code in the new java file, compiled it, put it in the "WEB-INF/classes/mrkt/app/cat/shop" folder, restarted tomcat to reload classes. The class is loaded successfully, but i always get the following error when calling the method(getShopsCount) using the connection function (getDatabaseConnection)
    javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
         at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
         at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at mrkt.app.cat.shop.ShoppingGuide.getDataBaseConnection(ShoppingGuide.java:30)
         at mrkt.app.cat.shop.ShoppingGuide.getShopsCount(ShoppingGuide.java:49)
         at org.apache.jsp.shopping_005fguide_005fsection_jsp._jspService(shopping_005fguide_005fsection_jsp.java:1418)Regards.
    Yehia A.Salam

    I have the same problem!
    I created a couple of virtualhost on the same webapp like described here
    http://www.onjava.com/pub/a/onjava/2003/06/25/tomcat_tips.html
    the application works without problems if I point my browser to
    http://ip_address/webapp
    but, if I open http://www.myvirtualhost.com/ I get a
    javax.servlet.ServletException: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
    I even defined the same datasource I use for the ip based browsing in the virtualhost datasources (through admin, without restarting tomcat) but I get the same exception... any suggestion?
    thanks

  • Error:the prefix "jsp"  for element "jsp:scriptlet" is not bound

    i got this error:
    the prefix "jsp"  for element "jsp:scriptlet" is not bound.how can i remove this error.

    Add this to the jsp:root tag
    xmlns:jsp="http://java.sun.com/JSP/Page"
    How did it get removed from your JSP?
    (assuming you are using Sun Java Studio Creator)

  • Getting Error while creating Genric Datasource

    Hi,
    I was try to create genric extracter where i was getting error
    While creating view genric extracter where i am getting error "Entry A ZV_ZFRT  does not exist in DD02L - check your entry".
    My requirement is need to create extracter which is getting populated from three modules like SD,MM,FI/CO.From these three module i am using several tables and some of the tables don't have relation btween these tables as like foreign key and refrence key.
    Which extracter i need to create as given scenario?
    Does view will fullfill with my requirement or any other extracter.
    Please some one can help me in this scenario.
    Answer would be great appreciate.

    Hi,
    Rather than writing a program write a function module. Create a structure and include all the necessary fields in the structure. Then in the function module write the logic to extract the values for those fields. While creating the datasource specify the function module and structure name.
    Refer this link:
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    Hope this helps.
    PB

  • Oracle Security Patch Error while applying --The filename, directory name,

    Hello,
    I am running into strange error while applying Oracle Security Patch 68 by using Opatch.
    Supposedly, All the environment variables are set properly.
    ACTIVE_STATE_PERL=true
    DBMS_TYPE=ORA
    dbs_ora_tnsname=YBQ
    JAVA_HOME=C:\jdk1.3.1_10
    OPATCH_DEBUG=TRUE
    ORACLE_HOME=E:\oracle\ora92
    ORACLE_SID=YBQ
    Path=E:\oracle\OPatch;C:\jdk1.3.1_10\bin;E:\oracle\Perl\bin;E:\oracle\ora92\jre\1.4.2\bin\client;E:\oracle\ora92\jre\1.4.2\bin;E:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\Program Files\Common Files\VERITAS Shared;\NetBackup\bin;C:\Program Files\Windows Resource Kits\Tools\;C:\Program Files\Support Tools\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;E:\usr\sap\YBQ\SYS\exe\run
    Installed Active Perl. latest version
    downloaded Opatch 1.0.0.50
    and the patch number 3738339
    I went to that directory and run the command :
    perl opatch.pl apply
    It started of well.
    OPatch version is: 1.0.0.0.50
    Using ORACLE_HOME/oui to look up oui libs...
    Oracle Home = E:\oracle\ora92
    Location of Oracle Inventory = E:\oracle\ora92\inventory
    Oracle Universal Installer shared library = E:\oracle\ora92\oui\lib\win32\oraInstaller.dll
    Path to Java = "E:\oracle\ora92\jre\1.4.2\bin\java.exe"
    Location of Oracle Inventory Pointer = N/A
    Location of Oracle Universal Installer components = E:\oracle\ora92\oui
    Required Jar File under Oracle Universal Installer = jlib\OraInstaller.jar
    find under OH/oui/jlib
    found OraInstaller.jar
    Checking if this is a RAC system...
    Accessing inventory... This may take up to 300 seconds.
    (retry 10 times, delay 30 seconds each time)
    System Command: ""E:\oracle\ora92\jre\1.4.2\bin\java.exe" -Dopatch.retry=10 -Dopatch.delay=30 -DTRACING.ENABLED=TRUE -DTRACING.LEVEL=2 -Dopatch.debug=true -classpath "E:\oracle\ora92\oui\jlib\OraInstaller.jar;E:\oracle\ora92\oui\jlib\srvm.jar;jlib\opatch.jar;E:\oracle\ora92\oui\jlib\xmlparserv2.jar;E:\oracle\ora92\oui\jlib\share.jar;.:E:\oracle\ora92\jlib\srvm.jar" opatch/O2O "e:\oracle\ora92" "E:\oracle\ora92\oui" opatch.pl 1.0.0.0.50"
    Result:
    ----- DEBUG is ON -------
    oracle.installer.startup_location will be set to E:\oracle\ora92\oui
    oracle.installer.oui_loc will be set to E:\oracle\ora92\oui
    oracle.installer.scratchPath will be set to /tmp
    opatch.local_node_only is OFF
    retryOption is ON: 10
    delayOption is ON: 30
    Few more stuff here .. not pasting the entire contents
    System Command: ""E:\oracle\ora92\jre\1.4.2\bin\java.exe" -Dopatch.retry=10 -Dopatch.delay=30 -DTRACING.ENABLED=TRUE -DTRACING.LEVEL=2 -Dopatch.debug=true -classpath "E:\oracle\ora92\oui\jlib\OraInstaller.jar;E:\oracle\ora92\oui\jlib\srvm.jar;jlib\opatch.jar;E:\oracle\ora92\oui\jlib\xmlparserv2.jar;E:\oracle\ora92\oui\jlib\share.jar;." opatch/CheckConflict "E:\oracle\ora92\oui" "e:\oracle\ora92" opatch.pl 1.0.0.0.50 3738339 "3741539 3528282 3516951 3622875 3668572 3371796 3239873 3356103 3543125 3666502 2800494 2824035 2964252 3617042 3320622 3571233 3253770 3492040 3566469 3354470 3625370 3583686 3150750 3617519 3635177 3597640 3749394 3542588 3698501 2954891 2918138 3559212 3518909 3412818 3430832 3172282 3358490 3637624 3458446 3179637 2810394 3668224 3609791 3566813 3475932 2338704 3412136 3388633 3540576 3571226 3575743 2690205 3240280 3509265 3177513 3575747 3811906 3554319 3752406 3323435 " E:\3738339\etc\config\actions"
    Result:
    opatch.pl version: 1.0.0.0.50
    Copyright (c) 2001-2004 Oracle Corporation. All Rights Reserved.
    The filename, directory name, or volume label syntax is incorrect.
    Error in executing Java program to check conflict
    ERROR: OPatch failed during pre-reqs check.
    Now there is no problem with executing the last java program in the same prompt by removing the first and the last double quote "
    Please advise.
    Thanks in advance.

    hi somnath,
    this is the portal content management forum. for your database question please use the database forums:
    http://forums.oracle.com/forums/index.jsp?cat=18
    thanks,
    christian

  • JMS error while looking up from Client

    Hi
    I am looking up a JMS factory though a stand alone client in SAP web as Sp 15. While looking up through JNDI  we are getting a deserialisation error . I have included all the j2ee client jars in the classpath. Any idea do we need to include some other jars also ..
    com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception during lookup operation of object with name jmsFactory/CXLQueueConnectionFactory, cannot resolve object reference. [Root exception is com.sap.engine.services.connector.exceptions.BaseResourceException: Cannot lookup ManageConnectionFactory "CXLQueueConnectionFactory". Cannot deserialize object: com.sap.engine.services.jmsconnector.exceptions.BaseClassNotFoundException: Deserialization Error: java.lang.NoClassDefFoundError: com/sap/jms/server/SynchronousNetworkAdapter
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:141)
         at com.sap.engine.services.jndi.persistent.ClientCPOInputStream.resolveClass(ClientCPOInputStream.java:52)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
         at com.sap.engine.services.jndi.persistent.RemoteSerializator.toObject(RemoteSerializator.java:70)
         at com.sap.engine.services.jndi.implclient.ClientContext.deserializeObject(ClientContext.java:3349)
         at com.sap.engine.services.jndi.implclient.ClientContext.deserializeDirObject(ClientContext.java:3303)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:385)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:639)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at com.sap.engine.services.jmsconnector.spi.ManagedConnectionFactoryImpl.readObject(ManagedConnectionFactoryImpl.java:318)
         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:324)
         at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
         at com.sap.engine.services.jndi.persistent.RemoteSerializator.toObject(RemoteSerializator.java:70)
         at com.sap.engine.services.jndi.implclient.ClientContext.deserializeObject(ClientContext.java:3349)
         at com.sap.engine.services.jndi.implclient.ClientContext.deserializeDirObject(ClientContext.java:3303)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:385)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:639)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at com.sap.engine.services.connector.ResourceObjectFactory.getObjectInstance(ResourceObjectFactory.java:165)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:522)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:639)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at com.tpt.thresher.common.concurrent.DistributedProcessExceptionListener.connect(DistributedProcessExceptionListener.java:204)
         at com.tpt.thresher.common.concurrent.DistributedProcess.<init>(DistributedProcess.java:172)
         at com.tpt.thresher.common.concurrent.DistributedProcess.main(DistributedProcess.java:261)
         at com.sap.engine.services.jmsconnector.spi.ManagedConnectionFactoryImpl.readObject(ManagedConnectionFactoryImpl.java:334)
         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:324)
         at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
         at com.sap.engine.services.jndi.persistent.RemoteSerializator.toObject(RemoteSerializator.java:70)
         at com.sap.engine.services.jndi.implclient.ClientContext.deserializeObject(ClientContext.java:3349)
         at com.sap.engine.services.jndi.implclient.ClientContext.deserializeDirObject(ClientContext.java:3303)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:385)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:639)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at com.sap.engine.services.connector.ResourceObjectFactory.getObjectInstance(ResourceObjectFactory.java:165)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:522)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:639)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at com.tpt.thresher.common.concurrent.DistributedProcessExceptionListener.connect(DistributedProcessExceptionListener.java:204)
         at com.tpt.thresher.common.concurrent.DistributedProcess.<init>(DistributedProcess.java:172)
         at com.tpt.thresher.common.concurrent.DistributedProcess.main(DistributedProcess.java:261)
    Any help on this will be appreciated.
    regards
    rajesh kr

    Hi Rajesh,
    Please add the jar file "sapjms.jar" to your classpath,
    it is situated at
    \usr\sap\<sid>\<id>\j2ee\cluster\server0\bin\services\jms_provider
    HTH
    Peter

  • Error while transporting custom datasource

    Hi All,
    Below is the scenario that was carried out in my project.
    1. Created OHD to load data from a CUBE to Data base Table /BIC/ABC.
    2. Created a custom Datasource ZABC_TEST with the above table.
    3. Activated the DataSource and loaded the data. (Data load successfull. It works fine).
    4. Tried transporting the above. But trows error while transporting the data source.
    Error -- InfoSource ZABC_TEST is not available in source system BITST.
    Let me know what can be done to solve the above error. Please suggest if i have missed out something.
    Thanks in advance.
    Maddy

    HI,
    The problem seems to be occuring since you are transporting both OHD and DS in the same TR request.
    Transport first the DS in a request, then in another request transport the OHD.
    This should resolve the issue.
    hope this helps.
    thanks,
    rahul

  • Error while activating the datasource [UD Connect]. getting error as '&'

    Hi Friends,
    I am trying to get the data from a SQL source through UD connect.
    I do the proposal and map all the info objects to the respective columns.
    When i acticate the data source i am getting the error as
    '&' and Error while Error when activating DataSource 'ZEFF_ENTRY                     UD_ECUBE'
    Please do tell why such errors occur and also the solution to handle such errors.
    Thanks in advance.
    Veena

    Hi,
    where you are getting error in ECC?. or in BW?. If it is already in use, then you need to clear all Queues and then try to activate it.
    Thanks
    Reddy

Maybe you are looking for

  • How can I learn the details of how the iBA video optimizer works?

    Although I appreciate the work done by the vide optimizer in iBooks Author, results vary depending upon the characteristics of the video I submit to it. Sometimes this is acceptable, sometimes not. I came to this conclusion by adding different versio

  • Create Delivery with Reference to Order

    Hi! All, While Creating the Delivery (VL01n) with reference to Sales Order i have a error. Even i maintained Material correctly. 'Storage location was deleted since material is not maintained correctly'. Plz give me suggestions, how to solve? Thanks

  • Function module in loop

    i m using "BAPI_GL_GETGLACCPERIODBALANCES" FUNCTION MODULE. LOOP AT IT_OUTPUT INTO WA_OUTPUT . CALL FUNCTION 'BAPI_GL_GETGLACCPERIODBALANCES'   EXPORTING     COMPANYCODE                   = WA_OUTPUT-BUKRS     GLACCT                        = WA_OUTPU

  • Module Deployed for axis

    Hi, I am using AXIS adapter, Deployment is done correctly, even tested by the url..it was successful. I want to know what all modules are required to add in the soap receiver. mine is proxy soap synch scenario PI 7.1, Any help for solving this proble

  • Two part question: what does do? what does how to get red from getRGB()

    Hi, I came across some interesting code today, which was System.out.println((255 & 0xFF) << 24); outputting -16777216. Firstly, what does << do? Secondly, if -16777216 was the output of getRGB() in say, BufferedImage class, how should I go about gett