Reloading context.xml
Hi All, Quick question. If I made change to (\META_INF\context.xml) file do i have to restart tomcat server to load changes? Thanks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Site down?
Its up and running http://tomcat.apache.org/ On 9/11/2012 1:41 PM, Pierre Goupil wrote: Good evening, It looks like Tomcat's site is down! Regards, Pierre - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Connection between Web Application and DB
Hi All, I have my DB and web application running in different machine. And whenever my DB machine restart my application fail since it can't connect to the DB. I have to restart my application every time my DB start. I am using Struts Plug-in to load connection information from web.xml file and creating the DAO factory from the information. DAO factory is stored in servlet context. Now this daoFactory is used by each DAO class to create the connection. This problem exist in my system for long time and trying to fix it. I have put my most code here to make things clear. I am using tomcat 7.0.26 1. Context parameter in web.xml Type of DB.{ 1 = Oracle } dbType 1 Resource reference for the database. resRef jdbc/mydb 2. Plug-in configuration in struts-config.xml 3. My DBConfigPlugin class public class DBConfigPlugin implements PlugIn { private static Log log = LogFactory.getLog(DBConfigPlugin.class.getName()); private DBConfig dbConfig; public void destroy() { //Nothing to do here } public void init(ActionServlet servlet, ModuleConfig config) throws ServletException { ServletContext servletContext = servlet.getServletContext(); /* Create factory for database */ String resRef = servletContext.getInitParameter("resRef"); int dbType = 0; if (resRef == null || resRef.trim().length() == 0) { log.fatal("Parameter resRef is null or invalid"); } try { dbType = Integer.parseInt(servletContext.getInitParameter("dbType")); } catch (NumberFormatException nfe) { log.fatal(nfe); log.error("Parameter dbType is not numeric"); } if (dbType != DBConfig.ORACLE) { log.fatal("Parameter dbType has to be 1 (Oracle)"); } DBConfig = new DBConfig(resRef, dbType); DAOFactory daoFactory = DAOFactory.getDAOFactory(DBConfig); servletContext.setAttribute("daoFactory", daoFactory); } public DBConfig getDBConfig() { return DBConfig; } public void setDBConfig(DBConfig DBConfig) { this.DBConfig = DBConfig; } } 4. Create connection in DAOFactory class public abstract class DAOFactory { private DBConfig dbConfig; public static DAOFactory getDAOFactory(DBConfig dbConfig) { switch (dbConfig.getDbType()) { case DBConfig.ORACLE: return new OracleDAOFactory(dbConfig); default: return null; } } public DAOFactory(DBConfig dbConfig) { this.dbConfig = dbConfig; } public Connection createConnection() throws DAOException { try { String str = "java:comp/env/" + dbConfig.getResRef(); DataSource dataSource = (DataSource) ServiceLocator.getInstance().getDataSource(str); return dataSource.getConnection(); } catch (SQLException se) { throw new DAOException(se.getMessage(), se); } catch (ServiceLocatorException tase) { throw new DAOException(tase.getMessage(), tase); } } } 5. In my com.anjib.actions.BaseAction class public abstract class BaseAction extends org.apache.struts.action.Action { private static Log log = LogFactory.getLog(BaseAction.class.getName()); protected DAOFactory daoFactory = null; private String message = null; private UserInfo userInfo = null; @Override public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { userInfo = new UserInfo(); setUserInfo((UserInfo) request.getSession().getAttribute("userInfo")); ActionErrors errors = new ActionErrors(); if (request.getSession().getAttribute("loginStatus") == null) { errors.add("error", new ActionMessage("error.notloggedin")); this.saveErrors(request, errors); return mapping.findForward("sessionEnded"); } ServletContext servletContext = servlet.getServletContext(); try { daoFactory = (DAOFactory) servletContext.getAttribute("daoFactory"); } catch (NullPointerException npex) { log.debug(npex); log.error("Couldn't find the valid factory class."); message = "Factory value is NULL."; errors.add("label", new ActionMessage("error.null.factory")); saveErrors(request, err
Tomcat-DB Connection problem
Hi All, I have DB and application in two different machine. My DB is Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production. And my applciation is in Tomcat 6.0.20. I have following in resource My problem is every time I restart DB machine I have to restart the tomcat to get application running. I am getting error java.sql.SQLRecoverableException: No more data to read from socket - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat as Application Server
So can I say Tomcat is Web Server but doesn't not support as full application Server? On 2/17/2012 11:20 AM, David kerber wrote: On 2/17/2012 11:10 AM, Anjib Mulepati wrote: Hi All, I was reading an old article (http://www.javaworld.com/javaworld/jw-01-2008/jw-01-tomcat6.html?page=1) about Tomcat to find out whether Tomcat can be used as application serve or not. This article list that Tomcat 6.x support following features: ... Where as lack for following: ·Distributed transactions ·EJBs and ·JMS For that reason it can't be used as full application server. Is there any feature I missed in either side. And main question Is Tomcat application server? If no why? The way you're using the term, no. Tomcat is a servlet engine, with some very limited support for ejb's. Look at JBoss if you need full EJB support. Keep in mind that servlets and standard java code can do an awful lot, so you may not need full EJB support. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat as Application Server
Hi All, I was reading an old article (http://www.javaworld.com/javaworld/jw-01-2008/jw-01-tomcat6.html?page=1) about Tomcat to find out whether Tomcat can be used as application serve or not. This article list that Tomcat 6.x support following features: ·WAR file deployment ·JNDI resources ·JDBC data sources ·JSP support ·Session replication ·Virtual hosting support ·Clustering support ·JMX-based management and monitoring ·Asynchronous HTTP request handling via Comet ·Thread pool sharing ·Non-blocking connectors ·Servlet 2.5 and ·JSP 2.1 Where as lack for following: ·Distributed transactions ·EJBs and ·JMS For that reason it can't be used as full application server. Is there any feature I missed in either side. And main question Is Tomcat application server? If no why? Thanks
Re: DB Connection error
I have following log com.anjib.exceptions.DAOException: Error in your database. at com.anjib.actions.GetMyListAction.execute(GetMyListAction.java:71) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:662) Caused by: com.anjib.exceptions.DAOException: Cannot create PoolableConnectionFactory (IO Error: The Network Adapter could not establish the connection) at com.anjib.dao.DAOFactory.createConnection(DAOFactory.java:118) at com.anjib.dao.oracle.Table1DAO.getAll(Table1DAO.java:195) at com.anjib.actions.GetMyListAction.execute(GetMyListAction.java:65) ... 18 more Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (IO Error: The Network Adapter could not establish the connection) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) at com.anjib.dao.DAOFactory.createConnection(DAOFactory.java:116) ... 20 more Caused by: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:419) at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:536) at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:228) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521) at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221) ... 22 more Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:375) at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:422) at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:678) at oracle.net.ns.NSProtocol.connect(NSProtocol.java:238) at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1054) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:308) ... 30 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:529) at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:209) at oracle.net.nt.ConnOption.connect(ConnOption.java:123) at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:353) ... 35 more On 1/9/2012 12:03 PM, Propes, Barry L wrote: Are you getting any kind of error in the logs? -Original Message- From: Anjib Mulepati [mailto:anji...@hotmail.com] Sent: Monday, January 09, 2012 9:22 AM To: Tomcat Users List Subject: Re: DB Connection error I did change my config.xml to And this morning when DB restart I had to restart the tomcat to get
Re: DB Connection error
com.anjib.exceptions.ICDAOException: Error in your database. at com.anjib.actions.GetMyListAction.execute(GetMyListAction.java:71) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:151) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) Caused by: com.anjib.exceptions.ICDAOException: No more data to read from socket at com.anjib.dao.oracle.Table1DAO.getAll(Table1DAO.java:206) at com.anjib.actions.GetMyListAction.execute(GetMyListAction.java:65) ... 20 more Caused by: java.sql.SQLRecoverableException: No more data to read from socket at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1142) at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1099) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:288) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207) at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:863) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1153) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275) at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1477) at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:392) at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208) at com.anjib.dao.oracle.Table1DAO.getAll(Table1DAO.java:197) ... 21 more On 1/9/2012 10:33 AM, Chema wrote: 2012/1/9 Anjib Mulepati: I did change my config.xml to Can you attach error trace ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: DB Connection error
I did change my config.xml to And this morning when DB restart I had to restart the tomcat to get connection. What can be other solutions? On 1/3/2012 3:33 PM, Propes, Barry L wrote: I also have the following attributes in mine, for what it's worth. maxIdle="30" maxWait="1" maxActive="10" testOnBorrow="true" timeBetweenEvictionRunsMillis="-1" minEvictableIdleTimeMillis="28800" poolPreparedStatements="true" removeAbandoned="true" removeAbandonedTimeout="300" logAbandoned="false" -Original Message- From: Daniel Mikusa [mailto:dmik...@vmware.com] Sent: Tuesday, January 03, 2012 1:10 PM To: Tomcat Users List Subject: Re: DB Connection error On Tue, 2012-01-03 at 10:47 -0800, Chema wrote: But in my application I have context.xml with following Well, you can use validationQuery parameter with "SELECT 1 FROM DUAL;". +1 Try adding validationQuery="SELECT 1 FROM DUAL" and testOnBorrow="true". When you restart the DB, it's going to disconnect all of the connections in your pool. If you add a validation query and one of the "testOn*" options (testOnBorrow is my personal favorite) then the pool will catch the bad connections, remove them and assuming your DB is back online, create new ones. Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: DB Connection error
On 1/3/2012 1:12 PM, Chema wrote: 2012/1/3 Anjib Mulepati: Hi All, One simple question If I have JINDI configuration in my application will my application reconnect to the DB whenever my DB gets restart. I am having DB connection problem every Monday since our DB get restarted on weekends which we don't have control of. I am using Tomcat 6.0.20 Hi: can you attach your element in server.xml file ( except sensible data )? I haven't change anythign in server.xml so i have default in it But in my application I have context.xml with following - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
DB Connection error
Hi All, One simple question If I have JINDI configuration in my application will my application reconnect to the DB whenever my DB gets restart. I am having DB connection problem every Monday since our DB get restarted on weekends which we don't have control of. I am using Tomcat 6.0.20 Thanks Anjib - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JNDI configuration with 6.0.29
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Anjib, On 9/8/2011 4:51 PM, Anjib Mulepati wrote: 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"); Odd to use a local variable for this, but I guess you could do that. I've seen "java:comp/env" and "java:/comp/env", but both seem to work. Try running this JSP. It's a bit fragile, but it should get the job done. - -chris http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> <%@page pageEncoding="UTF-8" session="false" language="Java" import=" javax.naming.InitialContext, javax.naming.Binding, javax.naming.Context, javax.naming.NamingEnumeration, javax.naming.NamingException " %> <% String path = "java:/comp/env"; String pathParam = request.getParameter("path"); if(null != pathParam&& !"".equals(pathParam.trim())) path = pathParam.trim(); int pos = path.lastIndexOf('/'); String parent = pos> 0 ? path.substring(0, pos) : "java:comp/env"; %> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> JNDI Browser:<%= path %> JNDI Browser:<%= path %> <%= parent %> <% InitialContext ctx = null; NamingEnumeration e = null; try { ctx = new InitialContext(); e = ctx.listBindings(path); if(e.hasMoreElements()) { %> <% while(e.hasMoreElements()) { Binding b = (Binding)e.next(); %> <% if(b.getObject() instanceof Context) { %> <%= b.getName() %> <% } else { %> <%= b.getName() %> (<%= b.getClassName() %>) <% } %> <% } %> <% } else { %> JNDI context is empty <% } } catch (NamingException ne) { %> Error:<%= ne.getMessage() %> <% java.io.PrintWriter myout = new java.io.PrintWriter(out); ne.printStackTrace(myout); myout.flush(); %> <% } finally { if(null != e) try { e.close(); } catch (NamingException ne) { %><%= ne.getMessage() %><% } if(null != ctx) try { ctx.close(); } catch (NamingException ne) { %><%= ne.getMessage() %><% } }//foo %> -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5pL3gACgkQ9CaO5/Lv0PBLAQCglRlAcKBZa5Gtrg494FfcvA2c /hIAoIu0fj/5ejz3+C3Pk/S8i1PeQG50 =F0ZW -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JNDI configuration with 6.0.29
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.(DynICFactory.java:41) Just curious about this. Can you re-post your code for DynICFactory. 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JNDI configuration with 6.0.29
1. I have only one instance of jar file "classes12.jar" under lib folder of tomcat. 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 at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(ResourceLinkFactory.java:97) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at org.apache.naming.NamingContext.lookup(NamingContext.java:793) 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 com.anjib.factory.DynICFactory.(DynICFactory.java:41) at com.anjib.actions.CommonAction.execute(CommonAction.java:42) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 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.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) On 9/7/2011 5:40 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Anjib, On 9/7/2011 12:57 PM, Anjib Mulepati wrote: I did checked the XML file and it looks correct to me. Following is the content: It probably has no bearing on this particular problem, but the "path" attribute is illegal here. Isn't that context path of web applciation is specified with the "path" attribute. http://tomcat.apache.org/tomcat-4.0-doc/config/context.html You're not using Tomcat 4.0, you're using Tomcat 6.0. Look at the documentation that is appropriate for your version of Tomcat: the "path" attribute is only appropriate when the is defined in server.xml, which is highly discouraged. The name of the XML file (when deployed) or the name of the WAR file (or exploded WAR directory structure) will dictate the context path and so it need not (and should not) be specified in context.xml. Do you need to use Oracle's DataSourceFactory? If not, allow Tomcat to use it's own DataSourceFactory. To be safe can you tell me what change I have to do for that. Simply remove the "factory" attribute altogether. Tomcat knows what it's default is. maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/dynic" I'm curious why the lookup fails with the message about "dynic" and not, as Felix asks, "jdbc/dynic". I am wondering on same. Is there any way to debug this. Tomcat's logging usually provides some indication of a failure, but you haven't mentioned anything about log entries. Can you see if there are any log messages? Finally, try changing the "user" attribute to "username". - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5n5MwACgkQ9CaO5/Lv0PCjoACfcadA/2p8u9VT7EdTgHTrF6Qo S9MAn1KxzCBXRPCzmsiYkgWI0RZl0UtB =9Gr4 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JNDI configuration with 6.0.29
yes after changing to ds = (DataSource) envCtx.lookup("jdbc/dummy_value"); i am getting javax.naming.NameNotFoundException: Name dummy_value is not bound in this Context org.apache.naming.NamingContext.lookup(NamingContext.java:770) org.apache.naming.NamingContext.lookup(NamingContext.java:140) org.apache.naming.NamingContext.lookup(NamingContext.java:781) org.apache.naming.NamingContext.lookup(NamingContext.java:153) com.anjib.factory.DynICFactory.(DynICFactory.java:41) com.anjib.actions.CommonAction.execute(CommonAction.java:42) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) On 9/8/2011 2:43 PM, Felix Schumacher wrote: Am Mittwoch, den 07.09.2011, 10:22 -0500 schrieb Anjib Mulepati: Yes I am positive So, your error message changes, if you change your factory code? Say, if you change your code like this ds = (DataSource) envCtx.lookup("jdbc/no_such_name"); Do you see a message like "NameNotFoundException: Name no_such_name is not bound..."? Felix Anjib Man Mulepati 409-225-6216 Subject: Re: JNDI configuration with 6.0.29 From: felix.schumac...@internetallee.de Date: Wed, 7 Sep 2011 17:17:21 +0200 To: users@tomcat.apache.org Anjib Mulepati schrieb: Hi All, I am trying to setup JNDI mapping for oracle JDBC Connection Pooling with Tomcat 6.0.29. This is giving me following error javax.naming.NameNotFoundException: Name dynic is not bound in this From your code and configuration I would have expected jdbc/dynic instead of just dynic. Are you sure that you are using the code you showed us? Bye Felix Context org.apache.naming.NamingContext.lookup(NamingContext.java:770) org.apache.naming.NamingContext.lookup(NamingContext.java:140) org.apache.naming.NamingContext.lookup(NamingContext.java:781) org.apache.naming.NamingContext.lookup(NamingContext.java:153) org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(ResourceLinkFactory.java:97) javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) org.apache.naming.NamingContext.lookup(NamingContext.java:793) org.apache.naming.NamingContext.lookup(NamingContext.java:140) org.apache.naming.NamingContext.lookup(NamingContext.java:781) org.apache.naming.NamingContext.lookup(NamingContext.java:153) com.anjib.factory.DynICFactory.(DynICFactory.java:41) com.anjib.actions.CommonAction.execute(CommonAction.java:42) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) I ran same program with Tomcat 7.0.12 and it works fine. Here are my configurations: 1. In META-INF/context.xml 2. In WEB-INF/web.xml jdbc/dynic javax.sql.DataSource Container Shareable 3. In factory class I have public class DynICFactory implements JNDIInterface{ private DataSource dataSource; @Overridepublic DataSource getDataSource() {return dataSource;} @Overridepublic AgencyInterface createAgencyManager() { AgencyImpl manager = new AgencyImpl(); manager.setDataSource(dataSource); return manager; } public DynICFactory() throws DAOException { DataSource ds = null; try { Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup("java:comp/env"); } catch (NamingException e) { throw new DAOException("Tomcat JNDI setup failed", e); } this.dataSource = ds; } } On 9/6/2011 4:11 PM, Anjib Mulepati wrote: Hi All, I am trying to setup JNDI mapping for oracle JDBC Connection Pooling with Tomcat 6.0.29. This is giving me following error
Re: JNDI configuration with 6.0.29
Tomcat log says SEVERE: Servlet.service() for servlet jsp threw exception javax.naming.NameNotFoundException: Name dynic 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:153) at org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(ResourceLinkFactory.java:97) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at org.apache.naming.NamingContext.lookup(NamingContext.java:793) 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.jsp.test_jsp._jspService(test_jsp.java:77) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 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.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) On 9/7/2011 5:40 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Anjib, On 9/7/2011 12:57 PM, Anjib Mulepati wrote: I did checked the XML file and it looks correct to me. Following is the content: It probably has no bearing on this particular problem, but the "path" attribute is illegal here. Isn't that context path of web applciation is specified with the "path" attribute. http://tomcat.apache.org/tomcat-4.0-doc/config/context.html You're not using Tomcat 4.0, you're using Tomcat 6.0. Look at the documentation that is appropriate for your version of Tomcat: the "path" attribute is only appropriate when the is defined in server.xml, which is highly discouraged. The name of the XML file (when deployed) or the name of the WAR file (or exploded WAR directory structure) will dictate the context path and so it need not (and should not) be specified in context.xml. Do you need to use Oracle's DataSourceFactory? If not, allow Tomcat to use it's own DataSourceFactory. To be safe can you tell me what change I have to do for that. Simply remove the "factory" attribute altogether. Tomcat knows what it's default is. maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/dynic" I'm curious why the lookup fails with the message about "dynic" and not, as Felix asks, "jdbc/dynic". I am wondering on same. Is there any way to debug this. Tomcat's logging usually provides some indication of a failure, but you haven't mentioned anything about log entries. Can you see if there are any log messages? Finally, try changing the "user" attribute to "username". - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5n5MwACgkQ9CaO5/Lv0PCjoACfcadA/2p8u9VT7EdTgHTrF6Qo S9MAn1KxzCBXRPCzmsiYkgWI0RZl0UtB =9Gr4 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JNDI configuration with 6.0.29
i change to and still same problem. On 9/7/2011 12:31 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Anjib, On 9/7/2011 12:21 PM, Anjib Mulepati wrote: I did checked the XML file and it looks correct to me. Following is the content: It probably has no bearing on this particular problem, but the "path" attribute is illegal here. Do you need to use Oracle's DataSourceFactory? If not, allow Tomcat to use it's own DataSourceFactory. maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/dynic" I'm curious why the lookup fails with the message about "dynic" and not, as Felix asks, "jdbc/dynic". password="sfed_schema" type="oracle.jdbc.pool.OracleDataSource" url="jdbc:oracle:thin:@//localhost:4001/SAIDIT" user="sfed_schema"/> I have "username" as the attribute in my, but this might be the way you have to configure Oracle's factory. Here's what I've got in my configuration: (That "validationQuery" is a short-cut for MySQL connection testing. Feel free to use something like "SELECT 1 FROM DUAL" when using Oracle). Same config work for Tomcat 7 so I am wondering is there any thing I have to different/extra in Tomcat 6 The configuration should be identical to Tomcat 6. Do you see any messages in your logs during webapp startup? I wrote a JSP-based JNDI navigator a while back but I can't seem to find it. Maybe I'll whip one up so you can look-around the JNDI tree to see if your DataSource is just misplaced. I'm sure you can write one yourself fairly easily, too. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5nnFYACgkQ9CaO5/Lv0PAFrwCfcrpNdl8EiBvtsSc2ju5Lp7LF MzsAn35+pyrAivj6TtHBMWj6G6rL5+UN =sBGp -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JNDI configuration with 6.0.29
I did checked the XML file and it looks correct to me. Following is the content: It probably has no bearing on this particular problem, but the "path" attribute is illegal here. Isn't that context path of web applciation is specified with the "path" attribute. http://tomcat.apache.org/tomcat-4.0-doc/config/context.html Do you need to use Oracle's DataSourceFactory? If not, allow Tomcat to use it's own DataSourceFactory. To be safe can you tell me what change I have to do for that. maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/dynic" I'm curious why the lookup fails with the message about "dynic" and not, as Felix asks, "jdbc/dynic". I am wondering on same. Is there any way to debug this. password="sfed_schema" type="oracle.jdbc.pool.OracleDataSource" url="jdbc:oracle:thin:@//localhost:4001/SAIDIT" user="sfed_schema"/> I have "username" as the attribute in my, but this might be the way you have to configure Oracle's factory. Here's what I've got in my configuration: (That "validationQuery" is a short-cut for MySQL connection testing. Feel free to use something like "SELECT 1 FROM DUAL" when using Oracle). Same config work for Tomcat 7 so I am wondering is there any thing I have to different/extra in Tomcat 6 The configuration should be identical to Tomcat 6. Do you see any messages in your logs during webapp startup? I wrote a JSP-based JNDI navigator a while back but I can't seem to find it. Maybe I'll whip one up so you can look-around the JNDI tree to see if your DataSource is just misplaced. I'm sure you can write one yourself fairly easily, too. Yes that will be helpful. Any clue will be appreciated. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5nnFYACgkQ9CaO5/Lv0PAFrwCfcrpNdl8EiBvtsSc2ju5Lp7LF MzsAn35+pyrAivj6TtHBMWj6G6rL5+UN =sBGp -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JNDI configuration with 6.0.29
I did checked the XML file and it looks correct to me. Following is the content: Same config work for Tomcat 7 so I am wondering is there any thing I have to different/extra in Tomcat 6 Thanks, Anjib On 9/7/2011 12:15 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Anjib, On 9/7/2011 11:22 AM, Anjib Mulepati wrote: Yes I am positive If you have changed your META-INF/context.xml without doing an undeploy/redeploy, Tomcat may be using an older version of the deployment descriptor than you think it is. Take a look at CATALINA_BASE/conf/Catalina/[hostname]/[appname].xml and see if it contains what you expect it to contain (i.e. "jdbc/dynic"). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5nmKEACgkQ9CaO5/Lv0PBgigCghqHFuyP7EdhO52nHXqX61CjV 5G8An2j+WGBaf6smXcS7MiCYrOq0iTIH =pVtB -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: JNDI configuration with 6.0.29
Yes I am positive Anjib Man Mulepati 409-225-6216 > Subject: Re: JNDI configuration with 6.0.29 > From: felix.schumac...@internetallee.de > Date: Wed, 7 Sep 2011 17:17:21 +0200 > To: users@tomcat.apache.org > > > > Anjib Mulepati schrieb: > > >Hi All, > > > >I am trying to setup JNDI mapping for oracle JDBC Connection Pooling > >with Tomcat 6.0.29. This is giving me following error > > > >javax.naming.NameNotFoundException: Name dynic is not bound in this > From your code and configuration I would have expected jdbc/dynic instead of > just dynic. Are you sure that you are using the code you showed us? > > Bye > Felix > >Context > > org.apache.naming.NamingContext.lookup(NamingContext.java:770) > > org.apache.naming.NamingContext.lookup(NamingContext.java:140) > > org.apache.naming.NamingContext.lookup(NamingContext.java:781) > > org.apache.naming.NamingContext.lookup(NamingContext.java:153) > > > > org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(ResourceLinkFactory.java:97) > > javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) > > org.apache.naming.NamingContext.lookup(NamingContext.java:793) > > org.apache.naming.NamingContext.lookup(NamingContext.java:140) > > org.apache.naming.NamingContext.lookup(NamingContext.java:781) > > org.apache.naming.NamingContext.lookup(NamingContext.java:153) > > com.anjib.factory.DynICFactory.(DynICFactory.java:41) > > com.anjib.actions.CommonAction.execute(CommonAction.java:42) > > > > org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) > > > > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) > > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) > > org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:617) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > > >I ran same program with Tomcat 7.0.12 and it works fine. > > > >Here are my configurations: > > > >1. In META-INF/context.xml > > > > > > > auth="Container" > > type="oracle.jdbc.pool.OracleDataSource" > > driverClassName="oracle.jdbc.driver.OracleDriver" > > factory="oracle.jdbc.pool.OracleDataSourceFactory" > > url="jdbc:oracle:thin:@//localhost:4001/SAIDIT" > > user="sfed_schema" > > password="sfed_schema" > > maxActive="20" > > maxIdle="10" > > maxWait="-1" /> > > > > > >2. In WEB-INF/web.xml > > > > > > jdbc/dynic > > javax.sql.DataSource > > Container > > Shareable > > > > > >3. In factory class I have > > > > public class DynICFactory implements JNDIInterface{ > > > > private DataSource dataSource; > > > > @Overridepublic DataSource getDataSource() {return > >dataSource;} > > > > @Overridepublic AgencyInterface createAgencyManager() { > > AgencyImpl manager = new AgencyImpl(); > > manager.setDataSource(dataSource); > > return manager; > > } > > > > public DynICFactory() throws DAOException { > > DataSource ds = null; > > try { > > Context initCtx = new InitialContext(); > > Context envCtx = (Context) > > initCtx.lookup("java:comp/env"); > > ds = (DataSource) envCtx.lookup("jdbc/dynic"); > > } catch (NamingException e) { > > throw new DAOException("Tomcat JNDI setup > > failed", e); > > } > > this.dataSource = ds; > > } > > } > > > > > >On 9/6/2011 4:11 PM, Anjib Mulepati wrote: > >> > >> > >> > >> > >> > >> > >> > >> > >> Hi All, > >> I am trying to setup JNDI mapping for oracle JDBC Connection Pooling > >with Tomcat 6.0.29. This is giving me following error > >> javax.naming.NameNotFoundException: Name dynic is not bound in th
JNDI configuration with 6.0.29
Hi All, I am trying to setup JNDI mapping for oracle JDBC Connection Pooling with Tomcat 6.0.29. This is giving me following error javax.naming.NameNotFoundException: Name dynic is not bound in this Context org.apache.naming.NamingContext.lookup(NamingContext.java:770) org.apache.naming.NamingContext.lookup(NamingContext.java:140) org.apache.naming.NamingContext.lookup(NamingContext.java:781) org.apache.naming.NamingContext.lookup(NamingContext.java:153) org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(ResourceLinkFactory.java:97) javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) org.apache.naming.NamingContext.lookup(NamingContext.java:793) org.apache.naming.NamingContext.lookup(NamingContext.java:140) org.apache.naming.NamingContext.lookup(NamingContext.java:781) org.apache.naming.NamingContext.lookup(NamingContext.java:153) com.anjib.factory.DynICFactory.(DynICFactory.java:41) com.anjib.actions.CommonAction.execute(CommonAction.java:42) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) I ran same program with Tomcat 7.0.12 and it works fine. Here are my configurations: 1. In META-INF/context.xml 2. In WEB-INF/web.xml jdbc/dynic javax.sql.DataSource Container Shareable 3. In factory class I have public class DynICFactory implements JNDIInterface{ private DataSource dataSource; @Overridepublic DataSource getDataSource() {return dataSource;} @Overridepublic AgencyInterface createAgencyManager() { AgencyImpl manager = new AgencyImpl(); manager.setDataSource(dataSource); return manager; } public DynICFactory() throws DAOException { DataSource ds = null; try { Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup("java:comp/env"); ds = (DataSource) envCtx.lookup("jdbc/dynic"); } catch (NamingException e) { throw new DAOException("Tomcat JNDI setup failed", e); } this.dataSource = ds; } } On 9/6/2011 4:11 PM, Anjib Mulepati wrote: Hi All, I am trying to setup JNDI mapping for oracle JDBC Connection Pooling with Tomcat 6.0.29. This is giving me following error javax.naming.NameNotFoundException: Name dynic is not bound in this Context org.apache.naming.NamingContext.lookup(NamingContext.java:770) org.apache.naming.NamingContext.lookup(NamingContext.java:140) org.apache.naming.NamingContext.lookup(NamingContext.java:781) org.apache.naming.NamingContext.lookup(NamingContext.java:153) org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(ResourceLinkFactory.java:97) javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) org.apache.naming.NamingContext.lookup(NamingContext.java:793) org.apache.naming.NamingContext.lookup(NamingContext.java:140) org.apache.naming.NamingContext.lookup(NamingContext.java:781) org.apache.naming.NamingContext.lookup(NamingContext.java:153) com.anjib.factory.DynICFactory.(DynICFactory.java:41) com.anjib.actions.CommonAction.execute(CommonAction.java:42) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)I ran same program with Tomcat 7.0.12 and it works fine. Here are my configurations:1. In META-INF/context.xml 2. In WEB-INF/web.xml jdbc/dynic javax.sql.DataSource Container Shareable 2. In factory class I havepublic class DynICFactory implements JNDIInterface{ private DataSource dataSource;@Overridepublic DataSource getDataSourc
RE: JNDI configuration with 6.0.29
I am trying to setup JNDI mapping for oracle JDBC Connection Pooling with Tomcat 6.0.29. This is giving me following error javax.naming.NameNotFoundException: Name dynic is not bound in this Context org.apache.naming.NamingContext.lookup(NamingContext.java:770) org.apache.naming.NamingContext.lookup(NamingContext.java:140) org.apache.naming.NamingContext.lookup(NamingContext.java:781) org.apache.naming.NamingContext.lookup(NamingContext.java:153) org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(ResourceLinkFactory.java:97) javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) org.apache.naming.NamingContext.lookup(NamingContext.java:793) org.apache.naming.NamingContext.lookup(NamingContext.java:140) org.apache.naming.NamingContext.lookup(NamingContext.java:781) org.apache.naming.NamingContext.lookup(NamingContext.java:153) com.anjib.factory.DynICFactory.(DynICFactory.java:41) com.anjib.actions.CommonAction.execute(CommonAction.java:42) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) I ran same program with Tomcat 7.0.12 and it works fine. Here are my configurations: 1. In META-INF/context.xml 2. In WEB-INF/web.xml jdbc/dynic javax.sql.DataSource Container Shareable 3. In factory class I havepublic 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 { Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup("java:comp/env"); ds = (DataSource) envCtx.lookup("jdbc/dynic");} catch (NamingException e) { throw new DAOException("Tomcat JNDI setup failed", e); } this.dataSource = ds; } Anjib Man Mulepati 409-225-6216 > Date: Wed, 7 Sep 2011 10:55:19 +0100 > From: p...@pidster.com > To: users@tomcat.apache.org > Subject: Re: JNDI configuration with 6.0.29 > > On 06/09/2011 21:11, Anjib Mulepati wrote: > > > > Hi All, > > I am trying to setup JNDI mapping for oracle JDBC Connection Pooling with > > Tomcat 6.0.29. This is giving me following error > > javax.naming.NameNotFoundException: Name dynic is not bound in this Context > > org.apache.naming.NamingContext.lookup(NamingContext.java:770) > > org.apache.naming.NamingContext.lookup(NamingContext.java:140) > > org.apache.naming.NamingContext.lookup(NamingContext.java:781) > > org.apache.naming.NamingContext.lookup(NamingContext.java:153) > > > > org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(ResourceLinkFactory.java:97) > > javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) > > org.apache.naming.NamingContext.lookup(NamingContext.java:793) > > org.apache.naming.NamingContext.lookup(NamingContext.java:140) > > org.apache.naming.NamingContext.lookup(NamingContext.java:781) > > org.apache.naming.NamingContext.lookup(NamingContext.java:153) > > com.anjib.factory.DynICFactory.(DynICFactory.java:41) > > com.anjib.actions.CommonAction.execute(CommonAction.java:42) > > > > org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) > > > > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) > > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) > > org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:617) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:717)I ran same > > program with Tomcat 7.0.12 and it works fine. Here are my configurations:1. > > In META-INF/context.xml > path="/ClientDAOTest"> > auth="Container"type="oracle.jdbc.pool.OracleDataSource" > > driverClassName="oracle.jdbc.driver.OracleDriver" > > factory="oracle.jdbc.pool.OracleDataSourceFactory" > > url="jdbc:oracle:thin:@//localhost:4001/SAIDIT&qu
JNDI configuration with 6.0.29
Hi All, I am trying to setup JNDI mapping for oracle JDBC Connection Pooling with Tomcat 6.0.29. This is giving me following error javax.naming.NameNotFoundException: Name dynic is not bound in this Context org.apache.naming.NamingContext.lookup(NamingContext.java:770) org.apache.naming.NamingContext.lookup(NamingContext.java:140) org.apache.naming.NamingContext.lookup(NamingContext.java:781) org.apache.naming.NamingContext.lookup(NamingContext.java:153) org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(ResourceLinkFactory.java:97) javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) org.apache.naming.NamingContext.lookup(NamingContext.java:793) org.apache.naming.NamingContext.lookup(NamingContext.java:140) org.apache.naming.NamingContext.lookup(NamingContext.java:781) org.apache.naming.NamingContext.lookup(NamingContext.java:153) com.anjib.factory.DynICFactory.(DynICFactory.java:41) com.anjib.actions.CommonAction.execute(CommonAction.java:42) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)I ran same program with Tomcat 7.0.12 and it works fine. Here are my configurations:1. In META-INF/context.xml 2. In WEB-INF/web.xml jdbc/dynic javax.sql.DataSource Container Shareable 2. In factory class I havepublic class DynICFactory implements JNDIInterface{ private DataSource dataSource;@Overridepublic DataSource getDataSource() {return dataSource;} @Overridepublic AgencyInterface createAgencyManager() { AgencyImpl manager = new AgencyImpl(); manager.setDataSource(dataSource);return manager;} public DynICFactory() throws DAOException {DataSource ds = null; try {Context initCtx = new InitialContext();Context envCtx = (Context) initCtx.lookup("java:comp/env");ds = (DataSource) envCtx.lookup("jdbc/dynic");} catch (NamingException e) {throw new DAOException("Tomcat JNDI setup failed", e);}this.dataSource = ds;}} Anjib Man Mulepati 409-225-6216
Setting max file upload size
I am trying to upload the larger file through my app developed using Struts 1.3.8. I did change the config in struts to upload file upto 3GB but that doesn't work. So now I am trying to find the configuration in Tomcat where I can set the max size for file upload. Is there any? Anjib - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org