Context.xml configuration for database connetion in struts

here is the content of context.xml
<Context antiJARLocking="true" path="/WebApplication5">
    <!-- Specify a JDBC datasource -->
    <Resource name="jdbc/aaa"
              auth="Container"
              type="javax.sql.DataSource"
              username="campus"
              password="camp123"
              driverClassName="com.mysql.jdbc.Driver"
              url="jdbc:mysql://192.168.0.226:3306/training"/>
</Context>here is the usage
public boolean query(empform f)throws NamingException,SQLException {
        //Connection conn=null;
//        String url = "jdbc:mysql://192.168.0.226:3306/";
//        String dbname = "training";
//Connection c=null;
        ResultSet rs = null;
        System.out.println("resultset out of try");
        try {
            // Get DataSource
            System.out.println("resultset 1");
            Context ctx = new InitialContext();
            System.out.println("resultset2 ");
            DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/aaa");
// Get Connection and Statement
            System.out.println(ds);
            Connection c = ds.getConnection();
            System.out.println("resultset4");
//                 Class.forName("com.mysql.jdbc.Driver");
//                 conn = DriverManager.getConnection(url+dbname,"campus","camp123");
            PreparedStatement ps;
            String query = "select * from loginemp where username=? and password=?";
            ps = c.prepareStatement(query);
            ps.setString(1, f.getUsername());
            ps.setString(2, f.getPassword());
            rs = ps.executeQuery();
            System.out.println("resultset" + rs);
           if(rs.next()) {
               System.out.println(rs.getString("username"));
               return true;
           else
               return false;
        } catch (Exception e) {
            // conn.close();
            System.out.println("in catch of login dao" + e);
        return false;
    }Im getting error
resultset out of try
resultset 1
resultset2
org.apache.tomcat.dbcp.dbcp.BasicDataSource@a5c9f1
in catch of login dao
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1136)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at com.myapp.struts.LoginDao.query(LoginDao.java:40)
at com.myapp.struts.Business.login(Business.java:20)
at com.myapp.struts.empAction.execute(empAction.java:25)
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.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
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.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
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:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1130)
... 25 more
can anyone help...

Bhararrajverma wrote:
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'Looks like it can't find the JDBC driver. The MySQL JDBC driver jar must be available either in your web app or in the shared tomcat library directory. Is it there?

