Database Access NullPointer Exception in Tomcat

Hi
I have got a problem with database access in my servlet i have folowed all steps of installing and configuring tomcat and i have a DNS that i use to connect to my access database but i get a NullPointerException when i try to create a statement.
please help

Please show the code.

Similar Messages

  • Regarding Provisioning a user to Database Access Tables

    Hi,
    I've just completed with the installation of OIM 9101 and upgradation of 9101 to 9102. I'm facing a bit wierd. When I try to create a GTC for the Database Access Tables, I'm not able to see Database Access Tables option, in the drop down list for the Transport Provider.
    I'm a bit confused if I've wrongly upgraded the system or if at all i've missed out some step. Though OIM seems to be ok and working fine.
    Any suggestions as to how to solve this ?
    Regards
    Nikhil

    Thanks Prakash,
    The issue has been resolved.
    I'd like a bit more of your help. I'm facing an error as follows :
    2011-04-14 12:21:52,074 ERROR [XELLERATE.GC.PROVIDER.TRANSFORMATION] Could not transform the data
    java.lang.NullPointerException
         at com.thortech.xl.gc.util.TransformationEngine.doTransformation(Unknown Source)
         at com.thortech.xl.gc.util.TransformationEngine.transform(Unknown Source)
         at com.thortech.xl.gc.runtime.GCAdapterLibrary.executeFunctionality(Unknown Source)
         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:597)
         at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpDBAT_PROVISIONING1_GTC.GENERICADAPTER(adpDBAT_PROVISIONING1_GTC.java:125)
         at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpDBAT_PROVISIONING1_GTC.implementation(adpDBAT_PROVISIONING1_GTC.java:70)
         at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcORC.insertNonConditionalMilestones(Unknown Source)
         at com.thortech.xl.dataobj.tcORC.completeSystemValidationMilestone(Unknown Source)
         at com.thortech.xl.dataobj.tcOrderItemInfo.completeCarrierBaseMilestone(Unknown Source)
         at com.thortech.xl.dataobj.tcOrderItemInfo.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcUDProcess.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcFormInstanceOperationsBean.setProcessFormData(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcFormInstanceOperationsBean.setProcessFormData(Unknown Source)
         at com.thortech.xl.ejb.beans.tcFormInstanceOperationsSession.setProcessFormData(Unknown Source)
         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:597)
         at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
         at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
         at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
         at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
         at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
         at org.jboss.ejb.Container.invoke(Container.java:960)
         at sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
         at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
         at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
         at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
         at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
         at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
         at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
         at $Proxy769.setProcessFormData(Unknown Source)
         at Thor.API.Operations.tcFormInstanceOperationsClient.setProcessFormData(Unknown Source)
         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:597)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at Thor.API.Security.LoginHandler.jbossLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy813.setProcessFormData(Unknown Source)
         at com.thortech.xl.webclient.actions.DirectProvisionUserAction.handleVerifyProcessData(Unknown Source)
         at com.thortech.xl.webclient.actions.DirectProvisionUserAction.goNext(Unknown Source)
         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:597)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         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.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
         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:182)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         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:262)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
         at java.lang.Thread.run(Thread.java:619)
    2011-04-14 12:21:52,074 ERROR [XELLERATE.GC.PROVIDER.TRANSFORMATION] Could not transform the data
    com.thortech.xl.gc.exception.ProviderException: GCPROV.ADAPTER_INPUTSTR_MISSING
         at com.thortech.xl.gc.util.TransformationEngine.doTransformation(Unknown Source)
         at com.thortech.xl.gc.util.TransformationEngine.transform(Unknown Source)
         at com.thortech.xl.gc.runtime.GCAdapterLibrary.executeFunctionality(Unknown Source)
         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:597)
         at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpDBAT_PROVISIONING1_GTC.GENERICADAPTER(adpDBAT_PROVISIONING1_GTC.java:125)
         at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpDBAT_PROVISIONING1_GTC.implementation(adpDBAT_PROVISIONING1_GTC.java:70)
         at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcORC.insertNonConditionalMilestones(Unknown Source)
         at com.thortech.xl.dataobj.tcORC.completeSystemValidationMilestone(Unknown Source)
         at com.thortech.xl.dataobj.tcOrderItemInfo.completeCarrierBaseMilestone(Unknown Source)
         at com.thortech.xl.dataobj.tcOrderItemInfo.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcUDProcess.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcFormInstanceOperationsBean.setProcessFormData(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcFormInstanceOperationsBean.setProcessFormData(Unknown Source)
         at com.thortech.xl.ejb.beans.tcFormInstanceOperationsSession.setProcessFormData(Unknown Source)
         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:597)
         at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
         at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
         at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
         at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
         at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
         at org.jboss.ejb.Container.invoke(Container.java:960)
         at sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
         at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
         at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
         at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
         at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
         at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
         at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
         at $Proxy769.setProcessFormData(Unknown Source)
         at Thor.API.Operations.tcFormInstanceOperationsClient.setProcessFormData(Unknown Source)
         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:597)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at Thor.API.Security.LoginHandler.jbossLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy813.setProcessFormData(Unknown Source)
         at com.thortech.xl.webclient.actions.DirectProvisionUserAction.handleVerifyProcessData(Unknown Source)
         at com.thortech.xl.webclient.actions.DirectProvisionUserAction.goNext(Unknown Source)
         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:597)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         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.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
         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:182)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         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:262)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
    This Error seems to occur because I was trying to attach certain pre-prop adapters within the default process form that is created while installing the connector. Roaming around the threads here, I came to know that this might be the problem as pre-props don't work fine when applied to the GTC's default form.
    To overcome this problem, I've thought of a solution wherein I should create a new Custom Process Form and then apply my pre-props. But for this approach, I'm stuck into the middle. How can I apply a new Custom Form to an existing Provisioning Process ? Is this fesiable ? If yes, where should the changes be made ?
    I tried changing the Table Name inside the GTC's provisioning process so that GTC can pick up the my new process form instead of its default process form, but that again gives an error saying :
    com.thortech.xl.orb.dataaccess.tcDataAccessException: DB_READ_FAILEDDetail: SQL: select err_key, err_code, err_desc, err_rowver, err_remedy, err_count, err_last_occurance, err_action, err_help_url, err_severity from err where err_code='DOBJ.UPDATE_FAILED'Description: Got a null connectionSQL State: Vendor Code: 0Additional Debug Info:com.thortech.xl.orb.dataaccess.tcDataAccessException
    I hope the scenario is clear to you and i'm able to explain upto the mark .. :(
    Kindly help me out..
    Regards
    Nikhil

  • Database access error: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

    Hi All,
    I am using oracle 11g client library on Linux 64bit machine and trying to connect to oracle database using jdbc thin driver.
    The url format what I am trying to use is:
    jdbc:oracle:thin:@IP address:port:service_name
    When service_name = orcl : I am able to connect with the above syntax.
    But when the service_name is having . e.g service_name = orcl.177.39.45, with the above format I get the above error.
    If I change the URL syntax to following, it works
    jdbc:oracle:thin:@IP address:port/service_name
    But both seems to be valid syntax.
    So I would like to undestand the reason behind the same.
    When service_name is having ".", why ":"  does not work and "/"  works and when the service_name is without " ." , 1st format works.
    Is there any specific reason behind same?
    Please let me know,
    Thanks,
    Aarati

    Hello,
    as per the suggetion, I replaced the URL in the format
    URL=jdbc:oracle:thin:@15.154.47.235:1521/ORCL
    original URL :
    URL=jdbc:oracle:thin:@15.154.47.235:1521:ORCL
    With this I was able to access the main page and was not getting database access.
    But when I tried to perform some operations say list the submitted jobs, our application internally contacts Oracle database and gets the information stored in the database.
    its not able to get and it throws exception.
    So is there any reason behind this?
    Pasting our application logs for your referance
    Thu Aug 08 17:03:33 http-0.0.0.0-9000-1: [ERROR] Exception occurred
    com.hp.om.hpos.model.OperationException: Error listing jobs
            at com.hp.om.hpos.model.DPAUtils.DPAlistJobsInDB(DPAUtils.java:98)
            at com.hp.om.hpos.model.DomainGroup.listSubJobsInDB(DomainGroup.java:96)
            at com.hp.om.hpos.model.DomainGroup.listSubJobs(DomainGroup.java:91)
            at com.hp.om.wc.model.jobmanager.pagingmanager.PagingManager.ListJobs(PagingManager.java:381)
            at com.hp.om.wc.webapp.jobmanager.actions.AbstractJobSearchAction.loadSortedJobListing(AbstractJobSearchAction.java:49)
            at com.hp.om.wc.webapp.jobmanager.actions.AbstractJobSearchAction.loadJobListing(AbstractJobSearchAction.java:30)
            at com.hp.om.wc.webapp.jobmanager.actions.BasicSearchAction.doExecute(BasicSearchAction.java:358)
            at com.hp.om.wc.webapp.jobmanager.actions.WCBaseAction.execute(WCBaseAction.java:81)
            at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
            at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
            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.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:235)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
            at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
            at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
            at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Unknown Source)
    ~
    ~
    Thanks,
    aarati

  • Database access with JSP custom tags

    i have created one file in which i am making the connection with mysql data base with con.mysql.jdbc.Driver.and usking J connector and that i'm doing with custom tag.this is the error which i'm getting in tomcat.
    and the tag handler class and TLD file and jsp file is below
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: javax.servlet.jsp.JspException: null
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl .java:841)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.j ava:778)
    org.apache.jsp.DbTry_jsp._jspService(org.apache.jsp.DbTry_jsp:72)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NullPointerException
    Try.Connect.<init>(Connect.java:26)
    sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    java.lang.reflect.Constructor.newInstance(Unknown Source)
    java.lang.Class.newInstance0(Unknown Source)
    java.lang.Class.newInstance(Unknown Source)
    org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool.java:116)
    org.apache.jsp.DbTry_jsp._jspx_meth_db_connect_0(org.apache.jsp.DbTry_jsp:84)
    org.apache.jsp.DbTry_jsp._jspService(org.apache.jsp.DbTry_jsp:62)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.4 logs.
    Apache Tomcat/5.5.4
    Tag handler class
    package Try;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import javax.servlet.jsp.JspException;
    import javax.servlet.jsp.JspWriter;
    import javax.servlet.jsp.PageContext;
    import javax.servlet.jsp.tagext.TagSupport;
    import java.sql.*;
    public class Connect extends TagSupport {
    private String driver = "com.mysql.jdbc.Driver";
    private String dbtype = "mysql";
    private String host = "localhost";
    private String username = "root";
    private String password = "203131";
    private String database = "compose";
    private String scope = "page";
    private String id = "";
    JspWriter out = pageContext.getOut();
    public void setDriver(String str) {
    driver = str;
    public void setDbtype(String str) {
    dbtype = str;
    public void setHost(String str) {
    host = str;
    public void setUsername(String str) {
    username = str;
    public void setPassword(String str) {
    password = str;
    public void setDatabase(String str) {
    database = str;
    public void setScope(String str) {
    scope = str;
    public void setId(String str) {
    id = str;
    public int doStartTag() throws JspException {
    try {
    Class.forName("com.mysql.jdbc.Driver");
    String url= "jdbc:" + dbtype + "://" + host + "/" + database;
    Connection connection = DriverManager.getConnection(url,username,password);
    out.println("right ;;one");
    catch (SQLException e1) {
    System.out.println("Error in HeadingTagv: " + e1);
    catch (Exception e) {
    System.out.println("Error in HeadingTag: " + e);
    return SKIP_BODY;
    TLD is lib.tld
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
    <taglib>
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>db</short-name>
    <display-name>Database Tags</display-name>
    <description>
    A set of tags for working with SQL database access
    </description>
    <tag>
    <name>connect</name>
    <tag-class>Try.Connect</tag-class>
    <body-content>empty</body-content>
    <description>
    </description>
    <attribute>
    <name>driver</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>
    </description>
    </attribute>
    <attribute>
    <name>dbtype</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>
    </description>
    </attribute>
    <attribute>
    <name>host</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>
    Can be given by a run-time expression.
    Host name of the computer where database is located.
    Default is "localhost".
    </description>
    </attribute>
    <attribute>
    <name>username</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>
    Can be given by a run-time expression.
    Username for logging onto the database.
    Default is "root".
    </description>
    </attribute>
    <attribute>
    <name>password</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>
    Can be given by a run-time expression.
    Password for logging onto the database.
    Default is the empty string.
    </description>
    </attribute>
    <attribute>
    <name>database</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>
    Can be given by a run-time expression.
    The name of the database that will be used for
    the SQL commands. Default is no database specified.
    </description>
    </attribute>
    <attribute>
    <name>id</name>
    <required>false</required>
    <description>
    </description>
    </attribute>
    <attribute>
    <name>scope</name>
    <required>false</required>
    <description>
    </description>
    </attribute>
    </tag>
    </taglib>
    JSP file is
    <%@ taglib uri="/WEB-INF/lib.tld" prefix="db" %>
    <html>
    <body>
    <db:connect username="root" password="203131" database="compose" />
    </body>
    </html>

    Answered in your other post:
    http://forum.java.sun.com/thread.jspa?threadID=608780&tstart=0

  • Database Access through JSP

    Hi im trying to access my ORACLE database through a jsp program. The page loads up in the browser, no errors or anything like that, but i get no output.
    I am running things on localhost with TomCat 3.2.3
    Here is the code, any help gratefully appreciated.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE>Testing Database Access</TITLE>
    </HEAD>
    <BODY BGCOLOR="#FDF5E6" TEXT="#000000" LINK="#0000EE"
    VLINK="#551A8B" ALINK="#FF0000">
    <CENTER>
    <TABLE BORDER=5 BGCOLOR="#EF8429">
    <TR><TH CLASS="TITLE">
    Testing Database Access</TABLE>
    </CENTER>
    <P>
    <P>
    Here Is what Might be in the Database
    <P>
    <%@ page language="java" %>
    <%@ page import="java.util.*" %>
    <%@ page import="oracle.jdbc.driver.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="java.sql.*" %>
    <%
         try
    %>
    <%
         DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
         String username = "Donnchadh", password = "zcbu5mya";
         Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@kiwi.isg.computing.dcu.ie:1521:kiwi",username,password);
         java.sql.Statement stmt = conn.createStatement();
         String query = "SELECT * FROM PERSONALS";
         ResultSet rs = stmt.executeQuery(query);
         while(rs.next())
              int ccount = rs.getMetaData().getColumnCount();
              for( int i = 1; i <= ccount; i++ )
                   System.out.print(rs.getString(i)+"\t");
              System.out.println();
    %>
    <%
         rs.close();
         stmt.close();
         if(conn != null)
              try
                   conn.close();
              catch(Exception e)
                   return;
         catch(Exception e)
              return;
    %>
    <P>
    </BODY>
    </HTML>
    I have also tried to access columns directly with this code in the while loop
    while(rs.next())
                        String Title = rs.getString("title");
                        String FName = rs.getString("fname");
                        String LName = rs.getString("lname");
                        String Phone = rs.getString("phone1");
                        String Phone2 = rs.getString("phone2");
                        String Addr = rs.getString("addr");
                        String County = rs.getString("county");
                        String Country = rs.getString("country");
                        out.println("<tr><td>" + Title + "</td><td>" + FName + "</td><td>" + LName
                        + "</td><td>" + Phone + "</td><td>" + Phone2 + "</td></tr>" + "</td></tr>" + Addr
                        + "</td></tr>" + County + "</td></tr>" + Country + "</td></tr>" );

    i give a servlet access to oracle ,that have test ok!
    import java.sql.*;
    import javax.servlet.*;
    import javax.sql.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    public class TestServlet1 extends HttpServlet {
    private static final String CONTENT_TYPE = "image/jpeg; charset=GBK";
    //Initialize global variables
    String strRno =null;
    ResultSet rs=null;
    byte [] buf=null;
    InputStream in;
    int IntNo;
    public void init() throws ServletException {
    //Process the HTTP Get request
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType(CONTENT_TYPE);
    // PrintWriter out = response.getWriter();
    // System.out.println("TEst database prepaired ok��");
    strRno = request.getParameter( "PictNo" );
    IntNo = 0;
    if( strRno != null ) {
    try { IntNo = Integer.parseInt( strRno ); }
    catch( NumberFormatException e ) {
    strRno = null;
    System.out.println("��������������������"); }
    else
    System.out.println("��������������������");
    if( strRno == null ) {
    // response.sendError( HttpServletResponse.SC_NOT_FOUND );
    return;
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    catch (ClassNotFoundException ex2) {
    //      out.println("TEst2��");
    // System.out.println("TEst2�� ex2��");
    String url="jdbc:oracle:thin:@erdos00:1521:erdos";
    Connection con = null;
    try {
    con = DriverManager.getConnection(url, "system", "manager");
    catch (SQLException ex1) {
         //out.println("TEst�� ex1");
         System.out.println("TEst�� ex1��");
    // PreparedStatement sql=con.PrepareStatement("select photo from blob_test WHERE rno = IntNo" );
    PreparedStatement sql = null;
    try {
    sql = con.prepareStatement("select photo from blob_test WHERE rno = 14 ");
    // sql = con.prepareStatement("select photo from blob_test WHERE rno = " +"+ IntNo +" );
    catch (SQLException ex) {
         //out.println("TEst�� ex");
         System.out.println("TEst�� ex��");
    //method prepareStatement(sting) not found in interface java.sql.connection
    // sql.setInt( 1, rno );
    try {
    rs = sql.executeQuery();
    catch (SQLException ex3) {
         //out.println("TEst�� ex3");
         System.out.println("TEst�� ex3");
    System.out.println("TEst database operate ok��");
    // out.println("TEst database operate ok��");
    //��������������������
    try {
    if (rs.next()) {
    buf = rs.getBytes(1);
    in = rs.getBinaryStream("photo");
    else {
    buf = new byte[0];
    }catch (Exception e){
    //throw e;
    response.reset();
    //������image/jpeg������������������������
    response.setContentType("image/bmp");
    // ��bmp��jpeg
    byte[] b = new byte[1024*1024];
    int len;
    while((len=in.read(b)) >0)
    response.getOutputStream().write(b,0,len);
    OutputStream out1 = response.getOutputStream();
    out1.flush();
    out1.write(buf);
    in.close();
    try {
    rs.close();
    catch (SQLException ex4) {
    // out.println("<html>");
    // out.println("<img src='http://192.168.0.1/examples/servlet/TestServlet1?PictNo="+IntNo+"'>");
    // out.println("</html>");
    out.println("<html>");
    out.println("<head><title>TestServlet</title></head>");
    out.println("<body bgcolor=\"#ffffff\">");
    out.println("<p>The servlet has received a GET111111111. This is the reply.</p>");
    out.println("</body></html>");
    //Process the HTTP Post request
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println("<head><title>TestServlet</title></head>");
    out.println("<body bgcolor=\"#ffffff\">");
    out.println("<p>The servlet has received a POST. This is the reply.</p>");
    out.println("</body></html>");
    //Process the HTTP Put request
    public void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    //Process the HTTP Delete request
    public void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    //Clean up resources
    public void destroy() {
    hope u can get some thing from that

  • PLEASE HELP:OIM DATABASE ACCESS TABLE CONNECTOR ERROR

    i m using database access table connector with OIM
    the connector is created
    i have created a table (without a column for password) in database (oracle 10g)
    i did create a lookup definition for account status (only created it,not used it anywhere)
    i get the following error at comand prompt when i run the scheduled task( the task did not run  at specified time)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
    at Thor.API.Security.LoginHandler.jbossLoginSession.runAs(Unknown Source
    at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
    at $Proxy819.performImport(Unknown Source)
    at com.thortech.xl.webclient.actions.CreateConnectorAction.createGeneric
    ConnectorSuccess(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchActio
    n.java:280)
    at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unkn
    own Source)
    at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source
    at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
    at com.thortech.xl.webclient.actions.CreateConnectorAction.execute(Unkno
    wn Source)
    at org.apache.struts.action.RequestProcessor.processActionPerform(Reques
    tProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
    va:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:148
    2)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:206)
    at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown So
    urce)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
    lter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    alve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
    alve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
    yAssociationValve.java:182)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
    e.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
    ava:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
    onnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
    a:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
    :844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
    ss(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
    6)
    at java.lang.Thread.run(Thread.java:619)
    *14:40:31,557 ERROR [SERVER] Class/Method: tcTableDataObj/setTimestamp encounter*
    some problems: {1}
    java.lang.NullPointerException
    at com.thortech.xl.dataobj.tcDataSet.setTimestamp(Unknown Source)
    at com.thortech.xl.dataaccess.tcDataSet.setTimestamp(Unknown Source)
    at com.thortech.xl.dataobj.tcTableDataObj.setTimestamp(Unknown Source)
    at com.thortech.xl.ddm.instance.visitor.ImportVisitor.visitStarted(Unkno
    wn Source)
    at com.thortech.xl.ddm.instance.SchemaInstance.traverse(Unknown Source)
    at com.thortech.xl.ddm.instance.TableInstance.traverse(Unknown Source)
    at com.thortech.xl.ddm.instance.SchemaInstanceFacade.performImport(Unkno
    wn Source)
    at com.thortech.xl.ejb.beansimpl.tcImportOperationsBean.performImport(Un
    known Source)
    at com.thortech.xl.ejb.beans.tcImportOperationsSession.performImport(Unk
    nown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
    at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(St
    atefulSessionContainer.java:598)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
    java:168)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
    ke(CachedConnectionInterceptor.java:158)
    at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(State
    fulSessionInstanceInterceptor.java:333)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
    Interceptor.java:63)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
    rceptor.java:121)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
    torCMT.java:350)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
    81)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
    ryFinderInterceptor.java:138)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:6
    48)
    at org.jboss.ejb.Container.invoke(Container.java:960)
    at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
    er.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
    java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(Loca
    lInvoker.java:169)
    at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
    at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerIntercepto
    r.java:209)
    at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.jav
    a:195)
    at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.
    java:61)
    at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:7
    0)
    at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSession
    Interceptor.java:121)
    at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
    at $Proxy606.performImport(Unknown Source)
    at Thor.API.Operations.tcImportOperationsClient.performImport(Unknown So
    urce)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
    at Thor.API.Security.LoginHandler.jbossLoginSession.runAs(Unknown Source
    at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
    at $Proxy819.performImport(Unknown Source)
    at com.thortech.xl.webclient.actions.CreateConnectorAction.createGeneric
    ConnectorSuccess(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchActio
    n.java:280)
    at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unkn
    own Source)
    at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source
    at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
    at com.thortech.xl.webclient.actions.CreateConnectorAction.execute(Unkno
    wn Source)
    at org.apache.struts.action.RequestProcessor.processActionPerform(Reques
    tProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
    va:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:148
    2)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:206)
    at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown So
    urce)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
    lter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    alve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
    alve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
    yAssociationValve.java:182)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
    e.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
    ava:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
    onnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
    a:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
    :844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
    ss(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
    6)
    at java.lang.Thread.run(Thread.java:619)
    14:40:31,573 INFO [DATABASE] delete SUG where SVR_KEY = ?
    14:40:31,589 INFO [DATABASE] delete PUG where PKG_KEY = ?
    14:40:31,604 INFO [DATABASE] delete PRF where TOS_KEY = ?
    14:40:31,620 INFO [DATABASE] delete MSG where MIL_KEY = ?
    14:40:31,620 INFO [DATABASE] delete MST where MIL_KEY = ?
    14:40:31,635 INFO [DATABASE] delete RML where RML_KEY = ?
    14:40:31,651 INFO [DATABASE] SELECT STA_KEY SELFKEY FROM STA WHERE STA_STATUS =
    14:40:31,667 INFO [DATABASE] SELECT STA_KEY SELFKEY FROM STA WHERE STA_STATUS =
    14:40:31,667 INFO [DATABASE] SELECT STA_KEY SELFKEY FROM STA WHERE STA_STATUS =
    14:40:31,682 INFO [DATABASE] SELECT STA_KEY SELFKEY FROM STA WHERE STA_STATUS =
    14:40:31,682 INFO [DATABASE] SELECT STA_KEY SELFKEY FROM STA WHERE STA_STATUS =
    14:40:31,682 INFO [DATABASE] SELECT STA_KEY SELFKEY FROM STA WHERE STA_STATUS =
    14:40:31,682 INFO [DATABASE] SELECT STA_KEY SELFKEY FROM STA WHERE STA_STATUS =
    14:40:31,682 INFO [DATABASE] SELECT STA_KEY SELFKEY FROM STA WHERE STA_STATUS =
    14:40:31,698 INFO [DATABASE] SELECT STA_KEY SELFKEY FROM STA WHERE STA_STATUS =
    14:40:31,698 INFO [DATABASE] SELECT STA_KEY SELFKEY FROM STA WHERE STA_STATUS =
    14:40:31,698 INFO [DATABASE] SELECT STA_KEY SELFKEY FROM STA WHERE STA_STATUS =
    14:40:31,698 INFO [DATABASE] SELECT STA_KEY SELFKEY FROM STA WHERE STA_STATUS =
    14:40:31,729 INFO [DATABASE] SELECT USR_KEY SELFKEY FROM USR WHERE USR_LOGIN =
    14:40:31,745 INFO [DATABASE] delete MSG where MIL_KEY = ?
    14:40:31,745 INFO [DATABASE] delete MST where MIL_KEY = ?
    14:40:31,760 INFO [DATABASE] delete RML where RML_KEY = ?
    14:40:31,823 INFO [DATABASE] delete MSG where MIL_KEY = ?
    14:40:31,823 INFO [DATABASE] delete MST where MIL_KEY = ?
    14:40:31,839 INFO [DATABASE] delete RML where RML_KEY = ?
    14:40:32,979 INFO [DATABASE] delete MSG where MIL_KEY = ?
    14:40:32,979 INFO [DATABASE] delete MST where MIL_KEY = ?
    14:40:32,995 INFO [DATABASE] delete RML where RML_KEY = ?
    14:40:33,057 INFO [DATABASE] delete MSG where MIL_KEY = ?
    14:40:33,057 INFO [DATABASE] delete MST where MIL_KEY = ?
    14:40:33,057 INFO [DATABASE] delete RML where RML_KEY = ?
    14:40:33,120 INFO [DATABASE] delete MSG where MIL_KEY = ?
    14:40:33,120 INFO [DATABASE] delete MST where MIL_KEY = ?
    14:40:33,135 INFO [DATABASE] delete RML where RML_KEY = ?
    14:40:33,182 INFO [DATABASE] delete MSG where MIL_KEY = ?
    14:40:33,182 INFO [DATABASE] delete MST where MIL_KEY = ?
    14:40:33,198 INFO [DATABASE] delete RML where RML_KEY = ?
    14:40:33,260 INFO [DATABASE] delete MSG where MIL_KEY = ?
    14:40:33,260 INFO [DATABASE] delete MST where MIL_KEY = ?
    14:40:33,276 INFO [DATABASE] delete RML where RML_KEY = ?
    14:40:33,338 INFO [DATABASE] delete MSG where MIL_KEY = ?
    14:40:33,338 INFO [DATABASE] delete MST where MIL_KEY = ?
    14:40:33,354 INFO [DATABASE] delete RML where RML_KEY = ?
    14:40:33,432 INFO [DATABASE] delete OUG where OBJ_KEY = ?
    14:40:33,432 INFO [DATABASE] delete OBA where OBJ_KEY = ?
    14:40:33,682 INFO [DATABASE] delete LKV where LKV_KEY = ?
    14:40:33,682 INFO [DATABASE] delete LKV where LKV_KEY = ?
    14:40:33,682 INFO [DATABASE] delete LKV where LKV_KEY = ?
    14:40:33,682 INFO [DATABASE] delete LKV where LKV_KEY = ?
    14:40:33,682 INFO [DATABASE] delete LKV where LKV_KEY = ?
    14:40:33,682 INFO [DATABASE] delete LKV where LKV_KEY = ?
    14:40:33,682 INFO [DATABASE] delete LKV where LKV_KEY = ?
    14:40:33,682 INFO [DATABASE] delete LKV where LKV_KEY = ?
    14:40:33,745 INFO [STATS] Purging 49 prepared statements
    15:12:12,977 ERROR [DispatchAction] Request[CreateConnector] does not contain h
    andler parameter named method
    Edited by: Chhavi Saluja on Jan 18, 2010 1:11 AM
    Edited by: Chhavi Saluja on Jan 18, 2010 1:12 AM
    Edited by: Chhavi Saluja on Jan 18, 2010 1:42 AM
    Edited by: Chhavi Saluja on Jan 18, 2010 7:13 PM
    i turned off the oim server and then when i started it again this morning, it got started giving following error at command prompt:
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
    at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(Mess
    ageDrivenContainer.java:495)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
    ke(CachedConnectionInterceptor.java:158)
    at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(Message
    DrivenInstanceInterceptor.java:116)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
    Interceptor.java:63)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
    rceptor.java:121)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
    torCMT.java:350)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
    81)
    at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityIn
    terceptor.java:109)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
    ryFinderInterceptor.java:138)
    at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenCont
    ainer.java:402)
    at org.jboss.ejb.Container.invoke(Container.java:960)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvo
    ker.java:1092)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onM
    essage(JMSContainerInvoker.java:1392)
    at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:26
    6)
    at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMess
    ageConsumer.java:906)
    at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:17
    0)
    at org.jboss.mq.SpySession.run(SpySession.java:323)
    at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
    utor.java:761)
    at java.lang.Thread.run(Thread.java:619)
    08:49:47,962 ERROR [DATABASE] Error: Error Keyword: DAE.DB_READ_FAILED
    Description: Could not execute database read. The database encountered a proble
    m with the specified SQL query.
    Remedy: Check the database query. Contact your system adminstrator.
    Action: E
    Severity: H
    Help URL:
    Detail:
    com.thortech.xl.orb.dataaccess.tcDataAccessException: DB_READ_FAILEDDetail: SQL:
    select err_key, err_code, err_desc, err_rowver, err_remedy, err_count, err_last
    occurance, erraction, err_help_url, err_severity from err where err_code='DOBJ
    .UPDATE_FAILED'Description: Got a null connectionSQL State: Vendor Code: 0Additi
    onal Debug Info:com.thortech.xl.orb.dataaccess.tcDataAccessException
    at com.thortech.xl.dataaccess.tcDataAccessExceptionUtil.createException(
    Unknown Source)
    at com.thortech.xl.dataaccess.tcDataBase.createException(Unknown Source)
    at com.thortech.xl.dataaccess.tcDataBase.readPartialStatement(Unknown So
    urce)
    at com.thortech.xl.dataobj.tcDataBase.readPartialStatement(Unknown Sourc
    e)
    at com.thortech.xl.dataobj.tcDataBase.readStatement(Unknown Source)
    at com.thortech.xl.dataobj.tcDataBase.getError(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.handleError(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.handleError(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
    at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
    at com.thortech.xl.dataobj.tcRCE.finishDataReceived(Unknown Source)
    at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages
    .finishReconciliationEvent(Unknown Source)
    at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages
    .execute(Unknown Source)
    at com.thortech.xl.schedule.jms.messagehandler.MessageProcessUtil.proces
    sMessage(Unknown Source)
    at com.thortech.xl.schedule.jms.messagehandler.ReconMessageHandlerMDB.on
    Message(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
    at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(Mess
    ageDrivenContainer.java:495)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
    ke(CachedConnectionInterceptor.java:158)
    at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(Message
    DrivenInstanceInterceptor.java:116)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
    Interceptor.java:63)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
    rceptor.java:121)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
    torCMT.java:350)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
    81)
    at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityIn
    terceptor.java:109)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
    ryFinderInterceptor.java:138)
    at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenCont
    ainer.java:402)
    at org.jboss.ejb.Container.invoke(Container.java:960)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvo
    ker.java:1092)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onM
    essage(JMSContainerInvoker.java:1392)
    at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:26
    6)
    at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMess
    ageConsumer.java:906)
    at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:17
    0)
    at org.jboss.mq.SpySession.run(SpySession.java:323)
    at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
    utor.java:761)
    at java.lang.Thread.run(Thread.java:619)
    Source SQL Exception:
    java.sql.SQLException: Got a null connection
    at com.thortech.xl.dataaccess.tcDataBase.readPartialStatement(Unknown So
    urce)
    at com.thortech.xl.dataobj.tcDataBase.readPartialStatement(Unknown Sourc
    e)
    at com.thortech.xl.dataobj.tcDataBase.readStatement(Unknown Source)
    at com.thortech.xl.dataobj.tcDataBase.getError(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.handleError(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.handleError(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
    at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
    at com.thortech.xl.dataobj.tcRCE.finishDataReceived(Unknown Source)
    at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages
    .finishReconciliationEvent(Unknown Source)
    at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages
    .execute(Unknown Source)
    at com.thortech.xl.schedule.jms.messagehandler.MessageProcessUtil.proces
    sMessage(Unknown Source)
    at com.thortech.xl.schedule.jms.messagehandler.ReconMessageHandlerMDB.on
    Message(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
    at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(Mess
    ageDrivenContainer.java:495)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
    ke(CachedConnectionInterceptor.java:158)
    at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(Message
    DrivenInstanceInterceptor.java:116)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
    Interceptor.java:63)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
    rceptor.java:121)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
    torCMT.java:350)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
    81)
    at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityIn
    terceptor.java:109)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
    ryFinderInterceptor.java:138)
    at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenCont
    ainer.java:402)
    at org.jboss.ejb.Container.invoke(Container.java:960)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvo
    ker.java:1092)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onM
    essage(JMSContainerInvoker.java:1392)
    at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:26
    6)
    at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMess
    ageConsumer.java:906)
    at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:17
    0)
    at org.jboss.mq.SpySession.run(SpySession.java:323)
    at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
    utor.java:761)
    at java.lang.Thread.run(Thread.java:619)
    08:49:47,977 ERROR [DATABASE] Class/Method: tcDataBase/rollbackTransaction encou
    nter some problems: Rollback Executed From
    java.lang.Exception: Rollback Executed From
    at com.thortech.xl.dataaccess.tcDataBase.rollbackTransaction(Unknown Sou
    rce)
    at com.thortech.xl.dataobj.tcDataObj.rollback(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.doRollback(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
    at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
    at com.thortech.xl.dataobj.tcRCE.finishDataReceived(Unknown Source)
    at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages
    .finishReconciliationEvent(Unknown Source)
    at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages
    .execute(Unknown Source)
    at com.thortech.xl.schedule.jms.messagehandler.MessageProcessUtil.proces
    sMessage(Unknown Source)
    at com.thortech.xl.schedule.jms.messagehandler.ReconMessageHandlerMDB.on
    Message(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
    at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(Mess
    ageDrivenContainer.java:495)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
    ke(CachedConnectionInterceptor.java:158)
    at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(Message
    DrivenInstanceInterceptor.java:116)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
    Interceptor.java:63)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
    rceptor.java:121)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
    torCMT.java:350)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
    81)
    at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityIn
    terceptor.java:109)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
    ryFinderInterceptor.java:138)
    at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenCont
    ainer.java:402)
    at org.jboss.ejb.Container.invoke(Container.java:960)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvo
    ker.java:1092)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onM
    essage(JMSContainerInvoker.java:1392)
    at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:26
    6)
    at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMess
    ageConsumer.java:906)
    at

    Yes, but looking at your log, make sure you define it in the logger in capital letters (DBADAPTERLOGGER). I've had issues in the past where i defined the log level as noted in the documentation, and it only outputted the errors because it was outputting in all caps.
    The documentation for the connector defines how you should enter your log levels in JBOSS.
    -Kevin

  • Some questions about my database access bean

    The following is a bean (minus imports) that access a database and populates several "articles" and then returns a set of them. pretty plain really.
    The bean is modified from here to add exception cactching and 'fix' other problems along the way.
    http://forum.java.sun.com/thread.jspa?threadID=727979 (thanks evnafets)
    The results list is genericified(!) to avoif unchecked calls (casting) in this line result.add(article);
    public class dataAccess {
        public List getNewsResults() throws NamingException{
            Context initContext = new InitialContext();
            Context envContext = (Context) initContext.lookup("java:/comp/env");
            DataSource ds = (DataSource) envContext.lookup("jdbc/mySite");
            Connection conn = null;
            Statement stmt = null;
            ResultSet rs = null;
            List<newsArticleBean> result = new ArrayList<newsArticleBean>();
            try {
                String sql = "SELECT * FROM news, users WHERE news.user = users.username";
                conn = ds.getConnection();
                stmt = conn.createStatement();
                rs = stmt.executeQuery(sql);
                stmt.execute();
                while (rs.next()) {
                    newsArticleBean article = new newsArticleBean();
                    article.setTitle(rs.getString("title"));
                    article.setAuthor(rs.getString("author"));
                    article.setEmail(rs.getString("email"));
                    article.setNews(rs.getString("news"));
                    article.setPictureURL(rs.getString("pictureURL"));
                    article.setDate(rs.getDate("date"));
                    article.setTime(rs.getTime("time"));
                    result.add(article);
            } catch (SQLException e) {
                //error message goes here
            finally {
                try {
                    if (rs != null) rs.close();
                } catch (Exception e) {
                    //error message goes here
                try {
                    if (stmt != null) stmt.close();
                } catch (Exception e) {
                    //error message goes here
                try {
                    if (conn != null) conn.close();
                } catch (Exception e) {
                    //error message goes here
        return result;
    }Some questions that would be of great help if answered:
    Im not too sure what a context does or what im doing with it here. My current understanding is that it allows concurrent access of the database.
            Context initContext = new InitialContext();
            Context envContext = (Context) initContext.lookup("java:/comp/env");
            DataSource ds = (DataSource) envContext.lookup("jdbc/mySite");This section im having trouble with too.
    As I see it:
    I set what my sql query will be;
    get a connection @ conn
    now im not too sure what stmt is getting, is it getting ready to send the query.
    stmt does not have an executeQuery() method, so im never actually sure when the sql query gets sent to the database. I have subbed with execute() but it does not take any arguments so the problem of not sending anything remains.
                String sql = "SELECT * FROM news, users WHERE news.user = users.username";
                conn = ds.getConnection();
                stmt = conn.createStatement();
                rs = stmt.executeQuery(sql);Any help greatly appreciated.

    Some questions that would be of great help if
    answered:
    Im not too sure what a context does or what im doing
    with it here. My current understanding is that it
    allows concurrent access of the database.
    Context initContext = new InitialContext();
    Context envContext = (Context)
    Context) initContext.lookup("java:/comp/env");
    DataSource ds = (DataSource)
    aSource) envContext.lookup("jdbc/mySite");
    Nops, it has nothing to do with concurrent access. You use tomcat to set up a Connection Pool. This causes the tomcat server to create a pool of reusable connections on startup. The connection pool (or set of Connection objects) are given a name and the server binds the set of objects to this name in a 'registry'.
    From the code, you use jndi to access the Connections from the pooled objects. While doing so, you have to provide the jndi name against which this object pool is bound to.
    You'll be more clear when you read the fllowing resources.
    http://java.sun.com/products/jndi/
    http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
    >
    This section im having trouble with too.
    As I see it:
    I set what my sql query will be;
    get a connection @ conn
    now im not too sure what stmt is getting, is it
    getting ready to send the query.Yes something of that sort - basically it provides you a wrapper which can accept your query, use the connection object to access the db, execute the query and return a result set.
    stmt does not have an executeQuery() method, so im
    never actually sure when the sql query gets sent to
    the database.er....it has and that's what you use in your code. (http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#executeQuery(java.lang.String))
    I have subbed with execute() but it
    does not take any arguments so the problem of not
    sending anything remains.Hmmm....the execute() method is for a different purpose and it does accept arguments (http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#execute(java.lang.String))
    >
                String sql = "SELECT * FROM news,
    users WHERE news.user = users.username";
    conn = ds.getConnection();
    stmt = conn.createStatement();
    rs = stmt.executeQuery(sql);Any help greatly appreciated.ram.

  • How to handle and manage a multi Database access in runtime with LCDS?

    Hello there
    I got several customer working with the same application and I wonder how,  with LCDS,  to manage  in a runtime a multi dataBase access; without creating a configuration "mxl" file in
    the folder catalina for each database.
    Indeed, each customer have their own dataBase, and so far, I did not find out how to avoid creating a config xml file in catalina for every single database; which force me to create as well for each customer a  folder application, since the name of the config file in catalina require a folder application to be ran under tomcat....
    Thus, my question is :
    Is there anyway to create only one configuration mxl file in catalina (in the server side) and then from the client side (application) let the user select its environment (meaning its database) to run the application.... this technic can be also used for multi database environment such as : Dev / Test / Prod   environment (or database) where the same application can access to.
    Please if any one have an idea or already delt with; just let me know, because I'm entering in a bootle neck and the situation is getting serioulsy critical....
    Regards

    Hello Ulrich,
    with compact and repair I mean the MSAccess function "Compact and Repair".
    Please follow the link below for more details:
    http://office.microsoft.com/en-us/access-help/compact-and-repair-an-access-file-HP005187449.aspx
    Normally you can execute this function directly in Access or with the Windows ODBC Data Sources Administrator  => "Control Panel" => "Administrative Tools" => "Data Sources (ODBC)"...
     I want to execute this function via cvi code and not by hand ;-).
    Thank you for your support.
    Frank

  • How to handle and Manage Multi DataBase access with LCDS in runtime ?

    Hello there
    I got several customer working with the same application and I wonder how,  with LCDS,  to manage  in a runtime a multi dataBase access; without creating a configuration "mxl" file in
    the folder catalina for each database.
    Indeed, each customer have their own dataBase, and so far, I did not find out how to avoid creating a config xml file in catalina for every single database; which force me to create as well for each customer a  folder application, since the name of the config file in catalina require a folder application to be ran under tomcat....
    Thus, my question is :
    Is there anyway to create only one configuration mxl file in catalina (in the server side) and then from the client side (application) let the user select its environment (meaning its database) to run the application.... this technic can be also used for multi database environment such as : Dev / Test / Prod   environment (or database) where the same application can access to.
    Please if any one have an idea or already delt with; just let me know, because I'm entering in a bootle neck and the situation is getting serioulsy critical....
    Regards

    Hello Ulrich,
    with compact and repair I mean the MSAccess function "Compact and Repair".
    Please follow the link below for more details:
    http://office.microsoft.com/en-us/access-help/compact-and-repair-an-access-file-HP005187449.aspx
    Normally you can execute this function directly in Access or with the Windows ODBC Data Sources Administrator  => "Control Panel" => "Administrative Tools" => "Data Sources (ODBC)"...
     I want to execute this function via cvi code and not by hand ;-).
    Thank you for your support.
    Frank

  • BIB-16613 Database access error occurred while connecting to the OLAP insta

    I am trying to connect to the database using the BI Beans sample bootstrap.jpr
    I am getting the BIB-16613 error.
    oracle.dss.security.BISecurityException: BIB-16613 Database access error occurred while connecting to the OLAP instance.
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    The bi_checkconfig utility gives me:
    C:\utils\JDev903\bibeans\bin>bi_checkconfig -h pavelr -po 1521 -sid LOCAL -u BIBDEMO -p BIBDEMO
    BI Beans Diagnostics(v1.0.0.0) 17/03/03
    ===============================================================================
    JDEV_ORACLE_HOME ............................. = C:\utils\JDev903
    JAVA_HOME .................................... = C:\OraHome1\jdk
    JDeveloper version ........................... = 9.0.3.1035 (Production)
    BI Beans version ............................. = 9.0.3.4.0
    BI Beans internal version .................... = 2.7.0.11.3
    Connect to database .......................... = Successful
    JDBC driver version .......................... = 9.2.0.1.0
    JDBC JAR file location ....................... = C:\utils\JDev903\jdbc\lib
    Database version ............................. = 9.2.0.2.1
    OLAP Catalog version ......................... = N/A
    OLAP AW Engine version ....................... = N/A
    OLAP API Server version ...................... = N/A
    BI Beans Catalog version ..................... = N/A; not installed in BIBDEMO
    OLAP API JAR file version .................... = 9.2
    OLAP API JAR file location ................... = C:\utils\JDev903\jdev\lib\ext
    Load OLAP API metadata ....................... = Successful
    Number of metadata folders ................... = 3
    Number of metadata measures .................. = 26
    Number of metadata dimensions ................ = 22
    Metadata output location ..................... = C:\utils\JDev903\bibeans\bin\bi_metadata.txt
    I can connect to OLAP BIBDEMO (and SH) schema using OEM.
    I can connect to BIBDEMO from JDev Connections (Catalog connection to BIBCAT, OLAP connection to BIBDEMO).
    How can I establish the connection from the bootstrap sample?
    Pavel

    Please try follow the steps under "Installing and Configuring the Samples "http://otn.oracle.com/products/bib/htdocs/samples/installing_samples.html - the section titled "Update the samples project settings".

  • 1 View linked to 2 CompCont: NullPointer Exception

    Hi,
    Here is the architecture of my app :
    MainView --> CompContA --> ModelA (RFC function A)
    ........|
    ........|---> IntCompB --> CompContB --> Model B (RFC function B)
    And here is the content of the MainView :
    AdviceNumber : [
    Z2_I_Rechercher_Avis_Input.AdviceNumber) | RefreshButton1
    UserId : [Z2_I_Rechercher_Bottin_Input.UserId) | RefreshButton2
    Name : [Z2_I_Rechercher_Avis_Input.Output.It_Infos_Bottin.Name) 
    Now, my application works when I populate an AdviceNumber and press the RefreshButton1.  At the return, the name field is refreshed and I use some Java code to move the UserId that my function returned to the UserId of the screen. This works well.
    Then if I change the value of the UserId in the screen and press the RefreshButton2, the second function returns me another name, and I use some Java code to move this name into the Name field of the screen. This works well too.
    The problem is that I can't use the refreshButton2 first!  I get a NullPointer exception.
    And I know why, it's because the « Output » structure of my Z2_I_Rechercher_Avis_Input is not initialized (since the refreshButton1 has not been used yet).
    But I can't find the right way to code it.
    Can you help me, thanks!
    Message was edited by:
            Emanuel Champagne

    I want the user to click on the button he wants.
    I just need to know how to initialize the Output.Struc1 when the user decides to click on the RefreshButton2 First.
    It's the line in bold that give me the error (but that line works well when the RefreshButton1 is used first!)
      public void onActionRafraichirAvis(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionRafraichirAvis(ServerEvent)
         //$$begin ActionButton(-775562010)
         wdThis.wdGetAvisCompController().executeZ2_I_Rechercher_Avis_Input();
         //$$end
         // At the return, we need to refresh the values of the screen with the ones returned by the function.
         // Access to the structure showed on the screen
    IIt_Infos_BottinElement AvisInfosBottinEl = wdContext
                                                                  .nodeIt_Infos_Bottin()
                                                                  .currentIt_Infos_BottinElement();
        // Access to the structure received by the RFC function
        IIt_Z2I053TElement BottinEl = wdContext
                                                             .nodeIt_Z2I053T()
                                                             .currentIt_Z2I053TElement();
         <b>AvisInfosBottinEl.setName(BottinEl.getName());</b>
    Message was edited by:
            Emanuel Champagne

  • Slow database access across network

    I have a postgresql database setup on a server machine and have written a java program in netbeans that accesses it. The problem i have is that running the jar created by netbeans from any other machine on the network has really slow database access but running the program from netbeans itself is fine. Running the jar on the server machine is also fine.
    Anyoner got any idea as to why this could be?
    Tom

    I don't know if this will help, I'm just wading into writing my own java apps to hit a SQL 2K db. We purchased a SQL2k/JSP driven backend on which we extended their OM to meet our needs. It was build as an extranet product but ran very poorly across the 'Net.
    The biggest annoyance was not the actual transaction time of the app but the time it took from the end user to click a button and the start of the transaction.
    After much testing I determined it was the JSP.
    So what we have done to alieviate the issue is to have multiple regional Tomcats that 'throw' their transactions to a central colocation where the SQL servers sit (so the tomcats do the JSP managment in a sense locally to the end user) . For big clients we actually place a linux/tomcat box at the edge of their firewall. For whatever reason, I'm far too busy to determine the how now that I get the responses I need, this has completely eradicated the annoying pause between user interaction and the actual transaction to the DB server. Extended testing showed the SQL server running in the sub half second range to process a command but the tomcat rendering could take up to 2 to 5 seconds in worst case for no discernable reason. Moving the tomcat frontends to the network segment where the clients we solved it.
    Of course I'm digging into swing now too and it has some slowness that the Eclipse zealots say SWT fixes but I haven't the depth or experience to properly judge the camps arguments yet.
    hth...

  • Database access help

    Hi All,
    I am having major difficulties with my web application on Sun Web Server 6.1.
    After a few days of moderate use (ca. 60 database accesses an hour), my web
    server locks up and gives time out errors when requests are made.
    After discussing this with fellow programmers, I thought my problem
    stems from the database access I use. I wasn't using database connection
    pooling, so I thought that might be the answer.
    Using the Web server's JDBC Connection Pooling, I set up pooling to work with my application.
    Everything seemed to work fine, but after a few days of use, the web server once again locked
    up.
    Below, please find the class I use to query databases. Do you have suggestions as to how to stream this class or suggestions as to where errors might lurk? Can you see any potential issues with the code I have written?
    This class is accessed in the following way: From another class, this call is made:
    ConnectAndQuery caq = new ConnectAndQuery();
    Vector result = caq.getSelect("Select * from table", theDatabaseIwanttoAccess);
    --> now goes to appropriate method in below ConnectAndQuery class
    ------------------------- ConnectAndQuery.class ----------------------------------------------------
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.sql.*;
    import javax.sql.*;
    import javax.naming.InitialContext;
    import com.sun.gscc.backend.PropertiesGrabber;
    import com.sun.gscc.backend.Communicator;
    * Manages database connections.
    * @author me
    * @version 1.0, 2003-12-02
    public class ConnectAndQuery {
    protected String sql = "";
    protected String dbName = "";
    public Connection conn;
    public DataSource source;
    public Statement stmt;
    PropertiesGrabber pg = new PropertiesGrabber();
    Communicator c = new Communicator();
    * Setter for the sql variable.
    * @param givenSql The sql required to process
    public void setSql(java.lang.String givenSql) {
    sql = givenSql;
    * Sets the dbName needed to commect
    * to the correct database.
    * @param givenDbName Name of the database - name and connections specified within this class
    public void setDbName(java.lang.String givenDbName) {
    dbName = givenDbName;
    * Check completeness of data.
    * If sql or dbName not present it'll return false.
    * @return String Checks if data is available
    protected String checkDataAvailability(){
    String returnValue = "";
    if(dbName == ""){
    returnValue += "\nNo database selected for query";
    if(sql == ""){
    returnValue += "\nNo SQL statement for query action";
    return returnValue;
    * Returns the appropriate connection to the required database.
    * @return String connection string
    * @exception SQLException
    * @exception Exception
    protected String getConnection(){
    try{
    InitialContext initContext = new InitialContext();
    // First, if test conditions, switch to appropriate test databases.
    if(dbName == "sccweb" && pg.getValue("testConditions") != null && pg.getValue("testConditions").equals("true")){
    dbName = "yikes";
    if(dbName == "maize" && pg.getValue("testConditions") != null && pg.getValue("testConditions").equals("true")){
    dbName = "thefarm";
    // Then, get connection from configured pool
    source = (DataSource) initContext.lookup("java:comp/env/jdbc/" + dbName);
    conn = source.getConnection();
    stmt = conn.createStatement();
    //System.err.println("Opening: " + conn.toString());
    return conn.toString();
    }catch (SQLException e){
    c.emailThis(pg.getValue("adminEmail"), "SCCWebError", "SCCWeb Error: [ConnectAndQuery.getConnection] SQLException", "dbName tried: " + dbName + "\nSQLException: " + e.toString());
    return "ConnectAndQuery, SQL Exception:\n" + e.toString();
    }catch (Exception e){
    c.emailThis(pg.getValue("adminEmail"), "SCCWebError", "SCCWeb Error: [ConnectAndQuery.getConnection] Exception", "dbName tried: " + dbName + "\nException: " + e.toString());
    return "ConnectAndQuery, Some other getConnection Exception:\n" + e.toString();
    * Takes care of insert, update and delete requests.
    * Must have set both dbName as well as the sql String.
    * Will return number of rows affected as String.
    * @return String Number of rows affected
    * @exception SQLException
    * @exception Exception
    public String getInsertDelete() {
    // If insufficient data, bail out miserably
    String complete = checkDataAvailability();
    String returnValue = "not set";
    if(complete != ""){
    return "Complete Error: " + complete;
    }else{
    int rv = 0;
    try{
    String success = getConnection(); // get this from another function to get correct db
    rv = stmt.executeUpdate(sql);
    returnValue = "" + rv;
    }catch (Exception e){
    c.emailThis(pg.getValue("adminEmail"), "SCCWebError", "SCCWeb Error: [ConnectAndQuery.getInsertDelete] Exception", "getInsertDelete Exception: " + e.toString() + "\nWith: " + sql);
    returnValue = "ConnectAndQuery, at getInsertDelete, Some other Exception:\n" + e.toString();
    }finally{
    try{
    stmt.close();
    conn.close();
    }catch(Exception e){
    c.emailThis(pg.getValue("adminEmail"), "SCCWebError", "SCCWeb Error: [ConnectAndQuery.getInsertDelete] Exception", "Close() Exception: " + e.toString());
    return returnValue;
    * Processes Insert and Delete requests with given SQL and DB Name.
    * @param givenSql
    * @param givenDbName
    * @return String Number of rows affected
    public String getInsertDelete(String givenSql, String givenDbName){
    sql = givenSql;
    dbName = givenDbName;
    return getInsertDelete();
    * Takes care of Select statements.
    * Must have set both dbName as well as the sql String.
    * Will return a vector.
    * @return Vector of Hashes containing the Results of the query
    * @exception SQLException
    * @exception Exception
    public Vector getSelect(){
    // If insufficient data, bail out miserably
    String complete = checkDataAvailability();
    String returnTest = "not set";
    Vector returnValue = new Vector();
    String connectionString = "not set";
    if(complete != ""){
    returnTest = "Complete Error: " + complete;
    }else{
    try{
    connectionString = getConnection();
    StringBuffer query = new StringBuffer(sql);
    ResultSet result = stmt.executeQuery(query.toString());
    ResultSetMetaData rsmd = result.getMetaData();
    while(result.next()){
    Hashtable hash = new Hashtable();
    for(int i = 1; i <= rsmd.getColumnCount(); i++){
    //System.err.println("-------------------------------");
    //System.err.println("SQL: " + sql);
    //System.err.println("Index: " + i);
    //System.err.println("Test: " + rsmd.getColumnName(i));
    //System.err.println("Result: " + result.getString(i));
    if(result.getString(i) != null){
    hash.put(rsmd.getColumnName(i),result.getString(i));
    }else{
    hash.put(rsmd.getColumnName(i),"");
    returnValue.addElement(hash);
    }catch (Exception e){
    c.emailThis(pg.getValue("adminEmail"), "SCCWebError", "SCCWeb Error: [ConnectAndQuery.getSelect] Exception", "getSelect Exception: " + e.toString() + "\nWith: " + sql);
    returnTest = "ConnectAndQuery, getSelect, Some other getSelect Exception:\n" + e.toString();
    }finally{
    try{
    stmt.close();
    conn.close();
    //System.err.println("closing: " + connectionString);
    }catch(Exception e){
    c.emailThis(pg.getValue("adminEmail"), "SCCWebError", "SCCWeb Error: [ConnectAndQuery.getSelect] Exception", "Close() Exception: " + e.toString());
    return returnValue;
    * Takes care of Select statements with given SQL.
    * Must have set both dbName as well as the sql String.
    * Will return a vector.
    * @return Vector with Results of the query
    * @exception SQLException
    * @exception Exception
    public Vector getSelect(String givenSql, String givenDbName){
    sql = givenSql;
    dbName = givenDbName;
    return getSelect();
    }

    When you post code, please use [code] and [/code] tags as described in Formatting Help on the message entry page. It makes it much easier to read and prevents accidental markup from array indices like [i].

  • Database access from session bean

    Hello,
    I have a stateless session bean which performs some complex
    calculations, and also does some database access.
    For the database access the bean class has a datasource as
    follows:
    public class TestBean implements SessionBean {
    private DataSource ds_;
    public void ejbCreate() {
         getDataSources();
    private void getDataSources() {
         try {
         Context ictx = new InitialContext();
         ds_ = (DataSource)ictx.lookup("java:comp/env/jdbc/TestDB");
         } catch (Exception e) {
         e.printStackTrace();
         throw new EJBException(e);
    Now this class has a method (which is also in the remote interface)
    calculateSomething(). This method constructs a number of other
    objects that do the actual calculation, and one of these objects
    does the actual database access. How would another object be able to
    use the datasource that was constructed in the bean class?
    I could pass the datasource reference to that object, but that would
    break my encapsulation. This is because that object does not get
    created directly by the bean object, but rather the way the objects
    interact is something like A -> B -> C, where A is the TestBean, and
    C is the object that does the DB access. If I passed the datasource,
    I would need to make B aware of the datasource, which doesn't
    seem good design, because B doesn't do any database access.
    Alternatively I could do the lookup in class C, but that would
    degrade the performance, as an object C gets created and destroyed
    every time the calculateSomething() method is called.
    A third option I have thought of, is to add a public method to the
    bean that returns a connection. Whenever another object gets
    created, a reference to the bean object will be passed along. Then,
    if another object needs to do database access, it will call back
    the bean to get a connection. This seems just as bad (if not worse)
    than the first option.
    Does anyone have an elegant solution for this situation? What is
    the best practice of handling datasources when a bean class doesn't
    do the database access itself? In all the examples I've seen so far,
    all the functionality was in the session bean class, but again that
    doesn't seem good OO design, and would result in a single huge class.
    regards,
    Kostas

    Thanks again to both for the replies. Here are my responses:
    Yi Lin: Yes, I know that an entity bean would solve this problem, however it has been decided not to use entity beans so this is not my call (I think the reason entity beans are not allowed in this project is that they are considered risky: there are other applications that access the same database, so if the container caches entity bean data as you describe, then the users might get inconsistent results).
    Gerard: Actually object B is the one that has the business logic and C is a peer object that only does database access and no calculaitons. For example B can be Customer, and C CustomerDB. This is why object B does not have any knowledge of datasources or connections. So my design does not appear to be that bad!
    As far as the factory you propose is concerned, I cannot understand how this would solve my problem. In order to solve this situation the factory would need to be persistent, i.e. get created by the ejbCreate() method, and destroyed whenever the container decides to destroy the bean. There would be no point in object C creating the factory, as I would have the overhead of doing the JNDI lookup every time I create a C.
    So the question remains the same: how would I pass a reference to the factory from A to C without making B aware of it?

  • Database Access delays-how to improve upon that?

    Hi friends,
    I have this simple class,which takes in query and returns the results.I don't know why the database access is so slow,and if i try to add my driver load statements into the constructor the java class starts throwing "null pointer exception"(Java Class code given below)..I don't know much about connection pool,can u just have a look at this simple class,and tell me if there's anything on which i can improve upon and where to add the(*.close() statements).The same query runs instantly if i make a php program.Urgent help needed...please help me guys.
    public class getResultSet{  private Connection con = null;  private Statement st = null;  private String dsn = "jdbc    b2j:net:xxx";  private String uname = "xxx";  private String pwd = "xxx";  private String query = "";  ResultSet results;   public void ResultS()throws Exception{      try{          Class.forName("com.ibm.db2.jcc.DB2Driver");          con = DriverManager.getConnection(dsn, uname, pwd);          st = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,                                   ResultSet.CONCUR_READ_ONLY);         }      catch (SQLException e) {          e.printStackTrace();          }     }     public ResultSet getResults(String query){            results = null;            try{               results = st.executeQuery(query);               }               catch(SQLException sqle){                 sqle.printStackTrace();               }            return results;     }   }

    Some comments on the code
    public class getResultSet{ // Class names should start with a capital letter and be nouns
    private Connection con = null;
    private Statement st = null; // Statements are transient and should probably not be a member variable
    private String dsn = "jdbc    b2j:net:xxx";  // dsn, user, pass should be final
    private String uname = "xxx"; 
    private String pwd = "xxx"; 
    private String query = "";  // Seems you're not using this
    ResultSet results;   // This really shouldn't be declared here
    public void ResultS()throws Exception{ // Method should start with a lower-case letter and be a verb/* The client code is supposed to call this, then the other method?
    Very fragile. I'm guessing NullPointerExceptions occur if ResultS
    is not called first. Have the other method call this one as necessary.
    try{        
    Class.forName("com.ibm.db2.jcc.DB2Driver");
    con = DriverManager.getConnection(dsn, uname,
    uname, pwd);
    st =
    st =
    =
    con.createStatementResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
    ultSet.CONCUR_READ_ONLY);
    catch (SQLException e) {  
    e.printStackTrace();
    public ResultSet getResults(String query){      
    results = null;
    try{          
    results = st.executeQuery(query);
    catch(SQLException sqle){   
    sqle.printStackTrace();
    return results; // It's a bad idea to return ResultSets as that leaves resources open
    } // Where's the cleanup? You're leaving ResultSet, Statement, Connection open
    >It is probably slow because opening connections takes a long time. You may or may not need a connection pool depending on your app. Perhaps you can just open a connection at the beginning and leave it open until your app finishes. That should reduce the overhead and still be very simple.

Maybe you are looking for

  • Extract to flat file or IDOC

    Does anybody know how to use BW Datasources in R3 (found in transaction RSA5) to extract data to a flat file for the purpose of loading a non-SAP data warehouse? The export file may be an IDoc. I tried RSA3, but it seems you have to specify a "target

  • Splitting and glueing back together pdf docs

    Hi, I wish to cut and then repaste back together a pdf doc? How do I do it?

  • Bug on jcaps 5.1.2?????

    Hi, when i try to map obr segment the designer logs this error (ide.log): Jul 28, 2009 10:44:52 AMjava.lang.NullPointerException Jul 28, 2009 10:44:52 AM at com.stc.editor.basicmapper.canvas.jgo.BasicCanvasController.handleDragEnter(BasicCanvasContro

  • No header/footer in page flow JSP

    good morning group i have a jsp in a popup which is part of a page flow, and therefore, the html header & footer is displayed. is there a way to suppress the rendering of the header&footer stuff ? many thanx in advance :-) best wishes -ToM-

  • Cannot Copy, Paste in OneNote webapp under Firefox

    I have attempted to modify the profile to activate the copy, paste functions to be used in OneNote webapp as follows: user_pref("capability.policy.policynames", "allowclipboard"); user_pref("capability.policy.allowclipboard.sites", "http://office.liv