Google feed server installation

151 views
Skip to first unread message

Rohan

unread,
Nov 7, 2010, 4:32:54 PM11/7/10
to Google FeedServer
Hi,
My name is Rohan and I have primarily been an .Net web developer. So
forgive me if my questions seem noob-ish...

Is there a good walk through or tutorial explaining installation of
google feed server?. IT just enabled the use of secure data connector
and I am looking to set up server which can access local relational
DBs to feed data to the gadgets outside of firewall. As I understand
so far I need an ApacheAbdera framework on which google feed server
needs to be installed which then can talk to the gadgets I can provide
outside the firewall. But where is the download for the server
component? I just see the download for the client tool also where can
I download the Apache Abdera framework from?. I see so many examples
for writing and configuring DB queries and connection but no examples
explaining how to setup the actual server. There are so many
references to 'conf/feedserver' path but I still dont know where an
how the path comes into existence. I can guess that conf/ is probably
the Apache Abdera server config area but from where does the
'feedserver' path come from.?

Please help...

Jun Yang

unread,
Nov 7, 2010, 10:22:01 PM11/7/10
to google-f...@googlegroups.com
Hi Rohan,

This document should get you started with running Google FeedServer:


Jun


--
You received this message because you are subscribed to the Google Groups "Google FeedServer" group.
To post to this group, send email to google-f...@googlegroups.com.
To unsubscribe from this group, send email to google-feedser...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-feedserver?hl=en.


Rohan

unread,
Nov 9, 2010, 2:49:20 PM11/9/10
to Google FeedServer
Ok. I figured out how to checkout the project -build it with Apache
tomcat. Now I get following exception and error when I try to go to
http://127.0.0.1:8080/feedserver/example.com/contact

Here are my database.properties settings

## Global connection settings
Pool.MaximumActiveConnections=10
Pool.MaximumIdleConnections=5
Pool.MaximumCheckoutTime=120000
Pool.TimeToWait=3000

## Oracle database settings
JDBC.Driver=oracle.jdbc.driver.OracleDriver
JDBC.ConnectionURL=jdbc:oracle:thin:@servername:port:sid
JDBC.Username=uname
JDBC.Password=pwd
JDBC.Jar=ojdbc14.jar





Tomcat console:
log4j:WARN No appenders could be found for logger
(org.apache.abdera.protocol.se
rver.servlet.AbderaServlet).


Page error
type Exception report

message

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet Abdera
threw exception

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
102)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
298)

org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:
861)
org.apache.coyote.http11.Http11AprProtocol
$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:
1584)
java.lang.Thread.run(Thread.java:662)
root cause


java.lang.ClassCastException: org.apache.abdera.ext.json.JSONWriter
cannot be cast to org.apache.abdera.writer.NamedWriter

org.apache.abdera.util.AbderaConfiguration.initNamedWriters(AbderaConfiguration.java:
179)

org.apache.abdera.util.AbderaConfiguration.<init>(AbderaConfiguration.java:
100)

org.apache.abdera.util.AbderaConfiguration.<init>(AbderaConfiguration.java:
92)

org.apache.abdera.util.AbderaConfiguration.getDefault(AbderaConfiguration.java:
65)
org.apache.abdera.Abdera.<init>(Abdera.java:81)

org.apache.abdera.protocol.server.ServiceManager.getAbdera(ServiceManager.java:
57)

org.apache.abdera.protocol.server.ServiceManager.newProvider(ServiceManager.java:
64)

org.apache.abdera.protocol.server.servlet.AbderaServlet.createProvider(AbderaServlet.java:
78)

org.apache.abdera.protocol.server.servlet.AbderaServlet.init(AbderaServlet.java:
61)
javax.servlet.GenericServlet.init(GenericServlet.java:212)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
102)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
298)

org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:
861)
org.apache.coyote.http11.Http11AprProtocol
$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:
1584)
java.lang.Thread.run(Thread.java:662)


Please help.....


On Nov 7, 9:22 pm, Jun Yang <jyang...@gmail.com> wrote:
> Hi Rohan,
>
> This document should get you started with running Google FeedServer:
>
> http://code.google.com/p/google-feedserver/wiki/SettingUpADevelopment...
>
> <http://code.google.com/p/google-feedserver/wiki/SettingUpADevelopment...>
> > google-feedser...@googlegroups.com<google-feedserver%2Bunsubscr i...@googlegroups.com>
> > .

Jun Yang

unread,
Nov 9, 2010, 4:47:32 PM11/9/10
to google-f...@googlegroups.com
Hi Rohan,

It's not obvious what's wrong here.  I've never seen this before.  I have been using it with PostgreSQL for a long time.  You probably want to start the debugger to see what Abdera is trying to initialize.

