Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java.net.URISyntaxException: Illegal character in path

 
muhammad fahim
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi master
Sir I use oracle with sun java studio creater and designed the report in ireport and test that give right result in ireport preview

Sir I use this code in studio creater

These file I import
import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body;
import com.sun.rave.web.ui.component.Form;
import com.sun.rave.web.ui.component.Head;
import com.sun.rave.web.ui.component.Html;
import com.sun.rave.web.ui.component.Link;
import com.sun.rave.web.ui.component.Page;
import javax.faces.FacesException;
import com.sun.rave.web.ui.component.Button;
import java.sql.*;
import javax.sql.DataSource;
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.design.*;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.xml.JRXmlLoader;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.view.JasperViewer;
import net.sf.jasperreports.engine.JasperPrintManager;


this code I use

public String button1_action() {
Connection conn = null ;
log("*********** connecting");
try {
javax.naming.Context ctx = new javax.naming.InitialContext() ;
DataSource ds = (DataSource)ctx.lookup(" java:comp/env/jdbc/datasource1" ) ;
conn = ds.getConnection() ;
} catch (Exception ex) {
error(" Error counting rows: " + ex.getMessage() );
log(" Error counting rows: " + ex.getMessage() );
}

JasperReport jasperReport;
JasperPrint jasperPrint;

log("compiling report");
try {

//jasperReport = JasperCompileManager.compileReport("c:/fahimjasper/fahim.jasper");
jasperReport = JasperCompileManager.compileReport("./report/mfa.jasper");

} catch (Exception ex) {
log(" ********* Error compiling report: " + ex.getMessage() );
}
return null;
}
}



but sir when I run project and press button the page not give me resutlt


then I check in server view log file that give me this detail





Caused by: java.net.URISyntaxException: Illegal character in path at index 18: file:/C:/Documents and Settings/Administrator/My Documents/Creator/Projects/WebApplication17/build/web/WEB-INF/lib/log4j-core.jar
at java.net.URI$Parser.fail(URI.java:2809)
at java.net.URI$Parser.checkChars(URI.java:2982)
at java.net.URI$Parser.parseHierarchical(URI.java:3066)
at java.net.URI$Parser.parse(URI.java:3014)
at java.net.URI.<init>(URI.java:578)
at com.sun.enterprise.loader.EJBClassLoader$URLEntry.init(EJBClassLoader.java:848)
... 16 more
|#]
[#|2007-06-16T12:44:13.069+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.deployment|_ThreadID=19;|DPL5109: EJBC - START of EJBC for [WebApplication17]|#]
[#|2007-06-16T12:44:13.069+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.deployment|_ThreadID=19;|Processing beans ...|#]
[#|2007-06-16T12:44:13.069+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.deployment|_ThreadID=19;|DPL5110: EJBC - END of EJBC for [WebApplication17]|#]
[#|2007-06-16T12:44:13.256+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.deployment|_ThreadID=19;|Total Deployment Time: 547 msec, Total EJB Compiler Module Time: 15 msec, Portion spent EJB Compiling: 2%
Breakdown of EJBC Module Time: Total Time for EJBC: 15 msec, CMP Generation: 0 msec (0%), Java Compilation: 0 msec (0%), RMI Compilation: 0 msec (0%), JAX-RPC Generation: 0 msec (0%),
|#]
[#|2007-06-16T12:44:13.334+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.deployment|_ThreadID=19;|deployed with moduleid = WebApplication17|#]
[#|2007-06-16T12:44:13.522+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.admin|_ThreadID=15;|ADM1041:Sent the event to instance:[ApplicationDeployEvent -- reference-added WebApplication17]|#]
[#|2007-06-16T12:44:13.553+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.admin|_ThreadID=15;|ADM1042:Status of dynamic reconfiguration event processing:[success]|#]
[#|2007-06-16T12:44:13.584+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.admin|_ThreadID=14;|ADM1041:Sent the event to instance:[ModuleDeployEvent -- deploy web/WebApplication17]|#]
[#|2007-06-16T12:44:13.615+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=14;|WEB0100: Loading web module [WebApplication17] in virtual server [server] at [/WebApplication17]|#]
[#|2007-06-16T12:44:14.787+0500|WARNING|sun-appserver-pe8.2|org.apache.commons.beanutils.MethodUtils|_ThreadID=14;|Cannot use JVM pre-1.4 access bug workaround die to restrictive security manager.|#]
[#|2007-06-16T12:44:15.022+0500|WARNING|sun-appserver-pe8.2|org.apache.commons.digester.Digester|_ThreadID=14;|[ComponentRule]{faces-config/component} Merge(com.sun.rave.web.ui.Time)|#]
[#|2007-06-16T12:44:15.178+0500|WARNING|sun-appserver-pe8.2|org.apache.commons.digester.Digester|_ThreadID=14;|[ConverterRule]{faces-config/converter} Merge(null,java.math.BigDecimal)|#]
[#|2007-06-16T12:44:15.178+0500|WARNING|sun-appserver-pe8.2|org.apache.commons.digester.Digester|_ThreadID=14;|[ConverterRule]{faces-config/converter} Merge(null,java.math.BigInteger)|#]
[#|2007-06-16T12:44:16.131+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.tools.admin|_ThreadID=14;|ADM1042:Status of dynamic reconfiguration event processing:[success]|#]
[#|2007-06-16T12:46:41.720+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=20;|WebModule[/WebApplication17]*********** connecting|#]
[#|2007-06-16T12:46:41.751+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=20;|WebModule[/WebApplication17] Error counting rows: null|#]
[#|2007-06-16T12:46:41.751+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=20;|WebModule[/WebApplication17]compiling report|#]
[#|2007-06-16T12:46:41.767+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=20;|WebModule[/WebApplication17] ********* Error compiling report: java.io.FileNotFoundException: .\report\mfa.jasper (The system cannot find the path specified)|#]
[#|2007-06-16T12:51:56.968+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=21;|WebModule[/WebApplication17]*********** connecting|#]
[#|2007-06-16T12:51:56.968+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=21;|WebModule[/WebApplication17] Error counting rows: null|#]
[#|2007-06-16T12:51:56.968+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=21;|WebModule[/WebApplication17]compiling report|#]
[#|2007-06-16T12:51:56.984+0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=21;|WebModule[/WebApplication17] ********* Error compiling report: java.io.FileNotFoundException: .\rep





Main error is

Caused by: java.net.URISyntaxException: Illegal character in path at index 18: file:/C:/Documents and Settings/Administrator/My Documents/Creator/Projects/WebApplication17/build/web/WEB-INF/lib/log4j-core.jar


Please give me idea how I get call pdf report

Thank�s

aamir
[ June 16, 2007: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65535
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First thing I'd do is check to see if the file named in the error has been corrupted.
 
markus lehrhuber
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem for the main error are the whitespaces in the uri
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!