Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Hi ,I am getting the error : java.lang.ClassCastException: report.fileUpload.recipeUpload.DownloadBe

1615069Aug 13 2015 — edited Aug 13 2015

Hi ,

I am trying to create an application in which the user will upload a file and then the records which will be uploaded will get back to user in a text file with process indicator.

But in my DAO file, when i am extracting the data from DB in a bean class, and making an Arraylist object of that bean .

I am getting the below error :

java.lang.ClassCastException: report.fileUpload.mainUpload.DownloadBean incompatible with java.lang.String.

and in the console it is printing as below while printing to that Object:

Result 0 : report.fileUpload.recipeUpload.DownloadBean@74ba74ba

Result 1 : report.fileUpload.mainUpload.DownloadBean@762a762a

Result 2 : report.fileUpload.mainUpload.DownloadBean@77867786

Result 3 : report.fileUpload.mainUpload.DownloadBean@78ee78ee

Result 4 : report.fileUpload.mainUpload.DownloadBean@7a3e7a3e

Result 5 : report.fileUpload.mainUpload.DownloadBean@7bae7bae

Result 6 : report.fileUpload.mainUpload.DownloadBean@7d0a7d0a

Result 7 : report.fileUpload.mainUpload.DownloadBean@7e727e72

Result 8 : report.fileUpload.mainUpload.DownloadBean@7fc27fc2

Result 9 : report.fileUpload.mainUpload.DownloadBean@1320132

Result 10 : report.fileUpload.mainUpload.DownloadBean@2c802c8

Result 11 : report.fileUpload.mainUpload.DownloadBean@44a044a

Kindly help me in this,

Comments

L. Fernigrini

Consider using PL/Scope

PL/Scope Enhancements in Oracle Database 12c Release 2 (12.2) (0 Bytes)It is simpler than parsing code.

User_RI4C6

How its work I admit that I am a beginner in the world of plsql and I told myself that it is possible to do it with regexp

User_H3J7U

it can be for example standard package, ULT_HTTP
UTL_HTTP Constants

L. Fernigrini

undefined (0 Bytes)You need to set some session settings like this:

ALTER SESSION SET PLSCOPE_SETTINGS='IDENTIFIERS:ALL, STATEMENTS:ALL';

Then compile the package, and then query the dictionary tables being populated when you compile PL/SQL and have set PLSCOPE settings.
In the article I mentioned there is an example :
image.pnghere you would see that variable L_NUM and L_STR are declared on lunes 6 and 7, and that they reference the NUMBER and CHARACTER datatypes. You can modify the query in the example to filter only "VARIABLE" as TYPE; "DECLARATION" as USAGE and then get the associated REFERENCE row to get the datatype.

L. Fernigrini

Poster mentioned ANY package, documentation exists only for Oracle provided packages.

User_RI4C6

Wow very cool, Thank you very much for the help.!

1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 10 2015
Added on Aug 13 2015
1 comment
539 views