Unexpected character content when calling getFolderResponse
When I call getFolderResponse on shared folder I get an exception:
deserialization error: XML reader error: unexpected character content: "[email protected]"
at com.sun.xml.rpc.client.StreamingSender._handleRunt imeExceptionInSend(StreamingSender.java:331)
at com.sun.xml.rpc.client.StreamingSender._send(Strea mingSender.java:313)
at com.novell.groupwise.ws.GroupWisePortType_Stub.get FolderRequest(GroupWisePortType_Stub.java:3858)
Caused by: deserialization error: XML reader error: unexpected character content: "[email protected]"
at com.sun.xml.rpc.encoding.literal.LiteralObjectSeri alizerBase.deserialize(LiteralObjectSerializerBase .java:128)
at com.novell.groupwise.ws.NameAndEmail_InterfaceSOAP Serializer.doDeserialize(NameAndEmail_InterfaceSOA PSerializer.java:84)
at com.sun.xml.rpc.encoding.InterfaceSerializerBase.d eserialize(InterfaceSerializerBase.java:118)
at com.novell.groupwise.ws.SharedFolder_LiteralSerial izer.doDeserialize(SharedFolder_LiteralSerializer. java:310)
at com.sun.xml.rpc.encoding.literal.LiteralObjectSeri alizerBase.internalDeserialize(LiteralObjectSerial izerBase.java:216)
at com.sun.xml.rpc.encoding.literal.LiteralObjectSeri alizerBase.deserialize(LiteralObjectSerializerBase .java:124)
at com.novell.groupwise.ws.Folder_InterfaceSOAPSerial izer.doDeserialize(Folder_InterfaceSOAPSerializer. java:72)
at com.sun.xml.rpc.encoding.InterfaceSerializerBase.d eserialize(InterfaceSerializerBase.java:118)
at com.novell.groupwise.ws.GetFolderResponse_LiteralS erializer.doDeserialize(GetFolderResponse_LiteralS erializer.java:54)
at com.sun.xml.rpc.encoding.literal.LiteralObjectSeri alizerBase.internalDeserialize(LiteralObjectSerial izerBase.java:216)
at com.sun.xml.rpc.encoding.literal.LiteralObjectSeri alizerBase.deserialize(LiteralObjectSerializerBase .java:124)
at com.novell.groupwise.ws.GroupWisePortType_Stub._de serialize_getFolderRequest(GroupWisePortType_Stub. java:6396)
at com.novell.groupwise.ws.GroupWisePortType_Stub._re adFirstBodyElement(GroupWisePortType_Stub.java:543 6)
at com.sun.xml.rpc.client.StreamingSender._send(Strea mingSender.java:228)
... 6 more
In xml I can see only one place with that string: <gwt:owner>username.mypostoffice.mydomain@company. com</gwt:owner>
Any suggestion what to do with this problem?
The owner element changed format. You have to have a consistent
jar file with later POA's.If you have an 8.0.x POA, you need
to recompile the GWWS jar file. (You can't use the original.)
Preston
>>> On Friday, October 15, 2010 at 2:36 AM, testowy
email<[email protected]> wrote:
> When I call getFolderResponse on shared folder I get an exception:
>
> deserialization error: XML reader error: unexpected character content:
> "[email protected]"
> at
>
com.sun.xml.rpc.client.StreamingSender._handleRunt imeExceptionInSend(Streami
> ngSender.java:331)
> at
> com.sun.xml.rpc.client.StreamingSender._send(Strea mingSender.java:313)
> at
>
com.novell.groupwise.ws.GroupWisePortType_Stub.get FolderRequest(GroupWisePor
> tType_Stub.java:3858)
> ..
> Caused by: deserialization error: XML reader error: unexpected
> character content: "[email protected]"
> at
>
com.sun.xml.rpc.encoding.literal.LiteralObjectSeri alizerBase.deserialize(Lit
> eralObjectSerializerBase.java:128)
> at
>
com.novell.groupwise.ws.NameAndEmail_InterfaceSOAP Serializer.doDeserialize(N
> ameAndEmail_InterfaceSOAPSerializer.java:84)
> at
>
com.sun.xml.rpc.encoding.InterfaceSerializerBase.d eserialize(InterfaceSerial
> izerBase.java:118)
> at
>
com.novell.groupwise.ws.SharedFolder_LiteralSerial izer.doDeserialize(SharedF
> older_LiteralSerializer.java:310)
> at
>
com.sun.xml.rpc.encoding.literal.LiteralObjectSeri alizerBase.internalDeseria
> lize(LiteralObjectSerializerBase.java:216)
> at
>
com.sun.xml.rpc.encoding.literal.LiteralObjectSeri alizerBase.deserialize(Lit
> eralObjectSerializerBase.java:124)
> at
>
com.novell.groupwise.ws.Folder_InterfaceSOAPSerial izer.doDeserialize(Folder_
> InterfaceSOAPSerializer.java:72)
> at
>
com.sun.xml.rpc.encoding.InterfaceSerializerBase.d eserialize(InterfaceSerial
> izerBase.java:118)
> at
>
com.novell.groupwise.ws.GetFolderResponse_LiteralS erializer.doDeserialize(Ge
> tFolderResponse_LiteralSerializer.java:54)
> at
>
com.sun.xml.rpc.encoding.literal.LiteralObjectSeri alizerBase.internalDeseria
> lize(LiteralObjectSerializerBase.java:216)
> at
>
com.sun.xml.rpc.encoding.literal.LiteralObjectSeri alizerBase.deserialize(Lit
> eralObjectSerializerBase.java:124)
> at
>
com.novell.groupwise.ws.GroupWisePortType_Stub._de serialize_getFolderRequest
> (GroupWisePortType_Stub.java:6396)
> at
>
com.novell.groupwise.ws.GroupWisePortType_Stub._re adFirstBodyElement(GroupWi
> sePortType_Stub.java:5436)
> at
> com.sun.xml.rpc.client.StreamingSender._send(Strea mingSender.java:228)
> ... 6 more
>
> In xml I can see only one place with that string:
> <gwt:owner>username.mypostoffice.mydomain@company. com</gwt:owner>
>
>
> Any suggestion what to do with this problem?
Similar Messages
-
Deserialization error: XML reader error: unexpected character content:
Hi,
I'm just learning to write web services. I pasted the service and it seems to work.
It's code is :
package server;
import javax.jws.WebService;
public class HelloImpl {
* @param name
* @return Say hello to the person.
public String sayHello(String name) {
return "Hello, " + name + "!";
}I wired the service using spring, following the tutorial :
public class HellowsImpl {
String name;
public HellowsImpl() {
private Hellows service;
public void setService(Hellows service) {
this.service = service;
public void sayHi() {
try {
service.sayHello(name);
} catch (RemoteException e) {
// TODO
public Hellows getService() {
return service;
public void setName(String name) {
this.name = name;
}But when I try this : HellowsImpl service ;
service=(HellowsImpl)ac.getBean("hellowsclient");
service.sayHi();I get the exception : Caught exception while handling request: deserialization error: XML reader error: unexpected character content: "fd"
Where might be the problem?Hi, I am also facing this error while trying to create "Dynamic Proxy Client"
I am accessing the WS method like this
String UrlString = "http://localhost:1559/DynamicProxy/DProxy?WSDL";
String nameSpace = "urn:DProxy/wsdl";
String serviceName = "DProxy";
String port = "DProxySEIPort";
URL serviceUrl = new URL(UrlString);
ServiceFactory serviceFactory = ServiceFactory.newInstance();
Service service = serviceFactory.createService(serviceUrl,new QName(nameSpace,serviceName));
dproxy.DProxySEI myProxy = (dproxy.DProxySEI)service.getPort(new QName(nameSpace,port),dproxy.DProxySEI.class);
String message = myProxy.sayHello("rajeev");
WSDL File content :
<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:DProxy/wsdl" xmlns:ns2="urn:DProxy/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="DProxy" targetNamespace="urn:DProxy/wsdl">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:DProxy/types" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:DProxy/types">
<complexType name="sayHello">
<sequence>
<element name="String_1" type="string" nillable="true"/></sequence></complexType>
<complexType name="sayHelloResponse">
<sequence>
<element name="result" type="string" nillable="true"/></sequence></complexType>
<element name="sayHello" type="tns:sayHello"/>
<element name="sayHelloResponse" type="tns:sayHelloResponse"/></schema></types>
<message name="DProxySEI_sayHello">
<part name="parameters" element="ns2:sayHello"/></message>
<message name="DProxySEI_sayHelloResponse">
<part name="result" element="ns2:sayHelloResponse"/></message>
<portType name="DProxySEI">
<operation name="sayHello">
<input message="tns:DProxySEI_sayHello"/>
<output message="tns:DProxySEI_sayHelloResponse"/></operation></portType>
<binding name="DProxySEIBinding" type="tns:DProxySEI">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="sayHello">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/></input>
<output>
<soap:body use="literal"/></output></operation></binding>
<service name="DProxy">
<port name="DProxySEIPort" binding="tns:DProxySEIBinding">
<soap:address location="http://localhost:1559/DynamicProxy/DProxy" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/></port></service></definitions>
and Here is my SEI Implementation class
public java.lang.String sayHello(String name) throws java.rmi.RemoteException {
String message = "hi.."+name+"..How r u";
return message;
Can any one help me plz...
Thanks in advance.. -
Can anyone help me out? This happens when i try and submit an epub file, i haven't had this before. "iTunes producer error 3000 character content of element "file_name" invalid."
This is the full messageYou really need to put your codes between the
[\code] tags
see http://forum.java.sun.com/features.jsp#Formatting
for more infoCode tags might make it look a little better, but there's still too darn much code. We're volunteers, after all. It'd be a lot of work to review all of this stuff. Can you demonstrate your problem with something smaller? Learn out how to do a combo box with just a page or two and then appy that to your big problem. That's how I'd do it. - MOD -
MSS - Business Event Details - Error Unexpected Exception when Calling RFC
Dear Experts,
Manager is getting the Error "Unexpected Exception when Calling RFC from Profile Application 'Business Event' when he tries to get the Training history of ONE employee in MSS. However, he is getting the details for the other employees of his department.
Any inputs on this?
Thank you.I believe it is our custom iView that is incorrect.
-
Hi all,
at a customer’s site I’ve a problem with a fresh installation of Backup Exec 2014. Every backup (full or incremental) always reports the following
error: “An unexpected error occurred when cleaning up snapshot volumes. Confirm that all snapped volumes are correctly re-synchronized with the original volumes.”.
It’s not a Backup Exec problem itself, also backups using “Windows Server Backup” failing with the same error.
On this site I have three servers; the error is only generated for one of them. Here’s a short overview:
Server1: Windows Server 2012 R2, latest patchlevel, physical machine, Domain Controller and Fileserver. Backup Exec is installed on this machine,
backup is written directly to SAS tape loader. There error is generated on this server.
Server2: Windows Server 2008 R2, latest patchlevel, virtual machine, running on Citrix Xen Server 6.2. Used for remote desktop services, no errors
on this server.
Server3: Windows Server 2012 R2, latest patchlevel, virtual machine, database server with some SQL Instances, no errors on this server.
As I said, error is reported only on server1, no matter if it is a full or an incremental backup. During the backup I found the following errors
is the event log (translated from a german system):
Event ID: 12293
Volume Shadow Copy Service error: Error calling a routine on a Shadow Copy Provider. "{89300202-3cec-4981-9171-19f59559e0f2}" an error occured. Routinedetails Error calling Query(). [0x80042302] [hr = 0x80042302, unexpected component error of
the Volume Shadow Copy Service.
Process:
Volume Shadow Copy polling
Volume Shadow Copy delete
Context:
Executioncontext: Coordinator
Executionkontext: Coordinator
And
Event ID: 8193
Volume Shadow Copy Service error: Unexpected error calling Routine "IVssCoordinator::Query" hr = 0x8004230f, Unexpected error Volume Shadow Copy Service Provider
Process:
Volume Shadow Copy delete
Context:
Executioncontext: Coordinator
There are some articles about this error in the knowledge base or web which does not help or do not apply to my environment for example:
http://www.symantec.com/business/support/index?page=content&id=TECH38338&actp=search&viewlocale=en_US&searchid=1423724381707
What I already have tried:
Disabled Antivirus during the whole backup
Installed latest Service Pack for Backup Exec
Rebooted the server
vssadmin list writers do not show any errors
consult eventid.net for other possible solutions
no limits set for vaa
Anymore ideas from you guys?
Best regards,Hi Shaon,
vssadmin list providers gave the following output:
vssadmin list providers
vssadmin 1.1 - Verwaltungsbefehlszeilenprogramm des Volumeschattenkopie-Dienstes
(C) Copyright 2001-2013 Microsoft Corp.
Anbietername: "Microsoft File Share Shadow Copy provider"
Anbietertyp: Dateifreigabe
Anbieterkennung: {89300202-3cec-4981-9171-19f59559e0f2}
Version: 1.0.0.1
Anbietername: "Microsoft Software Shadow Copy provider 1.0"
Anbietertyp: System
Anbieterkennung: {b5946137-7b9f-4925-af80-51abd60b20d5}
Version: 1.0.0.7
Unfortunately theres not Symantec VSS Provider listed.
Best regards,
Christoph -
How do I accurately detect overset contents when using tables?
Hello, all. I am familiar with how to detect overset contents of a text frame, namely:
if ( myTextFrame.parentStory.contents.length > myTextFrame.contents.length) {
alert('There is overset text');
} else {
alert('There is no overset text');
However, the contents of my story are three tables, rather than text. Each table contains dozens of cells filled with text. Yet the "length" property of the frame is only 3! How do I accurately read the length of the content given that most of it is in tables so that I can test for overset text?
In case it helps anyone, a more detailed description is:
If there are three tables in the story, and only 2 fit on a page-sized text frame, the length property of that frame will be 2. Kind of weird, but not a problem yet.
In the same scenario, however, if the third table BEGINS on the page but spills over (creating an overset situation), the length property of that frame will be 3 -- causing the test think there is NO overset text! InDesign simply sees 3 characters in the story, and only 3 characters on that page.
When I look at the "contents" property of the story, it just reads 3 squarish characters. They're obviously some kind of special character. InDesign apparently takes the concept of "table" and just writes a placeholder character for it in the "contents" property.
Am I going to have to create some routine to loop through every cell of every table and somehow add it all up to get a proper length? How do I just test for overset-ness?
Thank you!Actually, Harbs, I'd already just burst my own bubble by running additional tests! So I have to revise my whole set of instructions.
IGNORE EVERYTHING I WROTE ABOVE.
Here is the revised solution, based on the initial solution proposed by Dirk and then revised to work around Harbs bug discoveries. It is essentially a corrected version of Dirks line. Instead of saying:
app.activeDocument.stories.item(0).tables.lastItem().cells.lastItem().insertionPoints.last Item().parentTextFrames.length
you would say:
app.activeDocument.stories.item(0).tables.lastItem().cells.lastItem().parent.parent.insert ionPoints.lastItem().parentTextFrames.length
That's just the short version. Here's the full code and explanation:
Summary of problem:
InDesign treats a table as a single special character, so it does not accurately report the "overflows" property of a text frame containing a table which spills beyond its margins. A text frame will show as not overflowing (i.e. myTextFrame.overflows will return false) if its final table simply begins within its margins--even if most of the table spills well beyond the text frame. So a ten-page table that starts on page one will only considered by InDesign scripting as being one character long (and therefore shown as fitting completely in first frame even when it doesn't). The solution for this, as discovered by Dirk, is to test whether the final cell of the table is in an overflow area.
The solution:
You cannot just test whether the cell is overflowing, or whether the parent text frame is overflowing, because InDesign will misreport them and their contents when they are in an overflow area, making it impossible to distinguish a cell overflow from a containing-text-frame overflow. So we just check the parent text frame of the final insertion point, which is after the last table, and see if its length is zero (meaning has no visible contents). If so, the insertion point is in an overflow area!
So the test to run is this:
var finalCell = myTextFrame.parentStory.tables.lastItem().cells.lastItem();
if(finalCell.parent.parent.insertionPoints.lastItem().parentTextFrames.length==0) { ...your code here... }
Of course you'll replace myTextFrame with the one you're dealing with in your own script.
Example usage:
This is how I implemented this in my own script. I have an array of text frames which I pass to this function, and by the time I call the function this array contains only one element, just the first large text frame (with my long table already placed inside it). It also relies on a helper function drawTableFrame which is simple and I'll leave out; it just adds a text frame to the new page and sizes it. And of course myDocument I've long ago set to be the document I'm working in.
// Takes array of text frames, checks for overflow, and adds pages as needed
function addOverflowPages(whichFrameArray) {
var i = 0;
var finalCell = whichFrameArray[0].parentStory.tables.lastItem().cells.lastItem();
while (finalCell.parent.parent.insertionPoints.lastItem().parentTextFrames.length==0) {
i++;
var newpage = myDocument.pages.add(); // add new page
whichFrameArray.push(drawTableFrame(newpage)); // draw new frame
whichFrameArray[i].previousTextFrame = whichFrameArray[i-1]; // link new frame to previous one
I hope this one is solid at last. I have tested it with empty final cell, full final cell, partially-overflowing final cell, and totally-overflowing final cell, and they all work for me. Thanks again to everyone for pointing me in the right direction! -
Hi,
I have a MBP 13' Late 2011 and Yosemite 10.10.2 (14C1514).
Until yesterday, I was using Garmin ConnectIQ SDK and all was working fine.
Yesterday, I've updated my system with latest security updates and Xcode updates too (Version 6.2 (6C131e)).
Since, I can't launch the ConnectIQ simulator app, I have this message in console :
8/04/2015 15:19:04,103 mds[38]: There was an error parsing the Info.plist for the bundle at URL Info.plist -- file:///Volumes/Leto/connectiq-sdk-mac-1.1.0_2/ios/ConnectIQ.bundle/
The data couldn’t be read because it isn’t in the correct format.
<CFBasicHash 0x7fa64f44e9a0 [0x7fff7dfc7cf0]>{type = immutable dict, count = 2,
entries =>
0 : <CFString 0x7fff7df92580 [0x7fff7dfc7cf0]>{contents = "NSDebugDescription"} = <CFString 0x7fa64f44f0a0 [0x7fff7dfc7cf0]>{contents = "Unexpected character b at line 1"}
1 : <CFString 0x7fff7df9f5e0 [0x7fff7dfc7cf0]>{contents = "kCFPropertyListOldStyleParsingError"} = Error Domain=NSCocoaErrorDomain Code=3840 "The data couldn’t be read because it isn’t in the correct format." (Conversion of string failed.) UserInfo=0x7fa64f44eda0 {NSDebugDescription=Conversion of string failed.}
I have looked at this file and it looks like a binary plist
bplist00ß^P^V^A^B^C^D^E^F^G^H
^K^L^M^N^O^P^Q^R^S^T^U^V^W^X^Y^Z^[^\^]^^^_ !"$%&'()'+,^[\CFBundleNameWDTXcodeYDTSDKName_^P^XNSHumanReadableCopyrightZDTSDKBuild_^P^YCFBundleDevelopmentRegion_^P^OCFBundleVersi on_^P^SBuildMachineOSBuild^DTPlatformName_^P^SCFBundlePackageType_^P^ZCFBundleShortVersionString_^P^ZCFBundleSupportedPlatforms_^P^]CFBundleInfoDictionaryVersion_^P^RCFBundleE xecutableZDTCompiler_^P^PMinimumOSVersion_^P^RCFBundleIdentifier^UIDeviceFamily_^P^QDTPlatformVersion\DTXcodeBuild_^P^QCFBundleSignature_^P^ODTPlatformBuildYConnectIQT0611[iph oneos8.1o^P-^@C^@o^@p^@y^@r^@i^@g^@h^@t^@ ^@©^@ ^@2^@0^@1^@5^@ ^@G^@a^@r^@m^@i^@n^@.^@ ^@A^@l^@l^@ ^@r^@i^@g^@h^@t^@s^@ ^@r^@e^@s^@e^@r^@v^@e^@d^@.V12B411RenQ1V14C109Xiphoneos TBNDLS1.0¡#XiPhoneOSS6.0YConnectIQ_^P"com.apple.compilers.llvm.clang.1_0S8.1_^P^Tcom.garmin.ConnectIQ¡*^P^AW6A2008aT????^@^H^@7^@D^@L^@V^@q^@|^@<98>^@ª^@À^@Ï^@å^A^B^A^_^A?^AT^ A_^Ar^A<87>^A<96>^Aª^A·^AË^AÝ^Aç^Aì^Aø^BU^B\^B_^Ba^Bh^Bq^Bv^Bz^B|^B<85>^B<89>^B<93>^B¸^B¼^BÓ^BÕ^B×^Bß^@^@^@^@^@^@^B^A^@^@^@^@^@^@^@-^@^@^@^@^@^@^@^@^@^@^@^@^@^@^Bä
I guess it is a normal format but my system seems to be unable to read binary plist ?
I tried some stuff with plutil
plutil -lint Info.plist
Info.plist: Unexpected character b at line 1
Same for convert
plutil -convert xml1 Info.plist
Info.plist: Property List error: Unexpected character b at line 1 / JSON error: JSON text did not start with array or object and option to allow fragments not set.
I also try to download a fresh version of the connectIQ SDK and no changes.
Any idea ?
ThanksStep by step, how did you arrive at seeing this agreement?
-
Error when calling a package function
any insight why my object is erroring out when calling a function. the error is
oracle.apps.fnd.framework.OAException: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at line 1
it errors out when the cs.execute() is . is it the placement ? thanks for the help....
then pkg func is xxx.get_log
Get_Log(rmode IN NUMBER , doc_type IN VARCHAR2 DEFAULT 'TEL', doc_id IN VARCHAR2 DEFAULT NULL,
doc_num IN VARCHAR2 DEFAULT NULL -- , p_out out varchar2 --
RETURN varchar2 IS....
the co
Serializable paramDocLocatorParamList [] = {paramRMODE, paramDOC_TYPE, paramDOC_ID, paramDOC_NUM, p_out };
OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean);
OADBTransaction dbtrans;
OAViewObject docLocator = (OAViewObject)am.findViewObject("DocLocatorVO1");
rtxt0.setValue(pageContext, "here it is" + am.invokeMethod("getHTMLString", paramDocLocatorParamList));
docLocator.executeQuery();
// am.invokeMethod("getHTMLString", paramDocLocatorParamList);
the impl
public String getHTMLString ( String paramRMODE, String paramDOC_TYPE, String paramDOC_ID, String paramDOC_NUM, String p_out )
System.out.println("Entering The AM Impl");
CallableStatement st = null;
OADBTransaction txn = (OADBTransaction)getDBTransaction();
Connection conn = txn.getJdbcConnection();
String sql = " BEGIN :5 := test_proc.get_log(:1, :2, :3, :4 ); END; ";
CallableStatement cs = txn.createCallableStatement(sql,1);
String ErrorExist = "";
String getHTML = "";
try
cs.setString(1, paramRMODE);
cs.setString(2, paramDOC_TYPE);
cs.setString(3, paramDOC_ID);
cs.setString(4, paramDOC_NUM);
cs.setString(5,p_out); // --param
/* cs.registerOutParameter(1,Types.CHAR);
cs.registerOutParameter(2,Types.CHAR);
cs.registerOutParameter(3,Types.CHAR);
cs.registerOutParameter(4,Types.CHAR);*/
cs.registerOutParameter(5,Types.CHAR);
cs.execute();
getHTML = cs.getString(5 ) ;
/* System.out.println("getHTML is " + getHTML );
cs.close();
// if ( "E".equals(ErrorExist))
/// throw new OAException ("Payment Request Is Already Cancelled" );
catch (SQLException sqle)
try { cs.close(); }
catch (Exception e) {}
throw OAException.wrapperException(sqle);
String doctype = paramDOC_TYPE;
String docnum = paramDOC_NUM;
String html ;
System.out.println( "paramDOC_TYPE in IMPL is " + doctype) ;
System.out.println( "paramDOC_Numb in IMPL is " + docnum) ;
return getHTML;resolved.....
public String getHTMLString (String p_out , String rmode, String doc_type, String doc_id, String doc_num )
System.out.println("");
System.out.println("Entering The AM Impl");
// System.out.println("Passing getDocAbbrForHTML in IMPL -------> " +getDocAbbrForHTML );
// System.out.println("Passing paramDOC_NUM in IMPL -------> " + paramDOC_NUM );
System.out.println("Passing getDocAbbrForHTML in IMPL -------> " +doc_type );
System.out.println("Passing paramDOC_NUM in IMPL -------> " + doc_num );
CallableStatement st = null;
OADBTransaction txn = (OADBTransaction)getDBTransaction();
Connection conn = txn.getJdbcConnection();
String sql = " BEGIN :1 := test_proc.get_log(:2, :3, :43, :5 ); END; ";
CallableStatement cs = txn.createCallableStatement(sql,1);
String ErrorExist = "";
String getHTML = "";
try
cs.setString(2, rmode);
cs.setString(3, doc_type);
cs.setString(4, doc_id);
cs.setString(5, doc_num);
cs.registerOutParameter(1,Types.VARCHAR);
cs.execute();
getHTML = cs.getString(1 ) ; -
"Invalid Character" error when executing a 13KB query with ADO
Hello
I want to execute a query using an ADO Recordset using the Open method. When calling this method, an ORA-911 "Invalid Character" raises. I can say that the SQL runs fine, because using the SQL*Plus utility it works.
I have a 11g client installed, and the target database is in a 9i server; my PC uses WinXP SP2.
What could be wrong?
Thanks a lot.Well there's a 32K limit in Oracle. (But it can be overcome using dynamic sql).
You basically end up putting the text in an associative_array which has to be sequential.
There should be info on askom.oracle.com as I initially posted the question there.
13KB of characters is a lot of query text, and it could easily be the provider.
Try the microsoft ADO provider and see if you get the same problem.
There was another company which had a provider (which you had to pay for) , can't remember its name , but it seemed to be the best.
I would seriously question why you need to pass a 13KB string to oracle though. -
401 Unauthorized Error When calling a SharePoint REST web service from SharePoint 2013 Workflow
We have our Workflow Manger installed on the same server as our SharePoint 2013 WFE development environment. When creating a SharePoint 2013 Workflow all Calls to a SharePoint 2013 REST web service results in a 401 Unauthorized error.
As an example I created a simple workflow that should return a JSON result. The REST Url returns the results in the browser without error.
Set Variable:webServiceUrl to https://<hostnamedsitecollection>/_vti_bin/client.svc/web/lists/getbytitle('ISR%20Approvers')/Items?$select=Title&$filter=Title%20eq%20%27General%27
then Build{...} Dictionary (Output to Variable:requestHeaders)
then Call [%Variable:webServiceUrl%] HTTP web service with request (ResponseContent to Variable:responseContent |ResponseHeaders to responseHeaders | ResponseStatusCode to Variable:responseCode)
The RequestHeader is set to the requestHeaders variable though the web service call properties
then Log Variable:responseCode to the workflow history list
After manually running the workflow in SharePoint on a list item in the ISR Approvers list it Logs "Unauthorized" in the Workflow History Log. It does this with every SharePoint REST web service call that I have tried through the workflow.
It doesn't have anything to do with the Workflow Manger being installed on the same machine as the SharePoint WFE does it?
Thank You for any insightHi,
According to your post, my understanding is that you had 401 Unauthorized Error when calling a SharePoint REST web service from SharePoint 2013 Workflow.
Please make sure you use the ‘Call HTTP Web Service’ correctly.
You can enter the URL into the brower to check whether it is correctly.
You need to
create the Request header requestHeaders
using a Dictionary:
Accept : application/json;odata=verbose
Content-Type : application/json;odata=verbose
To associate the
requestHeaders variable, select the Call action
property, set the RequestHeaders property to
requestHeaders.
Please refer to the following articles:
Working with Web Services in SharePoint 2013 Workflows using SharePoint Designer 2013
Calling the SharePoint 2013 Rest API from a SharePoint Designer
Workflow
In addtion, you need to make sure you install the workflow manager correctly.
More information:
Install and configure workflow for SharePoint Server 2013
Known Issues in Workflow Manager 1.0
Troubleshooting Workflow Manager 1.0 Management and Execution
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
Eliminating logon when calling R/3 transaction via BSP
Is it possible to eliminate logon when calling SAP R/3 tcode via BSP. I run
http://<FQDN>:<port>/sap/bc/gui/sap/its/webgui/!?client=%3c100%3e&transaction=SE80
but have to login each time. I could embed my username/pwd on the url string, but is there another method?
I also thought about using the URL iView parameters (Mapped User, Mapped Password) within Property Editor, but content admins will be able to see username and password when opening the iview. Any suggestions?
Regards,
JamesI figured this one out.
Regards,
James -
Error when call webservice on servlet
Hi All,
I'm having a problem when calling webservice inside the servlet on the WebLogic environment.
My code:
* Webservice:
package ws;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
@WebService
public class getData {
public getData() {
super();
@WebMethod
public String getHello() {
return "HELLO HELLO";
private Connection getConn() throws NamingException, SQLException {
InitialContext ic = new InitialContext();
DataSource ds = (DataSource)ic.lookup("jdbc/hnxwebsite");
//System.out.println("POOL !!!!");
Connection con = ds.getConnection();
con.setAutoCommit(false);
return con;
@WebMethod
public String getIndexData(@WebParam(name="param") String param) {
StringBuffer sb = new StringBuffer();
String sql =
"Select * From idx_index_info iii where iii.index_code= ?";
Connection con = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
con = getConn();
pstmt = con.prepareStatement(sql);
pstmt.setString(1, param);
rs = pstmt.executeQuery();
int columnCount = rs.getMetaData().getColumnCount();
Object val;
while (rs.next()) {
for (int i = 1; i < columnCount; i++) {
//System.out.println(i);
val = rs.getObject(i);
if (val != null)
sb.append(val.toString() + "\n");
} catch (SQLException e) {
e.printStackTrace();
} catch (NamingException e) {
e.printStackTrace();
} finally {
try {
if (rs != null)
rs.close();
if (pstmt != null)
pstmt.close();
if (con != null)
con.close();
} catch (Exception e) {
e.printStackTrace();
String str = sb.toString();
int len = str.length();
//System.out.println("LENGTH >>>>"+len);
return str;
public static void main(String[] arg) {
Date date = new Date();
System.out.println(date.toGMTString());
getData gd = new getData();
System.out.println(date.toGMTString());
//System.out.println(gd.getIndexData("ACB"));
* WebClient:
package hnx;
import java.util.Date;
import java.util.Map;
import javax.xml.namespace.QName;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Dispatch;
import javax.xml.ws.Service;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.soap.SOAPBinding;
public class wsClient {
public wsClient() {
super();
public String procWeb() {
String strmsg = null;
try {
QName serviceName = new QName("http://192.168.60.18:7001/","getDataService");
// QName for Port As defined in wsdl.
QName portName = new QName("http://192.168.60.18:7001/","getDataPort");
// //Endpoint Address
String endpointAddress = "http://192.168.60.18:7001/WsIndex/getDataPort?wsdl";
// Create a dynamic Service instance
Service service = Service.create(serviceName);
service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING,
endpointAddress);
// Create a dispatch instance
Dispatch<SOAPMessage> dispatch = service.createDispatch(portName,
SOAPMessage.class, Service.Mode.MESSAGE);
// Use Dispatch as BindingProvider
BindingProvider bp = (BindingProvider) dispatch;
// Optionally Configure RequestContext to send SOAPAction HTTP Header
Map<String, Object> rc = bp.getRequestContext();
rc.put(BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
rc.put(BindingProvider.SOAPACTION_URI_PROPERTY, "http://ws/");
// Obtain a preconfigured SAAJ MessageFactory
MessageFactory factory = ((SOAPBinding) bp.getBinding())
.getMessageFactory();
// Create SOAPMessage Request
SOAPMessage request = factory.createMessage();
// Request Body
SOAPBody body = request.getSOAPBody();
// Compose the soap:Body payload
QName payloadName = new QName("http://ws/", "getIndexData","ns1");
SOAPBodyElement payload = body.addBodyElement(payloadName);
SOAPElement message = payload.addChildElement( "param");
message.addTextNode("HNX302");
request.saveChanges();
// Invoke the endpoint synchronously
System.out.println(message);
SOAPMessage reply = null;
try { // Invoke Endpoint Operation and read response
reply = dispatch.invoke(request);
} catch (WebServiceException wse) {
wse.printStackTrace();
// process the reply
SOAPBody bodyRes = reply.getSOAPBody();
SOAPBodyElement nextSoapBodyElement = (SOAPBodyElement) bodyRes
.getChildElements().next();
SOAPElement soapElement = (SOAPElement) nextSoapBodyElement
.getChildElements().next();
strmsg = soapElement.getValue();
System.out.println("AAA >>"+strmsg);
} catch (Exception wse) {
wse.printStackTrace();
return strmsg;
public static void main(String[] arg) {
wsClient ws = new wsClient();
Date date = new Date();
System.out.println(date.toGMTString());
System.out.println(ws.procWeb());
System.out.println(date.toGMTString());
* Servlet:
package hnx;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.*;
import javax.servlet.http.*;
import ws.GetData;
import ws.GetDataPortClient;
import ws.GetDataService;
public class getIndex extends HttpServlet {
private static final String CONTENT_TYPE = "text/html; charset=UTF-8";
public void init(ServletConfig config) throws ServletException {
super.init(config);
public void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
doGet(request, response);
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
response.reset();
response.flushBuffer();
response.setContentType(CONTENT_TYPE);
PrintWriter out = response.getWriter();
// GetDataService service = new GetDataService();
// GetData getData = service.getGetDataPort();
// String str = getData.getIndexData("HNX302");
// int length = str.length();
// response.setContentLength(length);
wsClient ws = new wsClient();
String str = ws.procWeb();
try {
out.println(str);
} catch (Exception e) {
e.printStackTrace();
out.close();
ERROR: >>>>>[Another instance of the application is running on the server. JDeveloper redeploy the application.]
[Application SClient stopped but not undeployed from Server Instance IntegratedWebLogicServer]
[Running application SClient on Server Instance IntegratedWebLogicServer...]
[03:41:48 PM] ---- Deployment started. ----
[03:41:48 PM] Target platform is (Weblogic 10.3).
[03:41:48 PM] Retrieving existing application information
[03:41:48 PM] Running dependency analysis...
[03:41:48 PM] Deploying 2 profiles...
[03:41:48 PM] Wrote Web Application Module to C:\Users\W7\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\o.j2ee\drs\SClient\sgetDataWebApp.war
[03:41:48 PM] Wrote Enterprise Application Module to C:\Users\W7\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\o.j2ee\drs\SClient
[03:41:49 PM] Redeploying Application...
[03:41:49 PM] Application Redeployed Successfully.
[03:41:49 PM] The following URL context root(s) were defined and can be used as a starting point to test your application:
[03:41:49 PM] http://192.168.9.100:7101/SClient
[03:41:49 PM] Elapsed time for deployment: 1 second
[03:41:49 PM] ---- Deployment finished. ----
Run startup time: 1380 ms.
[Application SClient deployed to Server Instance IntegratedWebLogicServer]
Target URL -- http://127.0.0.1:7101/SClient/getindex
[param: null]
javax.xml.ws.WebServiceException: com.ctc.wstx.exc.WstxIOException: Exceeding stated content length of 228
at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:117)
at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:165)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:101)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:604)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:563)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:548)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:445)
at com.sun.xml.ws.client.Stub.process(Stub.java:248)
at com.sun.xml.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:189)
at com.sun.xml.ws.client.dispatch.DispatchImpl.invoke(DispatchImpl.java:215)
at hnx.wsClient.procWeb(wsClient.java:75)
at hnx.getIndex.doGet(getIndex.java:40)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: com.ctc.wstx.exc.WstxIOException: Exceeding stated content length of 228
at com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:1687)
at com.ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.java:585)
at com.sun.xml.ws.message.saaj.SAAJMessage.writeTo(SAAJMessage.java:396)
at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:114)
... 29 more
Caused by: java.net.ProtocolException: Exceeding stated content length of 228
at weblogic.net.http.ContentLengthOutputStream.write(ContentLengthOutputStream.java:39)
at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:96)
at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
at com.ctc.wstx.sw.BufferingXmlWriter.close(BufferingXmlWriter.java:194)
at com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:1685)
... 32 more
java.lang.NullPointerException
at hnx.wsClient.procWeb(wsClient.java:82)
at hnx.getIndex.doGet(getIndex.java:40)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Can anyone help?
Thanks in advance.
LTThoiI'm no webservices/servlet expert , but can you check the obvious out here -
javax.xml.ws.WebServiceException: com.ctc.wstx.exc.WstxIOException: Exceeding stated content length of 228
at ......
at hnx.wsClient.procWeb(wsClient.java:75)+ // check if you are passign something thats more than 228 chars
at hnx.getIndex.doGet(getIndex.java:40) -
JTextField update problem when called from PropertyChangeEvent
Hi,
I'm trying to create forms that can be dynamically loaded with Class.forname(formName).
Those forms should always inherit some methods that make it easy to pass data to
them and receive data from them. The idea is that the data comes from a table which
sends a hashmap (String column/JTextField-name + String Value pairs) with firePropertyChanged
as soon as a new row is seleceted. The JTextFields in the form are marked with setName("FieldName") that has to correspond to the name of the columns of the table.
My problem is that I can't update the fields in my form when I'm calling getRow(HashMap)
from within propertyChangeEvent but that's necessary to keep the forms flexible.
JTextFieldName.setText(newText) just won't work. But it works when I call getRow(HashMap)
from the constructor. SwingWorker and threads to update the form didn't help.
I don't need to call pack() / update() / repaint() on the JFrame, do I ??
update() / validate() / repaint() etc. didn't work on the JTextField themselves.
Below is the code for one of the test-forms (just a JPanel that is inserted in a frame)
with all of it's methods. Does anybody have a solution to this problem ??
Thanks for taking time for that !!
Benjamin
* testTable.java
* Created on 15. April 2004, 16:12
package viewcontrol.GUI;
* @author gerbarmb
import javax.swing.*;
import java.awt.*;
import java.beans.*;
import java.util.*;
public class testTable extends javax.swing.JPanel
implements
java.awt.event.KeyListener,
java.beans.PropertyChangeListener {
* public static void main(String[] argv) { testTable tt = new testTable();
* JFrame jf = new JFrame(); jf.setContentPane(tt); jf.setVisible(true); }
/** Creates new customizer testTable */
public testTable() {
initComponents();
HashMap hm = new HashMap();
* Only for debugging, to see that the method getRow() works when
* called from the constructor.
hm.put("ttext", "TEst");
this.getRow(hm);
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the FormEditor.
private void initComponents() {//GEN-BEGIN:initComponents
java.awt.GridBagConstraints gridBagConstraints;
jLabel1 = new javax.swing.JLabel();
textIn = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
intIn = new javax.swing.JTextField();
jLabel3 = new javax.swing.JLabel();
numIn = new javax.swing.JTextField();
jLabel4 = new javax.swing.JLabel();
dateIn = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
dateTimeIn = new javax.swing.JTextField();
jLabel6 = new javax.swing.JLabel();
jCheckBox1 = new javax.swing.JCheckBox();
keepValues = new javax.swing.JCheckBox();
jButton1 = new javax.swing.JButton();
setLayout(new java.awt.GridBagLayout());
jLabel1.setText("Text");
add(jLabel1, new java.awt.GridBagConstraints());
textIn.setName("ttext");
textIn.setPreferredSize(new java.awt.Dimension(100, 21));
textIn.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
textInActionPerformed(evt);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridwidth = 2;
add(textIn, gridBagConstraints);
jLabel2.setText("Integer");
add(jLabel2, new java.awt.GridBagConstraints());
intIn.setName("tint");
intIn.setPreferredSize(new java.awt.Dimension(50, 21));
add(intIn, new java.awt.GridBagConstraints());
jLabel3.setText("Number");
add(jLabel3, new java.awt.GridBagConstraints());
numIn.setName("tnum");
numIn.setPreferredSize(new java.awt.Dimension(50, 21));
add(numIn, new java.awt.GridBagConstraints());
jLabel4.setText("Date");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
add(jLabel4, gridBagConstraints);
dateIn.setName("tdate");
dateIn.setPreferredSize(new java.awt.Dimension(50, 21));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
add(dateIn, gridBagConstraints);
jLabel5.setText("DateTime");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 1;
add(jLabel5, gridBagConstraints);
dateTimeIn.setName("tidate");
dateTimeIn.setPreferredSize(new java.awt.Dimension(80, 21));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridy = 1;
add(dateTimeIn, gridBagConstraints);
jLabel6.setText("Bit");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridy = 1;
add(jLabel6, gridBagConstraints);
jCheckBox1.setName("tbit");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridy = 1;
add(jCheckBox1, gridBagConstraints);
keepValues.setText("keep values");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 7;
gridBagConstraints.gridy = 3;
add(keepValues, gridBagConstraints);
jButton1.setText("Send");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 7;
gridBagConstraints.gridy = 2;
add(jButton1, gridBagConstraints);
}//GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
sendRow();
}//GEN-LAST:event_jButton1ActionPerformed
private boolean sendRow() {
java.util.HashMap hm = new java.util.HashMap();
Component[] cs = this.getComponents();
for (int i = 0; i < cs.length; i++) {
if (((Component) cs).getName() != null) {
if (cs[i] instanceof JCheckBox) {
String value = ((JCheckBox) cs[i]).isSelected() ? "1" : "0";
hm.put(cs[i].getName(), value);
} else if (cs[i] instanceof JCheckBox) {
hm.put(cs[i].getName(), ((JTextField) cs[i]).getText());
} // end for
firePropertyChange("rowChanged", null, hm);
return true;
private void getRow(java.util.HashMap hm) {
//if (! this.keepValues.isSelected()) {
Component[] cs = this.getComponents();
for (int i = 0; i < cs.length; i++) {
if (cs[i].getName() != null && hm.containsKey(cs[i].getName())) {
Component component = cs[i];
String componentName = cs[i].getName();
String componentValue = (String) hm.get(component.getName());
if (cs[i] instanceof JTextField) {
// output for debugging
System.out.println("Setting " + cs[i].getName() + " = "
+ componentValue);
((JTextField) component).setText(componentValue);
} else if (cs[i] instanceof JCheckBox) {
// output for debugging
System.out.println("JCheckBox found");
JCheckBox cb = (JCheckBox) component;
boolean selected = (componentValue == null ? false : (componentValue.equals("1")
? true
: false));
((JCheckBox) component).setSelected(selected);
} // end for
/* Uncomment this code snippet to retrieve the text that has been set
for the components (that means JTextFields)
This is just for debugging !
Component[] cs = this.getComponents(); for (int i = 0; i < cs.length;
i++) { if (cs[i].getName() != null) { if (cs[i] instanceof
JTextField) { System.out.println("Value of " +cs[i].getName() + " = " +
((JTextField) cs[i]).getText()); } } } // end for
private void textInActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textInActionPerformed
}//GEN-LAST:event_textInActionPerformed
public void keyPressed(java.awt.event.KeyEvent e) {
if (e.getKeyCode() == java.awt.event.KeyEvent.VK_ENTER) {
sendRow();
public void keyReleased(java.awt.event.KeyEvent e) {
public void keyTyped(java.awt.event.KeyEvent e) {
public void propertyChange(java.beans.PropertyChangeEvent evt) {
if (evt.getPropertyName().equals("newRow")) {
final PropertyChangeEvent finalEvt = evt;
Runnable makeChanges = new Runnable () {
public void run() {
getRow((java.util.HashMap) finalEvt.getNewValue());
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JTextField dateIn;
private javax.swing.JTextField dateTimeIn;
private javax.swing.JTextField intIn;
private javax.swing.JButton jButton1;
private javax.swing.JCheckBox jCheckBox1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JCheckBox keepValues;
private javax.swing.JTextField numIn;
private javax.swing.JTextField textIn;
// End of variables declaration//GEN-END:variablesThe problem of the change in the form not being comitted is that
I forgot SwingUtilities.invokeLater(makeChanges); in the bottom
part in public void propertyChange(java.beans.PropertyChangeEvent evt)
after having created a new Runnable.
Changes to the UI often have to be comitted by SwingUtitlities.invokeLater()
though I don't know that much about Swing yet.
Thanks to everybody who tried to solve that problem.
Benjamin -
How to keep Uploaded file's content between calls-content is lost in region
hi,
UploadedFile content lost when saving to pageFlowScope.
the use case is to upload a binary file into db. jdev 11.1.2.3
i try to start from
http://tompeez.wordpress.com/tag/affiledownloadactionlistener/
and instead of making all the handling in inputFile's ValueChangeEventListener(),
i'd like to split functionality between inputfile and a run button.
user chooses a file using inputFile
then in backingbean of the request scope
UploadedFile file = (UploadedFile) valueChangeEvent.getNewValue();
Map<String,Object> pageFlowScope = adfFacesContext.getPageFlowScope();
pageFlowScope.put("uploadedfile",file);
in button's ActionEventListener i try to recall UploadedFile.
Map<String,Object> pageFlowScope = adfFacesContext.getPageFlowScope();
UploadedFile file;
file=(UploadedFile)pageFlowScope.get("uploadedfile");
what i found out is fileName=file.getFilename() still shows the original filename, but...
file.getLength() returns 0;
at the same time, when called from ValueChangeEventListener() file.getLength() gets the actual number of bytes
what might cause the content to disappear?
i tried to change backing bean's scope to pageFlowScope without any success
Edited by: grodno on Feb 28, 2013 4:26 AM
Edited by: grodno on Mar 1, 2013 12:49 AMThis will not work as the stream will not be available after the request.
You can set the value propety of the af:inputFile directly to the pageflowScopeBean like
<af:inputFile label="File"
value="#{pageFlowScope.fileData}" id="if1"/>
private UploadedFile fileData;
public void setFileData(UploadedFile afile)
this.fileData = afile;
public UploadedFile getFileData()
return fileData;
public actionListener(ActionEvent av) {
// and in the action listener
// TODO aktuelles bild kann nicht über getBildNr() geladen werden
if (getBildDatei() == null)
return null;
UploadedFile file = getBildDatei();
//work as usual
}Be careful with putting the UploadFile in pageFlowScope as this scope is too broad. You should use ViewScope.
Timo -
When calls get disconnected, call timer does not s...
I have had European unlimited account for several years, for the past couple of months when calling land lines the number rings, the number is answered and the line goes dead, the timer on the phone continues to increase, I have the same problem using either my dual skype phones (no pc) or using either of my iPhones, some s recalling the same number its answered and all is OK, its impossible to contact skype by email for help, the site just sends me around in circles but no contact made available to email any one.
This post was transferred from its previous location to create its own new topic here; its subject and/or title has been edited to differentiate the post from other inquiries and to reflect the post's content.Ring/Silent switch on?
Maybe you are looking for
-
System uses non-default language after log in
I am bilingual, and use two languages on my Mac - English as default, and Russian as secondary. After the update to 10.7.4. every time I log back in (have a password on my Mac Pro), all the programs have Russian language. For example, I open a Chrome
-
How can i unlock my iphone if i forgot my password?
how can i unlock my iphone if i forgot my password?
-
Open item indicator in Billing tables
Hi Experts, I want to know whether any indicator is available in Billing tables VBRK / VBRP if payment is not received of that bill or apart from BSEG any other table is there where payment receipt data are getting stored. Regards, SP Shukla.
-
Subsequent settlement for multiple material
Hi, everyone, I have a requirement for subsequent settlement. The vendor will rebate a fixed amount when the total purchasing QTY more than 100,000 pcs for material A, plus material B, plus material C. When I create the sebsequent settlement, I can
-
Multiple constructor help needed
Good day to all. I have an object that has 2 constructors. I want the first constructor to be able to call the second. Is this possible? Pseudo example..... public class O{ int val; public O(String S) throws Exception{ int i = Integer.parseIn