Similar Messages

  • Any practical help about XML API for databases

    HI friends,
    I have a problem, i want to connect to my Database using JSP but by using XML api for database. I want to MAP my database tables, rows columns as xml elements to make it more flexible. Anyone who had practicaly worked on it, please help me out.
    I am waiting for a quick response.
    Thanks for any help in advance,
    Yours Truly,
    Khawaja Salman Sarfraz

    Some databases have a feature that allows you to output the result of a query as XML. But that's not standard SQL, and it probably varies from one DB to the next. Look up the documentation for your DB for more information.

  • Web.xml configuration for initial servlet load

    Hi all,
    I have heard of entering some tag into web.xml file (deployement descriptor) if we need some servlets to be loaded wheneve the app server starts or restarts. can some body help me regarding what to write in web.xml.
    thanks in advance

    I am having some problems with the same issue although specifying the load-on-startup param is not working for.
    Here is snipet of the web.xml:
    <servlet id="Servlet_1206024889339">
    <servlet-name>ContentServer</servlet-name>
    <servlet-class>COM.FutureTense.Servlet.SContentServer</servlet-class>
    <init-param id="InitParam_1206024988781">
    <param-name>inipath</param-name>
    <param-value>/data/WebSphere/ContentServer</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    This however doesn't init the contentServer servlet. Is there anythign else i need to check? I am using websphere5-1.
    I saw somewhere you might have to specify a loadonstartup=true? Where is this set?
    I know the app is reading the right web.xml because i put in a bad value and saw the error being outputted in the startup log.
    There are some servlets being initialised on startup but not the ones I want. These servlets don't seem to be in the web.xml.
    [10/10/08 11:53:30:265 IST] 1e06de8 WebContainer A SRVE0169I: Loading Web Module: cs.war.
    [10/10/08 11:53:33:330 IST] 1e06de8 WebGroup I SRVE0180I: [cs.war] [servlet] [Servlet.LOG]: JSP 1.2 Processor: init
    [10/10/08 11:53:34:098 IST] 1e06de8 WebGroup I SRVE0180I: [cs.war] [servlet] [Servlet.LOG]: SimpleFileServlet: init
    [10/10/08 11:53:34:117 IST] 1e06de8 WebGroup I SRVE0180I: [cs.war] [servlet] [Servlet.LOG]: DirectoryBrowsingServlet: init

  • Single XML configuration file for all the SSIS packages(including parent and child packages)

    Hi
    I have some 16 ssis packages. source Db and destination Db for these packages are common. I am calling these child packages in a master package.
    I want to use only one XML config file for this master.
    How do i use same for all child packages?
    and can i do it with parent package variable?

    I created a master package with a variable master, and in value i have entered the configuration file path.
    Hi vjp dinu,
    You should create variables in the parent package to pass values to variables in each child package rather than pass the file path of the XML Configurations file of the parent package.
    As Visakh mentioned, you can achieve your goal by creating corresponding variables in the parent package for each child package, and enable Package Configurations for the parent package so that you can control the values through the XML Configurations file
    for the variables of the parent package.
    Supposing there is a variable FilePath in child package 1, a variable ServerName in child package 2, then, we need to create two variables pFilePath, pServerName in the parent package. After configuring the Parent package variable in each child package (e.g.
    mapping pFilePath to FilePath, pServerName to ServerName), you can enable XML Configurations for the parent package, and expose the value property for both pFilePath and pServerName variables. In this way, you can modify the XML Configurations file of the
    parent package and the specified values will passed to the child packages.
    Reference:
    http://microsoft-ssis.blogspot.com/2011/06/passing-variables-from-parent-package.html 
    Regards,
    Mike Yin
    TechNet Community Support

  • Bespoke UWL XML Configurations - conditional actions

    Hi,
    We're currenly running a PoC system, I've set up a custom XML configuration for a task within the UWL and everything working as expected....
    I know you can hide and add actions per task by either using the iView property settings or updating the XML itself, but is there anyway you can display or hide an action based solely on a value within that workitem?
    So you'll have the UWL displayed with 2 types of work items, one will show one set of buttons in the detail area, but when you click on the other WI..., (same task), but with a different value within a column field, you display another set of buttons/actions?
    The only way I can think of doing anything like this would be create an additional task and share the same view..., not sure if that would work.

    Solved .
    I was writing wrong
    <DisplayAttribute name="Reject" type="radiobutton" width="" sortable="no" format="default" actionRef="Rejected" referenceBundle="Rejected" hAlign="CENTER" vAlign="BASELINE" maxTextWidth="0" headerVisible="yes"/>
    The actionRef and referenceBundle above  should be same as defined in ItemType.

  • How to  configure  for struts-config.xml

    Hi
    I am having a JSp which is Mapped to anothr action through the registration.The registartion is mapped to action
    <%@ page contentType="text/html;charset=UTF-8" %>
    <%@ page import="org.apache.struts.validator.ValidatorPlugIn" session="true" %>
    <%@ page import="org.apache.struts.Globals" %>
    <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
    <%@ taglib uri="/tags/struts-html" prefix="html" %>
    <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
    <html:html locale="true">
    <head>
    <title><bean:message key="index.title"/></title>
    <html:base/>
    </head>
    <body bgcolor="white">
    <logic:notPresent name="<%= Globals.MESSAGES_KEY %>" >
      <font color="red">
        ERROR:  Application resources not loaded -- check servlet container
        logs for error messages.
      </font>
    </logic:notPresent>
    <%-- :TODO: Need code to do this with moudles
    <logic:notPresent name="<%= ValidatorPlugIn.VALIDATOR_KEY %>" >
      <font color="red">
        ERROR:  Validator resources not loaded -- check Commons Logging
        logs for error messages.
      </font>
    </logic:notPresent>
    --%>
    <h3><bean:message key="registrationForm.title"/>1222AAAAAAAAAAAAA</h3>
    <ul>
      <li><html:link action="Test.jsp">Test212121.jsp</html:link >
       <li><html:link action="/registration"><bean:message key="registrationForm.title"/></html:link></li>
       <%System.out.println("hellooooooooooooo");%>
       <!-- :TODO: Should have a non-JaveScript message-by-field example -->
       <li>
          <html:link action="/jsRegistration"><bean:message key="jsRegistrationForm.title"/></html:link> -
          <bean:message key="jsRegistrationForm.description"/>
       </li>
       <li>
          <html:link action="/multiRegistration"><bean:message key="multiRegistrationForm.title"/></html:link> -
          <bean:message key="multiRegistrationForm.description"/>
       </li>
    </ul>
    <a href="registration.jsp">Registration Test</a>
    <p> </p>
    <h3><bean:message key="typeForm.title"/></h3>
    <ul>
       <li>
          <html:link action="/type"><bean:message key="typeForm.title"/></html:link> -
          <bean:message key="typeForm.description"/>
       </li>
       <li>
          <html:link action="/editJsType"><bean:message key="jsTypeForm.title"/></html:link> -
          <bean:message key="jsTypeForm.description"/>
       </li>
    </ul>
    <p> </p>
    <h3>Change Language | Changez Le Langage</h3>
    <ul>
       <li><html:link action="/locale?language=en">English | Anglais</html:link></li>
       <li>
          <html:link action="/locale?language=fr">French | Francais</html:link> -
          <bean:message key="localeForm.fr"/>
       </li>
       <li>
          <html:link action="/locale?language=fr&country=CA">French Canadian | Francais Canadien</html:link> -
          <bean:message key="localeForm.frCA"/>
       </li>
       <li>
          <html:link action="/locale?language=ja" useLocalEncoding="true">Japanese | Japonais</html:link> -
          <bean:message key="localeForm.ja"/>
       </li>
    </ul>
    <p> </p>
    ==============struts-config.xml=================\<?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
    "http://struts.apache.org/dtds/struts-config_1_2.dtd">
    <struts-config>
    <!--============================================== Form Bean Definitions -->
    <form-beans>
    <!-- Registration form bean -->
    <form-bean name="registrationForm" type="validator.RegistrationForm" />
    <!-- Multi-Part Registration form bean -->
    <form-bean name="multiRegistrationForm" type="validator.RegistrationForm" />
    <!-- Type form bean -->
    <form-bean name="typeForm" type="validator.TypeForm" />
    <!-- JavaScript Type form bean -->
    <form-bean name="jsTypeForm" type="validator.TypeForm" />
    </form-beans>
    <!-- ======================================== Global Forward Definitions -->
    <global-forwards>
    <forward name="home" path="/index.jsp" />
    </global-forwards>
    <!-- ========================================= Action Mapping Definitions -->
    <action-mappings>
    <action path="/welcome" forward="/index.jsp" />
    <!-- Registration Action
         -->
    <forward name="registration" path="/registration.do" /> //// ==========>here it is mapped
         <action path="/registration" forward="/registration.jsp" />
         <action path="/registration-submit" type="validator.RegistrationAction" name="registrationForm" scope="request" validate="true" input="input">
    <forward name="input" path="/registration.do" />
    <forward name="success" path="/index.jsp" />
    </action>
         <action path="/jsRegistration" forward="/jsRegistration.jsp" />
    <!-- Multi-Part Registration Action -->
    <action path="/multiRegistration" forward="/multiRegistration1.jsp" />
    <action path="/multiRegistration-submit" type="validator.MultiRegistrationAction" name="multiRegistrationForm" scope="request" validate="false">
    <forward name="success" path="/welcome.do" />
    <forward name="input1" path="/multiRegistration1.jsp" />
    <forward name="input2" path="/multiRegistration2.jsp" />
    </action>
    <!-- Type Action -->
    <action path="/type" forward="/type.jsp" />
    <action path="/type-submit" type="validator.TypeAction" name="typeForm" scope="request" validate="true" input="input">
    <forward name="input" path="/type.do" />
    <forward name="success" path="/welcome.do" />
    </action>
    <!-- JavaScript Type Action -->
    <action path="/editJsType" type="validator.EditTypeAction" scope="request" validate="false">
    <forward name="success" path="/jsType.do" />
    </action>
    <action path="/jsType" forward="/jsType.jsp" />
    <action path="/jsType-submit" type="validator.TypeAction" name="jsTypeForm" scope="request" validate="true" input="input">
    <forward name="input" path="/editJsType-submit.do?typeForm.reset=false" />
    <forward name="success" path="/welcome.do" />
    </action>
    <!-- Locale Action -->
    <action path="/locale" type="validator.LocaleAction" name="localeForm" scope="request">
    <forward name="success" path="/welcome.do" />
    </action>
    </action-mappings>
    <!-- ============================================= Controller Definition -->
    <controller inputForward="true" />
    <!-- ===================================== Message Resources Definitions -->
    <message-resources parameter="validator.MessageResources" />
    <!-- ============================================ Plug Ins Configuration -->
    <!--
    Add multiple validator resource files by setting the pathnames property
    with a comma delimitted list of resource files to load.
    -->
    <plug-in className="validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validator/validation.xml" />
    <set-property property="stopOnFirstError" value="true" />
    </plug-in>
    </struts-config>
    <html:img page="/struts-power.gif" altKey="index.powered"/>
    </body>
    </html:html>

    Hey,
    U can do it the way u want. Use DispatchAction Class instead of Action Class. Just go through the documentation for this. If u still have problem let me know.
    Thanks
    KM
    Hi,
    I am new to struts and when i am doing my application i find some >>difficulty i.e,
    I have two buttons on a jsp page Save,Delete.when I click on >>save ,saveAction must be called.if we click delete deleteAction to be >>called.
    for this how can I configure in struts-config.xml file. and how it >>knows which button has been clicked.
    Can any one please guid me.
    Thanks

  • COnfiguring Struts-config.xml file for two level popup windows?

    This is the code for 1st level
    <action path="/search/advanced" scope="request" parameter="method"
                   type="org.fao.gilw.agris.action.AdvancedSearchAction" name="advancedForm" validate="false">
                   <forward name="failed" path="/search/advanced.jsp" redirect="false"/>
                   <forward name="success" path="/search/advanced.jsp" redirect="false"/>
              </action>"search" is the main window, in this window I'm opening/loading a pop-up window called " advanced" ..the above code is for this
    Now again i want to pop-up another window in "advanced" page
    So how to configure for this in Struts-config.xml file...?

    Better post this question at a Struts related forum. There is a mailinglist at their own homepage and a forum at Nabble.com.

  • Error regarding to the configuration of "Data Source" in Struts-config.xml

    Hi,
    Any 1 just help me out. I am using NetBeans 4.1 bundeled with Sun App server 8.1. Now I wanted to make the database connectivity with the front -end using"Data-source" tag in the struts-config.xml file . I am using the Oracle 9i as database.But I am not able to do it , it's showing me again and again error.I got realy fed up with this. I have checked the code as well as the the struts-config.xml file syntaxes with many other books and online resources, I couldn't find any sort of anomaly over here.So some 1 plzz help me regarding this as early as possible.I am attaching the Struts-config .xml file code as well as the error messaage over here.
    Struts-config.xml file code is...
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
    "http://struts.apache.org/dtds/struts-config_1_2.dtd">
    <struts-config>
    <!-- ============================================ Data Source Configuration -->
    <data-sources>
    <data-source type="org.apache.commons.dbcp.BasicDataSource" key="RoseKey">
    <set-property
    property="driverClassName"
    value="oracle.jdbc.driver.OracleDriver" />
    <set-property
    property="url"
    value="jdbc:oracle:thin://10.31.8.49:1521:USGFS" />
    <set-property
    property="username"
    value="EPTP2DEV" />
    <set-property
    property="password"
    value="EPTP2DEV" />
    <set-property
    property="maxActive"
    value="10" />
    <set-property
    property="maxWait"
    value="5000" />
    <set-property
    property="defaultAutoCommit"
    value="false" />
    <set-property
    property="defaultReadOnly"
    value="false" />
    <!--set-property
    property="validationQuery"
    value="SELECT COUNT(*) FROM address" /-->
    </data-source>
    </data-sources>
    <!-- ======================================== Form Bean Definitions -->
    <form-beans>
    <form-bean
    name="AddressForm"
    type="app.AddressForm"/>
    <form-bean
    name="DVDForm"
    type="app.DVD"/>
    </form-beans>
    <!-- =================================== Global Forward Definitions -->
    <!--global-forwards>
    <forward
    name="logoff"
    path="/Logoff.do"/>
    <forward
    name="logon"
    path="/Logon.do"/>
    <forward
    name="welcome"
    path="/Welcome.do"/>
    </global-forwards-->
    <!--global-forward>
    <forward
    name="Address1"
    path="/pages/Address.jsp"/>
    </global-forward-->
    <!-- =================================== Action Mapping Definitions -->
    <action-mappings>
    <!--action
    path="/Welcome"
    type="org.apache.struts.actions.ForwardAction"
    parameter="/pages/Welcome.jsp"/>
    <action
    path="/Logon"
    type="org.apache.struts.actions.ForwardAction"
    parameter="/pages/Logon.jsp"/-->
    <action
    path="/Address"
    type="app.AddressAction"
    name="AddressForm"
    scope="request"
    validate="true"
    input="/pages/Address.jsp">
    <forward
    name="success"
    path="/pages/success.jsp"/>
    </action>
    <action
    path="/TestAction"
    type="app.TestAction">
    <forward
    name="testAction"
    path="/pages/TestAction.jsp"/>
    </action>
    <action
    path="/TestDVD"
    type="app.DVDAction"
    name="DVDForm">
    <forward
    name="testDVD"
    path="/pages/Movie.jsp"/>
    </action>
    <action
    path="/DataSource"
    type="app.TestDataSource">
    <forward
    name="joy"
    path="/pages/joy.jsp"/>
    </action>
    </action-mappings>
    <message-resources parameter="resources.ApplicationResources"/>
    </struts-config>
    And the error I am getting in the Server console is ..
    org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Io exception: The Network Adapter could not establish the connection)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)
    at org.apache.commons.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:598)
    at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:808)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:335)
    at javax.servlet.GenericServlet.init(GenericServlet.java:261)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:118)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1093)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:931)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4183)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4536)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:241)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:827)
    at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:125)
    at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:147)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:809)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1279)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1006)
    at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:160)
    at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:238)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:918)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:905)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:427)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:139)
    at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:288)
    at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:155)
    at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:258)
    at com.sun.enterprise.deployment.phasing.StartPhase.runPhase(StartPhase.java:87)
    at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:71)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:633)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:361)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:396)
    at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:702)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:302)
    at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:357)
    at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
    at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
    at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:54)
    at $Proxy1.invoke(Unknown Source)
    at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:272)
    at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:38)
    at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:92)
    at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:69)
    at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:94)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
    at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
    Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
    at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
    at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
    at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
    ... 92 more
    AND..
    javax.servlet.UnavailableException: Initializing application data source RoseKey
    at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:812)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:335)
    at javax.servlet.GenericServlet.init(GenericServlet.java:261)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:118)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1093)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:931)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4183)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4536)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:241)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:827)
    at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:125)
    at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:147)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:809)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1279)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1006)
    at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:160)
    at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:238)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:918)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:905)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:427)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:139)
    at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:288)
    at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:155)
    at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:258)
    at com.sun.enterprise.deployment.phasing.StartPhase.runPhase(StartPhase.java:87)
    at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:71)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:633)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:361)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:396)
    at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:702)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:302)
    at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:357)
    at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
    at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
    at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:54)
    at $Proxy1.invoke(Unknown Source)
    at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:272)
    at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:38)
    at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:92)
    at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:69)
    at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:94)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
    at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
    Plz some1 help me as soon as possible with some ideas so that I can resolve the issue.

    Hi Amit Garg,
    <data-sources>
    <data-source type = "org.apache.commons.dbcp.BasicDataSource" key = "DBA">
    </data-source>
    <data-sources>
    <data-source type = "org.apache.commons.dbcp.BasicDataSource" key = "AISDEV">
    </data-source>
    </data-sources>
    u just configure ur struts-config.xml file in the above manner and use the following steps in ur action servlet to retrive the DataSource object
    getDatasource(request,"DBA") for accessing first datasource
    getDatasource(request,"AISDEV") for accessing second datasource.
    byeeeeee

  • Configuring XML Publisher for Standalone EnterpriseOne 8.12

    Could someone please help me in configuring XML Publisher for Standalone EnterpriseOne 8.12.
    As per the installation guide for 8.12, I have created a new data source to SQL Server named EnterpriseOne Local.
    Also, I have used "With Windows NT authentication using the network login ID" for this ODBC.
    Now I tried :
    Data Source Name : EnterpriseOne Local
    URL : jdbc:microsoft:sqlserver://localhost:1433
    User : My NT domain ID
    Password : MY NT domain password
    Database Driver Class : com.microsoft.jdbc.sqlserver.SQLServerDriver
    in XML publishers admin tab, but it doesnt work.
    Is the above setting correct?

    make sure you can connect with "my NT domain ID"/"my NT domain password" in SQLserver Mangement studio express using SQL server authenication.
    Try the setting using JDeveloper for DB conncection. If not successful then u must add the
    sqljdbc.jar into your JAVA_HOME/lib
    HTH
    Shaun

  • Error in connecting the database with context.xml resource

    Dear everyone,
    i am trying to connect the application with database...
    i have a table with employee id, name...
    i have given context xml and established connection..
    but i am getting error as
    * " Element type "Resource" must be followed by either attribute specifications, ">" or "/>"."
    * "The context.xml file seems to be broken. Check whether it is well-formed and valid."
    anyone please give ur suggestions....

    the error that i received now was...
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    An error occurred at line: 34 in the jsp file: /index.jsp
    Context cannot be resolved to a type
    31:        int i=0;
    32:       
    33:       
    34:        Context ctx = new InitialContext();
    35:        DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/employee");
    36:       
    37:        try
    An error occurred at line: 34 in the jsp file: /index.jsp
    InitialContext cannot be resolved to a type
    31:        int i=0;
    32:       
    33:       
    34:        Context ctx = new InitialContext();
    35:        DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/employee");
    36:       
    37:        try
    An error occurred at line: 35 in the jsp file: /index.jsp
    DataSource cannot be resolved to a type
    32:       
    33:       
    34:        Context ctx = new InitialContext();
    35:        DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/employee");
    36:       
    37:        try
    38:         {
    An error occurred at line: 35 in the jsp file: /index.jsp
    DataSource cannot be resolved to a type
    32:       
    33:       
    34:        Context ctx = new InitialContext();
    35:        DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/employee");
    36:       
    37:        try
    38:         {
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.

  • Context.xml for Tomcat using Weblogic JMS

    Hello,
              has anyone succeeded in getting Tomcat to use a queue hosted by Weblogic? If so, could you please post a snippet of your context.xml with the <Resource>... sections appropriate? My last attempt drowned in a sea of bizarre security exceptions and hasn't been seen since.
              Thanks,
              Richard

    Tom,
              I'll see what happens when I move things about, but really, there's a difference here. One of the issues here is that Tomcat needs a class that implements the ReferenceFactory interface for its configuration. I can't find such a class in the Weblogic docs, but I might have it all wrong or be looking in the wrong place. Hence, my question.
              The weblogic jar is not in the Tomcat classpath, it's in the WEB-INF/lib directory of the war file I'm working with.

  • Referencing Database from Context.xml

    In the Context.xml file, I have reference to the database I am using for the application. Here is the Context.xml code.
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="ABATE" reloadable="true" docBase="C:\Documents and Settings\koconnor\EclipseWorkspace\ABATE" workDir="C:\Documents and Settings\koconnor\EclipseWorkspace\ABATE\work" >
         <Resource name="jdbc/ABATE" auth="Container" scope="Shareable" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000"
            username="ccn" password="ccn" driverClassName="com.mysql.jdbc.Driver"
            url="jdbc:mysql://localhost:3306/abate?autoReconnect=true"/>     
    </Context>Basically; what I need to know is how I can reference the value stored in "url" within a java class.

    The point is that you DON'T access the URL directly. You just look up the datasource by name: jdbc/ABATE, and ask it for a connection. It will use the url to give you a database connection.
    It abstracts the connection details from your code.

  • Cleanup of Context xml file in EBS Database

    Hello Team:
    I recently upgraded my database to 11g and ran autoconfig to reflect the new environment settings. For some reasons when I look at the env set. I am seeing the 9.2.0 instances also listed in it.
    [oradev@brazeau appsutil]$ env | grep 9.2.0
    PERL5LIB=/u02/dev/oradev/devdb/9.2.0/Apache/perl/lib/5.00503:/u02/dev/oradev/devdb/9.2.0/Apache/perl/lib/site_perl/5.005:/u02/dev/oradev/devdb/9.2.0/appsutil/perl:/u02/dev/oradev/devdb/10.2.0/appsutil/perl:/u02/dev/oradev/devdb/11.1.0/appsutil/perl
    TNS_ADMIN=/u02/dev/oradev/devdb/9.2.0/network/admin/SID_host
    PATH=/u02/dev/oradev/devdb/9.2.0/Apache/perl/bin:/u02/dev/oradev/devdb/9.2.0/Apache/perl/bin:/u02/dev/oradev/devdb/9.2.0/Apache/perl/bin:/u02/dev/oradev/devdb/9.2.0/Apache/perl/bin:/u02/dev/oradev/devdb/11.1.0/bin:/usr/bin:/usr/sbin:/u02/dev/oradev/devdb/9.2.0/jre/1.4.2/bin:/usr/ccs/bin:/bin:/usr/bin/X11:/usr/local/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/u02/dev/oradev/bin:.:.:.:.
    ADPERLPRG=/u02/dev/oradev/devdb/9.2.0/Apache/perl/bin/perl
    I need to clean this up. The next thing that I am seeing is this . The Database listener file.It is still using the 9.2.0 listener file instead of the 11g one.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    STATUS of the LISTENER
    Alias DEV
    Version TNSLSNR for Linux: Version 11.1.0.6.0 - Production
    Start Date 02-JUL-2008 12:43:41
    Uptime 6 days 3 hr. 40 min. 47 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /u02/dev/oradev/devdb/9.2.0/network/admin/DEV_host/listener.ora
    Listener Log File /u02/dev/oradev/devdb/11.1.0/log/diag/tnslsnr/host/dev/alert/log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROCDEV)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host.thebrick.com)(PORT=1521)))
    I think i need to change the TNS_ADMIN value so the database will start using the 11g listener right.
    Can I manually update the context.xml to correct values ? How should I proceed in this situation?
    Regards,
    BMP

    I think i need to change the TNS_ADMIN value so the database will start using the 11g listener right.
    Can I manually update the context.xml to correct values ? How should I proceed in this situation?- Make sure the database is up
    - Update the 11g listener.ora file manually and start the listener (using lsnrctl)
    - Edit the Context File and make the necessary changes
    - Run AutoConfig
    - As oracle user, open a new session and source the database env file again
    - Issue the command “env | grep 9.2.0” again to verify that all references to 9.2.0 ORACLE_HOME are no longer exist
    - Shutdown/Startup the listener/database

  • Tomcat 5.5 context.xml, how to configure the Host element

    [Probably this question should be asked elsewhere, if so please advise]
    Dear all,
    I understand that Tomcat 5.5 prefers that your web application comes with a context.xml file under the META-INF folder.
    So I added a context.xml file under the META-INF folder of my web application,
    please have a look below.
    context.xml
    <Context path="" docBase="C://Program Files//Apache Software Foundation//Tomcat 5.5//webapps//test">
         <Resource
              name="jdbc/testDB"
              factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
              auth="Container"
              type="javax.sql.DataSource"
              maxActive="10"
              maxIdle="5"
              maxWait="10000"
              removeAbandoned="true"
              removeAbandonedTimeout="60"
              logAbandoned="true"
              username="username"
              password="password"
              driverClassName="com.mysql.jdbc.Driver"
              url="jdbc:mysql://localhost:3306/test" />
    </Context> Ok, that is good so far, but how do I configure the Host element.
    I mean how do you link a specific Host to a specific Context?
    Before, the Context element was a sub element of the Host element,
    now it is completely separated.
    Host in server.xml
    <Host name="www.test.com" deployOnStartup="true" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
         <Valve
              className="org.apache.catalina.valves.FastCommonAccessLogValve"
              prefix="test_access_log."
              suffix=".txt"
              pattern="common"
              directory="C://Program Files//Apache Software Foundation//Tomcat 5.5//webapps//test//logs"/>
    </Host> I assume that if I modify the appBase of the Host element from webapps to webapps/test then it would work, but if I have several
    Contexts for the specific Host, how should I configure it then?
    Please help by giving examples!

    OK, I have changed the Host's appbase to webapps/mytestapplication.
    I want to deploy a test.war under the appbase:
    webapps/mytestapplication/test.war
    The name of the host is www.test.com
    Because the war file is not named ROOT.war (instead it is named test.war),
    the URL to the test application would be www.test.com/test.
    Now I have several relative anchor links in the test application
    Say for example the test application is deployed and accessed through www.test.com/test.
    Clicking on the aboutus link would change to URL to www.test.com/aboutus.html.
    Instead, for this to work, the URL must be www.test.com/test/aboutus.html.
    Obviously, the easiest solution is to add /test before each anchor link:
    But the there must a different solution.
    Adding a path to Context element did not work:
    <Context path="/test" ...>
    </Context>
    Question:
    1. what is the solution for the anchor scenario above, should I add /test before each link?
    2. Is my configuration (can be seen at the bottom) correct?
    Basically, I have removed the path and docBase attributes from the Context element.
    I have also set autoDeploy to false in the Host element.
    Here are a few paragraphs from the docs:
    autoDeploy attribute of Host element:
    "Finally, note that if you are defining contexts explicitly,
    you should probably turn off automatic application deployment.
    Otherwise, your context will be deployed twice each, and that may cause problems for your app."
    OK, so I set autoDeploy to false since I am defining contexts explicitly, (META-INF/context.xml)
    docBase attribute of Context element:
    The value of this field must not be set when the Context
    is configured using a META-INF/context.xml file as it will be inferred by the automatic deployment process.
    So, I remove the docBase attribute eventhough I am confused a bit.
    This is the part that confuses me:
    If autoDeploy is set to false since I am defining contexts explicitly,
    how can then anything be inferred by the automatic
    deployment process? (please answer!)
    There should not be any automatic deployment process when autoDeploy is set to false.
    path attribute of Context element:
    The value of this field must not be set except when statically defining a Context in server.xml,
    as it will be inferred from the filenames used for either the .xml context file or the docBase.
    Same as the Context element.
    Thanks!
    <Context>
         <Resource
              name="jdbc/testDB"
              factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
              auth="Container"
              type="javax.sql.DataSource"
              maxActive="10"
              maxIdle="5"
              maxWait="10000"
              removeAbandoned="true"
              removeAbandonedTimeout="60"
              logAbandoned="true"
              username="username"
              password="password"
              driverClassName="com.mysql.jdbc.Driver"
              url="jdbc:mysql://localhost:3306/test" />
    </Context>
    <Host name="www.test.com" deployOnStartup="true" debug="0" appBase="webapps/mytestapplication" unpackWARs="true" autoDeploy="false" xmlValidation="false" xmlNamespaceAware="false">
         <Valve
              className="org.apache.catalina.valves.FastCommonAccessLogValve"
              prefix="test_access_log."
              suffix=".txt"
              pattern="common"
              directory="C:/Program Files/Apache Software Foundation/Tomcat 5.5/webapps/mytestapplication/test/logs"/>
    </Host>

  • Apache server - tomcat - jk, virtual hosts, database/context.xml question?

    Hello,
    I have an web application that runs perfectly in Tomcat 5.5 when running tomcat stand-alone.
    I also have Apache HTTP server integrated with Tomcat using the jk connector and running virtual hosts in a mod_jk.conf file, which is working for html files. When I run apache and tomcat at the same time, the jsp opens but the servlet cannot get a database connection.
    To run virtual hosts and apache and tomcat, I added this host container to server.xml:
    <Host name="www.mydomain.com" debug="0" appBase="d:/WebApps/mydomain"
    unpackWARs="true" autoDeploy="true">
    <Context path="" docBase="" debug="0"/>
    </Host>
    Does anybody see anything wrong with this? Is there some reason why the context.xml (which contains the database info) is not being read?
    Any suggestions are greatly appreciated.
    Thank you,
    Logan

    Hi,
    In the docmentation of Tomcat 5.x is written that is not recommended to put <context> element in the server.xml file. Create a file in CATALINA_HOME/conf/Catalina/www.mydomain.com/ with an XML extension. For example context.xml. In files like this you should write all of your <context> elements.

