Indesign CS3-JS - Problem in reading text from a text file
Can anyone help me...
I have an problem with reading text from an txt file. By "readln" methot I can read only the first line of the text, is there any method to read the consecutive lines from the text file.
Currently I am using Indesign CS3 with Java Script (for PC).
My Java Script is as follows........
var myNewLinksFile = myFindFile("/Links/NewLinks.txt")
var myNewLinks = File(myNewLinksFile);
var a = myNewLinks.open("r", undefined, undefined);
myLine = myNewLinks.readln();
alert(myLine);
function myFindFile(myFilePath){
var myScriptFile = myGetScriptPath();
var myScriptFile = File(myScriptFile);
var myScriptFolder = myScriptFile.path;
myFilePath = myScriptFolder + myFilePath;
if(File(myFilePath).exists == false){
//Display a dialog.
myFilePath = File.openDialog("Choose the file containing your find/change list");
return myFilePath;
function myGetScriptPath(){
try{
myFile = app.activeScript;
catch(myError){
myFile = myError.fileName;
return myFile;
Thanks,
Bharath Raja G
Hi Bharath Raja G,
If you want to use readln, you'll have to iterate. I don't see a for loop in your example, so you're not iterating. To see how it works, take a closer look at FindChangeByList.jsx--you'll see that that script iterates to read the text file line by line (until it reaches the end of the file).
Thanks,
Ole
Similar Messages
-
Following is the text file(ocr.txt) from which i am reading data,
Name: mark
Date:1/11/2008
PO:4859685
Following is the program,
import java.io.*;
import java.util.*;
import java.util.Scanner;
public class SkipWord {
public static void main(String args[])throws IOException{
FileReader fr = new FileReader("D:\\Kiran\\Programs\\ocr.txt");
BufferedReader br = new BufferedReader(fr);
String line = br.readLine();
String line1=br.readLine();
try{
Scanner s1=new Scanner(line).useDelimiter("\\s*name:\\s*date:\\s*po:\\s*");
System.out.println(s1.next());
System.out.println(s1.nextLine());
catch(NoSuchElementException e){}
Current output:
mark
But i want the output in the following way,
Expected output:
mark
1/11/2008
4859685
Please help me regarding this,its very urgent.
Thanks,
praveenString line=br.readLine();
String line2=br.readLine();
Scanner s1=new Scanner(line).useDelimiter("\\s*name:\\s*date:\\s*po:
s*");
System.out.println(s1.next());
System.out.println(s1.nextLine());
Scanner s2=new Scanner(line1).useDelimiter("\\s*date:\\s*");
System.out.println(s2.next());
System.out.println(s2.nextLine());
I tried this but i am getting same output
Just printing "Mark". -
Problem in reading Text file(Unicode)
Hi
i am trying to read a tab delimited text file which has Unicode Encoding
try{
BufferedReader reader = new BufferedReader(
new InputStreamReader(
new FileInputStream(
"C:/Documents and Settings/divya.parkash/Desktop/Testting.txt"),
"UTF8"));
int buf;
while((buf=reader.read())>-1){
if (buf!=0)
str.append((char)buf);
System.out.println(str.toString());
catch (Exception e){System.out.println("Res: "+e);}
}but i am geting two ?? marks before the text
??STD_BIN HI 0 100 U10 21010100 66.550 20.000 1.000 1.200 1.200 1.300 0 100 RACKED 0 0
STD_BIN LO 21010200 100 U10 21010200 66.550 20.000 3.000 1.200 1.200 1.300 0 100 RACKED 0 0
STD_BIN LO 21010300 100 U10 21010300 66.550 20.000 5.000 1.200 1.200 1.300 0 100 RACKED 0 0
STD_BIN LO 21010400 100 U10 21010400 66.550 20.000 7.000 1.200 1.200 1.300 0 100 RACKED 0 0
STD_BIN LO 21010500 100 U10 21010500 66.550 20.000 9.000 1.200 1.200 1.300 0 0 RACKED 0 0
STD_BIN LO 21010600 100 U10 21010600 66.550 20.000 11.000 1.200 1.200 1.300 0 0 RACKED 0 0So please suggest me the reason and solutionHi
calvino_ind
this is the output i am getting by keeping buf as int.......
553365533838468956673789727394899494848985494895049484948494848932323232323254544653534893232323232325048464848489323232323232324946484848999932323232323232494650484893232323232323249465048489323232323232324946514848948932494848982656775696894894813108384689566737897679950494849485048489949484898549489504948494850484893232323232325454465353489323232323232504846484848932323232323232514648484899993232323232323249465048489323232323232324946504848932323232323232494651484894893249484898265677569689489481310838468956673789767995049484948514848994948489854948950494849485148489323232323232545446535348932323232323250484648484893232323232323253464848489999323232323232324946504848932323232323232494650484893232323232323249465148489489324948489826567756968948948131083846895667378976799504948494852484899494848985494895049484948524848932323232323254544653534893232323232325048464848489323232323232325546484848999932323232323232494650484893232323232323249465048489323232323232324946514848948932494848982656775696894894813108384689566737897679950494849485348489949484898549489504948494853484893232323232325454465353489323232323232504846484848932323232323232574648484899993232323232323249465048489323232323232324946504848932323232323232494651484894893232324898265677569689489481310838468956673789767995049484948544848994948489854948950494849485448489323232323232545446535348932323232323250484648484893232323232324949464848489999323232323232324946504848932323232323232494650484893232323232323249465148489489323232489826567756968948948131083846895667378976799504948494855484899494848985494895049484948554848932323232323254544653534893232323232325048464848489323232323232495146484848999932323232323232494650484893232323232323249465048489323232323232324946514848948932323248982656775696894894813108384689566737897679950494849485648489949484898549489504948494856484893232323232325454465353489323232323232504846484848932323232323249534648484899993232323232323249465048489323232323232324946504848932323232323232494651484894893232324898265677569689489481310 -
I am facing problem to get text file from application sever
Hi This is lokesh.
Actually my requirement is to craete sales orders by getting file from other server.for that i have used shell script to connect that server.Ok i am connecting to that different server(not sap server) successfully.
But my problem is getting text file from application SERVER.
That different server people will send the file name as 'DDHHMMSS' (Days,Hours,Minutes,Seconds).
Just suppose if they will send today means that file name will come as 20103025. and with in half an hour if they again send that file file means that file name as '20110025'.
like that file name is always varies.So how can i read that type of text files from the application server.
and one more thing that is there chance to read morethan one text file from application server.
Pls guide me if u know the solution.PLs this requirement is urgent.
Regards,
LokeshgoudHi..,
<b>Just execute this program ... this is for the files received in JUST 3 MINS...</b>
change it according to your requirement !!
data time type sy-uzeit value '100000'. <i>"<<----start time</i>
data file(8) type c value '20'.
do 180 times. <i>" <<----- for 3 minutes</i>
add sy-index to time.
concatenate file time into file.
write / file.
OPEN DATASET FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC EQ 0.
PERFORM READ_DATASET.
ENDIF.
file = '20'.
time = '100000'.
ENDDO.
<b>form read_dataset.
read the file here with the file name <b>FILE</b>.
endform.</b>
regards,
sai ramesh -
HI,,,How to read text file from my emulators root
hi friends,
Actully i m having problem with file connection i.e. i cant read text file from my root of the emulator.....
i have tried like this...
plz help me out
String uri = "file:///C:/WTK22/appdb/DefaultColorPhone/filesystem/root1/New Folder/main.txt";
InputConnection conn = (InputConnection)Connector.open( uri,Connector.READ );
InputStream in = conn.openInputStream();
conn.close();
for(int j=0;j<12;j++)
ch=in.read();
str.append((char)ch);
par1=str.toString();
in.close();
screen4.append(par1);
display.setCurrent(screen4);still its not working.........
String uri = "file:///C:/WTK22/appdb/DefaultColorPhone/filesystem/root1/readme.txt";
FileConnection conn = (FileConnection)Connector.open( uri,Connector.READ);
InputStream in = conn.openInputStream();
conn.close();
String ss="";
String str1="";
int ch=0;
byte b[]=new byte[753];
ch=in.read(b,0,753);
str1= new String(b,0,ch);
ss=str1.substring(493,501);
screen4.append(ss);
display.setCurrent(screen4);
}catch(IOException io){} -
i am facing problem while reading values from properties file ...i am getting null pointer exception earlier i was using jdeveloper10g now i am using 11g
hi TimoHahn,
i am getting following exception in JDeveloper(11g release 2) Studio Edition Version 11.1.2.4.0 but it works perfectly fine in JDeveloper 10.1.2.1.0
Root cause of ServletException.
java.lang.NullPointerException
at java.util.PropertyResourceBundle.handleGetObject(PropertyResourceBundle.java:136)
at java.util.ResourceBundle.getObject(ResourceBundle.java:368)
at java.util.ResourceBundle.getString(ResourceBundle.java:334)
at org.rbi.cefa.master.actionclass.UserAction.execute(UserAction.java:163)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
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:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) -
Problem in reading the JDK1.4Logger configuration file from java prog
I have written a java program and want to log the messages in a log file , I'm using commons logging with JDK1.4logger as logging subsystem .
I am facing the problem in reading the JDK1.4Logger configuration file which is commons-logging .properties file from my java program as a result my log messages are appearing directly on the screen while I try to run program , during compilation no error is shown . I have tried to set java.util.logging.config.file ="Path of my commons-logging .properties file " by setting system properties also.
Please suggest the appropriate solution for this .Some webservers won't recognise the resource bundle provided in message-resources
In that case, you need to specify that resource bundle information in web.xml at the time of specifying the action servlet like this. Check for the init-param application.
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>resource.ApplicationResource</param-value>
</init-param>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>validate</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>In this, the drawback is, you can not specify the key for your resource bundle. In the JSP, you have to access the property like this.
<bean:message key="label.fName"/> -
Problem in creating text file from report file
Hello Everybody...
I have problem in creating text file.
I had set System Parameter as below
DESTYPE : File
MODE : Character
DESNAME : gayu.txt
And ruler setting
Units : Character Cells
Character Cell Size : Horiziontal = 7
Vertiacle =12
GridSpacing : 1
no of snap points per grid spacing : 1
but when i run report it will give error
"REP_1219 M_2 or R_2 has no size -- length or width zero"
so is there any solution of that
or another way to convert report into text file?....Hi Folks,
Please don't go after that Error as its a very deceptive one. Please don't go for altering your design Or changing the size of items in your layout.
Similar errors I have come across in reports. I think its due to file transfer type. You might have transferred the file in Binary and your File Mode I am seeing it as CHAR.
This normally happens while making the Report Format as "Text". Either you change that format which I think is possible in your case as your basic requirement is making a report output of CHAR type.
Please check for this error in Metalink and proceed accordingly. I could fix similar errors when I changed Format type to PDF(from text).
Regards
Shibu -
How can I read text files from LAN if I only know the hostname?
I'm new in Java Developing, and dont know the written classes yet. I need help, how to do the following steps?
<p>1. How can I read text files from LAN if I only know the hostname, or IP address?
<p>2. How to read lines from text files without read all lines from the beginning of file, just seek to a position.
(ex. how can I read the 120th line?)
<p>Please help!
<p>sorry for the bad englishI'm new in Java Developing, and dont know the written classes yet. I need help, how to do the following steps?
1. How can I read text files from LAN if I only know the hostname, or IP address?You need to know the URL of the file. You need to know the hostname, port, protocl and relative path.
The hostname is server, not file.
2. How to read lines from text files without read all lines from the beginning of file, just seek to a position.Use the seek() to get to a random byte.
(ex. how can I read the 120th line?)The only way to find the 120th line is to read the first 120 lines. You can use other file formats to find the 120th line without reading the whole file but to need to be able to detremine where the 120th line is -
Problem trying read data from Destination
HI,
I have confiigured ADS and when im testing dest im getting the error :error while silently connecting:org.w3c.www.protocol :connection refused.
when i ckedth NWA logs i got the below trace file. please let me know how to solve this.
Problem trying read data from Destination: dest:FP_ICF_DATA_K64//sap/bc/fp/form/layout/FP_FORM_SECURITY_TEST.XDP?fp-language=DE
com.adobe.ads.destination.DestinationException: IO error detected while opening DEST connection: http://sapk64.essent.local:8062/sap/bc/fp/form/layout/FP_FORM_SECURITY_TEST.XDP?fp-language=DE
at com.adobe.ads.destination.Destination.readUrlStream(Unknown Source)
at com.adobe.ads.destination.Destination.readTemplate(Unknown Source)
at com.adobe.ads.data.DestURLData.setData(Unknown Source)
at com.adobe.ads.data.DestURLData.<init>(Unknown Source)
at com.adobe.ads.data.PDFData.createFromURL(Unknown Source)
at com.adobe.ads.data.PDFData.create(Unknown Source)
at com.adobe.ads.request.Template.setPDFData(Unknown Source)
at com.adobe.ads.request.Template.initialize(Unknown Source)
at com.adobe.ads.request.Renderer.initializeTemplates(Unknown Source)
at com.adobe.ads.request.Renderer.execute(Unknown Source)
at com.adobe.BaseADSRequest.doWork(Unknown Source)
at com.adobe.AdobeDocumentServicesWorker.processRender(Unknown Source)
at com.adobe.AdobeDocumentServicesWorker.execute(Unknown Source)
at com.adobe.AdobeDocumentServicesEJB.processRequest(Unknown Source)
at com.adobe.AdobeDocumentServicesEJB.rpData(Unknown Source)
at com.adobe.AdobeDocumentServicesLocalLocalObjectImpl0_0.rpData(AdobeDocumentServicesLocalLocalObjectImpl0_0.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
at SoapServlet.doPost(SoapServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
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(AccessController.java:207)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: org.w3c.www.protocol.http.HttpException: java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:354)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:219)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:206)
at java.net.Socket.connect(Socket.java:483)
at java.net.Socket.connect(Socket.java:433)
at java.net.Socket.<init>(Socket.java:340)
at java.net.Socket.<init>(Socket.java:180)
at org.w3c.www.protocol.http.f.a(Unknown Source)
at org.w3c.www.protocol.http.f.markUsed(Unknown Source)
at org.w3c.www.protocol.http.HttpBasicServer.getConnection(Unknown Source)
at org.w3c.www.protocol.http.HttpBasicServer.runRequest(Unknown Source)
at org.w3c.www.protocol.http.HttpManager.runRequest(Unknown Source)
at org.w3c.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at org.w3c.www.protocol.http.HttpURLConnection.a(Unknown Source)
at org.w3c.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.adobe.ads.destination.Destination.readUrlStream(Unknown Source)
at com.adobe.ads.destination.Destination.readTemplate(Unknown Source)
at com.adobe.ads.data.DestURLData.setData(Unknown Source)
at com.adobe.ads.data.DestURLData.<init>(Unknown Source)
at com.adobe.ads.data.PDFData.createFromURL(Unknown Source)
at com.adobe.ads.data.PDFData.create(Unknown Source)
at com.adobe.ads.request.Template.setPDFData(Unknown Source)
at com.adobe.ads.request.Template.initialize(Unknown Source)
at com.adobe.ads.request.Renderer.initializeTemplates(Unknown Source)
at com.adobe.ads.request.Renderer.execute(Unknown Source)
at com.adobe.BaseADSRequest.doWork(Unknown Source)
at com.adobe.AdobeDocumentServicesWorker.processRender(Unknown Source)
at com.adobe.AdobeDocumentServicesWorker.execute(Unknown Source)
at com.adobe.AdobeDocumentServicesEJB.processRequest(Unknown Source)
at com.adobe.AdobeDocumentServicesEJB.rpData(Unknown Source)
at com.adobe.AdobeDocumentServicesLocalLocalObjectImpl0_0.rpData(AdobeDocumentServicesLocalLocalObjectImpl0_0.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
at SoapServlet.doPost(SoapServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
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(AccessController.java:207)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Error embedding request inputs in error log.
Error embedding request inputs in error log.
java.lang.NullPointerException
at com.adobe.ads.request.Renderer.embedInputs(Unknown Source)
at com.adobe.AdobeDocumentServicesWorker.processRenderLog(Unknown Source)
at com.adobe.AdobeDocumentServicesWorker.processRender(Unknown Source)
at com.adobe.AdobeDocumentServicesWorker.execute(Unknown Source)
at com.adobe.AdobeDocumentServicesEJB.processRequest(Unknown Source)
at com.adobe.AdobeDocumentServicesEJB.rpData(Unknown Source)
at com.adobe.AdobeDocumentServicesLocalLocalObjectImpl0_0.rpData(AdobeDocumentServicesLocalLocalObjectImpl0_0.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
at SoapServlet.doPost(SoapServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
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(AccessController.java:207)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
No output was generated while rendering
The render error log file has been written to /usr/sap/T50/SYS/global/AdobeDocumentServices/renderErrorLog/errorFiles/2008.08.05.113021ADS_AGENT.pdf.
Please validate the input files or streams attached with it and try again
Processing exception during a "Render" operation.
Request start time: Tue Aug 05 11:30:21 CEST 2008
com.adobe.ads.destination.DestinationException: IO error detected while opening DEST connection: http://sapk64.essent.local:8062/sap/bc/fp/form/layout/FP_FORM_SECURITY_TEST.XDP?fp-language=DE; [Error Log file "2008.08.05.113021ADS_AGENT.pdf" written to /usr/sap/T50/SYS/global/AdobeDocumentServices/renderErrorLog/errorFiles]
Exception Stack Trace:
com.adobe.ads.destination.DestinationException: IO error detected while opening DEST connection: http://sapk64.essent.local:8062/sap/bc/fp/form/layout/FP_FORM_SECURITY_TEST.XDP?fp-language=DE
at com.adobe.ads.destination.Destination.readUrlStream(Unknown Source)
at com.adobe.ads.destination.Destination.readTemplate(Unknown Source)
at com.adobe.ads.data.DestURLData.setData(Unknown Source)
at com.adobe.ads.data.DestURLData.<init>(Unknown Source)
at com.adobe.ads.data.PDFData.createFromURL(Unknown Source)
at com.adobe.ads.data.PDFData.create(Unknown Source)
at com.adobe.ads.request.Template.setPDFData(Unknown Source)
at com.adobe.ads.request.Template.initialize(Unknown Source)
at com.adobe.ads.request.Renderer.initializeTemplates(Unknown Source)
at com.adobe.ads.request.Renderer.execute(Unknown Source)
at com.adobe.BaseADSRequest.doWork(Unknown Source)
at com.adobe.AdobeDocumentServicesWorker.processRender(Unknown Source)
at com.adobe.AdobeDocumentServicesWorker.execute(Unknown Source)
at com.adobe.AdobeDocumentServicesEJB.processRequest(Unknown Source)
at com.adobe.AdobeDocumentServicesEJB.rpData(Unknown Source)
at com.adobe.AdobeDocumentServicesLocalLocalObjectImpl0_0.rpData(AdobeDocumentServicesLocalLocalObjectImpl0_0.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
at SoapServlet.doPost(SoapServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
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(AccessController.java:207)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: org.w3c.www.protocol.http.HttpException: java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:354)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:219)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:206)
at java.net.Socket.connect(Socket.java:483)
at java.net.Socket.connect(Socket.java:433)
at java.net.Socket.<init>(Socket.java:340)
at java.net.Socket.<init>(Socket.java:180)
at org.w3c.www.protocol.http.f.a(Unknown Source)
at org.w3c.www.protocol.http.f.markUsed(Unknown Source)
at org.w3c.www.protocol.http.HttpBasicServer.getConnection(Unknown Source)
at org.w3c.www.protocol.http.HttpBasicServer.runRequest(Unknown Source)
at org.w3c.www.protocol.http.HttpManager.runRequest(Unknown Source)
at org.w3c.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at org.w3c.www.protocol.http.HttpURLConnection.a(Unknown Source)
at org.w3c.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.adobe.ads.destination.Destination.readUrlStream(Unknown Source)
at com.adobe.ads.destination.Destination.readTemplate(Unknown Source)
at com.adobe.ads.data.DestURLData.setData(Unknown Source)
at com.adobe.ads.data.DestURLData.<init>(Unknown Source)
at com.adobe.ads.data.PDFData.createFromURL(Unknown Source)
at com.adobe.ads.data.PDFData.create(Unknown Source)
at com.adobe.ads.request.Template.setPDFData(Unknown Source)
at com.adobe.ads.request.Template.initialize(Unknown Source)
at com.adobe.ads.request.Renderer.initializeTemplates(Unknown Source)
at com.adobe.ads.request.Renderer.execute(Unknown Source)
at com.adobe.BaseADSRequest.doWork(Unknown Source)
at com.adobe.AdobeDocumentServicesWorker.processRender(Unknown Source)
at com.adobe.AdobeDocumentServicesWorker.execute(Unknown Source)
at com.adobe.AdobeDocumentServicesEJB.processRequest(Unknown Source)
at com.adobe.AdobeDocumentServicesEJB.rpData(Unknown Source)
at com.adobe.AdobeDocumentServicesLocalLocalObjectImpl0_0.rpData(AdobeDocumentServicesLocalLocalObjectImpl0_0.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
at SoapServlet.doPost(SoapServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
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(AccessController.java:207)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)hi,
My problem is solved now. We have opened backend system port connection from portal side.
regards,
Krishna -
I am facing a Problem with reading images from database
Hi everybody..
any help will be most appreciated, I am facing problem with reading images from database. I am pasting my code...
string connect = "datasource = localhost; port = 3306; username = root; password = ;";
MySqlConnection conn = new MySqlConnection(connect); // creating connecting string
MySqlCommand sda = new MySqlCommand(@"select * from management.add_products ", conn); //creating query
MySqlDataReader reader;
try
conn.Open(); // Opening Connection
reader = sda.ExecuteReader(); // Executing my Query..
while (reader.Read())
byte[] imgg = (byte[])(reader["Picture"]);
if (imgg == null)
pc1.Image = null;
else
MemoryStream mstream = new MemoryStream(imgg);
pc1.Image = System.Drawing.Image.FromStream(mstream);
It says Parameter not Valid... i am reading all the images from databaseI agree with Viorel. You are getting the error because the format of the data is incorrect probably because the data was modify. It may not be the reading of the database the is incorrect, but the application that wrote the data into the database. You need
to compare the imgg array data with the data before it was written to the database to see if the data matches. I usually start by comparing the number of bytes which is easier to check then compare the actual to isolate which function is changing the
byte count.
An image is binary data. The standard VS methods for reading and writing data (usually stream classes) default to ASCII encoding which will corrupt binary data. The solution usually is to use UTF8 encoding instead of the default ascii encoding.
Ascii encoding with stream often aligns the data and adds extra null bytes to the end of the data which can produce these type errors.
jdweng -
Problem with reading String from Xlsx file.
Hi! I am trying to read string and numerical data from an xlsx file and trying to display its contents in a word file. I tried converting it to a .lvm file too. On using the "Read From Spreadsheet" tool, I get random characters as output. On using " Read From Measurement File" tool, I am getting an error saying "Error 100 occurred at Read From Measurement File->Untitled 1". What do I do? At the end I need to display the output, row by row, in a Microsoft Word file. I am so lost. Please Help.
Solved!
Go to Solution.bsvare wrote:
labview currently does not read directly from an xlsx file. If you convert the xlsx to an xls file first, then you can use the read from spreadsheet tool to load the data from the file.
Hey, I tried doing that. It still just gave the values 0.00 in all the cells of the indicator array. Plus my file has string in it also. The data type in the spreadsheet was "general". Here in the tool, it is "Double". I changed the tool data type to string and spreadsheet to text but I only got gibbrish for my efforts.
Thanks anyway! -
Problem while reading data from Serial Port
Hi All,
I am facing some problem while reading data from Serial Port.
As per the requirement I am writing the data on Serial Port and waiting for response of that data.
Notification for data availabilty is checked with method public void serialEvent(SerialPortEvent event) of javax.comm.SerialPortEventListener.
When we are writing data on the port one thread i.e. "main" thread is generated and when data availability event occures another thread "Win32SerialPort Notification thread" is generated. This creates problem for me as we can't control thread processing.
So can anybody pls explain me how to overcome this problem?
Regards,
NehaMy Problem is:-
I am simoultaneouly wrting data on port & reading data from port.
First I write data on port using outputStream.write() method. Now when target side sends me response back for the request on serial port DATA_AVAILABLE of SerialPortEventListner event occured,we are reading data from serial port.Now till the time we didn't get the response from target next command can't be written on the serial port. When we are writing data on port main thread is executed.Now my problem starts when DATA_AVAILABLE event occured.At this point another thread is created.Due to this my program writes data of next command without reading response of previous command.To solve this prob. I have used wait() & notify() methods as follows.But again due to this my pc hangs after execution of 2 commands. (PC hang in while loop in a code provided below.)
From SOPs I could figure it out that after 2 commands we are not able to write data on serial port so DATA_AVAILABLE event doesn't occure n pro. goes in wait state.
Can anybody help me to solve this issue.
Neha.
Code:
public void serialEvent(SerialPortEvent event)
switch (event.getEventType())
case SerialPortEvent.BI:
case SerialPortEvent.OE:
case SerialPortEvent.FE:
case SerialPortEvent.PE:
case SerialPortEvent.CD:
case SerialPortEvent.CTS:
case SerialPortEvent.DSR:
case SerialPortEvent.RI:
case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
break;
case SerialPortEvent.DATA_AVAILABLE:
try
dataThread = Thread.currentThread();
dataThread.setPriority(10);
dataAvailable = true;
byte[] tempArray=new byte[availableBytes];
inputStream.read(tempArray);
catch (IOException io)
SOP(io, "Error in serialEvent callback call for event DATA_AVAILABLE");
public void writetoPort(byte[] data) throws IOException
outputStream.write(data);
while(finalTimeOut >= actualTime)
if( ! dataAvailable)
actualTime = System.currentTimeMillis();
else
synchronized (mainThread)
mainThread = Thread.currentThread();
mainThread.wait();
public void sendDatatoUser(byte[] b) throws Exception, HWCCSystemFailure
obj.returnData(b);
synchronized(mainThread)
mainThread.notify();
-
i am not able to read text file in 10g forms. using webutil.pll and webutil.lib
here i posted the code . i am not getting message 2, client_text_io.fopen is not working what could be the reason.
DECLARE
in_file client_TEXT_IO.FILE_TYPE;
V_LINE_COUNT number;
linebuf VARCHAR2(1800);
V_var1 varchar2(80);
V_var2 varchar2(80);
V_var3 varchar2(80);
V_var4 varchar2(80);
V_var5 varchar2(80);
filename VARCHAR2(30);
l_var number;
blnRet BOOLEAN;
begin
DELETE FROM NIRU_TEMP;
:file_path:=LTRIM(RTRIM(:file_path));
MESSAGE('1');
in_file := client_text_io.fopen(UPPER(:file_path),'r');
MESSAGE('2');
loop
V_LINE_COUNT := V_LINE_COUNT + 1;
client_text_io.get_line(in_file,linebuf);
MESSAGE('5');
V_var1 := substr(linebuf,1,(instr(linebuf,',')-1)) ;
MESSAGE('6'||V_VAR1);
MESSAGE('6'||V_VAR1);
l_var := length(v_var1);
V_var2 := substr(linebuf,l_var+2,(instr(linebuf,','))) ;
--V_var3 := substr(linebuf,15 ,10 );
V_var2 :=LTRIM(RTRIM(V_var2));
MESSAGE('6'||V_var2);
MESSAGE('6'||V_var2);
:p_id := v_var1;
:p_desc :=v_var2;
--IF V_var2 = '' THEN
--V_var3 :='';
--else
--V_var3 := TO_NUMBER(V_var2) ;
--end if;
--V_var5 := substr(linebuf,26 ,70 );
INSERT INTO NIRU_TEMP VALUES (V_var1,V_var2);
client_text_io.new_line;
:System.Message_Level := '20';
commit;
:System.Message_Level := '0';
--<<end_loop>>
--null;
next_record;
end loop;
client_TEXT_IO.FCLOSE(in_file);
exception
WHEN OTHERS THEN
MESSAGE('ERROR'||SQLCODE||' '||SQLERRM);
--exit;
end;Hello Francois,
You have a solution for this problem?
I have a problem like this. While reading a text file, such as size of 7MB, long, between 15-30 minutes.
See...
declare
arq client_text_io.file_type;
linha varchar2(800);
v_total number := 0;
v_icms number := 0;
begin
:valor_total := 0;
:valor_icms := 0;
arq := client_text_io.fopen(:arquivo,'r');
loop
client_text_io.get_line(arq,linha);
if substr(linha,1,1) = '1' then
v_total := v_total + (to_number(substr(linha,302,13))/100);
v_icms := v_icms + (to_number(substr(linha,262,13))/100);
end if;
end loop;
client_text_io.fclose(arq);
exception
when no_data_found then
:valor_total := v_total;
:valor_icms := v_icms;
message('Realizado com sucesso!');
message('Realizado com sucesso!');
end; -
How to read text file contain chinese character ?
Hi XI Expert,
I have scenario to read text file contain Chinese Character using sender file adapter. but every i was check from sxmb_moni all the chinese character looks different. and also the target file also i has changes.
Please advise me how to maintaine the chinese character in PI 7.0 SP17.
Thank You and Best Regards
FernandHi,
Refer these threads..
Receiver file adapter corrupting characters
Problem in converting special characters in input text file
Here is one more useful guide..
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42
Regards,
Sarvesh
Edited by: Sarvesh Singh on Nov 17, 2008 3:47 PM
Maybe you are looking for
-
Remote App and Desktop RDP client never succeed to logon the RDS gateway server running Windows 2012R2 1. Client Os : Windows 7 Pro 2. Server OS : Windows Server 2012R2 with RDS broker and RDS Gateway server with 3.part Certificate with friendly nam
-
How do I get my computer name to show correctly in the finder?
I recently upgraded to Yosemite and following that upgraded to an SSD drive. Life is good and I am happy with everything except that since the upgrades I am seeing a silly variety of names for my computer. I renamed it to The Shire and now it shows u
-
How do I put a bookmark in a folder I created on the toolbar. Dragging does not work.
I have created a folder on my toolbar but I can't drag bookmarks into it. Whenever I drag the bookmark and it looks like it will be placed in the folder the bookmark is simply repositioned. I've tried right clicking but there is nothing that shows up
-
Download helper converts to .flv instead of .avi
since a few months when downloading a video from the same source, the download helper converts to .flv and no longer to.avi. what do I need to do to have .avi? Even if it downloads as .avi, it converts automatically to .flv . Thank you for help. Rgds
-
Error while Installing Hyperion system 9.0
Hi, my requirement is to install lisence server and BI+ services in system A,and Shared services,BI+ UI services in system B.both are in lan. i installed lisenced server,shared services and BI+ services accordingly and configured successfully. But wh