Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

CONTACT US

Retail Training Forum
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new

Search Courses

Serializable usage error Doubt

0
Hi There,
I am doing Course: "SELF PACED- ORACLE APPLICATION FRAMEWORK TRAINING." Day#4 video

There was this topic about CO to AM -> calling using a method with serializable array
Ex:
CO.java
import java.io.Serializable;
......
(Page as two fields - txtUNM, txtPWD)
String sUNM= (String)pageContext.getParameter("txtUNM");
String sPWD= (String)pageContext.getParameter("txtPWD");
OAApplicationModule sAM=(OAApplicationModule)pageContext.getApplicationModule(webBean);

Serializable ampa[]= (sUNM,sPWD);

Error "Type 'java.io.serializable[]' expected but 'java.lang.String' found
Cannot assign values of type java.lang.String to java.io.serializable[]"

Thanks,
Venu
Responses (4)
  • Accepted Answer

    Friday, May 26 2017, 07:15 AM - #Permalink
    0
    Hi Venu,

    Can you please make a slight change in your code as below and let us know if the issue is resolved. The issue is it's not accepting String Value to serializable object. So we can explicitly convert String to Serializable and try.


    Serializable ampa[]=(Serializable) (sUNM,sPWD);

    Regards
    The reply is currently minimized Show
  • Accepted Answer

    Friday, May 26 2017, 01:54 PM - #Permalink
    0
    Hi Kashif,
    Thanks the reply
    Actually I tried no luck, giving me the same error


    Error(55,45): ) expected
    Error(56,32): variable ampa might not have been initialized
    The reply is currently minimized Show
  • Accepted Answer

    Friday, May 26 2017, 02:33 PM - #Permalink
    0
    Hi Venu,

    I guess the issue is here of braces.It should not be in round brace ( )

    Serializable ampa[]= (sUNM,sPWD);

    It should be

    Serializable ampa[]= { sUNM,sPWD};


    Please do this change you and let me know if it resolved the issue.

    Regards
    The reply is currently minimized Show
  • Accepted Answer

    Friday, May 26 2017, 03:22 PM - #Permalink
    0
    Thanks Kashif, it is resolved now with braces
    The reply is currently minimized Show
Your Reply

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  May 2024  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
    1  2  3  4  5
  6  7  8  9101112
13141516171819
20212223242526
2728293031  

Enquire For Training

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner