Issue with Java API

Questions about the WURFL Cloud service.
ebridge_digitalworks
Posts: 2
Joined: Wed Aug 22, 2012 3:08 pm

Issue with Java API

Postby ebridge_digitalworks » Wed Aug 22, 2012 3:34 pm

Hi,

I hope this is not a dumb question. I am a novice developer, having trouble understanding your documentation and getting this service to work.

Here is how I tried to implement your example.

In the servlet file add the following import statements:

import com.scientiamobile.wurflcloud.CloudClientLoader;
import com.scientiamobile.wurflcloud.CloudClientManager;
import com.scientiamobile.wurflcloud.device.AbstractDevice;

Now, add the following properties:

private static final String API_KEY = "xxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
private CloudClientManager cloudManager;

Replace xxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx with your API Key in the API_KEY property.
In the servlet init() method insert the following in the try block:

CloudClientLoader loader = new CloudClientLoader(API_KEY);
manager = loader.getClientManager();

...etc.

Even just the initialization with new CloudClientLoader causes my application to fail. I can't log a decent error either. No useful info is given. Is there known issues with the Java API? Can you provide some better examples so I can get started?

I am deploying the app in Jetty 6.1.x. I know the documentation states use of Tomcat, but I don't see how that would cause a problem.

Thank you,
Steve

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

Re: Issue with Java API

Postby sm_support2 » Wed Aug 22, 2012 6:32 pm

Steve, there must be some error logged someplace that can help us understand what it is you are doing wrong.

is your app loading the cloud client JARs?

Thanks

kamermans
Posts: 393
Joined: Mon Jun 06, 2011 9:50 am

Re: Issue with Java API

Postby kamermans » Wed Aug 22, 2012 7:13 pm

We have tested the WURFL Cloud Client in Jetty previously without issue, so that shouldn't cause problems. Are you able to get the example included in the ZIP file with the Cloud Client working?
Thanks,

Steve Kamerman
ScientiaMobile

Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!

ebridge_digitalworks
Posts: 2
Joined: Wed Aug 22, 2012 3:08 pm

Re: Issue with Java API

Postby ebridge_digitalworks » Tue Aug 28, 2012 2:31 pm

Hey Guys,

Thanks for your response. I did get it figured out. I was having issues getting the slf4j to integrate with log4j which. I should have started off a little simpler but I tried to just throw it into a framework that I use for Java projects.

The cloud seems to be working great, I like it.

Thanks,
Steve

kamermans
Posts: 393
Joined: Mon Jun 06, 2011 9:50 am

Re: Issue with Java API

Postby kamermans » Tue Aug 28, 2012 7:31 pm

I'm glad you got the issue resolved, enjoy!
Thanks,

Steve Kamerman
ScientiaMobile

Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!


Who is online

Users browsing this forum: No registered users and 53 guests