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
java api 1.5 exception
-
- Posts: 294
- Joined: Mon Jun 20, 2011 5:04 pm
Re: java api 1.5 exception
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
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
-
- Posts: 38
- Joined: Tue Jan 31, 2012 10:27 am
Re: java api 1.5 exception
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
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
-
- Posts: 13
- Joined: Thu Aug 29, 2013 6:29 am
Re: java api 1.5 exception
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
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
-
- Posts: 38
- Joined: Tue Jan 31, 2012 10:27 am
Re: java api 1.5 exception
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:
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
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("");
This way, engine initialization should run and terminate correctly right at the beginning.
Fulvio
-
- Posts: 13
- Joined: Thu Aug 29, 2013 6:29 am
Re: java api 1.5 exception
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
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
-
- Posts: 38
- Joined: Tue Jan 31, 2012 10:27 am
Re: java api 1.5 exception
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
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 5 guests