Own connection handling class

hi all,
In the jdbcpds.conf file, it is mentioned that we can write our own connection handling class which extends the provided JDBCConnectionHandling class
What i tried after looking at the methods of connection handler is something like this
class myJDBCConnectionHandling extends JDBCConnectionHandling
protected void parseConnectInfo(String s, JDBCConnectDialog jdbcconnectdialog, Plugin plugin)
throws Exception
String dbUrl = null;
dbUrl = "<user>/<pwd>@<remotedatabase>";
super.parseConnectInfo(dbUrl, jdbcconnectdialog, plugin);
Is there anything else that needs to be done
because this is throwing an error
JDBCPDS-62008 : Failed to connect to the datasource null
Invalid arguments in the call
Can anybody correct me
Of course my main purpose of trying this is to have something like a logical name given to the P_JDBCPDS parameter which can be mapped to the actual database url using JNDI lookup.
what i was expecting was, the string when passed to the connection handler, i can add the code to lookup the name in my own connection handler and leave the rest to the provided JDBCConnectionHandling class
Am i going in right direction or not
Or if anybody has any other solution you are welcome to suggest
Any sort of help is greatly appreciated
Thanks in advance
Ramakrishna

hi,
One more thing i forgot to mention was that i am not too concerned about this lookup in reports builder
I need when this is running on the server
thanks & regards
ramakrishna