Jun

To unsubscribe from this group, send email to google-feedser...@googlegroups.com.

Rohan Ghatpande

unread,
Nov 9, 2010, 5:09:26 PM11/9/10
to google-f...@googlegroups.com
Jun,

My further investigation pointed me to the fact that I am probably not satisfying the requirement "Abdera is included as a library" as mentioned in the documentation. does this mean that I need to include abdera jar file in the lib directory of Apache install?.

I have a feeling I have tomcat installed correctly but abdera piece is missing. Do i simply download the file posted at http://abdera.apache.org/#abdera.1.0 extract it locally and place the abdera-1.0.jar in the lib directory of tomcat installation.?

Thanks for the help so far.

Regards,
Rohan

Jun Yang

unread,
Nov 10, 2010, 2:17:36 AM11/10/10
to google-f...@googlegroups.com
Missing Abdera would definitely be a problem :).  Make sure you put all libraries in your webapp's lib directory:


Jun

Rohan

unread,
Nov 10, 2010, 6:40:15 PM11/10/10
to Google FeedServer
Ok. Got the feed server going :). I can now generate XML output from
the feed server which is connected to my intranet Oracle DB using SQL
select command. Is there a way to execute stored procedures ?

On Nov 10, 1:17 am, Jun Yang <jyang...@gmail.com> wrote:
> Missing Abdera would definitely be a problem :).  Make sure you put all
> libraries in your webapp's lib directory:
>
> http://code.google.com/p/google-feedserver/source/browse/#svn/trunk/lib
>
> <http://code.google.com/p/google-feedserver/source/browse/#svn/trunk/lib>Jun
>
> On Tue, Nov 9, 2010 at 2:09 PM, Rohan Ghatpande <rohanghatpa...@gmail.com>wrote:
>
>
>
>
>
>
>
> > Jun,
>
> > My further investigation pointed me to the fact that I am probably not
> > satisfying the requirement "Abdera is included as a library" as mentioned in
> > the documentation. does this mean that I need to include abdera jar file in
> > the lib directory of Apache install?.
>
> > I have a feeling I have tomcat installed correctly but abdera piece is
> > missing. Do i simply download the file posted at
> >http://abdera.apache.org/#abdera.1.0extract it locally and place the
> > abdera-1.0.jar in the lib directory of tomcat installation.?
>
> > Thanks for the help so far.
>
> > Regards,
> > Rohan
>
> > On Tue, Nov 9, 2010 at 3:47 PM, Jun Yang <jyang...@gmail.com> wrote:
>
> >> Hi Rohan,
>
> >> It's not obvious what's wrong here.  I've never seen this before.  I have
> >> been using it with PostgreSQL for a long time.  You probably want to start
> >> the debugger to see what Abdera is trying to initialize.
>
> >> Jun
>
> >>> > > google-feedser...@googlegroups.com<google-feedserver%2Bunsubscr i...@googlegroups.com><google-feedserver%2Bunsubscr

Jun Yang

unread,
Nov 10, 2010, 9:10:56 PM11/10/10
to google-f...@googlegroups.com
On Wed, Nov 10, 2010 at 3:40 PM, Rohan <rohangh...@gmail.com> wrote:
Ok. Got the feed server going :). I can now generate XML output from
the feed server which is connected to my intranet Oracle DB using SQL
select command. Is there a way to execute stored procedures ?

Never tried it.  But you should be able to see every action in the debugger if it doesn't work.  Refer to iBATIS 2.x documentation on how to configure OR mapping.

Jun
 
To unsubscribe from this group, send email to google-feedser...@googlegroups.com.

Rohan Ghatpande

unread,
Nov 12, 2010, 8:53:48 AM11/12/10
to google-f...@googlegroups.com
Ok. Looks like stored procedures work with SQL server. Not with oracle. I think the issue is with the way parameters (parameter map) are handled in the SQLMap file since even SQL server with parameterized queries doesn't seem to work.. I will do some more research and post some code later.

Rohan

unread,
Nov 13, 2010, 1:54:55 PM11/13/10
to Google FeedServer

Jun,

SQL server stored procedures work fine but oracle always fail saying
'500:Protocol violation'

here is the SQLMap


<resultMap id="result-map" class="java.util.HashMap">
<result property="ID" column="ID"/>
<result property="PROJECT_ID" column="PROJECT_ID"/>
<result property="Project_Name" column="Project_Name"/>
<result property="Dark_Project" column="Dark_Project"/>
<result property="Project_Key" column="Project_Key"/>
<result property="fkprojectlead_id" column="fkprojectlead_id"/>
</resultMap>
<parameterMap id="jiraProjects" class="Map" >
<parameter property="resultCursor" jdbcType="ORACLECURSOR"
javaType="java.sql.ResultSet" mode="OUT" resultMap="result-map" />
</parameterMap>