Maybe you are looking for

  • My macbook won't go to sleep unless I use the Apple icon on the task bar

    I have a late 2008 macbook unibody (old i know, but its still kickin) The computer won't go into sleep mode with the lid closed or if I hit the power button. i have to manually do it with the apple icon in the top of the screen. The ambient light tha

  • Flash Player 9 fails to properly install

    I have tried everything I know to get Flash9 to work. After uninstalling I restart my computer and install flash. It says it was installed but when I go back to Adobe site and test the player nothing except Shockwave comes up. I am using Netscape and

  • Difficulty with converted jpegs

    Howdy All!! I shot a job in RAW using a Canon 30D and imported into the AP library. I renamed all images when importing to reflect the job name, but of course all retained their .crw extension. I am now having trouble opening them in any other progra

  • HP PAVILION G6 bios administrator password reset

    I have an HP Pavilion g6 that has a password set. As soon as you power up it wants a password. I saw other posts where you provided a code to bypass the password. My system code is 90139349. Any help would be greatly appreciated. Thank you in advance

  • Buzzing and skipping when removing or inserting headphone jack

    While listening to audio through iTunes, switching between the internal speakers or headphones via removing or inserting a headphone jack, often results in a loud buzzing noise. Pausing iTunes eliminates the sound, but it sometimes comes back when I