Vector did not retrun the correct values.
in my class the vector use BigDecimal not bigInteger. but my problem now is that my vector retruns the first value stored in vector until the loop completed.
the following is print statment while I add to the vector:
while (rs.next())
CustNum=rs.getBigDecimal("CustNum");
CType = rs.getString("TYPE");
row.addElement(CustNum);
row.addElement(CType);
ret.addElement(row);
System.out.println(CustNum);
***********1119
***********2220
***********3331
but in my JSP:
Vector v = new getNumber().getCustNumber();
Iterator i = v.iterator();
while (i.hasNext()) {
Vector row = (Vector)i.next();
Object CustNum = row.get(0);
Object name = row.get(1);
system.out.println(CustNum);
that retrun the wrong result:
***********1119
***********1119
***********1119
As warnerja said, you apparently only have multiple references to the same 'row' in your 'ret' Vector.
If your code in your post is exactly your actual code, then you are adding the same Vector to 'ret' multiple times. That Vector will have two values (CustNum and CType) for each row.
So, your 'ret' will have three elements, each with six elements (I separated the elements with commas):
ret.get(0): ******1119, Type1, ******2220, Type2, ******3331, Type1
ret.get(1): ******1119, Type1, ******2220, Type2, ******3331, Type1
ret.get(2): ******1119, Type1, ******2220, Type2, ******3331, Type1Each element of 'ret' is identical--you have three copies of the same Vector.
In your loop to populate 'ret', initialize 'row' to a new Vector at the beginning of each loop iteration. Also, you may want to try using ArrayList instead of Vector. You probably don't need the synchronization that Vector gives. Even if you do need synchronization, use Collections.synchronizedList(new ArrayList()).
Similar Messages
-
Error: JAR did not have the correct media type
*** Error ***
A problem occured during deploying application from http://127.0.0.1:1267/Video.jad
Reason:
JAR did not have the correct media type, it had application/x-java-archive
E:\Documents and Settings\MatLab2.R\My Documents\NetBeansProjects\Video\nbproject\build-impl.xml:202: exec returned: 1 BUILD FAILED (total time: 3 seconds)I encountered this just once when I run the sample code from JavaFX here using a mobile emulator. This code is for adding a media player. After that one time, the output doesn't contain error messages anymore and the screen just goes blank.
What does this error mean?
I used:
JDK / JRE 6 u 18
Netbeans 6.8
JavaFX 1.2 SDK
KLite Codec Pack Mega 583Hi!
I had the same problem as you did. I just found that the problem is that we only add the type JAD to the mime types, but we also have to add the JAR type.
Just add the following line to the mime.types file and it will work:
application/java-archive jar -
COPA Derivation Rules are not assigning the correct values
COPA Derivation Rules are not assigning the correct values when we process billing documents in batch. We currently have derivation rules defined to take the ship to country and refer to custom tables were we identify custom geographic groups (INT/DOM and EAM, AP, etc.). The derivation rules work accurately when the billing documents are created individually, and more than 75% of them are accurate when generated in batch, but in some circumstances, it populates the derived values with the wrong field and we can not identify where or why that's happening. It looks like it may have something to do when the ship to customer number account group is different, but that's not consistent.. Does anyone know how or where these values get populated, or have any ideas why incorrect values are appearing sporadically throughout the billing run? Thanks!!!
Leigh,
Apparently the function module is changing the values for some billing docs. Check one of the following user exits, if it gets triggered and the values are changed:
COPA0001 Enhancement for derivation in Profitability Analysis (CO-PA)
Function Module: EXIT_SAPLKEDRCOPA_001
COPA0002 Enhancement for valuation in Profitability Analysis (CO-PA)
Function Module: EXIT_SAPLKEAB_001
COPA0003 Enhancement for assignment to profitability segment (CO-PA)
Function Module: EXIT_SAPLKEAK_001
COPA0005 Enhancement for actual data update (CO-PA)
Function Module: EXIT_SAPLKEII_001
Function Module: EXIT_SAPLKEII_002
Award suitable points if the above helps. You can also reach me at [email protected]
Thanks
Ajay -
Control not outputting the correct value
Hello,
I have a producer consumer architecture with a queue to pass values. I want to push a new value onto the array using "Insert into Array" when a button is pressed, but when I do the previous value is being read the first time and the correct value on the second press.
I'm self taught and it's my first time using the queue so maybe something I'm not seeing/thinking about there?
Version 8 VI Attached.
Do this to see the problem:
1. Run
2. Click "Master Read"
3. Change "Value"
4. Click "Master Read"
5. Click "Master Read"
Any help is appreciated including block diagram critique.
Thanks!
Solved!
Go to Solution.
Attachments:
Untitled 1.vi 16 KBIt all depends on how you change the value of "Value". If you use the increment and decrement buttons it works as you expected.
If however, you type in a new value and click the button without clicking somewhere else first, it doesn't work - and here's why:
When you type in a value that modified value doesn't show up in the code untill the control loses "key focus". The problem is that clicking the button does cause the numeric input to lose key focus but only after the code has responded to the mouse up event.
To fix the problem put a property node in the mouse down event to set the numeric's KeyFocus property to false before the value is enqueued.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps -
V$session prev_hash_value not returning the correct value?
Hello,
I am executing a plsql package (which has the following query) in two modes: through Toad and through a deployed web application. I get two results.
SELECT sa.sql_text,
sa.sql_id,
ss.sid
FROM v$session ss,
v$sqlarea sa
WHERE ss.status = 'ACTIVE'
AND sa.hash_value = ss.prev_hash_value
AND ss.username = USER;
Toad gives me the correct result. The query above pulls the correct SQL statement. But when running through the web application it gives me
some random SQL statement executed during that session. I thought it might have something to do with pooled JDBC connections so I made sure for that
execution I created a new dedicated JDBC connection. Still did not work. I used the function SYS_CONTEXT('USERENV', 'SID') to report the session id
from my java program and from the query above. Both return the same SID. I've tried different variations of that query above (removing status = ACTIVE, removing username = USER, etc...)
and I still get the same result.
So any thoughts on what's going on?
Thanks,
PiyushI believe I figured it out. My testing was flawed. The testing in Toad was directly calling my package (e.g., pkg_b). The web app doesn't do that. It calls pkg_a which does a bunch of setup and then calls the target package (pkg_b) using EXECUTE IMMEDIATE. Apparently the v$session stops collecting info at that point. The current statement always shows as 'BEGIN :b1 := pkg_b; END;'. But it's still confusing why it would do that. Is there another way to access SQL statements from within that dynamic block?
-
Query does not retrieves the correct values
Hi,
pls look into the code.
clear: wf_etenr,
vbep.
To get the Scheduled Loading date and Scheduled Arrival Date.
SELECT MAX( etenr ) FROM vbep INTO wf_etenr
WHERE vbeln = tvbdpl-vgbel
AND posnr = wl_posnr.
IF sy-subrc EQ 0.
clear vbep.
SELECT SINGLE * FROM vbep "R02
WHERE vbeln = tvbdpl-vgbel "R02
AND posnr = tvbdpl-vgpos "R02
AND etenr = wf_etenr.
IF sy-subrc EQ 0.
when i see the values at dictionary level using the same wher conditions are mismatching with the query excution result in the program.
here in the second query ( SELECT SINGLE * ) it giving the wrong results .
if i compare the results at table level ,some of the field values are missing after excuting the above second query.
pls can any one give me ur suggestion on this !
rgds
sanjay reddyHi,
are these the same?
wl_posnr and tvbdpl-vgpos
try
SELECT SINGLE * FROM vbep
WHERE vbeln = tvbdpl-vgbel
AND posnr = wl_posnr
AND etenr = wf_etenr.
IF sy-subrc EQ 0.
to make somewhat consistent querys.
regards
Message was edited by: Zlatko
Zlatko Stracenski -
Non-ascii, jsp-struts, not reciveing the correct value in the server
Hi,
I am developing JSP-Struts based application using tomcat server. In JSP struts form, when I put nonascii charater in the text field or text area, on the server side I recived twice of that non-ascii character..
for example, in the text field I entered following string:
------> This is text in tex field �ƒ
On the server side, I get the following:
------> This is text in tex field �ƒ�ƒ
Please notice, twice non ascii character.. :(
I don't know how to resolve this.. Any help will be greatly appricated..
Thanks,
AjayI changed the <form> in the jsp to div and its working fine. I do not need to have comments in JavaScript funcion() anymore. I don't know why that made the difference though? According to:
http://www.w3schools.com/tags/tag_form.asp
The <form> tag is used to create an HTML form for user input.
The <form> element can contain one or more of the following form elements:
<input>
<textarea>
<button>
<select>
<option>
<optgroup>
<fieldset>
<label>
An HTML form is used to pass data to a server.
I do have <button> and also send the data - the value of checkboxes - to server. So I think it should also work with <form>.
Please let me know if you have any idea. Thanks. -
GR amount is not showing the correct value
Hi ,
there are is a GR with for quantity 100 and movement type 101.
agian there is one more GR with mvtype 122 with quantity 20.the amount in the PO is 1 INR for each quantity.So, for the GR with mvtype 122 the amount should be 20 but it is showing lesser amount than 20.
I see there are several Invoices and credit memos posted for the PO but the quantity and price are OK for them.
Note that there are no subsequent credit memos.
what could be the problem?
Please provide detialed explanation/solution as i am quite new in this area !!!
Regards,
Sauravhi,
Please check if the price type of the material is MAP.
Please check if the 122 moment material document is with any price differrance .
Please check the postings of invoices is before the GR.
In general if the invoice is posted before the GR and the price is differrant in the PO and in the MAP of material, system changes to new MAP.and accordingly the postings will take place.
Please carefully go through the PO history and write down the postings happened in the chronalogical order.so that for the analysis it will be easy.
Please check the accounting documents created for MIRO/MIGO so that if there exists any price differance, to which account it posted ( to stock account or PRD account)If it posts to the stock accounts definitly the MAP changes.
Please post the postings happened so that a better anaysis can be given.
Regards, -
Profit and Loss Statement not reporting the correct values
I am running the annual P&L report with posting dates dates of 01-01-09 - 09-30-09 and using Year-to-Date in the second column. When I run this report one of the accounts should as of 09-30-09 reflect a balance of $145,831.52 but the report is showing $1,086,801.39. The actual amount in that G\L account as of today is $162,849.90.
Why is it reporting such a large amount when I run the report?
Thanks, JeffVersion 2007, PL 42.
We are running the report with using Posting Date, dates are 01-01-09 to 09-30-09, Chart of Accounts Template, nothing checked in Display in Report, Display in First Column is Local Currency, Annual Report, Display in Second Column is Balance for Comparison>Year-to-Date and we have chosen none of the options on the right side of the criteria box.
Thanks, Jeff -
The parameter 'host_name_full' of ICM not showing the right value
Hi ,
The parameter 'host_name_full' is not showing the correct value.
It is still showing the value as fully qualified domain name, where as we have reverted the setting some time back .
can anyone let me knwo from where does it pick up the value from .
and how can i Edit the value to show the correct value
Thanks
NikhilHi Nikhil,
Check this 2 links will be useful to u r query...
http://help.sap.com/saphelp_nw04/helpdata/en/e7/7af83b0255a206e10000000a11402f/content.htm
http://www.basisconsultant.com/modules.php?name=Content&pa=showpage&pid=12
Regards,
Sridhar -
i just upgraded to iOS5. I did not receive the info in my email to activate the icloud account. My email adress is not the same as my Apple id, but my correct email adress is indicated in my account and in the msg indicating to check...
Start here, change your country if necessary and go to manage your account and request another email.
-
How can I delete my iCloud account which I do not remember anything about the information that I entered about 4 years ago. It always asks my birth date but it seems I did not enter my correct date how can I bypass this question???
You cannot delete the account from the server (partly to prevent the username from becoming available again and some-one else using it to pretend to be you).. Having disengaged your devices from it, go to http://icloud.com and delete any data in there such as contacts and calendars. Then just ignore it.
-
My wife's iTunes used ID will not work. Tried resetting the password, but email was not received. Tried using personal questions method, but would not accept the correct date of birth, so could not go any further. Has her iTunes ID been hacked? How can I fix this?
Thanks for that advice @randers4.
I linked through and submitted my info as a "topic not covered" in the iCloud section. After entering the serial number of my MBP it turns out I wasn't eligible for technical support (though I don't think this is hardware related support) and the final suggestion was to take my computer into an Apple store. I called my local Apple reseller and asked for assistance. The customer service rep was very nice but unable to help, so suggested I call Apple Support on 1300 321 456. I did so and, again, spoke to two very polite and helpful customer service people (I was transferred to security services). I didn't have to be on hold to speak to either rep for more than a few seconds! After trying a few different things, he worked out what was happening...
So, to cut a long story short, to solve the problem in my OP, all I had to do was log out of iCloud in my System Preferences and log back in using my current Apple ID. [Edited to add that I had to sign out of everything I was currently signed in to with my Apple ID before logging out and in again.]
Problem solved!
Message was edited by: NotBaconBits -
BC Ecommerce SOAP Error: Server did not recognize the value of HTTP Header SOAPAction
I am trying to add a product to an ecommerce site with this soap action: Product_UpdateInsert
I have followed this very brief instruction: https://jollyrogers.worldsecuresystems.com/catalystwebservice/catalystecommercewebservice. asmx?op=Product_UpdateInsert
I have a html page in a secure area with a jQuery ajax soap script.
I get the this error when I run the script:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Server did not recognize the value of HTTP Header SOAPAction: https://jollyrogers.worldsecuresystems.com/CatalystDeveloperService/CatalystEcommerceWebse rvice/Product_UpdateInsert.</faultstring><detail /></soap:Fault></soap:Body></soap:Envelope>
I have also tried to add a header with the Soap action with the beforeSend in the ajax call.
This must have been solved before I suppose?
Here is my script:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test SOAP Request</title>
<script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.3.1/jquery.cookie.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.1/underscore-min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone-min.js"></script>
<script type="text/javascript" src="//cdn.worldsecuresystems.com/bcapi/bcapi-0.0.1.min.js"></script>
</head>
<body>
<script>
var wsUrl = "https://jollyrogers.worldsecuresystems.com/catalystwebservice/catalystecommercewebservice. asmx";
var soapRequest =
'<?xml version="1.0" encoding="utf-8"?> \
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> \
<soap12:Body> \
<Product_UpdateInsert xmlns="https://jollyrogers.worldsecuresystems.com/CatalystDeveloperService/CatalystEcommerceWebse rvice"> \
<username>myEmailAdress</username> \
<password>mySecretPassw</password> \
<siteId>1894001</siteId> \
<productList> \
<Products> \
<productCode>ZJAWEyuuyN</productCode> \
<productName>My test product</productName> \
<description>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</description> \
<smallImage>/images/product1/small.jpg</smallImage> \
<largeImage>/images/product1/large.jpg</largeImage> \
<cataloguesArray> \
<string>/Store/</string> \
</cataloguesArray> \
<pricesSaleArray> \
<string>US/19.95,3/17.96,7/16.96</string> \
</pricesSaleArray> \
<pricesRetailArray> \
<string>US/20,5/19,8/20</string> \
</pricesRetailArray> \
<pricesWholesaleArray> \
<string>US/20,5/19,8/20</string> \
</pricesWholesaleArray> \
<wholesaleTaxCodeArray> \
<string>US/0.00</string> \
</wholesaleTaxCodeArray> \
<taxCodeArray> \
<string>GB/VAT</string> \
</taxCodeArray> \
<groupProducts> \
<string>580H0036BL</string> \
<string>ACAI60</string> \
<string>ABC-123</string> \
</groupProducts> \
<groupProductsDescriptions> \
<string>Lorem ipsum dolor sit amet</string> \
<string>consectetur adipisicing elit</string> \
</groupProductsDescriptions> \
<supplierEntityId>1234</supplierEntityId> \
<supplierCommission>0</supplierCommission> \
<weight>30</weight> \
<tags>NEW!</tags> \
<unitType>string</unitType> \
<minUnits>0</minUnits> \
<maxUnits>2</maxUnits> \
<inStock>43</inStock> \
<onOrder>3</onOrder> \
<reOrder>2</reOrder> \
<inventoryControl>true</inventoryControl> \
<canPreOrder>true</canPreOrder> \
<custom1>Text in custom field 1</custom1> \
<custom2>Text in custom field 2</custom2> \
<custom3>Text in custom field 3</custom3> \
<custom4>Text in custom field 4</custom4> \
<popletImages>/images/image1.jpg;/images/image2.jpg;</popletImages> \
<enabled>true</enabled> \
<deleted>false</deleted> \
<captureDetails>true</captureDetails> \
<downloadLimitCount>20</downloadLimitCount> \
<limitDownloadsToIP>0</limitDownloadsToIP> \
<isOnSale>true</isOnSale> \
<hideIfNoStock>true</hideIfNoStock> \
<productAttributes>Size*|5|Y:L||UK/2|US/20,S||UK/1|US/10</productAttributes> \
<isGiftVoucher>false</isGiftVoucher> \
<enableDropShipping>true</enableDropShipping> \
<productWeight>0</productWeight> \
<productWidth>0</productWidth> \
<productHeight>0</productHeight> \
<productDepth>0</productDepth> \
<excludeFromSearch>false</excludeFromSearch> \
<productTitle>My product title</productTitle> \
<cycletypeId>3</cycletypeId> \
<cycletypeCount>-1</cycletypeCount> \
<slug>my-product</slug> \
<hasVariations>true</hasVariations> \
<variations> \
<ProductVariation xsi:nil="true" /> \
<ProductVariation xsi:nil="true" /> \
</variations> \
</Products> \
</productList> \
</Product_UpdateInsert> \
</soap12:Body> \
</soap12:Envelope>';
$.ajax({
type: "POST",
beforeSend: function(xhr){xhr.setRequestHeader('SOAPAction', 'https://jollyrogers.worldsecuresystems.com/CatalystDeveloperService/CatalystEcommerceWebse rvice/Product_UpdateInsert');},
url: wsUrl,
contentType: "text/xml",
dataType: "xml",
data: soapRequest,
success: processSuccess,
error: processError
function processSuccess(data, status, req)
if (status == "success")
alert("Success!");
function processError(data, status, req)
alert("Failed!");
alert(req.responseText + " " + status);
</script>
</body>
</html>This line is a target namespace so it should not be changed: <Product_Retrieve xmlns="http://tempuri.org/CatalystDeveloperService/CatalystEcommerceWebservice"> It is very easy to think that it's a placeholder and that it should be replaced with your own url, which it should not and which will fail.
This works now:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test 7 SOAP Request</title>
<script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script>
</head>
<body>
<script>
var SoapMessage = '<?xml version="1.0" encoding="utf-8"?> \
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> \
<soap12:Body> \
<Product_Retrieve xmlns="http://tempuri.org/CatalystDeveloperService/CatalystEcommerceWebservice"> \
<username>Your Email</username> \
<password>Your password</password> \
<siteId>1894001</siteId> \
<productCode>HHKDKXS5MB</productCode> \
</Product_Retrieve> \
</soap12:Body> \
</soap12:Envelope>';
var url = "https://jollyrogers.worldsecuresystems.com/catalystwebservice/catalystecommercewebservice. asmx";
$.support.cors = true;
$.ajax({
type: "POST",
url: url,
data: SoapMessage,
dataType: "xml",
processData: true,
contentType: "text/xml; charset=\"utf-8\"",
success: function (msg) {
alert("suc: " + msg);
error: function (msg) {
alert("Failed: " + msg);
</script>
</body>
</html> -
Receiver SOAP Adapter Problem-soap fault: Server did not recognize the valu
I have a scenario for service orders using async call : IDOC-XI-SOAP.
I used the XML Spy tool to test the Service order's web services and it works fine. I imported the same WSDL file in XI. When I send a SOAP message from XI, I get a following error in the adapter engine.
<i>MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Server did not recognize the value of HTTP Header SOAPAction: AddUpdateCostObjectLevel1.</i>
Can someone please help me...
Thanks in advance!
MrudulaThis problem is resolved by me by passing the "http://company's URL/AddUpdateCostObjectLevel1" in the SOAP action.
Thanks to all for your input.
Mrudula
Maybe you are looking for
-
When sending calendar invite to "invitee" an old address appears. This guy is literally dead (may he rest in peace) and has same first name as person I send to all the time. So "dead" guy always pops up. Can't find his address to delete anywhere -- n
-
With ios 7 and the iPhone can someone use their phone while also using a text to speech app, such as Speak It or Assistive Chat? These apps are used by people who have difficulty with speech production. Thank you.
-
How to query on tables with certain name?
Hi, I need to programmatically query some logging tables and then generate a report. These logging tables are all named E$_*. These E$_* tables have some common columns and some non-common columns. I don't know how many tables and what their full nam
-
What are plans for future of Dreamweaver
An associate claims he attended a recent Adobe conference that indicated Adobe was droping future development of DW and concentrating on replacing it with Muse. Any truth to this?
-
Dear colleagues, I'm having an issue with transaction J1AI, with just some assets. The user is trying to run the asset revaluation (inflation), with key date 31.01.2010, and for some assets the program shows the message "Asset 000200000019 0000 has a