Similar Messages

  • Customised Exception handling class.....

    Hello Friends,
    I am working on a project for which I need to create my own exception handling class.
    The reason I need this class is to catch any exceptions and get a customised error message
    according to each exception and then be able to display those messages on web page.
    some examples of the exception I want to catch and display appropriate message are..
    1. a duplicate reord in db
    2. wrong data type (this will deal with ints,doubles and strings data types)
    3. date type validation ( to make sure its date object instead of a string)
    and there are several more messages but if can get some help or idea from any one to design a class for the above errors I might be able to manage other errors as well.
    greatly appreciate any respnses.

    First off, you can extend Exception:
    public class MyException extends Exception {
    }You can put some custom messages into the class:
    public class MyException extends Exception {
      public static final String DUPLICATE_RECORD = "Duplicate record in db",
                           WRONG_DATA_TYPE = "Wrong data type",
                           VALIDATION_ERROR = "Invalid data type";
    }Then, have your constructors, which take a String as an argument, so they can get your 'presets' or a custom message:
    public class MyException extends Exception {
      public static final String DUPLICATE_RECORD = "Duplicate record in db",
                           WRONG_DATA_TYPE = "Wrong data type",
                           VALIDATION_ERROR = "Invalid data type";
      public MyException(String message) {
        super(message);
    }You could also have a series of exception classes: DuplicateRecordException, WrongDataTypeException, ValidationException, etc. Hope that helps.
    m

  • Connection handle of this Interaction has already been closed

    Dear All,
    We are facing problem in Portal application and the portal screen shows
    "WARNING : DOMG:0001 : EN: Applicatie Foutcould not create JCOClientconnection for logical system: WD_MODELDATA_DEST - Model..." When i checked the JCO and it seems to be working fine.
    This error message occurs not all the time but it happens very often nowdays in our production system.
    The trace file has the below info ....
    #1.5 #005056917DFC0065000001700000148000048ACD4C7672EF#1278514262577
    #com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModel#sap.com/tcwddispwda#
    com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModel.JcoClientManagementWDP#m.
    vanginhoven#10799##n/a##0fee4bb889d711dfa9cc005056917dfc#SAPEngine_Application
    Thread[impl:3]74ID\#(J2EE3880500)ID0960469550DB02703921047067447299End.
    WID1278484862289##0#0#Error##Plain###Could not create JCOClientConnection for
    logical System: *'WD_MODELDATA_DEST' *- Model: 'class com.nl.cv.pr.productlijst.
    Zorg_Arrangementproduct_Lijst_Model'. #
    #1.5 #005056917DFC002A000009B40000148000048ACD4F560780#1278514310781
    #System.err#phobos/phobos~dcrlcear#System.err#Guest#0##as-careview1_EPP_3880550##2a53432b89d711dfbb8a005056917dfc#SAPEngine_
    Application_Thread[impl:3]_38##0#0#Error##Plain###Connection handle of this
    Interaction has already been closed#
    #1.5 #005056917DFC002A000009B50000148000048ACD4F560987#1278514310781
    #System.err#phobos/phobos~dcrlcear#System.err#Guest#0##as-careview1_EPP_3880550##2a53432b89d711dfbb8a005056917dfc#SAPEngine_
    Application_Thread[impl:3]_38##0#0#Error##Plain###Connection is already closed
    and no longer associated with a managed connection#
    Do anyone have any idea on this issue? Please help me out to fix this problem
    Regards
    Raj

    Hi,
    The error message "Could not create JCOClientConnection for logical System" is only triggered when the WebDynpro application is requesting more JCO connections than the number of JCOs allocated for this application.                                                                               
    I suggest to carefully go through the documents below in order to properly configure your JCOs. If necessary, remove them and recreate in the correct way:                                                                               
    JCo Quick Summary                                                         
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/85a483cb-0d01-0010-2990-c5168f01ce8a                                                                               
    How to Configure the JCo Destination Settings                             
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3103eb90-0201-0010-71af-be6f4a6f61d1                                                                               
    You will have to calculate the maximum number of JCo connections to each application based on Models and users.
    Br,
    Javier

  • Glassfish can't find JAX-WS handler classes

    Hi,
    Created a JAX-WS Stateless EJB3 Endpoint, configured JAX-WS handlers using a handler chain XML, deployed on Glassfish 3.1.2. Glassfish won't find any of the 3 handler classes. I've verified and reverified that the handler XML uses the correct package and class name. The first two of three handlers are part of the project while the third one is in a jar in the lib, so obviously they are all on the class path.
    Any help is greatly appreciated. Google searches showed that people had similar issue before but no one seemed to have found a solution (or if they did they did not post it back).
    Also posted [http://www.java.net/forum/topic/glassfish/metro-and-jaxb/glassfish-cant-find-jax-ws-handler-classes]
    [#|2012-04-03T21:59:11.769-0400|SEVERE|glassfish3.1.2|javax.enterprise.webservices.org.glassfish.webservices|_ThreadID=16;_ThreadName=Thread-3;|Unable to load handler class edu.certification.abhijitsarkar.ocewsd.jaxws.ejb.webservice.handler.ProgrammaticAuthenticationHandler
    java.lang.ClassNotFoundException: edu.certification.abhijitsarkar.ocewsd.jaxws.ejb.webservice.handler.ProgrammaticAuthenticationHandler
         at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509)
         at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:247)
         at org.glassfish.webservices.WsUtil.processConfiguredHandlers(WsUtil.java:2141)
         at org.glassfish.webservices.WsUtil.configureJAXWSServiceHandlers(WsUtil.java:2193)
         at org.glassfish.webservices.EjbRuntimeEndpointInfo.prepareInvocation(EjbRuntimeEndpointInfo.java:266)
         at org.glassfish.webservices.EjbRuntimeEndpointInfo.initRuntimeInfo(EjbRuntimeEndpointInfo.java:343)
         at org.glassfish.webservices.WebServiceEjbEndpointRegistry.registerEndpoint(WebServiceEjbEndpointRegistry.java:129)
         at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1181)
         at com.sun.ejb.containers.StatelessSessionContainer.initializeHome(StatelessSessionContainer.java:202)
         at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:167)
         at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:230)
         at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:299)
         at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:105)
         at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:186)
         at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:264)
         at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:460)
         at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
         at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
         at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
         at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
         at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
         at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
         at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
         at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
         at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
         at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
         at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
         at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
         at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
         at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
         at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
         at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
         at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
         at java.lang.Thread.run(Thread.java:680)
    Endpoint:
    @Stateless
    @WebService(name="Time", serviceName="TimeService", portName="TimeServicePort")
    @HandlerChain(file = "/handler-chain.xml")
    @DeclareRoles({ "guest", "user" })
    public class TimeService {
    // code, probably irrelevant to the issue
    handler-chain.xml:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <javaee:handler-chains xmlns:javaee="http://java.sun.com/xml/ns/javaee"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <javaee:handler-chain>
              <javaee:handler>
                   <javaee:handler-class>edu.certification.abhijitsarkar.ocewsd.jaxws.ejb.webservice.handler.HttpBasicAuthenticationHandler
                   </javaee:handler-class>
              </javaee:handler>
              <javaee:handler>
                   <javaee:handler-class>edu.certification.abhijitsarkar.ocewsd.jaxws.ejb.webservice.handler.ProgrammaticAuthenticationHandler
                   </javaee:handler-class>
              </javaee:handler>
              <javaee:handler>
                   <javaee:handler-class>edu.certification.abhijitsarkar.ocewsd.jaxws.utility.handler.SOAPRequestHandler
                   </javaee:handler-class>
              </javaee:handler>
         </javaee:handler-chain>
    </javaee:handler-chains>

    Ok, I found the answer... it is actually a classic bug. The code that is loading the handler is located in WsUtil. Here is a link to version 3.1.1 of that code, although I am running 3.1.2.
    http://grepcode.com/file/repo1.maven.org/maven2/org.glassfish.webservices/jsr109-impl/3.1.1/org/glassfish/webservices/WsUtil.java/
    The method and line that blows up is org.glassfish.webservices.WsUtil.processConfiguredHandlers(WsUtil.java:2141). On that line (in version 3.1.2 - remember the link above is 3.1.1), there is a call to "Class.forName". It turns out that it is passing the exact UNTRIMMED name that is found in the generated JAX-WS handler-chain XML file (it was generated from wsimport in my case).
    In my JAXWS customization file, I had placed the handler name "prettily" on its own line, with a carriage return like so:
    (leading whitespace here - but these forums don't show whitespace)<javaee:handler-class>myHandler
    (leading whitespace here - but these forums don't show whitespace)</javaee:handler-class>
    That extra whitespace is NOT BEING TRIMMED in the code responsible for parsing the file. That is the problem, plain and simple. I fixed that:
    <javaee:handler-class>myHandler</javaee:handler-class>
    ... and the problem went away.
    To confirm this, I looked in the logs of the Glassfish server at all the times it complained it could not load class "myHandler", and found it was actually complaining about "myHandler " (i.e. with many spaces).
    Hope this helps someone.
    Edited by: Bland on Jun 14, 2012 2:41 PM
    Edited by: Bland on Jun 14, 2012 2:43 PM
    Edited by: Bland on Jun 14, 2012 2:44 PM

  • Tag handler class was not found "org.apache.struts.taglib.tiles.InsertTag"

    Hi All,
    I have a proble deploying my app with struts 1.3.10, when I run under tomcat 6 on my eclipse, it´s fine, but when I deploy on weblogic send next exception:
    ####<Apr 2, 2013 4:24:19 PM CDT> <Info> <ServletContext-/slagentes> <DSWLC01K> <svr-slisto> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1364937859494> <BEA-000000> <layout.jsp:142:14: The tag handler class was not found "org.apache.struts.taglib.tiles.InsertTag".
    <tiles:insert attribute="content"/>
    ^----------^
    layout.jsp:142:14: The tag handler class was not found "org.apache.struts.taglib.tiles.InsertTag".
    <tiles:insert attribute="content"/>
    ^----------^
    >
    ####<Apr 2, 2013 4:24:19 PM CDT> <Error> <HTTP> <DSWLC01K> <svr-slisto> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1364937859499> <BEA-101017> <[ServletContext@159254910[app:slagentes module:/slagentes path:null spec-version:3.0], request: weblogic.servlet.internal.ServletRequestImpl@5ebf5ebf[
    POST /slagentes/login.do HTTP/1.1
    Connection: keep-alive
    Content-Length: 37
    Cache-Control: max-age=0
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Origin: http://172.17.12.129:7004
    User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.43 Safari/537.31
    Content-Type: application/x-www-form-urlencoded
    Referer: http://172.17.12.129:7004/slagentes/
    Accept-Encoding: gzip,deflate,sdch
    Accept-Language: es-ES,es;q=0.8
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
    ]] Root cause of ServletException.
    weblogic.servlet.jsp.CompilationException: Failed to compile JSP /jsp/template/layout.jsp
    layout.jsp:142:14: The tag handler class was not found "org.apache.struts.taglib.tiles.InsertTag".
    <tiles:insert attribute="content"/>
    ^----------^
    layout.jsp:142:14: The tag handler class was not found "org.apache.struts.taglib.tiles.InsertTag".
    <tiles:insert attribute="content"/>
    ^----------^
    at weblogic.servlet.jsp.JavelinxJSPStub.reportCompilationErrorIfNeccessary(JavelinxJSPStub.java:225)
    at weblogic.servlet.jsp.JavelinxJSPStub.compilePage(JavelinxJSPStub.java:161)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:237)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:190)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:281)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:453)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:364)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:221)
    at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:567)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:263)
    at org.apache.struts.tiles.commands.TilesPreProcessor.doForward(TilesPreProcessor.java:260)
    at org.apache.struts.tiles.commands.TilesPreProcessor.execute(TilesPreProcessor.java:217)
    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
    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:751)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:221)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3284)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3254)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2089)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1513)
    at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    >
    My weblogic.xml is
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-web-app
         xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
         <wls:container-descriptor>
              <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
         </wls:container-descriptor>     
    </wls:weblogic-web-app>     
    and my weblogic-application.xml is
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <weblogic-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-application http://www.bea.com/ns/weblogic/weblogic-application/1.0/weblogic-application.xsd"
         xmlns="http://www.bea.com/ns/weblogic/weblogic-application">
         <application-param>
              <param-name>webapp.encoding.default</param-name>
              <param-value>UTF-8</param-value>
         </application-param>
         <prefer-application-packages>
              <package-name>antlr.*</package-name>          
              <package-name>org.apache.*</package-name>          
              <package-name>javax.xml.rpc.*</package-name>
              <package-name>javax.xml.namespace.*</package-name>
              <package-name>javax.xml.messaging.*</package-name>
              <package-name>javax.xml.soap.*</package-name>
              <package-name>javax.servlet.jsp.jstl.*</package-name>
         </prefer-application-packages>
    </weblogic-application>
    please help me

    The struts-template tld has been deprecated in favour of the tiles taglib.
    If you are using anything above struts 1.0, then you should be using tiles.
    Most probably the support files for the struts-template taglib are not in your distribution.
    Cheers,
    evnafets

  • Rookie Problem:Connection Pool Class not found

    Hi All,
    I'm new to java (3 days now!) and I was writing some sample JSP code to learn about Connection Pooling using Sun Server 8... My goal here is to hopefully learn how to use Connection pooling so I can develop a DAO class that uses good design patterens. It appears that that my J2EE server is not finding my db providers connection pooling class. If this is my problem where should I add this reference? I was looking at the Admin Console and did not see a way to add it there?
    Someone please send me down the right path :)
    I think my error is...."Wrong class name or classpath for Datasource Object : {0}
    java.lang.ClassNotFoundException: com.ibm.db2.jdbc.DB2ConnectionPoolDataSource" (see below for trace)
    Thanks in advance for the help and tips
    John
    My test JSP source code......
    <%/* JMM This page was created on 9/1/2004
    The purpose of this page is to test and learn basic JSP Connection Snytax and flow
    control */%>
    <%/* **********Begin JSP Page Directives********** */%>
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@page import="javax.sql.*"%>
    <%@page import="java.sql.*"%>
    <%@page import="javax.naming.*"%>
    <%@page import="java.util.Hashtable"%>
    <%/* ********** End JSP Page Directive ********** */%>
    <%! String pageName = "Johns Test JSP Page";
    String jndi_ereporting_nm = "jdbc/F0654TE1";
    %>
    <html>
    <head><title><%=pageName%></title></head>
    <body>
    <%-- <jsp:useBean id="beanInstanceName" scope="session" class="beanPackage.BeanClassName" /> --%>
    <%-- <jsp:getProperty name="beanInstanceName" property="propertyName" /> --%>
    Importing the follwoing Libs<br>
    <br>import javax.sql.*;
    <br>import java.sql.*;
    <br>import javax.naming.*;
    <br>import java.util.Hashtable;
    <br>
    <br>Attempting to connnect to F0654TE1 using JNDI Lookup....
    <br>
    <%
              DataSource ds = null;
              Connection con = null;
              Context ctx = null;
              Hashtable env = null;
              long nStartTime, nStopTime, nElapsedTime;
              // Set up environment for creating InitialContext object
              //humm.. whats stored in here ....what are these used for?
    out.println("Context.INITIAL_CONTEXT_FACTORY=" + Context.INITIAL_CONTEXT_FACTORY + "<br>");
              out.println("Context.PROVIDER_URL=" + Context.PROVIDER_URL + "<br>");
              InitialContext ic = new InitialContext();
              ds = (DataSource) ic.lookup(jndi_ereporting_nm);
         out.println("open connection....<br>");
              con = ds.getConnection();
         out.println("connection has been opened!!!....<br>");
              con.close();
         out.println("connection has been closed!!!....<br>");     
    %>
    <br>
    <br>Finished attempting to connnect to F0654TE1 using JNDI....
    </body>
    </html>
    Errror Log file.....
    [#|2004-09-02T10:08:42.951-0400|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=11;|RAR5099 : Wrong class name or classpath for Datasource Object : {0}
    java.lang.ClassNotFoundException: com.ibm.db2.jdbc.DB2ConnectionPoolDataSource
         at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:141)
         at com.sun.gjc.common.DataSourceObjectBuilder.getDataSourceObject(DataSourceObjectBuilder.java:198)
         at com.sun.gjc.common.DataSourceObjectBuilder.constructDataSourceObject(DataSourceObjectBuilder.java:65)
         at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:70)
         at com.sun.enterprise.resource.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:63)
         at com.sun.enterprise.resource.IASNonSharedResourcePool.createSteadyResources(IASNonSharedResourcePool.java:501)
         at com.sun.enterprise.resource.IASNonSharedResourcePool.initPool(IASNonSharedResourcePool.java:176)
         at com.sun.enterprise.resource.IASNonSharedResourcePool.internalGetResource(IASNonSharedResourcePool.java:314)
         at com.sun.enterprise.resource.IASNonSharedResourcePool.getResource(IASNonSharedResourcePool.java:260)
         at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:244)
         at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:137)
         at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:194)
         at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:94)
         at com.sun.gjc.spi.DataSource.getConnection(DataSource.java:68)
         at org.apache.jsp.jsp.jndi_005fdb_005ftest_jsp._jspService(jndi_005fdb_005ftest_jsp.java:102)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:102)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:282)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:263)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:210)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         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:246)
         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:268)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:214)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:168)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:133)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:539)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:254)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:114)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:936)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:165)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:683)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:604)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:542)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:647)
         at java.lang.Thread.run(Thread.java:534)
    |#]
    [#|2004-09-02T10:08:42.961-0400|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=11;|RAR5038:Unexpected exception while creating resource|#]
    [#|2004-09-02T10:08:42.961-0400|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=11;|RAR5117 : Failed to obtain/create connection. Reason : Class name is wrong or classpath is not set for : com.ibm.db2.jdbc.DB2ConnectionPoolDataSource|#]
    [#|2004-09-02T10:08:42.961-0400|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=11;|RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.ibm.db2.jdbc.DB2ConnectionPoolDataSource]|#]
    [#|2004-09-02T10:08:43.131-0400|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=11;|StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
    java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.ibm.db2.jdbc.DB2ConnectionPoolDataSource
         at com.sun.gjc.spi.DataSource.getConnection(DataSource.java:72)
         at org.apache.jsp.jsp.jndi_005fdb_005ftest_jsp._jspService(jndi_005fdb_005ftest_jsp.java:102)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:102)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:282)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:263)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:210)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         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:246)
         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:268)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:214)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:168)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:133)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:539)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:254)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:114)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:936)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:165)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:683)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:604)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:542)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:647)
         at java.lang.Thread.run(Thread.java:534)
    |#]

    Sorry this is not the way i usually handle db connectivity, i think you need to set up a name in your server.xml file (this is for tomcat based applicatin servers) which is then referenced in your jsp file. I have had a quick google and found this.
    http://manual.evolutionhosting.com/evochunk/ch19s04.html
    You menttioned that you wanted to devolp really good design patterns, how big is your project going to be, if it is going to be a large project then you may want to look at
    http://www.hibernate.org

  • New error with upgrade jboss/tomcat: "Connection handle has been closed and is unusable"

    Hi,
    This error suddenly appeared when we upgraded from jboss3/tomcat5.0 to jboss4.2/tomcat5.5.
    here's the usecase:
    1) User clicks on report link
    2) Crystal reports web componnent displays screen to fill in report parameters.
    3) user enters parameters and clicks submit
    4) System throws Exception
    The same reports worked fine with jboss 3.2.6/tomcat 5.0. We haven't touched anything in this realm.
    Log Excerpt:
    09:42:18,842 INFO  [datasource] Openning rowset
    09:42:18,904 ERROR [reportdefinition] com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: Connection handle has been closed and is unusable
    09:42:18,905 ERROR [datasource] Failed to open rowset: the query failed to open rowset
    com.crystaldecisions.reports.reportdefinition.datainterface.g: JDBC Error: Connection handle has been closed and is unusable
         at com.crystaldecisions.reports.reportdefinition.datainterface.d.a(Unknown Source)
    To try to narrow down the problem, I've updated the jdbc configuration to
         <track-statements>true</track-statements>   
    here's a recap:
    This Boolean element specifies whether to check for unclosed statements when a connection is returned to the pool. If it is true, a warning message is issued for each unclosed statement. If the log4j category org.jboss.resource.adapter.jdbc.WrappedConnection has trace level enabled, a stack trace of the connection close call is logged as well. This is a debug feature that can be turned off in production.
    Interestingly enough, this error appears slightly upstream:
    (CachedConnectionManager.java:526) - Closing a connection for you.  Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@c76003
    java.lang.Throwable: STACKTRACE
         at
    org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
         at com.crystaldecisions.reports.queryengine.driverImpl.k.a(Unknown Source)
         at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
         at com.crystaldecisions.reports.queryengine.av.new(Unknown Source)
         at com.crystaldecisions.reports.queryengine.av.byte(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source)
         at com.crystaldecisions.reports.dataengine.ba.try(Unknown Source)
         at com.crystaldecisions.reports.common.av.a(Unknown Source)
         at com.crystaldecisions.reports.common.ag.a(Unknown Source)
         at com.businessobjects.reports.sdk.b.e.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown
    So the question arises:
    1) Is the jboss datasource overly/aggressively closing result sets?
    2) or is there a coding error in CRXIR2?
    thanks,
    bill
    Full stack trace:
    [2008-03-13 17:26:18,905] [INFO ] org.jboss.resource.connectionmanager.CachedConnectionManager (CachedConnectionManager.java:526) - Closing a connection for you.  Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@c76003
    java.lang.Throwable: STACKTRACE
         at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:290)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:417)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
         at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
         at com.crystaldecisions.reports.queryengine.driverImpl.k.a(Unknown Source)
         at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
         at com.crystaldecisions.reports.queryengine.av.new(Unknown Source)
         at com.crystaldecisions.reports.queryengine.av.byte(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source)
         at com.crystaldecisions.reports.dataengine.ba.try(Unknown Source)
         at com.crystaldecisions.reports.common.av.a(Unknown Source)
         at com.crystaldecisions.reports.common.ag.a(Unknown Source)
         at com.businessobjects.reports.sdk.b.e.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.y.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.r.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.cf.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.z.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ak.if(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ad.int(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.bk.for(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.v.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.v.if(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setTableLocation(Unknown Source)
         at com.crystaldecisions.reports.sdk.DatabaseController.setTableLocation(Unknown Source)
         at org.apache.jsp.reports.processreport_jsp.switchTables(processreport_jsp.java:131)
         at org.apache.jsp.reports.processreport_jsp.loadReport(processreport_jsp.java:68)
         at org.apache.jsp.reports.processreport_jsp._jspService(processreport_jsp.java:227)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.participate.shared.pagecache.client.PageCacheFilter.doFilter(PageCacheFilter.java:760)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.participate.util.servlet.ExpiredPasswordFilter.doFilter(ExpiredPasswordFilter.java:92)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.participate.pe.channels.client.servlet.ChannelUrlFilter.processUrl(ChannelUrlFilter.java:168)
         at com.participate.pe.channels.client.servlet.ChannelUrlFilter.doFilter(ChannelUrlFilter.java:100)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.participate.util.servlet.BlockIpAddressFilter.doFilter(BlockIpAddressFilter.java:224)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.outstart.multiapp.filters.KeepOtherSessionsAliveFilter.doFilter(KeepOtherSessionsAliveFilter.java:88)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.participate.util.servlet.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:151)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
         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:230)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:619)

    <p>
    OK. I found the problem along with a workaround.
    </p>
    <p>
    <strong>The problem:</strong>
    </p>
    <p>
    a programming practice clashes with a new jboss 'safety check'.
    </p>
    <p>
    <strong>Programming practice:</strong>
    </p>
    <p>
    crystal reports gets a database connection in one jsp page, then tries to use it on another jsp/servlet
    </p>
    <p>
    <strong>Jboss safety check:</strong>
    Jboss/tomcat new comes configured out-of-the-box with a 'cached connection
    manager', which
    </p>
    <p>
    "Check[s] for unclosed connections and transaction terminated checks in servlets/jsps."
    </p>
    <p>
    <strong> Summary</strong>
    </p>
    <p>
    In short, if a servlet/jsp ends and it leaves a database connection open, Jboss will automatically close it.
    </p>
    <p>
    </p>
    <p>
    <strong>Workaround:</strong><br />
    Comment out two entries in these two files:
    </p>
    <p>
    1) conf/jboss4/pe/deploy/jboss-web.deployer/server.xml
    </p>
    <p>
    2) conf/jboss4/pe/deploy/jboss-web.deployer/META-INF/jboss-service.xml
    </p>
    <p>
    The two entries:
    </p>
    <p>
    </p>
    <p>
    1)
    </p>
    <p>
                 <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"<br />
                    cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"<br />
                    transactionManagerObjectName="jboss:service=TransactionManager" /><br />
    </p>
    <p>
    2)
    </p>
    <p>
          <depends>jboss.jca:service=CachedConnectionManager</depends><br />
    </p>
    <p>
    </p>
    <p>
    <strong>Comments on the workaround</strong>
    </p>
    <p>
    The 'cached connection manager' basically makes sure that the application cleans up after bad programmers. It seems most helpful in development, load testing, or trouble shooting.
    </p>
    <p>
    In production,  you can likely  comment them out with minimal
    impact on the application.
    </p>

  • How to Modify Override Handler class in jsse.jar

    Hi,
    Is there a way to change port number in Handler class in jsse.jar and recompile the Java file, or override the class?
    The Handler class seems to be using port number 443, whereas the the Webserver of PS Application is using a different port number (7004).
    Any ideas.
    Thanks
    Jay

    You're over-thinking this. The Handler class uses whatever port it is told to use by the person that constructs it. 443 is just the default.
    All you have to do is put the required port number into the https URL, e.g. https://www.myhost.com:7004.

  • Error while running DocumentOutbox handler class in content DB Dev kit

    Hi,
    I am able to compile the DocumentOutbox content handler class which comes with content DB Dev kit. But, when I run scriptdriver.sh, I am getting the following errors in the log file "RegisterDocumentOutbox.out".
    Any help in resolving this would be appreciated
    Next method: setDefaultScriptOperationsClass oracle.ifs.ecm.tools.script.AuditSpecificationOperations
    Exception while invoking method 'setDefaultScriptOperationsClass oracle.ifs.ecm.tools.script.AuditSpecificationOperations' ; exception is:
    java.lang.RuntimeException: Unable to construct operations instance
    java.lang.RuntimeException: Unable to construct operations instance
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.setDefaultScriptOperationsClass(EcmScriptDriver.java:503)
         at oracle.ifs.ecm.tools.script.EcmScriptOperations.setDefaultScriptOperationsClass(EcmScriptOperations.java:522)
         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 oracle.ifs.ecm.tools.script.EcmScriptDriver.invokeMethod(EcmScriptDriver.java:431)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.run(EcmScriptDriver.java:257)
         at oracle.ifs.ecm.tools.script.EcmDiffTest.main(EcmDiffTest.java:37)
    elapsed time (ms) = 7
    Next method: identifyByPath domain /oracle
    Exception while invoking method 'identifyByPath domain /oracle' ; exception is:
    java.lang.RuntimeException: Cannot register a null object (domain)
    java.lang.RuntimeException: Cannot register a null object (domain)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.registerObject(EcmScriptDriver.java:972)
         at oracle.ifs.ecm.tools.script.EcmScriptOperations.registerObject(EcmScriptOperations.java:9220)
         at oracle.ifs.ecm.tools.script.EcmScriptOperations.identifyByPath(EcmScriptOperations.java:4889)
         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 oracle.ifs.ecm.tools.script.EcmScriptDriver.invokeMethod(EcmScriptDriver.java:431)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.run(EcmScriptDriver.java:257)
         at oracle.ifs.ecm.tools.script.EcmDiffTest.main(EcmDiffTest.java:37)
    elapsed time (ms) = 69
    Next method: defineAuditTypeListDefinition atl
    Exception while invoking method 'defineAuditTypeListDefinition atl' ; exception is:
    java.lang.RuntimeException: No such method with specified number of arguments (1)
    java.lang.RuntimeException: No such method with specified number of arguments (1)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.invokeMethod(EcmScriptDriver.java:423)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.run(EcmScriptDriver.java:257)
         at oracle.ifs.ecm.tools.script.EcmDiffTest.main(EcmDiffTest.java:37)
    elapsed time (ms) = 0
    Next method: addAuditType atl DOCUMENT_CREATED SUCCESS_ONLY
    Exception while invoking method 'addAuditType atl DOCUMENT_CREATED SUCCESS_ONLY' ; exception is:
    java.lang.RuntimeException: No such method with specified number of arguments (3)
    java.lang.RuntimeException: No such method with specified number of arguments (3)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.invokeMethod(EcmScriptDriver.java:423)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.run(EcmScriptDriver.java:257)
         at oracle.ifs.ecm.tools.script.EcmDiffTest.main(EcmDiffTest.java:37)
    elapsed time (ms) = 1
    Next method: addAuditType atl DOCUMENT_CREATED_AS_COPY SUCCESS_ONLY
    Exception while invoking method 'addAuditType atl DOCUMENT_CREATED_AS_COPY SUCCESS_ONLY' ; exception is:
    java.lang.RuntimeException: No such method with specified number of arguments (3)
    java.lang.RuntimeException: No such method with specified number of arguments (3)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.invokeMethod(EcmScriptDriver.java:423)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.run(EcmScriptDriver.java:257)
         at oracle.ifs.ecm.tools.script.EcmDiffTest.main(EcmDiffTest.java:37)
    elapsed time (ms) = 3
    Next method: addAuditType atl DOCUMENT_BECAME_VERSION SUCCESS_ONLY
    Exception while invoking method 'addAuditType atl DOCUMENT_BECAME_VERSION SUCCESS_ONLY' ; exception is:
    java.lang.RuntimeException: No such method with specified number of arguments (3)
    java.lang.RuntimeException: No such method with specified number of arguments (3)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.invokeMethod(EcmScriptDriver.java:423)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.run(EcmScriptDriver.java:257)
         at oracle.ifs.ecm.tools.script.EcmDiffTest.main(EcmDiffTest.java:37)
    elapsed time (ms) = 0
    Next method: addAuditType atl USER_APPLICATION_CONNECTED SUCCESS_ONLY
    Exception while invoking method 'addAuditType atl USER_APPLICATION_CONNECTED SUCCESS_ONLY' ; exception is:
    java.lang.RuntimeException: No such method with specified number of arguments (3)
    java.lang.RuntimeException: No such method with specified number of arguments (3)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.invokeMethod(EcmScriptDriver.java:423)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.run(EcmScriptDriver.java:257)
         at oracle.ifs.ecm.tools.script.EcmDiffTest.main(EcmDiffTest.java:37)
    elapsed time (ms) = 1
    Next method: defineAuditTargetSpecificationDefinition ats domain ALL_SUBITEMS
    Exception while invoking method 'defineAuditTargetSpecificationDefinition ats domain ALL_SUBITEMS' ; exception is:
    java.lang.RuntimeException: No such method with specified number of arguments (3)
    java.lang.RuntimeException: No such method with specified number of arguments (3)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.invokeMethod(EcmScriptDriver.java:423)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.run(EcmScriptDriver.java:257)
         at oracle.ifs.ecm.tools.script.EcmDiffTest.main(EcmDiffTest.java:37)
    elapsed time (ms) = 0
    Next method: defineAuditHandlerSpecificationDefinition ahs oracle.ifs.examples.handlers.DocumentOutbox 1H 00:30:00 true
    Exception while invoking method 'defineAuditHandlerSpecificationDefinition ahs oracle.ifs.examples.handlers.DocumentOutbox 1H 00:30:00 true' ; exception is:
    java.lang.RuntimeException: No such method with specified number of arguments (5)
    java.lang.RuntimeException: No such method with specified number of arguments (5)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.invokeMethod(EcmScriptDriver.java:423)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.run(EcmScriptDriver.java:257)
         at oracle.ifs.ecm.tools.script.EcmDiffTest.main(EcmDiffTest.java:37)
    elapsed time (ms) = 0
    Next method: createAuditSpecification DocOutboxSpec atl ats ahs "DocumentOutbox AuditSpecification"
    Exception while invoking method 'createAuditSpecification DocOutboxSpec atl ats ahs "DocumentOutbox AuditSpecification"' ; exception is:
    java.lang.RuntimeException: No such method with specified number of arguments (5)
    java.lang.RuntimeException: No such method with specified number of arguments (5)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.invokeMethod(EcmScriptDriver.java:423)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.run(EcmScriptDriver.java:257)
         at oracle.ifs.ecm.tools.script.EcmDiffTest.main(EcmDiffTest.java:37)
    elapsed time (ms) = 0
    Next method: showAuditSpecification DocOutboxSpec
    Exception while invoking method 'showAuditSpecification DocOutboxSpec' ; exception is:
    java.lang.RuntimeException: unknown object tag: DocOutboxSpec
    java.lang.RuntimeException: unknown object tag: DocOutboxSpec
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.lookupObject(EcmScriptDriver.java:857)
         at oracle.ifs.ecm.tools.script.EcmScriptOperations.lookupObject(EcmScriptOperations.java:9140)
         at oracle.ifs.ecm.tools.script.EcmScriptOperations.showAuditSpecification(EcmScriptOperations.java:1572)
         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 oracle.ifs.ecm.tools.script.EcmScriptDriver.invokeMethod(EcmScriptDriver.java:431)
         at oracle.ifs.ecm.tools.script.EcmScriptDriver.run(EcmScriptDriver.java:257)
         at oracle.ifs.ecm.tools.script.EcmDiffTest.main(EcmDiffTest.java:37)
    elapsed time (ms) = 1
    Thanks in Advance

    A parent folder must have set workflow configuration to be final - thus preventing any sub-folders from changing the policy.
    Work your way through the various parent folders (via Web UI), and ensure "Do not allow subfolders to modify this operation's workflow settings" for the particular workflow/operation combination is not set.
    Matt.

  • How to submit a form in jsp from tag handler class

    I have a form in jsp.I created some more links in the tag handler class.Based on the link we click form action will take place.Now how can i submit the form in tag handler class for the links i created in that class.

    I have a form in jsp.I created some more links in the tag handler class.Based on the link we click form action will take place.Now how can i submit the form in tag handler class for the links i created in that class.

  • JSF 1.2 tag handler classes in JSF 1.1 environment

    Hi,
    I’m developing a JSF 1.2 application with RSA 7.5.1. When I run it in the WAS 6.1 I get the following exception:
    javax.servlet.ServletException:
    Unable to convert string '#{onebean.onestring}' to class
    javax.el.ValueExpression for attribute title:
    java.lang.IllegalArgumentException:
    Property Editor not registered with the PropertyEditorManager
    at org.apache.jasper.runtime.PageContextImpl.handlePageException
    (PageContextImpl.java:660)etc...
    I think my WAS 6.1 running environment doesn’t admit Tag Handler classes in JSF 1.2 style (you know: Extending UIComponentELTag, with all attributes in the tag class of type valueExpression along with setter methods...).
    In case this suspect is true, is there any tricky way to run this JSF 1.2 components in a JSF 1.1 environment?
    Do you have any ideas to solve this problem without downgrading my JSF tag handler classes from 1.2 to 1.1?
    Thanks a lot!

    Hi BalusC,
    This is the full history:
    I started coding the tag handler classes of my JSF components in the JSF 1.2 way.
    But know, I’am being forced to run the web app that uses those JSF 1.2 components in a WAS 6.1 (servlet 2.4 & jsp 2.0, I suppose).
    Not very elegant solution, I put a ‘servlet2.5-jsp2.1-api.jar’ file in my ‘WebContent\WEB-INF\lib’ directory, and configured a ‘PARENT-LAST’ class loader policy in the server configuration.
    This is my web.xml:
    <?xml version="1.0"?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
            http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         version="2.5">
       <servlet>
          <servlet-name>Faces Servlet</servlet-name>
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
          <load-on-startup>1</load-on-startup>
       </servlet>
       <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>*.faces</url-pattern>
       </servlet-mapping>
         <welcome-file-list>
              <welcome-file>index.html</welcome-file>
              <welcome-file>index.htm</welcome-file>
              <welcome-file>index.jsp</welcome-file>
              <welcome-file>default.html</welcome-file>
              <welcome-file>default.htm</welcome-file>
              <welcome-file>default.jsp</welcome-file>
         </welcome-file-list>
    </web-app>When I launch the JSF example page, I get no logs, no messages, ONLY a blank page (¿?)
    Thank you very much for your skilled help!

  • How i can make  my own connection in java source of a jsp page

    How i can make my own connection in java source of a jsp page (How to get connection from JNDI datasource address) ?
    imagine that i have a rowset in a web page , now i want to do some operation using
    plain JDBC , so i will need a connection object.
    I tried to get one of my rowsets connection but it return null ?
    what is best way to retrive a connection from JNDI datasource that we define for our project?
    for example if i have
    myRowSet.setDataSourceName("java:comp/env/jdbc/be");
    in web page constructor
    now i want a pure connection from the same datasource ? JNDI
    Thank you

    It is not hard to get your own connection from datasource.
    in your case you need to do like the the following code.
    i provide sample to show you how to catch the exception and create an statement .
    Connection con =null;
    try{
    InitialContext ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/be");
    con = ds.getConnection();
    java.sql.Statement st =con.createStatement();
    }catch(SQLException sqlex){
    sqlex.printStackTrace();
    sqlex.getNextException().printStackTrace();
    catch(NamingException nex){
    nex.printStackTrace();
    hth
    Masoud kalali

  • Tag Handler Class classpath

              Hi.
              I have some problems with Tag Handler Classes in custom tags. When tag handler
              class store in package all is OK - I place it's class-file in /WEB-INF/classes/%package-path%/%class-name%.class
              and in tld-file in <tagclass> write: %package-path%.%class-name%.
              When tag handler class don't store in package I place class-file in /WEB-INF/classes/%class-name%.class
              and in tld-file in <tagclass> write: %class-name%, but it's doen't work. When
              jsp starts I recieve:
              D:\bea\wlserver\config\mydomain\applications\.wl_temp_do_not_delete\WEB-INF\_tmp_war_myserver_myserver_CustomTag\jsp_servlet\_simpleexample.java:81:
              cannot resolve symbol
              symbol : class ExampleTag
              location: class jsp_servlet._simpleexample
              ExampleTag csajspexample0 = null;
              ^
              Why? Plese, help me.
              Igor
              

    You probably should not use unnamed packages at all.
              Language spec specifically says that "Unnamed packages are provided by the
              Java platform principally for convenience when developing small or temporary
              applications or when just beginning development."
              Igor Vinnikov <[email protected]> wrote:
              > Hi.
              > I have some problems with Tag Handler Classes in custom tags. When tag handler
              > class store in package all is OK - I place it's class-file in /WEB-INF/classes/%package-path%/%class-name%.class
              > and in tld-file in <tagclass> write: %package-path%.%class-name%.
              > When tag handler class don't store in package I place class-file in /WEB-INF/classes/%class-name%.class
              > and in tld-file in <tagclass> write: %class-name%, but it's doen't work. When
              > jsp starts I recieve:
              > D:\bea\wlserver\config\mydomain\applications\.wl_temp_do_not_delete\WEB-INF\_tmp_war_myserver_myserver_CustomTag\jsp_servlet\_simpleexample.java:81:
              > cannot resolve symbol
              > symbol : class ExampleTag
              > location: class jsp_servlet._simpleexample
              > ExampleTag csajspexample0 = null;
              > ^
              > Why? Plese, help me.
              > Igor
              Dimitri
              

  • Java Bean access in a JSP Tag handler class

    Hello Everybody,
    I am trying to access my java bean(ErrorBean.java) in th doEndTag() method of the tag handler class(MyTagHandler.java) and iam getting an "CLASSCAST EXCEPTION"
    I am doing it like this in the tag handler class.
    MyBeans.ErrorBean errorBean = (MyBeans.ErrorBean)pageContext.getSession().getAttribute("ErrorBean");
    Where MyBeans is the package in which my Error Bean is and iam placing the ErrorBean object in the session object before it comes to the jsp page where i have the jsp Custom tag:
    <%@ taglib uri="/WEB-INF/taglib.tld" prefix="errors" %>
    <errors:message/>
    <%@ include file="footer.jsp"%>
    I was of the opinion that i was casting it right...can anyone help me to find ...where iam doing it wrong...its really URGENT ..PLEASE

    Friend that did not work either ...
    u know what...the ErrorTagHandler class is comiling fine with out errors but in the jsp page when the custom tag is hit..this error is showing up when i see the server log.
    can you throw some light on this..
    thanks..
    Firasath

  • How to access SOAPAction in Handler class ?

    How do I access the SOAPAction in a handler class? I've tried to get the SOAPACTION_URI_PROPERTY
    from the SOAPMessageContext, but the value is null.

    Thanks Christian -- that worked great.
    "Christian" <[email protected]> wrote:
    >
    Hi Nancy,
    the SOAP Action is a HTTP Header field:
    http://www.w3.org/TR/SOAP/#_Toc478383528
    So it should be possible to get this information through the
    getHeader() or getHeaders() method from the HTTPServletRequest
    http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletRequest.html#getHeader(java.lang.String)
    Christian Plenagl
    Developer Relations Engineer
    BEA Support
    "Nancy" <[email protected]> wrote:
    How do I access the SOAPAction in a handler class? I've tried to get
    the SOAPACTION_URI_PROPERTY
    from the SOAPMessageContext, but the value is null.

Maybe you are looking for

  • How much would it be to replace iPhone 4 with phone warranty?

    Ok I just drop my phone trying to run to catch the bus. I had a case but it didn't work....I don't have the apple warranty I have the 1 year warranty I got from sprint... How much do you think the copay would be? My mom says she doesnt want tofux the

  • CASE statement in Calculated column

    Hi Frzz, I have below requirement in Calculated column with CASE statement. Could some one help me how to achieve this with case statement. String  =   0Hello                 01Hello                 012Hello                 0123Hello If  1st Characte

  • How to start Apache?

    cd /usr/apache2 ./apachectl start But testing http://localhost is not successful. It seems that httpd is not running.

  • Document card?

    Hi. Anyone can tell me what means document card? I`m trying to insert a 'delivery' based on a 'sales order' and the error that I get is : '-5002',Base document card and target document card do not match.  [ODLN.DocNum] In code I have specified the ba

  • Pagination scheme. Is it translatable?

    Hi All, how to translate pagination scheme outward? I would like to translate into Russian UI-elements like 'Previous', 'Next', 'row(s)'. Thanks