Need help!: How to covert Excel into BLOB and pass into procedure?
Hi,
I am writing a program in which I am uploading file from front-end and passing that file into Oracle procedure in BLOB format.
Can someone help me ,that **how to convert Excel sheet into BLOB and then how we can pass that BLOB object to procedure in oracle*.
Any help will greatly appreciated.
Thanks
Guys,
I am able to convert FormFile into byutes using getFileData();
But when I am tryint oconvert into BLOB,it is dhoowing me the error.
Please find the complete details below.
I am trying to Upload one file using FormFile of Struts and I need to pass that Form File into one procedure having BLOB as aIn parameter. SO I need to convert that file into BLOB object
The code that I am trying is :
try{
BLOB blob= BLOB.getEmptyBLOB();
System.out.println("before");
blob.setBytes(theFile.getFileData());
System.out.println("after");
cs.setBlob(3, blob);
}catch(Exception e){System.out.println("in the BLOB "+e);}
After running the code,I am getting the following error
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at oracle.jdbc.driver.DatumBinder.bind(OraclePreparedStatement.java:15839)
at oracle.jdbc.driver.OraclePreparedStatement.setupBindBuffers(OraclePreparedStatement.java:2865)
at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:2150)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3279)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3389)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4222)
at dms.bo.impl.LoadManagement.UploadMetadataDAOImpl$1.doInCallableStatement(UploadMetadataDAOImpl.java:38)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:953)
at dms.bo.impl.LoadManagement.UploadMetadataDAOImpl.getBlobString(UploadMetadataDAOImpl.java:28)
at dms.web.action.LoadManagement.UploadMetadataAction.perform(UploadMetadataAction.java:33)
at dms.web.action.common.BaseAction.execute(BaseAction.java:17)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619
So with
Similar Messages
-
To store PDF into BLOB and retrieve into OLE/OCX
We would like to:
1. Store a PDF file (output of a report saved in file server) into a BLOB
column.
2. Retrieve previously stored PDF in the BLOB column and display using either
OLE automation or ActiveX (OCX) control.
I read all related documents in metalink that addresses this issue however cant
get this to work. We have Acrobat Reader 4.0. Here are some issues from the
tests that I did:
1. To load the PDF file the program code that uses BFILE and LOADFROMFILE does
not work since the database is on a remote server and the PDF file is on a
local file server. The DIRECTORY created on the database is unable to find the
PDF file.
2. Though I want the loading of the file to be programmatic, I tried
right-click on the OLE container and inserted object from file. This loaded the
file into the container (Icon on the container appeared) however I was not able
to view the document by double-clicking. An error in Adobe occured: 'There was
an error opening this document. A file read error occured'. My guess is the
'Insert Object' did not insert the file properly into the BLOB.
3. When trying to display the PDF file stored in file server (in case storing
into BLOB does not work), I used an OCX control, right-clicked and Insert
Object and select Adobe Control for ActiveX. The problem here is when I run the
form, the OCX control shows up empty and I have to 'Insert Object' again in
runtime. Once I manually insert object from runtime the GET_INTERFACE POINTER &
SET_PROPERTY works fine is displaying the document. Is there any way to
maintain the control property of the OCX when the form is run?
4. Are there any workarounds and better solution to store PDFs into BLOBs and
retrieve and display in OLE/OCX controls? Using temporary file into local drive
is not an issue.
5. Would I be able to make use of 'PDF.PdfCtrl.1' OLE class?
6. Does OLE automation work for Acrobat Reader 4.0.?
I would appreciate all the help.
ShyamIm facing a similar kind of problem. I want to store and retrieve Office files, PDF and Jpegs into/from the database to view them on web in disconnected mode. Please reply as I cant find any help/documentation regarding saving BLOB data into files. I was able to store file data into BLOB, using DBMS_LOB package.
Shahzad -
How do I download Whatsaap, Facebook and Skype into my home screen. When I try it gives me an erros message saying that this is not available in a Panamanian store and I live in the US. HELP????
Change your country on iPhone, iPad, or iPod touch
Tap iTunes Store, App Store, or iBooks Store.
At the bottom of the Featured page, tap Sign In.
If you're already signed in, skip to step 5.
Tap Use Existing Apple ID.
Enter your Apple ID and password and tap OK.
Tap your Apple ID.
Tap View Apple ID or View Account.
Tap Country/Region.
Tap Change Country or Region.
Tap the Store menu and tap your country.
Tap Next.
Review the Terms and Conditions and Apple Privacy Policy.
Tap Agree if you agree to the terms and conditions.
In the prompt that appears, tap Agree.
Select a payment method and enter your payment information.
Enter your billing address and tap Next. -
my Creative Cloud subscription has expired, and I assigned the monthly payment, but I can not open any progam creative cloud, I need help how to solve this problem
Carlos-
Start by signing out and back in to see if it will see the subscription:
How to sign in and sign out of creative cloud (activate/deactivate)
If the apps are installed fine and close after launch see this link:
CC applications close immediately after launch
If the problem is something different, please let us know the error you see or what is happening on the screen so we can advise you on a solution
Pattie -
Hi, I have this green mark (with pointing arrow looks like a link) on some words show on my window screen when I open a web page, I wonder if it is a virus link or such. Need help how to get rid of it. Here's the example:
WING
GAMES
MAJORITY
ThanksIf the third link you posted (the link containing the word "majority") does not look like the following then you inadvertently installed adware.
That particular page should resemble the following:
The word "majority" in the third paragraph should not be a link and should not have the green icon associated with it.
To learn how this may have occurred, and how to prevent it from occurring in the future, read How to install adware
Most so-called "news" websites are nothing more than entertainment outlets that cater to prurient interests, and contain advertisements that leave the user about three clicks away from installing junk. If you decide to frequent those websites, Safari's "Reader" feature helps minimize that exposure.
Try it: -
Mail server not responding. Need help how to verify my account
Mail server not responding. Need help how to verify my account
There are instructions on this page for how to create a new account without giving credit card details (the instructions won't work with existing accounts) : http://support.apple.com/kb/HT2534
Unless an account is created via those instructions then credit card details will need to be entered on it before the account can be used. -
How can I get a stripped screw out of the bottom of my iPhone?? I need help, How can I get a stripped screw out of the bottom of my iPhone?? I need help
Try asking at ifixit.com. The iPhone is not considered user servicable. You're not going to get much help on an Apple sponsored forum.
-
I need help in making the programe which updates our code into client machi
I need help in making the programme which updates our code into client machine from the server.
As yahoo messanger does if there is any updated version of yahoo messanger.
It asks when we login into it do you want to update new version of yahoo messanger
It automatically updates it
Need Help??Sounds to me like you need Java Web Start.
-
Need help how to use itunes card to download music
Need help how to use itunes card to download music
If you want to add the iTunes card to your account, then in the iTunes app on the iPad you should be able to scroll to the bottom of the Music tab and there should be a Redeem button - there is more info here : http://support.apple.com/kb/HT1574
-
I have I pad one use iOS 5.1.1 i want update to iOS 8 itry a lot time but no possible i need help how ican doit.
The iPad 1 can not be upgraded beyond 5.1.1.
-
I need help, How could I add Aliases to Local Administrator account via terminal commands???
I want to use commands to add alias for existing administrator account remotly by using ARD.
Thanks.Hi,
a Windows Domain Controller does not have any local user or groups. So you might add the user to the admin group at Domain level.
B RGDS,
Gregor
Edited by: Gregor Gasper on Jan 9, 2009 1:44 PM -
Hi I am new on the Mac, I need help, how can I run my apps from my library on my Mac Pro? All my apps I was used in my iPad, thanks guys!!!!
The Mac OS X and iOS versions are separate products
-
hi..i am trying to login i message but i cant access ,it thing i forgot my password number, please i need help,how i can reset new password number. please i need help.
Go here.
Good luck,
Clinton -
Need help how to upload a PDF to an internet site
I'm applying for jobs on my iphone 5 and some websites need me to upload a resume... I click upload and my photo album comes up! I have PDFs of my resume saved on an app but I can't work out how to upload them on the websites? Any1 know an App or solution
Duplicate post NEED HELP: HOW TO OPEN A PDF IN ESS (EMPLOYEE SELF SERVICE)
--Shiv -
Need help re-synching iPods with new computer and getting iTunes to...
Need help re-synching iPods with new computer and getting iTunes to recognize our iPods (it doesn't even recognize them when they're plugged in).
Hubby wiped my harddrive for me, so now I need to get everything back in proper places. I'm using windows XP and installed iTunes once again (I believe it's version 8). I also installed all of my iTunes songs. Now I need to know where to go from here. We have 3 iPods and I need to get them all synched once again. I know how to create different libraries for each of us, but I can't figure out how to get our songs back into our iTunes libraries. When I open iTunes and plug in an iPod, iTunes doesn't even show that an iPod is plugged in.
What do I do now to get each of our iPods synched with our own libraries?
TIA
BrandyThanks Zevoneer. The "Restart ipod service" worked and itunes is now recognizing my ipod! Hooray!
Okay, now how do I synch all of our ipods with our individual libraries (I don't want all of my kids' songs and vice versa)? We each have hundreds of songs on our ipods that we don't want to lose.
Thanks again!
Maybe you are looking for
-
Having same issue as dtwaldo1 - utility recognizes unit but when I try to install get error message and try again, Have tried all combinations I can conceive but still get message. My old airport operates OK on same system - but utility does not reco
-
Hyper-v virtual machine management in status stopping
Hello, I had a problem with one vm showing status backing up. I read on TechNet that restarting the hyper-v virtual machine management service would solve the problem. I have tried to shutdown the service but it now says status stopping... How long t
-
How to use RowSetBrowser in Jdeveloper 3.2
Hi friends, Please show me how to use the Webbean RowSetBrowser to view the content of a ViewObject which made by the jbo:CreateViewObject. Thanks,
-
Macintosh HD is unmounted in Disk Utility
So after a week after installing Boot camp on my lion computer (3.02GHz, 4GB, 24" 2009 model) I started to get the grey load bar when booting into Mac OS and taking an eternaty (about 30mins, Windows boots fine on bootcamp partition) to boot. So i t
-
Text variable to be removed from the description on Roles in Bex Analyzer
Dear Experts, I am using BI 7.0. I have text variables in the query description. When the queries are assigned in Roles, they are displayed alongwith the text variable. I need to change the description of the query only in Roles. I am successful in d