Org.apache.fop.apps classes wanted
in what *.jar files do these classes exist?
The following lines give an error:
import org.apache.fop.apps.Driver;
import org.apache.fop.apps.Version;
I currently get an error as I don't have the right jar files in my machine. So where to get them?
Or could somebody possibly send them to my e-mail?
[email protected]
OK!
AUlo
fop.jar, under the Apache fop installation directory
Similar Messages
-
Hi,
Anyone can tell me why am I getting this error while converting html file to XSl:FO
Also, I am not able to completely convert my html to XSL:FO..some of the tags like <meta>, <DOCTYPE>,<BR>,<IMG> etc...are not getting converted to the corresponding XSL:FO tags...
Is there a xhtml-to-xslfo.xml stylesheet which takes care of completely transforming a html to xsl:fo..
I need to convert html files to PDF files on the fly..and I am using xalan.jar latest version
Please advice me on the best way to convert htmls to PDF..using xsl:fo transformation.
Thanks,RaviConvert HTML to XSL-FO with htmlfo
http://html2fo.sourceforge.net/
http://www-106.ibm.com/developerworks/library/x-xslfo2app/ -
Hi,
I have an FOP application which presents the data retrieved from database in a PDF format.
Now when Iam trying to deploy the FOP application to OC4J and I get the following error.
java.lang.IllegalArgumentException: org.apache.fop.svg.SVGElementMapping is not an ElementMapping
at org.apache.fop.apps.Driver.addElementMapping(Driver.java:464)
at org.apache.fop.apps.Driver.setupDefaultMappings(Driver.java:314)
at org.apache.fop.apps.Driver.<init>(Driver.java:222)
at org.appfuse.fop.FOPHelper.createPDF(FOPHelper.java:48)
at FOPServlet.execute(FOPServlet.java:168)
at FOPServlet.doPost(FOPServlet.java:109)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
I believe its the problem with the class loaders.
I even configured my orion-web.xml to load the local classes and following is the conf file:
<orion-web-app
deployment-version="9.0.4.0.0"
temporary-directory="./temp"
internationalize-resources="false"
default-mime-type="application/octet-stream"
servlet-webdir="/servlet/"
>
<web-app-class-loader search-local-classes-first="true" include-war-manifest-class-path="false" />
</orion-web-app>
I have loaded the most stable jar files(fop-0.20.5) required for the generation of PDF.
The same application runs well in JDeveloper(10.1.2.0.0)
Could somebody help me out with this.
Its very urgent.
Need to be able to deploy this by evening.
Thanks
Sridhar
Message was edited by:
SridharThis means the code loading the element mappings does not recognize
the SVGElementMapping as an ElementMapping, as it expects. The most
likely reason is that they are loaded from different class loaders -That was the reason of my simple suggestion above.
There are many ways that you can try now.
One way is to put all libraries in your war into ORACLE_HOME/j2ee/home/applib. Also remove the following line
<web-app-class-loader search-local-classes-first="true" include-war-manifest-class-path="false" />
since this search-local-classes-first is problematic sometimes.
It might be nice if you can verify that the classloader that loads SVGElementMapping is different from the one that loads Elementmapping at that point of code.
Now Could somebody help me out as this is the problem of OC4J .Hmm, I would not say "problem of OC4J". A usage error or a false incompatibility at worst. "False" because there should be many normal and standard ways to make it work. -
Hi all,
in ALSB 2.6 the org.apache.xmlbeans.XmlObject class was located in the weblogic\common\lib\apache_xbean.jar jar file.
Where is now in ALSB 3.0 ?
I'm using jarbrowser tool for looking for it but I'm not able to find it!
That class is used in a javacallout of mine and I'm migrating to ALSB 3.0 ...
Regards
ferpI did a search and that is my result:
/software/bea100 > find . -name "*xbean*.jar"
./modules/com.bea.cie.gpr-xbean_2.6.0.0.jar
./modules/com.bea.cie.gpr-xbean_2.3.0.0.jar
./modules/com.bea.cie.gpr-xbean_2.4.0.0.jar
./modules/com.bea.cie.gpr-xbean_2.1.0.0.jar
./tools/eclipse_pkgs/1.1/pkgs/eclipse/plugins/com.bea.al.sam.dsp25adapter_1.0.20.200801301412/jars/xbean.jar
./tools/eclipse_pkgs/1.1/pkgs/eclipse/plugins/com.bea.workshop.thirdparty.xmlbeans.v21_1.0.20.200802230114/lib/xbean.jar
./tools/eclipse_pkgs/1.1/pkgs/eclipse/plugins/com.bea.workshop.thirdparty.xmlbeans.v22_1.0.20.200802230114/lib/xbean.jar
./tools/eclipse_pkgs/1.1/pkgs/eclipse/plugins/com.bea.workshop.common.usagetrack.protocol_1.0.20.200802230115/lib/xbean.jar
./weblogic/server/lib/wlxbean.jar
Only tools\eclipse_pkgs\1.1\pkgs\eclipse\plugins\com.bea.workshop.thirdparty.xmlbeans.v22_1.0.20.200802230114\lib\xbean.jar contains the org.apache.xmlbeans.XmlObject !
So I don't have any bea10\wlserver_10.0\server\lib\xbean.jar ...
But is it correct to use that jar that is located under pkgs\eclipse\plugins ?
Regards
ferp -
Apache FOP getClassLoader problem
I have loaded Apache FOP 1.1 into an 11g database, and a driver class to retrieve XML/XSLT and save PDF as CLOBs. When I try to execute this in the DB, I get
ORA-29532: Java call terminated by uncaught Java exception: javax.xml.transform.TransformerException: java.security.AccessControlException: the Permission (java.lang.RuntimePermission getClassLoader) has not been granted to ProtectionDomain (null <no signer certificates>)
com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl$TransletClassLoader@98644313
<no principals>
java.security.Permissions@b0558743 (
(java.lang.RuntimePermission modifyThreadGroup)
(java.lang.RuntimePermission createSecurityManager)
(java.lang.RuntimePermission modifyThread)
(java.lang.RuntimePermission preferences)
(java.lang.RuntimePermission exitVM)
(java.util.PropertyPermission user.language write)
(java.util.PropertyPermission * read)
(oracle.aurora.security.JServerPermission LoadClassInPackage.*)
It looks like the SecurityManager is only looking at PUBLIC permissions, even though the FOP classes were loaded into a schema with 'SYS:java.lang.RuntimePermission', 'getClassLoader', ''.
Any ideas on how to get around this?
Thanks!Dear Brian,
It looks to me like org.apache.fop.apps.Driver might be doing a
Class.forName() for the Loggable class. If Class.forName() does not pass a
specific classloader, the system classpath loader is used; which is why it
works when you put the classes on the system classpath.
Best regards,
Timothy Potter
Senior Software Engineer
eCommerce Server Division
BEA Systems, Inc.
"Brian Dowd" <[email protected]> wrote in message
news:3c8c9ba0$[email protected]..
>
HI,
I am deploying a big EAR in WL 6.1 on solaris and I am bundling FOP1.20.3
within it, I am
also including avalon 4.0 and logkit 1.0 jars within it as they are neededby
fop.jar. Whenever I
try to construct a "Driver()" class I get a NoClassDefFoundError on theorg.apache.framework.logger.Loggable
interface that it needs. The strange thing is that when I do thefollowing :
>
try {
ClassLoader cl = this.getClass().getClassLoader();
cl.loadClass("org.apache.avalon.framework.logger.Loggable"); //.........this
works OK
// the following .... fails with NoClassDefFoundError on Loggable
org.apache.fop.apps.Driver d = new org.apache.fop.apps.Driver();
} catch (Throwable t) {
cat.error("failed:", t);
It DOES work when I put the necessary jars on the server startup classpath,
however it would obviously be
better to be able to bundle the 3rd party jars within my EAR ....... Iknow this
seems like it would be a general
weblogic classloader question - but I have had no problems with any other3rd
party jars that are similar to
this one.
Has anyone else had these kinds of problems ?
Cheers,
Brian. -
Apache fop classloading problem in EAR file
HI,
I am deploying a big EAR in WL 6.1 on solaris and I am bundling FOP 1.20.3
within it, I am
also including avalon 4.0 and logkit 1.0 jars within it as they are needed by
fop.jar. Whenever I
try to construct a "Driver()" class I get a NoClassDefFoundError on the org.apache.framework.logger.Loggable
interface that it needs. The strange thing is that when I do the following :
try {
ClassLoader cl = this.getClass().getClassLoader();
cl.loadClass("org.apache.avalon.framework.logger.Loggable"); // .........this
works OK
// the following .... fails with NoClassDefFoundError on Loggable
org.apache.fop.apps.Driver d = new org.apache.fop.apps.Driver();
} catch (Throwable t) {
cat.error("failed:", t);
It DOES work when I put the necessary jars on the server startup class path,
however it would obviously be
better to be able to bundle the 3rd party jars within my EAR ....... I know this
seems like it would be a general
weblogic classloader question - but I have had no problems with any other 3rd
party jars that are similar to
this one.
Has anyone else had these kinds of problems ?
Cheers,
Brian.Dear Brian,
It looks to me like org.apache.fop.apps.Driver might be doing a
Class.forName() for the Loggable class. If Class.forName() does not pass a
specific classloader, the system classpath loader is used; which is why it
works when you put the classes on the system classpath.
Best regards,
Timothy Potter
Senior Software Engineer
eCommerce Server Division
BEA Systems, Inc.
"Brian Dowd" <[email protected]> wrote in message
news:3c8c9ba0$[email protected]..
>
HI,
I am deploying a big EAR in WL 6.1 on solaris and I am bundling FOP1.20.3
within it, I am
also including avalon 4.0 and logkit 1.0 jars within it as they are neededby
fop.jar. Whenever I
try to construct a "Driver()" class I get a NoClassDefFoundError on theorg.apache.framework.logger.Loggable
interface that it needs. The strange thing is that when I do thefollowing :
>
try {
ClassLoader cl = this.getClass().getClassLoader();
cl.loadClass("org.apache.avalon.framework.logger.Loggable"); //.........this
works OK
// the following .... fails with NoClassDefFoundError on Loggable
org.apache.fop.apps.Driver d = new org.apache.fop.apps.Driver();
} catch (Throwable t) {
cat.error("failed:", t);
It DOES work when I put the necessary jars on the server startup classpath,
however it would obviously be
better to be able to bundle the 3rd party jars within my EAR ....... Iknow this
seems like it would be a general
weblogic classloader question - but I have had no problems with any other3rd
party jars that are similar to
this one.
Has anyone else had these kinds of problems ?
Cheers,
Brian. -
XSQL-022 error on using FOP - serializer class not found; urgent!
Hi all,
currently using XDK 9.2.0.1.0. On trying to invoke Apache FOP serializer I just get the following error message:
XSQL-022: Cannot load serializer class oracle.xml.xsql.serializers.fopserializer
and I really don't know why....
Running XSQL Servlet within Tomcat 4 Engine, but error pops up using both, Tomcat way and/or just the commandline invoker xsql.bat.
Generally XSQL Servlet is working correctly.
My classpath setting contains:
xmlparserv2.jar; batik.jar; classes12.jar; fop.jar; fopserializer.jar; oraclexsql.jar; sax2.jar; xalan-2.0.0.jar; xalanj1compat.jar; xerces-1.2.3.jar; xschema.jar; XSQLConfig.jar; xsu12.jar
The serializer being redefined in XSQLConfig is just:
<serializer>
<name>FOP203</name>
<class>oracle.xml.xsql.serializers.fopserializer</class>
</serializer>
This is because of using FOP 0.20.3, so having my own serializer class due to API change in FOP 0.20.x; my fopserializer is looking like that:
package oracle.xml.xsql.serializers;
import org.w3c.dom.Document;
import java.io.PrintWriter;
import oracle.xml.xsql.*;
import org.apache.fop.messaging.MessageHandler;
import org.apache.fop.apps.*;
import java.io.*;
// FOP 0.20.3 Serializer implementation for XSQL
public class fopserializer implements XSQLDocumentSerializer
private static final String PDFMIME="application/pdf";
public void serialize(Document doc, XSQLPageRequest req) throws Throwable
try
Driver FOPDriver = new Driver();
FOPDriver.setRenderer(FOPDriver.RENDER_PDF);
MessageHandler.setOutputMethod(MessageHandler.NONE);
FOPDriver.setupDefaultMappings();
req.setContentType(PDFMIME);
FOPDriver.setOutputStream(req.getOutputStream());
FOPDriver.render(doc);
catch (Exception e)
e.printStackTrace(System.err);
In my XSQL file I'm using the following PI:
<?xml-stylesheet type="text/xsl" href="listemps.fo" serializer="FOP203"?>
Any suggestions what is wrong in here ?
Can't use the original xsqlserializer.jar either - same error.
Thanks in advance
JochenHi Jochen,
I'm working with Tomcat 4.0.3, FOP 20.0.3 and XDK 9.2.0.1.0, too.
I've copied all the jar-files into tomcat/common/lib. I think that you can't use the MessageHandler in fop20.0.3. I'm using the following serializer:
package diva.xml.xsql.serializers;
import org.w3c.dom.Document;
import java.io.PrintWriter;
import oracle.xml.xsql.*;
import org.apache.fop.apps.*;
import org.apache.log.*;
import org.apache.log.format.*;
import org.apache.log.output.io.*;
import org.apache.avalon.*;
import java.io.*;
public class XSQLFOP203Serializer implements XSQLDocumentSerializer {
private static final String PDFMIME = "application/pdf";
private static final String CONFPATH = "/usr/local/fop/conf/userconfig.xml";
public void serialize(Document doc, XSQLPageRequest env) throws Throwable {
try {
// Open user config file
File userConfigFile = new File(CONFPATH);
Options options = new Options(userConfigFile);
// First make sure we can load the driver
Driver FOPDriver = new Driver();
// Setup logging
Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
PatternFormatter formatter = new PatternFormatter("[%{priority}]: %{message}\n%{throwable}" );
LogTarget target = null;
target = new StreamTarget(System.out, formatter);
hierarchy.setDefaultLogTarget(target);
Logger log = hierarchy.getLoggerFor("fop");
log.setPriority(Priority.INFO);
FOPDriver.setLogger(log);
// Then set the content type before getting the reader/
env.setContentType(PDFMIME);
FOPDriver.setRenderer(FOPDriver.RENDER_PDF);
FOPDriver.setOutputStream(env.getOutputStream());
FOPDriver.render(doc);
catch (Exception e) {
// Cannot write PDF output for the error anyway.
// So maybe this stack trace will be useful info
e.printStackTrace(System.err);
Hope this helps
Uwe -
Apache-fop classloading error ....
HI,
I am deploying a big EAR in WL 6.1 on solaris and I am bundling FOP 1.20.3
within it, I am
also including avalon 4.0 and logkit 1.0 jars within it as they are needed by
fop.jar. Whenever I
try to construct a "Driver()" class I get a NoClassDefFoundError on the org.apache.framework.logger.Loggable
interface that it needs. The strange thing is that when I do the following :
try {
ClassLoader cl = this.getClass().getClassLoader();
cl.loadClass("org.apache.avalon.framework.logger.Loggable"); // .........this
works OK
// the following .... fails with NoClassDefFoundError on Loggable
org.apache.fop.apps.Driver d = new org.apache.fop.apps.Driver();
} catch (Throwable t) {
cat.error("failed:", t);
It DOES work when I put the necessary jars on the server startup class path,
however it would obviously be
better to be able to bundle the 3rd party jars within my EAR ....... I know this
seems like it would be a general
weblogic classloader question - but I have had no problems with any other 3rd
party jars that are similar to
this one.
Has anyone else had these kinds of problems ?
Cheers,
Brian.I have a similar problem, I tried to package the fop library with an ear also. I think it has to do with System properties. The fop library loads it's parser class from a system property, the class it finds is a weblogic library and that's when the problem begins. I was never able to solve this, but hope this gives you starting point. Keep us abreast of your findings.
-
Apache FOP 0.95 and WebLogic 10.3
I am using Jdeveloper with Weblogic 10.3 and Apache FOP 0.95 to create PDF documnents. I keep getting the NoClassDefError. Here is the stack trace ....
java.lang.ExceptionInInitializerError
at rcopia.util.FopUtil.<clinit>(FopUtil.java:26)
at rcopia.prescription.FopScripPrinter.postRun(FopScripPrinter.java:134)
at rcopia.prescription.ScripMaster.doRun(ScripMaster.java:107)
at rcopia.prescription.ScripMaster.run(ScripMaster.java:53)
at rcopia.prescription.ScripHandler.runPrinter(ScripHandler.java:481)
at rcopia.prescription.ScripHandler.runPrinter(ScripHandler.java:427)
at rcopia.prescription.ScripHandler.process(ScripHandler.java:347)
at rcopia.prescription.ScripHandler.run(ScripHandler.java:307)
at rcopia.screen.CommonScreen.doSendPrescription(CommonScreen.java:866)
at rcopia.screen.CommonScreen.doSendPrescription(CommonScreen.java:837)
at rcopia.screen.ReviewPrescriptionScreen.send(ReviewPrescriptionScreen.java:311)
at rcopia.screen.ReviewPrescriptionScreen.process(ReviewPrescriptionScreen.java:85)
at rcopia.screen.Screen.doProcess(Screen.java:205)
at rcopia.screen.Screen.run(Screen.java:121)
at rcopia.screen.Screen.run(Screen.java:91)
at rcopia.screen.ScreenHandlerInstance.run(ScreenHandlerInstance.java:159)
at rcopia.screen.ScreenHandlerInstance.process(ScreenHandlerInstance.java:58)
at rcopia.servlet.WebRequestHandler.runRequest(WebRequestHandler.java:74)
at rcopia.servlet.RequestHandler.runInSynchronizedSession(RequestHandler.java:135)
at rcopia.servlet.RequestHandler.doHandle(RequestHandler.java:864)
at rcopia.servlet.RequestHandler.handleOne(RequestHandler.java:820)
at rcopia.servlet.RequestHandler.handleWithoutUTM(RequestHandler.java:776)
at rcopia.servlet.RequestHandler.handle(RequestHandler.java:743)
at rcopia.servlet.RequestHandler.runOne(RequestHandler.java:449)
at rcopia.servlet.RequestHandler.runStart(RequestHandler.java:263)
at rcopia.servlet.RequestHandler.run(RequestHandler.java:173)
at rcopia.servlet.RcopiaServlet.doPost(RcopiaServlet.java:210)
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:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@da44a7 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Logger) (Caused by org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@da44a7 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Logger))
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.apache.fop.apps.FopFactory.<clinit>(FopFactory.java:64)Is this WL 10.3, or 10.3.3?
It looks like fop is having a problem finding the log4j
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@da44a7 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Logger) (Caused by org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@da44a7 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Logger))By default, WL 10.3.3 installs an older version of log4j and references it in your setDomainEnv script:${ALSB_HOME/lib/external/log4j_1.2.8.jarIn our case, we just put our log4j_1.2.14.jar file in the same place and changed the script to point to it
${ALSB_HOME}/lib/external/log4j_1.2.14.jar -
Has anyone created a new jsp file for the newer version (0.93) of Apache FOP?
I can see where these three lines:
<%@ page import='org.xml.sax.InputSource'%>
<%@ page import='org.apache.fop.apps.Driver'%>
<%@ page import='org.apache.fop.apps.Options'%>
in the current jsp page are no longer valid.
But figuring out what they should be is another story. :)
Thanks,
ChadGuess I'm looking at something noone else has. :)
Let me grab my "noob" java hat and see if I can figure out what to do. <G>
Chad -
There is probably not much of a chance to get an answer but still I'll try. During conversion of an xls-fo file into pdf all cyrillic symbols get screwed (replaced with #). There is a guide on how to embed fonts via the configuration file. However if you follow the procedure an exception is thrown (here are the top 3 lines)
org.apache.fop.util.LogUtil.handleError(LogUtil.java:38)
org.apache.fop.render.PrintRendererConfigurator.getFontInfoFromConfiguration(PrintRendererConfigurator.java:265)
org.apache.fop.render.PrintRendererConfigurator.buildFontListFromConfiguration(PrintRendererConfigurator.java:207)If you google it then it says that replacing the fop library with an older version solves the problem (I guess it means it could be some bug). It's true that the exception disappears but 1. the older library is inconsistent with other libraries (like jeuclid) and 2. the cyrillic symbols are not displayed anyway (may be b/c there is some problem with the fonts file).
Anyway my point is that I am now completely lost about how to add support for non-English symbols in fop. If anyone has some experience to share then it is very much appreciated. Another thing is that I have basically no knowledge on how font support works in java. If there is some information that should be known then directing to it is also greatly appreciated.javiator wrote:
If you google it then it says that replacing the fop library with an older version solves the problem (I guess it means it could be some bug). It's true that the exception disappears but 1. the older library is inconsistent with other libraries (like jeuclid) and 2. the cyrillic symbols are not displayed anyway (may be b/c there is some problem with the fonts file).
What makes you think that your current environment would display them correctly even if they were there? That should be the first step to verify.
But anyways if you find a solution and it is a matter of incompatible libraries then you can solve it with a custom class loader. -
Hi ,
I'm getting the below exception while accessing the pages. It was working fine earlier..
Any help on this please....???
Caused by: org.apache.sling.api.SlingException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Error while executing script /libs/wcm/core/components/init/init.jsp
at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspExceptionInterna l(JspServletWrapper.java:563)
at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspException(JspSer vletWrapper.java:499)
at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:443)
at org.apache.sling.scripting.jsp.JspServletWrapperAdapter.service(JspServletWrapperAdapter. java:59)
at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java :233)
at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.j ava:85)
at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngin eFactory.java:453)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:358)
... 93 more
Caused by: org.apache.sling.api.SlingException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: com/day/cq/wcm/api/WCMMode
at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspExceptionInterna l(JspServletWrapper.java:563)
at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspException(JspSer vletWrapper.java:499)
at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:443)
at org.apache.sling.scripting.jsp.JspServletWrapperAdapter.service(JspServletWrapperAdapter. java:59)
at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java :233)
at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.j ava:85)
at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngin eFactory.java:453)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:358)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:170)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:4 56)
at com.day.cq.wcm.tags.IncludeTag.includeScript(IncludeTag.java:167)
at com.day.cq.wcm.tags.IncludeTag.doEndTag(IncludeTag.java:87)
at org.apache.jsp.apps.bt_com.components.wrapperpage.wrapperpage_jsp._jspx_meth_cq_005finclu de_005f0(wrapperpage_jsp.java:430)
at org.apache.jsp.apps.bt_com.components.wrapperpage.wrapperpage_jsp._jspService(wrapperpage _jsp.java:238)
at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:420)
... 98 more
Caused by: java.lang.NoClassDefFoundError: com/day/cq/wcm/api/WCMMode
at org.apache.jsp.libs.wcm.core.components.init.init_jsp._jspService(init_jsp.java:152)
at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJs
Thanks,
Shankar .AHi Shankar,
Try to open Apache Felix Console -> Bundles tab:
http://localhost:4502/system/console/bundles
and find:
-> Apache Sling Scripting JSP support -> try to stop this bundle and start it again
-> Apache Sling Dynamic Class Loader Support-> try to stop this bundle and start it again
Restarting both bundles should solve your problem.
Regards,
kasq -
Help generate dynamic table in xslt for apache FOP
down vote favorite
For the following xml file, i need to generate an xsl-fo file to be converted into pdf.
I am new to style sheets and struggling to create dynamic table. Please help.
Also, the width for each column varies,based on the column.How would i include this into the code?
The Column Headers and Column Values are dynamically populated in the xml file. Below is a sample.
Can anybody please help in generating xsl-fo or xslt code?
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ReportData>
<ColumnHeaders>
<ColumnHeader>
<Name>Col-Header1</Name>
<Width>5</Length>
</ColumnHeader>
<ColumnHeader>
<Name>Col-Header2</Name>
<Width>10</Length>
</ColumnHeader>
<ColumnHeader>
<Name>Col-Header3</Name>
<Width>8</Length>
</ColumnHeader>
</ColumnHeaders>
<Rows>
<Row>
<Column>Row1-Col1</Column>
<Column>Row1-Col2</Column>
<Column>Row1-Col3</Column>
</Row>
<Row>
<Column>Row2-Col1</Column>
<Column>Row2-Col2</Column>
<Column>Row2-Col3</Column>
</Row>
</Rows>
</ReportData>I did some xsl-fo a few years ago for a project.
It was an invoice generator spawning multiple PDFs out of single XML document generated from the database. Pretty cool stuff but very resource-consuming.
I'm a bit rusty but here's a basic example for a single table, based on your sample data :
XSLT stylesheet :
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output indent="yes"/>
<xsl:template match="/ReportData">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="Main" margin="8mm"
page-width="250mm"
page-height="100mm">
<fo:region-body />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="Main">
<fo:flow flow-name="xsl-region-body">
<fo:block>
<fo:table table-layout="fixed" border-style="solid">
<xsl:apply-templates select="ColumnHeaders/ColumnHeader" mode="column"/>
<xsl:apply-templates select="ColumnHeaders"/>
<fo:table-body>
<xsl:apply-templates select="Rows/Row"/>
</fo:table-body>
</fo:table>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="ColumnHeaders">
<fo:table-header>
<fo:table-row background-color="rgb(200,200,200)">
<xsl:apply-templates select="ColumnHeader" mode="header"/>
</fo:table-row>
</fo:table-header>
</xsl:template>
<xsl:template match="ColumnHeader" mode="column">
<fo:table-column column-width="{concat(Width*10,'mm')}"/>
</xsl:template>
<xsl:template match="ColumnHeader" mode="header">
<fo:table-cell border-style="solid">
<fo:block font-weight="bold"><xsl:value-of select="Name"/></fo:block>
</fo:table-cell>
</xsl:template>
<xsl:template match="Row">
<fo:table-row>
<xsl:apply-templates select="Column"/>
</fo:table-row>
</xsl:template>
<xsl:template match="Column">
<fo:table-cell border-style="solid">
<fo:block><xsl:value-of select="."/></fo:block>
</fo:table-cell>
</xsl:template>
</xsl:stylesheet>
{code}
Calling the XSLT engine and FOP :
{code}
D:\XSLT>gen_pdf_otn.bat
D:\XSLT>java -jar saxon9he.jar -s:in/reportdata.xml -xsl:testfo.xsl -o:out/testfo.xml 2>errors.log
D:\XSLT>java -jar fop.jar org.apache.fop.cli.Main -fo out/testfo.xml -pdf out/testfo.pdf -c morefontsconfig.xml 2>errors.log
D:\XSLT>pause
Appuyez sur une touche pour continuer...
{code}
Ouput :
- The intermediate XSL-FO document :
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="Main" margin="8mm" page-width="250mm" page-height="100mm">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="Main">
<fo:flow flow-name="xsl-region-body">
<fo:block>
<fo:table table-layout="fixed" border-style="solid">
<fo:table-column column-width="50mm"/>
<fo:table-column column-width="100mm"/>
<fo:table-column column-width="80mm"/>
<fo:table-header>
<fo:table-row background-color="rgb(200,200,200)">
<fo:table-cell border-style="solid">
<fo:block font-weight="bold">Col-Header1</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block font-weight="bold">Col-Header2</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block font-weight="bold">Col-Header3</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<fo:table-row>
<fo:table-cell border-style="solid">
<fo:block>Row1-Col1</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block>Row1-Col2</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block>Row1-Col3</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border-style="solid">
<fo:block>Row2-Col1</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block>Row2-Col2</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block>Row2-Col3</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
{code}
- and the PDF document :
http://mbperso.pagesperso-orange.fr/oracle/testfo.pdf -
Org.apache.jasper.JasperException Ambigous Class Error
I included two classes:
<% @page import = "com.myco.ejb.ThisBean" %>
<% @page import = "com.myco.ejb.session.ThisBean" %>
and received an org.apache.jasper.JasperException Ambigous Class Error on the second import. One is a cmp bean, the other is a session bean. I thought Sun wanted us to name our packages like this to aid in the prevention of duplicate class names (i.e., Windoz DLLitus). Shouldn't these classes be unique by the package name?No, that's not redundancy. Are you using the fully qualified class name in your jsp:usebean tags?
like:
classname="com.mypackage.mybeans.MyBean"
And are you using the package statement properly in your source?
In the case that you are using two classes of the same name in one file the compiler has to have a means of distinguishing between the two. The only way for it to do so is to use the fully qualified name of the class in each case in which it is referenced. This means either in the jsp:usebean tag as shown above, or in such a case as:
com.mypackage.myclasses.MyClass theOb=new com.mypackage.myclasses.MyClass();
Awkward yes, but ambiguous No.
In the case where you are using only one class of a given name the import statement will be sufficient for the compiler to know that it is that which you fully qualify in the import statement.
Remember, all that the import statement does is provide the convenience of pre-clarifying exactly which class you'll be referring to when using the abbreviated class name only. Importing two classes of the same name defeats the purpose.
Good luck,
Brad -
Hi All,
I have a proble deploying my app with struts 1.3.10, when I run under tomcat 6 on my eclipse, it´s fine, but when I deploy on weblogic send next exception:
####<Apr 2, 2013 4:24:19 PM CDT> <Info> <ServletContext-/slagentes> <DSWLC01K> <svr-slisto> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1364937859494> <BEA-000000> <layout.jsp:142:14: The tag handler class was not found "org.apache.struts.taglib.tiles.InsertTag".
<tiles:insert attribute="content"/>
^----------^
layout.jsp:142:14: The tag handler class was not found "org.apache.struts.taglib.tiles.InsertTag".
<tiles:insert attribute="content"/>
^----------^
>
####<Apr 2, 2013 4:24:19 PM CDT> <Error> <HTTP> <DSWLC01K> <svr-slisto> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1364937859499> <BEA-101017> <[ServletContext@159254910[app:slagentes module:/slagentes path:null spec-version:3.0], request: weblogic.servlet.internal.ServletRequestImpl@5ebf5ebf[
POST /slagentes/login.do HTTP/1.1
Connection: keep-alive
Content-Length: 37
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Origin: http://172.17.12.129:7004
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.43 Safari/537.31
Content-Type: application/x-www-form-urlencoded
Referer: http://172.17.12.129:7004/slagentes/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: es-ES,es;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
]] Root cause of ServletException.
weblogic.servlet.jsp.CompilationException: Failed to compile JSP /jsp/template/layout.jsp
layout.jsp:142:14: The tag handler class was not found "org.apache.struts.taglib.tiles.InsertTag".
<tiles:insert attribute="content"/>
^----------^
layout.jsp:142:14: The tag handler class was not found "org.apache.struts.taglib.tiles.InsertTag".
<tiles:insert attribute="content"/>
^----------^
at weblogic.servlet.jsp.JavelinxJSPStub.reportCompilationErrorIfNeccessary(JavelinxJSPStub.java:225)
at weblogic.servlet.jsp.JavelinxJSPStub.compilePage(JavelinxJSPStub.java:161)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:237)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:190)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:281)
at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:453)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:364)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:221)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:567)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:263)
at org.apache.struts.tiles.commands.TilesPreProcessor.doForward(TilesPreProcessor.java:260)
at org.apache.struts.tiles.commands.TilesPreProcessor.execute(TilesPreProcessor.java:217)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:751)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:221)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3284)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3254)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2089)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1513)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
>
My weblogic.xml is
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app
xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
<wls:container-descriptor>
<wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
</wls:container-descriptor>
</wls:weblogic-web-app>
and my weblogic-application.xml is
<?xml version = '1.0' encoding = 'UTF-8'?>
<weblogic-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-application http://www.bea.com/ns/weblogic/weblogic-application/1.0/weblogic-application.xsd"
xmlns="http://www.bea.com/ns/weblogic/weblogic-application">
<application-param>
<param-name>webapp.encoding.default</param-name>
<param-value>UTF-8</param-value>
</application-param>
<prefer-application-packages>
<package-name>antlr.*</package-name>
<package-name>org.apache.*</package-name>
<package-name>javax.xml.rpc.*</package-name>
<package-name>javax.xml.namespace.*</package-name>
<package-name>javax.xml.messaging.*</package-name>
<package-name>javax.xml.soap.*</package-name>
<package-name>javax.servlet.jsp.jstl.*</package-name>
</prefer-application-packages>
</weblogic-application>
please help meThe struts-template tld has been deprecated in favour of the tiles taglib.
If you are using anything above struts 1.0, then you should be using tiles.
Most probably the support files for the struts-template taglib are not in your distribution.
Cheers,
evnafets
Maybe you are looking for
-
Hi, The product Name of my computer is: HP Pavilion dv6-6093ex Entertainment Notebook PC support The number of my computer is : LM610EA#A2N. Could anyone please at this splendid forum take some of their precious time out to really reply my questions
-
The file name of many songs are in my library but can't be heard or found, why?
My itunes library has been off-line for a year or more and when i updated everything my song file names are there and some songs are audible but the majority of them are not and my computer says it can't find the song in my computer, what do i do?
-
Adobe Flashplayer has stopped working in IE11
Hi all, My IE11 does not want to Allow Adobe Flashplayer on webpages. I get the announcement on webpages that require Flash that "This web page wants to run the following add-on: 'Adobe Flash Player' from 'Microsoft Windows Third Party Application Co
-
Video From DVD(DvdxDv)Only Half Size
A client sent me video on a dvd to add to a project. After using DVDxDV, the QT movie is 352x480, and only shows half(Left side)of the original video. Now, I figure it was downloaded from their site at a bad setting, but if the info is there while lo
-
InPlace execution in CLDC hotspot implementation
I am working on Inplace execution feature given by SUN in CLDC Hot spot Implementaion. I want to know how much performance can be increased by using inplace execution for the midlet to be run on the device. I have converted the midlet jar file into a