java api 1.5 exception

it@amobee.com
Posts: 13
Joined: Thu Aug 29, 2013 6:29 am

java api 1.5 exception

Postby it@amobee.com » Thu Oct 17, 2013 3:52 am

Hi all,

I've tried to upgrade from 1.4.3 into 1.5 java api. I've encountered this exception:
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)
... 3 more

What can cause this exception?
If you need more information, please tell me.

thanks

sm_support2
Posts: 294
Joined: Mon Jun 20, 2011 5:04 pm

Re: java api 1.5 exception

Postby sm_support2 » Thu Oct 17, 2013 7:47 am

Hi Bill, we will assign an engineer to look at your problem, but yes, defiitely, can you provide more info so that we can reproduce the problem.

Any idea about which UA string is causing the problem? which wurfl.xml version are you sing? do you have own custom patch files?

thank you

fulvio.crivellaro
Posts: 38
Joined: Tue Jan 31, 2012 10:27 am

Re: java api 1.5 exception

Postby fulvio.crivellaro » Thu Oct 17, 2013 8:15 am

Hello.

I analyzed the stack trace you posted, but I need some more information to try to reproduce the issue.

Can you please tell us what kind of wurfl file are you using (.zip or pure .xml), and whether you are using any patch file?
Moreover, when does the exception happen? Are you explicitly calling some initialization method, or does it happen at the first WURFLEngine:getDeviceForRequest method call?

If you are using patch files, please send them to me, so that I can run specific tests on them.
My private address is: fulvio *DOT crivellaro *AT scientiamobile *DOT com

Thanks,
Fulvio

it@amobee.com
Posts: 13
Joined: Thu Aug 29, 2013 6:29 am

Re: java api 1.5 exception

Postby it@amobee.com » Sun Oct 20, 2013 12:50 am

Hi all,

The offending ua is
Mozilla/5.0 (Java; U; xx-xx; samsung-gt-s8530) UCBrowser8.3.0.154/70/352/UCWEB Mobile

I'm using the wurfl xml from 22/09/13, to which I've added the above device.

The exception is thrown when I invoke GeneralWURFLEngine.getWURFLUtils() on a newly created GeneralWURFLEngine.

Hope this helps,
Amit

fulvio.crivellaro
Posts: 38
Joined: Tue Jan 31, 2012 10:27 am

Re: java api 1.5 exception

Postby fulvio.crivellaro » Mon Oct 21, 2013 2:39 am

Hi.

I still can't reproduce the issue.
Which method(s) are you invoking upon WURFLUtils?

And are you doing it before running any match?
If so, please try to place:

Code: Select all

engine.getDeviceFromRequest("");
right after the new GeneralWURFLEngine(...) creation, before any other engine call, and let us know if the exception still throws.
This way, engine initialization should run and terminate correctly right at the beginning.

Fulvio

it@amobee.com
Posts: 13
Joined: Thu Aug 29, 2013 6:29 am

Re: java api 1.5 exception

Postby it@amobee.com » Wed Oct 23, 2013 8:37 am

I've tried calling getDeviceForRequest("") after I create the engine object, but I still get the same exception, this time from the getDeviceForRequest method.

I've managed to get this information from the stack trace when the exception is thrown:
The FilteredDevices instance toString() is
UcwebU3Matcher[27779, apple_ipad_ver1_sub51_subuc3k2ipad21, 27627]
it's "data" member toString() is
{2_3 U3Android 8 GT-I8530---Mozilla/5.0 (Linux; U; Android 2.3; xx-xx ; GT-I8530 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1/UCBrowser/8.6.1.262/145/405=27779, 5.1 U3iPad 2 2,1---Mozilla/5.0(iPad; U;CPU OS 5_1 like Mac OS X; xx-xx; iPad2,1) AppleWebKit/534.46 (KHTML, like Gecko) UCBrowser/2.0.2.283 U3/0.8.0 Safari/7543.48.3=apple_ipad_ver1_sub51_subuc3k2ipad21, Mozilla/5.0 (Java; U; xx-xx; samsung-gt-s5253) AppleWebKit/530.13 (KHTML, like Gecko) UCBrowser/8.5.0.185/82/352/UCWEB Mobile UNTRUSTED/1.0=27627}

27627 is the wurfl id of the manually-added device with ua=Mozilla/5.0 (Java; U; xx-xx; samsung-gt-s8530) UCBrowser8.3.0.154/70/352/UCWEB Mobile

Hope this information helps,
Amit

fulvio.crivellaro
Posts: 38
Joined: Tue Jan 31, 2012 10:27 am

Re: java api 1.5 exception

Postby fulvio.crivellaro » Wed Oct 23, 2013 8:51 am

I have just noticed that you wrote you are manually adding a user agent to the wurfl.xml.
What do you mean adding more precisely?
Are you using a patch, or are you editing the wurfl.xml file directly? Or again, are you doing it programmatically?
Please, provide me more information, and the resources needed to replicate your situation: a wurfl.xml file, a patch file, a code snippet, or whatever you think is significant for the purpose.

I write my ScientiaMobile private email address again: fulvio *DOT crivellaro *AT scientiamobile *DOT com

Regards,
Fulvio


Who is online

Users browsing this forum: No registered users and 9 guests