<procedure id="contact-get-feed" parameterMap="jiraProjects" >
{call PORTAL.getProjects(?)}
</procedure>

Here are the oracle connection settings in the dbConfig.Properties

## Global connection settings
Pool.MaximumActiveConnections=10
Pool.MaximumIdleConnections=5
Pool.MaximumCheckoutTime=120000
Pool.TimeToWait=3000

## Oracle database settings
JDBC.Driver=oracle.jdbc.driver.OracleDriver
JDBC.ConnectionURL=jdbc:oracle:thin:@host:port:schema
JDBC.Username=uname
JDBC.Password=pwd
JDBC.Jar=ojdbc6.jar

I tried ojdbc14.jar as well but got the same result.

Same settings work fine if I do a direct Select * FROM Projects but
when i try stored procedure it does not work.Same SQL map with SQL
server seems to work fine. I googled for solutions and all seem to
suggest upgrade of JDBC driver which does not seem correct since I can
connect fine. Is this something to do with the fact that Oracle stored
procedure needs a ref cursor parameter to passed in as OUT parameter
which is not set when the feed gets called?

Using stored procedures seem an obvious choice for what we are trying
to accomplish and this would be a significant limitation if feed
server cant support it with oracle.

Regards,
Rohan
On Nov 12, 7:53 am, Rohan Ghatpande <rohanghatpa...@gmail.com> wrote:
> Ok. Looks like stored procedures work with SQL server. Not with oracle. I
> think the issue is with the way parameters (parameter map) are handled in
> the SQLMap file since even SQL server with parameterized
> queries doesn't seem to work.. I will do some more research and post some
> code later.
>
>
>
>
>
>
>
> On Wed, Nov 10, 2010 at 8:10 PM, Jun Yang <jyang...@gmail.com> wrote:
> >> > >http://abdera.apache.org/#abdera.1.0extractit locally and place the
> ...
>
> read more »

Rohan Ghatpande

unread,
Nov 12, 2010, 7:12:33 PM11/12/10
to google-f...@googlegroups.com
Jun,

SQL server stored procedures work fine but oracle always fail saying '500:Protocol violation'

here is the SQLMap


<resultMap id="result-map" class="java.util.HashMap">
<result property="ID" column="ID"/>
<result property="PROJECT_ID" column="PROJECT_ID"/>
<result property="Project_Name" column="Project_Name"/>
<result property="Dark_Project" column="Dark_Project"/>
<result property="Project_Key" column="Project_Key"/>
<result property="fkprojectlead_id" column="fkprojectlead_id"/>
</resultMap>
<parameterMap id="jiraProjects" class="Map" >
<parameter property="resultCursor" jdbcType="ORACLECURSOR" javaType="java.sql.ResultSet" mode="OUT" resultMap="result-map" />
</parameterMap>

<procedure id="contact-get-feed"  parameterMap="jiraProjects"  >
{call PORTAL.getProjects(?)}
</procedure>

Here are the oracle connection settings in the dbConfig.Properties

## Global connection settings
Pool.MaximumActiveConnections=10
Pool.MaximumIdleConnections=5
Pool.MaximumCheckoutTime=120000
Pool.TimeToWait=3000

## Oracle database settings
JDBC.Driver=oracle.jdbc.driver.OracleDriver
JDBC.ConnectionURL=jdbc:oracle:thin:@host:port:schema
JDBC.Username=uname
JDBC.Password=pwd
JDBC.Jar=ojdbc6.jar

I tried ojdbc14.jar as well but got the same result. 

Same settings work fine if I do a direct Select * FROM Projects  but when i try stored procedure it does not work.Same SQL map with SQL server seems to work fine. I googled for solutions and all seem to suggest upgrade of JDBC driver which does not seem correct since I can connect fine. Is this something to do with the fact that Oracle stored procedure  needs a ref cursor parameter to passed in as OUT parameter which is not set when the feed gets called?

Using stored procedures seem an obvious choice for what we are trying to accomplish and this would be a significant limitation if feed server cant support it with oracle.

Regards,
Rohan


Jun Yang

unread,
Nov 14, 2010, 1:36:20 AM11/14/10
to google-f...@googlegroups.com
Unfortunately, I am not familiar with Oracle to give you any suggestion here.

Using stored procedures seem an obvious choice for what we are trying to accomplish and this would be a significant limitation if feed server cant support it with oracle.

