Embedded Jetty upgrade issues from 6.1.7 to 9.4.43 - servlets

I have used jetty.xml for configuration in older jetty version which looks something like this:
<Configure id="Server" class="org.mortbay.jetty.Server">
<Set name="ThreadPool">
<New class="org.mortbay.thread.BoundedThreadPool">
<Set name="minThreads">10</Set>
<Set name="maxThreads">250</Set>
<Set name="lowThreads">25</Set>
</New>
</Set>
<Call name="addConnector">
<Arg>
<New class="org.mortbay.jetty.nio.SelectChannelConnector">
<Set name="host">
<SystemProperty name="jetty.host"/>
</Set>
<Set name="port">
<SystemProperty name="jetty.port" default="9096"/>
</Set>
<Set name="maxIdleTime">30000</Set>
<Set name="Acceptors">2</Set>
<Set name="statsOn">false</Set>
<Set name="confidentialPort">8443</Set>
<Set name="lowResourcesConnections">5000</Set>
<Set name="lowResourcesMaxIdleTime">5000</Set>
</New>
</Arg>
</Call>
<Set name="handler">
<New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.mortbay.jetty.Handler">
<Item>
<New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection"/>
</Item>
<!-- Disabling this as it is a security risk (by exposing all contexts) in production-->
<!--Item>
<New id="DefaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/>
</Item-->
<Item>
<New id="RequestLog" class="org.mortbay.jetty.handler.RequestLogHandler"/>
</Item>
</Array>
</Set>
</New>
</Set>
<Call name="addLifeCycle">
<Arg>
<New class="org.mortbay.jetty.deployer.ContextDeployer">
<Set name="contexts">
<Ref id="Contexts"/>
</Set>
<Set name="configurationDir">
<SystemProperty name="jetty.home" default="."/>/contexts</Set>
<Set name="scanInterval">1</Set>
</New>
</Arg>
</Call>
<New class="org.mortbay.jetty.servlet.Context">
<Arg>
<Ref id="Contexts"/>
</Arg>
<Arg>/cts/output</Arg>
<Set name="resourceBase">
<SystemProperty name="jetty.home" default="."/>/../cache/</Set>
<Call name="addServlet">
<Arg>com.myservlet.webservices.remote.FileProxyServlet</Arg>
<Arg>/</Arg>
</Call>
</New>
<Ref id="RequestLog">
<Set name="requestLog">
<New id="RequestLogImpl" class="org.mortbay.jetty.NCSARequestLog">
<Set name="filename">
<SystemProperty name="jetty.logs" default="../logs"/>/ws.request_yyyy_mm_dd.log</Set>
<Set name="filenameDateFormat">yyyy_MM_dd</Set>
<Set name="retainDays">90</Set>
<Set name="append">true</Set>
<Set name="extended">true</Set>
<Set name="logCookies">false</Set>
<Set name="LogTimeZone">GMT</Set>
</New>
</Set>
</Ref>
<!-- =========================================================== -->
<!-- extra options -->
<!-- =========================================================== -->
<Set name="stopAtShutdown">true</Set>
<Set name="sendServerVersion">true</Set>
<Set name="sendDateHeader">true</Set>
<Set name="gracefulShutdown">1000</Set>
</Configure>```
And to call this configuration following code has been written:
<Ref id="RequestLog">
<Set name="requestLog">
<New id="RequestLogImpl" class="org.mortbay.jetty.NCSARequestLog">
<Set name="filename">
<SystemProperty name="jetty.logs" default="../logs"/>/ws.request_yyyy_mm_dd.log</Set>
<Set name="filenameDateFormat">yyyy_MM_dd</Set>
<Set name="retainDays">90</Set>
<Set name="append">true</Set>
<Set name="extended">true</Set>
<Set name="logCookies">false</Set>
<Set name="LogTimeZone">GMT</Set>
</New>
</Set>
</Ref>
<!-- =========================================================== -->
<!-- extra options -->
<!-- =========================================================== -->
<Set name="stopAtShutdown">true</Set>
<Set name="sendServerVersion">true</Set>
<Set name="sendDateHeader">true</Set>
<Set name="gracefulShutdown">1000</Set>
</Configure>
Following code has been written to call this configuration:
Server myServer;
File theConfigFile = new File( "C://jetty//etc//jetty.xml" );
XmlConfiguration theXmlConfiguration = new XmlConfiguration( theConfigFile.toURL() );
theXmlConfiguration.configure( myServer );
myServer.start();
I was trying to create similar configuration using jetty 9.4.43:
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure id="jetty" class="org.eclipse.jetty.server.Server">
<New id="threadPool" class="org.eclipse.jetty.util.thread.QueuedThreadPool">
<Set name="minThreads" type="int"><Property name="jetty.threadPool.minThreads" deprecated="threads.min" default="10"/></Set>
<Set name="maxThreads" type="int"><Property name="jetty.threadPool.maxThreads" deprecated="threads.max" default="200"/></Set>
<Set name="reservedThreads" type="int"><Property name="jetty.threadPool.reservedThreads" default="25"/></Set>
<Set name="idleTimeout" type="int"><Property name="jetty.threadPool.idleTimeout" deprecated="threads.timeout" default="60000"/></Set>
<Set name="detailedDump" type="boolean"><Property name="jetty.threadPool.detailedDump" default="false"/></Set>
</New>
<Call name="addBean">
<Arg>
<New class="org.eclipse.jetty.util.thread.ScheduledExecutorScheduler"/>
</Arg>
</Call>
<Set name="connectors">
<Array type="org.eclipse.jetty.server.Connector">
<Item>
<New class="org.eclipse.jetty.server.ServerConnector">
<Arg><Ref refid="jetty"/></Arg>
<Set name="port">
<Property name="jetty.http.port" default="9096" />
</Set>
</New>
</Item>
</Array>
</Set>
<Set name="handler">
<New class="org.eclipse.jetty.server.handler.HandlerList">
<Set name="handlers">
<Array type="org.eclipse.jetty.server.Handler">
<Item>
<New class="org.eclipse.jetty.server.handler.ResourceHandler">
<Set name="directoriesListed">true</Set>
<Set name="resourceBase">.</Set>
</New>
</Item>
</Array>
</Set>
</New>
</Set>
<New class="org.eclipse.jetty.servlet.ServletContextHandler">
<Arg>
<Ref id="Contexts"/>
</Arg>
<Arg>/cts/output</Arg>
<Set name="resourceBase">
<SystemProperty name="jetty.home" default="."/>/../cache/</Set>
<Call name="addServlet">
<Arg>com.myservlet.webservices.remote.FileProxyServlet</Arg>
<Arg>/</Arg>
</Call>
</New>
<Set name="stopAtShutdown"><Property name="jetty.server.stopAtShutdown" default="true"/></Set>
<Set name="stopTimeout"><Property name="jetty.server.stopTimeout" default="5000"/></Set>
<Set name="dumpAfterStart"><Property name="jetty.server.dumpAfterStart" deprecated="jetty.dump.start" default="true"/></Set>
<Set name="dumpBeforeStop"><Property name="jetty.server.dumpBeforeStop" deprecated="jetty.dump.stop" default="true"/></Set>
</Configure>
With new jetty.xml, port 9096 is exposed and all files available under that directory from where intelliJ is running is accessible but the FileProxyServlet url i.e localhost:9096/cts/output is not accessible(shows HTTP ERROR 404 Not Found).
This was not the case earlier instead only servlet was working fine.
Below is the console log on running with new jetty:
System Property [DEBUG] has been deprecated! (Use org.eclipse.jetty.LEVEL=DEBUG instead) 2021-10-16
13:56:48.162:INFO::main: Logging initialized #80050ms to
org.eclipse.jetty.util.log.StdErrLog [ShutdownMonitor] Not enabled
(port < 0): -1 2021-10-16 13:56:48.547:INFO:oejs.Server:Jetty Web
Server Start Thread: jetty-9.4.43.v20210629; built:
2021-06-30T11:07:22.254Z; git:
526006ecfa3af7f1a27ef3a288e2bef7ea9dd7e8; jvm 11.0.7+10-LTS 2021-10-16
13:56:48.650:INFO:oejs.AbstractConnector:Jetty Web Server Start
Thread: Started ServerConnector#70239ac0{HTTP/1.1,
(http/1.1)}{0.0.0.0:9096} Server#4db85c57{STARTING}[9.4.43.v20210629]
STARTING
+= QueuedThreadPool[qtp1589931229]#5ec46cdd{STARTED,8<=8<=200,i=6,r=-1,q=0}[ReservedThreadExecutor#16627f86{s=0/2,p=0}]
STARTED | +- org.eclipse.jetty.util.thread.ThreadPoolBudget#2d7c53b6 | +=
ReservedThreadExecutor#16627f86{s=0/2,p=0} - STARTED | +> threads
size=8 | +> qtp1589931229-31 RUNNABLE tid=31 prio=5 #
java.base#11.0.7/java.lang.invoke.InnerClassLambdaMetafactory.getParameterSize(InnerClassLambdaMetafactory.java:522)
| +> qtp1589931229-34 TIMED_WAITING tid=34 prio=5 IDLE | +>
qtp1589931229-29 TIMED_WAITING tid=29 prio=5 IDLE | +>
qtp1589931229-27 TIMED_WAITING tid=27 prio=5 IDLE | +>
qtp1589931229-32 TIMED_WAITING tid=32 prio=5 IDLE | +>
qtp1589931229-33 RUNNABLE tid=33 prio=5 SELECTING | +>
qtp1589931229-28 TIMED_WAITING tid=28 prio=5 IDLE | +>
qtp1589931229-30 TIMED_WAITING tid=30 prio=5 IDLE
+= ScheduledExecutorScheduler#1e20e272{STARTED} - STARTED
+= ServerConnector#70239ac0{HTTP/1.1, (http/1.1)}{0.0.0.0:9096} - STARTED | +~ Server#4db85c57{STARTING}[9.4.43.v20210629] - STARTING |
+~ QueuedThreadPool[qtp1589931229]#5ec46cdd{STARTED,8<=8<=200,i=6,r=-1,q=0}[ReservedThreadExecutor#16627f86{s=0/2,p=0}]
STARTED | +~ ScheduledExecutorScheduler#1e20e272{STARTED} - STARTED | +- org.eclipse.jetty.io.ArrayByteBufferPool#3a1e66f1 | +=
HttpConnectionFactory#dc1f9ce[HTTP/1.1] - STARTED | | +-
HttpConfiguration#1960af83{32768/8192,8192/8192,https://:0,[]} | |
+> customizers size=0 | | +> formEncodedMethods size=2 | | | +> POST | | | +> PUT | | +> outputBufferSize=32768 | | +> outputAggregationSize=8192 | | +> requestHeaderSize=8192 | | +> responseHeaderSize=8192 | | +> headerCacheSize=1024 | | +> secureScheme=https | | +> securePort=0 | | +> idleTimeout=-1 | | +> blockingTimeout=-1 | | +>
sendDateHeader=true | | +> sendServerVersion=true | | +>
sendXPoweredBy=false | | +> delayDispatchUntilContent=true | |
+> persistentConnectionsEnabled=true | | +> maxErrorDispatches=10 | | +> minRequestDataRate=0 | | +> minResponseDataRate=0 |
| +> cookieCompliance=RFC6265 | | +>
setRequestCookieCompliance=RFC6265 | | +>
notifyRemoteAsyncErrors=true | | +> relativeRedirectAllowed=false
| += SelectorManager#ServerConnector#70239ac0{HTTP/1.1,
(http/1.1)}{0.0.0.0:9096} - STARTED | | +=
ManagedSelector#6ade7db{STARTED} id=0 keys=0 selected=0 updates=0 -
STARTED | | +=
EatWhatYouKill#6c4eab86/SelectorProducer#550ad4bd/PRODUCING/p=false/QueuedThreadPool[qtp1589931229]#5ec46cdd{STARTED,8<=8<=200,i=6,r=-1,q=0}[ReservedThreadExecutor#16627f86{s=0/2,p=0}][pc=0,pic=0,pec=0,epc=0]#2021-10-16T13:56:48.6782212+05:30
STARTED | | | +- SelectorProducer#550ad4bd | | | +~ QueuedThreadPool[qtp1589931229]#5ec46cdd{STARTED,8<=8<=200,i=6,r=-1,q=0}[ReservedThreadExecutor#16627f86{s=0/2,p=0}]
STARTED | | +> updates # 2021-10-16T13:56:48.6732217+05:30 size=0 | | +> keys # 2021-10-16T13:56:48.674221+05:30 size=0 |
+- sun.nio.ch.ServerSocketChannelImpl[/0:0:0:0:0:0:0:0:9096] | +- qtp1589931229-31-acceptor-0#24c38c77-ServerConnector#70239ac0{HTTP/1.1,
(http/1.1)}{0.0.0.0:9096}
+= HandlerList#34d20482{STARTED} - STARTED | += ResourceHandler#28a68c0{STARTED} - STARTED
+= ErrorHandler#61ad62a3{STARTED} - STARTED
+> jdk.internal.loader.ClassLoaders$AppClassLoader#311d617d +> jdk.internal.loader.ClassLoaders$PlatformClassLoader#5e955596 key: +-
bean, += managed, +~ unmanaged, +? auto, +: iterable, +] array, +#
map, +> undefined 2021-10-16 13:56:48.679:INFO:oejs.Server:Jetty Web
Server Start Thread: Started #80567ms
I have been struggling on this from past few days, Can anyone please help me out?

Some changes I would recommend.
First, the ResourceHandler is doing nothing for you.
<Array type="org.eclipse.jetty.server.Handler">
<Item>
<New class="org.eclipse.jetty.server.handler.ResourceHandler">
<Set name="directoriesListed">true</Set>
<Set name="resourceBase">.</Set>
</New>
</Item>
</Array>
At best it sits there and does nothing. (as it has no context so no requests can reach it).
At worst, the way you have set it up you've now shared your entire drive via that ResourceHandler.
Remove it.
Next, the declaration of your ServletContext ...
<New class="org.eclipse.jetty.servlet.ServletContextHandler">
<Arg>
<Ref id="Contexts"/>
</Arg>
<Arg>/cts/output</Arg>
<Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/../cache/</Set>
<Call name="addServlet">
<Arg>com.myservlet.webservices.remote.FileProxyServlet</Arg>
<Arg>/</Arg>
</Call>
Things about this declaration ...
It doesn't end it </New> so it's a broken XML.
Fix your XML.
The first <Arg><Ref id="Contexts"/></Arg> is pointless and mangled as well. The first argument appears to be attempting to point to a Contexts reference somewhere else, but that reference doesn't exist anywhere, and your use of <Ref> element is wrong as well, you've declared the <Ref> itself with the id="Contexts" and are not referencing some other id, which would be <Ref refid="otherId"/>.
Remove that <Arg> entirely, it serves no purpose
The use of <Arg>/cts/output</Arg> to set the context-path is wrong in multiple ways.
Context Path rules are (Must start with / and cannot contain any other slash anywhere else, no nested context paths, that's what url-patterns are for)
Don't attempt to use the constructor to set the context-path, use the setter.
Remove this <Arg> as well, declare a valid context path, and then use the setter instead <Set name="contextPath">/foo</Set>
You add a servlet to / url-pattern, making the effort on resourceBase invalid.
Fix this url-pattern.
Your ServletContextHandler is not part of the server handler tree as well. I think you were trying to do that with the first <Arg>, but that's not how you add it to the handler tree.
If you are declaring it directly, just put the <New class="ServletContextHandler">... in the handler tree itself.
If you are loading / instantiating the ServletContextHandler later, then you have to use the DeploymentManager and WebAppProvider along with an existing ContextHandlerCollection that is present in the handler tree already for the deployment to add it to.
You have a weird and frankly broken mix of usages that not even Jetty 6 should have allowed.
You cannot have FileProxyServlet on the default url-pattern (which is /) AND have static resources served at the same time.
Suggestion, use Jetty properly (these suggestions also work in Jetty 6 and all the way back to Jetty 4 no less!)
Don't mix ServletContextHandler and ResourceHandler.
Use the ServletContextHandler only.
Make the ServletContextHandler contexPath only /ctx
Make the ServletContextHandler resourceBase point to the location (directory or jar:file:// url) where your static file content is.
Add the normal DefaultServlet to your ServletContextHandler (make sure it's named "default" and is the only servlet mapped to /).
Add your com.myservlet.webservices.remote.FileProxyServlet to the url-pattern /output.
Finally, add your ServletContextHandler to the server Handler tree.
Here's some more information from past answers that I encourage you to read.
Jetty: default servlet context path
Serving static files from alternate path in embedded Jetty
What is difference between ServletContextHandler.setResourceBase and ResourceHandler.setResourceBase when using Jetty embedded container?
Embedded Jetty handling urls to serve content
How to configure Jetty Handlers?
Serving static files from alternate path in embedded Jetty
Jetty: How to nest HandlerWrapper, HandlerList, and ContextHandlerCollection, and ContextHandler
Thing is, doing this entirely in a single XML file is just baffling (the use of a single XML file to configure Jetty was discouraged back when Jetty 6.0.0 was first released). Have you considered using the XML files that come with jetty-home already and just referencing them (in the correct order) in your own embedded-jetty startup?
That means you only have to define, by hand, the ServletContextHandler, and put it wherever you want your WebAppProvider to look for contexts to deploy.
Bonus is that your effort to upgrade Jetty versions becomes trivial.

Related

Dynamically populate version from version.sbt

I'm trying to take the version from version.sbt and and populate it to logback.xml's log appender's applicationVersion field.
version.sbt
version in ThisBuild := "0.4.63"
logback.xml
<configuration debug="true" scan="true" scanPeriod="60 seconds">
<appender name="ADP-MESSAGING" class="com.agoda.adp.messaging.logging.appenders.LogbackAppender">
<applicationName>MyApp</applicationName>
<applicationAssemblyName>myapp</applicationAssemblyName>
<applicationVersion>0.4.61</applicationVersion>
<!-- <applicationVersion>${application.version}</applicationVersion> -->
<apiKey>s234W##$WFW$#$#</apiKey>
<getCallerData>false</getCallerData>
</appender>
....
<root level="WARN">
<appender-ref ref="ADP-MESSAGING" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
I tried by adding ${application.version}, ${version} but no success.
How can I do this?
Please share your thoughts.
Thanks
The values interpolated in a logback.xml file are simply Java system properties. All you have to do is add a value to your Java commandline defining the value you want:
// NOTE: This will only work when running through sbt. You'll have to
// append the same value to your startup scripts when running elsewhere.
javaOptions += "-Dapplication.version=" + version.value
With this flag, you should be able to interpolate the version in your XML file:
<applicationVersion>${application.version}</applicationVersion>
You can add logback PropertyDefiner implementation:
package org.mypackage
import ch.qos.logback.core.PropertyDefinerBase
class VersionPropertyDefiner extends PropertyDefinerBase {
override def getPropertyValue: String = BuildInfo.version
}
You will get autogenerated (managed) scala code BuildInfo.version if you use BuildInfoPlugin in your project build settings.
Then you can define and use variable in your logback.xml configuration:
<configuration debug="true" scan="true" scanPeriod="60 seconds">
<define name="appVersion" class="org.mypackage.VersionPropertyDefiner"/>
<appender name="ADP-MESSAGING" class="com.agoda.adp.messaging.logging.appenders.LogbackAppender">
<applicationName>MyApp</applicationName>
<applicationAssemblyName>myapp</applicationAssemblyName>
<applicationVersion>${appVersion}</applicationVersion>
<apiKey>s234W##$WFW$#$#</apiKey>
<getCallerData>false</getCallerData>
</appender>
....
<root level="WARN">
<appender-ref ref="ADP-MESSAGING" />
<appender-ref ref="STDOUT" />
</root>
</configuration>

How to add the header in autogenerated bindings code by qdbusxml2cpp?

$qdbusxml2cpp -v -c CustomIf -p customif.h:customif.cpp org.item.custom.xml
org.item.custom.xml
<node>
<interface name="org.pace.custom">
<method name="Send_Custom_Msg">
<arg name="msg" type="a(ii)" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="Message"/>
</method>
<signal name="LateEvent">
<arg name="eventkind" type="s" direction="out"/>
</signal>
</interface>
</node>
How to add the header - message.h in the generated adaptor customif.h? I don't want to add manually into it as #include "message.h", but actually want the qdbusxml2cpp to add the inclusion.
Use the following option:
-i <filename> Add #include to the output
So, this would be the corresponding command:
qdbusxml2cpp -v -i message.h -c CustomIf -p customif.h:customif.cpp org.item.custom.xml

quartz scheduling in spring 3 with batch file

i have a batch(backup.bat)file.in that i have written a command to create a backup of database
which is
<
set path=%path%;C:\Program files\MySQL\MySQL Server 5.1\bin;
mysqldump -u `root` -padmin -B jewellery > backup\jewellery.sql
exit
>
i have created a controller to call this batch file.
that is given below
<
public class JobScheduleController extends QuartzJobBean {
protected void executeInternal(JobExecutionContext ctx) throws JobExecutionException {
// check FTP
try {
Runtime rt = Runtime.getRuntime();
rt.exec("cmd.exe /c start Backup.bat");
.....
.....
......
catch(Exception ex){
ex.printStackTrace();
}
}
}
>
even i have given the mapping in bean.xml that is given below
!-- Start Job Schedule for Application Backup Controllers-->
<bean name="jobScheduleController" class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="jobClass" value="com.jewellery.web.JobScheduleController" />
</bean>
<bean id="cronjobScheduleController" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="jobScheduleController" />
<!-- run at 11 am (0 0 11 ? * *") (Seconds,Minutes,Hours,Day-of-Month,Month,Day-of-Week) -->
<property name="cronExpression" value="0 0 11 ? * *" />
</bean>
<bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="cronjobScheduleController" />
</list>
</property>
</bean>
the problem is as per the given time the controller shuld search and invoke the batch file to execute.but it says the batch file not found.
where shuld i place the batch file .
the same code was running succussfully in spring 2.0,nw i have migrated to spring 3.
where shuld i place my batch file.?
i am using eclipse indigo...?and one more thing is this the best way to do it or some other way is also there..if there kindly let me knw.
Just set Backup.bat in your environment path variable

ASDOC Ant : error with DEFINE

[Flex4.5 - Windows XP]
I defined all my define (string type) in asdoc target like this :
<target name="build-asdoc" depends="setup-asdoc-dir, manifest">
<exec executable="${FLEX_HOME}/bin/asdoc.exe" failonerror="true">
...
<!-- Defines -->
<arg line="-define+=CONFIG::version,'${env.VERSION}'" />
<arg line="-define+=CONFIG::mode,'${mode.production}'" />
<arg line="-define+=CONFIG::label,'${env.LABEL}'" />
Even these define, when ASDOC.exe runs, there are some errors on all these define in the code; example :
[exec] C:\DATA\Trinity\Dev\trinity-client\src\fr\laposte\trinity\common\GlobalClass.as(44): col: 76 Erreur: Accès à la propriété non définie mode.
[exec] private static var WEBSERVICE_SERVER_LABEL_TOKEN:String = String(CONFIG::mode).toUpperCase();
Thank you very much,
regards,
Anthony

fusioncharts: Line graph is giving errors

Iam able to draw graphs like "Column2D, Column3D, Bar2D, Bar3D, Funnel etc, but Iam unable to draw graphs of "Line" and "MsLine". Following is my javascript code :
jQuery('#myChartContainer').insertFusionCharts({
swfPath: base_url+'resource/js/Charts/',
width : '400',
height: '500',
type: "MSLine",
chartRightMargin: '20',
data: "<graph caption='Monthly Sales Summary'
subcaption='For the year 2004'
xAxisName='Month'
yAxisMinValue='15000'
yAxisName='Sales'
numberPrefix='$'
showNames='1'
showValues='0'
rotateNames='0'
showColumnShadow='1'
animation='1'
showAlternateHGridColor='1'
AlternateHGridColor='ff5904'
divLineColor='ff5904'
divLineAlpha='20'
alternateHGridAlpha='5'
canvasBorderColor='666666'
baseFontColor='666666'>
<set name='Jan' value='17400' hoverText='January'/>
<set name='Feb' value='19800' hoverText='February'/>
<set name='Mar' value='21800' hoverText='March'/>
<set name='Apr' value='23800' hoverText='April'/>
<set name='May' value='29600' hoverText='May'/>
<set name='Jun' value='27600' hoverText='June'/>
<set name='Jul' value='31800' hoverText='July'/>
<set name='Aug' value='39700' hoverText='August'/>
<set name='Sep' value='37800' hoverText='September'/>
<set name='Oct' value='21900' hoverText='October'/>
<set name='Nov' value='32900' hoverText='November' />
<set name='Dec' value='39800' hoverText='December' />
</graph>",
dataFormat: "XMLData",
wMode: "transparent"
});
When I use, Line/MSLine graphs, I get following error in FIREBIG :
"uncaught exception: Chart Type Not Found!"
But when I check swf files on server, I can see LINE and MSLINE swfs, along with other graph swfs like COLUMNS2S, COLUMN3D, FUNNEL etc.
Can some one guide me where and what Iam doing wrong and how it can be rectified.
Thanks in advance
Have you been able to successfuly plot any charts?
I'm also not convinced your XML is valid. Please see the FusionCharts Support Forum for the relevant XSDs. I haven't created FusionCharts usign JavaScript before but the following is valid xml:
<chart>
<categories>
<category label='Jan'>
<category label='Feb'>
<category label='Mar'>
<category label='Apr'>
<category label='May'>
<category label='Jun'>
<category label='Jul'>
<category label='Aug'>
<category label='Sep'>
<category label='Oct'>
<category label='Nov'>
<category label='Dec'>
</categories>
<dataset>
<set value='17400' hoverText='January'/>
<set value='19800' hoverText='February'/>
<set value='21800' hoverText='March'/>
<set value='23800' hoverText='April'/>
<set value='29600' hoverText='May'/>
<set value='27600' hoverText='June'/>
<set value='31800' hoverText='July'/>
<set value='39700' hoverText='August'/>
<set value='37800' hoverText='September'/>
<set value='21900' hoverText='October'/>
<set value='32900' hoverText='November' />
<set value='39800' hoverText='December' />
</dataset>
</chart>
Please try once using the name line2d and msline2d.
Here is the list of acceptable chart types:
area2d
bar2d
bubble
candlestick
column2d
column3d
donut2d
donut3d
doughnut2d
doughnut3d
dragarea
dragcolumn2d
dragline
dragnode
drawingpad
errorbar2D
exportcomponent
funnel
gantt
horizontalbullet
inversearea2d
inversecolumn2d
inverseline2d
kagi
line2d
logcolumn2d
logline2d
msarea2d
msbar2d
msbar3d
mscolumn2d
mscolumn3d
mscolumn3dline
mscolumn3dlinedy
mscombi2d
mscombi3d
mscombidy2d
msline2d
msspline2d
mssplinearea2d
msstackedcolumn2d
msstackedcolumn2dlinedy
multiaxisline
multilevelpie
pie2d
pie3d
pyramid
radar
realtimeangular
realtimearea
realtimebulb
realtimecolumn
realtimecylinder
realtimehorizontalled
realtimehorizontallinear
realtimeline
realtimestackedarea
realtimestackedcolumn
realtimethermometer
realtimeverticalled
scatter
scrollarea2d
scrollcolumn2d
scrollcombi2d
scrollcombidy2d
scrollline2d
scrollstackedcolumn2d
selectscatter
sparkcolumn
sparkline
sparkwinloss
spline2d
splinearea2d
ssgrid
stackedarea2d
stackedbar2d
stackedbar3d
stackedcolumn2d
stackedcolumn3d
stackedcolumn3dlinedy
verticalbullet
waterfall

Resources