lot1
发贴: 28
积分: 0
|
于 2004-11-10 23:52
Why you lookup SessionFactory, instead of datasource?
try this: initctx=new InitialContext(); ctx= (Context) initctx.lookup("java:comp/env"); ds=(DataSource)ctx.lookup("jdbc/hibernate");
And move your resource defintion outside of your Context - move it to default Context and try. or post your server.xml here.
If still cannot work, reverse to the original and make changes step by step. tomcat jndi is just a gift, dont take it so serious like commercial product.
{ Please consider using the Editing function rather than posting multiple replies in a short period of time. }
why edited on 2004-11-11 19:43
|