This is really not a FeedServer issue but how to use iBATIS 2.x to call an Oracle store procedure.  If you can do it successfully with plain iBATIS 2.x and then we can look into how to make it work too in FeedServer.
 
Regards,
Rohan

Jun

Rohan Ghatpande

unread,
Nov 14, 2010, 2:40:25 AM11/14/10
to google-f...@googlegroups.com

Ok. Let me investigate further.


>>>>> i...@googlegroups.com><google-feedserver%2Bunsubscr
>>>>> > >>> i...@googlegroups.com>
>>>>> > >>> > > .
>>>>> > >>> > > For more options, visit this group at
>>>>> > >>> > >http://groups.google.com/group/google-feedserver?hl=en.
>>>>> >
>>>>> > >>> --
>>>>> > >>> You received this message because you are subscribed to the Google
>>>>> Groups
>>>>> > >>> "Google FeedServer" group.
>>>>> > >>> To post to this group, send email to
>>>>> google-f...@googlegroups.com.
>>>>> > >>> To unsubscribe from this group, send email to

>>>>> i...@googlegroups.com>
>>>>> > >>> .
>>>>> > >>> For more options, visit this group at
>>>>> > >>>http://groups.google.com/group/google-feedserver?hl=en.
>>>>> >
>>>>> > >> --
>>>>> > >> You received this message because you are subscribed to the Google
>>>>> Groups
>>>>> > >> "Google FeedServer" group.
>>>>> > >> To post to this group, send email to
>>>>> google-f...@googlegroups.com.
>>>>> > >> To unsubscribe from this group, send email to

>>>>> i...@googlegroups.com>
>>>>> > >> .
>>>>> > >> For more options, visit this group at
>>>>> > >>http://groups.google.com/group/google-feedserver?hl=en.
>>>>> >
>>>>> > > --
>>>>> > > You received this message because you are subscribed to the Google
>>>>> Groups
>>>>> > > "Google FeedServer" group.
>>>>> > > To post to this group, send email to
>>>>> google-f...@googlegroups.com.
>>>>> > > To unsubscribe from this group, send email to

>>>>> i...@googlegroups.com>
>>>>> > > .
>>>>> > > For more options, visit this group at
>>>>> > >http://groups.google.com/group/google-feedserver?hl=en.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Google FeedServer" group.
>>>>> To post to this group, send email to google-f...@googlegroups.com
>>>>> .
>>>>> To unsubscribe from this group, send email to

>>>>> .
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/google-feedserver?hl=en.
>>>>>
>>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups
>>>> "Google FeedServer" group.
>>>> To post to this group, send email to google-f...@googlegroups.com.
>>>> To unsubscribe from this group, send email to

>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/google-feedserver?hl=en.
>>>>
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google FeedServer" group.
>> To post to this group, send email to google-f...@googlegroups.com.
>> To unsubscribe from this group, send email to

Rohan

unread,
Nov 21, 2010, 3:20:50 AM11/21/10
to Google FeedServer
Jun,

Looks like I was able to successfully implement the feedserver . I now
have a server in the intranet severing gdata feed for any SQL I write
against my database. Now I am looking for some examples where Google
Charts or vizualization api is initiated using this feed to draw
charts. All the articles I came across seem to be using JSON. Is the
gdata feed supported by vizualization api? It sounds like I am missing
some basic knowledge here (forgive me I am new to this technology) If
so can you please point me to a useful article to accomplish this?
Thanks for all the help so far!

Regards,
Rohan

On Nov 14, 1:40 am, Rohan Ghatpande <rohanghatpa...@gmail.com> wrote:
> Ok. Let me investigate further.
> On Nov 14, 2010 12:36 AM, "Jun Yang" <jyang...@gmail.com> wrote:
>
>
>
>
>
>
>
> > On Fri, Nov 12, 2010 at 4:12 PM, Rohan Ghatpande
> > <rohanghatpa...@gmail.com>wrote:
> rohanghatpa...@gmail.com
>
>
>
>
>
>
>
> >> > wrote:
>
> >>> Ok. Looks like stored procedures work with SQL server. Not with oracle.
> I
> >>> think the issue is with the way parameters (parameter map) are handled
> in
> >>> the SQLMap file since even SQL server with parameterized
> >>> queries doesn't seem to work.. I will do some more research and post
> some
> >>> code later.
>
> >>> On Wed, Nov 10, 2010 at 8:10 PM, Jun Yang <jyang...@gmail.com> wrote:
>
> >>>> On Wed, Nov 10, 2010 at 3:40 PM, Rohan <rohanghatpa...@gmail.com>
> >>>>> > >http://abdera.apache.org/#abdera.1.0extractit locally and place
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages