cannot initialize: IllegalArgumentException

rathm
Posts: 2
Joined: Tue Jun 14, 2016 10:10 am

cannot initialize: IllegalArgumentException

Postby rathm » Thu Jun 16, 2016 12:25 am

Hi,

We are using the Java API version 1.5.0.1
After updating to the wurfl.zip file from 2016-06-12
We started getting exception on the first call to GeneralWURFLEngine.getDeviceForRequest(...)

The userAgent in the call to GeneralWURFLEngine.getDeviceForRequest is:
BlackBerry8800/4.2.1 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/134
I tried different user agents, same error - on the first call to getDeviceForRequest

In order to raise log level I edited net.sourceforge.wurfl.core.WURFLConstants
set:

Code: Select all

static final boolean IS_DEBUG_ENABLED = true;
static final boolean IS_TRACE_ENABLED = true;
Then I built wurfl-1.5.0.1.jar using ant and ran again.

I was not able to attach the full log file, extracts:

Start of log:

Code: Select all

[DEBUG]; 2016.06.15; 14:19:18.713; [main]; (FileLoader); C:; Id:; Opened stream from URI: file:/emc/rathm/temp/VBV-11178/wurfl_2016_06_12.zip
[DEBUG]; 2016.06.15; 14:19:21.745; [main]; (XMLResource); C:; Id:; Readed data: net.sourceforge.wurfl.core.resource.ResourceData@812a5d[file:/emc/rathm/temp/VBV-11178/wurfl_2016_06_12.zip,data.scientiamobile.com - 2016-06-12 00:30:34]
[INFO]; 2016.06.15; 14:19:21.745; [main]; (FileLoader); C:; Id:; closing input stream: ZipInputStream
[DEBUG]; 2016.06.15; 14:19:21.818; [main]; (DefaultWURFLModel); C:; Id:; 47933 devices found in Root:file:/emc/rathm/temp/VBV-11178/wurfl_2016_06_12.zip:data.scientiamobile.com - 2016-06-12 00:30:34
[DEBUG]; 2016.06.15; 14:19:21.818; [main]; (DefaultWURFLModel); C:; Id:; Verifying root
[DEBUG]; 2016.06.15; 14:19:21.842; [main]; (WURFLConsistencyVerifier); C:; Id:; Verifing generic existence...
[DEBUG]; 2016.06.15; 14:19:23.637; [main]; (DefaultWURFLModel); C:; Id:; Verifing building devicesById
[DEBUG]; 2016.06.15; 14:19:23.637; [main]; (WURFLConsistencyVerifier); C:; Id:; Verifing generic existence...
[DEBUG]; 2016.06.15; 14:19:25.323; [main]; (DefaultWURFLModel); C:; Id:; htc_one_m8_wp_ver1 root not found in cache, searching in hierarchy
[DEBUG]; 2016.06.15; 14:19:25.326; [main]; (DefaultWURFLModel); C:; Id:; htc_one_m8_wp_ver1 root: htc_one_m8_wp_ver1
[DEBUG]; 2016.06.15; 14:19:25.326; [main]; (DefaultWURFLModel); C:; Id:; generic_ms_pocketpc2000 root not found in cache, searching in hierarchy
[DEBUG]; 2016.06.15; 14:19:25.327; [main]; (DefaultWURFLModel); C:; Id:; generic_ms_pocketpc2000 root: generic
[DEBUG]; 2016.06.15; 14:19:25.327; [main]; (DefaultWURFLModel); C:; Id:; nokia_lumia_635_ver1 root not found in cache, searching in hierarchy
[DEBUG]; 2016.06.15; 14:19:25.327; [main]; (DefaultWURFLModel); C:; Id:; nokia_lumia_635_ver1 root: nokia_lumia_635_ver1
End of log:

Code: Select all

