2 Replies Latest reply: Mar 15, 2012 9:31 AM by Paul Lawbaugh RSS

Webtrends for android not working

Newbie

Sorry guys this is probably not the right place but the webtrends forum doesnt work at the moment so maybe I could get some help here?

 

When debuging my app I get the following exceptions from logcat in eclipse:

 

03-15 10:16:26.150: E/Webtrends(1780): Exception occurred while inserting/updating state variable :lastEventTime

03-15 10:16:26.150: E/Webtrends(1780): java.lang.NullPointerException

03-15 10:16:26.150: E/Webtrends(1780):           at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:118)

03-15 10:16:26.150: E/Webtrends(1780):           at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:198)

03-15 10:16:26.150: E/Webtrends(1780):           at com.webtrends.mobile.analytics.android.WebtrendsAndroidDataStore.insertOrUpdateStateVariable(Unknown Source)

03-15 10:16:26.150: E/Webtrends(1780):           at com.webtrends.mobile.analytics.WebtrendsDataStore.insertStateVariable(Unknown Source)

03-15 10:16:26.150: E/Webtrends(1780):           at com.webtrends.mobile.analytics.WebtrendsDataCollector.saveEventTimeIfChanged(Unknown Source)

03-15 10:16:26.150: E/Webtrends(1780):           at com.webtrends.mobile.analytics.WebtrendsEventTask.run(Unknown Source)

03-15 10:16:26.150: E/Webtrends(1780):           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:444)

03-15 10:16:26.150: E/Webtrends(1780):           at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)

03-15 10:16:26.150: E/Webtrends(1780):           at java.util.concurrent.FutureTask.run(FutureTask.java:138)

03-15 10:16:26.150: E/Webtrends(1780):           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)

03-15 10:16:26.150: E/Webtrends(1780):           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)

03-15 10:16:26.150: E/Webtrends(1780):           at java.lang.Thread.run(Thread.java:1027)

03-15 10:16:26.220: E/Webtrends(1780): Exception occurred while inserting/updating state variable :currentSessionStartTime

03-15 10:16:26.220: E/Webtrends(1780): java.lang.NullPointerException

03-15 10:16:26.220: E/Webtrends(1780):           at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:118)

03-15 10:16:26.220: E/Webtrends(1780):           at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:198)

03-15 10:16:26.220: E/Webtrends(1780):           at com.webtrends.mobile.analytics.android.WebtrendsAndroidDataStore.insertOrUpdateStateVariable(Unknown Source)

03-15 10:16:26.220: E/Webtrends(1780):           at com.webtrends.mobile.analytics.WebtrendsDataStore.insertStateVariable(Unknown Source)

03-15 10:16:26.220: E/Webtrends(1780):           at com.webtrends.mobile.analytics.WebtrendsDataCollector.saveEventTimeIfChanged(Unknown Source)

03-15 10:16:26.220: E/Webtrends(1780):           at com.webtrends.mobile.analytics.WebtrendsEventTask.run(Unknown Source)

03-15 10:16:26.220: E/Webtrends(1780):           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:444)

03-15 10:16:26.220: E/Webtrends(1780):           at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)

03-15 10:16:26.220: E/Webtrends(1780):           at java.util.concurrent.FutureTask.run(FutureTask.java:138)

03-15 10:16:26.220: E/Webtrends(1780):           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)

03-15 10:16:26.220: E/Webtrends(1780):           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)

03-15 10:16:26.220: E/Webtrends(1780):           at java.lang.Thread.run(Thread.java:1027)

03-15 10:16:26.220: D/Webtrends(1780): Saving new sessionStartTime to disk.

03-15 10:16:26.230: D/ATRecorder(1780): com.htc.autotest.dlib.RecordEngine in loader dalvik.system.DexClassLoader@4054d310

03-15 10:16:26.270: E/Webtrends(1780): Exception thrown populating parameter values.

03-15 10:16:26.270: E/Webtrends(1780): java.lang.NullPointerException

03-15 10:16:26.270: E/Webtrends(1780):           at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:118)

03-15 10:16:26.270: E/Webtrends(1780):           at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:198)

03-15 10:16:26.270: E/Webtrends(1780):           at com.webtrends.mobile.analytics.android.WebtrendsAndroidDataStore.getStateVariableValue(Unknown Source)

