Page 1 of 2
sti.fx.flex.2012.3 and sti.fx.java.2012.3 communication
Posted: Mon Dec 17, 2012 3:41 am
by Chipo
Hi,
our company uses StimulsoftReports.Fx_Flex_2012.3 for client flex application and StimulsoftReports.Fx_Java_2012.3 for backend
Before now I used API provider for client-server communication (ver 2012.06.12)
I updated version of java part and found out that now there ate two dispatcher servlets: StiViewerFxServlet and StiDesignerFxServlet.
In my flex code I had:
Code: Select all
StiApiProvider.provider.dispatchEvent(new StiApiProviderEvent(StiApiProviderEvent.INITIALIZE_PROVIDER, stiJavaServerUrl, StiProgressMode.Visible));
But this was for situation with one dispatcher. Now I have to initialise provider with urls to both viewer servlet and designer servlet.
How I can do that?
Do I need another API Provider library?
Thank you in advance.
Re: sti.fx.flex.2012.3 and sti.fx.java.2012.3 communication
Posted: Mon Dec 17, 2012 11:31 am
by HighAley
Hello.
The problem is in our code. It will be solved in a next prerelease build.
Thank you.
Re: sti.fx.flex.2012.3 and sti.fx.java.2012.3 communication
Posted: Tue Dec 18, 2012 10:53 am
by Chipo
Hi,
for time being I initialised the provider with url to designer servlet and this did the trick.
This allowed me to read report content for viewer no problem.
Thank you.
Re: sti.fx.flex.2012.3 and sti.fx.java.2012.3 communication
Posted: Wed Dec 19, 2012 10:55 am
by HighAley
Hello.
Good. Let us know if you will have any additional help.
Thank you.
Re: sti.fx.flex.2012.3 and sti.fx.java.2012.3 communication
Posted: Mon Dec 24, 2012 1:34 am
by Chipo
Hi,
finally I introduced both servlets (viewer and designer) in the application.
problems are:
1. Viewer asked for data with stimulsoft_client_key: LoadData, but this is commented out in the StiHttpParam enum. And now I stuck.
Is this communication problem because of java api adapter?
How can I make StimulsoftReports.Fx_Flex_2012.3 and StimulsoftReports.Fx_Java_2012.3 work together?
Have a nice day
Re: sti.fx.flex.2012.3 and sti.fx.java.2012.3 communication
Posted: Wed Dec 26, 2012 9:55 am
by HighAley
Hello.
Please, check the prerelease build from 2012.12.21. There was an improvement.
Thank you.
Re: sti.fx.flex.2012.3 and sti.fx.java.2012.3 communication
Posted: Thu Dec 27, 2012 2:21 am
by Chipo
Hi,
Aleksey Andreyanov wrote:
Please, check the prerelease build from 2012.12.21. There was an improvement.
Thank you.
I updated all flex and java libraries to last available from Stimulsoft download. I still have error:
Code: Select all
java.lang.IllegalArgumentException: No enum constant com.stimulsoft.flex.utils.StiHttpParam.LoadData
at java.lang.Enum.valueOf(Enum.java:236)
at com.stimulsoft.flex.utils.StiHttpParam.valueOf(StiHttpParam.java:9)
at com.stimulsoft.web.servlet.StiViewerFxServlet.processing(StiViewerFxServlet.java:56)
at com.stimulsoft.web.servlet.StiViewerFxServlet.doPost(StiViewerFxServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
...
This happens only if report has datasources inside. Just plain report without data is fine.
The way I launch report in viewer is:
1. Inialise the Java API Provider
Code: Select all
StiApiProvider.provider = new StiApiProviderJava(StiApiProvider.AppDesignerFx);
StiApiProvider.provider.addEventListener(StiApiProviderEvent.INITIALIZE_PROVIDER_RESULT, onStiInitialiseProiderResult);
StiApiProvider.provider.dispatchEvent(new StiApiProviderEvent(StiApiProviderEvent.INITIALIZE_PROVIDER, stiJavaServerUrl, StiProgressMode.Visible));
where stiJavaServerUrl is a path to servlet
Code: Select all
<servlet>
<servlet-name>StiViewerFx</servlet-name>
<servlet-class>com.stimulsoft.web.servlet.StiViewerFxServlet</servlet-class>
</servlet>
2. and chain of events after that
Code: Select all
protected function onStiInitialiseProiderResult(event:StiApiProviderEvent):void {
StiApiProvider.provider.removeEventListener(event.type, onStiInitialiseProiderResult);
ReportHelper.overrideViewerDesignerOptions();
StiViewerFx.initialize();
loadAndRunReport();
}
protected function loadAndRunReport():void {
var stiApiEvent: StiApiProviderEvent = new StiApiProviderEvent(StiApiProviderEvent.LOAD_REPORT, null,
StiProgressMode.VisibleCancel, ReportHelper.reportAsId(report));
StiApiProvider.provider.addEventListener(StiApiProviderEvent.LOAD_REPORT_RESULT, onLoadReportFileResult);
StiApiProvider.provider.dispatchEvent(stiApiEvent);
}
private function onLoadReportFileResult(event: StiApiProviderEvent): void {
StiApiProvider.provider.removeEventListener(event.type, onLoadReportFileResult);
// create report
var stiReport:StiReport = new StiReport();
stiReport.reportFile = event.fileName;
stiReport.reportName = event.fileName;
stiReport.reportAlias = event.fileName;
stiReport.loadReportFromString(event.stringData);
stiReport.isRendered = false;
stiReport.addEventListener(StiReportEvent.END_RENDER, onRenderComplete);
stiReport.render(true);
}
private function onRenderComplete(event: StiReportEvent): void {
event.report.removeEventListener(StiReportEvent.END_RENDER, onRenderComplete);
reportViewer.updateReport(event.report);
}
Is there something wrong in a way I show the report in viewer?
Best regards.
Re: sti.fx.flex.2012.3 and sti.fx.java.2012.3 communication
Posted: Thu Dec 27, 2012 12:15 pm
by Vladimir
Hello,
We found an error, it is on the Java side when working with data. Fix will be available in the next prerelease build this week.
Thank you.
Re: sti.fx.flex.2012.3 and sti.fx.java.2012.3 communication
Posted: Sun Dec 30, 2012 10:13 pm
by Chipo
Hi,
I installed all new libraries and now I have:
Code: Select all
SEVERE:
com.stimulsoft.base.exception.StiException: java.lang.NullPointerException
at com.stimulsoft.flex.events.StiAbstractAction.run(StiAbstractAction.java:22)
at com.stimulsoft.web.servlet.StiServlet.runAction(StiServlet.java:29)
at com.stimulsoft.web.servlet.StiViewerFxServlet.processingParam(StiViewerFxServlet.java:75)
at com.stimulsoft.web.servlet.StiViewerFxServlet.processing(StiViewerFxServlet.java:57)
at com.stimulsoft.web.servlet.StiViewerFxServlet.doPost(StiViewerFxServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:5
4)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:91)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java
:183)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at com.stimulsoft.flex.interactionObject.StiCellData.<init>(StiCellData.java:34)
at com.stimulsoft.flex.interactionObject.StiRowData.add(StiRowData.java:28)
at com.stimulsoft.flex.events.StiReturnXmlOrSqlData.getData(StiReturnXmlOrSqlData.java:101)
at com.stimulsoft.flex.events.StiReturnXmlOrSqlData.processLoadData(StiReturnXmlOrSqlData.java:81)
at com.stimulsoft.flex.events.StiReturnXmlOrSqlData.process(StiReturnXmlOrSqlData.java:51)
at com.stimulsoft.flex.events.StiAbstractAction.run(StiAbstractAction.java:20)
... 64 more
Problem is here
Code: Select all
public StiCellData(DataCell paramDataCell) {
this.name = paramDataCell.getColumnName();
this.data = paramDataCell.getValue().toString();
}
Sometimes paramDataCell.getValue() is null.
This works
Code: Select all
this.data = (paramDataCell.getValue() == null) ? "" : paramDataCell.getValue().toString();
When I passed hiccup above I managed designer preview work, but viewer stuck with message "Compilling Report" and does not go anywhere.
Please help.
С новым годом однако.
Re: sti.fx.flex.2012.3 and sti.fx.java.2012.3 communication
Posted: Thu Jan 03, 2013 12:08 pm
by HighAley
Hello.
We fixed the issue. The patch will be available in our next prerelease build.
Thank you.