CreateStatement throws exception with OracleXADataSource

          I am having problem getting transaction running with Oracle driver. I am using the
          driver supplied by Oracle. I could not make the weblogic driver working (it gave
          errors at the startup time).
          createStatement throws an exception.
          Sample code, stacktrace/error and config.xml settings are attached.
          It would be great, if somebody can indicate the problem.
          Also, I would appreciate, I can find how DataSource for Weblogic's XA Oracle driver
          can be set.
          Thanks,
          Vinay
          [error_wl.txt]
          

          Hi Vinay,
          A couple of things to note. Oracle 8.1.6's driver has a bug that
          does not accept foreign Xid, and thus cannot be used with any 3rd
          party vendor's Tranaction Manager, including WLS. Oracle 8.1.7's
          driver has fixed this problem, but they have threading issues.
          We have worked around the threading issues in Silversword, but
          not in WLS 6.0 release. For now, the only Oracle XA driver we
          recommend is Weblogic's jDriver for Oracle.
          -- Priscilla Fung, BEA Systems, Inc.
          "Vinay" <[email protected]> wrote:
          >
          >
          >
          >I am having problem getting transaction running with Oracle
          >driver. I am using the
          >driver supplied by Oracle. I could not make the weblogic
          >driver working (it gave
          >errors at the startup time).
          >createStatement throws an exception.
          >Sample code, stacktrace/error and config.xml settings
          >are attached.
          >
          >It would be great, if somebody can indicate the problem.
          >Also, I would appreciate, I can find how DataSource for
          >Weblogic's XA Oracle driver
          >can be set.
          >
          >Thanks,
          >
          >Vinay
          

Similar Messages

  • Throw Exception with Severity Severe on ALBPM 5.7

    Hello,
    Would like to know if there is a way of throwing an exception with severity severe so that the calling PAPI call will get the error back.
    Thank you in advance your you suggestions.
    Edited by: user8913595 on Mar 3, 2011 11:54 AM

    Using admin center, able to get the string to be used in directory.properties.
    FYI, the string looks like below,
    directory.default.url=oracle://customURL:0/schema=bpmdirectory,customURL=jdbc:oracle:thin:@(DESCRIPTION = (LOAD_BALANCE = on)(FAILOVER = on)(ADDRESS = (PROTOCOL = TCP)(HOST = DB_HOST1)(PORT=1521))(ADDRESS = (PROTOCOL = TCP)(HOST = DB_HOST2)(PORT=1521)) (CONNECT_DATA = (SERVICE_NAME = BPMDB.DOMAIN.COM) (FAILOVER_MODE = (TYPE = SELECT) (METHOD = BASIC))))

  • XML closing tags missing throws exception with SAX Parser

    Hey,
    I'm trying to create an XML Document from some HTML.
    I am getting this exception:
    [Fatal Error] :1:334: The element type "input" must be terminated by the matching end-tag "</input>".
    Exception in thread "main" java.lang.RuntimeException: org.xml.sax.SAXParseException: The element type "input" must be terminated by the matching end-tag "</input>".
         at server.XMLUtils.createDocument(XMLUtils.java:76)The xml is like this:
    <html>
    <input name="s" size="5">
    </html>Is there some setting I can change in the parser to make it ignore missing closing tags?
    Here is my current code
         public static Document createDocument(InputStream is) {
              try {
                   Document doc;
                   DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   doc = db.parse(is);
                   doc.getDocumentElement().normalize();
                   is.close();
                   return doc;
              } catch (Exception e) {
                   throw new RuntimeException(e);
         }Thanks

    Nether wrote:
    Hey,
    The xml is like this:
    <html>
    <input name="s" size="5">
    </html>
    That is not XML. It might qualify as HTML. An XML file would be
    <html>
    <input name="s" size="5"/>
    </html>Winston

  • Dispatching GridSelectionEvent throw exception at runtime - A build issue with FB 4.5

    This is a strang probelm I am facing with.
    My code dispatches GridSelectionEvent after setting girds' selected item in one logic path. Following is code lines -
    myDataGrid.selectedItem = instanceTag;
    myDataGrid.dispatchEvent(new GridSelectionEvent(GridSelectionEvent.SELECTION_CHANGE));
    Flash player throws following error on above statements encounter -
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at spark.accessibility::DataGridAccImpl/eventHandler()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.core::UIComponent/dispatchEvent()
    I am saying it is a strang for me because when I use swf file generated by Flex Builder (4.5)'s export to release build, it does not throw error and code works fine as expected.
    But, when I user swf file generated by Ant script, I face the above issue.
    The Flex builder settings is as shown in following image -
    Ant  mxmlc script is as follow -
    <mxmlc      
               file="${basedir}/src/AppMonConfigWizard.mxml"
                static-rsls="false"
               keep-generated-actionscript="false"
               output="${basedir}/bin-release/AppMonConfigWizard.swf" >
         <locale>en_US</locale>
          <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
          <source-path path-element="${FLEX_HOME}/frameworks"/>
          <source-path path-element="${basedir}/src/locale/{locale}"></source-path>
          <compiler.library-path file="${basedir}/../wizard_framework/bin/wizard_framework.swc" append="true"/>
         <compiler.library-path file="${basedir}/../../utils/bin/utils.swc" append="true"/>
          <include-resource-bundles>ErrorMessages</include-resource-bundles>
          <include-resource-bundles>Strings</include-resource-bundles>
    </mxmlc>
    As mentioned earlier that following statements cause exception -
         myDataGrid.selectedItem = instanceTag;
         myDataGrid.dispatchEvent(new GridSelectionEvent(GridSelectionEvent.SELECTION_CHANGE));
    If I change it to
         myDataGrid.setSelectedIndex(<some index value>)   /*selectedItem replaced with setSelectedIndex*/
         myDataGrid.dispatchEvent(new GridSelectionEvent(GridSelectionEvent.SELECTION_CHANGE));
    it does not throw exception.  I would like to mention that myDataGrid.selectedItem = instanceTag; does sets the selected item but then in that case issue arises when dispatching event.
    I my application, similar statemetns were lot at many places (as there were no such issue with SDK 3.1 which was using earlier) so instead of making changes there, it would be better to imitate the build that Flex builder uses when exported the release build.
    Thanks in advance,
    Prithveesingh Zankat.

    Solved it: had set the only public surface contracts checkbox by mistake and the cosntructor was protected...
    Luis Abreu

  • GetBlobReferenceFromServerAsync (and non-async) throw an exception with 404 (not found) if the blob doesn't exist.

    I'm trying to determine if a particular file exists in a blob store. I'm using container.GetBlobReferenceFromServerAsync and if the named blob does't exist I get an exception with a 404. ICloudBlob (which is returned by the method) defines an Exists method
    but it's functionally useless because the GetBlobReferenceFromServerAsync method call itself throws the exception. I do get the behavior I'm looking for if I call container.GetBlockBlobReference instead but there's no async version of that method.

    As I said I'd found that GetBlockBlobReference works but there's no async version of that method. I'm trying to determine IF a blob exists not create one. Since the GetBlobReferenceFromServer returns an ICloudBlob and ICloudBlob defines and Exists method
    you'd assume that it could be used to determine if a blob exists. I'd argue that the fact that it throws and exception when the blob does not exist is a bug in the implementation because it makes the Exist method on the ICloudBlob object functionally useless.
    Also, it seems like a fairly significant miss that there's no async version of GetBlockBlobReference. A query to a cloud resource is exactly the perfect use case for the async/await pattern.
    Does anyone know of an async way to check for the existence of a blob that doesn't involve catching a 404 exception?

  • AM SDK SSO with AM server running in Realm mode throws exception

    Hi All,
    we have a web application which does SSO with AM server using AM SDK APIs. Following is the code snippet.
    SSOTokenManager ssoMgr = SSOTokenManager.getInstance();
    SSOToken token = ssoMgr.createSSOToken(request);
    boolean tokenValid = ssoMgr .isValidToken(token);
    AMUser amuser = null;
    if (!tokenValid) {
    MStoreConnection amsc= new AMStoreConnection(token);
    amuser = amsc.getUser(token.getPrincipal().getName());
    String uid = amuser.getStringAttribute("uid");
    This code works perfectly fine with AM running in Legacy mode. But throws following exception with AM running in Realm mode.
    com.iplanet.am.sdk.AMException: Unable to get attributes from data store.
    at com.iplanet.am.sdk.ldap.DirectoryServicesImpl.getAttributes(DirectoryServicesImpl.java:791)
    at
    com.iplanet.am.sdk.ldap.CachedDirectoryServicesImpl.getAttributes(CachedDirectoryServicesImpl.java:823)
    at
    com.iplanet.am.sdk.ldap.CachedDirectoryServicesImpl.getAttributes(CachedDirectoryServicesImpl.java:625)
    at
    com.iplanet.am.sdk.AMObjectImpl.getStringAttribute(AMObjectImpl.java:669)
    at
    com.sun.comms.client.security.sso.impl.AMSSOProvider.SingleSignOn(AMSSOProvider.java:73)
    at
    com.sun.comms.client.web.sso.SSOFilter.doFilter(SSOFilter.java:154)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    at
    org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:75)
    at
    org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:181)
    at java.security.AccessController.doPrivileged(Native Method)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:177)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
    at
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at
    org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
    at
    com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at
    com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at
    com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at
    com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
    at
    com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
    at
    com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
    at
    com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at
    com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    We have created a realm with sunDS datastore where all our application users data is stored. Same LDAP is used as authentication module (AM auth module) in realm.
    --Balamurugan.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi All,
    we have a web application which does SSO with AM server using AM SDK APIs. Following is the code snippet.
    SSOTokenManager ssoMgr = SSOTokenManager.getInstance();
    SSOToken token = ssoMgr.createSSOToken(request);
    boolean tokenValid = ssoMgr .isValidToken(token);
    AMUser amuser = null;
    if (!tokenValid) {
    MStoreConnection amsc= new AMStoreConnection(token);
    amuser = amsc.getUser(token.getPrincipal().getName());
    String uid = amuser.getStringAttribute("uid");
    This code works perfectly fine with AM running in Legacy mode. But throws following exception with AM running in Realm mode.
    com.iplanet.am.sdk.AMException: Unable to get attributes from data store.
    at com.iplanet.am.sdk.ldap.DirectoryServicesImpl.getAttributes(DirectoryServicesImpl.java:791)
    at
    com.iplanet.am.sdk.ldap.CachedDirectoryServicesImpl.getAttributes(CachedDirectoryServicesImpl.java:823)
    at
    com.iplanet.am.sdk.ldap.CachedDirectoryServicesImpl.getAttributes(CachedDirectoryServicesImpl.java:625)
    at
    com.iplanet.am.sdk.AMObjectImpl.getStringAttribute(AMObjectImpl.java:669)
    at
    com.sun.comms.client.security.sso.impl.AMSSOProvider.SingleSignOn(AMSSOProvider.java:73)
    at
    com.sun.comms.client.web.sso.SSOFilter.doFilter(SSOFilter.java:154)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    at
    org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:75)
    at
    org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:181)
    at java.security.AccessController.doPrivileged(Native Method)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:177)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
    at
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at
    org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
    at
    com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at
    com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at
    com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at
    com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
    at
    com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
    at
    com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
    at
    com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at
    com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    We have created a realm with sunDS datastore where all our application users data is stored. Same LDAP is used as authentication module (AM auth module) in realm.
    --Balamurugan.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Function module JOB_CLOSE throwing exception

    Hello,
    We have a batch job which has 2 steps:
    1) Step 1 uses job_open, job_submit and job_close and immediately schedules batch job A/P_ACCOUNTS which in turn creates batch input sessions A/P_ACCOUNTS.
    2) Step 2 Processes A/P_ACCOUNTS sessions created yesterday or today.
    In few cases, job_close is throwing exception job_close_failed. I believe that error is coming due to non availability of work processes. Job A/P_Accounts is defined as a class C batch job. There is a check in the FM job_close which does the following check:
    - if the class of a batch job is B or C, it calculates the number of free work processes. If there are no work processes available then JOB_CLOSE throws JOB_CLOSE_FAILED exception. 
    - If the class is u2018Au2019, it skips this check.
    We have an option of changing the class of batch job to A but there are some system critical jobs that are running as class A.
    My question is:
    In the code, JOB_CLOSE has been called for scheduling the job A/P_ACCOUNTS with parameter start immediately. Can anyone please let me know what will happen if function JOB_CLOSE is not called with start immediately option? Will the batch job A/P_ACCOUNTS wait till the time work processes are available?
    Or, can anything else be done to solve the issue?
    Regards,
    Siddharth

    HI,
    This is my experience with job_close..
    when i was working in zprograms then i was able to scedule it any time i wanted..
    but in my standard program when i tried it didn't worked....
    so i have to use that option of starting it immediately..
    and then it is working fine..
    now if i schedule 5 jobs... one after another..
    its get queued up...and once the processor is free...its working..
    my code of job close
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount             = job_count
          jobname              = job_name
          strtimmed            = yes " yes = 'X'
        IMPORTING
          job_was_released     = job_released
        EXCEPTIONS
          cant_start_immediate = 1
          invalid_startdate    = 2
          jobname_missing      = 3
          job_close_failed     = 4
          job_nosteps          = 5
          job_notex            = 6
          lock_failed          = 7
          invalid_target       = 8
          OTHERS               = 9.
    regards,
    Yadesh

  • MAM RFC throwing Exception

    Hi friends,
    In my MAM Application, I have imported the syncBO definition provided by SAP,
    One of the syncBO's which I imported is:
    MAM25_001 [Order / Operation for MAM],
    it points to function module:
    1. MAM25_001_CREATE       [Not Working]
    2. MAM25_001_GETLIST      [Working]
    3. MAM25_001_GETDETAIL    [Working]
    4. MAM25_001_CHANGE       [Not Working]
    MAM25001_CREATE internally calls another function module called ALM_ME_ORDER_RELEASE_CHECK, which throws an exception, that
    <b>"The orderid is already released"</b>
    though I am creating the new order,
    Through debugging I found that every time create Function module sends the same orderid to release function module and that is %000000001,
    I dont know why even the standard function module is throwing the exception or may be I am wrong somewhere in using this,
    Please provide me your suggestions,
    Help will be highly appreciated,
    Thanks
    Deepak

    Hi Rahul,
    sorry for replying late,
    yes, I am using this functional module,
    and the user id , i m giving is not already existing one,
    Secondly even if I dont give user id (because that is automatically generated, it gives the same exception,
    I debugged and found that a function module alm_me_order_release_check is throwing this exception with exceptio type as "Already Released",
    I think that is enough information I can provide,
    Regards,
    Deepak

  • How to throw exception in run() method of Runnable?

    Hi, everyone:
    I want to know how to throw exception in run() method of interface Runnable. Since there is no throwable exception declared in run() method of interface Runnable in Java API specification.
    Thanks in advance,
    George

    Thanks, jfbriere.
    I must add though that if your run() methodis
    executed after a call to Thread.start(), then
    it is not a good choice to throw anyRuntimeException
    from the run() method.
    The reason is that the thrown exception won't be
    handled appropriately by a try-catch block.Why do you say that "the thrown exception won't be
    handled appropriately by a try-catch block"? Can you
    explain it in more detail?
    regards,
    George
    Because the other thread runs concurrently with and independently of the parent thread, there's no way you can write a try/catch that will handle the new thread's exception: try {
        myThread.start();
    catch (TheExceptionYouWantToThrowFromRun exc) {
        handle it
    do the next thing This won't work because the parent thread just continues on after myThread.start(). Start() doesn't throw the exception--run() does. And our parent thread here has lost touch with the child thread--it just moves on to "do the next thing."
    Now, you can do some exception handling with ThreadGroup and uncaughtException(), but make sure you understand why the above won't work, in case that was what you were planning to do.

  • Programmatically adding chart to a report throws exception

    programmatically adding chart to a report throws exception "chart condition fields are not valid".
    Configuration:
    I am using CR4E to create web application, I've added RAS jars (rasapp.jar, rascore.jar, reporttemplate.jar, serialization.jar) to this web application. For designing reports i am using Crystal Reports 2008.
    Code:
    <%
    // Get the previously opened report from the session.
    ReportClientDocument reportClientDocument =
         (ReportClientDocument)session.getAttribute("ReportClientDocument");
    System.out.println(reportClientDocument.getReportDocument().getName());
    // Try to get the report's DataDefinition object.
    IDataDefinition dataDefinition;
    try
         dataDefinition = reportClientDocument.getDataDefController().getDataDefinition();
    // If the DataDefinition object can not be retrieved, redirect the user to an error page.
    catch (Exception e)
         System.out.println("With error1");
        return;
    // Create a new ChartDefinition object and set its type to ChartType.group.
    ChartDefinition chartDefinition = new ChartDefinition();
    chartDefinition.setChartType(ChartType.group);
    Get the conditional field of the report's first group. Set this conditional
    field for the ChartDefinition object using the setConditonalFields method. Notice
    that the conditional field is first placed in a Fields collection because the
    setConditionalFields method takes a Fields object as an argument.
    Fields conditionFields = new Fields();
    if (!dataDefinition.getGroups().isEmpty())
         IField field = dataDefinition.getGroups().getGroup(0).getConditionField();
         System.out.println("Condition field name ->" + field.getLongName(Locale.ENGLISH));
         conditionFields.addElement(field);
    chartDefinition.setConditionFields(conditionFields);
    //Get the summary field name from the form on the previous page.
    String summaryFieldName = URLDecoder.decode(request.getParameter("summaryField"));
    System.out.println("Summary field name ->" + summaryFieldName);
    Loop through all of the report's summary fields until the one matching the name
    above is found. Set this summary field for the ChartDefinition object using the
    setDataFields method. Notice that the summary field is first placed in a Fields
    collection because the setDataFields method takes a Fields object as an argument.
    Fields dataFields = new Fields();
    for (int i = 0; i < dataDefinition.getSummaryFields().size(); i++)
        IField summaryField = dataDefinition.getSummaryFields().getField(i);
         if (summaryField.getLongName(Locale.ENGLISH).equals(summaryFieldName))
              System.out.println("Adding data field ->" + summaryFieldName);
              dataFields.addElement(summaryField);
    chartDefinition.setDataFields(dataFields);
    Create a new ChartObject to represent the chart that will be added.  Set the
    ChartDefinition property of the ChartObject using the ChartDefinition object created
    above.
    ChartObject chartObject = new ChartObject();
    chartObject.setChartDefinition(chartDefinition);
    Get the chart type, chart placement, and chart title strings from the form on the
    previous page. If no chart title was chosen, create a generic title.
    String chartTypeString = request.getParameter("type");
    String chartPlacementString = request.getParameter("placement");
    String chartTitle = request.getParameter("title");
    System.out.println("chartTypeString ->"+ chartTypeString + "<-chartPlacementString->" + chartPlacementString + "<-chartTitle->"+chartTitle);
    if (chartTitle.equals(""))
         chartTitle = "untitled";
    Create a ChartStyleType object and a AreaSectionKind object based on the
    the chartTypeString and chartPlacementString retrieved above. In this example
    possible chart types are bar chart and pie chart. Possible chart placements
    are header and footer.
    ChartStyleType chartStyleType = ChartStyleType.from_string(chartTypeString);
    AreaSectionKind chartPlacement = AreaSectionKind.from_string(chartPlacementString);
    // Set the chart type, chart placement, and chart title for the chart.
    chartObject.getChartStyle().setType(chartStyleType);
    chartObject.setChartReportArea(chartPlacement);
    chartObject.getChartStyle().getTextOptions().setTitle(chartTitle);
    // Set the width, height, and top for the chart.
    chartObject.setHeight(5000);
    chartObject.setWidth(5000);
    chartObject.setTop(1000);
    Get a ReportDefController object that can be used to modify the report's definition.
    ReportDefController reportDefController;
    try
         reportDefController = reportClientDocument.getReportDefController();
    catch (Exception e)
         System.out.println("With Error2");
         return;
    *Create a Section object that represents the section that will hold the chart.
    If the chart placement was set header, get the header section, otherwise, if the
    chart placement was set to footer, get the footer section.
    Section chartSection = null;
    if (chartPlacement.equals(AreaSectionKind.reportHeader))
         IArea reportHeaderArea =
              reportDefController.getReportDefinition().getReportHeaderArea();
         chartSection = (Section)reportHeaderArea.getSections().getSection(0);
    else if (chartPlacement.equals(AreaSectionKind.reportFooter))
         IArea reportFooterArea =
              reportDefController.getReportDefinition().getReportFooterArea();
         chartSection = (Section)reportFooterArea.getSections().getSection(0);
    Add the chart to the section using the ReportDefController object.
    reportDefController.getReportObjectController().add(chartObject, chartSection, 1);
    // Save the changes and close the report.
    reportClientDocument.save();
    reportClientDocument.close();
    session.removeAttribute("ReportClientDocument");
    %>     
    Trace:
    com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException: The chart condition fields are not valid.---- Error code:-2147213287 Error code name:invalidChartObject
         at com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException.throwReportDefControllerException(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.add(Unknown Source)
         at org.apache.jsp.AddChart_jsp._jspService(AddChart_jsp.java:230)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at 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 org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
         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 org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
         at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:393)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:595)

    Please try this code snippet
    var cs:ColumnSeries = new ColumnSeries();
    cs.dataProvider = dp;
    cs.displayName = "Series 2";
    cs.yField = "values";
    chart.series.push(cs);
    OR
    var temp:Array = [];
    var cs:ColumnSeries = new ColumnSeries();
    cs.dataProvider = dp;
    cs.displayName = "Series 2";
    cs.yField = "values";
    temp = chart.series;
    temp.add(cs);
    chart.series = temp;

  • Custom XSLT Functions Throw Exception

    Hi,
    I have following requirement-
    1. I have defined and configured some custom XSLT functions in Jdev and BPEL, which throw exception in case of an error.
    2. Now I want to catch that exception in my BPEL process
    3. In My BPEL process I have defined transformation step ( which is using those Custom XSLT functions) in a scope and added a catch branch to that
    4. But even XSLT java function throw an exception , it is not being catch by catch branch.
    Could you please help me regarding this and tell me any other way to catch an exception in BPEL process thrown by Custom XSLT function within transformation step?
    Thanks.

    Hi,
    Its the problem with the date. In the configuration file i used dateTime for java.util.Date, because of this i cant see "User Defined" option in Jdeveloper component pallete. I checked at XML data types i had seen dateTime for java.util.Date Class, but its not working.
    Do anyone created a custom xslt function which has date as parameter or return type?, If so wht they had used as data type for xml and java.
    Thanks,
    RR

  • Throw exception in Java mapping and handle this in BPM

    Hi,
    I'll use a Java mapping in a BPM transform step. Is it possible to throw an exception inside this Java mapping and handle this in a BPM exception handler?
    thanks and regards
    Verena

    Hi Verena,
    In a BPM transformation step, I think you can throw exceptions only for system errors.
    Let me explain with an example, one of the ways to handle your scenario:
    Lets assume your Java Mapping fails then you can trap that exception in your Java mapping and compose an XML message which indicates that an error has occurred.
    say for e.g.
    <intermediateStructure>
    <SatusDocument>
    <StatusCode>ERROR</StatusCode>
    <ErrCode>123</ErrCode>
    <ErrDesc><!populate the thrown exception details></ErrDesc>
    </StatusDocument>
    <Payload>
    <!contains actual XML message with data>
    </Payload>
    </intermediateStructure>
    if Java mapping is Successful, you can compose the XML message as follows:
    <intermediateStructure>
    <SatusDocument>
    <StatusCode>SUCCESS</StatusCode>
    <ErrCode>0</ErrCode>
    <ErrDesc></ErrDesc>
    </StatusDocument>
    <Payload>
    <!contains actual XML message with data>
    </Payload>
    </intermediateStructure>
    You can use BPM switch operation to switch to different processing branches say for e.g. "error" branch or "success" branch by examining the value of <StatusCode> tag.
    Hope it helps !
    Regards,
    Sridhar

  • Question about throws exception in interface and realized class

    Hi,all
    If I define a method In the interface like that-
    public void Execute() throws NumberFormatException; In the realized class, I can define this method like that-
    public void Execute() throws RuntimeException{
            System.out.println("test");       
    }This is a right realization. But if I manage it to throws Exception or to throws Throwable in the class it leads a error. Why add this restrict only to Exception? What is the purpose of this way?
    Greetings and thanks,
    Jason

    When you say "throws NumberFormatException" you are really saying:
    When using classes implementing this interface, you have to be prepared to deal with them throwing a NumberFormatException. Other exceptions won't happen.
    When you come to implement it, it might not be possible for it to throw a NumberFormatException, so there's no reason why you should have to lie about that. Code handling it directly will be fine (it doesn't throw a NFE) and code handling it via the interface will be fine (it will handle NFEs, they just don't happen).
    If your concrete implementation throws other sorts of exception, such as Exception or IOException, and so on, it's incompatible with code that's manipulating the interface. The interface says "NFEs might get thrown, nothing else will." while your implementation says "IOExceptions might get thrown".
    So that explains why you can't use arbitrary exceptions. The special case is RuntimeException. RuntimeExceptions don't have to be caught, and it's expected that they can happen at any time - so there's no point trying to catch and handle them as a general case.
    The classic example of a RuntimeException is a NullPointerException. You don't need to declare your method as throwing a NullPointerException even though it might get thrown. And you don't have to add NullPointerException to the throws part of the interface definition, because you already know that the concrete implementation could throw a NPE at any time.
    Hope that helps (a little).
    I'd recommend reading the API documentation on RuntimeException and Exception to get a clearer insight into this.
    Dave.

  • Throws Exception when jdbc connect to Oracle

    Hi! I'm waiting for your answers.
    When i use jdbc to connect Oracle,system throws exceptions as follows:
    java.lang.ClassCastException: oracle.sql.converter.CharacterConverter12Byte
    oracle.sql.CharacterSet1Byte oracle.sql.CharacterSet1Byte.getInstance (int,racle.sql.converter.CharacterConverter)
              CharacterSet1Byte.java:82
         oracle.sql.CharacterSet oracle.sql.CharacterSetWithConverter.getInstance(int)     CharacterSetWithConverter.java:85
    I code in Oracle9i Jdeveloper 9.0.2. The Oracle version is 9.0.2.
    My code example is as follows:
    package mypackage2;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    public class Class1
    public Class1()
    public static void main(String[] args)
    Class1 class1 = new Class1();
    Connection conn = null;
    try
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    //exception throws in getConnection()
    conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@localhost:1521:CR","system","CR2001");
    catch (Exception e)
    e.printStackTrace();

    import java.io.*;
    import java.sql.*;
    import java.text.*;
    import oracle.jdbc.driver.*;
    public class viewtable
         Connection con;
         Statement st;
         public viewtable (String args[]) throws ClassNotFoundException,FileNotFoundException,IOException,SQLException
         url="jdbc:oracle:thin:system/manager@IP:1521:SID";
         Class.forName ("oracle.jdbc.driver.OracleDriver");
         try
         con=DriverManager.getConnection(url);
              st = con.createStatement ();
              doexample ();
              st.close ();
              con.close ();
         }catch(SQLException e)
              System.err.println(e.getMessage());
         public void doexample () throws SQLException
         ResultSet rs = st.executeQuery("select * from sales");
              if(rs!=null) {
              while(rs.next())
                   int a = rs.getInt("no");                    System.out.println("NO = "+a);
              rs.close();
         public static void main (String args[])
              System.out.println ("Oracle Exercise 1 \n");
              try
                   viewtable test = new viewtable(args);
              } catch (Exception ex)
                   System.err.println ("Exception caught.\n"+ex);
                   ex.printStackTrace ();
    the above is the full code, please check the problem....many thanks

  • Throws Exception - a newcomer...

    I have written a small amount of code that takes information from a text file and displays it in a GUI (swing) - this is called my RasterDisplay class. However, I am now creating another part of the GUI which will have a button that makes a new RasterDisplay. However, when I try and call my RasterDisplay constructor from within my actionPerformed method (see below) It tells me I have an "unhandled Exception type Exception". I can't throw Exception in the actionPerformed method so how do I get this method to work? Any help would be greatly appreciated - I am a total newcomer to Java and can't make head nor tail of related topics in all the forums...
    Cheers!
    import javax.swing.*;
    import java.awt.*;
    import java.awt.geom.*;
    import java.awt.event.*;
    public class RasterToolbar extends JFrame implements ActionListener{
         JButton open;
         public static void main(String[] args) throws Exception{
              new RasterToolbar();
         //method to make display panel with buttons
         public RasterToolbar()throws Exception{
                   super("Raster Viewer 1.0 beta");
                   setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
                   Container contentPane = getContentPane();
                   JPanel p1 = new JPanel();
                   p1.setLayout(new FlowLayout());
                   p1.setBorder(BorderFactory.createEmptyBorder(4,4,4,4));
                   open = new JButton("Open Viewer");
                   p1.add(open);
                   contentPane.add(p1,BorderLayout.WEST);
                   open.addActionListener(this);
                   pack();
                   setVisible(true);
         public void actionPerformed(ActionEvent ev){
         if(ev.getSource()== open){
              System.out.println("Open pressed");
              RasterDisplay viewer = new RasterDisplay(); // HERE IS THE PROBLEM LINE!
    }

    public void actionPerformed(ActionEvent ev){
         if(ev.getSource()== open){
              System.out.println("Open pressed");
              try {
                   RasterDisplay viewer = new RasterDisplay(); // HERE IS THE PROBLEM LINE!
              } catch(Exception e) {
                   // do what ever you want here!
                   e.printStackTrace();
    }

Maybe you are looking for

  • My Macbook Pro fans always on

    Hi to everyone, I just noticed some days ago that on my brand new MacBook Pro (5-6 months older) 2.3 ghz I7 with 10.8.5, the right and left fans are always on. From what I can remember, in this months I never noticed something like this, I mean fans

  • Execution of BW Reports Through Enterprise Portal

    Hello Everybody, Our BW system is version 3.5 based on WEBAS kernel 6.40 and our Enterprise Portal system is based on standalone J2EE Engine 6.40 with the version being EP 6.0 . I want that the BW reports to be executed through Enterprise Portal.Is t

  • How to version a XMLType field or any column

    First of all this is my first post regrading oracle. Second I did read the documentation but I havnt got anyinfo how I can do it. It shows a ref to an external resource like an HTML or xml file residing on file system of the machine. Thanks

  • How to change the position of Welcome : APP_USER & log out link?

    Hi All, We have implemented our client logo in the header & Footer of the home page ,inorder to implement it, i have added the Javascript code in Page HTML section.After adding the code ,i can see the logo looks good but the thing,Welcome : USER_NAME

  • I recently used iTunes and then quit. Now every time I use Safari iTunes keeps flipping in. How do I stop it?

    I have asked this question befor but here it is again. The suggested fix stopped it for a while but it is now doing it again. I recently used iTunes and thenquit. Now whenever I use Safari iTunes keeps flipping in thenI must start all over again. Agg