Image file in DB entry does not
I try to have the user select an image file, and then insert into a db however I get this db error "entity line with null key is not found in NblNhIncsubmission."
If you see my picture below you can see my code is correctly downloaded the file and update the "Attachment" field, but it throws an error inserting the entire form in the db
Here's the PB I need to insert in (circled is the column I'm inserting the NblNhIncsubmission DB)
Here is my page jspx code:
<?xml version='1.0' encoding='UTF-8'?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"> <jsp:directive.page contentType="text/html;charset=UTF-8"/> <f:view> <af:document id="d1" binding="#{backingBeanScope.backing_Test.d1}"> <af:messages binding="#{backingBeanScope.backing_Test.m1}" id="m1"/> <af:form id="f1" binding="#{backingBeanScope.backing_Test.f1}" usesUpload="true"> <af:pageTemplate viewId="/oracle/templates/threeColumnTemplate.jspx" id="pt1"> <f:facet name="center"> <af:panelFormLayout binding="#{backingBeanScope.backing_Test.pfl1}" id="pfl1"> <af:spacer width="10" height="10" binding="#{backingBeanScope.backing_Test.s2}" id="s2"/> <af:inputDate value="#{bindings.When.inputValue}" label="WHEN" shortDesc="#{bindings.When.hints.tooltip}" id="it6" required="true" showRequired="true"/> <af:spacer width="10" height="10" binding="#{backingBeanScope.backing_Test.s1}" id="s1"/> <af:selectOneChoice value="#{bindings.Location.inputValue}" label="LOCATION" shortDesc="What is your location?" binding="#{backingBeanScope.backing_Test.soc1}" id="soc1" showRequired="true" required="true"> <f:selectItems value="#{bindings.Location.items}" binding="#{backingBeanScope.backing_Test.si1}" id="si1"/> </af:selectOneChoice> <af:spacer width="10" height="10" binding="#{backingBeanScope.backing_Test.s3}" id="s3"/> <af:selectOneChoice value="#{bindings.Category.inputValue}" label="OBSERVATION TYPE" shortDesc="Describe the cause of your observation." binding="#{backingBeanScope.backing_Test.soc2}" id="soc2" required="true" showRequired="true"> <f:selectItems value="#{bindings.Category.items}" binding="#{backingBeanScope.backing_Test.si2}" id="si2"/> </af:selectOneChoice> <af:spacer width="10" height="10" binding="#{backingBeanScope.backing_Test.s4}" id="s4"/> <af:inputText value="#{bindings.Details.inputValue}" label="YOUR OBSERVATION" columns="#{bindings.Details.hints.displayWidth}" maximumLength="#{bindings.Details.hints.precision}" shortDesc="#{bindings.Details.hints.tooltip}" binding="#{backingBeanScope.backing_Test.it3}" id="it3" required="true"> <f:validator binding="#{bindings.Details.validator}"/> </af:inputText> <af:spacer width="10" height="10" binding="#{backingBeanScope.backing_Test.s5}" id="s5"/> <af:inputText value="#{bindings.Action.inputValue}" label="ACTION TAKEN" columns="#{bindings.Action.hints.displayWidth}" maximumLength="#{bindings.Action.hints.precision}" shortDesc="#{bindings.Action.hints.tooltip}" binding="#{backingBeanScope.backing_Test.it4}" id="it4" showRequired="true" required="true"> <f:validator binding="#{bindings.Action.validator}"/> </af:inputText> <af:spacer width="10" height="10" binding="#{backingBeanScope.backing_Test.s6}" id="s6"/> <af:inputText value="#{bindings.Attachment.inputValue}" label="#{bindings.Attachment.hints.label}" required="#{bindings.Attachment.hints.mandatory}" columns="#{bindings.Attachment.hints.displayWidth}" maximumLength="#{bindings.Attachment.hints.precision}" shortDesc="#{bindings.Attachment.hints.tooltip}" binding="#{backingBeanScope.backing_Test.it2}" id="it2" rendered="true"> <f:validator binding="#{bindings.Attachment.validator}"/> </af:inputText> <af:spacer width="10" height="10" binding="#{backingBeanScope.backing_Test.s8}" id="s8"/> <af:inputFile label="Upload File" binding="#{backingBeanScope.backing_Test.if1}" id="if1" value="#{backingBeanScope.backing_Test.file}"/> <af:panelLabelAndMessage label="SUBMITTED BY:" binding="#{backingBeanScope.backing_Test.plam1}" id="plam1"> <af:outputText value="#{securityContext.userName}" binding="#{backingBeanScope.backing_Test.ot1}" id="ot1"/> </af:panelLabelAndMessage> <af:inputText value="#{bindings.Userid.inputValue}" label="#{bindings.Userid.hints.label}" required="#{bindings.Userid.hints.mandatory}" columns="#{bindings.Userid.hints.displayWidth}" maximumLength="#{bindings.Userid.hints.precision}" shortDesc="#{bindings.Userid.hints.tooltip}" binding="#{backingBeanScope.backing_Test.it1}" id="it1" rendered="false"> <f:validator binding="#{bindings.Userid.validator}"/> </af:inputText> <af:panelGridLayout binding="#{backingBeanScope.backing_Test.pgl1}" id="pgl1"> <af:gridRow marginTop="5px" marginBottom="5px" height="auto" binding="#{backingBeanScope.backing_Test.gr1}" id="gr1"> <af:gridCell marginStart="5px" width="auto" binding="#{backingBeanScope.backing_Test.gc1}" id="gc1"> <af:commandButton text="Submit" disabled="#{!bindings.Commit.enabled}" binding="#{backingBeanScope.backing_Test.cb2}" id="cb2" action="#{backingBeanScope.backing_Test.cb2_action}"/> </af:gridCell> <af:gridCell marginStart="1px" width="auto" binding="#{backingBeanScope.backing_Test.gc2}" id="gc2"> <af:commandButton text="Cancel" binding="#{backingBeanScope.backing_Test.cb4}" id="cb4" partialTriggers="pfl1" disabled="true"/> </af:gridCell> </af:gridRow> </af:panelGridLayout> <af:panelGridLayout binding="#{backingBeanScope.backing_Test.pgl2}" id="pgl2"> <af:gridRow marginTop="5px" marginBottom="5px" height="auto" binding="#{backingBeanScope.backing_Test.gr2}" id="gr2"> <af:gridCell marginStart="5px" width="auto" binding="#{backingBeanScope.backing_Test.gc5}" id="gc5"> <af:resetButton text="Clear All" binding="#{backingBeanScope.backing_Test.rb1}" id="rb1"/> </af:gridCell> <af:gridCell marginStart="1px" marginEnd="5px" width="auto" binding="#{backingBeanScope.backing_Test.gc6}" id="gc6"> <a href="mailto:noharinc.com?subject=NO HARM Observation Feedback">Mail</a> </af:gridCell> </af:gridRow> </af:panelGridLayout> <f:facet name="footer"> </f:facet> </af:panelFormLayout> </f:facet> <f:facet name="header"/> <f:facet name="end"/> <f:facet name="start"> <af:group binding="#{backingBeanScope.backing_Test.g1}" id="g1"> <af:decorativeBox binding="#{backingBeanScope.backing_Test.db1}" id="db1" topHeight="180px"> <f:facet name="center"/> <f:facet name="top"> <af:image source="/[email protected]" shortDesc="NoHarmLogo" binding="#{backingBeanScope.backing_Test.i1}" id="i1"/> </f:facet> </af:decorativeBox> </af:group> </f:facet> <f:facet name="branding"/> <f:facet name="copyright"/> <f:facet name="status"/> </af:pageTemplate> </af:form> </af:document> </f:view> <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_Test--> </jsp:root>
Here is my java code snippet:
//Method to create blobdomain from selected file private BlobDomain createBlobDomain(UploadedFile file) { InputStream in = null; BlobDomain blobDomain = null; OutputStream out = null; try { in = file.getInputStream(); blobDomain = new BlobDomain(); out = blobDomain.getBinaryOutputStream(); byte[] buffer = new byte[8192]; int bytesRead = 0; while ((bytesRead = in.read(buffer, 0, 8192)) != -1) { out.write(buffer, 0, bytesRead); } in.close(); } catch (IOException e) { e.printStackTrace(); } catch (SQLException e) { e.fillInStackTrace(); } return blobDomain; } //Action lsitener for submit button public String cb2_action() { BindingContainer bindings = getBindings(); OperationBinding operationBinding = bindings.getOperationBinding("Commit"); //Grab the file UploadedFile myfile = (UploadedFile)this.getFile(); //Set the Attachment InputText field value to the blob domain generated FacesContext facesCtx = FacesContext.getCurrentInstance(); Application app = facesCtx.getApplication(); ExpressionFactory elFactory = app.getExpressionFactory(); ELContext elContext = facesCtx.getELContext(); ValueExpression ve = elFactory.createValueExpression(elContext, "#{bindings.Attachment.inputValue}",Object.class); //set the Attachment value to the blobdomain contents before inserting into db ve.setValue(elContext,createBlobDomain(myfile)); //Commit input into Database Object result = operationBinding.execute(); if (!operationBinding.getErrors().isEmpty()) { return null; } //Display popup message FacesContext con = FacesContext.getCurrentInstance(); FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO,"Thank you for submitting your observation.",""); con.addMessage("",message); return null; }
haha OMG finally got it to work thanks @Timo Hahn (idk why didn't you tag) and Cvele_new_account
After reading comments Timo again and blog and wire with cvele comment
Solution was to make sure my update of bindings is set correctly, then check the "Insert" for updating the after:
Tags: Java
Similar Questions
-
Before I started using Lightroom, I got my pictures organized in a hierarchy of folders.
My_images A A1 A2 B B1 B2 (The actual structure is deeper than this example a few levels.)
I imported the A1, A2, B1, B2 files in Lightroom and gave them the keywords that reflect the folder structure.
Now, when I look in Lightroom under folders, the structure is gone (it is still there on my drive). All I see is a list of A1, A2, B1, B2 files, so it is difficult to navigate to the folder that I want to work with.
How can I get Lightroom to display the folder structure in that my images are in fact?
Found a solution. Right click the folder and select "show parent folder.
Repeat this operation several times until you see the folder structure you want. -
F2 and entry does not on certain pages of the site, except if the field selected
F2 and entry does not not to go backward or forward on certain pages of the site unless field selected. It is on an intranet site after reload PC with Windows XP, other old Windows XP PC work.
Including the Firefox Firefox 10.0, or 11.0 9.0 upgrade fixed this problem with the program code of the intranet for keys F2 and Enter to forward and back a page in the application of the intranet site.
-
When I go to move file e drive windows does not recognize the format
ORIGINAL TITLE: files and folders
running windows xp pro version 2002 service PAC 3, when I go to move the file e disc windows does not recognize the format, already file types are jpeg and php have tried a restore and fix computer center has not helped. Any suggestion or solutions would be appreciated ARTuro_974
Thanks to all the answers, don't know how, but the problem fixed, have learned a little about pc THANKS AGAIN to all.
-
Windows 7 in 'Récent' has customdestinations the files of ms which does not open
Windows 7 in 'Récent' has customdestinations the files of ms which does not open. Does anyone know if Microsoft has a solution showing how to open them or any other solution? Thank you!
[Original title: GeorgiaFH]
Hello
See:
Don
-
Original title: cannot get audio from video .3g2 (Windows 7)
I have a number of videos that were recorded on a Motorola phone to format .3g2, when I played against them in windows XP Pro using what was the most recent media player, they played very well and the audio was present.
I've since upgraded to Windows 7 Ultimate and have found that videos will play with media player sound is not output.
I tried different players like VLC (same result, no sound) and came across one called SUPER from erightsoft which indeed works and allows me to re - encode to .wmv BUT when I do and you try to read the .wmv I encounter an error:
"Windows Media Player cannot play the file. The player does not support the format you are trying to play. »
When I clikc on help, I am led to a page with links on THIS forum.
So here I am.
Can someone explain what is happening, why it happens and how / if I can convert them into a playable (with audio) .wmv friendly format?
Thank you
Hi UbinTook,
You found this message from Windows Media Player due to one of the following reasons.a. you try to play a file that is not supported by the player.
b. you are trying to play a file that the player does not support, but the file was compressed by using a codec that is not supported by the player.Step 1:Confirm that you are trying to play a supported file type. The following article lists the types of files (formats) supported by Windows Media Player.Information on the types of media files that supports Windows Media Player
http://support.Microsoft.com/kb/316992Note: if you have tried to play the file type is included in this table, the file might have been encoded with a codec that is not supported by Windows Media Player. If this is the case, Windows Media Player cannot play the file.Step 2:Download the necessary codec to play the file.For more information of Codec, see: Codec: frequently asked questions
http://Windows.Microsoft.com/en-us/Windows7/codecs-frequently-asked-questionsThank you, and in what concerns:
I. Suuresh Kumar - Microsoft technical support.Visit our Microsoft answers feedback Forum and let us know what you think.
-
When I try to look for things in windows 7 slot search files and program it does not display anything
Help
Hi girls NMS.
Try to run the next Fixit:
-
I had to uninstall iTunes a few months ago and successfully re-installed, but part of my music was missing. At one point, following the instructions on a thread on the forums Apple or Microsoft, I saved my music library on the desktop. Since then, I do not have a library of music on the desktop file. In my looooooong hours trying to fix things, I do not know if I deleted it or what.
Now, I get the message:
"Backup has encountered a problem during backup of the C:\windows\system32\config\systemprofile\Desktop\music file. Error: (System does not find the specified path. (0 x 8007003)) "whenever I have backup my computer.
As I understand it, that does not affect really any other files, they rely on the spot (I think), but
HOW CAN I GET RID OF THIS MESSAGE? or what is the cause? Of course, I could use help in simple English, step by step, as I'm not very techno...
Thank you!!!
Try to be...
SereneJulie
Hi serene,
Thanks for posting your query on the Microsoft Community.
As indicated by the error, this problem appears, when these files/libraries that are saved automatically are not present on your computer. I suggest you to follow the steps below and check, if it can help solve the problem.
- Create missing files that are listed in the error message.
- Exclude files from the files to backup in the backup settings and then include these files in their original location. To exclude folders in other communities and to include these files in the original location, follow these steps:
- In Control Panel, open backup and restore.
- In the section back up , click change settings.
- In the dialog box Configure the backup , click Next.
- In the dialog box that you want to save , click Let me choose, and then click Next.
- Expand data files,
library, expand additional locations, and then click to clear the check boxes folder AppData, Contactsand Research . - Expand computers, expand the element of your system drive (for example, expand Local disk (c)), expand users,
- Click Next, and then click Save settings and exit.
- Backup and restore, click back up now to perform a new backup. The backup operation must complete without errors.
If the problem persists, I suggest you follow the steps in the following article for troubleshooting backup problems.
Windows backup or restore 0 x 80070001, 0 x 81000037 or 0 x 80070003 errors
http://support.Microsoft.com/kb/973455/en-us
Come back and let us know the State of the question, we will be happy to help you. We, at tender Microsoft to excellence.
-
HELP PLEASE
I forgot my windows password 8 Pro. Tried several programs Freeware - different product Code to these Apps - no work!
A reset of password - but is fails (cannot open the RAMDISK IMAGE file MINIPE\WIPE.IS_ CAN NOT BE LOAD error Code is 7)?
Do I have to buy a soft reset? Buy new Microsoft product key?
I read somewhere that I can use regedit (run as administrator), but have no details. I thank all of you for your help since. I would really appreciate help with this or I'm screwed.
Thanks again
Hippie TOKE
Hey Hippie,
Microsoft technical support engineers cannot help you recover the passwords of the files and Microsoft who are lost or forgotten product features.
Please click the link mentioned below on Microsoft Policy all lost or forgotten the password.
http://support.Microsoft.com/kb/189126/en-us
Answer please if you have any questions.
-
Images in the media browser does not appear in chronological order...
We went just to Adobe Premiere Pro. The images in the media browser does not appear in chronological order. In the media browser window, there is a drop-down list labelled 'name', but nothing else. How can we get the images to display in chronological order?
Short answer: no
Its digital or alphabetical.
Once in the project window, you can sort by date.
-
Setup could not initialize - I've lost hours trying to find solutions online and forum... to change the file to add .old - does not work; Open the file 2/2 still didn't work... Help!
Please see the links below:
https://forums.Adobe.com/thread/1848277
https://forums.Adobe.com/thread/2055767
Let us know, if you still get the same error even after trying it all the steps mentioned
-
Need to update my Acrobat 9.0.0 Pro to 9.5.5 version. Where can I find the necessary files - because the update does not seem to react (not taken care no more, I assume that). I wouldn't be forced to buy a newer software in this way...
You can get all updates from here: ftp://ftp.adobe.com/pub/adobe/acrobat/
Remember that you must install in order, one after the other.
-
but when I open the 7zip file it says installer does not have inicialize. This could be due to a missing file.
You do not open the .7z file.
You download 2 files: a file .exe and .7z file.
Download Creative Suite 6 applications
Double-click on the .exe file and follow the instructions.
-
Impossible to update LR CC ~ my one day to change and nothing work updated my Mac and all LR will do is CRASH! Need help. Tried to stop CC and remove the 1.0 file already and who does not work for me. What can I do?
If lr crashes repeatedly, reset preferences. http://www.lightroomforums.NET/showthread.php?14226-resetting-%28or-trashing-%29-the-light file-Preferences-room
-
Image - menu entry does not work in Dreamweaver CC 2015
The new Dreamweaver CC 2015 for the Image - Insert menu item does not work. 20141 until 2015, there are several menu items that have changed. How shall we put an image now? I have to return to school? It seems strange for a new version of change too radically.
While I'm on the SOAP box, there are a few versions the anchor tag went away, we asked to use the ID tag instead. Now, which seems to create errors and does not work.
I know it's two questions, but I imagine I'll find more. I just went through the issue of expansion (mentioned at the top of this area). Finish by using a third-party extension manager to get my extensions to work.
What else will emerge?
I am disappointed...
Tom
That's what you need to do (with the word 'Favorites' in the drop-down list) because you are currently in the Favorites panel of sup of the insertion window...
After clicking on this course, you should see this...
Where you would choose HTML to access the Insert Image function.
I suppose, since you asked so much with this Panel, you had something go sideways during the installation. I would like to try the following steps in order to see if one of them your problem...
Turn your hidden operating system files, and then try these...
Clear the Cache in program: removing a corrupt cache file
Food preferences: restore preferences | Dreamweaver CS6, Dreamweaver CC
And if neither of this total above work, cleaning and reinstall the program using Adobe cleaning tool: use of the Adobe Creative Cloud cleaning tool to solve installation problems
Maybe you are looking for
-
So I recently had my password wrong too many times and my iPhone 4S locked out telling me "iPhone is disabled; Connect to iTunes'. And so I connected to iTunes and decided to restore my phone. I finished the process of restoration of the configuratio
-
I would like to add a password
I would like to add a few passwords for saved passwords
-
Missing "attachment" column in windows mail sent items account IMAP
HelloI recently changed my operator e-mail that offered IMAP. I changed my POP3 to IMAP account in Windows mail, and everything works perfectly, except: Because the 'Sent items' folder is called "Sent", that I changed and the mail is stored correctly
-
No sound TV, videos or trailers? Help, please!
-
Destroy... on the page?
Hi, maybe this is a stupid question but in qml, how can we know when the page is destroyed? For example, using a glance, user can access the previous page, but this, I want to change some settings. This process of 'destroy' can be detected? Edit: the