05-17-2011 06:38 AM - last edited on 05-17-2011 06:43 AM
When loading configure file config.xml with Analytics Service, I always encounter this error:
Webtrends: 2011-05-17 18:43:44.953, exception=null, Error loading config file
Webtrends: 2011-05-17 18:43:45.078, submitEventTask, entry
Webtrends: 2011-05-17 18:43:45.078, Threadpool.assign, tid=Thread[Thread-64164864,5]
Webtrends: 2011-05-17 18:43:45.078, submitEventTask, submitted
Webtrends: 2011-05-17 18:43:45.093, ThreadPool.run, running thread
Webtrends: 2011-05-17 18:43:45.093, Adding new event, thread=Thread[Thread-62532608,5], type=APPLICATION_START
Webtrends: 2011-05-17 18:43:45.203, PQH:event processor started, tid=Thread[Thread-62513152,5]
Webtrends: 2011-05-17 18:43:45.203, PQH:aquiring read lock on the events queue
Webtrends: 2011-05-17 18:43:45.265, PQH
rocessing next event. new queue size=0
Webtrends: 2011-05-17 18:43:45.265, Battery level=100
Webtrends: 2011-05-17 18:43:45.265, Battery level=100
Webtrends: 2011-05-17 18:43:45.265, svc_url=/YOUR_WEBTRENDS_DCSID_HERE/events.svc
Webtrends: 2011-05-17 18:43:45.281, exception=URL not http or https, PQH:transmitEvent
Webtrends: 2011-05-17 18:43:45.281, WTDataStore, enqueueEventB
Webtrends: 2011-05-17 18:43:45.296, PQH:unknown response code
Webtrends: 2011-05-17 18:43:45.328, PQH:aquiring read lock on the events queue
Webtrends: 2011-05-17 18:43:45.328, PQH
rocessing next event. new queue size=0
Webtrends: 2011-05-17 18:43:45.328, Battery level=100
Webtrends: 2011-05-17 18:43:45.328, Battery level=100
Webtrends: 2011-05-17 18:43:45.328, svc_url=/YOUR_WEBTRENDS_DCSID_HERE/events.svc
Webtrends: 2011-05-17 18:43:45.328, exception=URL not http or https, PQH:transmitEvent
Webtrends: 2011-05-17 18:43:45.328, WTDataStore, enqueueEventB
Webtrends: 2011-05-17 18:43:45.343, PQH:unknown response code
Webtrends: 2011-05-17 18:43:45.671, PQH:aquiring read lock on the events queue
Webtrends: 2011-05-17 18:43:45.671, PQH
rocessing next event. new queue size=0
Webtrends: 2011-05-17 18:43:45.671, Battery level=100
Webtrends: 2011-05-17 18:43:45.671, Battery level=100
Webtrends: 2011-05-17 18:43:45.671, svc_url=/YOUR_WEBTRENDS_DCSID_HERE/events.svc
Webtrends: 2011-05-17 18:43:45.687, exception=URL not http or https, PQH:transmitEvent
Webtrends: 2011-05-17 18:43:45.687, WTDataStore, enqueueEventB
Seems the configure file is found, but when parse it, some error happens.
Any body give some suggestions? Thanks in advance. My configure file is as below:
<?xml version="1.0" encoding="utf-8"?> <resources> <!-- Category of your application. Chooose one of: --> <!-- Business --> <!-- Education --> <!-- Entertainment --> <!-- Finance --> <!-- Games --> <!-- Health & Wellness --> <!-- IM & Social Networking --> <!-- Maps & Navigation --> <!-- Music & Audio --> <!-- News --> <!-- Photo & Video --> <!-- Productivity --> <!-- Reference & eBooks --> <!-- Shopping --> <!-- Sports & Recreation --> <!-- Test Center --> <!-- Themes --> <!-- Travel --> <!-- Utilities --> <!-- Weather --> <string name="wt_dc_app_category">Utilities</string>
<!-- Name of your application. --> <string name="wt_dc_app_name">Application50</string> <!-- Publisher of your application (vendor or developer name). --> <string name="wt_dc_app_publisher">Company Name</string>
<!-- Version of your application. --> <string name="wt_dc_app_version">7</string> <!-- Percent of battery life remaining when event send is paused. This is the recommended setting for Webtrends data collection. --> <string name="wt_dc_charge_threshold_minimum">10</string>
<!-- Supply a unique ID in the format dcsxxxxxxxxxxxxxxxxxxxxxx_xxxx that is associated with a Webtrends data source. This ID identifies your data to the Webtrends data collection server. If you don't have a dcsid, contact your Webtrends administrator.--> <string name="wt_dc_dcsid">DCS8QDWLNYN821234345566667L_7G7
<!-- Set this value to "true" if you want to enable application logging. --> <string name="wt_dc_debug">true</string>
<!-- Set this value to "false" if you want to disable the Webtrends library. --> <string name="wt_dc_enabled">true</string>
<!-- Number of times to retry sending an event in response to send error. This is the recommended setting for Webtrends data collection. --> <string name="wt_dc_event_retry_maximum">5</string>
<!-- Maximum number of events stored in event queue. This is the recommended setting for Webtrends data collection. --> <string name="wt_dc_event_table_size_maximum">10000</strin
<!-- Set this value to "true" if you want the Webtrends library to request PERMISSION_INTERNET, PERMISSION_CROSS_APPLICATION_COMMUNICATION, PERMISSION_SECURITY_DATA from the permission database. Otherwise you must manage permissions. --> <string name="wt_dc_request_permission">true</string>
<!-- Session expiration in minutes. This is the recommended setting for Webtrends data collection. --> <string name="wt_dc_session_maximum">480</string>
<!-- Session timeout in minutes. This is the recommended setting for Webtrends data collection. --> <string name="wt_dc_session_timeout">30</string>
<!-- Timezone of datasource in number of hours offset from GMT. --> <string name="wt_dc_timezone">-8</string>
<!-- Data Collection API base URL. This URL is static and should not be changed. --> <string name="wt_dc_url">https://dc.webtrends.com/v1</string></resources>
Solved! Go to Solution.
05-17-2011 11:49 AM
It is not finding your config file. That's why those log messages are showing default values.
Make sure you are including it in the right place, and that you are importing it using the API and the fully qualified path name. See the sample app for an example.
Also, your DCS value should all be in lower case. Others have had the same problem.
05-23-2011 06:19 PM
Thanks for mentioning the lowercase DCS ID issue. I didnt realize that either.
In my case, an upper case DCSID didnt cause a config load error, but it did prevent any data from showing up in the webtrends console (as you might expect).
I think the documentation for LoadConfigFile is misleading. Here is what worked for me:
WebtrendsConfigurator.LoadConfigFile("com.blah.BlahApp", "analyticsConfig.xml");
WebtrendsDataCollector wt = WebtrendsDataCollector.getInstance();
wt.Initialize();
Note that the first param is the "full" class name of a class in the same package (folder) as the config file. The param name suggests the it should be a package name, which does not work, though the rest of the javadocs entry is right (saying it should be a class name).
Also, I found it frustrating that LoadConfigFile does not throw an exception or report the error in any way other than some sort of System.err.println call. That is very much not ok (are you listening WebTrends team?).
05-24-2011 04:18 AM
05-24-2011 06:56 PM
I have passed your comments on the documentation and lack of output on to the Webtrends team.
08-09-2011 08:50 AM
Let me just say one thing...
This is really pathetic as far as documentation for Webtrends is concerned!
The documentation states (http://docs.blackberry.com/en/developers/deliverab
|
wt_dc_dcsid |
Specifies the unique identifier for your data source that you receive when you sign up for the Analytics Service. The dcsid allows theAnalytics Service to separate your data from other data sent to the data collection server. This value is required and has no default. |
Only after extensive debugging and finding this thread was I able to get the stats to run... This is NOT the way to help anyone...