5 Replies Latest reply on May 4, 2008 12:28 AM by HowardTreisman

    JDBC operation throws a NullPointerException

      Hi all...

      It seems that any attempt to perform a jdbc access from a deployed LCA (my process at this point only contains the JDBC 'query multiple to xml' operation) results in the following exception on the LC server (see below). The query and xml generation all seem to work ok from the Workbench. I can mail the lca upon request. Thanks.

      [4/28/08 17:10:15:557 EDT] 00000059 SystemOut O [Flex] [ERROR] Root cause: java.lang.NullPointerException
      at com.adobe.idp.dsc.jdbc.helper.SqlHelper.executeQuery(SqlHelper.java:85)
      at com.adobe.idp.dsc.jdbc.JDBCService.queryMultipleToXml(JDBCService.java:391)
      at sun.reflect.GeneratedMethodAccessor1517.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:181)
      at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:134)
      at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
      at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(Transa ctionInterceptor.java:74)
      at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTr ansactionCMTAdapterBean.java:336)
      at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doSupports(Ej bTransactionCMTAdapterBean.java:212)
      at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EJSLocalStatelessEjbTransactionCMTAdapter_ caf58c4f.doSupports(Unknown Source)
      at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:104)
      at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt erceptor.java:72)
      at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
      at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateIntercep tor.java:37)
      at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
      at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterc eptor.java:88)
      at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
      at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:113)
      at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:102)
      at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessage Receiver.java:88)
      at com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:21 0)
      at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:57)
      at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
      at com.adobe.idp.taskmanager.dsc.service.TaskManagerServiceImpl.renderForm(TaskManagerServic eImpl.java:3404)
      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:585)
      at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:181)
      at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:134)
      at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
      at com.adobe.idp.dsc.trans
        • 1. Re: JDBC operation throws a NullPointerException
          HowardTreisman Level 1
          A null pointer exception often means that you've left out one of the settings in the component. Do you have any blank values anywhere, or a blank row in one of the tables?
          Howard
          http://www.avoka.com
          • 2. Re: JDBC operation throws a NullPointerException
            Level 1
            I don't see any blank values anywhere. I have a single 'Assign Task' operation with the following config. I can send an lca if you like.

            Initial User = 'Assign to Process Creator'
            Form Data Mappings => input form variable = /process_data/myXFAForm
            output form var = /process_data/myXFAForm

            myXFAForm has as its Render Service/Operation = JdbService/queryMultipleToXml with the following settings:

            datasourceName(literal)= IDP_DS

            sql_info(literal)= select FIRST_NAME, LAST_NAME, CONTACT_INFO, ORACLE_USERID from TVS_TVAS_USER where STATUS='ACTIVE'

            xml_info (literal) = root: tvasUsers; element: User; mapping: [{element_name=firstname, column_index=1, column_name=FIRST_NAME}, {element_name=lastname, column_index=2, column_name=LAST_NAME}, {element_name=emailAddress, column_index=3, column_name=CONTACT_INFO}, {element_name=tvasUserID, column_index=4, column_name=ORACLE_USERID}]

            service output settings:
            document=task/Document
            • 3. Re: JDBC operation throws a NullPointerException
              Jasmin Charbonneau Level 4
              The render service of an xfaForm variable has to call a service that render service that returns a PDF.

              If you set the render service to be a jdbc call to the database, the render service will return an XML stream and the User service won't know what to do with that since it expects a PDF and not an xml data stream.

              What exactly are you trying to do?

              Jasmin
              • 4. Re: JDBC operation throws a NullPointerException
                Level 1
                I'm simply trying diffent ways of getting a drop down list box to populate from a db. I've tryed a number of different things. Right now I'm trying

                queryAsXML ---> xml var --> Set Var (xml to xfaForm) ---> Assign Task

                the xfaForm uses the default renderer and is related to a bound pdf.

                I can send an lca if you like.
                • 5. Re: JDBC operation throws a NullPointerException
                  HowardTreisman Level 1
                  Here's an example of what you're trying to do. It's a bit old (from V7), but the principle should be the same.
                  http://www.avoka.com/apps/checkcookie?location=/resources/resources/PopulatingaDropDownLis tusingSQLPlus.pdf

                  Howard