siva krishna pallapu

Greenhorn
+ Follow
since Aug 12, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by siva krishna pallapu

Hi All,

I am new to XSLT FO and in one of requirements I need to generate the pdf from XSLT FO using Apache FOP. I was able to design the form with XSLT 1.0 and using Apache FOP 2.0 for generating pdf.

1. Below is the classpath I am setting
set classpath=.;D:/libs/barcode4j-2.1.jar;D:/libs/barcode4j-fop-ext-2.0.jar;D:/libs/avalon-framework-4_2_0.jar;D:/libs/commons-cli-1.0.jar;D:/fop-2.0-bin/fop-2.0/build/fop.jar;D:/libs/serializer-2.7.0.jar;D:/libs/xalan- 2.7.0.jar;D:/libs/xercesImpl-2.7.1.jar;D:/libs/xml-apis-1.3.04.jar;D:/libs/batik-all-1.7.jar;

2. command I am using to generate the pdf is : java -jar fop.jar -xml D:/json/person.xml -xsl D:/altova_xslt_file/Barcode4J_test.xslt -pdf D:/altova_xslt_file/Barcode4J_test.pdf

3. I am using the below names in the XSLT

xmlns:barcode="http://barcode4j.krysalis.org/ns" extension-element-prefixes="barcode"
4. Barcode generating piece
<fo:block>
<fo:instream-foreign-object>
<barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns" message="my message" orientation="90">
<barcode:code128>
<barcode:height>8mm</barcode:height>
</barcode:code128>
</barcode:barcode>
</fo:instream-foreign-object>
</fo:block>

5. Exception that I am getting is

D:\fop-2.0-bin\fop-2.0\build>java -jar fop.jar -xml D:/json/person.xml -xsl D:/altova_xslt_file/Barcode4J_test.xslt -pdf D:/altova_xslt_file/Barcode4J_test.pdf
Dec 12, 2015 11:10:18 AM org.apache.fop.fo.FOTreeBuilder fatalError
SEVERE: org.xml.sax.SAXParseException; systemId: file:/D:/altova_xslt_file/Barcode4J_test.xslt; lineNumber: 64; columnNumber: 66; javax.xml.transform.TransformerException: java.lang.ClassNotFoundExcep
tion: ns
Dec 12, 2015 11:10:18 AM org.apache.fop.cli.Main startFOP
SEVERE: Exception
org.apache.fop.apps.FOPException: javax.xml.transform.TransformerException: java.lang.ClassNotFoundException: ns
javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: java.lang.ClassNotFoundException: ns
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:288)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.fop.cli.Main.startFOPWithDynamicClasspath(Main.java:143)
at org.apache.fop.cli.Main.main(Main.java:219)
Caused by: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: java.lang.ClassNotFoundException: ns
at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.processElement(ExtensionHandlerJavaPackage.java:491)
at org.apache.xalan.templates.ElemExtensionCall.execute(ElemExtensionCall.java:232)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2281)
at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1367)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1284)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1262)
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:285)
... 8 more
Caused by: javax.xml.transform.TransformerException: java.lang.ClassNotFoundException: ns
at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.processElement(ExtensionHandlerJavaPackage.java:481)
... 32 more
Caused by: java.lang.ClassNotFoundException: ns
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)


Please help me in resolving the issue.

Thanks in Advance,
Siva
4 years ago




Hi friends,

Here is my requirement I have a jsp page, jsp1.jsp in app1. The jsp page consists of header, footer and body, the header and footer are in the app1 and I need to display jsp2.jsp in the body part of jsp1 which is to be rendered through action class or a sevlet of the app2 and is below is my code in body of jsp1.jsp

ServletContext sc=null;
sc=request.getSession().getServletContext().getContext("/app2");
System.out.println("sc-->"+sc);

RequestDispatcher rd=sc.getRequestDispatcher("authenticate.do");
rd.include(request, response);

but the code is giving the following error in both Tomcat and JBoss
The requested resource (/app2/authenticate.action) is not available
and I kept <Context crossContext="true"> in context.xml in Tomcat too

Thanks in advance

Siva
8 years ago

Hi friends,

Here is my requirement I have a jsp page, jsp1.jsp in app1. The jsp page consists of header, footer and body, the header and footer are in the app1 and I need to display jsp2.jsp in the body part of jsp1 which is to be rendered through action class or a sevlet of the app2 and is below is my code in body of jsp1.jsp

ServletContext sc=null;
sc=request.getSession().getServletContext().getContext("/app2");
System.out.println("sc-->"+sc);

RequestDispatcher rd=sc.getRequestDispatcher("authenticate.do");
rd.include(request, response);

but the code is giving the following error in both Tomcat and JBoss
The requested resource (/app2/authenticate.action) is not available
and I kept <Context crossContext="true"> in context.xml in Tomcat too

Thanks in advance

Siva
8 years ago
yeah you are right mr.ulf mitter ..
but my requirement is to create a database using java or any other api it can be either with .bat files also but the local system should not contain any servers installed in it..

for ex:
let us say if the local system contains ms-sql server then we can create the databases on remote systems using osql commands.. but this is not not my situation local system will not have any servers installed on it.
thanks ananth,

can you please post the url it would be very helpful to me if you do this..
hi,

this is siva and this is my situation..
i need to create a database in ms-sql server using java/jdbc .the database creation script will be in .sql file.

we can create the database with the help of osql commands if the local system is installed with ms-sql server.

but i need to create the database on the remote system without ms-sql server installed in my local system.
i think we can do this with a thread which is running continiously iterating through a while loop and checking the folders last modifies time at regular intervals the folder.lastmodified() if there is change in the time we can fire an event . i hope so it works..
11 years ago
I think in restricting the reinstallations in the same system we can use mac address of the system..
11 years ago