RE: Carrot2 web application and the Bing API

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

RE: Carrot2 web application and the Bing API

jelday

Dear Dawid,

I had a search on the forums but have not easily found and answer to my questions - I apologise if this is a recurring question (I guess it may be but in different forms)!

 

Is it possible to embed my own Bing API key in the Carrot2 web application rather than using yours (to avoid hitting the shared 5000 search limit)?

                                    

I know that I am able to enter the key in the advanced options tab, but would like to avoid having to do this?

 

Your guidance would be welcome (for a relative Java newbie and eager Carrot2 user!)

 

With kind regards,

Jon

 

 

 

From: Dawid Weiss [via Carrot2 Users and Developers Forum] [mailto:ml-node+[hidden email]]
Sent: 08 June 2016 21:33
To: Jon Day <[hidden email]>
Subject: Re: Carrot2 web application

 

Java 1.7 is required to run Carrot2 (you probably have 1.6 on the server).

https://en.wikipedia.org/wiki/Java_class_file

Dawid

On Wed, Jun 8, 2016 at 7:57 PM, jelday <[hidden email]> wrote:


> Dear Forum,
> I am currently trying to get an instance of the Carrot2 web application
> running on a Tomcat server. Unfortunately, I have hit a snag.
>
> The log contains the following line. It has been suggested that this might
> result from a mismatch in the JDK used during the build and that running on
> the server (1.6, 1.7 or 1.8)?
>
> Caused by: java.lang.UnsupportedClassVersionError:
> org/carrot2/webapp/LogInitContextListener : Unsupported major.minor version
> 51.0 (unable to load class org.carrot2.webapp.LogInitContextListener)
>
> Does this sound plausible and, if so, could someone advise on the JDK used
> during the build so I can get this adjusted on my server?
>
> Many thanks in advamce,
> Jon.
>
>
>
>
>
> --
> View this message in context: http://carrot2-users-and-developers-forum.607571.n2.nabble.com/Carrot2-web-application-tp7578940.html
> Sent from the Carrot2 Users and Developers Forum mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> Carrot2-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/carrot2-developers


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers


If you reply to this email, your message will be added to the discussion below:

http://carrot2-users-and-developers-forum.607571.n2.nabble.com/Carrot2-web-application-tp7578940p7578941.html

To unsubscribe from Carrot2 web application, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Carrot2 web application and the Bing API

Dawid Weiss
Hi Jon,

Yes, you can (and in fact you're encouraged) to use your own key. We
even removed the public key from the code base -- how come you still
have it (are you using the latest version of C2?). :)

If you're using the webapp then all you should do is enter a Java
system property passing the value of the key. The property is named
"bing3.key", so if you have access to Tomcat's config then:

CATALINA_OPTS=-Dbing3.key=[foo]

should do the trick. Alternatively, you could also place it inside the
attributes file for the bing document source, but the above is perhaps
slightly easier.

Dawid

On Fri, Jun 10, 2016 at 9:09 AM, jelday <[hidden email]> wrote:

> Dear Dawid,
>
> I had a search on the forums but have not easily found and answer to my
> questions - I apologise if this is a recurring question (I guess it may be
> but in different forms)!
>
>
>
> Is it possible to embed my own Bing API key in the Carrot2 web application
> rather than using yours (to avoid hitting the shared 5000 search limit)?
>
>
>
> I know that I am able to enter the key in the advanced options tab, but
> would like to avoid having to do this?
>
>
>
> Your guidance would be welcome (for a relative Java newbie and eager Carrot2
> user!)
>
>
>
> With kind regards,
>
> Jon
>
>
>
>
>
>
>
> From: Dawid Weiss [via Carrot2 Users and Developers Forum]
> [mailto:ml-node+[hidden email]]
> Sent: 08 June 2016 21:33
> To: Jon Day <[hidden email]>
> Subject: Re: Carrot2 web application
>
>
>
> Java 1.7 is required to run Carrot2 (you probably have 1.6 on the server).
>
> https://en.wikipedia.org/wiki/Java_class_file
>
> Dawid
>
> On Wed, Jun 8, 2016 at 7:57 PM, jelday <[hidden email]> wrote:
>
>
>> Dear Forum,
>> I am currently trying to get an instance of the Carrot2 web application
>> running on a Tomcat server. Unfortunately, I have hit a snag.
>>
>> The log contains the following line. It has been suggested that this might
>> result from a mismatch in the JDK used during the build and that running
>> on
>> the server (1.6, 1.7 or 1.8)?
>>
>> Caused by: java.lang.UnsupportedClassVersionError:
>> org/carrot2/webapp/LogInitContextListener : Unsupported major.minor
>> version
>> 51.0 (unable to load class org.carrot2.webapp.LogInitContextListener)
>>
>> Does this sound plausible and, if so, could someone advise on the JDK used
>> during the build so I can get this adjusted on my server?
>>
>> Many thanks in advamce,
>> Jon.
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://carrot2-users-and-developers-forum.607571.n2.nabble.com/Carrot2-web-application-tp7578940.html
>> Sent from the Carrot2 Users and Developers Forum mailing list archive at
>> Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> What NetFlow Analyzer can do for you? Monitors network bandwidth and
>> traffic
>> patterns at an interface-level. Reveals which users, apps, and protocols
>> are
>> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
>> J-Flow, sFlow and other flows. Make informed decisions using capacity
>> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
>> _______________________________________________
>> Carrot2-developers mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/carrot2-developers
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> Carrot2-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/carrot2-developers
>
> ________________________________
>
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://carrot2-users-and-developers-forum.607571.n2.nabble.com/Carrot2-web-application-tp7578940p7578941.html
>
> To unsubscribe from Carrot2 web application, click here.
> NAML
>
>
> ________________________________
> View this message in context: RE: Carrot2 web application and the Bing API
> Sent from the Carrot2 Users and Developers Forum mailing list archive at
> Nabble.com.
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> Carrot2-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/carrot2-developers
>

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: Carrot2 web application and the Bing API

jelday
Dawid,
Many thanks for your quick reply. That is great news!

I am using version 3.12.0 downloaded through github. It is possible that I have not noticed the details of the error message and assumed it was the same Bing API limit message received on the live demo.

I'm getting...

"Attribute binding failed: No value for required attribute: Bing3DocumentSource.appid (org.carrot2.source.microsoft.Bing3D"
&
"Attribute binding failed: No value for required attribute: Bing3DocumentSource.appid (org.carrot2.source.microsoft.Bing3DocumentSource#appid)"


I will have a proper look later today and make the changes suggested.

With kind regards,
Jon.




-----Original Message-----
From: Dawid Weiss [mailto:[hidden email]]
Sent: 10 June 2016 08:18
To: Carrot2-developers <[hidden email]>
Subject: Re: [C2-devel] Carrot2 web application and the Bing API

Hi Jon,

Yes, you can (and in fact you're encouraged) to use your own key. We even removed the public key from the code base -- how come you still have it (are you using the latest version of C2?). :)

If you're using the webapp then all you should do is enter a Java system property passing the value of the key. The property is named "bing3.key", so if you have access to Tomcat's config then:

CATALINA_OPTS=-Dbing3.key=[foo]

should do the trick. Alternatively, you could also place it inside the attributes file for the bing document source, but the above is perhaps slightly easier.

Dawid

On Fri, Jun 10, 2016 at 9:09 AM, jelday <[hidden email]> wrote:

> Dear Dawid,
>
> I had a search on the forums but have not easily found and answer to
> my questions - I apologise if this is a recurring question (I guess it
> may be but in different forms)!
>
>
>
> Is it possible to embed my own Bing API key in the Carrot2 web
> application rather than using yours (to avoid hitting the shared 5000 search limit)?
>
>
>
> I know that I am able to enter the key in the advanced options tab,
> but would like to avoid having to do this?
>
>
>
> Your guidance would be welcome (for a relative Java newbie and eager
> Carrot2
> user!)
>
>
>
> With kind regards,
>
> Jon
>
>
>
>
>
>
>
> From: Dawid Weiss [via Carrot2 Users and Developers Forum]
> [mailto:ml-node+[hidden email]]
> Sent: 08 June 2016 21:33
> To: Jon Day <[hidden email]>
> Subject: Re: Carrot2 web application
>
>
>
> Java 1.7 is required to run Carrot2 (you probably have 1.6 on the server).
>
> https://en.wikipedia.org/wiki/Java_class_file
>
> Dawid
>
> On Wed, Jun 8, 2016 at 7:57 PM, jelday <[hidden email]> wrote:
>
>
>> Dear Forum,
>> I am currently trying to get an instance of the Carrot2 web
>> application running on a Tomcat server. Unfortunately, I have hit a snag.
>>
>> The log contains the following line. It has been suggested that this
>> might result from a mismatch in the JDK used during the build and
>> that running on the server (1.6, 1.7 or 1.8)?
>>
>> Caused by: java.lang.UnsupportedClassVersionError:
>> org/carrot2/webapp/LogInitContextListener : Unsupported major.minor
>> version
>> 51.0 (unable to load class org.carrot2.webapp.LogInitContextListener)
>>
>> Does this sound plausible and, if so, could someone advise on the JDK
>> used during the build so I can get this adjusted on my server?
>>
>> Many thanks in advamce,
>> Jon.
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://carrot2-users-and-developers-forum.607571.n2.nabble.com/Carrot
>> 2-web-application-tp7578940.html Sent from the Carrot2 Users and
>> Developers Forum mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> --------- What NetFlow Analyzer can do for you? Monitors network
>> bandwidth and traffic patterns at an interface-level. Reveals which
>> users, apps, and protocols are consuming the most bandwidth. Provides
>> multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make
>> informed decisions using capacity planning reports.
>> https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
>> _______________________________________________
>> Carrot2-developers mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/carrot2-developers
>
>
> ----------------------------------------------------------------------
> -------- What NetFlow Analyzer can do for you? Monitors network
> bandwidth and traffic patterns at an interface-level. Reveals which
> users, apps, and protocols are consuming the most bandwidth. Provides
> multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make
> informed decisions using capacity planning reports.
> https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> Carrot2-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/carrot2-developers
>
> ________________________________
>
> If you reply to this email, your message will be added to the
> discussion
> below:
>
> http://carrot2-users-and-developers-forum.607571.n2.nabble.com/Carrot2
> -web-application-tp7578940p7578941.html
>
> To unsubscribe from Carrot2 web application, click here.
> NAML
>
>
> ________________________________
> View this message in context: RE: Carrot2 web application and the Bing
> API Sent from the Carrot2 Users and Developers Forum mailing list
> archive at Nabble.com.
>
> ----------------------------------------------------------------------
> -------- What NetFlow Analyzer can do for you? Monitors network
> bandwidth and traffic patterns at an interface-level. Reveals which
> users, apps, and protocols are consuming the most bandwidth. Provides
> multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make
> informed decisions using capacity planning reports.
> https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> Carrot2-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/carrot2-developers
>

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: Carrot2 web application and the Bing API

Dawid Weiss
> "Attribute binding failed: No value for required attribute: Bing3DocumentSource.appid (org.carrot2.source.microsoft.Bing3DocumentSource#appid)"

Nope, this means the key is not bound (not available). You can also
modify the "source-bing-attributes.xml" file inside the webapp and
type your key in there, but like I said, it's probably more difficult
hassle than passing it via system property.

Dawid

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers