function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PannarPannar 

Problem with special character thru weblogic

Hi,

I am facing very serious issue while querying the record from oracle table. One of the fields contains the special character as part of email value. I need to handle that value.

My part of databaseControl.JCS file looks like below:-

Code:
static public class ContactData
{
public int ROWNUMBER;
public int BATCH_NUMBER;
public String EMAIL;
public String LOCAL_FIRST_NAME;
public String LOCAL_LAST_NAME; 


}
/**
* @jc:sql rowset-name="contactData" statement="SELECT EMAIL FROM CONTACT WHERE ROWNUM < 51"
*/
ContactData[] getContactData();


 

Code:
my part of JPD file from where i am calling db method which query the records.

--------------------------------------------------------------------------------

/**
* @jpd:process process::
* <process name="loadContacts">
* <clientRequest name="Subscription" method="subscription"/>
* <perform name="Perform" method="CacheRecordType"/>
* <block name="Group">
* <onException name="OnException">
* <perform name="Perform" method="perform1"/>
* </onException>
* <doWhile name="Do While" condition="exprFunction0($rowsProcessed)">
* <perform name="Perform" method="perform"/>
* </doWhile>
* </block>
* </process>::
* @jpd:xquery prologue::
* 
* 
* 
* 
* define function exprFunction0(xs:int $rowsProcessed) returns xs:boolean {
* ($rowsProcessed <= 50) and 
* ($rowsProcessed != 0)
* }
* 
* ::
*/
public void perform() throws Exception
{

LoginResult loginResult=null;
String sforceId="";
SvcControl.ContactData[] contactData = null;
log.debug("Started Load Contact process=");


try{
log.debug("Started Load Contact process="+ SvcControl.getContactData().toString());
contactData = SvcControl.getContactData();
log.debug("Started Load Contact process="+ contactData.toString());
}catch(Exception e){
log.error("Caught exception:"+e.getMessage());
return;
}
if(contactData!=null){


 



I am calling this method call on my JPD file and trying to assign it to ContactData array variable. It is updating the records by batch of 50. The problem is that if suppose any one of the records returned the email with special characters(junk value) , it breaks the whole process, it is unable to continue updating the rest of the records!! :-(

Web logic thrown the following exception while triggering the jpd process:

 

Code:
External Service Request 
Submitted at Thu Dec 04 22:19:11 IST 2008
<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns:getContactData xmlns:ns="http://www.openuri.org/"></ns:getContactData>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


External Service Response 
Submitted at Thu Dec 04 15:20:51 IST 2008

<xml-fragment xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:fc="http://www.bea.com/2003/04/jwFaultCode/" xmlns:jwErr="http://www.bea.com/2002/04/jwErrorDetail/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 

<faultcode xmlns:fc="http://www.bea.com/2003/04/jwFaultCode/">fc:JWSError</faultcode>

<faultstring>
com.bea.xml.marshal.XmlEncodingException: Error writing XML stream: com.bea.xml.pure.XMLStreamException: Unable to write XML string starting with m@debeauvaisfinance.com. It contains the illegal XML char 0x0013 at offset 23
</faultstring>

<detail> 

<jwErr:jwErrorDetail xmlns:jwErr="http://www.bea.com/2002/04/jwErrorDetail/">
com.bea.wlw.runtime.core.request.ResponseValidationException: com.bea.xml.marshal.XmlEncodingException: Error writing XML stream: com.bea.xml.pure.XMLStreamException: Unable to write XML string starting with m@debeauvaisfinance.com. It contains the illegal XML char 0x0013 at offset 23 ServiceException
at com.bea.wlw.runtime.jws.request.SoapResponse.processException(Ljava.lang.Exception;)Ljava.lang.Exception;(SoapResponse.java:194)
at com.bea.wlw.runtime.core.request.BaseResponse.setFault(Ljava.lang.Exception;)V(BaseResponse.java:23)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(BaseDispatcherBean.java:298)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(BaseDispatcherBean.java:54)
at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcherBean.java:168)
at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcher_k1mrl8_EOImpl.java:100)
at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Lcom.bea.wlw.runtime.core.dispatcher.DispFile;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(Dispatcher.java:161)
at com.bea.wlw.runtime.core.dispatcher.Dispatcher.dispatch(Lcom.bea.wlw.runtime.core.dispatcher.DispFile;Lcom.bea.wlw.runtime.core.request.Request;Ljavax.servlet.http.HttpServletResponse;Ljavax.servlet.ServletContext;)V(Dispatcher.java:49)
at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executePostRequest(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Ljavax.servlet.ServletContext;Ljavax.servlet.ServletConfig;)V(HttpServerHelper.java:713)
at com.bea.wlw.runtime.core.dispatcher.HttpServer.doPost(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServer.java:49)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl;)V(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6722)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImpl;)V(WebAppServletContext.java:3764)
at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThread;)V(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
Caused by: com.bea.wlw.runtime.core.request.ResponseValidationException: com.bea.xml.marshal.XmlEncodingException: Error writing XML stream: com.bea.xml.pure.XMLStreamException: Unable to write XML string starting with m@debeauvaisfinance.com. It contains the illegal XML char 0x0013 at offset 23
at com.bea.wlw.runtime.jws.request.SoapResponse.setReturnValue(Ljava.lang.Object;)V(SoapResponse.java:112)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(BaseDispatcherBean.java:259)
... 20 more
Caused by: com.bea.xml.marshal.XmlEncodingException: Error writing XML stream: com.bea.xml.pure.XMLStreamException: Unable to write XML string starting with m@debeauvaisfinance.com. It contains the illegal XML char 0x0013 at offset 23
at com.bea.xml.marshal.MarshalContext.error(Ljava.lang.String;)Lcom.bea.xml.marshal.XmlEncodingException;(MarshalContext.java:148)
at com.bea.xml.marshal.MarshalContext.writeCharacterData(Ljava.lang.String;)V(MarshalContext.java:186)
at com.bea.xml.marshal.AtomicValueMPlan.marshal(Ljava.lang.Object;Lcom.bea.xml.marshal.MarshalContext;)V(AtomicValueMPlan.java:79)
at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(Ljavax.xml.namespace.QName;Ljava.lang.Object;Lcom.bea.xml.marshal.MarshalPlan;ZZ)V(MarshalContext.java:436)
at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(Ljava.lang.Object;Lcom.bea.xml.marshal.BaseMPlan$ElementStrategy;Lcom.bea.xml.marshal.MarshalContext;)V(BaseMPlan.java:307)
at com.bea.xml.marshal.BaseMPlan.marshal(Ljava.lang.Object;Lcom.bea.xml.marshal.MarshalContext;)V(BaseMPlan.java:349)
at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(Ljavax.xml.namespace.QName;Ljava.lang.Object;Lcom.bea.xml.marshal.MarshalPlan;ZZ)V(MarshalContext.java:436)
at com.bea.xml.marshal.ArrayMPlan.marshal(Ljava.lang.Object;Lcom.bea.xml.marshal.MarshalContext;)V(ArrayMPlan.java:122)
at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(Ljavax.xml.namespace.QName;Ljava.lang.Object;Lcom.bea.xml.marshal.MarshalPlan;ZZ)V(MarshalContext.java:436)
at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(Ljava.lang.Object;Lcom.bea.xml.marshal.BaseMPlan$ElementStrategy;Lcom.bea.xml.marshal.MarshalContext;)V(BaseMPlan.java:307)
at com.bea.xml.marshal.BaseMPlan.marshal(Ljava.lang.Object;Lcom.bea.xml.marshal.MarshalContext;)V(BaseMPlan.java:349)
at com.bea.xml.marshal.MethodMPlan.marshal(Ljava.lang.Object;Lcom.bea.xml.marshal.MarshalContext;)V(MethodMPlan.java:261)
at com.bea.wlw.runtime.core.dispatcher.DispMessage.marshalXml([Ljava.lang.Object;Ljavax.xml.soap.SOAPMessage;Lcom.bea.jws.Protocol;Ljava.util.Map;)Ljava.lang.String;(DispMessage.java:377)
at com.bea.wlw.runtime.jws.request.SoapResponse.writePart(Lcom.bea.wlw.runtime.core.dispatcher.DispMessage;[Ljava.lang.Object;)V(SoapResponse.java:339)
at com.bea.wlw.runtime.jws.request.SoapResponse.setReturnValue(Ljava.lang.Object;)V(SoapResponse.java:107)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(BaseDispatcherBean.java:259)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(BaseDispatcherBean.java:54)
at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcherBean.java:168)
at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcher_k1mrl8_EOImpl.java:100)
at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Lcom.bea.wlw.runtime.core.dispatcher.DispFile;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(Dispatcher.java:161)
at com.bea.wlw.runtime.core.dispatcher.Dispatcher.dispatch(Lcom.bea.wlw.runtime.core.dispatcher.DispFile;Lcom.bea.wlw.runtime.core.request.Request;Ljavax.servlet.http.HttpServletResponse;Ljavax.servlet.ServletContext;)V(Dispatcher.java:49)
at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executePostRequest(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Ljavax.servlet.ServletContext;Ljavax.servlet.ServletConfig;)V(HttpServerHelper.java:713)
at com.bea.wlw.runtime.core.dispatcher.HttpServer.doPost(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServer.java:49)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl;)V(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6722)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImpl;)V(WebAppServletContext.java:3764)

</jwErr:jwErrorDetail>

</detail>

</xml-fragment>


 

Anyone has any thoughts on this? I had set the charset as "iso-8859-1" in almost all the related weblogic script and xml files. but no progress! still getting the same exception. please guide me how to resolve this issue?

thanks