Invalid cast type error

Hello,
I create a new class object at runtime using:
Class dmClass = Class.forName(dmClassName);
I want to be able to use the Class object, dmClass, to cast new objects but I can't seem to get this to work. I've tried:
(dmClass) .......
(dmClass.getName()).....
But I get an Invalid Cast type expression error.
How can I use dmClass as the cast type in a statement?
Thanks
Glenn

Ok,
I have:
class DataManager
class SasDMImp which implements DataManager
I do the following:
String dmClassName = "SasDMImp";
Class dmClass = Class.forName(dmClassName);
I now want to use the SasDMImp class to cast a new object and this is the part I'm having trouble with.
If I hard code the class name I use:
SasDMImp dm = (SasDMImp) Naming.lookup("rmi://" host registry);
I want to replace the hard coded SasDMImp with dmClass but I get the Invalid Cast type when I do this.
Hope this helps.
Glenn

Similar Messages

  • JDBC/SQLJ Team - Please respond - invalid column type error

    Hi, I have posted several messages regarding problems using SQL/J to call out a stored packaged function that returns a ref cursor, but haven't gotten one response. I have yet a new problem with it. JDBC team, please acknowledge!
    I change the way I obtain a connection to the database from using the Oracle.connect along with a properties file, to now using a DataSource connection pool. As a result, I am constantly getting a SQLException: Invalid column type error. If I change the call to the stored function to a query in the SQLJ code, it's fine. What's going on??
    A previous message I wrote stated I was constantly getting a "closed statement" error when I tried to call the next method of the iterator. I corrected this by removing the finally clause in the generated JDBC code that released the execution context.
    Again, the environment is JDK1.2.2, SQLJ 8.1.6 SDK, JDBC 8.1.6 thin, all on NT.
    Thanks
    David

    I am getting the same error message - Invalid Column Type. I am creating a Default Context by calling Oracle.getConnection(connection) passing in an instance of my own connection class that basically delegates to the OracleConnection. We wrapped the Connection so that we could trap and recover from lost database connections.
    My environment is Solaris 2.6, Oracle 7.3.4 with Sqlj 8.0.5.
    Thanks!
    [email protected]
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by David Christopher ([email protected]):
    Hi, I have posted several messages regarding problems using SQL/J to call out a stored packaged function that returns a ref cursor, but haven't gotten one response. I have yet a new problem with it. JDBC team, please acknowledge!
    I change the way I obtain a connection to the database from using the Oracle.connect along with a properties file, to now using a DataSource connection pool. As a result, I am constantly getting a SQLException: Invalid column type error. If I change the call to the stored function to a query in the SQLJ code, it's fine. What's going on??
    A previous message I wrote stated I was constantly getting a "closed statement" error when I tried to call the next method of the iterator. I corrected this by removing the finally clause in the generated JDBC code that released the execution context.
    Again, the environment is JDK1.2.2, SQLJ 8.1.6 SDK, JDBC 8.1.6 thin, all on NT.
    Thanks
    David<HR></BLOCKQUOTE>
    null

  • I get an 'Invalid Image Type' error when using the Locate Features. (Evaluatio​n version)

    I'm using the Evaluation Version of Vision Builder. I Simulate Acquisition using my own image (jpg), which loads fine. However, when I try to use any of the Inspection Steps features, other than Enhance Images, I get an "Invalid Image Type" error.

    Hello,
    Vision Builder functions usually work with a certain image type. For example, all the functions listed under Binary (in the menubar) will only work with binary images. Likewise, color functions will work for color images and grayscale will work for grayscale images.
    You can convert a color image into a grayscale by extracting a color plane and a grayscale image can be converted to binary using the threshold function.
    Hope this helps!
    Regards,
    Yusuf C.
    Applications Engineering
    National Instruments

  • Strange behavior with invalid image type error

    Hi,
    I'm currently developing a stereo vision application. I started with the StereoVisionExample provided by NI but want to use my own camera drivers.
    I created the GetImage vi (see attachment) that accepts the camera handle and an allocated image, reads the acquired image from the camera, transforms the image array to a color image and returns it. I tested it with the TestVI (attached) and it works perfectly well.
    Now I wanted to integrate it as image source for the given example application and replace the ExpressVIs but this doesn't work. I get a 1074396080 invalid image type error as soon as the GetImage SubVI is called. The only possibility to run it without an error is to set the image type to RGB64 but in this case the image is not shown correctly. I get the error no matter if I choose Grayscale, HSL or RGB32 for the initial image creation. The strange is that with the TestVI everything works perfect, even with HSL that I'm using to get the grayscale image or RGB32. Basically I didn't do anything except copying the VI from Test to StereoExample. It's driving me crazy that the GetImage VI works perfect in the one but not in the other VI with the same data! What's wrong with that?
    I appreciate your help.
    Attachments:
    getImage.jpg ‏47 KB
    stereoVision example.jpg ‏92 KB
    TestVI.jpg ‏44 KB

    Hello NicoSch!
    In order to reproduce the error, I need the image data generated by the image driver you are using. Please wire the 2D array with the image data to a control on the frontpanel and run the VI. With the data now displayed, right-click the control and choose "Data Operations > Make Current Value Default" to save the data in the control. Please attach the VI to a new forum post.
    Additionally, can you describe the type of image acquired by the camera? Is the 2D array a 32bit RGB image? What camera and LabVIEW version are you using?
    Regards,
      Georg

  • Invalid column type error while calling db function.

    We are getting an exception while calling the database function which returns a Varray of objects. We are using jpub to generate the wrapper method, ran sqlj to generate the JDBC code. The environment is weblogic 5.1 EJB container with ORacle 8.1.6.0.0 database. The JDBC driver is 8.1.7 thin, sqlj version is 8.1.7. I am giving below the exception.
    When the sqlj option profile=false is not set, the error is Classcast exception. Appraently the weblogic connection object can not be used to do oracle specific calls. If somebody has done similar things(creating a bean which calls the stored function with weblogic which returns the oracle object types) or know what the issue is, please let me know.
    Thanks,
    Vijay.
    stackTrace:
    java.sql.SQLException: Invalid column type
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(SQLException.java:43)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:273)
    at oracle.jdbc.driver.OracleStatement.get_internal_type(OracleStatement.java:4560)
    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:225)
    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:350)
    at weblogic.jdbcbase.pool.Statement.registerOutParameter(Statement.java:438)
    at sqlj.runtime.profile.ref.RTStatementJDBCCallable.registerOutParameter(RTStatementJDBCCallable.java:135)
    at sqlj.runtime.profile.ref.ParamRegProfile$ParamRegCachedStatement.registerParameters(Compiled Code)
    at sqlj.runtime.profile.ref.ParamRegProfile$ParamRegCachedStatement.getStatement(ParamRegProfile.java:101)
    at sqlj.runtime.profile.ref.CachedStatementProfileWrapper.getStatement(CachedStatementProfileWrapper.java:134)
    at sqlj.runtime.ExecutionContext$StatementStack.setStatement(ExecutionContext.java:995)
    at sqlj.runtime.ExecutionContext.registerStatement(ExecutionContext.java:523)
    at com.xpede.calculator.processor.jdbc.NewPrdGroupPkg.maincalculator(NewPrdGroupPkg.java:341)
    ----------------------

    Weblogic essentially wrappers the Oracle JDBC driver - as you can see from the stack trace, it does not just wrapper the connection object, but also the statement object.
    The SQLJ runtime does not recognize the JDBC layer anymore as an Oracle JDBC driver.
    What is happening at runtime may be the following:
    (1) The invalid column type likely results from SQLJ attempting to register the type as Types.OTHER (code 1111). This typecode is not supported by Oracle JDBC.
    (2) The class cast exception when using Oracle objects may result from a getObject() call which returns the value in default format (such as oracle.sql.ARRAY) rather than the JPublisher-generated wrapper object.
    Are you using JDK 1.2 / runtime12.zip?
    In that case you can try the standard (java.sql.)SQLData interface (in JPub: -usertypes=jdbc). However, this interface will not support wrappers for VARRAYs.

  • Invalid Content Type Error in Receiver SOAP Adapter

    Hello Experts,
    Is there a solution for this problem?
    I am getting the following error in one of my receiver SOAP adapters:
    com.sap.aii.af.ra.ms.api.DeliveryException: XIAdapterFramework:...:com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/HTML
    I have checked the message I am sending to the receiver adapter and it is XML, ok. After checking this thread: Re: Error in soap receiver adapter and SAP note 856597 I used the TCPGateway program to check what the web service is answering to the adapter request and I found the problem is due to an authentication failure. The TEXT/HTML is an error page the SAP WebAS that hosts the webservice is sending out as response saying no login method succeeded.
    However...  The webservice URL and basic authentication information, the user and password, are configured correctly. I double checked it and I can also run the webservice using that information directly with wsnavigator on that WebAS.
    Checking the request message I found out that the root problem is that the adapter is not sending out a basic authentication request as configured. It is actually sending a header with SAP SSO2 (single signon) ticket instead.
    The most strange thing is that I configured another channel exactly the same way and it sends a basic authentication header as it should and works correctly.
    So as a workaround I am using this new channel instead of the problematic one but why is the original sending SSO2 tickets? It is configured exactly the same as other channels. I think that SAP SSO authentication is not even supported by XI SOAP channels!!!???
    Thanks in advance for your kind responses.
    -Sam.

    Shabarish:
    Thanks for the link, but the real issue is not the request message (regarding your blog) but that the reply from the webservice is the standard HTML page informing no login module succeeded because the adapter is deciding completely on its own that it should use SAP single signon ticket instead of basic authentication as configured.
    Volker:
    I have performed full and delta cache refreshes to see if the channel performs as configured in the ID but it doesn't. It insists in trying to use SSO2 ticket instead of basic authentication.
    I am sure this is an ugly bug in the WEBAS Java, more so because an identically configured channel does use the basic authentication as it should. Anyone knows about a SAP note regarding this? I have performed many searches on the support service but haven't retrieved anything significant.
    Thanks for your help guys!
    -Sam.

  • "Invalid content type" error in SOAP receiver

    Hi ,
    I have ABAP Proxy->XI->Webservice scenario.
    I have configured the SOAP receiver with all neccessary information (Target URL pointing to WSDL , proxy details)
    However i get the following error when i try sending data to the webservice. "Invalid Content type for SOAP: text/html"
    I have seen some forums and blogs on this site on this but still not able to solve the error.
    Please advice...

    Hi Anand,
    Have a look into this thread- similar discussion
    DeliveryException:: invalid content type for SOAP: TEXT/HTML
    Also check this- in the Reciever SOAP Adapter configuration i.e Target URL must be url of the WSDL.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/40728f7b-0401-0010-d9bc-8c73884a3789
    Hope this helps.......
    Regards,
    Abhy

  • Invalid Content-Type error using JAXM

    Hi,
    I have deployed sample JAXM application to weblogic server 7.0. When I ran the
    client it is throwing following error,
    javax.xml.soap.SOAPException: Invalid Content-Type:text/html
    java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Unable
    to internalize message
    Following is the SOAP message I am sending to the service,
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    <soap-env:Body>
    <Item ID="101" NAME="Java" PRICE="$29.99"></Item>
    <Item ID="102" NAME="Java 2" PRICE="$39.99"></Item>
    <Item ID="103" NAME="JAXM" PRICE="$19.99"></Item>
    <Item ID="104" NAME="Web Services" PRICE="$49.99"></Item>
    </soap-env:Body>
    </soap-env:Envelope>
    The above application is working fine in SUN ONE Application server.
    --Muthu

    Hi Muthu,
    Take a look at the SAAJ spec:
    http://java.sun.com/xml/downloads/saaj.html
    Towards the top part of the doc shows the diffs.
    Regards,
    Bruce
    Muthu wrote:
    >
    Hi Bruce,
    Thanks for your reply. Could I know what is the difference between JAXM and SAAJ?
    --Muthu.
    Bruce Stephens <[email protected]> wrote:
    Hello,
    Product management has stated that we have no plans to support JAXM.
    Sun
    has removed any depencies between JAXM and JAXRPC and created SAAJ as
    a
    replacement for the JAXM dependencies. JAXM will not be part of J2EE
    1.4. We support SAAJ in 8.1.
    Thanks,
    Bruce
    Muthu wrote:
    Hi,
    I have deployed sample JAXM application to weblogic server 7.0. WhenI ran the
    client it is throwing following error,
    javax.xml.soap.SOAPException: Invalid Content-Type:text/html
    java.security.PrivilegedActionException: javax.xml.soap.SOAPException:Unable
    to internalize message
    Following is the SOAP message I am sending to the service,
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    <soap-env:Body>
    <Item ID="101" NAME="Java" PRICE="$29.99"></Item>
    <Item ID="102" NAME="Java 2" PRICE="$39.99"></Item>
    <Item ID="103" NAME="JAXM" PRICE="$19.99"></Item>
    <Item ID="104" NAME="Web Services" PRICE="$49.99"></Item>
    </soap-env:Body>
    </soap-env:Envelope>
    The above application is working fine in SUN ONE Application server.
    --Muthu

  • Invalid Content Type Error for Web Service

    Hi Experts,
    We have a XI / PI Web Service, and have created an Adaptive Web Service Model for the same. For using this web service model, we have created a HTTP destination of type WSDL.
    This configuration works great in our development and consolidation server.
    While working with our production server, with all the settings same as consolidation server, the following error is generated for Web Service call. using the AWS model
    java.io.IOException: Invalid content type while requesting http://<host>:<port>/webdynpro/resources/<application_package>/guicall.wsdl. Expected Content-type: text/xml, received Content-type: content/unknown, used user to connect: null
    The HTTP destination address is the one specified in bold above.
    Also, in later part of the stack trace we are bale to see this error:
    com.sap.tc.webdynpro.model.webservice.exception.WSModelRuntimeException: Exception on creation of service metadata for WS metadata destination
    Please guide us on this issue.
    Best Regards,
    Alka.

    Hi Alka,
    How did you configure the Webservice Destinations in Visual Admin for a webservice explosed by XI system.
    I mean what was the URL specified, did you specify XI SYSTEM userid password ???
    How was the webservice published to inspection.wsil in XI system ??
    Thanks,
    Regards,
    Aditya Metukul

  • Invalid trigger type error

    I am new to Oracle and need some help with the following:
    I was given scripts to create tablespaces, role, user, tables, indexes, sequences, triggers and synonyms.
    Those scripts were created and tested under Oracle version 7.0 and 8.0. I am using Oracle Enterpise Edition ver. 8i. and was told that should be OK.
    Anyway, I was successful with executing all but one of the scripts. This script triggers.sql produces an error, which reads: "Trigger created with compilation
    errors" if run via SQL Plus utility like
    @c:\triggers.sql.If I type(or cut and paste) the trigger I recieve an error "invalid trigger type".
    Here is the SQl statement:
    create trigger WALLSADMIN.TI_STATES
    BEFORE INSERT or UPDATE
    on WALLSADMIN.States
    for each row
    BEGIN
    IF
    INSERTING THEN
    SELECT state_seq.NEXTVAL INTO :new.state_id FROM DUAL;
    ELSIF UPDATING THEN
    :new.state_id:= :old.state_id;
    END IF;
    END;
    create trigger WALLSADMIN.TI_PROJECT
    BEFORE INSERT or UPDATE
    on WALLSADMIN.Project
    for each row
    BEGIN
    IF
    INSERTING THEN
    SELECT project_seq.NEXTVAL INTO :new.project_id FROM
    DUAL;
    ELSIF UPDATING THEN
    :new.project_id:= :old.project_id;
    END IF;
    END;
    create trigger WALLSADMIN.TI_WORKSPACES
    BEFORE INSERT or UPDATE
    on WALLSADMIN.WorkSpaces
    for each row
    BEGIN
    IF
    INSERTING THEN
    SELECT workspace_seq.NEXTVAL INTO :new.workspace_id
    FROM DUAL;
    ELSIF UPDATING THEN
    :new.workspace_id:= :old.workspace_id;
    END IF;
    END;
    In this script WALLSADMIN is the user I previously
    successfully created, tables in the statement were
    also successfully created.
    Note, i was told to run the script with Wallsadmin
    credentials. If I do so, however, I recieve 'insufficient
    priveledges'. If run under system account, I recieve errors
    already described, so it maybe permissions
    problem as well.
    here is my role script:
    /* Grant appropriate privileges to the
    ROLE */
    GRANT "CONNECT" TO "WALLSAKB";
    GRANT CREATE TABLE TO "WALLSAKB";
    GRANT DROP ANY TABLE TO "WALLSAKB";
    GRANT EXECUTE ANY PROCEDURE TO "WALLSAKB";
    GRANT INSERT ANY TABLE TO "WALLSAKB";
    GRANT SELECT ANY TABLE TO "WALLSAKB";
    GRANT SELECT ANY SEQUENCE TO "WALLSAKB";
    GRANT UPDATE ANY TABLE TO "WALLSAKB";
    and user create script:
    CREATE USER "WALLSADMIN" IDENTIFIED BY "password"
    DEFAULT TABLESPACE "WALLSAKB" TEMPORARY
    TABLESPACE "WALLSTMP"
    PROFILE DEFAULT;
    GRANT "CONNECT" TO "WALLSADMIN";
    GRANT "WALLSAKB" TO "WALLSADMIN";
    GRANT UNLIMITED TABLESPACE TO "WALLSADMIN";
    /* Enable all ROLES that are assigned to user
    WALLSADMIN */
    ALTER USER "WALLSADMIN" DEFAULT ROLE ALL;
    Thanks in advance.

    could you tell the error by type "SHOW ERRORS" at sqlplus

  • Export giving "Invalid column type" error

    Hi,
    I am using Export button in my page and I provided "BICOSortedDetlsVO1" for View instance property.
    After I ran I got java.sql.SQLException: Invalid column type.
    Can any one let me know where I am doing wrong?
    Thanks,
    Subramanyam.

    Hi Nani,
    Please find below is the query for VO.
    Thanks &
    Regards,
    Subramanyam.
    SELECT XxslipaBicosSortedDtlsVlEO.ADMINISTRATION_FEE,
    XxslipaBicosSortedDtlsVlEO.ASSIGNMENT_CATEGORY,
    XxslipaBicosSortedDtlsVlEO.BILLING_CONDITION_ID,
    XxslipaBicosSortedDtlsVlEO.BILLING_CONDITION_SET_ID,
    XxslipaBicosSortedDtlsVlEO.BILLING_CURRENCY_CODE,
    XxslipaBicosSortedDtlsVlEO.BILLING_GROUP,
    XxslipaBicosSortedDtlsVlEO.BILLING_METHOD_CODE,
    XxslipaBicosSortedDtlsVlEO.BILLING_METHOD_MEANING,
    XxslipaBicosSortedDtlsVlEO.BILLING_TYPE_CODE,
    XxslipaBicosSortedDtlsVlEO.BILLING_TYPE_MEANING,
    XxslipaBicosSortedDtlsVlEO.COST_PLUS_MARKUP,
    XxslipaBicosSortedDtlsVlEO.COST_PLUS_MAXIMUM_RATE,
    XxslipaBicosSortedDtlsVlEO.COST_PLUS_PROJECT_BASE_HRS,
    XxslipaBicosSortedDtlsVlEO.COST_PLUS_UNITS_PER,
    XxslipaBicosSortedDtlsVlEO.CREATED_BY,
    XxslipaBicosSortedDtlsVlEO.CREATION_DATE,
    XxslipaBicosSortedDtlsVlEO.DESCRIPTION,
    XxslipaBicosSortedDtlsVlEO.EFFECTIVE_END_DATE,
    XxslipaBicosSortedDtlsVlEO.EFFECTIVE_START_DATE,
    XxslipaBicosSortedDtlsVlEO.EMPLOYMENT_CATEGORY,
    XxslipaBicosSortedDtlsVlEO.ENABLED_FLAG,
    XxslipaBicosSortedDtlsVlEO.EXPENDITURE_CATEGORY,
    XxslipaBicosSortedDtlsVlEO.EXPENDITURE_CATEGORY_MEANING,
    XxslipaBicosSortedDtlsVlEO.EXPENDITURE_ORGANIZATION,
    XxslipaBicosSortedDtlsVlEO.EXPENDITURE_TYPE,
    XxslipaBicosSortedDtlsVlEO.EXPENDITURE_TYPE_MEANING,
    XxslipaBicosSortedDtlsVlEO.FIXED_RATE,
    XxslipaBicosSortedDtlsVlEO.FIXED_RATE_LIMIT_FLAG,
    XxslipaBicosSortedDtlsVlEO.FIXED_RATE_MARKUP,
    XxslipaBicosSortedDtlsVlEO.FIXED_RATE_UNITS_PER,
    XxslipaBicosSortedDtlsVlEO.FRINGE_BENEFIT_MARKUP,
    XxslipaBicosSortedDtlsVlEO.FRINGE_BENEFIT_OPERATION,
    XxslipaBicosSortedDtlsVlEO.GRADE_FAMILY,
    XxslipaBicosSortedDtlsVlEO.GRADE_PROGRESSION_LEVEL,
    XxslipaBicosSortedDtlsVlEO.GRADE_SALARY_LEVEL,
    XxslipaBicosSortedDtlsVlEO.GRADE_SALARY_REGION,
    XxslipaBicosSortedDtlsVlEO.JOB_BILL_TITLE_OVERRIDE,
    XxslipaBicosSortedDtlsVlEO.JOB_DISCIPLINE,
    XxslipaBicosSortedDtlsVlEO.LAST_APPROVAL_DATE,
    XxslipaBicosSortedDtlsVlEO.LAST_UPDATED_BY,
    XxslipaBicosSortedDtlsVlEO.LAST_UPDATE_DATE,
    XxslipaBicosSortedDtlsVlEO.LAST_UPDATE_LOGIN,
    XxslipaBicosSortedDtlsVlEO.NON_LABOR_RESOURCE,
    XxslipaBicosSortedDtlsVlEO.NORMAL_HOURS,
    XxslipaBicosSortedDtlsVlEO.ORG_ID,
    XxslipaBicosSortedDtlsVlEO.RESOURCE_NAME,
    XxslipaBicosSortedDtlsVlEO.RESOURCE_NUMBER,
    XxslipaBicosSortedDtlsVlEO.RESOURCE_TYPE_CODE,
    XxslipaBicosSortedDtlsVlEO.RESOURCE_TYPE_MEANING,
    XxslipaBicosSortedDtlsVlEO.REVENUE_CATEGORY_CODE,
    XxslipaBicosSortedDtlsVlEO.REVENUE_CATEGORY_MEANING,
    XxslipaBicosSortedDtlsVlEO.SERVICE_TYPE_CODE,
    XxslipaBicosSortedDtlsVlEO.SERVICE_TYPE_MEANING,
    XxslipaBicosSortedDtlsVlEO.TASK_NUMBER,
    XxslipaBicosSortedDtlsVlEO.WORK_TYPE_ID,
    XxslipaBicosSortedDtlsVlEO.WORK_TYPE_NAME
    FROM XXSLIPA_BICOS_SORTED_DTLS_VL XxslipaBicosSortedDtlsVlEO

  • "Invalid column type" error while calling pl/sql function in AM

    Code written in AM is ...
    String MISSING_TIME_SHEET_CALL = "begin ? = missing_time_sheet(?,?,?,?); end;";
    CallableStatement timeSheetStmt = txn.createCallableStatement(MISSING_TIME_SHEET_CALL, 1);
    timeSheetStmt.registerOutParameter(1,Types.BOOLEAN);
    timeSheetStmt.registerOutParameter(4,Types.DATE);
    timeSheetStmt.registerOutParameter(5,Types.DATE);
    timeSheetStmt.setString(2,personId);
    timeSheetStmt.setDate(3,resTermRow.getLastWorkingDate().dateValue());
    timeSheetStmt.execute();
    Body of Function is
    function missing_time_sheet (p_person_id varchar2, p_last_date date, p_start_date out date, p_end_date out date)
    -- Arvind
    return boolean

    refer this article and check your code.
    http://prasanna-adf.blogspot.com/2008/11/callable-statement.html
    --Prasanna                                                                                                                                                                                                                                                       

  • Getting Incorrect data type error while trying to do a CAST in table

    Getting an error while trying to compile the following piece of code
    CREATE OR REPLACE PACKAGE BODY A_pkg AS
    FUNCTION A(O_error_message IN OUT varchar2)
    RETURN BOOLEAN IS
    --Declaring the local variables and CURSORs used in the program unit
    L_attrib_tbl CFA_SQL.TYP_attrib_tbl;
    cursor c1 is
    select list_first1.number_11
    from TABLE (CAST (L_attrib_tbl AS "CFA_SQL.TYP_attrib_tbl")) list_first1;
    BEGIN
    L_group_id = '22'
    IF L_merch_type_value = 'G' OR L_merch_type_value = 'I' THEN
    CFA_SQL.QUERY_ATTRIB(L_attrib_tbl,
    L_group_id) ;
    END IF;
    open C1;
    Fetch C1 into L_number;
    close C1;
    return true;
    END A;
    END;
    Also pasting the Spec for CFA_SQL which contains TYP_attrib_tbl
    TYPE TYP_attrib_rec IS RECORD
    group_id CFA_ATTRIB_GROUP.GROUP_ID%TYPE,
    varchar2_1 VARCHAR2,
    number_11 number(10,0));
    TYPE TYP_attrib_tbl is TABLE of TYP_attrib_rec INDEX BY BINARY_INTEGER;
    The error is coming in the line
    cursor c1 is
    select list_first1.number_11
    from TABLE (CAST (L_attrib_tbl AS "CFA_SQL.TYP_attrib_tbl")) list_first1;
    with the error as Invalid data type pointing to CFA_SQL.TYP_attrib_tbl as invalid, but I have initialized L_attrib_tbl as of that datatype only. Ahy help would be greatly appreciated.
    Regards,
    Joydeep

    Hi Kelly,
    There is no data that is entered in that period.The data will be entered for that period next month.
    POV is also not set to that period,but still the problem persists.
    Thanks

  • ORA-00902: invalid datatype comile error while using CAST function

    Hi everyone,
    I'm getting ORA-00902: invalid datatype compilation error while using CAST function.
    open ref_cursor_list for select empName from TABLE(CAST(part_t AS partnumberlist));
    The partnumberlist and ref_cursor_list is declared in the Package spec as given below.
    TYPE ref_cursor_list IS REF CURSOR;
    TYPE partnumberlist IS TABLE OF emp.empName%TYPE;
    The error points the partnumberlist as invalid datatype in TOAD because of this i'm unable to compile the package.
    Any suggestion
    Thanks and regards
    Sathish Gopal

    Here is my code for
    package Spec
    CREATE OR REPLACE PACKAGE "HISTORICAL_COMMENTZ" AS
    TYPE prior_part_data_record IS RECORD (
    prior_part_row_id PGM_RPLCMNT_PART.PR_PART_ROW_S_ID%TYPE,
    prior_pgm_chng_s_id PGM_RPLCMNT_PART.PR_PGM_CHNG_S_ID%TYPE
    TYPE parts_list IS TABLE OF prior_part_data_record;
    --TYPE parts_list IS TABLE OF NUMBER;
    TYPE partnumberlist IS TABLE OF PGM_RPLCMNT_PART.PR_PART_ROW_S_ID%TYPE;
    TYPE partnumber_cursor IS REF CURSOR;
    TYPE comment_record IS RECORD (
    pgm_s_id                     PGM_PART_CMNT.PGM_S_ID%TYPE,
    part_row_s_id                PGM_PART_CMNT.PART_ROW_S_ID%TYPE,
    pgm_chng_s_id                PGM_PART_CMNT.PGM_CHNG_S_ID%TYPE,
    cmnt_txt                     PGM_PART_CMNT.CMNT_TXT%TYPE,
    cmnt_dt                     PGM_PART_CMNT.CMNT_DT%TYPE,
    updt_rsrc_id                PGM_PART_CMNT.UPDT_RSRC_ID%TYPE
    TYPE comment_list IS TABLE OF comment_record;
    global_pgm_s_id INTEGER := 0;
    global_part_row_s_id INTEGER := 0;
    err_num NUMBER := 999999;
    err_msg VARCHAR2 (250);
    PROCEDURE getComments (
    pgm_s_id IN NUMBER,
    part_row_s_id IN NUMBER,
    partnumber_cursorlist out partnumber_cursor);
    END;
    Package Body
    CREATE OR REPLACE PACKAGE BODY HISTORICAL_COMMENTZ
    AS
    FUNCTION getPriorPart
    (param_prior_pgm_chng_s_id IN PGM_RPLCMNT_PART.PR_PGM_CHNG_S_ID%TYPE,
    return_prior_part_data_record IN OUT prior_part_data_record
    RETURN INTEGER
    IS
    retVal INTEGER;
    prior_part_row_id INTEGER;
    prior_pgm_chng_s_id INTEGER;
    local_prior_part_data_record prior_part_data_record;
    BEGIN
    SELECT PR_PART_ROW_S_ID AS prior_part_row_id, PR_PGM_CHNG_S_ID AS prior_pgm_chng_s_id
    INTO local_prior_part_data_record
    --SELECT PR_PART_ROW_S_ID INTO retVal
    FROM PGM_RPLCMNT_PART
    WHERE PGM_S_ID = global_pgm_s_id AND CUR_PGM_CHNG_S_ID = param_prior_pgm_chng_s_id;
    return_prior_part_data_record := local_prior_part_data_record;
    retVal := 0;
    RETURN retVal;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    err_num := SQLCODE;
    err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
    DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
    retVal := -1;
    RETURN retVal;
    WHEN OTHERS
    THEN
    err_num := SQLCODE;
    err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
    DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
    retVal := -1;
    RETURN retVal;
    END getPriorPart;
    FUNCTION getComment (found_parts_list IN parts_list, comments OUT comment_list)
    RETURN INTEGER
    IS
    CURSOR init_cursor
    IS
    SELECT PGM_S_ID,PART_ROW_S_ID,PGM_CHNG_S_ID,CMNT_TXT,CMNT_DT,UPDT_RSRC_ID
    FROM PGM_PART_CMNT WHERE 1 = 2;
    retVal INTEGER;
    indexNum PLS_INTEGER;
    local_part_record prior_part_data_record;
    local_comment_record comment_record;
    local_part_row_s_id NUMBER;
    i PLS_INTEGER;
    BEGIN
    OPEN init_cursor;
    FETCH init_cursor
    BULK COLLECT INTO comments;
    i := 0;
    indexNum := found_parts_list.FIRST;
    WHILE indexNum IS NOT NULL
    LOOP
    local_part_record := found_parts_list(indexnum);
    local_part_row_s_id := local_part_record.prior_part_row_id;
    SELECT PGM_S_ID,PART_ROW_S_ID,PGM_CHNG_S_ID,CMNT_TXT,CMNT_DT,UPDT_RSRC_ID
    INTO local_comment_record FROM PGM_PART_CMNT
    WHERE PGM_S_ID = global_pgm_s_id
    AND PART_ROW_S_ID = local_part_row_s_id;
    comments(i) := local_comment_record;
    i := i + 1;
    END LOOP;
    RETURN retval;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    err_num := SQLCODE;
    err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
    DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
    RETURN retval;
    WHEN OTHERS
    THEN
    err_num := SQLCODE;
    err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
    DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
    RETURN retval;
    END getComment;
    PROCEDURE getComments
    pgm_s_id IN NUMBER,
    part_row_s_id IN NUMBER,
    partnumber_cursorlist OUT partnumber_cursor)
    IS
    comment_recordlist comment_record;
    retPartnumberlist partnumberlist;
    found_parts_list parts_list;
    local_part_record prior_part_data_record;
    is_more_parts BOOLEAN;
    driver_chng_s_id NUMBER;
    num_parts NUMBER;
    retVal NUMBER;
    comments comment_list;
    returnPartnumberlist partnumberlist;
    iloopCounter PLS_INTEGER;
    inx1 PLS_INTEGER;
    part_t partnumberlist :=partnumberlist(100,200,300);
    CURSOR part_list_init_cursor
    IS
    SELECT PR_PART_ROW_S_ID,PR_PGM_CHNG_S_ID FROM PGM_RPLCMNT_PART WHERE 1 = 2;
    CURSOR inIt_cursor
    IS
    SELECT 0 FROM DUAL WHERE 1 = 2;
    BEGIN
    DBMS_OUTPUT.ENABLE (5000000);
    global_pgm_s_id := pgm_s_id;
    global_part_row_s_id := part_row_s_id;
    SELECT PART_ROW_S_ID AS prior_part_row_id, PR_PGM_CHNG_S_ID AS prior_pgm_chng_s_id
    INTO local_part_record
    FROM PGM_RPLCMNT_PART
    WHERE PGM_S_ID = global_pgm_s_id AND PART_ROW_S_ID = global_part_row_s_id AND
    CUR_PGM_CHNG_S_ID IN (SELECT MAX(CUR_PGM_CHNG_S_ID) FROM PGM_RPLCMNT_PART WHERE
    PGM_S_ID = global_pgm_s_id AND PART_ROW_S_ID = global_part_row_s_id
    GROUP BY PART_ROW_S_ID);
    OPEN part_list_init_cursor;
    FETCH part_list_init_cursor
    BULK COLLECT INTO found_parts_list;
    -- Add the existing part to the found list
    found_parts_list.EXTEND;
    found_parts_list(1) := local_part_record;
    driver_chng_s_id := local_part_record.prior_pgm_chng_s_id;
    num_parts := 1;
    is_more_parts := TRUE;
    WHILE (is_more_parts) LOOP
    retVal := getPriorPart(driver_chng_s_id,local_part_record);
    IF (retVal != -1) THEN
    found_parts_list.EXTEND;
    num_parts := num_parts + 1;
    found_parts_list(num_parts) := local_part_record;
    driver_chng_s_id := local_part_record.prior_pgm_chng_s_id;
    ELSE
    is_more_parts := FALSE;
    END IF;
    END LOOP;
    --num_parts := getComment(found_parts_list,comments);
    OPEN init_cursor;
    FETCH init_cursor
    BULK COLLECT INTO returnPartnumberlist;
    num_parts := found_parts_list.COUNT;
    FOR iloopCounter IN 1 .. num_parts
    LOOP
    returnPartnumberlist.EXTEND;
    returnPartnumberlist(iloopCounter) := found_parts_list(iloopCounter).prior_part_row_id;
    END LOOP;
    retPartnumberlist := returnPartnumberlist;
    open
    *          partnumber_cursorlist for select PR_PART_ROW_S_ID from TABLE(CAST(retPartnumberlist AS historical_commentz.partnumberlist));*                              
    DBMS_OUTPUT.put_line('Done....!');
    EXCEPTION
    some code..............................
    END getComments;
    END HISTORICAL_COMMENTZ;
    /

  • DeserializeReply get Invalid type error

    We have an old webservice returns an xml document. The schema is defined as type "Any", the method return type is object. I can see the message returned correctly in the soap envelop (since the return content is xml) but I'll get a null result.
    If I apply a formatter and return the xml contents directly, I'll get a "Return argument has an invalid type" invalid cast exception. I tried to return string and got the same error. How to just get the original message through?

    Did you declare the type as 'object'.  You should be able to cast an object to any other type if the cast is valid.  Is it possible that some values in the xml are null?  Then you must test for null and cast only the objects that are not null.
    jdweng

Maybe you are looking for

  • How can I see the whole day in day view without scrolling?

    I'm using iCal 4.0.4 on my MacBook. I'd like to see the whole day of events without having to scroll down. Right now I can only see about 5 hours at a time. I've set the day to start at 8am to midnight. Is there a way to see 12-16 hours at a time wit

  • Who can help me with unknown error 0xE800005E

    After updating itunes to 10.6 and my iphone to iOS 5 my iphone got trouble syncing with my computer. I was able to connect at first but halfway a sync I was disconnected and got the message: iTunes could not connect to this iPhone because an unknown

  • How to create an image with a transparent shape

    Hi This should be easy - The end result I want is this: a png which is mostly black (or any colour) but with a defined shape in it which is transparent. I have the shape. I select it. I seem to be able to make a mask from this (a selection which I ca

  • SharePoint 2013 Enterprise and SQL Server 2012 Standard edition vs. Enterprise - feature question

    I can't seem to find any clear answers to the implications of installing SQL Server 2012 standard edition vs. enterprise in regards to SharePoint 2013.  I understand that to get many of the features you need Enterprise edition of SQL 2012; but, what

  • Error message 4261 when trying to burn discs

    Arghh, this is driving me mad. Since I updated to Itunes 11, I have been unable to burn playlists to disc. I'm a teacher and need to do this a lot for my work. I've wasted about 20 blank CDs as they start burning, then after a few tracks I get the me