[DEBUG]; 2016.06.15; 14:19:32.356; [main]; (MatcherChain); C:; Id:; filtering huawei_c8817l_ver1_subu3k9
[DEBUG]; 2016.06.15; 14:19:32.357; [main]; (MatcherChain); C:; Id:; filtering huawei_y336_ver1_subuag616l076u3k10
[DEBUG]; 2016.06.15; 14:19:32.357; [main]; (MatcherChain); C:; Id:; filtering lenovo_a355e_ver1_subu3k10
[DEBUG]; 2016.06.15; 14:19:32.357; [main]; (MatcherChain); C:; Id:; filtering lenovo_a788t_ver1_subu3k10
[DEBUG]; 2016.06.15; 14:19:32.357; [main]; (MatcherChain); C:; Id:; filtering lenovo_s810t_ver1_subu3k10
[ERROR]; 2016.06.15; 14:19:39.987; [main]; (GeneralWURFLEngine); C:; Id:; cannot initialize: java.lang.IllegalArgumentException: user-agent cannot be null
java.lang.IllegalArgumentException: user-agent cannot be null
        at org.apache.commons.lang.Validate.notNull(Validate.java:192)
        at net.sourceforge.wurfl.core.matchers.FilteredDevices.putDevice(FilteredDevices.java:100)
        at net.sourceforge.wurfl.core.matchers.DefaultFilter.filter(DefaultFilter.java:80)
        at net.sourceforge.wurfl.core.matchers.MatcherChain.filter(MatcherChain.java:160)
        at net.sourceforge.wurfl.core.matchers.MatcherManager.filterDevices(MatcherManager.java:451)
        at net.sourceforge.wurfl.core.matchers.MatcherManager.init(MatcherManager.java:405)
        at net.sourceforge.wurfl.core.matchers.MatcherManager.<init>(MatcherManager.java:77)
        at net.sourceforge.wurfl.core.GeneralWURFLEngine.init(GeneralWURFLEngine.java:253)
        at net.sourceforge.wurfl.core.GeneralWURFLEngine.initIfNeeded(GeneralWURFLEngine.java:224)
        at net.sourceforge.wurfl.core.GeneralWURFLEngine.getDeviceForRequest(GeneralWURFLEngine.java:352)
        at com.rsa.tdsecure.common.devicetype.detector.impl.wurfl.WurflDeviceInfoDetector.getWurflDevice(WurflDeviceInfoDetector.java:81)
        at rsa.produtils.wurfl.WurflHelper.testUAS(WurflHelper.java:92)
        at rsa.produtils.wurfl.WurflHelper.test(WurflHelper.java:82)
        at rsa.produtils.wurfl.WurflHelper.testUAS(WurflHelper.java:76)
        at rsa.produtils.wurfl.WurflXmlTester.run(WurflXmlTester.java:125)
        at rsa.produtils.wurfl.WurflXmlTester.run(WurflXmlTester.java:53)
        at rsa.produtils.wurfl.WurflXmlTester.main(WurflXmlTester.java:44)

aaronp
Posts: 242
Joined: Wed Dec 09, 2015 12:39 pm

Re: cannot initialize: IllegalArgumentException

Postby aaronp » Tue Jul 19, 2016 3:31 pm

Hi Rath,

Thank you for providing the information. I was able to replicate your error and conclude that because the 2016-06-12 `wurfl.xml` has some new devices added to it that are not handled properly in the version of the API that you are running (v1.5.0.1), you will need to update to our latest API (v1.7.0.1).

Unfortunately, API v1.5.0.1 reached End of Life a year ago; however we actively support our current API versions 1.7.0.0 and above.

Are you able to try updating your API to v1.7.0.1?

Thanks,

Aaron

rathm
Posts: 2
Joined: Tue Jun 14, 2016 10:10 am

Re: cannot initialize: IllegalArgumentException

Postby rathm » Tue Aug 02, 2016 3:12 pm

Hi Aaron,

Thanks for the information.

I upgraded to version 1.7.0.1 of the API and it solved the problem.

Regards,
Menachem


Who is online

Users browsing this forum: No registered users and 8 guests