Diagram of the Avro - optional fields - not give 'in the Union"exception
Hi all
I have a problem with the help of the optional fields in a schema by using the JSONAvroBinding and avro.
If I have a scheme of the user who has a first name field. The user may choose to provide the name or not. The field is optional from the perspective of readers.
(this comes from http://docs.oracle.com/cd/NOSQL/html/GettingStartedGuide/avroschemas.html who is nosql avro documentation)
{
"type': 'record."
"namespace": "com.example."
'name': 'Full name',
'fields':]
{'name': 'first', 'type': ['string', 'null']},
{'name': 'last', 'type': "string", "default": "Smith"}
]
}
Here, if I provide this example as Avro scheme, then omit the name when I write, it will work without problem. But when I try to write 'John' it will fail with:
Caused by: org.apache.avro.UnresolvedUnionException: not in the union ['string', 'null']: 'John '.
to oracle.kv.impl.api.avro.JsonBinding$ JsonData.resolveUnion (JsonBinding.java:403)
at org.apache.avro.generic.GenericDatumWriter.resolveUnion(GenericDatumWriter.java:144)
to oracle.kv.impl.api.avro.JsonBinding$ JsonDatumWriter.write (JsonBinding.java:599)
to oracle.kv.impl.api.avro.JsonBinding$ JsonDatumWriter.writeRecord (JsonBinding.java:695)
to oracle.kv.impl.api.avro.JsonBinding$ JsonDatumWriter.write (JsonBinding.java:565)
Truncated. check the log file full stacktrace
It does not work:
{
'first': 'John ',.
"last": "Smith".
}
It works:
{
"last": "Smith".
}
It seems that someone else has had this problem and posted on the Avro site, where a response said that it might be NoSQLs due to lack of libraries:
"The error is thrown from the Oracle NoSQL Avro library use and is not clearly a problem of Avro. You might be better off trying to get help for this Oracle? »
https://issues.Apache.org/jira/browse/Avro-1376
Any thoughts? To me, this seems to be a bug in the JsonBinding class?
According to this:
Sending
{
'first': 'John ',.
"last": "Smith".
}
is not correct.
Instead, sending:
{
'first': {}
'chain': 'John '.
},
"last": "Smith".
}
works.
Tags: Database
Similar Questions
-
I plan to go back to 7 due to problems of this kind.
That's what I was wondering. What happened when you right-click on the desktop.
FYI, there is another option. Place the mouse on the icon in front of the address and drag it to the taskbar.
-
getDataControl () .getApplicationModule () gives a null pointer exception
Hello
I am facing a problem with Jdeveloper 11.1.2.1, which didn't happen with JDev 11.1.1.5.
The problem is that the construction of the following support to a draft opinion bean do not give a null pointer exception.
The bean of support is connected to a stubborn workflow that has a page with all its own links fragment. The stubborn workflow is called dynamically from the global shell user interface page.
You have an idea?public MyBean() { // constructor bindings = ADFUtils.getDCBindingContainer(); // bindings seems to point to the correct Databind.cpx ApplicationModule am = bindings.getDataControl().getApplicationModule(); // but here I have a null pointer exception! ... }
Thank youI have two comments:
(1) it is usually not a great practice to enter the AM directly. Instead, set up a link for what you were going to do with the AM. In this way, you are not without going through the link container.
(2) do stuff like this in the constructor of a managed bean is suspect. It seems that link container is not fully instantiated yet, based on the behavior you're seeing.
-
Since Acrobat Reader downloaded DC I can't sign my PDF documents. It does not give me the option more and yes I am connected. On the old version, I got no problem with clicking on "signature" and draw the area where I needed my signature, put the password and "POOF" my signature would be there. With this new version, it won't do that or give me the option. The online help is useless. I need to explain to me how connect you as I used too?
I assumed that you had a digital signature created in your player application of old and whenever you use to fill out a pdf with a signature field signed you it. But in order to draw and then sign you must use Acrobat Pro DC no DC drive.
Thank you
Abhishek
-
Netflix bought through iTunes does not give me the option 4K
Netflix bought through iTunes does not give me the option 4K
What, instead, have you done so far? Netflix Checked site help or a FAQ section? Contacted Netflix? If none of these give a solution contacted iTunes Support (http://reportaproblem.apple.com)?
-
Already purchased music does not give me the option to download
Bought the songs awhile back, they may not appear in the history of my purchase, but when I search on the itunes store, it says 'buy' and does not give me the option to download. I bought like 350 songs and now I can only download 150 of them, only, this has started to happen after I started the free 90 day trial of apple's music, which has since expired.
Help! I want my music back.
They do not show in the tab purchased in the app Store on your phone for redownloading iTunes and iTunes from your computer section (click on your name / icon to the top right of iTunes then click purchased on the popup)? If they don't then check if you have hidden the cloud: mask and unmask purchases iTunes or iBooks on your Mac or PC - Apple support.
-
Assistant printing photographs on Vista does not give me the option to print contact sheets
The picture on my Vista Print Wizard does not give me the ability to print contact, like my old XP version sheets where. Any way to change/upgrade/downgrade or else return this option? I really need to be able to print photos contact sheets. Thank you!
The Print Wizard offers other models?
4 x 6, 5 x 7, 8 x 10?Is it possible that the default paper size in your printer
preferences has been replaced by a smaller size... 4 x 6
for example? If this is the case... it will remove the largest
models from the Print Wizard.To find the missing models... go to control panel
and access your printer preferences to change
the default size of the paper letter (8 x 10). Look carefully,
There may be more than one Panel that displays by default
paper size.Just for General info, the following items may be useful
at a glance:Windows Vista - Photo Print has
http://Windows.Microsoft.com/en-us/Windows-Vista/print-a-pictureWindows Vista - picture printing: frequently asked questions
http://Windows.Microsoft.com/en-us/Windows-Vista/picture-printing-frequently-asked-questions -
How can I set the time display on the toolbar of the low wing? When I click with the right button on the taskbar, and click show properties, it does not give me the options to display the time? Where should I go in windows 7 to do this? I clicked on the date and time also, and it does give me an option to add there either. Please help.
Thank youHow can I set the time display on the toolbar of the low wing? When I click with the right button on the taskbar, and click show properties, it does not give me the options to display the time? Where should I go in windows 7 to do this? I clicked on the date and time also, and it does give me an option to add there either. Please help.
Thank youRight-click the taskbar, and then select Properties. On taskbar you of the tab, click Customize. Scroll to the clock and change the "behaviours" on it.
-
The fitting of the image in the field including AutoFit options are not displayed on my options panel to toolbar for the selection tools. How can I view?
You're out of space. Some toolbar has been resized/re-spaced in the last update. Click on the menu button (on the far-right in your screenshot) and select Customize... Make sure that the mounting frame (object) is selected. If this is the case, you should disable something else to make room for this group of button.
Furthermore, I see that your application window is not maximized. What happens if you expand to the maximum it?
-
I bought the pack, but it does not give me the option to download the full version. Just the trial thr. Why?
If these solutions do not work, please contact our staff of support directly by following this link: contact Adobe customer service.
For more information, please visit: FAQ: how to contact Adobe for support?
-
Profile does not show that I have a paid subscription. Need to download programs and does not give me the option of.
If your cloud subscription does not appear on your account page, https://accounts.adobe.com/ , and then click Plans & products at the top, you need to contact Adobe for support hours
Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">===>
Don't forget to stay signed with your Adobe ID before accessing the link belowCreative cloud support (all creative cloud customer service problems)
http://helpx.Adobe.com/x-productkb/global/service-CCM.html -
I need to upgrade to full creative cloud photography plan, but I need the option of the student. Its does not give me this option when go to 'manage my account '. It only gives me the option full price
Hi Lorrainee,
Please contact support by calling/chat for the cancellation of the photography plan first, and then the sales team would be able to help you place the order of comprehensive plan.
Kind regards
Sheena
-
How can you save your illustration in Photoshop CC 2014 as PNG or JPEG file when it does not give the option?
Thank you for your time and help in advance.
Thanks for the reply. I have actually managed to do work. I had my work instead of 16 or 8-32 bit/channel value. Once I changed it to 16-bit/channel, he gave me the possibility to register under the registered name. Thanks again.
-
OCR does not give the option recognize Portuguese?
OCR does not give the option recognize Portuguese
How to solve the problem?
This is for me:
-
How to export to a .sfw file? It does not give me the option FILE > EXPORT. I installed Flash and everthing.
The functionality to export SWF directly from After Effects files has been removed. He never worked at all well.
Use Flash Professional to create SWF files.
If you want to play a movie that you created in After Effects in a container SWF, and then export your composition using Adobe Media Encoder to the H.264 format and then link or embed this movie in a SWF file in Flash Professional.
Maybe you are looking for
-
Satellite C850 - 1 2 Impossible to Win 8 to 8.1
When I try to upgrade Win 8 to 8.1 I get a message that says update Win first 8.When I try to update Win 8 I get 132 updates. I spent many hours trying to perform this task, but the updates are not installed. I tried using the troubleshooting tool th
-
I don't know how to unlock my iPhone, I don't remember the password
I found my old iPhone but it has a password and I don't remember what it is can someone help me please
-
Ive tried to update my windows Vista Home Basic but always fails, also, as well as defender but said that it is impossible to check the updates. My AVG 8.0 antivirus can be updated. will you please help... or ask for details, so I can answer in order
-
Outlook Express can compact messages. How can I disable this error?
OUTLOOK Express on Windows XP very annoying, it's almost each and every time I click on anything whether to open or close any program, etc... An error message is displayed: OUTLOOK Express: to free up disk space, Outlook Express can compact messages.
-
I tried to download McAfee Total Protection and I got an error. XPSEPSC install: 1603 error code. He said as impossible to install or run the application. The application requires that assembly Windowsbase Version 3.0.0.0 is installed in the Globa