pasha701 wrote:
Doc for version Tomcat version 4.1. If you use later version, please check this link
http://www.teradata.com/DownloadCenter/Topic9364-98-1.aspxGuess, this question more applied to Tomcat forum.
To be specific I'm using jdk6_13 Tomcat-6.0.24 Oracle 10g Hibernate 3.2
My StackTrace in my customized html that calls web service is as follows is as follows:-
STATUS: 500
<?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"><faultcode>S:Server</faultcode><faultstring>Not supported by BasicDataSource</faultstring><detail><ns2:ApplicationException xmlns:ns2="http://service.services.agentevaluation.care.xxxxxxxx.com/"><message>Not supported by BasicDataSource</message></ns2:ApplicationException><ns2:exception xmlns:ns2="http://jax-ws.dev.java.net/" class="com.xxxxxxxx.care.agentevaluation.exceptions.ApplicationException" note="To disable this feature, set com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace system property to false"><message>Not supported by BasicDataSource</message><ns2:stackTrace><ns2:frame class="com.xxxxxxxx.care.agentevaluation.business.manager.xxxxxxxx" file="xxxxxxxx.java" line="100" method="searchAgent"/><ns2:frame class="com.xxxxxxxx.care.agentevaluation.services.service.xxxxxxxxxxxxxxxxServiceMaster" file="xxxxxxxxxxxxxxxxServiceMaster.java" line="78" method="searchAgent"/><ns2:frame class="sun.reflect.NativeMethodAccessorImpl" file="NativeMethodAccessorImpl.java" line="native" method="invoke0"/><ns2:frame class="sun.reflect.NativeMethodAccessorImpl" file="NativeMethodAccessorImpl.java" line="39" method="invoke"/><ns2:frame class="sun.reflect.DelegatingMethodAccessorImpl" file="DelegatingMethodAccessorImpl.java" line="25" method="invoke"/><ns2:frame class="java.lang.reflect.Method" file="Method.java" line="597" method="invoke"/><ns2:frame class="com.sun.xml.ws.api.server.InstanceResolver$1" file="InstanceResolver.java" line="246" method="invoke"/><ns2:frame class="com.sun.xml.ws.server.InvokerTube$2" file="InvokerTube.java" line="146" method="invoke"/><ns2:frame class="com.sun.xml.ws.server.sei.EndpointMethodHandler" file="EndpointMethodHandler.java" line="257" method="invoke"/><ns2:frame class="com.sun.xml.ws.server.sei.SEIInvokerTube" file="SEIInvokerTube.java" line="93" method="processRequest"/><ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="598" method="__doRun"/><ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="557" method="_doRun"/><ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="542" method="doRun"/><ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="439" method="runSync"/><ns2:frame class="com.sun.xml.ws.server.WSEndpointImpl$2" file="WSEndpointImpl.java" line="243" method="process"/><ns2:frame class="com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit" file="HttpAdapter.java" line="471" method="handle"/><ns2:frame class="com.sun.xml.ws.transport.http.HttpAdapter" file="HttpAdapter.java" line="244" method="handle"/><ns2:frame class="com.sun.xml.ws.transport.http.servlet.ServletAdapter" file="ServletAdapter.java" line="135" method="handle"/><ns2:frame class="com.sun.xml.ws.transport.http.servlet.WSServletDelegate" file="WSServletDelegate.java" line="129" method="doGet"/><ns2:frame class="com.sun.xml.ws.transport.http.servlet.WSServletDelegate" file="WSServletDelegate.java" line="160" method="doPost"/><ns2:frame class="com.sun.xml.ws.transport.http.servlet.WSServlet" file="WSServlet.java" line="75" method="doPost"/><ns2:frame class="javax.servlet.http.HttpServlet" file="HttpServlet.java" line="637" method="service"/><ns2:frame class="javax.servlet.http.HttpServlet" file="HttpServlet.java" line="717" method="service"/><ns2:frame class="org.apache.catalina.core.ApplicationFilterChain" file="ApplicationFilterChain.java" line="290" method="internalDoFilter"/><ns2:frame class="org.apache.catalina.core.ApplicationFilterChain" file="ApplicationFilterChain.java" line="206" method="doFilter"/><ns2:frame class="org.apache.catalina.core.StandardWrapperValve" file="StandardWrapperValve.java" line="233" method="invoke"/><ns2:frame class="org.apache.catalina.core.StandardContextValve" file="StandardContextValve.java" line="191" method="invoke"/><ns2:frame class="org.apache.catalina.core.StandardHostValve" file="StandardHostValve.java" line="128" method="invoke"/><ns2:frame class="org.apache.catalina.valves.ErrorReportValve" file="ErrorReportValve.java" line="102" method="invoke"/><ns2:frame class="org.apache.catalina.core.StandardEngineValve" file="StandardEngineValve.java" line="109" method="invoke"/><ns2:frame class="org.apache.catalina.connector.CoyoteAdapter" file="CoyoteAdapter.java" line="293" method="service"/><ns2:frame class="org.apache.coyote.http11.Http11Processor" file="Http11Processor.java" line="849" method="process"/><ns2:frame class="org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler" file="Http11Protocol.java" line="583" method="process"/><ns2:frame class="org.apache.tomcat.util.net.JIoEndpoint$Worker" file="JIoEndpoint.java" line="454" method="run"/><ns2:frame class="java.lang.Thread" file="Thread.java" line="619" method="run"/></ns2:stackTrace></ns2:exception></detail></S:Fault></S:Body></S:Envelope>
The print stack trace in tomcat catalina.log:-
Dec 9, 2010 9:40:06 PM com.xxxxxxxx.xxxxxxxx.agentevaluation.services.service.xxxxxxxx searchAgent
INFO: Web Service called.
Dec 9, 2010 9:40:06 PM com.xxxxxxxx.xxxxxxxx.agentevaluation.services.service.xxxxxxxx searchAgent
INFO: Translation of Service to Business object completed.
Dec 9, 2010 9:40:06 PM com.xxxxxxxx.xxxxxxxx.agentevaluation.db.dao.xxxxxxxx getAgentDetails
INFO: Query:SELECT coalesce(M.iataNo,' ') AS iataNo,coalesce(M.pcc,' ') AS pcc FROM xxxxxxxx AS M WHERE M.pcc IN (:lst) ORDER BY M.iataNo,M.pcc
Dec 9, 2010 9:40:06 PM com.xxxxxxxx.xxxxxxxx.agentevaluation.db.dao.xxxxxxxx getAgentDetails
WARNING: Exception occured in method:getAgentDetails:Message:Not supported by BasicDataSource
Dec 9, 2010 9:40:07 PM com.xxxxxxxx.xxxxxxxx.agentevaluation.business.manager.xxxxxxxxManager searchAgent
WARNING: Exception occured in method:searchAgent:Message:Not supported by BasicDataSource
Dec 9, 2010 9:40:07 PM com.xxxxxxxx.xxxxxxxx.agentevaluation.services.service.xxxxxxxx searchAgent
WARNING: Exception occured in method:searchAgent:Message:Not supported by BasicDataSource
I just want to enquire wether the coalesce query that i have written is supported by basic data source or there is some other error
I'm referring to the link for datasource in tomcat 6 =http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html
Sorry for not giving these vital info beforehand
My sriptlet
try {
sessionAar = HibernateUtil.currentAARSession();
// Forming the Array containing the Search Key Values
str = new ArrayList<String>();
str.add("");// adding a default value
str.addAll(agencyInformation.getSearchCriteria()
.getSearchKeyValues().getSearchKeyValue());
// Fetching the Required Fields and Order By sequence
retStr = formReqFieldStr(agencyInformation.getRequiredFields());
if (Validation.validate(retStr)) {
// Required Fields
reqFieldStr = retStr[0];
// Order By sequence
orderByStr = retStr[1];
}
// Forming the query
searchKey = Validation.valid(agencyInformation.getSearchCriteria().getSearchKey());
tempQuery = new StringBuilder();
tempQuery.append("SELECT " + reqFieldStr
+ " FROM AgencyRegistrar AS M WHERE M."
+ representorMap.get(searchKey) + " IN (:lst) ORDER BY "
+ orderByStr);
LOGGER.info("Query:" + tempQuery.toString());
query = sessionAar.createSQLQuery(tempQuery.toString());
query.setParameterList("lst", str);
tempList = query.setResultTransformer(
Transformers.aliasToBean(AgencyRegistrar.class)).list();
} catch (Exception ex) {
ex.printStackTrace();
LOGGER.warning("Exception occured in method:getAgentDetails:Message:"
+ ex.getMessage());
ApplicationException apEx = new ApplicationException();
apEx.setMessage(ex.getMessage());
throw apEx;
} finally {
if (Validation.validate(sessionAar)) {
sessionAar.close();
}
}
return tempList;
}
for (int i = 0; i < defRetrivalFieldsArrLen; i++) {
tempRepresentData = representorMap
.get(defRetrivalFieldsArr[i]);
if ("gaGrpCd".equalsIgnoreCase(tempRepresentData)
|| "taCd".equalsIgnoreCase(tempRepresentData)) {
formedReqField.append("coalesce(M." + tempRepresentData
+ ",'-1') AS " + tempRepresentData);
} else if (("pccDteCreate"
.equalsIgnoreCase(tempRepresentData)
|| "pccDteUpdated"
.equalsIgnoreCase(tempRepresentData) || ("lastUpdate"
.equalsIgnoreCase(tempRepresentData)))) {
formedReqField.append("M." + tempRepresentData + " AS "
+ tempRepresentData);
} else {
formedReqField.append("coalesce(M." + tempRepresentData
+ ",' ') AS " + tempRepresentData);
}
orderByField.append("M." + tempRepresentData);
if (i != (defRetrivalFieldsArrLen - 1)) {
formedReqField.append(",");
orderByField.append(",");
}
tempRepresentData = null;
}
}
retStr[0] = formedReqField.toString();
retStr[1] = orderByField.toString();
}
return retStr;