On Wed, 2004-09-22 at 09:27, Sir John Nueva wrote: > Hi Shawn, > I am referring to 2 application
Well in that case, it should work. It does for me anyway. I have 2 diff jndi connections in one context and then a third jndi connection in a seperate context. Are your <resource-ref> in both web.xml defined correctly? Just to re-confirm -- you are not running Tomcat within an IDE are you --such as netbeans or intellij idea? > 1. webapp members > in dbforms-config.xml of members > >> <dbconnection > >> name = "java:comp/env/jdbc/MEMBERSDB" > >> isJndi = "true" > >> isPow2 = "false" > >> default = "true" > >> /> > > in Tomcat 5.0\conf\Catalina\localhost\members.xml > <Context path="/members" docBase="D:/members" > debug="5" reloadable="true" crossContext="true"> > <Logger className="org.apache.catalina.logger.FileLogger" > prefix="members_log." suffix=".txt" > timestamp="true"/> > <Resource name="jdbc/MEMBERSDB" > auth="Container" > type="javax.sql.DataSource"/> > ....... > ..... > </Context> > > 2. webapp inventory > in dbforms-config.xml of inventory > >> <dbconnection > >> name = "java:comp/env/jdbc/INVENTORYDB" > >> isJndi = "true" > >> isPow2 = "false" > >> default = "true" > >> /> > > in Tomcat 5.0\conf\Catalina\localhost\inventory.xml > <Context path="/inventory" docBase="D:/inventory" > debug="5" reloadable="true" crossContext="true"> > <Logger className="org.apache.catalina.logger.FileLogger" > prefix="inventory_log." suffix=".txt" > timestamp="true"/> > <Resource name="jdbc/INVENTORYDB" > auth="Container" > type="javax.sql.DataSource"/> > > <ResourceParams name="jdbc/INVENTORYDB"> > ....... > ......... > </Context> > > > When i change to Regular dbconnection not to use > JNDI they work fine. > I just wonder why i can't use JNDI for both of them. > > > Thank you, > John > > > > > > > > On Mon, 2004-09-20 at 17:15, Sir John Nueva wrote: > >> Hi, > >> I am having problem running 2 web application that both use JNDI > >> for the DBForms connection object. > >> It gives me error message below. My web apps name are members and > >> inventory. > >> The weird part is when i call members web application i got the error > >> below. > >> Which look like JNDI name in the error is the name i use for > >> inventory. > >> Do you have any idea? > > You can't have two default connections so of course all the pages will > > use the MEMBERSDB connection. > > > > See the UsersGuide section on Multiple Database Connections > > > > If you are running your apps in two different contexts then it should be > > ok but I get the same error you do when running Tomcat inside my ide but > > it works fine when running as plain Tomcat. so if you are running > > inside an ide, try running tomcat normally. > >> > >> <dbconnection > >> name = "java:comp/env/jdbc/MEMBERSDB" > >> isJndi = "true" > >> isPow2 = "false" > >> default = "true" > >> /> > >> > >> <dbconnection > >> name = "java:comp/env/jdbc/INVENTORYSDB" > >> isJndi = "true" > >> isPow2 = "false" > >> default = "true" > >> /> > >> > >> org.apache.jasper.JasperException: JDBC-Troubles: was not able to create > >> connection from DbConnection = id=null, > >> name=java:comp/env/jdbc/INVENTORYDB, jndi=true, conClass=null, > >> username=null, default=true > >> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372) > >> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) > >> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) > >> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > >> org.dbforms.util.external.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:379) > >> > >> root cause > >> java.lang.IllegalArgumentException: JDBC-Troubles: was not able to > >> create connection from DbConnection = id=null, > >> name=java:comp/env/jdbc/INVENTORYDB, jndi=true, conClass=null, > >> username=null, default=true > >> org.dbforms.config.DbFormsConfig.getConnection(DbFormsConfig.java:259) > >> org.dbforms.taglib.DbFormTag.doStartTag(DbFormTag.java:2391) > >> org.apache.jsp.m_005fdetails_jsp._jspService(m_005fdetails_jsp.java:200) > >> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) > >> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > >> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) > >> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) > >> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) > >> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > >> org.dbforms.util.external.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:379) > >> Thank you in advance, > >> Sir John > >> -- > >> > >> The Foreign Buyers' Club > >> Bringing a little bit of home to Japan > > -- > > Shawn <[EMAIL PROTECTED]> > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > > Project Admins to receive an Apple iPod Mini FREE for your judgement on > > who ports your project to Linux PPC the best. Sponsored by IBM. > > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > > _______________________________________________ > > DbForms Mailing List > > > > http://www.wap-force.net/dbforms > > -- Shawn <[EMAIL PROTECTED]> ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ DbForms Mailing List http://www.wap-force.net/dbforms