Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

BlackBerry Analytics Service

Reply
New Developer
joegeyijun
Posts: 27
Registered: 03-08-2009
Accepted Solution

Webtrends: 2011-05-17 18:24:32.437, exception=null, Error loading config file

[ Edited ]

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:smileytongue: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:smileytongue: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:smileytongue: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>
  
  <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_7G7J</string>
  <!-- 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</string>
  <!-- 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>

<?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_7G7J</string>
  <!-- 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</string>
  <!-- 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>

 

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 269
Registered: 07-15-2008
My Carrier: Bell

Re: Webtrends: 2011-05-17 18:24:32.437, exception=null, Error loading config file

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.

Tim Windsor
Application Development Consultant
Please use plain text.
Developer
morganbelford
Posts: 35
Registered: 12-12-2008

Re: Webtrends: 2011-05-17 18:24:32.437, exception=null, Error loading config file

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?).

 

Please use plain text.
New Developer
joegeyijun
Posts: 27
Registered: 03-08-2009

Re: Webtrends: 2011-05-17 18:24:32.437, exception=null, Error loading config file

thanks for your reminder. It works now with lower case DCS id.
Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 269
Registered: 07-15-2008
My Carrier: Bell

Re: Webtrends: 2011-05-17 18:24:32.437, exception=null, Error loading config file

I have passed your comments on the documentation and lack of output on to the Webtrends team.

Tim Windsor
Application Development Consultant
Please use plain text.
New Developer
adamwos
Posts: 3
Registered: 03-31-2009

Re: Webtrends: 2011-05-17 18:24:32.437, exception=null, Error loading config file

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/deliverables/25456/Configuration_settings_1443549_11.jsp):

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...

Please use plain text.