ViewObject line getAttribute returns null when I know that the data is there.
Hi all
I have a simple piece of code in my implementation of the Application Module class to define a binding on a view variable and return the results to my REST Web Service project.
public ListItem[] returnListForCategory(String category) { ListItem[] result = null; Row row = null; ViewObjectImpl voi = getListForCategoryVO1(); voi.setNamedWhereClauseParam("Category", category); int rows = (int) voi.getEstimatedRowCount(); int idx = 0; result = new ListItem[rows]; while (voi.hasNext()) { row = voi.next(); ListItem item = new ListItem(); System.out.println("returnListForCategory: code: " + (String)row.getAttribute("Code")); System.out.println("returnListForCategory: codeDescription: " + (String)row.getAttribute(1)); item.setCode((String)row.getAttribute("Code")); item.setCodeDescription((String)row.getAttribute("CodeDescription")); result[idx] = item; idx++; } return result; }
When I run the debugger Houston (right click on the Module of the Application and select Debugging), the point of view getListForCategoryVO works as expected: three lines, with data in the fields.
When I deploy this on WLS, and run via the WS REST I get three rows, but all the attributes ('Code' and 'Code') have the value null.
Here's the REST WS code that calls it (in case it is relevant).
private static final String amDef = "model.am.LookupListsAM"; private static final String config = "LookupListsAMLocal"; @GET @Path("/{category}") public ListItems getList(@PathParam("category") String category) { ListItems result = new ListItems(); ApplicationModule am = Configuration.createRootApplicationModule(amDef, config); LookupListsAMImpl llami = (LookupListsAMImpl)am; model.dto.ListItem[] items = llami.returnListForCategory(category); for (model.dto.ListItem item : items) { ListItem newItem = new ListItem(); newItem.setCode(item.getCode()); newItem.setCodeDescription(item.getCodeDescription()); result.addListItem(newItem); } Configuration.releaseRootApplicationModule(am, true); return result; }
Do you have any idea what I am doing wrong, or it could be the cause?
TIA
You use libraries remains part or a third party provider of jax - rs? (this may be a problem with the classpath)
Dario
Tags: Java
Similar Questions
-
Windows 7 search is not finding I know that the files are there and when I go to the control panel and select the indexing options, it doesn't seem to work. I guess that's a place where the problem of index - what can I do?
Microsoft has NO solution.
-
Windows 7 search is not finding I know that the files are there.
When I search from the Start button, Windows cannot find known files in 'My Documents'. However, if I choose the "see more results" option and then choose ' search again: computer, I find all the files. " What could be wrong?
Help please!
Hi John,.
This occurs only in a specific file type?
Possible causes for this issue:
1. the type of file is not indexed
2. the file has properties that prevent it from be indexed
3. the indexer has not yet inserted the file in the index
4. the indexer is overlooking the file
Step 1: Run the search and indexing of troubleshooting for this problem automatically
Open the troubleshooter for search and indexing
http://Windows.Microsoft.com/en-us/Windows7/open-the-search-and-indexing-TroubleshooterLet me know if it works or you need help
This may interest you
ImproveWindows searches using the index: frequently asked questions
http://Windows.Microsoft.com/en-us/Windows7/improve-Windows-searches-using-the-index-frequently-asked-questionsThank you, and in what concerns:
Ajay K
Microsoft Answers Support Engineer
Visit our Microsoft answers feedback Forum and let us know what you think.
-
I try to search for a file... choose any file name... like 'cat' but get everthing that doesn't even look like a cat. I can get a list of files of a thousand, but anything containing same cat in the filename OR in the file. No idea what I am doing wrong?
John
Hello
"Maybe" there is something in the search Index that is causing a problem or try the advanced options
Search.Windows Search does not work or research are slower
http://support.Microsoft.com/GP/windows_searchTroubleshooting Windows Vista search & indexing errors
http://www.WinVistaClub.com/T24.htmlReconstruction of the Index in Windows Vista
http://www.howtogeek.com/HOWTO/Windows-Vista/rebuilding-the-search-index-in-Windows-Vista/
How to enable or disable the search Index in Vista
http://www.Vistax64.com/tutorials/69564-index-enable-disable.html
Improve Windows searches using the index: frequently asked questions
http://Windows.Microsoft.com/en-us/Windows-Vista/improve-Windows-searches-using-the-index-frequently-asked-questions================================
Tips for finding files
http://Windows.Microsoft.com/en-us/Windows-Vista/tips-for-finding-filesHow to use advanced search in Vista Options
http://www.Vistax64.com/tutorials/75451-advanced-search.htmlHow to restore the page button on the Start Menu after installing Vista SP1
http://www.Vistax64.com/tutorials/145787-Search-start-menu-button-restore-after-SP1.htmlHow to restore the context Menu item search after installing Vista SP1
http://www.Vistax64.com/tutorials/134065-search-context-menu-item-restore-after-Vista-SP1.htmlHow to create a shortcut on the desktop search in Vista
http://www.Vistax64.com/tutorials/126499-search-desktop-shortcut.html----------------------------------------------------------
Win Key F opens advanced search
Searching in Windows Vista, part 1
http://Windows.Microsoft.com/en-us/Windows-Vista/searching-in-Windows-Vista-part-1-secrets-of-the-search-boxI hope this helps.
Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.
-
Had a trojan virus. Restored on the eve. Everything came back fine and the virus has been removed.
However I can't see my files but none of the contents of the files. I know that the files are there for
Properties shows the number of files in the folder. I can also address the various program files
I use this newly opened file offer.
Thank you
Hi Scottresti,
Follow the steps below:
a. open Folder Options in control Panel.
b. click Startand then click Control Panel.
c. click appearance and themes, and then click Folder Options.
d. tab display , under hidden files and folders, click Show hidden folders and files.
See: to view the hidden files and folders:
To view the hidden files and folders
I hope this helps.
-
Get annoying action ads at the top of the Yahoo home page. I always use Firefox and haven't changed the settings, then why the big announcements? I know that they are put there by Yahoo, but they were not there before and they aren't there when I open Yahoo with Explorer.
Install adblock more with subscription easylist and check
-
Hi there from Hamburg/Germany. Since the last two updates of the CC, Photoshop crashes 95% when I work with masks. This gets really annoying when you know that I have about 120 photos to retouch to a customer. Any ideas what's happening here? Never had this problem before. Now, every time I create a layer mask, or try to work on a Photoshop freezes completely, forcing me to restart and (most of the time unless I have record EACH step) start of a scratch. Which is pretty much annoying... any suggestions?
Move on to the Discussion of Photoshop
-
I bought the bright room 6... received dvd and went to install installation of .at last there a yellow warning saying bad OS... when I know that for some my computer meets the requirements...
Hi Buffy, trying to change the compatibility mode to Windows 7, see: try to install lightroom 6 on windows 7 get interface requirement not met windows vista not supported
Atul_Saini
-
When I completely turn the volume upward, there is a load screeching noise
When I completely turn the volume upward, there is a load screeching noise
Hi JacnLivi,
Welcome to the Microsoft community.
I understand how it could be frustrating when things do not work as expected. Please, I beg you, don't worry I'll try my best to resolve the issue.
· Were there any changes made on the computer before the show?
First of all, check is it y of electronic devices such as mobile, radio or TV near the computer. Try it away from them and check if it would launch persists.
Follow these methods.
Method 1: Run the audio troubleshooter.
Open the troubleshooting of Audio playback
http://Windows.Microsoft.com/en-us/Windows7/open-the-playing-audio-Troubleshooter
Method 2: Follow the steps in the article.
Tips for solving common audio problems
http://Windows.Microsoft.com/en-us/Windows7/tips-for-fixing-common-sound-problems
For reference:
Sound cards: frequently asked questions
http://Windows.Microsoft.com/en-us/Windows7/sound-cards-frequently-asked-questions
Please follow all the steps and if the problem persists, return back and we will be happy to help you.
-
I bought Photoshop elements 13 and did not know that the Windows Vista operating system is not supported. How to exchange the 13 elements of Photoshop for a version of Photoshop that supports the Windows Vista operating system?
Adobe does not sell older versions of their software, the best you could expect if the software will not work on Vista is to get a refund.
Please see return, cancel or Exchange an order - Adobe
http://helpx.Adobe.com/x-productkb/policy-pricing/return-cancel-or-change-order.html
-
Determine the MAC address of the LAN knowing that the model and serial number
Laptop Toshiba SN 96592614 G
Is it possible to determine the MAC address of the network card, knowing that the model and the serial number of your laptop?
How to enter the Toshiba addicts.
I saw you using Toshiba unit details page with the serial posted Qosmio F30-113 offered in Russia.
Your laptop is stolen or what?
-
I can't unlock my iphone by apple ID knowing that the previous owner removed the device from his account, but still the unit asks the old code in order to unlock the phone
If the device is always ask for the ID of the previous owner, then it is has not been deleted.
-
How can I open a program from the internet. computer says program is deleted because there is a virus. I know that the provider is trustwortthy and is a professional company. I went in tools bar stamped confidentiality and unlocked the company cookies, but Istill does not open.
Thank you
Celia
Hi Celia,Your computer is probably infected by a virus. Try following the steps in this virus/malware removal guide: http://www.selectrealsecurity.com/malware-removal-guideIt contains instructions which will remove most malware infections. If you have any questions, just ask me. I hope this helps you.Brian -
How will I know that the Windows Xp pro product key is already registered or not before you buy
In fact, I'm going to buy Windows XP Professional and I see the product key is spent outside of the RAP and it is visible to everyone so here is the possibility that someone already uses this key and register online. I just want to know that how I know that the key is not yet register online before you buy.
Hello
Where will you buy Windows XP computer?
You can contact Microsoft customer service to improve the assistance.
http://support.Microsoft.com/kb/295539
Hope this information helps. -
Hello
I lost the password I gave to a drive using Bitlocker in Windows 7, how can I return it or I can get the data in the back of the player? Data are very important because by my studies are concerned. Help, please. Thank you!Hello
I lost the password I gave to a drive using Bitlocker in Windows 7, how can I return it or I can get the data in the back of the player? Data are very important because by my studies are concerned. Help, please. Thank you!People like you that encryption data with bitlocker do it because they want their data accessible only by those who have the certificate. The sad news for you is that you have made a good choice with BitLocker: unless you have the certificate, your data remains inaccessible. There is no backdoor. If he had then BitLocker would be useless.
Maybe you are looking for
-
Don't see no SyncServices on my MAC
Hello I have a MAC Mini 2009 Intel Core 2 Duo 2.26 GHz, 8 GB RAM, OS X 10.10.5 and Office 365. I can't make 365 Outlook to use everyone on OS X Contacts App. read tons of forums, I saw I have enabled this option in SyncServices. But I now see SyncSer
-
Keyboard HP Pavilion dm1-3216au operation
Hi I have a HP Pavilion dm1-3216au and I have a problem with the way that behave the f1 - f12 keys, these keys are double operation, for example the f2 key is for the brightness of the screen down, my problem is that pressing f2 that is normall opera
-
I need the BIOS for my gateway T - 63 Lap Top series.
I have a gateway T - 63 Lap Top series. The part of the motherboard is #: ACEH-40GAB1700-F605.The serial number is: V94DM03707. I tried to contact the bridge, but the information (serial number) that the system is requested to attend my request are s
-
I just decided to install the latest update to the centre of Lenovo solution and ran a diagnotics and I get 2 fails, I never had any forecheck, but the Chipset Test and Test PCI/PCI-e show failed, while running the test it says not valid for these tw
-
How to change the MOB OpenManage integration for vCenter Server registration
A few months back, I've updated our installation of the vCenter for v2 plugin, now called OpenManage integration for vCenter Server. When you perform the upgrade, we have kept the old base done vs a new installation. During the upgrade process, we de