tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anjib Mulepati <anji...@hotmail.com>
Subject Re: JNDI configuration with 6.0.29
Date Thu, 08 Sep 2011 20:51:03 GMT
1. Changed to "ojdbc6" same problem.
2. I didn't change any config
3.

public class DynICFactory implements JNDIInterface {

     private DataSource dataSource;

     @Override
     public DataSource getDataSource() {
         return dataSource;
     }

     @Override
     public AgencyInterface createAgencyManager() {
         AgencyImpl manager = new AgencyImpl();
         manager.setDataSource(dataSource);
         return manager;
     }

     public DynICFactory() throws DAOException {
         DataSource ds = null;
         try {
  40.           Context initCtx = new InitialContext();
41.            Context envCtx = (Context) initCtx.lookup("java:comp/env");
  42.           ds = (DataSource) envCtx.lookup("jdbc/dynic");
    43.
  44.       } catch (NamingException e) {
             throw new DAOException("Tomcat JNDI setup failed", e);
         }
         this.dataSource = ds;
     }

     @Override
     public GroupInterface createGroupManager() {
         GroupImpl manager = new GroupImpl();
         manager.setDataSource(dataSource);
         return manager;
     }
}
On 9/8/2011 4:33 PM, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> njib,
>
> On 9/8/2011 3:54 PM, Anjib Mulepati wrote:
>> 1. I have only one instance of jar file "classes12.jar" under lib
>> folder of tomcat.
> Wow... classes12? I remember that from back in the year 2000. Are you
> sure it isn't the old ZIP file they used to ship?
>
>> 2. There is no other error I can see in the log. But error message
>> do change to following
>>
>> Sep 8, 2011 3:50:45 PM
>> org.apache.catalina.core.StandardWrapperValve invoke SEVERE:
>> Servlet.service() for servlet action threw exception
>> javax.naming.NameNotFoundException: Name jdbc is not bound in this
>> Context
> So, the error message changed slightly (s/dynic/jdbc/). What
> configuration did you change?
>
>> at com.anjib.factory.DynICFactory.<init>(DynICFactory.java:41)
> Just curious about this. Can you re-post your code for
> DynICFactory.<init>  including the line numbers?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk5pJo0ACgkQ9CaO5/Lv0PCrfQCdEz2iGOfym6Cqh3jQ67NZ/gCG
> Dt4AmwVdee4TQ4QN4Te3t6alzBneG78B
> =zoTV
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message