воскресенье, 9 августа 2009 г.
четверг, 30 июля 2009 г.
пятница, 24 июля 2009 г.
|
| Oh,I'm SOrry,I get the same problem Guest 05:50:45 |
| | Oh,I'm SOrry,I get the same problem |
| | Add comment |
пятница, 17 июля 2009 г.
|
| I had a similar problem. I was encoding a string using... Guest 14:55:51 |
| | I had a similar problem. I was encoding a string using "DESEDE", a key generated for "DESEDE", and didn't define the "encoding".
I got it to work by setting the "ecoding to "hex" and now it is working. |
| | 2 answer | Add comment |
|
| public class SimpleReport extends Report { private static... Guest 03:43:01 |
| | public class SimpleReport extends Report { private static final Logger logger = Logger.getLogger(SimpleReport.class);
protected SimpleDateFormat GeneratedDateFormatter = new SimpleDateFormat("dd MMM yyyy HH:mm");
protected String jasperFileName; protected JasperReport jasperReport;
public SimpleReport(String jasperFileName) throws Exception { this.jasperFileName = jasperFileName;
jasperReport = (JasperReport) JRLoader.loadObject(new File(jasperFileName)); }
public void generateReport( Connection con, HashMap reportParams, String reportPath, String ucn, String clientFirstName, String clientSecondName, String formattedReportDate) {
JasperPrint jasperPrint = null; JRPdfExporter exporter = null;
try { HashMap params = new HashMap(); params.putAll(reportParams); params.put("generatedDate", GeneratedDateFormatter.format(new Date())); params.put("ucn", ucn); params.put("clientFirstName", clientFirstName); params.put("clientSecondName", clientSecondName);
jasperPrint = JasperManager.fillReport(jasperReport, params, con);
String reportFileName = reportPath+ucn+"_"+formattedReportDate+"_"+reportName+".pdf"; File reportFile = new File(reportFileName);
exporter = new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_FILE, reportFile); exporter.setParameter(JRPdfExporterParameter.IS_ENCRYPTED, Boolean.TRUE); exporter.setParameter(JRPdfExporterParameter.IS_128_BIT_KEY, Boolean.TRUE); exporter.setParameter(JRPdfExporterParameter.METADATA_TITLE, reportName); exporter.setParameter(JRPdfExporterParameter.METADATA_AUTHOR, "OneWealth"); exporter.setParameter(JRPdfExporterParameter.METADATA_SUBJECT, reportName); exporter.setParameter(JRPdfExporterParameter.METADATA_CREATOR, "OneWealth Online"); exporter.setParameter(JRPdfExporterParameter.PERMISSIONS, new Integer(PdfWriter.AllowPrinting));
exporter.exportReport(); } catch (Exception e) { e.printStackTrace(System.out); logger.error(e); } finally { jasperPrint = null; exporter = null; } }
public String getJasperFileName() { return jasperFileName; }
public void setJasperFileName(String string) { jasperFileName = string; }
}
public class SimpleReport extends Report { private static final Logger logger = Logger.getLogger(SimpleReport.class);
protected SimpleDateFormat GeneratedDateFormatter = new SimpleDateFormat("dd MMM yyyy HH:mm");
protected String jasperFileName; protected JasperReport jasperReport;
public SimpleReport(String jasperFileName) throws Exception { this.jasperFileName = jasperFileName;
jasperReport = (JasperReport) JRLoader.loadObject(new File(jasperFileName)); }
public void generateReport( Connection con, HashMap reportParams, String reportPath, String ucn, String clientFirstName, String clientSecondName, String formattedReportDate) {
JasperPrint jasperPrint = null; JRPdfExporter exporter = null;
try { HashMap params = new HashMap(); params.putAll(reportParams); params.put("generatedDate", GeneratedDateFormatter.format(new Date())); params.put("ucn", ucn); params.put("clientFirstName", clientFirstName); params.put("clientSecondName", clientSecondName);
jasperPrint = JasperManager.fillReport(jasperReport, params, con);
String reportFileName = reportPath+ucn+"_"+formattedReportDate+"_"+reportName+".pdf"; File reportFile = new File(reportFileName);
exporter = new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_FILE, reportFile); exporter.setParameter(JRPdfExporterParameter.IS_ENCRYPTED, Boolean.TRUE); exporter.setParameter(JRPdfExporterParameter.IS_128_BIT_KEY, Boolean.TRUE); exporter.setParameter(JRPdfExporterParameter.METADATA_TITLE, reportName); exporter.setParameter(JRPdfExporterParameter.METADATA_AUTHOR, "OneWealth"); exporter.setParameter(JRPdfExporterParameter.METADATA_SUBJECT, reportName); exporter.setParameter(JRPdfExporterParameter.METADATA_CREATOR, "OneWealth Online"); exporter.setParameter(JRPdfExporterParameter.PERMISSIONS, new Integer(PdfWriter.AllowPrinting));
exporter.exportReport(); } catch (Exception e) { e.printStackTrace(System.out); logger.error(e); } finally { jasperPrint = null; exporter = null; } }
public String getJasperFileName() { return jasperFileName; }
public void setJasperFileName(String string) { jasperFileName = string; }
}
public abstract class Report { protected String reportName;
public abstract void generateReport(Connection con, HashMap reportParams, String reportPath, String ucn, String clientFirstName, String clientSecondName, String formattedReportDate);
public String getReportName() { return reportName; }
public void setReportName(String string) { reportName = string; }
}
|
| | Add comment |
понедельник, 8 июня 2009 г.
|
| wow this was posted 6 years ago, i need to do this because... Guest 00:10:10 |
| | wow this was posted 6 years ago, i need to do this because i have a long running php process which i have developed for a php app.. hte unix gods here at my work do not want to run it for a number of reasons (apache performance etc) and they wont install php executable! the only other supported language is perl!
That's why i'd bother |
| | 1 answer | Add comment |
среда, 3 июня 2009 г.
|
| Thank for the help, I had the same issue but I had a... Guest 18:33:37 |
| | Thank for the help, I had the same issue but I had a .properties file in my classpath that that cannot be opened "unzipped". |
| | Add comment |
пятница, 22 мая 2009 г.
|
| The Unisys U.S. LZW Patent No. 4558302 expired on June 20... Guest 04:09:03 |
| | The Unisys U.S. LZW Patent No. 4558302 expired on June 20, 2003 (quoted from their website). That's why the GIF wars have been over for a long while. |
| | 1 answer | Add comment |
четверг, 21 мая 2009 г.
|
| Can you please help me to access portlet session from a... Guest 14:43:21 |
| | Can you please help me to access portlet session from a http session ? mail : deepak.lanka@cw.com |
| | Add comment |
вторник, 21 апреля 2009 г.
|
[Hibernate]org.hibernate.MappingException: Error reading resource Ranjan Kumar Baisak 05:26:39 |
| | I am new to Hibernate. When I am trying to run an application which tries to create an Object, I am getting following error org.hibernate.MappingException: Error reading resource: hello/Category.hbm.xml at org.hibernate.cfg.Configuration.addResource(Configuration.java:433) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1213) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1169) |
| | 4 answer | Add comment |
пятница, 20 февраля 2009 г.
пятница, 24 октября 2008 г.
|
| I get a similar StackTrace (below) but my problem is that I... Guest 20:51:26 |
| | I get a similar StackTrace (below) but my problem is that I have a SessioBean injected into a JSF ManagedBean. The JSF Bean calls a method in the SessionBean to get a list of JPA objects from the DB.
If anyone out there can help...?
Regards,
Richard
2008-06-19 23:41:11,359 ERROR [org.jboss.web.jsf.integration.injection.JBossInjectionProvider] Injection failed on managed bean. javax.naming.NameNotFoundException: com.mp.jpa.jsf_beans.L_User not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:529) at org.jnp.server.NamingServer.getBinding(NamingServer.java:537) at org.jnp.server.NamingServer.getObject(NamingServer.java:543) at org.jnp.server.NamingServer.lookup(NamingServer.java:267) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627) at javax.naming.InitialContext.lookup(Unknown Source) at org.apache.catalina.util.DefaultAnnotationProcessor.lookupFieldResource(DefaultAnnotationProcessor.java:203) at org.apache.catalina.util.DefaultAnnotationProcessor.processAnnotations(DefaultAnnotationProcessor.java:139) at org.jboss.web.jsf.integration.injection.JBossInjectionProvider.inject(JBossInjectionProvider.java:104) at com.sun.faces.mgbean.BeanBuilder.injectResources(BeanBuilder.java:205) at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:106) at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:368) at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:222) at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:88) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53) at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72) at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:45) at org.apache.el.parser.AstValue.getValue(AstValue.java:86) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101) at javax.faces.component.UIData.getValue(UIData.java:608) at javax.faces.component.UIData.getDataModel(UIData.java:1112) at javax.faces.component.UIData.setRowIndex(UIData.java:450) at com.sun.faces.renderkit.html_basic.TableRenderer.encodeBegin(TableRenderer.java:77) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:808) at javax.faces.component.UIData.encodeBegin(UIData.java:950) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:934) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942) at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271) at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:202) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) |
| | 1 answer | Add comment |
среда, 22 октября 2008 г.
пятница, 3 октября 2008 г.
|
| The file is corrupt or you coded the page... Guest 18:38:53 |
| | The file is corrupt or you coded the page inncorrectly. ~wartex8.com |
| | Add comment |
среда, 24 сентября 2008 г.
|
| Any solution to this problem? Guest 18:50:46 |
| | Any solution to this problem? |
| | Add comment |
четверг, 4 сентября 2008 г.
среда, 3 сентября 2008 г.
четверг, 28 августа 2008 г.
|
| Hi,To correct this, please check the syntax of the... Guest 05:26:09 |
| | Hi,
To correct this, please check the syntax of the previously modified XML files. Becase, after yo comment out and uncomment, it's likely you accidentally misparsed the files.
Check this out!
Leonardo! |
| | Add comment |
суббота, 16 августа 2008 г.
|
| Refer... Guest 16:58:42 |
| | Refer following: http://docs.jboss.org/jbossas/jboss4guide/r4/html/ch9.chapt.html
It is issue with some version compatibility
To use another JSF implementation, such as the reference implementation, instead of the bundled MyFaces implementation, simply delete the
jbossweb-tomcat55.sar/jsf-lib
directory. You will need to include the the implementation JAR files in your own
WEB-INF/lib
directory for each web application making use of JSF.
Jaimin Shah J2EE Architect, Bangalore |
| | Add comment |
|
| Refer... Guest 16:57:38 |
| | Refer following: http://docs.jboss.org/jbossas/jboss4guide/r4/html/ch9.chapt.html
It is issue with some version compatibility
To use another JSF implementation, such as the reference implementation, instead of the bundled MyFaces implementation, simply delete the
jbossweb-tomcat55.sar/jsf-lib
directory. You will need to include the the implementation JAR files in your own
WEB-INF/lib
directory for each web application making use of JSF.
Jaimin Shah J2EE Architect, Bangalore |
| | Add comment |
|