Page 1 of 1

Not able to get device information from WURFLManager

Posted: Tue Jul 02, 2013 8:19 am
by Shailendra
We are using java 1.7 and jboss-eap.6.0 web application server. we have integrated wrufl1.4 jar with the web application. We are not getting device information from wruflManager. Any clue what is the reason?

Re: Not able to get device information from WURFLManager

Posted: Tue Jul 02, 2013 8:28 am
by sm_support2
is there any error message, log or stack trace you can post?

thanks

Re: Not able to get device information from WURFLManager

Posted: Wed Jul 03, 2013 1:02 am
by Shailendra
WURFLHolder wurfl = (WURFLHolder) getServletContext().getAttribute(WURFLHolder.class.getName()); //line 1

WURFLManager manager = wurfl.getWURFLManager();//line 2

Device device = manager.getDeviceForRequest(request);//line 3

we are calling above code but on line 2 server does not give any response. I have put listener entry in web.xml correctly.
web xml entry as below.
<context-param>
<param-name>wurfl</param-name>
<param-value>classpath:/wurfl.zip</param-value>
</context-param>


<listener>
<listener-class>
net.sourceforge.wurfl.core.web.WURFLServletContextListener
</listener-class>
</listener>

Re: Not able to get device information from WURFLManager

Posted: Wed Jul 03, 2013 8:03 am
by fulvio.crivellaro
Can you tell us where exactly is the wurfl.zip file placed?
Moreover, could you try to upgrade to the latest Java API version (1.4.4.3)?
There should be no difference in terms of initialization, while on the other hand wurfl.zip file retrieval should be more consistent.
Fulvio

Re: Not able to get device information from WURFLManager

Posted: Thu Jul 04, 2013 2:14 am
by Shailendra
After doing suggested changes,still getting the same problem.Please sugget.

Re: Not able to get device information from WURFLManager

Posted: Thu Jul 04, 2013 4:32 am
by Shailendra
I have tried with upgraded version of wurfl i.e. wurfl1.4.4.3 and my wurfl.zip is placed in WEB-INF/classes.
But still facing the same problem.Please help

Re: Not able to get device information from WURFLManager

Posted: Thu Jul 04, 2013 6:28 am
by fulvio.crivellaro
I guess I have the solution, then.

Try to replicate the 1.4.4.3 helloworld configuration: place the wurfl.zip file in the WEB-INF folder, at the same level of the classes folder, instead of inside it
Then copy this in the web.xml file:

Code: Select all

<context-param>
	<param-name>wurfl</param-name>
	<param-value>WEB-INF/wurfl.zip</param-value>
</context-param>
As I wrote in my previous post, 1.4.4.3 should have enhanced wurfl.zip file loading, letting you avoid the classpath:/ constraint.
Let me know if this fix solves your problem.

Fulvio

Re: Not able to get device information from WURFLManager

Posted: Fri Jul 05, 2013 2:06 am
by Shailendra
We have done that also but problem is same.

Re: Not able to get device information from WURFLManager

Posted: Thu Jul 11, 2013 1:16 am
by Shailendra
There was some jar conflict issue in our project. We have rectified these conflicts. Now Project is working fine.

Re: Not able to get device information from WURFLManager

Posted: Thu Jul 11, 2013 3:16 am
by fulvio.crivellaro
Problem fixed. It was actually a server configuration issue, causing JBoss not to recognize wurfl.zip path.
As usual, as in any Java projects, make sure that you don't have JAR files of older versions of the libraries in forgotten places where the CLASSPATH can still see them.
What we noticed is that sometimes JBoss fails to recognize paths like WEB-INF/<path_to_wurfl.zip>.
Nevertheless, paths like classpath:/<path_to_wurfl.zip>, or absolute paths like file:///<path_to_wurfl.zip> seem to always work.

Re: Not able to get device information from WURFLManager

Posted: Mon May 11, 2020 1:34 am
by KeerthikaS
HI..

Good day to you. I need to get the client device details. I have checked with online and found you.Can I possible to get the device details if I am unlincensed user by using your wurfl. If possible means, let me know instructions or doumentation for getting device details in servlet project. Thanks for advance.

Regards,
Keerthika S.