JNLP filenotfound exception
Hello,
with build 36, I had a desktop application which uses spring framework. There is an XML file that is read from the classpath, using the ClassPathXmlApplicationContext from spring. The XML file is in the root of my jar file. JNLP is used to release the application (on Tomcat). Everything worked as expected.
With build 37 and 38, I have a FileNotFoundException when running with JNLP. Running in IDE works fine.
Has anyone else found resource / classpath problems when running with JNLP?
kind regards,
Peter
The exception:
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext-ehBoxClient-core.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext-ehBoxClient-core.xml] cannot be opened because it does not exist
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:126)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:92)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
Oddly, now that the FileNotFound exception, but another IOException is thrown
C:\>jar cmf h.txt Hello.jar Hello.class
java.io.IOException: invalid header field name: Main-Class
at java.util.jar.Attributes.read(Attributes.java:403)
at java.util.jar.Manifest.read(Manifest.java:167)
at java.util.jar.Manifest.<init>(Manifest.java:52)
at sun.tools.jar.Main.run(Main.java:124)
at sun.tools.jar.Main.main(Main.java:904)
C:\>
Similar Messages
-
File LookUp in the MM : FileNotFound Exception
Hello Friends,
I am trying to fetch a file during the message mapping. The code I have written in the UDF is as follows :
<u>
String company = "";
HashMap fileMap = new HashMap();
BufferedReader reader = new BufferedReader(new FileReader("C:
testfolder
Mydata.txt"));
String line = "";
while((line = reader.readLine())!=null)
String[] lineArray = line.split(",");
fileMap.put(lineArray[1], lineArray[0]);
company = (String) fileMap.get(a);
return company; </u>
<b>
But I am getting the FileNotFound Exception when I tried to run the interface mapping.
I have confirmed that file is there in the respective folder.
1. Can we use the above code to fetch the file ?
2. Do we need to put the file in the XI server ?
</b>
Thanks for your time.
~PRANAVand what exactly you are trying to do with this code ?
to access files,you need to use Java io api's,and you can access file from any server,not just XI server
but there are few drawbacks with this,first of all the file name and path will be hardcoded so u need to change it every time you move your file from Dev to QA to Prd.
secondly this approach is good to read the file,but not a very good idea to write something in the file
Thanx
Aamir -
Hello I am trying to parse an xml file chosen by the user. The file chosen is under:
wkdis3/home/bwe but everytime i got this exception:
ption caught: class java.io.FileNotFoundException
Datei AABC.XML ist nicht g�ltig.java.io.FileNotFoundException: \home\bwe\AABC.XML (Das System kann den angegebenen Pfad nicht finden)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:78)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:99)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:164)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at ParseTest.<init>(ParseTest.java:51)
at ParseTest.main(ParseTest.java:105)
has anyone any idea baout that? and the main metode is so:
public static void main(String[] args) {
// Work with /Dir/File.txt on the system wkdis3.
AS400 system = new AS400("wkdis3");
IFSJavaFile dir = new IFSJavaFile(system, "/home/bwe");
JFileChooser chooser = new JFileChooser(dir, new IFSFileSystemView(system));
Frame parent = new Frame();
int returnVal = chooser.showOpenDialog(parent);
if (returnVal == JFileChooser.APPROVE_OPTION) {
IFSJavaFile chosenFile = (IFSJavaFile)(chooser.getSelectedFile());
System.out.println("You selected the file named " +
chosenFile.getName());
String filename = chosenFile.getName()
try{
File file= chosenFile;
ParseTest xIncludeTest = new ParseTest(file);
}catch(Exception e) {
// System.out.println("Exception"+e+ "ist gefunden. /n ");
System.out.println("Exception caught: "+e.getClass());
System.out.println("Datei "+filename+" ist nicht g�ltig.");
e.printStackTrace();
}//ende catch
}//Ende if
} //ende main()
}/Thanks alot Mike ..The tips you gave were very helpful..I could solution using the Object IFSJavaFile, cause when i make :
IFSJavaFile chosenFile = (IFSJavaFile)(chooser.getSelectedFile());
II was getting only the path but not the system and when the systems are different(you were right XMl files were on OS400) then i got the FileNotFound Exception always.Down is the corrected main methode:
public static void main(String[] args) {
try{
// Work with /Dir/File.txt on the system wkdis3.
AS400 system = new AS400("wkdis3");
IFSJavaFile dir = new IFSJavaFile(system, "//wkdis3/ROOT/home/bwe/");
String directory0 = dir.getParent();
System.out.println ("Directory0: " + directory0);
String directory4=dir.getCanonicalPath();
System.out.println ("Canonicalpath-Directory4: " + directory4);
// IFSJavaFile dir = new IFSJavaFile( "\\wkdis3\ROOT\home\bwe");
JFileChooser chooser = new JFileChooser(dir, new IFSFileSystemView(system));
Frame parent = new Frame();
int returnVal = chooser.showOpenDialog(parent);
if (returnVal == JFileChooser.APPROVE_OPTION) {
IFSJavaFile chosenFile = (IFSJavaFile)(chooser.getSelectedFile());
System.out.println("You selected the file named " +
chosenFile.getName());
String filename = chosenFile.getName();
IFSJavaFile file = new IFSJavaFile(system,directory4+filename);
ParseTest xIncludeTest = new ParseTest(file);
}//ende if
catch(Exception e) {
// System.out.println("Exception"+e+ "ist gefunden. /n ");
System.out.println("Exception caught: "+e.getClass());
// System.out.println("Datei "+filename+" ist nicht g�ltig.");
e.printStackTrace();
} -
New ReportDocument() thows System.IO.FileNotFound exception
I've inherited a Visual Studio 2003 windows service that uses managed C++ and C# + Crystal to print reports. It was using Crystal 9 and now I'm trying to upgrade it to Crystal 11.
Most of the windows service is in managed C++ but the Crystal part is in C#. Basically it does a new ReportDocument, loads a report file, feeds it a dataset and some parameters and uses ReportDocument.PrintToPrinter(...) to output it.
Everything still compiles after moving to Crystal 11 but I get a System.IO.FileNotFound exception when it gets to
m_rptDocument = new ReportDocument();
The exception doesn't include any information as to which file is not found. So far FileMon hasn't been very helpful. there are too many NOT FOUND results generated just as part of the normal running. I tried a simplified test windows service and that seemed to work.
I assume it is some sort of dependency issue. Does anyone have any ideas how I can uncover the problem source?
Thanks.
BenThe service pack helped a little. I'm getting different errors now. They are a little more informative. 4 exceptions all stemming from doing a new ReportDocument();
Exception: {com.crystaldecisions.common.keycode.KeycodeException.ReadingFromRegistry} com.crystaldecisions.common.keycode.KeycodeException.ReadingFromRegistry
Stack: businessobjects.licensing.keycodedecoder.dll!com.crystaldecisions.common.keycode.KeycodeCollectionImpl.Load(string location = @"Software\Business Objects\Suite 11.5\Crystal Reports\Keycodes\CR Ent") + 0xbd bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument. (string 9 = @"Software\Business Objects\Suite 11.5\Crystal Reports\Keycodes\CR Ent") + 0x29 bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.~() + 0xb1 bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.z() + 0x6b bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.ReportDocument() + 0xc5 bytes
Exception: {com.crystaldecisions.common.keycode.KeycodeException.UnknownProperty} com.crystaldecisions.common.keycode.KeycodeException.UnknownProperty
Stack: businessobjects.licensing.keycodedecoder.dll!com.crystaldecisions.common.keycode.KeycodeCollectionImpl.GetProperty(string propName = "CRSDK.InProc", long version = 115) + 0xa9 bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.(com.crystaldecisions.common.keycode.KeycodeCollection - = {com.crystaldecisions.common.keycode.KeycodeCollectionImpl}, string 0 = "CRSDK.InProc", int 1 = 115, long 2 = 0) + 0x3e bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument. (com.crystaldecisions.common.keycode.KeycodeCollection 3 = {com.crystaldecisions.common.keycode.KeycodeCollectionImpl}, int 4 = 115) + 0x4a bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument. (string 9 = @"Software\Business Objects\Suite 11.5\Crystal Reports\Keycodes\CR Dev") + 0x36 bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.~() + 0xb1 bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.z() + 0x6b bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.ReportDocument() + 0xc5 bytes
Exception: com.crystaldecisions.common.keycode.KeycodeException {com.crystaldecisions.common.keycode.KeycodeException.UnknownProperty} com.crystaldecisions.common.keycode.KeycodeException
Stack: businessobjects.licensing.keycodedecoder.dll!com.crystaldecisions.common.keycode.KeycodeCollectionImpl.GetProperty(string propName = "CRSDK.Queuing", long version = 115) + 0xa9 bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.(com.crystaldecisions.common.keycode.KeycodeCollection - = {com.crystaldecisions.common.keycode.KeycodeCollectionImpl}, string 0 = "CRSDK.Queuing", int 1 = 115, long 2 = 0) + 0x3e bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument. (com.crystaldecisions.common.keycode.KeycodeCollection 3 = {com.crystaldecisions.common.keycode.KeycodeCollectionImpl}, int 4 = 115) + 0x6b bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument. (string 9 = @"Software\Business Objects\Suite 11.5\Crystal Reports\Keycodes\CR Dev") + 0x36 bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.~() + 0xb1 bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.z() + 0x6b bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.ReportDocument() + 0xc5 bytes
Exception: {com.crystaldecisions.common.keycode.KeycodeException.UnknownProperty} com.crystaldecisions.common.keycode.KeycodeException.UnknownProperty
Stack: businessobjects.licensing.keycodedecoder.dll!com.crystaldecisions.common.keycode.KeycodeCollectionImpl.GetProperty(string propName = "CRSDK.CPL", long version = 115) + 0xa9 bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.(com.crystaldecisions.common.keycode.KeycodeCollection - = {com.crystaldecisions.common.keycode.KeycodeCollectionImpl}, string 0 = "CRSDK.CPL", int 1 = 115, long 2 = 1) + 0x3e bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument. (com.crystaldecisions.common.keycode.KeycodeCollection 3 = {com.crystaldecisions.common.keycode.KeycodeCollectionImpl}, int 4 = 115) + 0x8c bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument. (string 9 = @"Software\Business Objects\Suite 11.5\Crystal Reports\Keycodes\CR Dev") + 0x36 bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.~() + 0xb1 bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.z() + 0x6b bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.ReportDocument() + 0xc5 bytes
Exception: {com.crystaldecisions.common.keycode.KeycodeException.ReadingFromRegistry} com.crystaldecisions.common.keycode.KeycodeException.ReadingFromRegistry
Stack: businessobjects.licensing.keycodedecoder.dll!com.crystaldecisions.common.keycode.KeycodeCollectionImpl.Load(string location = @"Software\Business Objects\Suite 11.5\Enterprise\CRNETKeycode") + 0xbd bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument. (string 9 = @"Software\Business Objects\Suite 11.5\Enterprise\CRNETKeycode") + 0x29 bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.~() + 0xb1 bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.z() + 0x6b bytes
crystaldecisions.crystalreports.engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.ReportDocument() + 0xc5 bytes
It acts like it is having trouble accessing registry keys, but I'm not sure why. I have permissions and the first key exists. The last one is missing, CRNETKeycode. -
HttpURLConnection throws a FileNotFound exception
Hi Everybody,
I want to post the data to a remote servlet using HttpURLConnection.
But it throws a FileNotFound exception. Pls send me the solution.
My code is
First Servlet:
==============
import java.io.*;
import java.net.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Test extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
response.setContentType("text/html");
URL url = new URL("http://node_18:8080/examples/servlet/HelloWorldExample1");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
//HttpURLConnection.setFollowRedirects(true);
conn.setUseCaches(false);
conn.setDoOutput(true);
conn.setDoInput(true);
String postData = "name=value&othername=value";
String lengthString = String.valueOf(postData.length());
conn.setRequestProperty("Content-Length", lengthString);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
Writer out = new OutputStreamWriter(conn.getOutputStream());
out.write(postData);
out.close();
PrintWriter out1 = response.getWriter();
BufferedReader in =
new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line = null;
while (null != (line = in.readLine()))
out1.println(line);
in.close();
out1.close();
Second Servlet:
================
import java.io.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorldExample1 extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String name = request.getParameter("name");
String othername = request.getParameter("othername");
System.out.println("name = "+name+" othername = "+othername);
out.println("<html>");
out.println("<head>");
out.println("<title> Test </title>");
out.println("</head>");
out.println("<body bgcolor=\"white\">");
out.println("Test");
out.println("</body>");
out.println("</html>");
public void destroy() {
System.out.println("Servlet Destroyed");
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
doPost(request,
response);
Error:
=======
java.io.FileNotFoundException: http://node_18:8080/examples/servlet/HelloWorldExample1
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:574)
at Test.doGet(Test.java:37)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:471)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:623)
at java.lang.Thread.run(Thread.java:484)Hi p200002,
I call doPost method in doPost in the second servlet. It will be
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
doGet(request,
response);
} -
Strange javax.ejb.EJBException FileNotFound Exception though form is found
Hi,
I've set up a simple workflow, which consists of two user QPACs, which are connected to each other, let's call the first one 'user' and the second one 'admin'.
I use a simple init-form, which merely consists of a dropdown and a submit button.
The workflow works fine: 'user' selects a value from the dropdown-list, submits the form, 'admin' opens the form, the dropdown's value is still selected.
However, in the logfile, the following exception is thrown:
INFO [STDOUT] Got tempFile : D:\Adobe\LiveCycle\temp\adobejb\DM4268780530925093172.dir\DM6500814794164759285.pdf
INFO [STDOUT] com.adobe.fm.extension.formserver.AresUtil getPDFDocument
INFO: Loading the PDF.
INFO [STDOUT] com.adobe.fm.extension.formserver.AresUtil setPdfRights
INFO: BufLength : 100415
ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException:
javax.ejb.EJBException: FileNotFound Exception: File [/fm//Forms/test_dropdown.xdp] not found
at com.adobe.ebxml.registry.appstore.url.provider.XappstoreUrlDataProviderBean.getInputStream(XappstoreUrlDataProviderBean.java:193)
at sun.reflect.GeneratedMethodAccessor419.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
As the workflow works, I could easily forget about the exception. But it outputs a couple of thousand(!) lines in the logfile each time, the form's submit button is pressed.
Does anyone know, why do I get a FileNotFound exception though the workflow works fine???
The exception may result from the incorrect path, which contains
//. But why is the form then loaded anyway?
Regards,
SteveHi Steve
I'm not sure what the cause of the problem is.
One thing...do you use the same form all the way through your process?
If so, you should just be moving your form url information via your form variable. You would only choose "Change the form template Url to:" field if there was a different version of the form at this step. It doesn't hurt to do it but there is no need to. This is extra overhead.
To use the same form all the way through the WF and move the data from each step:
1) specify an init-form
2) specify a form variable
3) on the Mappings tab of your user QPAC you select your form variable as your "Input Variable" and select "use form template Url defined by Input Form Variable".
4) also on the Mappings tab of your user QPAC you select your form variable as your "Output Variable"
(You are probably not doing this, but there is also no need to fill in the template-url field in your form variable.)
Diana -
Problem with reading from DAT file. FileNotFound exception
Can't seem to find the issue here. Two files, one (listOfHockeyPlayers) reads from a DAT file a list of players. The other (HockeyPlayer) has just the constructor to make a new hockey player from the read data.
import javax.swing.*;
import javax.swing.event.*;
import java.util.*;
import java.awt.*;
import java.io.*;
public class ImportHockeyPlayers
private ArrayList<HockeyPlayer> listOfHockeyPlayers = new ArrayList<HockeyPlayer>();
public ImportHockeyPlayers(String fileName)
throws FileNotFoundException
try
Scanner scan = new Scanner(new File(fileName));
while (scan.hasNext())
//Uses all the parameters from the HockeyPlayer constructor
String firstName = scan.next();
String lastName = scan.next();
int num = scan.nextInt();
String country = scan.next();
int dob = scan.nextInt();
String hand = scan.next();
int playerGoals = scan.nextInt();
int playerAssists = scan.nextInt();
int playerPoints = playerGoals + playerAssists;
//listOfHockeyPlayers.add(new HockeyPlayer(scan.next(),scan.next(),scan.nextInt(),scan.next(),scan.nextInt(),scan.next(),
//scan.nextInt(),scan.nextInt(),scan.nextInt()));
catch(FileNotFoundException e)
throw new FileNotFoundException("File Not Found!");
public String toString()
String s = "";
for(int i = 0; i < listOfHockeyPlayers.size(); i++)
s += listOfHockeyPlayers.get(i);
return s;
public class HockeyPlayer
private String playerFirstName;
private String playerLastName;
private int playerNum;
private String playerCountry;
private int playerDOB;
private String playerHanded;
private int playerGoals;
private int playerAssists;
private int playerPoints;
public HockeyPlayer(String firstName, String lastName, int num, String country, int DOB,
String hand, int goals, int assists, int points)
this.playerFirstName = firstName;
this.playerLastName = lastName;
this.playerNum = num;
this.playerCountry = country;
this.playerDOB = DOB;
this.playerHanded = hand;
this.playerGoals = goals;
this.playerAssists = assists;
this.playerPoints = goals + assists;
DAT File
Wayne Gretzky 99 CAN 8/13/87 R 120 222
Joe Sakic 19 CAN 9/30/77 L 123 210These are all in early development, we seem to have the idea down but keep getting the odd FileNotFound exception when making an object of the ImportHockeyPlayers class with the parameter of the DAT file.
We might even be on the wrong track with an easier way to do this. To give you an idea of what we want to do...read from the file and be able to pretty much plug in al lthe players into a GUI with a list of the all the players.
Thanks for your time.Thanks for the tip on the date format...good to
know.
public static void main(String[] args)
GUI gui = new GUI();
ImportHockeyPlayers ihp = new
ImportHockeyPlayers("HockeyPlayers.dat");
}It's just being called in the main.
Throws this error:
GUI.java:39: unreported exception
java.io.FileNotFoundException; must be caught or
declared to be thrown
ImportHockeyPlayers ihp = new
ImportHockeyPlayers("HockeyPlayers.dat");
^This error is simply telling you that an exception may occur so you must enclose it in a try catch block or change the main method to throw the exception as follows
public static void main(String[] args) throws
java.io.FileNotFoundException {
GUI gui = new GUI();
ImportHockeyPlayers ihp = new
ImportHockeyPlayers("HockeyPlayers.dat");
}or
public static void main(String[] args) {
GUI gui = new GUI();
try {
ImportHockeyPlayers ihp = new
ImportHockeyPlayers("HockeyPlayers.dat");
catch (FileNotFoundException e) {
System.out.println("error, file not found");
}I would reccomend the second approch, it will be more helpful in debugging, also make sure that the capitalization of "HockeyPlayers.dat" is correct
hope that helps -
Getting JNLP error: "exception: Unable to load resource:-"
I've posted this question in Stackoverflow... but didn't get any answer...
Hi Guys,
I'm brand new to JNLP.
I've been trying to fix this for straight 2 days... I have no clue...
I've a dynamic web project in eclipse. And I wanted to append an Applet in html. It works fine, if I append it without using jnlp. But if I use jnlp, its throws exception...
Please help me....
Here is my package structure:
DaaS
DaaS\WebContent
\WebContent\AppletToJS.html
\WebContent\appletToJS.jnlp
\WebContent\FirstApplet.jar
"FirstApplet.jar" contains the Applet class - AppletToJS.java
Here is my `jnlp` file:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp href="appletToJS.jnlp">
<information>
<title>Dynamic Tree Demo</title>
<vendor>Dynamic Team</vendor>
</information>
<resources>
<!-- Application Resources -->
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se" />
<jar href="FirstApplet.jar" main="true" />
</resources>
<applet-desc
name="Applet To JS"
main-class="acid.AppletToJS"
width="300"
height="300">
</applet-desc>
<update check="background"/>
</jnlp>
Here is my `html` file:
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
<body>
<script src="http://www.java.com/js/deployJava.js"></script>
<script>
var attributes = { code:"acid.AppletToJS", width:100, height:100} ;
var parameters = {jnlp_href: "appletToJS.jnlp"} ;
deployJava.runApplet(attributes, parameters, "1.6");
</script>
<!-- <applet codebase="./jars" archive="FirstApplet.jar" Code="acid.appletToJS.class" width=200 Height=100></applet> -->
<p id="summary"/>
</body>
</html>
while I run my html page I got following error:
<code>
exception: Unable to load resource: http://localhost:8080/jars/FirstApplet.jar.
com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://localhost:8080/jars/FirstApplet.jar
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by:
java.io.FileNotFoundException: http://localhost:8080/jars/FirstApplet.jar
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doGetRequest(Unknown Source)
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://localhost:8080/jars/FirstApplet.jar
</code>
**http://localhost:8080/jars/FirstApplet.jar**
- I really don't understand where the hell "/jars" coming from???
- My project name is "DaaS" and my jar, html page and jnlp page are in same directory. And I'm running my html page on tomcat-7 server.
Edited by: user1202074 on Feb 7, 2012 4:24 PM
Edited by: user1202074 on Feb 7, 2012 4:24 PMIt must be coming from the commented-out <applet> tag somehow.
You aren't specifying an 'id' element. See the Deploy Java Toolkit documentation. -
Dynamic JNLP causes exception on 1st run after java install
I have a dynamic JNLP file (php) which runs my software. It works just fine, except for the 1st time it is run after a user has installed Java.
I get the exception; "The following field was missing from the jnlp file: <jnlp>". When I look at the jnlp code in JWS in the "Launch File" tab of the error message, I see that the JNLP is not there - but the page the user would see if he was not logged into the system (as if JWS has cached the file or something).
If I close it down, press F5 to refresh, and run it again everything works fine.
I'm running the dyanmic.jnlp?dummy=randomnumber943934 to prevent caching. In addition, these headers are sent: (php code)
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
// HTTP/1.0
header("Pragma: no-cache");.. so nothing should be cached. But I'm not sure that's where the problem is - cause it only happens the first time after a java install.
Any clues?I think you're dynamicallt created jnlp is invalid in someway; I can use the following without any problems:
<?php
header("Content-type: application/x-java-jnlp-file");
echo "<?xml version=\"1.0\" ?>\n";
$codebase = trim(stripslashes(urldecode($_REQUEST["codebase"])));
$href = trim(stripslashes(urldecode($_REQUEST["href"])));
echo "<jnlp spec=\"1.0+\" codebase=\"$codebase\" href=\"$href\">\n";
?>
</jnlp>
you should try and test the output of your generated code, something like this should work:
test.php
<html>
<body>
<textarea rows=20 cols=70>
<?php
include 'mydynamicscript.php';
?>
</textarea>
</body>
</html>
The first time a jnlp is called it is downloaded into the browser cache and javaws.exe is executed on it from that location, this in turn downloads the jnlp again from the passed codebase & href attributes into the jws cache. Subsequent calls the jnlp are extracted from the copy in the webstart cache, and often downloaded from the codebase & href attributes when it detects possible changes. In your case these jnlp files seem to differ.
- Richard -
Dynamic IO throws java.io.FileNotFound exception
Hi, I have the following class ( a prototype) which I want to use to display the contents of any file. I plan to work on this more so it puts it onto a Panel in a different section to the input, but bear with me.
When I enter a file name (even with a full path), it generates the following:
Enter source file to list :
Watch.java
You entered : Watch.java
Error -- java.io.FileNotFoundException: Watch.java
(The filename, directory name, or volume label syntax is incorrect)
Here is the source code. What am I doing wrong ? If I change the FileReader object and hard code a file name, it works fine. Please help. Thanks.
import java.io.*;
public class ReadSource2
public static String inline()
StringBuffer response = new StringBuffer();
try
{ BufferedInputStream buff = new BufferedInputStream(System.in);
int in = 0;
char inChar;
do {
in = buff.read();
inChar = (char) in;
if (in != -1) response.append(inChar);
} while ((in != -1) && (inChar != '\n'));
buff.close();
return response.toString();
catch (IOException e)
{ System.out.println("Exception: " + e.getMessage());
return null;
public static void main(String[] args)
System.out.println("\nEnter source file to list : ");
String input = ReadSource2.inline();
System.out.println("You entered : " + input);
try
{ FileReader file = new FileReader("" + input);
BufferedReader buff = new BufferedReader(file);
boolean eof = false;
while (!eof)
String line = buff.readLine();
if (line == null) eof = true;
else System.out.println(line);
buff.close();
catch (IOException e) { System.out.println("Error -- " + e.toString()); }
}I solved this by trial and error (more error than trial). What was happening was that I was capturing the carriage return as part of the file name, so I had to truncate it from the file name and it now works fine. I made the followingf modification to the main() method:
input = input.substring(0, input.length() - 2) ;
and it works like a charm.
Of course if I hit a Tab before carriage return, it blows up just as it did before, so it is not completely idiot-proof yet, but should be OK for 99% of the time. This now also works for windows files (just HAD to test), where a space in the file name is legitimate.
Case closed. Lesson learned. -
FileNotFound exception from getInputStream of HttpsURLConnection
All,
I'm in a bad way here and can use any input you may have. In our production application on Weblogic 8.1 SP 6, we have the following exception being thrown in the getInputStream() of an open weblogic.net.http.HttpsURLConnection:
java.io.FileNotFoundException: Response: '500: Internal Server Error' for url: 'https://xxxxxxxxxxxxx'
The problem is intermittent but has been recently occurring with great frequency. The only difference in tcpdumps of sunny day vs. this error scenario seems to be that our system (client) does not send a FIN (connection termination) after receiving data from the server in the error scenario. As the data is encrypted, I can't see precisely what the server is passing back. The server that we are connected to has no detailed logging and I cannot answer the immediate question "Is this a client side problem or server side problem?". Any assistance would be greatly appreciated.
thanks - DanHi,
did you place setWLSEnv in your path ?
----Anilkumar kari -
IO or FileNotFound Exception catch does not work for getRequestDispatcher
Hi,
I am trying to catch IOException / FileNotFoundException in my servlet for the call to getRequestDispatcher().forward(request, response) and than throw user define exception from that catch. I am using JDeveloper 10.1.3. Some how the control is not going to catch block when the file does not exist to forward. But instead JDeveloper is throwing its own exception with error mesg
NOTIFICATION J2EE JSP0008 Unable to dispatch JSP Page : java.io.FileNotFoundException:
and browser shows standard 404 File Not Found error page. I would rather have want to display appropriate error page. Here is my code:
try
System.out.println("in try");
context.getRequestDispatcher("/" + currentScreen).forward(request, response);
System.out.println("after try");
catch(java.io.IOException fileNotFoundEx)
System.out.println("runtime exception");
logger.error(CLASS_OBJECT, "f n f "+RootException.getStackTraceString(fileNotFoundEx));
throw new RequestHandlerException("requestHandlerError", fileNotFoundEx);
Here is the output on console:
06/08/01 10:35:18 in try
2006-08-01 10:35:18.921 NOTIFICATION J2EE JSP0008 Unable to dispatch JSP Page : java.io.FileNotFoundException: F:\JavaProjects\WorkspaceDev\CorAssessment\web\jsp\assessment_multi_view1.jsp (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at oracle.jsp.provider.JspFilesystemResource.fromStream(JspFilesystemResource.java:150)
at oracle.jsp.parse.XMLUtil.getFromStream(XMLUtil.java:228)
at oracle.jsp.runtimev2.JspPageCompiler.compilePage(JspPageCompiler.java:341)
at oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:610)
at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:634)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:370)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:270)
at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:42)
at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:204)
at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)
at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
at com.nexcom.cor.manager.ViewManager.forwardToNextScreen(ViewManager.java:142)
at com.nexcom.cor.controller.FrontController.doProcess(FrontController.java:85)
at com.nexcom.cor.controller.FrontController.doGet(FrontController.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:534)
06/08/01 10:35:18 after try
It does not goto catch block and not printing message from System.out.You can map error codes to a specific jsp in your web.xml file, and add a parameter to the jsp that will display the message you intend to display back to the user.
Example:
<error-page>
<error-code>404</error-code>
<location>/index.html</location>
</error-page>
You can also trap specific exceptions by doing the following:
<error-page>
<exception-type> java.lang.Exception </exception-type>
<location>/ErrorPage.jsp</location>
</error-page> -
FileOutputStream FileNotFound exception creating files on mounted disk
I am quite new to java, I cannot figure out why I get a File Not Found exception when opening file for output on a remote disk mounted locally as Z:
java.io.FileNotFoundException: z:\tmp\newfile.tmp (Cannot find the specified path)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
No problem when using local disk (ex. D:)
Java version: 1.6.0.11, application server: Tomcat 6.0.14 running on Windows XP Pro SP2
Can anyone help ?
Thanks in advancema.poggi wrote:
Yes.
Apache Tomcat is installed as a Windows Service, and I tried running it with "local system" account and administrator account, but no luck.The network drive isn't mapped when it's running. You need to enable "interact with desktop", and have the drive mapped for the user.
Kaj -
FileNotFound Exception thrown from jsp:include ...
Hi
I'm using JSP on OC4J 9.0.2.1 and I'm running a JSP in application A that includes another JSP in application B. I use virtual path and absolute path to point to the jsp but I get the following error:
OracleJSP: java.io.FileNotFoundException:
Set the init-param debug_mode to "true" to see the complete exception message.can you provide more details on how your accessing the jsp, are you using the jsp provider ?
The jsp provider uses a different jsp engine from the web server. -
JSPC Compiler gives FileNotFound Exception from command line
I have problem running jspc from command line
From the browser, the jsp pages compile fine.
I have tested this on NT 4.0 and on HP UX 10.0 with Weblogic Server
4.5.1 and SP 9.
The command I typed in as follows:
$java weblogic.jspc -d /opt/b2berp/jspclassfiles/ - docroot
/opt/b2berp/web -keepgenerated true -classpath
/opt/jdk/1.2.2/lib/classes.zip:/opt/weblogic/weblogicaux.jar:/opt/b2berp/lib
I get the following exception:
I checked the file is in PATH and I am also specifying the absolute path
and filename.
My document directory is /opt/b2berp/web/auctions/
All of my jsp pages are under /opt/b2berp/web
This is also my web folder.
Gives error unable to find file
(FileNotFoundException)
Does anyone know what is going on.
Rauf
Hi,
did you place setWLSEnv in your path ?
----Anilkumar kari
Maybe you are looking for
-
Has anyone installed Windows 8 on MacBook Pro? Is it best to use Boot Camp or virtual software in order to maximize the Mac trackpad usage in Windows 8 (for a better "touch screen type" experience)? Will virtual software suck the power out of the Mac
-
My Samsung CLP300N has stopped printing after 10.6.5 update
The Samsung CLP300N printer, connected to the network as an IPP printer, does not print anymore from my iMac after upgrading Mac OS X to 10.6.5. The printer doesn't work even in the parallels windows XP virtual machine. The error reported in the cons
-
For-Each/Group by...problem
Hi, I have a sample xml below <root> <objective-sect index="3"> <fm-objective index="1" removable="true"> <fm-obj-name>value 01</fm-obj-name> </fm-objective> <fm-objective index="2" removable="true"> <fm-obj-name>value 02</fm-obj-name> </fm-objective
-
Current iMac boots up using an external HD. Connected via FW800. Just bought new macbook air and a new external HD with thunderbolt. I want to use the same HD content to boot up my new macbook air. Can I simply copy (click and drag) the old HD to m
-
Using Adobe Illustrator and Cad
I'm working on a project. I designed a section view of my house in Cad 2013 and I want to add color and people to it in Illustrator CS6. How do I go about doing this. I've tried opening a pdf and adding color, but I can never select and anything to a