03-15 10:16:26.270: E/Webtrends(1780):           at com.webtrends.mobile.analytics.WebtrendsDataStore.retrieveStateVariable(Unknown Source)

03-15 10:16:26.270: E/Webtrends(1780):           at com.webtrends.mobile.analytics.WebtrendsDataCollector.fetchVisitorId(Unknown Source)

03-15 10:16:26.270: E/Webtrends(1780):           at com.webtrends.mobile.analytics.WebtrendsDataCollector.getVisitorId(Unknown Source)

03-15 10:16:26.270: E/Webtrends(1780):           at com.webtrends.mobile.analytics.WebtrendsParameterFactory.getParameters(Unknown Source)

03-15 10:16:26.270: E/Webtrends(1780):           at com.webtrends.mobile.analytics.WebtrendsEventTask.run(Unknown Source)

03-15 10:16:26.270: E/Webtrends(1780):           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:444)

03-15 10:16:26.270: E/Webtrends(1780):           at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)

03-15 10:16:26.270: E/Webtrends(1780):           at java.util.concurrent.FutureTask.run(FutureTask.java:138)

03-15 10:16:26.270: E/Webtrends(1780):           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)

03-15 10:16:26.270: E/Webtrends(1780):           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)

03-15 10:16:26.270: E/Webtrends(1780):           at java.lang.Thread.run(Thread.java:1027)

03-15 10:16:26.300: D/Webtrends(1780): Exception thrown populating event's parameters.

03-15 10:16:26.300: D/Webtrends(1780): java.lang.NullPointerException

03-15 10:16:26.300: D/Webtrends(1780):           at com.webtrends.mobile.analytics.WebtrendsParameterFactory.hydrateValue(Unknown Source)

03-15 10:16:26.300: D/Webtrends(1780):           at com.webtrends.mobile.analytics.WebtrendsParameterFactory.populateCustomParameters(Unknown Source)

03-15 10:16:26.300: D/Webtrends(1780):           at com.webtrends.mobile.analytics.WebtrendsEventTask.run(Unknown Source)

 

 

Any ideas about what could cause this?

Cheers

  • Webtrends for android not working
    Wayne Denman Newbie

    Hello Tree:

     

    I see your post in the forum on this also. I am a Technical Support Manager for Webtrends and I also manage our Support Forum. In you post above you state that the forum was not working? Can you please email direct with any details you have around that to help in my investigation? If something is/was wrong we want to get it addressed as quickly as possible.

    tx

     

    wayne.denman@webtrends.com

     

    Wayne Denman

    Webtrends

    Technical Services Manager (EMEA)

  • Webtrends for android not working
    Paul Lawbaugh Novice

    Wayne is, of course, the best place to go for specific help but I'll throw in my 2 cents to see if I can help...

     

    It looks like the general default values are missing from that stack trace.

    Did you put in the initialization line of code into the first activity of your app?

     

     

    WebtrendsConfigurator.ConfigureDC(this);

     

     

    And just to avoid uncaught exceptions, here is what I use in my code:

            /**

             * Webtrends code

             */

                      if (!Constants.WEBTRENDS_DISABLED){

                          try {

                              WebtrendsConfigurator.ConfigureDC(this);

                         //if you aren't extending your activity, you can pass the events manually

                         //WebtrendsDataCollector.getInstance().onApplicationStart(Constants.APP_NAME, null);

                        //here is an example screen view 

                   WebtrendsDataCollector.getInstance().onScreenView("/DnDBuddy/CharacterList", "Character List View", "View", null, "Screens");

     

     

                        //this is for any custom extra values you might want to add

                              Map <String, String> customData = new HashMap<String, String>();

     

     

                              //this is an advanced feature and requires a receiver declaration in your manifest

                     //if you want to add "first referrer" reporting, I added first referrer in map

                             

                     customData.put("WT.fr", WebtrendsDataCollector.firstReferrer());

                              WebtrendsDataCollector.getInstance().onCustomEvent("/install/referrer", "InstallReferrer AppStart", customData);

     

     

                          } catch (IllegalWebtrendsParameterValueException e) {

                              WebtrendsDataCollector.getInstance().getLog().d(e.getMessage());

                          }        

                      }