File 2 Webservice : "java.lang.NullPointerException"
Hello guys,
I have this following scenario : File to WS; everything config looks fine , but i am gettingthis error
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Call Adapter
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>XIAdapterFramework</SAP:Category>
<SAP:Code area="MESSAGE">GENERAL</SAP:Code>
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: java.lang.NullPointerException</SAP:AdditionalText>
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack />
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Please suggest
Krishna
Hi Krishna,
Please have a look at these..
/people/rashmi.ramalingam2/blog/2005/06/25/an-illustration-of-java-server-proxy
/thread/34142 [original link is broken]
"call to messaging system failed: com.sap.aii.af.ra.ms.api.DeliveryExceptio
Error while Testing SOAP Adapter In XI
cheers,
Prashanth
Similar Messages
-
WebService java.lang.NullPointerException
help me please. the java.lang.NullPointerException happens when i try to set a string in to the array reg
i don't know if the problem is because the array dimencion is 1.
i don't think so but im with that problem for many time. and maybe is just simple but i don't see it.
mOc.setMENSAJE_ID(" ");
mOc.setVERSION(ver);
mOc.setESTAMPA_PETICION(new java.util.Date());
com.ing.mx.seguros.autos.sisamovil.ws.coninfSISAMovil.PETICION_SECC peticion = new com.ing.mx.seguros.autos.sisamovil.ws.coninfSISAMovil.PETICION_SECC();
CONSULTA_APOYO_REG[] reg=new CONSULTA_APOYO_REG[1];
reg[0].setSINIESTRO_ING(siniestro);
CONSULTA_APOYOS apoyo = new CONSULTA_APOYOS();
apoyo.setCONSULTA_APOYO_REG(reg);
peticion.setCONSULTA_APOYOS(apoyo);
entrada.setPETICION_SECC(peticion);
entrada.setMENSAJE_SECC(mOc);
code]Hi Krishna,
Please have a look at these..
/people/rashmi.ramalingam2/blog/2005/06/25/an-illustration-of-java-server-proxy
/thread/34142 [original link is broken]
"call to messaging system failed: com.sap.aii.af.ra.ms.api.DeliveryExceptio
Error while Testing SOAP Adapter In XI
cheers,
Prashanth -
Hello XI Xpert's,
I am following below SDN blog to generate file module...
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/da5675d1-0301-0010-9584-f6cb18c04805
I have done all steps as mentioned using NWDS. We have sucessfully deployed same on J2EE engine using SDM. SDM logs shows that it is sucessfully deployed.
I have configured Sender File adapter to call my customised module.( Called before standard file module).
But when I checked in RWB, its gives me error :
Sender Adapter v2703 for Party '', Service 'BS_DEV_XI_401_NA':
Configured at 2007-08-27 12:28:14 EDT
History:
- 2007-08-27 12:32:04 EDT: Retry interval started. Length: 2.000 s
- 2007-08-27 12:32:04 EDT: Error: java.lang.NullPointerException
- 2007-08-27 12:32:04 EDT: An unknown error occured.
- 2007-08-27 12:32:04 EDT: Processing started
- 2007-08-27 12:32:02 EDT: Error: java.lang.NullPointerException
If I do not put any file in respective folder status of Sender Communication channel shows as green...as soon as put any file in folder its getting red with above mention error.
I have gone thru almost all SDN blogs/thread ..I also tried to debug code as mentioned in thread..Error in Module Processing- java.lang.NullPointerException
But unfortunately it never goes to that point...hence never updates Log.
In audit log I am getting same message..
2007-08-27 12:42:50 Error Attempt to process file failed with null
2007-08-27 12:42:50 Error Attempt to process file failed with java.lang.NullPointerException
2007-08-27 12:42:52 Success Channel Sys_Dev_File_Client: Entire file content converted to XML format
2007-08-27 12:42:52 Success Send text file "/usr/sap/tmp/ifATJmgs.csv", size 120436, character encoding ISO646-US with QoS EO
2007-08-27 12:42:52 Error Attempt to process file failed with null
2007-08-27 12:42:52 Error Attempt to process file failed with java.lang.NullPointerException
But could not find my Custom Message... There is any way by which I can check if its calling my Custom Module itself?
There is any setting / parameters which we need to do on J2EE engine in order to activate call to custome module?
Any help would be really appreciated.
NileshIt is strange, but in that document of yours it never says anything about the JNDI name in the ejb-j2ee-engine.xml file.
Check this doc here:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a
According to it, if you properly configure the ejb-j2ee-engine.xml file, then you'd call your module using "localejbs/<JNDIName>".
Regards,
Henrique. -
File send adapter error : java.lang.NullPointerException
Hi All,
I have an issue on some of the file sender adapter communication channels .The channels are failing with the error :
Error :"Attempt to process file failed with java.lang.NullPointerException"
This issue is happening for couple of file sender channels.When I try to stop and start the channels couple of times the failed messages are getting processed.And after the processing of the failed file, the new files are successfully polling as usual.
Please share your experiences as on why this issue is happening and what is the permanent fix for the issue ?
Thanks in Advance !
Thanks & Regards,
RoniHi Roni,
Try with a J2EE restart of the PI server. Hope that will solve your problem.
Thanks,
Anudeep -
FTP Adapter : java.lang.NullPointerException
Hi,
I am getting a java.lang.NullPointerException when I try to use the FTP Adapter.
The message monitor for the Adapter shows this:
2006-02-27 16:48:57 Success File adapter receiver channel OMAF_PO_FTPS_Rcvr: start processing: party " ", service "OMAF"
2006-02-27 16:48:57 Success Connect to FTP server "fintst", directory "/"
2006-02-27 16:49:59 Error Attempt to process file failed with java.lang.NullPointerException
2006-02-27 16:49:59 Error Exception caught by adapter framework: java.lang.NullPointerException
2006-02-27 16:49:59 Error Delivery of the message to the application using connection AFW failed, due to: java.lang.NullPointerException.
When I look at the J2EE logs, I don't see much more detail that might help me troubleshoot....
#1.5#001185B7A4A7007500000BAC00002DB400040DC9804C00C5#1141058999161#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/File#sap.com/com.sap.aii.af.app#com.sap.aii.adapter.file.XI2File.onInternalMessage(XMBMessage, String, IGUID, String)#J2EE_GUEST#0#SAP J2EE Engine JTA Transaction : [011ffffffc6320045b]###16a1e690a7b111da8272001185b7a4a7#XI AF XI2File[/OMAF/OMAF_PO_FTPS_Rcvr]##0#0#Error#1#com.sap.aii.adapter.file.XI2File#Plain###File processing failed with java.lang.NullPointerException#
#1.5#001185B7A4A7007500000BAE00002DB400040DC9804C2276#1141058999161#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/File#sap.com/com.sap.aii.af.app#com.sap.aii.adapter.file.XI2File.addAuditLog(PublicMessageKey, String, AuditLogStatus, String, String)#J2EE_GUEST#0#SAP J2EE Engine JTA Transaction : [011ffffffc6320045b]###16a1e690a7b111da8272001185b7a4a7#XI AF XI2File[/OMAF/OMAF_PO_FTPS_Rcvr]##0#0#Error#1#com.sap.aii.adapter.file.XI2File#Plain###FILE_ERR_211#
Now, given the message monitor output, I assume that the adapter was able to connect successfully to the target FTP server, and that the error is occuring during the writing of the file to the folder (or the conversion of the XML to flat file).
I have checked the conversion parameters. The exact same ones work if I use the comm protocol as File System rather than FTP.
Any ideas?
Thanks and Regards
ManishHi,
Have you set the read write and modify properties for your local ftp server for the corrosponding path, i mean i use guildftp for unit testing, and i need to specify these in the ftp server locally.
That may be a reason why you get this, as you donot specify the autorixation to read the folder under ftp root.
Also refer the file adapter faq: 821267 oss note
Regards,
Anirban. -
Error in file-webservice- file (Error: java.lang.NullPointerException)
Hi everybody,
I have configured a file-webservice-file without BPM scenario...as explained by Bhavesh in the following thread:
File - RFC - File without a BPM - Possible from SP 19.
I have used a soap adapter (for webservice) instead of rfc .My input file sends the date as request message and gets the sales order details from the webservice and then creates a file at my sender side.
1 communication channel for sender file
1 for receiver soap
1 for receiver file
Error: java.lang.NullPointerException
What could be the reason for this error
thanks a lot
RamyaHi Tanaya,
I monitored the channels in the Runtime work bench and the error is in the sender ftp channel.The other 2 channel status is "not used" in RWB.
1 sender ftp channel
1 receiver soap channel
1 receiver ftp channel.
2009-12-16 15:02:00 Information Send binary file "b.xml" from ftp server "10.58.201.122:/", size 194 bytes with QoS EO
2009-12-16 15:02:00 Information MP: entering1
2009-12-16 15:02:00 Information MP: processing local module localejbs/AF_Modules/RequestResponseBean
2009-12-16 15:02:00 Information RRB: entering RequestResponseBean
2009-12-16 15:02:00 Information RRB: suspending the transaction
2009-12-16 15:02:00 Information RRB: passing through ...
2009-12-16 15:02:00 Information RRB: leaving RequestResponseBean
2009-12-16 15:02:00 Information MP: processing local module localejbs/CallSapAdapter
2009-12-16 15:02:00 Information The application tries to send an XI message synchronously using connection File_http://sap.com/xi/XI/System.
2009-12-16 15:02:00 Information Trying to put the message into the call queue.
2009-12-16 15:02:00 Information Message successfully put into the queue.
2009-12-16 15:02:00 Information The message was successfully retrieved from the call queue.
2009-12-16 15:02:00 Information The message status was set to DLNG.
2009-12-16 15:02:02 Error The message was successfully transmitted to endpoint com.sap.engine.interfaces.messaging.api.exception.MessagingException: Received HTTP response code 500 : Internal Server Error using connection File_http://sap.com/xi/XI/System.
2009-12-16 15:02:02 Error The message status was set to FAIL.
Now, the error is internal server error.What can I do about this?
thanks a lot
Ramya -
Java.lang.NullPointerException returned from webservice
Hi I have an axis client which sends an image attachment to an axis webservice, however I am returned with a null pointer exception,
this is my client,
package chapter5;
import java.net.URL;
import org.apache.axis.client.Service;
import org.apache.axis.client.Call;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory;
import org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory;
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.namespace.QName;
import javax.activation.DataHandler;
import javax.activation.FileDataSource;
public class AttachmentServiceClient{
public AttachmentServiceClient(){}
public static void main(String args[]){
try{
String filename = "D:\\images\\products\\r.jpg";
//create the data for the attached file
DataHandler dhSource = new DataHandler(new FileDataSource(filename));
String endpointURL = "http://localhost:8080/axis/services/AttachmentService";
String methodName = "addImage";
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new URL(endpointURL));
call.setOperationName(new QName("AttachmentService",methodName));
call.addParameter("sku",XMLType.XSD_STRING,ParameterMode.PARAM_MODE_IN);
QName qname = new QName("AttachmentService","DataHandler");
call.addParameter("image",qname,ParameterMode.PARAM_MODE_IN);
//register the datahandler
call.registerTypeMapping(dhSource.getClass(),qname,JAFDataHandlerSerializerFactory.class,JAFDataHandlerDeserializerFactory.class);
call.setReturnType(XMLType.XSD_STRING);
Object[] params = new Object[]{"SKU-111",dhSource};
String result = (String)call.invoke(params);
System.out.println("The response: "+result);
; }catch(Exception e){
System.err.println(e.toString());
this is my webservice,
package chapter5;
import javax.activation.DataHandler;
import java.io.FileOutputStream;
import java.io.File;
import java.io.BufferedInputStream;
public class SparePartAttachmentService{
public SparePartAttachmentService(){}
public String addImage(String sku,DataHandler dataHandler){
System.out.println("trying");
try{
String filepath = "c:/wrox-axis/"+sku+"-image.jpg";
FileOutputStream fout = new FileOutputStream(new File(filepath));
BufferedInputStream in = new BufferedInputStream(dataHandler.getInputStream());
while(in.available()!=0){
fout.write(in.read());
}catch(Exception e){
return e.toString();
return "Image: "+sku+" has been added successfully!!";
I did a test by stripping out the attachment being sent by the client and just let it send the string,
then in the webservice I stripped out the lines for the attachment and just returned the string and it worked ok, so it has been deployed correctly.
I have the Java Activation framework both in tomcat commons and my webapps lib dir.
I'm pretty sure the error is being thrown here,
public String addImage(String sku,DataHandler dataHandler){
any help would be greatly appreciated,
thank you,
JP.Ok, I have now successfully got the stack trace to show where the exception bubbled, Im suprised its in the axis client as I assumed it was in the webservice, but this whole exercise has been extremely beneficial,
anyway this is the client code again and the stack trace error, I now think the problem lies within the JAF, possibly, however, im doing something incorrectly,
package chapter5;
import java.net.URL;
import org.apache.axis.client.Service;
import org.apache.axis.client.Call;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory;
import org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory;
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.namespace.QName;
import javax.activation.DataHandler;
import javax.activation.FileDataSource;
import javax.activation.DataSource;
import java.io.File;
public class AttachmentServiceClient{
public AttachmentServiceClient(){}
public static void main(String args[]){
try{
String filename = "D:\\javaDev\\utilities\\coldfusionMX\\Java\\javapetstore\\r.jpg";
//create the data for the attached file
DataHandler dhSource = new DataHandler(new FileDataSource(new File(filename)));
String endpointURL = "http://localhost:8080/axis/services/AttachmentService";
String methodName = "addImage";
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new URL(endpointURL));
call.setOperationName(new QName("AttachmentService",methodName));
call.addParameter("sku",XMLType.XSD_STRING,ParameterMode.PARAM_MODE_IN);
QName qname = new QName("AttachmentService","DataHandler");
call.addParameter("image",qname,ParameterMode.PARAM_MODE_IN);
//register the datahandler
call.registerTypeMapping(dhSource.getClass(),qname,JAFDataHandlerSerializerFactory.class,JAFDataHandlerDeserializerFactory.class);
call.setReturnType(XMLType.XSD_STRING);
Object[] params = new Object[]{"SKU-111",dhSource};
try{
String result = (String)call.invoke(params);
System.out.println("The response: "+result);
}catch(Exception f){
f.getStackTrace();
f.printStackTrace();
}catch(Exception e){
System.err.println("error");
stack trace
C:\wrox-axis>java chapter5.AttachmentServiceClient
java.lang.NullPointerException
at org.apache.axis.AxisFault.makeFault(Unknown Source)
at org.apache.axis.SOAPPart.getAsString(Unknown Source)
at org.apache.axis.SOAPPart.getAsBytes(Unknown Source)
at org.apache.axis.Message.getContentLength(Unknown Source)
at org.apache.axis.transport.http.HTTPSender.invoke(Unknown Source)
at org.apache.axis.strategies.InvocationStrategy.visit(Unknown Source)
at org.apache.axis.SimpleChain.doVisiting(Unknown Source)
at org.apache.axis.SimpleChain.invoke(Unknown Source)
at org.apache.axis.client.AxisClient.invoke(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at chapter5.AttachmentServiceClient.main(AttachmentServiceClient.java:45
Caused by: java.lang.NullPointerException
at org.apache.axis.encoding.ser.JAFDataHandlerSerializer.serialize(Unkno
wn Source)
at org.apache.axis.encoding.SerializationContextImpl.serializeActual(Unk
nown Source)
at org.apache.axis.encoding.SerializationContextImpl.serialize(Unknown S
ource)
at org.apache.axis.encoding.SerializationContextImpl.outputMultiRefs(Unk
nown Source)
at org.apache.axis.message.SOAPEnvelope.outputImpl(Unknown Source)
at org.apache.axis.message.MessageElement.output(Unknown Source)
... 13 more -
Hello,
I'm trying to run a simple OpenScript script in Eclipse that creates a record (a Supplier in this case) in Oracle E-Business Suite. So I copied the the script file from OpenScript and created it as a Class in Eclipse. Then I created a main class to call the methods within the script class but no matter what method I call (initialize, run or finalize) I'm getting the java.lang.NullPointerException message. The error doesn't seem to be related with any specific line in the script but with the way that I'm calling it.
Should I call the OpenScript class from my main class in a different way? (see my examples below)
BTW, all external .jar files coming with OATS have been added to my project in Eclipse.
1) Here's the main class I created to call the OpenScript method (Eclipse auto-corrected my main class adding a Try and Catch around the method call):
public class Test {
public static void main(String[] args) {
nvscript nvs = new nvscript();
try {
nvs.initialize();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
2) Here's the script from OpenScript (the actual script has more steps but I'm just using the first one for a proof of concept):
import oracle.oats.scripting.modules.basic.api.*;
import oracle.oats.scripting.modules.browser.api.*;
import oracle.oats.scripting.modules.functionalTest.api.*;
import oracle.oats.scripting.modules.utilities.api.*;
import oracle.oats.scripting.modules.utilities.api.sql.*;
import oracle.oats.scripting.modules.utilities.api.xml.*;
import oracle.oats.scripting.modules.utilities.api.file.*;
import oracle.oats.scripting.modules.webdom.api.*;
import oracle.oats.scripting.modules.formsFT.api.*;
import oracle.oats.scripting.modules.applet.api.*;
public class nvscript extends IteratingVUserScript {
@ScriptService oracle.oats.scripting.modules.utilities.api.UtilitiesService utilities;
@ScriptService oracle.oats.scripting.modules.browser.api.BrowserService browser;
@ScriptService oracle.oats.scripting.modules.functionalTest.api.FunctionalTestService ft;
@ScriptService oracle.oats.scripting.modules.webdom.api.WebDomService web;
@ScriptService oracle.oats.scripting.modules.applet.api.AppletService applet;
@ScriptService oracle.oats.scripting.modules.formsFT.api.FormsService forms;
public void initialize() throws Exception {
this.getSettings().set("formsft.useformsonly",true);
browser.launch();
public void run() throws Exception {
beginStep(
"[1] E-Business Suite Home Page Redirect (/ebs12cloud.winshuttle.com:8000/)",
0);
web.window(2, "/web:window[@index='0' or @title='about:blank']")
.navigate("http://ebs12.xxxxxxx.com:8000/");
web.window(4, "/web:window[@index='0' or @title='Login']")
.waitForPage(null);
think(4.969);
web.textBox(
7,
"/web:window[@index='0' or @title='Login']/web:document[@index='0']/web:form[@id='DefaultFormName' or @name='DefaultFormName' or @index='0']/web:input_text[@id='usernameField' or @name='usernameField' or @index='0']")
.setText("winshuttle_user");
think(2.0);
web.textBox(
8,
"/web:window[@index='0' or @title='Login']/web:document[@index='0']/web:form[@id='DefaultFormName' or @name='DefaultFormName' or @index='0']/web:input_password[@id='passwordField' or @name='passwordField' or @index='0']")
.click();
think(1.109);
web.textBox(
9,
"/web:window[@index='0' or @title='Login']/web:document[@index='0']/web:form[@id='DefaultFormName' or @name='DefaultFormName' or @index='0']/web:input_password[@id='passwordField' or @name='passwordField' or @index='0']")
.setPassword(deobfuscate("kjhkjhkj=="));
think(1.516);
web.button(
10,
"/web:window[@index='0' or @title='Login']/web:document[@index='0']/web:form[@id='DefaultFormName' or @name='DefaultFormName' or @index='0']/web:button[@id='SubmitButton' or @value='Login' or @index='0']")
.click();
endStep();
public void finish() throws Exception {
3) Here's the error messages I'm getting based on the method I call from my main class:
3.a) when calling Initialize():
java.lang.NullPointerException
at oracle.oats.scripting.modules.basic.api.IteratingVUserScript.getSettings(IteratingVUserScript.java:723)
at nvscript.initialize(nvscript.java:22)
at Test.main(Test.java:9)
3 b) when calling Run():
java.lang.NullPointerException
at oracle.oats.scripting.modules.basic.api.IteratingVUserScript.beginStep(IteratingVUserScript.java:260)
at nvscript.run(nvscript.java:30)
at Test.main(Test.java:9)
Any help and/or constructive comment will be appreciated it.
Thanks.
Federico.UPDATE
Compiling from command line I found out that the class definition for oracle.oats.scripting.modules.basic.api.IteratingVUserScript is missing. Do you know what .jar file contains this class?
Thanks.
Fede. -
Urgent - java.lang.NullPointerException when deploying a WAR file
Hello
I am trying to deploy a WAR file on 9iAS rel 2 using the Enterprise Manager. On the web page, I provide the .war file along with application name and url mapping. When I click on deploy, i get an error back which just says java.lang.NullPointerException. There is no stack trace.
Until now, I have been working on my own PC using tomcat, and the war file works fine in tomcat.
I am presuming that there will be a log file where more information will be available, but I do not know where the log file is kept. The Oracle 9iAS is installed on Solaris.
Any help with this would be greatly appreciated.
Thanks.
JayProblem Solved
The problem was the web.xml file which contained some elements that are only valid for servlet 2.4 (used on tomcat) but not on 2.2(used in oracle).
Jay. -
Java.lang.NullPointerException: When Get the PDF File Name
Hi,
i try to follow the blog on <b>Handling FileUpload and FileDownload in NetWeaver Developer Studio(NWDS) 2004S</b> on /people/rekha.malavathu2/blog/2006/12/12/handling-fileupload-and-filedownload-in-netweaver-developer-studionwds-2004s
as i create a fileupload and i wish to get the file name and the pdf, then i to run and deploy it but i get <b>java.lang.NullPointerException</b>
the code are as below when i click on send email button
IPrivateEmail.IFileUploadNodeNode node = wdContext.nodeFileUploadNode();
IPrivateEmail.IFileUploadNodeElement fileUploadEle = node.createFileUploadNodeElement();
try{
IWDResource resource = WDResourceFactory.createResource(wdContext.currentContextElement().getFileUploadUI().read(true), wdContext.currentContextElement().getFileUploadUI().getResourceName(), WDWebResourceType.PDF, true);
fileUploadEle.setFileUploadAttr(resource);
fileUploadEle.setFileUploadName(wdContext.currentContextElement().getFileUploadUI().getResourceName());
node.addElement(fileUploadEle);
}catch(Exception e){
wdComponentAPI.getMessageManager().reportSuccess("ERROR"+e.getMessage());
but i wonder which part of the code i did wrongly.. as i wish to insert into my send email code
Properties props = new Properties();
String host = "SMTP HOST";
props.put("mail.smtp.host", host);
Session session = Session.getInstance(props, null);
MimeMessage message = new MimeMessage(session);
Address toAddress = new InternetAddress();
Address fromAddress = new InternetAddress();
Address ccAddress = new InternetAddress();
Address bccAddress = new InternetAddress();
try
MimeMultipart multipart = new MimeMultipart();
BodyPart messageBodyPart = new MimeBodyPart();
if (! wdContext.currentEmailElement().getFrom().equals(""))
fromAddress = new InternetAddress(wdContext.currentEmailElement().getFrom());
message.setFrom(fromAddress);
if (! wdContext.currentEmailElement().getTo().equals(""))
toAddress = new InternetAddress(wdContext.currentEmailElement().getTo());
message.setRecipient(Message.RecipientType.TO, toAddress);
if (! wdContext.currentEmailElement().getCc().equals(""))
ccAddress = new InternetAddress(wdContext.currentEmailElement().getCc());
message.setRecipient(Message.RecipientType.CC, ccAddress);
if (! wdContext.currentEmailElement().getBcc().equals(""))
bccAddress = new InternetAddress(wdContext.currentEmailElement().getBcc());
message.setRecipient(Message.RecipientType.BCC, bccAddress);
if (! wdContext.currentEmailElement().getSubject().equals(""))
message.setSubject(wdContext.currentEmailElement().getSubject());
if (! wdContext.currentEmailElement().getBody().equals(""))
messageBodyPart.setText(wdContext.currentEmailElement().getBody());
multipart.addBodyPart(messageBodyPart);
messageBodyPart = new MimeBodyPart();
String filename = IWDResource.getResourceName();
DataSource source = new FileDataSource(filename);
messageBodyPart.setDataHandler(new DataHandler(source));
messageBodyPart.setFileName(source.getName());
messageBodyPart.setHeader("Content-Type","application/pdf");
multipart.addBodyPart(messageBodyPart);
message.setContent(multipart);
Transport.send(message);
catch (AddressException e)
wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
e.printStackTrace();
catch (SendFailedException e)
wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
e.printStackTrace();
catch (MessagingException e)
wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
e.printStackTrace();
so i wonder could anyone help me out.. as i need to get the pdf filename order to put into the variable call <b>filename</b> at the send mail code.
below is the error message
java.lang.NullPointerException
at com.sap.example.uploademail.Email.wdDoInit(Email.java:124)
at com.sap.example.uploademail.wdp.InternalEmail.wdDoInit(InternalEmail.java:146)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:445)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.doOpen(WebDynproWindow.java:295)
at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.show(ApplicationWindow.java:183)
at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.open(ApplicationWindow.java:178)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:364)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:748)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:283)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:759)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:712)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:261)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)facing same issue.
jdev 10.1.3.3.0, on expanding the database connection, I get a null pointer exception.
On the testing the connection it says 'success' though.
any inputs ? -
Java.lang.NullPointerException in File Channel
Hi All,
I have a File scenario running in system since 1 year. the sender file channel is scheduled at 4.00 AM in the morning every day. It works fine. But suddenly i got an error Error occurred while connecting to the FTP server "XXXXXXXXX:21": java.lang.NullPointerException
The channel again ran at 4:20AM and it was successful. I am not able to find the exact error and the reason behind it.
Can anybody suggest me what could be probable reason/s and how to find them? (I got this error in communication channel monitoring)
Thanks in Advance.
SanjayHi Install tcpgw and configure the TCPGateway in a way that it points to the FTP Server address
Enter the following data in the screen
Listen Port : 21
Target Hostname : <Enter hostname>
Target Port : 21
/people/stefan.grube/blog/2007/03/29/troubleshooting-soap-http-and-mail-adapter-scenarios-with-tcpgateway
/people/varadharajan.krishnasamy/blog/2007/01/09/troubleshooting-soap-message--xi -
Error in file cc attemp to process file due java.lang.NullPointerException
there is an error in file communication channel with error information
*Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: java.lang.NullPointerException
.*please post ur views what might be reason for this type of errors.Thanks all for your valuable and quick responses.
MY concern is that why it created 1 file 3 times.
i checked the ICF that is green.
THe interface works like this
*the idoc is sent from the SAP system.
*and is received by a BPM in XI
BPM sends the file to a file receiver channel.
*Encryption program picks the file and encryption is done
*Again the file is sent by file sender channel to receiver.
the receiver is supposed to get 3 files but it is getting 9 files.
one file 3 times.
Moreover file receiver channel shows error jave lang null pointer
please send in your views so that the problem can be sorted out ........
Thanks. -
File Sender java.lang.NullPointerException
Hi,
I am currently develop a file to file transfer appl. I am facing a problem on my file sender will the error Could not process due to error: java.lang.NullPointerException. This error happen at the sender adapter engine communication channel monitoring.
Hope for help.
ThanksHi,
thanks for reply. I found the nullpoiter Exception from Adapter Engine communcation channel in RWB.
Cluster Node Details for Channel cc_flatfile_sender
Status
Inactive
Administration Error
Processing Errors
Cluster Node ID
Short Log
In the Last 20 Seconds Server 0 4_82650 Communication channel is correctly configured and started
Line 1 / 1
Processing Details for Cluster Node Server 0 4_82650
Type
Time Stamp
Message ID
Explanation
10/6/08 11:25:38 AM Could not process due to error: java.lang.NullPointerException
10/6/08 11:25:38 AM Processing started
10/6/08 11:24:38 AM Could not process due to error: java.lang.NullPointerException
10/6/08 11:24:38 AM Processing started
10/6/08 11:23:38 AM Could not process due to error: java.lang.NullPointerException
10/6/08 11:23:38 AM Processing started
10/6/08 11:22:38 AM Could not process due to error: java.lang.NullPointerException
10/6/08 11:22:38 AM Processing started
10/6/08 11:21:38 AM Could not process due to error: java.lang.NullPointerException
10/6/08 11:21:38 AM Processing started -
Java.lang.NullPointerException in the code to read a properties file
I have written the following code to read a properties file...........
<b>
public Property(String fileName)
try
InputStream is = MyClassName.class.getClass().getClassLoader().getResourceAsStream(fileName);
prop.load(is);
is.close();
catch (Exception ex)
System.out.println("The Exception is: " + ex.getMessage());
ex.printStackTrace();
</b>
But this code is giving <b> java.lang.NullPointerException </b> at <b> prop.load(is) </b>
please help me....
regards
Brahmachaitanyahi,
If you are loading a resource (property) file from a jar file you can use
getResourceAsStream("com/test/test.properties").
if the propery file is in outside of your jar file . you can use
Property portalProps = new Property ();
try {
FileInputStream fileInputStream = new FileInputStream("<FilePath + FileName>");
portalProps.load(fileInputStream);
fileInputStream.close();
} catch (IOException e) {
//Log the error
refer the following link for more details
http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html -
Java.lang.NullPointerException while invoking Weblogic10 Webservice JAX-RPC
hello,
I'm facing this Eception while invoking the Webservice
10/03/2009 01:39:19 Ú gosi.business.batch.financialaccounting.gosiSambaRets.controller.SambaClient callUploadPayment
SEVERE: null
java.lang.NullPointerException
at com.bea.staxb.buildtime.internal.bts.XmlTypeName.findTypeIn(XmlTypeName.java:555)
at weblogic.wsee.bind.runtime.internal.AnonymousTypeFinder.getTypeNamed(AnonymousTypeFinder.java:73)
at weblogic.wsee.bind.runtime.internal.Deploytime109MappingHelper.createBindingTypeFrom(Deploytime109MappingHelper.java:1088)
at weblogic.wsee.bind.runtime.internal.Deploytime109MappingHelper.processTypeMappings(Deploytime109MappingHelper.java:519)
at weblogic.wsee.bind.runtime.internal.Deploytime109MappingHelper.initBindingFileFrom109dd(Deploytime109MappingHelper.java:266)
at weblogic.wsee.bind.runtime.internal.Deploytime109MappingHelper.<init>(Deploytime109MappingHelper.java:166)
at weblogic.wsee.bind.runtime.internal.RuntimeBindingsBuilderImpl.createRuntimeBindings(RuntimeBindingsBuilderImpl.java:86)
at weblogic.wsee.ws.WsBuilder.createRuntimeBindingProvider(WsBuilder.java:709)
at weblogic.wsee.ws.WsBuilder.buildService(WsBuilder.java:409)
at weblogic.wsee.ws.WsFactory.createClientService(WsFactory.java:45)
at weblogic.wsee.jaxrpc.ServiceImpl.init(ServiceImpl.java:154)
at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:122)
at com.samba.service.client.GosiPaymentSambaServices_Impl.<init>(Unknown Source)
at com.samba.service.client.GosiPaymentSambaServices_Impl.<init>(Unknown Source)
please can some one help me??user564706 wrote:
Hi support,
I installed cluster
I installed Oracle ASM home
using netca from ASM hom i cretaed listener
Then while invoking dbca from ASM home to cretae asm instance i got the error:
exceptio in thread "main" java.lang.NullPointerException
at
oracle.sysman.assistants....
so using netca from asm home i deleted the listener and invokded dbca from asm home and it looks for the listener and since it is not there it automatically cretaes (after i confirm ok)and the asm instance cretaed.
so is it the normal behaviour.What is the version?
Why you are using DBCA from ASM_HOME ?
you can use ASMCA from ASM_HOME if 11g.
DBCA to create database from RDBMS_HOME/ORACLE_HOME
You have very bad stats of your profile.
user564706
Newbie
Handle: user564706
Status Level: Newbie
Registered: Mar 19, 2007
Total Posts: 258
Total Questions: 202 (200 unresolved)
Out of 202 questions only 2 resolved, please check may be those also unresolved ;-)
Keep the forum clean, close all your threads as answered. Read Etiquette. https://forums.oracle.com/forums/ann.jspa?annID=718
Edited by: CKPT on Feb 22, 2012 6:56 AM
Maybe you are looking for
-
How to capture the onclick action htmlb to Portal component?
<% if (Bean.getSpoofValue().equalsIgnoreCase("spoof=yes")) {%> <hbj:form id="spoof" > <hbj:gridLayout id="myGrid2" rowSize="10" columnSize="1
-
Rename with enter doesn't work!
i got the problem that i since few days don't rename my iTunes Tracks with the Enter Key. I must be go to the Information or make a shortcut with cmd & Enter ! But I know that works usually only with the enter key to rename a song Can somebody please
-
OWA and ActiveSync certificate based authentication
I have Exchange 2013 CU3 installed and want to activate the certificate based authentication for ActiveSync and OWA. But I want to have the login without certificate as well for users without a certificate. I already found some information how to do
-
Cookbook for SAP BUSINESS WORKFLOW
hi all can anyone please send me the cookbook for SAP BUSINESS WORKFLOWS which may include the scenarios and technical details of creation of workflow. my id is : [email protected] full points will be rewarded regards ashish
-
Where are downloaded UV movies stored on a mac?
Hi, I have downloaded two Ultra Violet Movies on my MacBook Pro but cannot locate the physical files anywhere. I have only been using my MacBook for just over a year so I am still learning. I have tried using finder and checking the downloads section