Results 1 to 2 of 2

Thread: Help me

  1. #1
    ridwan_uka is offline Member
    Join Date
    May 2010
    Posts
    1
    Rep Power
    0

    Default Help me

    I'm getting the following error when trying to deploy my l Web App

    May 1, 2010 10:09:51 AM org.apache.catalina.startup.HostConfig deployDescriptor
    INFO: Deploying configuration descriptor base.xml
    May 1, 2010 10:09:53 AM org.apache.catalina.core.StandardContext start
    INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/base] has already been started
    javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
    at org.apache.naming.NamingContext.lookup(NamingConte xt.java:770)
    at org.apache.naming.NamingContext.lookup(NamingConte xt.java:140)
    at org.apache.naming.NamingContext.lookup(NamingConte xt.java:781)
    at org.apache.naming.NamingContext.lookup(NamingConte xt.java:140)
    at org.apache.naming.NamingContext.lookup(NamingConte xt.java:781)
    at org.apache.naming.NamingContext.lookup(NamingConte xt.java:153)
    at org.apache.naming.SelectorContext.lookup(SelectorC ontext.java:152)
    at javax.naming.InitialContext.lookup(InitialContext. java:392)
    at myapp.util.MyFunction.getConnection(MyFunction.jav a:82)
    at myapp.util.MyLoginModule.checkLogin(MyLoginModule. java:321)
    at myapp.util.MyLoginModule.login(MyLoginModule.java: 146)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at javax.security.auth.login.LoginContext.invoke(Logi nContext.java:769)
    at javax.security.auth.login.LoginContext.access$000( LoginContext.java:186)
    at javax.security.auth.login.LoginContext$4.run(Login Context.java:683)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.login.LoginContext.invokePriv( LoginContext.java:680)
    at javax.security.auth.login.LoginContext.login(Login Context.java:579)
    at org.apache.catalina.realm.JAASRealm.authenticate(J AASRealm.java:410)
    at org.apache.catalina.realm.JAASRealm.authenticate(J AASRealm.java:335)
    at org.apache.catalina.authenticator.FormAuthenticato r.authenticate(FormAuthenticator.java:259)
    at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:449)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:852)
    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:619)

    web.xml:
    <Resource name="jdbc/myappDB" auth="Container" driverClassName="com.sybase.jdbc3.jdbc.SybConnecti onPoolDataSource"
    logAbandoned="true" maxActive="100" maxIdle="30" maxWait="10000"
    removeAbandoned="true" removeAbandonedTimeout="60" type="javax.sql.DataSource"
    url="jdbc:sybase:Tds:10.1.80.102:6111/base?JCONNECT_VERSION=6" username="usrrantus" password="bagbag"/>

    context.xml:
    <?xml version='1.0' encoding='utf-8'?>
    <!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements. See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    -->
    <!-- The contents of this file will be loaded for each web application -->
    <Context>

    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>

    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->

    <!-- Uncomment this to enable Comet connection tacking (provides events
    on session expiration as well as webapp lifecycle) -->
    <!--
    <Valve className="org.apache.catalina.valves.CometConnect ionManagerValve" />
    -->

    <ResourceLink name="jdbc/myappDB" global="jdbc/myappDB" type="javax.sql.DataSource"/>

    </Context>


    Librari : jconn3.jar


    thanks

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    5

    Default

    the way yo uuse the global="" in the context.xml, it is expecting the resource to be declared in the server.xml.

    if you don't want this, then don't use the ResourceLink in context.xml, instead use Resource ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •