UnmarshalException when invoking a mbean method with parameters

Hi there,
I'm working with two different applications. Each application is deployed on its own server into the same weblogic(8.1) domain.
Each time one of these application tries to invoke a method on a mbean deployed by the other application, i've got this strange error:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: com.foo.bar.MyClass:
          This error could indicate that a component was deployed on a cluster member but not other members of that cluster. Make sure that any component deployed on a server that is part of a cluster is also deployed on all other members of that cluster
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:164)
at weblogic.management.internal.RemoteMBeanServerImpl_815_WLStub.invoke(Unknown Source)
Note that i didn't configure a cluster.
com.foo.bar.MyClass is the class of a parameter of the invoked method. Both applications have com.foo.bar.MyClass in their classpath.
When i invoke a method without parameter it works fine.
I use:
- weblogic 8.1
- spring 2.0.3
Does anyone have an idea of what could be wrong?
thanks in advance.

Hi again People,
I'm replying to my own post in order to inform you that I have
located the source of my NullPointerException. I started up OC4J
using the following command line:
java -Drmi.debug=true -Drmi.verbose=true -jar orion.jar
This caused OC4J to display a stack trace (in the server window)
showing what method was throwing the exception -- it was one of
mine.
So thanks anyway, and turn your attentions elsewhere.
Cheers,
Avi.

