Type mismatch question

Hi,
I am tasked to create a class called Dollars with a constructor that takes in a double value.
In addition, this class has a method add, which is supposed to be of return type Dollars add(Dollars dollars).
I know I need to return a _value in a Dollars type. However, it is currently in a double type.
Trying to cast it into return (Dollars)_value won't work. Can anyone give me some advice on how to attain a method of of return type Dollars add(Dollars dollars)?
class Dollars{
     protected double _value;
     public Dollars(double value)
     {_value=value;
     public double getValue(){
          return this._value;
     public Dollars add(Dollars dollars)
          _value +=dollars.getValue();
          return _value;
}

double is a primitive, not an extendable class, and casting overloads do not exist in Java. What you can do is create and return a new Dollars object:
return new Dollars(this.value + dollars.getValue());Or return the existing one:
this.value += dollars.getValue();
return this;

Similar Messages

  • Unbounded wildcard type: type mismatch error

    I have a problem with Generics which to me seems to be caused by type erasure and necessary reification, but I can't find a solution.
    In order to keep the problem simple I've removed all unnecessary functions from the code and just made sure it still compiles - the only method that does not compile (and kept its whole code) is the method processContents() that causes my problem.
    I hope that the code is self-explanatory enough without comments.
    public interface Iterator<T> {
         public T next();
         public boolean hasNext();
    public interface FunctionInterface<T> {
         T apply(T argument);
    public class DataStructure<T> {
         private T content;
         public DataStructure(T content) {
              this.content = content;
         public T get() {
              return content;
         public Iterator<DataStructure<T>> contents() {
              return new Iterator<DataStructure<T>>() {
                   @Override
                   public boolean hasNext() {
                        return false;
                   @Override
                   public DataStructure<T> next() {
                        return null;
    }The problem is caused in the methode processContents() of the methode SubDataStructure, a sub-class of DataStructure.
    public class SubDataStructure<T extends FunctionInterface<? super T>> extends
              DataStructure<T> implements FunctionInterface<SubDataStructure<T>> {
         public SubDataStructure(T content) {
              super(content);
         public T processContents() {
              Iterator<DataStructure<T>> iter = contents();
              T value = get();
              while (iter.hasNext()) {
                   T otherValue = iter.next().get();
                   // following line causes ERROR: Type mismatch: cannot convert from
                   // capture#1-of ? super T to T ReducedDataStructure.java
                   value = value.apply(otherValue);
              return this.get();
         @Override
         public SubDataStructure<T> apply(SubDataStructure<T> argument) {
              // arbitrary action
              return argument;
    }As you see the commented line causes an error saying "Type mismatch: cannot convert from capture#1-of ? super T to T ReducedDataStructure.java" - from my understanding the type should be correct but got lost at compile-time, but would have to be restored at run-time. If so, a type-cast should solve the problem, but I'd prefer to find a clean solution without unchecked casts.
    I've tried to find an answer in various books and the linked FAQ, but haven't found it yet - I admit that after a few hours of trying I got a bit frustrated, so I hope that this is a more common problem to developers and that somebody might be able to help. Any suggestions how do solve this problem? I'd be grateful for your answers.
    Bob
    Edited by: RobertSingleton on Nov 23, 2009 2:17 PM
    Edited by: RobertSingleton on Nov 23, 2009 2:21 PM

    RobertSingleton wrote:
    jtahlborn wrote:
    you have defined T to have a lower bound of "FunctionInterface<? super T>", value is of the type T, therefore the return type of value.apply (which comes from FunctionInterface) is "? super T". a value of "? super T" returned from the "apply" method cannot be re-assigned to "value", which has type T.Thanks, but I understood it so far. The question to me is, whether it is possible to solve the problem as shown here.
    are you sure you don't want the class typedef to be "T extends FunctionInterface<? extends T>"?Yes, but would you have other suggestions? DataStructure manages Objects, SubDataStructure adds a few new methods, FunctionInterface is an Interface like Comparable. Maybe that's a bit too general to see whether the current solution is appropriate or not. But no matter how the a better solution would look like, I'd be very curious how to solve the problem in its current settings, since I'm positive I could apply the solution in the future to different problems with the same cause.the problem is that you have defined FunctionInterface in this case to return anything up to Object (? super T). "super" is good for saying "give me an object which can handle this type or any of its parent types". it's generally not so good for a return type, as you are essentially saying "i can return anything here". you want to repeatedly apply FunctionInterface, but your definition allows you to return something which may not implement FunctionInterface. so, you code cannot work with your current definitions. without having a better understanding of what you are trying to do, i can't really put forward any meaningful suggestions for fixing the code.

  • TYPE003: Runtime Type Mismatch

    A general question:
    ODSI 10gR3
    Has anyone seen the "TYPE003: Runtime Type Mismatch" error returned when you pass a variable through a function rather than a literal? The variable is the exact same value as the literal and I have casted all to a xs:double before passing through the "getReferencesByVersionID" function in code below.
    =============================================================
    (: Always tested with the same $VersionID and only 1 order in the database :)
    for $Order in tns:getOrdersByVersionID($VersionID)
    return
    (: let $OrderNum := tns:getOrderNum(fn:data($Order/ns1:OrderNum)) :) (: Fail :)
    let $OrderNum := xs:double(fn:data($Order/ns1:OrderNum)) (: Fail :)
    (: let $OrderNum := xs:double(12001002) :) (: Success :)
    let $References := tns:getReferencesByVersionID($VersionID, $OrderNum)
    return
    Returned XML snippet when run successfully:
    <ns0:Order ns0:TransactionPurpose="ADD/UPDATE">
    <ns0:ShipperRef>J10310ST12001002</ns0:ShipperRef>
    <ns0:OrderNum>12001002</ns0:OrderNum> (: Populated by: "data($Order/ns1:OrderNum)". "ns0:OrderNum" defined as xs:double in schema. Note: same value as literal :)
    <ns0:Comments/>
    <ns0:OrderType>O</ns0:OrderType>
    <ns0:Workflow>O</ns0:Workflow>
    Returned Trace when not working:
    com.bea.dsp.das.exception.DASException: weblogic.xml.query.exceptions.XQueryTypeException: {bea-err}TYPE003: Runtime Type Mismatch
         at com.bea.dsp.das.ejb.EJBClient.invokeOperation(EJBClient.java:160)
         at com.bea.dsp.das.DataAccessServiceImpl.invokeOperation(DataAccessServiceImpl.java:171)
         at com.bea.dsp.das.DataAccessServiceImpl.invoke(DataAccessServiceImpl.java:122)
         at com.bea.dsp.ide.xquery.views.test.QueryExecutor.invokeFunctionOrProcedure(QueryExecutor.java:113)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.getFunctionExecutionResult(XQueryTestView.java:1041)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.executeFunction(XQueryTestView.java:1176)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.widgetSelectedImpl(XQueryTestView.java:1866)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.access$300(XQueryTestView.java:174)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent$3.run(XQueryTestView.java:1594)
         at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.widgetSelectedBusy(XQueryTestView.java:1597)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.widgetSelected(XQueryTestView.java:1560)
         at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3687)
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3298)
         at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
         at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
         at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
         at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
         at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
         at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
         at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
         at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
         at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
    The obvious answer is that "fn:data($Order/ns1:OrderNum)" does not equal "xs:double(12001002)" when passed through the " tns:getReferencesByVersionID()" function but it appears to be the same value.
    This is happening in the Application layer so too much to include all the code. Thoughts/Comments on where to look or what I am missing?
    Thanks
    Tom

    Thanks Mike. No other web services... all physical ODSI to a single Oracle 11g denormalized table, selected several times to get different parts of the data (order header, shipping info, items, etc) and bubbled up through the layers via transformations finally getting into a single XML ORDER at the app layer.
    I'm not a guru at reading traces but it appears numieric vs double issue?
    The full stack trace:
    weblogic.xml.query.exceptions.XQueryTypeException: {bea-err}TYPE003: Runtime Type Mismatch
         at weblogic.xml.query.runtime.core.ExecutionWrapper.asXQueryException(ExecutionWrapper.java:165)
         at weblogic.xml.query.runtime.core.ExecutionWrapper.fetchNext(ExecutionWrapper.java:94)
         at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:133)
         at weblogic.xml.query.runtime.node.DeflateRec.fetchNext(DeflateRec.java:43)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at com.bea.ld.server.ResultPusher$ChunkyBinxmlChunker.nextChunk(ResultPusher.java:402)
         at com.bea.ld.server.ResultPusher$AsyncChunkyBinxmlChunker.nextChunk(ResultPusher.java:520)
         at com.bea.ld.server.ResultPusher$BinxmlChunker.next(ResultPusher.java:292)
         at com.bea.ld.EJBRequestHandler$1.next(EJBRequestHandler.java:938)
         at com.bea.ld.ServerBean.maybeStreamResult(ServerBean.java:97)
         at com.bea.ld.ServerBean.executeOperationStreaming(ServerBean.java:86)
         at com.bea.ld.Server_ydm4ie_EOImpl.executeOperationStreaming(Server_ydm4ie_EOImpl.java:72)
         at com.bea.ld.Server_ydm4ie_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    java.lang.ClassCastException: weblogic.xml.query.tokens.basic.Basic_StringToken
         at weblogic.xml.query.runtime.numeric.compare.DoubleEqual.compare(DoubleEqual.java:31)
         at weblogic.xml.query.runtime.compare.ComparisonIterator.execute(ComparisonIterator.java:45)
         at weblogic.xml.query.iterators.FunctionIterator.fetchNext(FunctionIterator.java:30)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.logic.BoolEffValue.exec(BoolEffValue.java:47)
         at weblogic.xml.query.runtime.logic.BoolEffValue.execute(BoolEffValue.java:43)
         at weblogic.xml.query.iterators.FunctionIterator.fetchNext(FunctionIterator.java:30)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:79)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.CountMapIterator.fetchNext(CountMapIterator.java:167)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
         at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:388)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.matEverything(PartMatElemConstructor.java:123)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:197)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:91)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:91)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
         at weblogic.xml.query.runtime.navigation.ChildPath.fetchNext(ChildPath.java:221)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.iterators.BasicMaterializedTokenStream.next(BasicMaterializedTokenStream.java:109)
         at weblogic.xml.query.iterators.BasicMaterializedTokenStream$MatStreamIterator.fetchNext(BasicMaterializedTokenStream.java:448)
         at weblogic.xml.query.iterators.LegacyGenericIterator.next(LegacyGenericIterator.java:109)
         at weblogic.xml.query.runtime.core.RTVariable.fetchNext(RTVariable.java:53)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.sequences.Exists.execute(Exists.java:37)
         at weblogic.xml.query.iterators.FunctionIterator.fetchNext(FunctionIterator.java:30)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:79)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
         at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:388)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.matEverything(PartMatElemConstructor.java:123)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:197)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.iterators.BasicMaterializedTokenStream.next(BasicMaterializedTokenStream.java:109)
         at weblogic.xml.query.iterators.BasicMaterializedTokenStream$MatStreamIterator.fetchNext(BasicMaterializedTokenStream.java:448)
         at weblogic.xml.query.iterators.LegacyGenericIterator.next(LegacyGenericIterator.java:109)
         at weblogic.xml.query.runtime.core.RTVariable.fetchNext(RTVariable.java:53)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
         at weblogic.xml.query.runtime.navigation.ChildPath.fetchNext(ChildPath.java:221)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.sequences.Exists.execute(Exists.java:37)
         at weblogic.xml.query.iterators.FunctionIterator.fetchNext(FunctionIterator.java:30)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:79)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
         at weblogic.xml.query.runtime.constructor.SuperElementConstructor.buildPreserveModeTextNode(SuperElementConstructor.java:320)
         at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:405)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.matEverything(PartMatElemConstructor.java:123)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:197)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
         at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:388)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:229)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.LetIterator.fetchNext(LetIterator.java:133)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.LetIterator.fetchNext(LetIterator.java:133)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.LetIterator.fetchNext(LetIterator.java:133)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.LetIterator.fetchNext(LetIterator.java:133)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.LetIterator.fetchNext(LetIterator.java:133)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.CountMapIterator.fetchNext(CountMapIterator.java:167)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
         at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:388)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:229)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.debug.Trace.fetchNext(Trace.java:70)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
         at weblogic.xml.query.iterators.LegacyGenericIterator.hasNext(LegacyGenericIterator.java:130)
         at weblogic.xml.query.runtime.sequences.Subsequence.fetchNext(Subsequence.java:101)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.querycide.QueryAssassin.fetchNext(QueryAssassin.java:54)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
         at weblogic.xml.query.runtime.qname.InsertNamespaces.fetchNext(InsertNamespaces.java:237)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at weblogic.xml.query.runtime.core.ExecutionWrapper.fetchNext(ExecutionWrapper.java:88)
         at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:133)
         at weblogic.xml.query.runtime.node.DeflateRec.fetchNext(DeflateRec.java:43)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
         at com.bea.ld.server.ResultPusher$ChunkyBinxmlChunker.nextChunk(ResultPusher.java:402)
         at com.bea.ld.server.ResultPusher$AsyncChunkyBinxmlChunker.nextChunk(ResultPusher.java:520)
         at com.bea.ld.server.ResultPusher$BinxmlChunker.next(ResultPusher.java:292)
         at com.bea.ld.EJBRequestHandler$1.next(EJBRequestHandler.java:938)
         at com.bea.ld.ServerBean.maybeStreamResult(ServerBean.java:97)
         at com.bea.ld.ServerBean.executeOperationStreaming(ServerBean.java:86)
         at com.bea.ld.Server_ydm4ie_EOImpl.executeOperationStreaming(Server_ydm4ie_EOImpl.java:72)
         at com.bea.ld.Server_ydm4ie_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

  • Ssrs and script from was blocked due to mime type mismatch

    Hi
    I'm trying to add a script to my header on my SSRS report. I've been following this link:
    http://blogs.infosupport.com/reporting-services-javascript-injection/
    I get error stating:
    SEC7112: Script from http//####/HCCReportsServer?/ReportsLibrary/script.js was blocked due to mime type mismatch
    My code:
    ="<a href=""javascript:eval(unescape('function addScript(scriptFile){var head = document.getElementsByTagName(\'HEAD\')[0]; var script = document.createElement(\'script\'); script.setAttribute(\'language\', \'JScript\'); script.setAttribute(\'type\', \'text/Javascript\'); script.setAttribute(\'src\', scriptFile); head.appendChild(script);} addScript(\'http://dc1-sqlrs-d02/HCCReportsServer?/ReportsLibrary/script.js\');'))"">inject</a>"
    Please help. This is urgent to get it working for a demo.
    Thanks

    Hi Sunette,
    Based on my understanding, you come across an SEC7112 error when you inject JavaScript into the Reporting Services.
    In your scenario, you should remove the below setting in the web.config file(Location: C:\inetpub\wwwroot\wss\VirtualDirectories\<your port>).
    <add name="X-Content-Type-Options" value="nosniff" />
    As we tested in our environment(SQL Server 2012,SharePoint 2013,IE 11), we can inject JavaScript successfully. Please refer our test steps and results:
    1. Delete “X-Content-Type-Options" with value "nosniff" within the web.config file (Location: C:\inetpub\wwwroot\wss\VirtualDirectories\80).
    2. Design the report as below, then deploy the report to the SharePoint site.
    3. Create the script.js file with code below, and upload to the SharePoint site.
    function test()
    alert("The CHANGEME textbox will actually change…");
    //var doc = window.frames[1][1].document;
    var el = document.getElementsByTagName('span');
    for (var nr=0; nr<el.length; nr++)
    if (el[nr].innerHTML == "CHANGEME")
    el[nr].innerHTML = "I FEEL LIKE A CHANGED TEXTBOX";
    4. Run the report. Click the “inject”->”test”, the final results should look like below:
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Run-time error '13':  Type mismatch

    There are A and B excel files.
    And two different POV-dimension in two excel files
    VBA code below:
    Dim vtGrid As Variant
    Dim vtDimNames As Variant
    Dim vtPOVNames As Variant
    x = HypRetrieve("sheet1")
    x = HypUseLinkMacro(True)
    Range("b10").Select
    x = HypGetSourceGrid("sheet1", vtGrid)
    ref = HypMenuVRefresh()
    x = HypGetPOVItems(vtDimNames, vtPOVNames)
    MsgBox (vtPOVNames(6))
    Range("a3").Value = "date: " & vtPOVNames(6) & " - " & vtPOVNames(3)
    Range("a4").Value = "dep : " & vtPOVNames(0)
    There is not any attribute dimension in pov A excel file.
    There is one attribute dimension in pov B excel file.
    The same VBA code excute is normal in A excel file.
    But the same VBA code excute is "run-time error '13': Type mismatch " in B excel file.
    The error '13' in the row of MsgBox (vtPOVNames(6)).
    Is attribute dimension in pov cause this question?
    And how did I solve this question?

    Based on where the error is occurring, it looks like the value returned by vtPOVNames(6) is not defaulting to a string datatype for the msgbox.
    Try 'cstr(vtPOVNames(6))' to force conversion of the value into a string. Also, you may want to test for nulls using IsNull() and empty variant values using IsEmpty().
    It doesn't look like the code you posted shows vtPOVNames being populated. If you're populating the names yourself, you could always use a string array instead of a variant array. Just dim the string array using a statement such as, "Dim strPOVNames(6) as String" or "Dim strPOVNames() as String" in case you need to ReDim the array later to size it for a non-fixed set of POV names.
    Hope this helps.

  • RisPort problems - argument type mismatch

    Hi!
    I'm trying to get a list of devices via RisPort. I copied example from http://www.cisco.com/univercd/cc/td/doc/product/voice/vpdd/cdd/5_0/ccmdev/ccmdvch2.htm chapter Real-Time Information (RisPort)
    Selecting Cisco Unified CallManager Real-Time Information , but service returning following xml:
    <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server.userException</faultcode><faultstring>java.lang.IllegalArgumentException: argument type mismatch</faultstring><detail><ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">CUCM6</ns1:hostname></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
    And my question is: How can I recognize, which argument? There are no any notes or details :-(
    Many thanks for your ideas!!
    ps. or is it posible to get that list any other way? (CUM6)

    check your gmail~i sent my code to your email!
    here is the xml String:
    String strSoapMsg="<?xml version=\"1.0\" encoding=\"utf-8\"?>"+
    "http://schemas.xmlsoap.org/soap/envelope/\" "+
    "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" "+
    "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">"+
    ""+
    "http://schemas.xmlsoap.org/soap/encoding/\">"+
    ""+
    ""+
    ""+
    "http://schemas.xmlsoap.org/soap/encoding/\" "+
    "xsi:type=\"ns1:CmSelectionCriteria\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" "+
    "xmlns:ns1=\"tns:CmSelectionCriteria\">"+
    "2000"+
    ""+
    "Name"+
    ""+
    ""+
    ""+
    ""+

  • SBO Run-time error '13' Type mismatch

    Hello,
    I'm currently using SBO 2005 SP1 (PL11)
    After installing SBO DTW (2005A PL11 as well), i'm facing this issue : Run-time Error '13' Type mismatch
    I've been trying to modify my regional settings as per the previous discussions but this didn't work (first of all, i'm located in France, and try to apply the french regional settings).
    I've uninstalled and reinstalled DTW and my DI API but unfortunately, this didn't"t work either.
    Any other advise on this problem ?
    Thanks,
    Stephane

    Stephane,
    Here are some links to SAP Notes on the SAP PartnerEdge Portal that may help.  Please read the note carefully as the first note has your remove the Windows User Profile.
    https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&note_numm=0000873864
    https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&note_numm=0000884234
    If these do not help I recommend that you log a message with SAP Technical Support as the forum you have posted your question in is for questions related to the SAP Business One SDK and your question is application related to the DTW.
    HTH,
    Eddy

  • ByRef Argument Type Mismatch" Error VB6

    I am new to VB6 and spread.My VB project is making using of spread .In forms wherever the spread initialization is done,VB 6 is throwing a compile error as "By Ref Argument Type Mismatch" Error" .Is it because of the spread issue? I am removing
    some functionality from a already existing vb project So is it because i might have commented out some functionality. Kindly.Kindly provide your valuable suggestion.Thanks in advance.I am running the application in windows 7

    Hi ponnudoll,
    This forum is actually for questions about Access development, your question is kind of off-topic.
    Where to post your VB 6 questions
    Anyway, I did some research about this error message, and found this KB article talking about how to avoid this error.
    How to Avoid the "ByRef Argument Type Mismatch" Error
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Type Mismatch error while saving a BPC Report using eTools

    Hi,
    Iam getting a 'type mismatch' error when trying to save a BPC Excel  workbook using eTools>Save Dynamic Template >Company>eExcel. I am saving it as an .xlsx file.
    Can anyone please help out and let me know why I am getting this error.
    Thanks
    Arvind

    Hi,
    You need to save the file as .xls extension.

  • Type Mismatch error while calling a Java Function from Visual Basic 6.0...

    Hi,
    I'm having a problem in calling the Java Applet's Function from Visual Basic. First, I'm getting the handle of the Java Applet and components of it using "Document.Applets(n)" which is a HTML function. I'm calling this function from Visual Basic. My code is something like this...
    ' // Web1 is IE Browser in my Form.
    Dim Ap,Comp
    Dim Bol as Boolean
    Bol = true
    Ap = Web1.Document.Applets(0).getWindow() ' \\ Gets the Parent Window.
    Ap.setTitle("My Java Applet") ' \\ Sets the Title of the window.
    msgbox Ap.getVisibility() ' \\ This will return a Java boolean ( true or false )
    Ap.setVisibility(Bol) ' \\ Function Syntax is : void setVisibility(boolean b)
    Here in my code , i'm able to call any function that which accepts Integer or String but not boolean. So, i m facing problem with Ap.setVisibility() function. It gives me a "Type mismatch error" while executing it. Can you please tell me a way to do this from Visual Basic !
    I'm using Visual Basic 6.0, Windows 2000 , J2SDK 1.4.2_05.
    Please help me Friends.
    Thanks and Regards,
    Srinivas Annam.

    Hi
    I am not sure about this solution. try this
    Declare a variable as variant and store the boolean value in that variable and then use in ur method.
    Post ur reply in this forum.
    bye for now
    sat

  • Type mismatch on SOAP Web Service method invocation

    When I run the generated client for a web service, I get the following error, which I can get rid of by using a primitive type (e.g. String) as the parameter to doSomething instead of wstest.test2.APIClass3, i.e. the SOAP server seems happy handling wstest.test2.APIClass1 as a return type, but not a similar class as a parameter type:
    [SOAPException: faultCode=SOAP-ENV:Server; msg=type mismatch [java.lang.IllegalArgumentException]]
         wstest.test2.APIClass1 wstest.test2.EmbeddedStatelessTest2Stub.doSomething(wstest.test2.APIClass3)
              EmbeddedStatelessTest2Stub.java:89
         void wstest.test2.EmbeddedStatelessTest2Stub.main(java.lang.String[])
              EmbeddedStatelessTest2Stub.java:48
    I am using JDeveloper9i 9.0.3 Preview and the standalone OC4J 9.0.3 that came with it. I followed the Oracle9i JDeveloper 9.0.3 Web Services Quickstart Install (http://otn.oracle.com/tech/webservices/htdocs/quickstart/quickstart903.html) to get OC4J running standalone. I had to register the stateless EJB provider, and the WEB services wizard didn't manage to include APIClass2 (an instance of which is contained in APIClass1) in the .dd so I added it manually which works fine with APIClass1 as the method return type.
    Sorry for the length of this posting, but I wasn't sure which bits would be relevant.
    WSDL
    ====
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!--Generated by the Oracle9i JDeveloper Web Services WSDL Generator-->
    <!--Date Created: Wed Sep 11 15:54:08 BST 2002-->
    <definitions
    name="StatelessTest2"
    targetNamespace="http://wstest/test2/StatelessTest2.wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://wstest/test2/StatelessTest2.wsdl"
    xmlns:ns1="http://wstest.test2/IStatelessTest2.xsd">
    <types>
    <schema
    targetNamespace="http://wstest.test2/IStatelessTest2.xsd"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    <complexType name="wstest_test2_APIClass3" jdev:packageName="wstest.test2" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
    <all>
    <element name="Name" type="string"/>
    <element name="Value" type="double"/>
    </all>
    </complexType>
    <complexType name="wstest_test2_APIClass1" jdev:packageName="wstest.test2" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
    <all>
    <element name="Name" type="string"/>
    <element name="Value" type="double"/>
    <element name="APIClass2" type="ns1:wstest_test2_APIClass2"/>
    </all>
    </complexType>
    <complexType name="wstest_test2_APIClass2" jdev:packageName="wstest.test2" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
    <all>
    <element name="IntegerValue" type="int"/>
    <element name="DoubleValue" type="double"/>
    <element name="Name" type="string"/>
    </all>
    </complexType>
    </schema>
    </types>
    <message name="doSomething0Request">
    <part name="p0" type="ns1:wstest_test2_APIClass3"/>
    </message>
    <message name="doSomething0Response">
    <part name="return" type="ns1:wstest_test2_APIClass1"/>
    </message>
    <portType name="StatelessTest2PortType">
    <operation name="doSomething">
    <input name="doSomething0Request" message="tns:doSomething0Request"/>
    <output name="doSomething0Response" message="tns:doSomething0Response"/>
    </operation>
    </portType>
    <binding name="StatelessTest2Binding" type="tns:StatelessTest2PortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="doSomething">
    <soap:operation soapAction="" style="rpc"/>
    <input name="doSomething0Request">
    <soap:body use="encoded" namespace="wstest.test2.StatelessTest2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </input>
    <output name="doSomething0Response">
    <soap:body use="encoded" namespace="wstest.test2.StatelessTest2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </output>
    </operation>
    </binding>
    <service name="StatelessTest2">
    <port name="StatelessTest2Port" binding="tns:StatelessTest2Binding">
    <soap:address location="http://localhost:8888/soap/servlet/soaprouter"/>
    </port>
    </service>
    </definitions>
    Deployment Decriptor
    ====================
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!--Generated by the Oracle9i JDeveloper Web Services Deployment Descriptor Generator-->
    <!--This Deployment Descriptor file is for use with the Oracle9iAS Release 2 / Apache 2.2 SOAP Server SOAP Server-->
    <!--Date Created: Wed Sep 11 15:54:09 BST 2002-->
    <isd:service
    id="wstest.test2.StatelessTest2"
    type="rpc"
    xmlns:isd="http://xmlns.oracle.com/soap/2001/04/deploy/service">
    <isd:provider
    id="stateless-ejb-provider"
    methods="doSomething"
    scope="Request">
    <isd:option key="JNDILocation" value="StatelessTest2"/>
    <isd:option key="DeploymentName" value="StatelessTest2"/>
    </isd:provider>
    <isd:faultListener
    class="org.apache.soap.server.DOMFaultListener"/>
    <isd:mappings>
    <isd:map
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:x="http://wstest.test2/IStatelessTest2.xsd"
    qname="x:wstest_test2_APIClass1"
    javaType="wstest.test2.APIClass1"
    java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
    xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
    <isd:map
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:x="http://wstest.test2/IStatelessTest2.xsd"
    qname="x:wstest_test2_APIClass2"
    javaType="wstest.test2.APIClass2"
    java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
    xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
    <isd:map
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:x="http://wstest.test2/IStatelessTest2.xsd"
    qname="x:wstest_test2_APIClass3"
    javaType="wstest.test2.APIClass3"
    java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
    xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
    </isd:mappings>
    </isd:service>
    StatelesTest2.java
    ==================
    package wstest.test2;
    import javax.ejb.EJBObject;
    import java.rmi.RemoteException;
    public interface StatelessTest2 extends EJBObject {
    * @webmethod
    APIClass1 doSomething(APIClass3 p0) throws RemoteException;
    StatelessTest2Bean.java
    =======================
    package wstest.test2.impl;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import wstest.test2.APIClass1;
    import wstest.test2.APIClass2;
    import wstest.test2.APIClass3;
    public class StatelessTest2Bean implements SessionBean {
    public void ejbCreate() {
    public void ejbActivate() {
    public void ejbPassivate() {
    public void ejbRemove() {
    public void setSessionContext(SessionContext ctx) {
    public APIClass1 doSomething(APIClass3 p0) {
    APIClass1 ac1 = new APIClass1();
    ac1.setName(p0.getName() + "1");
    ac1.setValue(p0.getValue());
    APIClass2 ac2 = ac1.getAPIClass2();
    ac2.setName(p0.getName() + "2");
    ac2.setIntegerValue(new Integer(ac1.getValue().intValue()));
    ac2.setDoubleValue(new Double(ac1.getValue().doubleValue() * 2.0));
    return ac1;
    EmbeddedStatelessTest2Stub.java
    ===============================
    I change the http port from 8988 to 8888 to get this working. Also, the generated referenced a new class APIClass31, also generated, but as it didn't make any difference to the problem I replaced it with APIClass3, which has essentially the same characteristics.
    package wstest.test2;
    import oracle.soap.transport.http.OracleSOAPHTTPConnection;
    import org.apache.soap.encoding.soapenc.BeanSerializer;
    import org.apache.soap.encoding.SOAPMappingRegistry;
    import org.apache.soap.util.xml.QName;
    import java.net.URL;
    import org.apache.soap.Constants;
    import org.apache.soap.Fault;
    import org.apache.soap.SOAPException;
    import org.apache.soap.rpc.Call;
    import org.apache.soap.rpc.Parameter;
    import org.apache.soap.rpc.Response;
    import wstest.test2.*;
    import java.util.Vector;
    import java.util.Properties;
    import wstest.test2.APIClass1;
    import wstest.test2.APIClass2;
    import wstest.test2.APIClass3;
    * Generated by the Oracle9i JDeveloper Web Services Stub/Skeleton Generator.
    * Date Created: Wed Sep 11 15:41:19 BST 2002
    * WSDL URL: file:/C:/Projects/WSTest/Test2/src/wstest/test2/StatelessTest2.wsdl
    public class EmbeddedStatelessTest2Stub
    public EmbeddedStatelessTest2Stub()
    m_httpConnection = new OracleSOAPHTTPConnection();
    m_smr = new SOAPMappingRegistry();
    BeanSerializer beanSer = new BeanSerializer();
    m_smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://wstest.test2/IStatelessTest2.xsd", "wstest_test2_APIClass1"), wstest.test2.APIClass1.class, beanSer, beanSer);
    m_smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://wstest.test2/IStatelessTest2.xsd", "wstest_test2_APIClass2"), wstest.test2.APIClass2.class, beanSer, beanSer);
    m_smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://wstest.test2/IStatelessTest2.xsd", "wstest_test2_APIClass3"), wstest.test2.APIClass3.class, beanSer, beanSer);
    public static void main(String[] args)
    try
    EmbeddedStatelessTest2Stub stub = new EmbeddedStatelessTest2Stub();
    // Add your own code here.
    APIClass3 ac3 = new APIClass3();
    ac3.setName("fred");
    ac3.setValue(new Double(17.36));
    printAPIClass3("Input", ac3);
    APIClass1 retAc1 = stub.doSomething(ac3);
    printAPIClass1("Return", retAc1);
    catch(Exception ex)
    ex.printStackTrace();
    public String endpoint = "http://172.25.1.176:8888/soap/servlet/soaprouter";
    private OracleSOAPHTTPConnection m_httpConnection = null;
    private SOAPMappingRegistry m_smr = null;
    public APIClass1 doSomething(APIClass3 p0) throws Exception
    APIClass1 returnVal = null;
    URL endpointURL = new URL(endpoint);
    Call call = new Call();
    call.setSOAPTransport(m_httpConnection);
    call.setTargetObjectURI("wstest.test2.StatelessTest2");
    call.setMethodName("doSomething");
    call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    Vector params = new Vector();
    params.addElement(new Parameter("p0", wstest.test2.APIClass3.class, p0, null));
    call.setParams(params);
    call.setSOAPMappingRegistry(m_smr);
    Response response = call.invoke(endpointURL, "");
    if (!response.generatedFault())
    Parameter result = response.getReturnValue();
    returnVal = (APIClass1)result.getValue();
    else
    Fault fault = response.getFault();
    throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
    return returnVal;
    private static void printAPIClass3(String prefix, APIClass3 ac3)
    System.out.println(prefix + ": [" + ac3.getName() + ", " + ac3.getValue() + "]");
    private static void printAPIClass1(String prefix, APIClass1 ac1)
    APIClass2 ac2 = ac1.getAPIClass2();
    System.out.println(prefix + ": [" + ac1.getName() + ", " + ac1.getValue() + " ["
    + ac2.getName() + ", " + ac2.getIntegerValue() + ", " + ac2.getDoubleValue()
    + "]]");
    public void setMaintainSession(boolean maintainSession)
    m_httpConnection.setMaintainSession(maintainSession);
    public boolean getMaintainSession()
    return m_httpConnection.getMaintainSession();
    public void setTransportProperties(Properties props)
    m_httpConnection.setProperties(props);
    public Properties getTransportProperties()
    return m_httpConnection.getProperties();
    APIClass1.java
    ==============
    package wstest.test2;
    import java.io.Serializable;
    public class APIClass1 implements Serializable {
    private String name;
    private Double value;
    private APIClass2 apiClass2;
    public APIClass1() {
    name = new String("");
    value = new Double(0.0);
    apiClass2 = new APIClass2();
    public String getName() {
    return name;
    public void setName(String newName) {
    name = new String(newName);
    public Double getValue() {
    return value;
    public void setValue(Double newValue) {
    value = new Double(newValue.doubleValue());
    public APIClass2 getAPIClass2() {
    return apiClass2;
    public void setAPIClass2(APIClass2 newAPIClass2) {
    apiClass2 = new APIClass2();
    apiClass2.setName(newAPIClass2.getName());
    apiClass2.setDoubleValue(newAPIClass2.getDoubleValue());
    apiClass2.setIntegerValue(newAPIClass2.getIntegerValue());
    APIClass2.java
    ==============
    package wstest.test2;
    import java.io.Serializable;
    public class APIClass2 implements Serializable {
    private String name;
    private Integer iVal;
    private Double dVal;
    public APIClass2() {
    iVal = new Integer(0);
    dVal = new Double(0.0);
    name = new String("");
    public Integer getIntegerValue() {
    return iVal;
    public void setIntegerValue(Integer newIVal) {
    iVal = new Integer(newIVal.intValue());
    public Double getDoubleValue() {
    return dVal;
    public void setDoubleValue(Double newDoubleValue) {
    dVal = new Double(newDoubleValue.doubleValue());
    public String getName() {
    return name;
    public void setName(String newName) {
    name = new String(newName);
    APIClass3.java
    ==============
    package wstest.test2;
    import java.io.Serializable;
    public class APIClass3 implements Serializable {
    private String name;
    private Double value;
    public APIClass3() {
    public String getName() {
    return name;
    public void setName(String newName) {
    name = new String(newName);
    public Double getValue() {
    return value;
    public void setValue(Double newValue) {
    value = new Double(newValue.doubleValue());
    APIClass31.java
    ===============
    package wstest.test2;
    * Generated by the Oracle9i JDeveloper Web Services Stub/Skeleton Generator.
    * Date Created: Wed Sep 11 10:44:56 BST 2002
    * <pre>
    * &lt;complexType name="wstest_test2_APIClass3" jdev:packageName="wstest.test2" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
    * &lt;all>
    * &lt;element name="Name" type="string"/>
    * &lt;element name="Value" type="double"/>
    * &lt;/all>
    * &lt;/complexType>
    * </pre>
    public class APIClass31 {
    private String m_Name;
    private Double m_Value;
    public APIClass31() {
    public APIClass31(String Name, Double Value) {
    m_Name = Name;
    m_Value = Value;
    public void setName(String Name) {
    m_Name = Name;
    public String getName() {
    return m_Name;
    public void setValue(Double Value) {
    m_Value = Value;
    public Double getValue() {
    return m_Value;

    I believe this is a bug in JDev/OC4J 9.0.3 that is being further investigated right now. I have duplicated your problem in a simpler test case and folks are looking into it.
    Mike.

  • How do i find the support chat ... where i type my question to a live apple support who types back to me.

    how do i find the apple support chat... where i type my question to a live apple support person and she types back to me live.  thank you   sandra  

    No such place.
    Online you can try the Express Lane.
    Otherwise you have telephone support with Applecare or these (user-to-user) forums.

  • How can I fix a xquery resulting error ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence  - got multi-item sequence

    Hello,
    How can I improve the XQuery below in order to obtain a minimised return to escape from both errors ORA-19279 and ORA-01706?
    XQUERY for $book in  fn:collection("oradb:/HR/TB_XML")//article let $cont := $book/bdy  where  $cont   [ora:contains(text(), "(near((The,power,Love),10, TRUE))") > 0] return $book
    ERROR:
    ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence
    - got multi-item sequence
    XQUERY for $book in  fn:collection("oradb:/HR/TB_XML")//article let $cont := $book/bdy  where  $cont   [ora:contains(., "(near((The,power,Love),10, TRUE))") > 0] return $book//bdy
    /*ERROR:
    ORA-01706: user function result value was too large
    Regards,
    Daiane

    below query works for 1 iteration . but for multiple sets i am getting following error .
    When you want to present repeating groups in relational format, you have to extract the sequence of items in the main XQuery expression.
    Each item is then passed to the COLUMNS clause to be further shredded into columns.
    This should work as expected :
    select x.*
    from abc t
       , xmltable(
           xmlnamespaces(
             default 'urn:swift:xsd:fin.970.2011'
           , 'urn:swift:xsd:mtmsg.2011' as "ns0"
         , '/ns0:FinMessage/ns0:Block4/Document/MT970/F61a/F61'
           passing t.col1
           columns F61ValueDate                Varchar(40) Path 'ValueDate'
                 , DebitCreditMark             Varchar(40) Path 'DebitCreditMark'
                 , Amount                      Varchar(40) Path 'Amount'
                 , TransactionType             Varchar(40) Path 'TransactionType'
                 , IdentificationCode          Varchar(40) Path 'IdentificationCode'                 
                 , ReferenceForTheAccountOwner Varchar(40) Path 'ReferenceForTheAccountOwner'
                 , SupplementaryDetails        Varchar(40) Path 'SupplementaryDetails'       
         ) x ;

  • Getting Type Mismatch Error while passing Array of Interfaces from C#(VSTO) to VBA through IDispatch interface

    Hi,
    I am facing issues like Type Mismatch while passing Array of interfaces from .NET  to VBA and vice versa using VSTO technology.
    My requirement is that ComInterfaceType needs to be InterfaceIsIDispatch.
    My Interface definition is somewhat like this
        [ComVisible(true)]
        [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
        [Guid("AAF48FBC-52B6-4179-A8D2-944D7FBF264E")]
        public interface IInterface1
            [DispId(0)]
            IInterface2[] GetObj();
            [DispId(1)]
            void SetObj(ref IInterface2[] obj);
        [ComVisible(true)]
        [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
        [Guid("CDC06E1D-FE8C-477E-97F1-604B73EF868F")]
        public interface IInterface2
    IF i am passing array of above interface (created in C#.Net) to VBA using GetObj API,i am getting type mismatch error in VBA while assigning the value to variable in VBA.Even assigning to variant type variable gives TypeMismatch.
    Also while passing Array of interfaces from VBA using SetObj API,excel crashes and sometimes it says method doesn't exists.
    Kindly provide some assistance regarding the same.
    Thanks

    Hi,
    I am facing issues like Type Mismatch while passing Array of interfaces from .NET  to VBA and vice versa using VSTO technology.
    My requirement is that ComInterfaceType needs to be InterfaceIsIDispatch.
    My Interface definition is somewhat like this
        [ComVisible(true)]
        [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
        [Guid("AAF48FBC-52B6-4179-A8D2-944D7FBF264E")]
        public interface IInterface1
            [DispId(0)]
            IInterface2[] GetObj();
            [DispId(1)]
            void SetObj(ref IInterface2[] obj);
        [ComVisible(true)]
        [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
        [Guid("CDC06E1D-FE8C-477E-97F1-604B73EF868F")]
        public interface IInterface2
    IF i am passing array of above interface (created in C#.Net) to VBA using GetObj API,i am getting type mismatch error in VBA while assigning the value to variable in VBA.Even assigning to variant type variable gives TypeMismatch.
    Also while passing Array of interfaces from VBA using SetObj API,excel crashes and sometimes it says method doesn't exists.
    Kindly provide some assistance regarding the same.
    Thanks

  • Type Mismatch using Implicit Cursor

    The actual error I get is
    PLS-00386: type mismatch found at 'EMP_REC' between FETCH cursor and INTO variables
    I have copied the code in below (taken some logic out to make example easier). I think the problem is with the EMP_REC CHILDKNOWDES declaration - I dont think I need to add %ROWTYPE? Is the type mismatch a case of trying to parse an int into a string (which i have checked for), or a case of the object being stored with attributes in dif order (alphabetical?), or is something more sinister going on?
    CREATE OR REPLACE TYPE &HKDB_Schema_Name..CHILDKNOWDES AS OBJECT
    KnowdeID INT,
    Description varchar2(512),
    Connector CHAR(1),
    WhyCount INT
    CREATE OR REPLACE TYPE &HKDB_Schema_Name..TEMP_CHILDKNOWDES_TABLE AS TABLE OF &HKDB_Schema_Name..CHILDKNOWDES;
    CREATE OR REPLACE PROCEDURE &HKDB_Schema_Name..QueryChildKnowdes
    aKnowdeID int,
    aCur out sys_refcursor
    AS
    l_ChildKnowdeTable TEMP_CHILDKNOWDES_TABLE := TEMP_CHILDKNOWDES_TABLE();
    EMP_REC CHILDKNOWDES;
    BEGIN
         DECLARE CURSOR c1 is SELECT k.KnowdeID, k.Description, KnowdeAssociation.Connector
            FROM Knowde k
            INNER JOIN KnowdeAssociation ka on ka.KnowdeID = k.KnowdeID
    BEGIN
         OPEN c1;
         FETCH c1 INTO EMP_REC;    --error
         WHILE c1%FOUND
         LOOP
         BEGIN
              QueryWhyCount(EMP_REC.KnowdeID, aWhyCountResult);
                 l_ChildKnowdeTable.extend;
              l_ChildKnowdeTable(l_ChildKnowdeTable.last) := CHILDKNOWDES
              (EMP_REC.KnowdeID,
              EMP_REC.Description,
              EMP_REC.Connector,
              aWhyCountResult);
              FETCH c1 INTO EMP_REC;    --error
         END;
         END LOOP;
         END;
    END QueryChildKnowdes;Thanks in advance,
    Toby

    Knowde
    Name                                      Null?    Type
    KNOWDEID                                  NOT NULL NUMBER(10)
    VERBID                                    NOT NULL NUMBER(10)
    NOUNID                                    NOT NULL NUMBER(10)
    KGID                                      NOT NULL NUMBER(10)
    DATECREATED                               NOT NULL DATE
    DESCRIPTION                                        VARCHAR2(51
    UDRID                                              NUMBER(10)
    UVRID                                              NUMBER(10)
    RESOURCEID                                         NUMBER(10)
    VERSIONID                                          NUMBER(10)
    CHECKEDOUT                                         NUMBER(1)
    CLIENTKNOWDEID                                     NUMBER(10)
    GENERICKNOWDEID                                    NUMBER(10)
    SOURCEKNOWDEID                                     NUMBER(10)
    UNEDITABLE                                         NUMBER(1)
    DATEUPDATED                               NOT NULL DATE
    PREVIOUSKNOWDEID                                   NUMBER(10)KnowdeAssociation
    Name                                      Null?    Type
    KNOWDEASSOCIATIONID                       NOT NULL NUMBER(10)
    HOWID                                     NOT NULL NUMBER(10)
    WHYID                                     NOT NULL NUMBER(10)
    CONNECTOR                                          CHAR(1)
    HOWCHAINPOSITION                                   NUMBER(10)
    WHYCHAINPOSITION                                   NUMBER(10)

Maybe you are looking for

  • I connected an external HD to Time Capsule to use for iPhoto library - can I include it in backup

    OK - So my Macbook Pro's 200GB hard drive is cramping my style. I have a 500GB Time Capsule that I use for backups. I have a 1TB Western Digital external HD that I have no connected to the time capsule, and moved my iPhoto library to it. I'm continui

  • Easiest Way To Create Video Subtitle

    Does anyone know how to create VIDEO"S SUBTITLES..... I don't want closed caption...i want subtitle Using Premiere Pro's text to create subtitle...it will spend me for lots of hours doing that It's very wasting my time doing that.... Does anyone have

  • 5700 die agaiN!!!

    Was playing need for speed underground 2 the other day and noticed artifacts on the street lights, figured it was drivers (56.64) so I didnt worry about it, since I was lazy, was working in windows today and all the sudden the screen went int 320xwut

  • Tax not calculating

    In FV11 we are maintaining vat tax rate at plant/vendor/material level. we are not maintaining tax classification. In fi  FB60 entry  we are put plant & material  on line item level.  earlier  it was calculating  tax  respective  vendor, plant & mate

  • APO DP Promotion Planning

    I am using APO DP V5.1 promotion planning. Is it possible to set up 'promotion phasing profiles' so that, if for example I have a promotion qty of n spread over x weeks, I can phase the qty n across the x weeks in a consistent fashion. So, I would wa