Beginner Questions

Stimulsoft Reports.JAVA discussion
Post Reply
herman
Posts: 2
Joined: Thu Oct 11, 2012 3:11 am

Beginner Questions

Post by herman »

Hi,

I'm looking for a reporting engine/designer for java and I'm quite impressed by your products.

I'm currently trying the trial version and have some questions:
1. when using XML datasource, the report works great, but when I design a report using JDBC Posgres connection and send it to the preview, I got :

SEVERE:
com.stimulsoft.library.StiException: java.lang.NullPointerException
at com.stimulsoft.actions.AbstractAction.run(AbstractAction.java:21)
at com.stimulsoft.servlet.StiServlet.runAction(StiServlet.java:27)......

Caused by: java.lang.NullPointerException
at com.stimulsoft.actions.ReturnXmlOrSqlData.processLoadData(ReturnXmlOrSqlData.java:63)
at com.stimulsoft.actions.ReturnXmlOrSqlData.process(ReturnXmlOrSqlData.java:42)
at com.stimulsoft.actions.AbstractAction.run(AbstractAction.java:19)

did I miss something here ?

2. When registering listener class to implement custom load/save action, following the example on the java developer faq, when I add

<listener>
<listener-class>my.servlet.ApplicationInitializer</listener-class>
</listener>

I got

INFO: Starting Servlet Engine: Apache Tomcat/7.0.27
Oct 11, 2012 10:48:12 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class my.servlet.ApplicationInitializer
java.lang.ClassNotFoundException: my.servlet.ApplicationInitializer
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:525)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:507)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:124)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4715)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


3. Can I Save a Report to HTML/PDF, without going to the Viewer first ?
if yes, can you show me the java code to do this, thank you.




and also some correction for the Java Developer FAQ, http://www.stimulsoft.com/en/faq/reports-fx-java#q7 on "Listing 11. MyXMLDataAction.java" the code is for "MyLoadDataAction.java" and the code for "MyXMLDataAction.java" is missing.


Thank you
herman
Posts: 2
Joined: Thu Oct 11, 2012 3:11 am

Re: Beginner Questions

Post by herman »

*updates*

1. I've managed to resolve this by using not JDBC Connection but selecting PostgresSQL Connection, and also I need to include the Postgressql JDBC JAR in the build path.

2. I resolve the error when registering my.servlet.ApplicationInitializer by doing a Clean rebuild and republishing.


so the first two is solved, the one left is question no.3. still need help on that one.


Thanks
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Beginner Questions

Post by HighAley »

Hello.
herman wrote:3. Can I Save a Report to HTML/PDF, without going to the Viewer first ?
if yes, can you show me the java code to do this, thank you.
The current version of the Report.Fx for Java renders report on the client side. So it's impossible to export reports without Viewer.
But we are working on the server-side report engine. It will be available in our next release in December.
Its' beta version is available for the registered users.

Thank you.
Post Reply