Similar Messages

  • Best practice for calling an AM method with parameters

    Which will be the best way to call an AM method with parameters from a backing bean.
    I usually use the BindingContainer to get the operation binding and then call execute function. But when the method have parameters, how to do it?
    Thanks

    Hi,
    same:
    operationBinding.getParamMap().put("argument1Name", argument1Value);
    operationBinding.getParamMap().put("argument2Name", argument2Value);
    operationBinding.execute();
    Frank

  • How to call a AM method with parameters from Managed Bean?

    Hi Everyone,
    I have a situation where I need to call AM method (setDefaultSubInv) from Managed bean, under Value change Listner method. Here is what I am doing, I have added AM method on to the page bindings, then in bean calling this
    Class[] paramTypes = { };
    Object[] params = { } ;
    invokeEL("#{bindings.setDefaultSubInv.execute}", paramTypes, params);
    This works and able to call this method if there are no parameters. Say I have to pass a parameter to AM method setDefaultSubInv(String a), i tried calling this from the bean but throws an error
    String aVal = "test";
    Class[] paramTypes = {String.class };
    Object[] params = {aVal } ;
    invokeEL("#{bindings.setDefaultSubInv.execute}", paramTypes, params);
    I am not sure this is the right way to call the method with parameters. Can anyone tell how to call a AM method with parameters from Manage bean
    Thanks,
    San.

    Simply do the following
    1- Make your Method in Client Interface.
    2- Add it to Page Def.
    3- Customize your Script Like the below one to Achieve your goal.
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("GetUserRoles");
    operationBinding.getParamsMap().put("username", "oracle");
    operationBinding.getParamsMap().put("role", "F1211");
    operationBinding.getParamsMap().put("Connection", "JDBC");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    return null;
    i hope it help you
    thanks

  • Calling a method with parameters in jstl?

    i need to call a method with a series of String parameters what am i doing wrong?
    the java
        public ArrayList getEmployeeSkills(String ename, String snmae, String yearsexp)the jstl
        <jsp:useBean id="empskill" class="com.Database.EmployeeSkill"/>
        <c:forEach var="emp" items="${empskill.EmployeeSkills(null, null, null)}">
        </c:forEach>

    this works:
         <jsp:useBean id="empskill" class="com.Database.EmployeeSkill" scope="page">
             <jsp:setProperty name="empskill" property="ename" value="Helen Smith"/>
             <jsp:setProperty name="empskill" property="sname" value="Java"/>
         </jsp:useBean>but this part isnt:
         <c:forEach var="empskill" items="${empskill.EmployeeSkillsReport}">
         </c:forEach>ive removed the get part from the method as i have done before from the java class it is calling:
    public ArrayList getEmployeeSkillsReport()
    but it produces:
    org.apache.jasper.JasperException: Exception in JSP: /main.jsp:146
    143:      </jsp:useBean>
    144:      
    145:
    146:      <c:forEach var="empskill" items="${empskill.EmployeeSkillsReport}">
    147:      </c:forEach>
    148:                          
    149:    
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    javax.servlet.ServletException: An error occurred while evaluating custom action attribute "items" with value "${empskill.EmployeeSkillsReport}": Unable to find a value for "EmployeeSkillsReport" in object of class "com.Database.EmployeeSkill" using operator "." (null)
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:843)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:776)
         org.apache.jsp.main_jsp._jspService(main_jsp.java:244)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "items" with value "${empskill.EmployeeSkillsReport}": Unable to find a value for "EmployeeSkillsReport" in object of class "com.Database.EmployeeSkill" using operator "." (null)
         org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:109)
         org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:129)
         org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.evaluate(ExpressionEvaluatorManager.java:75)
         org.apache.taglibs.standard.tag.el.core.ForEachTag.evaluateExpressions(ForEachTag.java:155)
         org.apache.taglibs.standard.tag.el.core.ForEachTag.doStartTag(ForEachTag.java:66)
         org.apache.jsp.main_jsp._jspx_meth_c_forEach_3(main_jsp.java:590)
         org.apache.jsp.main_jsp._jspService(main_jsp.java:232)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

  • WSDL for web method with parameters from different namespaces

    I'm trying to create a web service that exposes a method that accepts a JAXB XML object and a timestamp as parameters and returns another JAXB XML object. I've tried to follow the contract-first method by creating the schema and WSDLs first. I've created the schemas for the XML and deployed them on a web server and I've written the following WSDL:
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
         xmlns:tns="http://bar.org"
         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="MyWebService"
         xmlns:ns0="http://foo.org/Transaction"
         xmlns:ns1="http://bar.org/TransactionResponse"
         targetNamespace="http://bar.org">
         <!-- T Y P E S -->
         <wsdl:types>
              <xsd:schema targetNamespace="http://bar.org"
                  xmlns:ns0="http://foo.org/Transaction"
                  xmlns:ns1="http://bar.org/TransactionResponse"
                  xmlns="http://bar.org">
                   <xsd:import namespace="http://foo.org/Transaction" schemaLocation="http://myHost/schemas/Transaction.xsd"/>
                   <xsd:import namespace="http://bar.org/TransactionResponse" schemaLocation="http://myHost/schemas/TransactionResponse.xsd"/>
                   <xsd:element name="ProcessTransactionRequest">
                       <xsd:complexType>
                           <xsd:sequence>
                               <xsd:element ref="ns0:Transaction"/>
                               <xsd:element name="TransactionTime" type="xsd:dateTime"/>
                           </xsd:sequence>
                       </xsd:complexType>
                   </xsd:element>
              </xsd:schema>
         </wsdl:types>
         <!-- M E S S A G E S -->
         <wsdl:message name="ProcessTransactionRequest">
              <wsdl:part element="tns:ProcessTransactionRequest" name="parameters" />
         </wsdl:message>
         <wsdl:message name="ProcessTransactionResponse">
              <wsdl:part element="ns1:TransactionResponse" name="parameters" />
         </wsdl:message>
         <!-- P O R T   T Y P E -->
         <wsdl:portType name="MyWebServicePortType">
              <wsdl:operation name="ProcessTransaction">
                   <wsdl:input message="tns:ProcessTransactionRequest" />
                   <wsdl:output message="tns:ProcessTransactionResponse" />
              </wsdl:operation>
         </wsdl:portType>
         <!-- B I N D I N G -->
         <wsdl:binding name="MyWebServiceSOAP" type="tns:MyWebServicePortType">
              <soap:binding style="document"
                   transport="http://schemas.xmlsoap.org/soap/http" />
              <wsdl:operation name="ProcessTransaction">
                   <soap:operation soapAction=""/>
                   <wsdl:input>
                        <soap:body use="literal"/>
                   </wsdl:input>
                   <wsdl:output>
                        <soap:body use="literal"/>
                   </wsdl:output>
              </wsdl:operation>
         </wsdl:binding>
         <!-- S E R V I C E -->
         <wsdl:service name="MyWebService">
              <wsdl:port binding="tns:MyWebServiceSOAP" name="MyWebServiceSOAP">
                   <soap:address location="http://www.example.org/"/>
              </wsdl:port>
         </wsdl:service>
    </wsdl:definitions>However when I run the WsImport tool bundled with JAX-WS RI 2.1.1, I get the following interface:
    public interface MyWebServicePortType {
         * @param parameters
         * @return
         *     returns org.bar.transactionresponse.TransactionResponse
        @WebMethod(operationName = "ProcessTransaction")
        @WebResult(name = "TransactionResponse", targetNamespace = "http://bar.org/TransactionResponse", partName = "parameters")
        public TransactionResponse processTransaction(
            @WebParam(name = "ProcessTransactionRequest", targetNamespace = "http://bar.org", partName = "parameters")
            ProcessTransactionRequest parameters);
    }Which is workable, but I was wondering how to modify the WSDL to get a web method signature similar to:
    public TransactionResponse processTransaction(
            @WebParam(name = "Transaction", targetNamespace = "http://foo.org/Transaction", partName = "transaction")
            Transaction transaction,
            @WebParam(name = "TransactionTime", targetNamespace = "http://bar.org", partName = "transactionTime")
            XMLGregorianCalendar transactionTime);With two parameters in the parameter list instead of one. Is there a way to do this?

    Try changing the <xsd:element name="ProcessTransactionRequest"> element name to: <xsd:element name="ProcessTransaction"> and update the reference to it in the <wsdl:message name="ProcessTransactionRequest"> message.
    In order to use wrapper style, your WSDL needs to have the following characteristics:
    1) The operation's input and output messages (if present) each contain a single part
    2) The input message part refers to a global element declaration whose localname is equal to the operation name
    3) The output message refers to a global element declaration
    4) The elements referred to by the input and output message parts (henceforth referred to as wrapper elements) are both complex types defined using the xsd:sequence compositor
    5 The wrapper elements only contain child elements, they must not contain other structures such as wildcards...

  • Array as param type when invoking an MBean

    Hello everybody,
    I need to transfer a file using a byte array. How can I do this?
    I mean, the MBean has a method:
    public boolean fileUpload(byte[] bytes, String filename);And I want to invoke this using:
    boolean uploaded = (Boolean)(server.invoke(client, "fileUpload", params, sign));Where params is a {byte[]}, how do I fill sign[]?
    Thank you!
    Andrea

    By far your best bet is to use an MBean proxy. Suppose your MBean interface looks like this:
    public interface UploaderMBean {
        public boolean fileUpload(byte[] bytes, String fileName);
    }Then, if you're on JDK 6, you could just do this:
    UploaderMBean uploader = JMX.newMBeanProxy(server, objectName, UploaderMBean.class);
    boolean uploaded = uploader.fileUpload(bytes, fileName);On JDK 5 you can use the class MBeanServerInvocationHandler to achieve the same thing with a little more work. (That solution will then work on JDK 6 too.)
    Regards,
    �amonn McManus -- JMX Spec Lead -- http://weblogs.java.net/blog/emcmanus

  • Problem with f:invoke - cannot find method with argument

    Hi,
    I have <f:invoke var="${bpmObj}" methodName="tempMethod" retAttName="... /> in my JSP.
    Now, in ALBPM I have this method tempMethod and I gave it one out argument so it can return something to my JSP variable given in retAttName.
    Problem is that it cannot find this method because it is something like tempMethod(out resultString) and my JSP invoke has no input/output attributes at all.
    It is working only when I delete all in/out args from definition of my method, but I want it to return something! How to do it? please help.
    regards,
    Paul

    Hi.
    Search under sap portal->admi->support->ROOT/WEB-INF/deployment/pcd/ for com.sap.km.cm.repository.service.base.par.bak
    Best regards,
    Aliaksandr Zhukau

  • Error in Split-Join when invoke similliar B.Service with same namespace

    Hi Guys,
    I having a split-join that doing parallel spliting call out to business service. And i encounter this error.
    Severity and Description Path Resource Location Creation Time Id
    Error compiling the Schema Type System: error: sch-props-correct.2: Duplicate global type: GetabcParam@http://www.xx.xx.abc (Original global type found in file: null) SplitJoin.flow line 1 1265267604208 5245
    Can I know is this a limitation of the OSB or is a Bug? Or there is a more better way to implement this?
    Edited by: kpchong on Feb 4, 2010 7:51 AM

    I'm not sure if this is a known limitation or a bug. I faced this issue once, but needed quick fix so I didn't contact Oracle support at all.
    I remember that the problem emerged in case I had a SplitJoin with Parallel action and both branches used WSDL-based business services whose WSDL files imported the same (shared) XSD file. As I wrote before I needed quick fix, so I ended with re-adjusted namespaces just to overcome this issue. Ugly but effective.

  • Invoking Custom Methods with MiniButtons Not Working

    Hi Experts,
    I followed the steps in the Siebel 7.8 doc exactly to invoke method with
    miniButton, but it gave me error:
    The specialized method 'MyTest' is not supported on Business Component
    'Account' used by Business Object 'Account'.(SBL-DAT-00322)
    The steps I copied from the doc shown below, is the doc wrong in certain
    step or anything else I need to take care? I also checked the Siebel
    SupportWeb about the error code, but didn't seem to solve this simple test
    case.
    Any help is appreciated!
    Michelle
    Invoking Custom Methods with MiniButtons
    Be sure to set up Tools for the appropriate Target Browser Group.
    To invoke a custom method with a MiniButton
    1. Choose an applet (for example, Account List Applet) and create a
    control with the following properties:
    Name = ButtonTest
    Caption = Test
    HTML Type = MiniButton
    Method Invoked = MyTest
    2. Right click the Applet and choose Edit Web Layout.
    The Web layout editor appears.
    3. Change the template mode on the Web Controls toolbar to 3: Edit
    List.
    A window opens with the available controls, including the one you just
    created.
    4. Drag and drop the control the ButtonTest control onto an available
    location. When you release the mouse button, the button appears.
    5. Click Save and then choose File > Close.
    6. To add a server script to the applet that enables the button,
    right-click the applet and choose Edit Server Scripts. Add the following
    script to the WebApplet_PreCanInvokeMethod() function.
    function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke)
    if ( MethodName == "MyTest" )
    CanInvoke = "TRUE";
    return( CancelOperation );
    return (ContinueOperation);
    7. Add the following browser script to the applet you are using (for
    example, the Account List Applet).
    function Applet_PreInvokeMethod (name, inputPropSet)
    switch (name) {
    case "MyTest":
    alert( "Siebel 7 browser script!" );
    return("CancelOperation");
    break;
    return ("ContinueOperation");
    8. Run any application that has access to accounts, and go to the
    Accounts screen.
    The new button should appear.
    9. Click Test.
    The Browser Script should display an alert box indicating "Siebel 7
    Browser Script!"

    Hi
    As said above I have tried with Account List Applet and created a new control with MethodInvoked Property=Test; HTML Type=Button and added to the weblayout
    2.Enable the new button on the applet
    Applet--->Server Script
    function WebApplet_PreCanInvokeMethod (MethodName)
    if(MethodName=="Test")
    CanInvoke="True";
    return(CancelOperation);
    return (ContinueOperation);
    3.Applet--->BrowserScript---->
    function Applet_PreInvokeMethod (name, inputPropSet)
    if(name=="Test")
    alert ("Your Result is success")
         return ("ContinueOperation");
    when clicked on button it was throwing following error:
    Siebel Error Message SBL-DAT-00322: The specialized method is not supported on Business Component ' used by Business Object .
    gone through support web and read possible reasons but I am not able to find out where I was wrong
    I am using siebelV 7.7 ; Applet is using Class:"CSSFrameListBase". It is not a Copied applet.
    Could you please suggest me.
    Thank You,

  • ADF how can i execute a query with parameters when the page renders

    hi
    i am using ADF web 11g
    i need to execute a query with parameters when the page renders
    thanks

    hello,
    I'm a fan of Java code, I really am.
    But when you use ADF, you decided to move to a more declarative environment.
    So why not do it declarative, the adf way?
    In your pagedef insert a action binding.
    This can be anything, a call to the application module, a call on the iterator(Like executeWithparams, etc.)
    Create an invokeAction in your pagedef and set the condition.
    This example refreshes(Action 2 is execute query) the data.
    First the method binding:
        <action IterBinding="PersoonIterator" id="Execute" InstanceName="LSAppModuleDataControl.Persoon"
                DataControl="LSAppModuleDataControl" RequiresUpdateModel="true" Action="2"/>And the invoke action
        <invokeAction Binds="Execute" id="refreshData"/>This always refreshes the data on page entry, but anything is possible, you can set condictions for the invokeAction.
    -Anton
    PS Yes I know that pagedefs become backing beans in the end and yes that is Java code, but if you wanna play the ADF way, the goal is the reduction of Java code and the increased performance of declarative programming.

  • Urgent please ! How to invoke java method with diffrent argument types?

    Hi,
    I am new to JNI.
    I had gone through documentation but it is not of much help.
    Can any one help me out how to invoke the below java method,
    // Java class file
    public class JavaClassFile
    public int myJavaMethod(String[] strArray, MyClass[] myClassArray, long time, int[] ids)
    // implementation of method
    return 0;
    // C++ file with Invokation API and invokes the myJavaMethod Java method
    int main()
    jclass cls_str = env->FindClass("java/lang/String");
    jclass cls_MyClass = env->FindClass("MyClass");
    long myLong = 2332323232;
    int intArray[] = {232, 323, 32, 77 };
    jclass cls_JavaClassFile = env->FindClass("JavaClassFile");
    jmethodID mid_myJavaMethod = env->GetMethodID( cls_JavaClassFile, "myJavaMethod", "([Ljava/lang/String;[LMyClass;J[I)I");
    // invoking the java method
    //jint returnValue = env->CallIntMethod( cls_JavaClassFile, mid_myJavaMethod, stringArray, myClassArray, myLong, intArray ); --- (1)
    //jint returnValue = env->CallIntMethodA( cls_JavaClassFile, mid_myJavaMethod, ...........); --- (2)
    //jint returnValue = env->CallIntMethodV( cls_JavaClassFile, mid_myJavaMethod, ...........); --- (3)
    Can any one tell me what is the correct way of invoking the above Java method of (1), (2) and (3) and how ?
    The statement (1) is compilable but throws error at runtime, why ?
    How can I use statements (2) and (3) over here ?
    Thanks for any sort help.
    warm and best regards.

    You are missing some steps.
    When you invoke a java method from C++, the parameters have to be java parameters, no C++ parameters.
    For example, your code appears to me as thogh it is trying to pass a (C++) array of ints into a java method. No can do.
    You have to construct a java in array and fill it in with values.
    Here's a code snippet:
    jintArray intArray = env->NewIntArray(10); // Ten elments
    There are also jni functions for getting and setting array "regions".
    If you are going to really do this stuff, I suggest a resource:
    essential JNI by Rob Gordon
    There is a chapter devoted to arrays and strings.

  • CR2008: parameters ignored when using the PrintToPrinter method

    Hi all,
    Currently I'm using Crystal Reports in all my add-ons and my algorithm is has follows:
    - Create a New Report object;
    - Load the Reports;
    - Set the reports Parameters and SelectionFormula;
    - Set the server/database connection info and login into every table;
    - Load Form OR Send to Printer
        - Load Form procedure:
            - Create a New Windows Form with a ReportViewer control;
            - Set the ReportViewer's ReportSource;
            - Invoke the Refresh method of the ReportViewer control;
            - Invoke the ShowDialog method of the Report object.
        - Send To Printer procedure
            - Invoke the PrintToPrinter method of the Report object...
    When I use the Load Form procedure, everything works has it should: the SelectionFormula filters the correct records and the Parameters hide/show the fields that they are supposed to.
    If I use the Send To Printer procedure, the SelectionFormula works correctly but some Parameters are ignored. I've checked the object properties at runtime, and all the parameters I define are correct...
    My question is: is there some sort of Refresh method that I can call before calling the PrintToPrinter method that forces the report to check the parameter fields values? Or am I doing something wrong?
    My code is posted bellow.
    Thanks in advanced,
    Regards,
    Vítor Vieira

    ' procedure that creates a new ConnectionInfo object with the login credentials to the SQL server.
        Private Sub SetDBConnection()
            Try
                rptConnectionInfo = New ConnectionInfo()
                rptConnectionInfo.DatabaseName = OONE_CompanyDB
                rptConnectionInfo.UserID = OONE_CompanySQLUserId
                rptConnectionInfo.Password = OONE_CompanySQLPass
                rptConnectionInfo.ServerName = OONE_CompanyServer
            Catch ex As Exception
                System.Windows.Forms.MessageBox.Show("Error(SetDBConnection): " & ex.ToString)
            End Try
        End Sub
        ''' procedure that creates a new ReportDocument object
        Private Sub SetReportDocument()
            Try
                rptDocument = New ReportDocument
                rptDocument.Load(rptPath)
                SetParameters()
                rptDocument.DataDefinition.RecordSelectionFormula = SelectionString
            Catch ex As Exception
                System.Windows.Forms.MessageBox.Show("Error(SetReportDocument): " & ex.ToString)
            End Try
        End Sub
        ' procedure that makes the login to the table in the ReportDocument object
        Private Sub SetDBLogonForReport()
            Try
                Dim myTables As Tables = rptDocument.Database.Tables
                Dim myTableLogonInfo As TableLogOnInfo
                For Each myTable As Table In myTables
                    myTableLogonInfo = myTable.LogOnInfo
                    myTableLogonInfo.ConnectionInfo = rptConnectionInfo
                    myTable.ApplyLogOnInfo(myTableLogonInfo)
                Next
            Catch ex As Exception
                System.Windows.Forms.MessageBox.Show("Error(SetDBLogonForReport): " & ex.ToString)
            End Try
        End Sub
        ' procedure that loads a windows form with the report
        Private Sub SetCrystalForm(ByRef Titulo As String)
            Try
                rptCrystalForm = New CrystalForm()
                rptCrystalForm.Text = Titulo
                rptCrystalForm.oCrystalReportViewer.ReportSource = rptDocument
                rptCrystalForm.TopMost = True
                rptCrystalForm.oCrystalReportViewer.Refresh()
                If rptSendToPrinter Then
                    rptCrystalForm.oCrystalReportViewer.PrintReport()
                Else
                    rptCrystalForm.ShowDialog()
                End If
            Catch ex As Exception
                System.Windows.Forms.MessageBox.Show("Error(SetCrystalForm): " & ex.ToString)
            Finally
                ReleaseMemory()
            End Try
        End Sub
        ' Send the report directly to a printer without showing it.
        Private Sub SendReportToPrinter()
            Try
                rptDocument.PrintToPrinter(rptPageSettings.PrinterSettings, rptPageSettings, False)
            Catch ex As Exception
                System.Windows.Forms.MessageBox.Show("Error(SendReportToPrinter): " & ex.ToString)
            Finally
                ReleaseMemory()
            End Try
        End Sub
        ' Procedure that releases memory.
        Private Sub ReleaseMemory()
            Try
                rptParameterField = Nothing
                For Each oTable As Table In rptDocument.Database.Tables
                    oTable.Dispose()
                Next
                If rptSendToPrinter Then
                    rptPageSettings.PrinterSettings = Nothing
                    rptPageSettings = Nothing
                End If
                rptConnectionInfo = Nothing
                rptDocument.Database.Tables.Dispose()
                rptDocument.Database.Tables.Reset()
                rptDocument.Database.Dispose()
                rptDocument.Close()
                rptDocument.Dispose()
            Catch ex As Exception
                System.Windows.Forms.MessageBox.Show("ReleaseMemory: " & ex.ToString)
            End Try
        End Sub

  • How do you invoke a method with native int array argument?

    Hi,
    Will someone help me to show me a few codes samples on how to invoke a method which has only one argument, an int [] array.
    For exampe:
    public void Method1(int [] intArray) {...};
    Here is some simple code fragment I used:
    Class<?> aClass = Class.forName("Test2");
    Class[] argTypes = new Class[] {int[].class};
    Method method = aClass.getDeclaredMethod("Method_1", argTypes);
    int [] intArray = new int[] {111, 222, 333};
    Object [] args = new Object[1];
    args[0] = Array.newInstance(int.class, intArray);
    method.invoke(aClass, args);I can compile without any error, but when runs, it died in the "invoke" statement with:
    Exception in thread "main" java.lang.IllegalArgumentException: object is not an instance of declaring class
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at Test1.invoke_Method_1(Test1.java:262)
         at Test1.start(Test1.java:33)
         at Test1.main(Test1.java:12)
    Any help is greatly appreciated!
    Jeff

    Sorry, my bad. I was able to invoke static methods and instance methods with all data types except native int, short, double and float, not sure the proper ways to declare them.
    After many frustrating hours, I posted the message for help, but at that time, my mind was so numb that I created a faulted example because I cut and pasted the static method invocation example to test the instance method passing int array argument.
    As your post suggested, "args[0] = intArray;", that works. Thanks!
    You know, I did tried passing the argument like that first, but because I was not declaring the type properly, I ended up messing up the actual passing as well as the instantiation step.
    I will honestly slap my hand three times.
    jml

  • JSR 172: error while invoking methods with the same signature

    Hi
    I am facing a peculiar problem which is not making sense to me. This is what I have done:
    1. Written a simple web service that has two methods: sayHello and sayHellToMe. Both these methods have same signatures. They do not take in any parameter and return a string.
    2. Deployed this web service (document/literal) type on Axis 1.2
    3. Generated the stub classes from the wsdl file using Sun Wireless Toolkit's Stub Generator
    4. I have now written a MIDlet that uses this stub class to invoke both the methods one after the other.
    I enabled SOAPMonitor on Axis and saw the SOAP Request and SOAP Response messages. I observed the following:
    1. In the first method: sayHello - everything works fine (with a few tweaks in the Stub class)
    2. However, while invoking the second method sayHelloToMe, the SOAP Body tag in the SOAP Request does not contain any method name. I checked out the Stub class, the qnames and the types are all correct..
    I also realized that this behavior is seen only when I have methods with the same signature in the web service. Any idea why this might be happening? It seems like a very weird problem.
    Any help in this regard will be greatly appreciated.
    Thanks,
    Arati

    Hi, I'm closing this thread and opening the same in another as the content got pasted in reader un friendly format and i'm unable to change the format.
    Thanks,
    Ravi.

  • Using arguments to invoke an excel method from PL/SQL with Oracle COM

    Hello Gentlemen,
    I has been trying to export an excel sheet to a PDF file format using “ExportAsFixedFormat” method, with no success or error message.
    Moreover, I tried to use “PrintOut” method, if I use it with no parameters/arguments it executed without errors and display the sheet to an application installed in my PC (“SnagIt”), if I try to use it with an argument to assign a printer for it, I got this error message “PrintOut method of Workbook class failed xlmain11.chm”.
    I believe I have a problem with using arguments, and I don’t know how to use it in a proper way; the code I used is listed below for your review and your kind help, thank you a lot, and I appreciate so much your helpful feedback.
    Best regards,
    Nabil
    List 01 – using “ExportAsFixedFormat” method
    ==============================
    ORDCOM.InitArg();
    ORDCOM.SetArg('xlTypePDF','XlFixedFormatType');
    ORDCOM.SetArg('E:\ TestDelete.pdf','BSTR');
    ORDCOM.SetArg('xlQualityStandard','BSTR');
    ORDCOM.SetArg('True','BOOL');
    ORDCOM.SetArg('False','BOOL');
    ORDCOM.SetArg('True','BOOL');
    dbms_output.put_line('WorkSheetToken................WorkBookToken........'||WorkBookToken);
    i := ORDCOM.Invoke(WorkBookToken, 'ExportAsFixedFormat', 6, DummyToken);
    List 02 – using “PrintOut” method:
    ======================
    ActivePrinter := 'Macromedia FlashPaper';
    ORDCOM.InitArg();
    ORDCOM.SetArg(activeprinter,'BSTR');
    i := ORDCOM.Invoke(WorkBookToken, 'PrintOut', 1, DummyToken);

    Hello,
    Any help please? I believe I have a problem with using arguments, and I don’t know how to use it in a proper way; the code I used is listed above for your review and your kind help, thank you a lot, and I appreciate so much your helpful feedback.
    Best regards,
    Nabil

Maybe you are looking for

  • How can I use different calendars associated with different emails to see appointmen​ts separately​?

    I have 3 emails accounts on my Blackberry curve. I want to use different calendars for different type of reminders/appointments. How can I do that? In calendar I pressed menu key and then clicked on select calendar, choose one email address (email 1)

  • Max capacity for sd card slot Mac Mini mid 2010

    Has anyone with a MAC Mini mid 2010 tried using the SD card slot for an extended drive?  I'm wondering what the max size is for the slot, and if I put a 64-128 gig SD Card in, would OS X 10.8.2 be able to combine that with an internal HD to create a

  • Infix vs Touch Up Tool

    Just an FYI, for any of you who are struggling with the Text Touch Up Tool when the text is oddly linked between different blocks, give Infix a try.  Infix is an excellent PDF editor that my company uses at times for pdf reporting needs.  Monthly, it

  • Can I sync music and manually add movies?

    This is harder than it seems. I want to sync my ipod to my music library, but still be able to add movies manually just like I can sync photos but manually add movies and music. I think I have the set up right because I got it to the point that I can

  • I have a trouble with the clipboard inside an applet

    I have created simple text editor as applet (by JTextPane). I have a trouble with the clipboard. The clipboard works correctly inside the applet, but I'm not able to paste text from outside text editors (e.g. notepad). But I found out that clipboard