Re: [Resin-interest] Hybernate Resin 3.1.8

2009-01-16 Thread Todd Sowers
Thanks - This worked perfect.

The issue we now encounter is the Google Contact API is not returning  
any data.  We believe this is because the Google Contacts API needs  
javax.xml.parsers.SAXParserFactory and we have defaulted the parser  
(to fix the previous Hibernate issue) to  
com.caucho.xml.parsers.XmlSAXParserFactory

Any suggestions?

Todd


--
Todd Sowers
DList.com
phone: 646-827-6766
t...@dlist.com
www.dlist.com



On Jan 15, 2009, at 7:40 PM, Rob Lockstone wrote:


 On Jan 15, 2009, at 16:12, Scott Ferguson wrote:


 On Jan 15, 2009, at 3:59 PM, Todd Sowers wrote:

 Hello -

 We are in the process of upgrading from Resin 3.0.22 to Resin 3.1.8.
 In our 3.0.22 environment Hibernate is working without issue.  With
 the upgrade to 3.1.8 we are experiencing the following issue that we
 know of.

 The mapping files are throwing error.  For example, in a one-to-one
 element, with in the mapping file, we have specified not- 
 null=true.
 In 3.0.22 this works fine, in 3.1.8 this throws an error.

 You may need to double check the XML, because the default XML parser
 changed from 3.0 to 3.1.  Resin 3.0 defaulted XML to its own XML
 parser.  Resin 3.1 uses the JDK's parser.

 I'm not familiar with the Hibernate syntax, but it's possible that
 Resin's XML parser was either allowing some syntax or was providing
 defaults that the standard JDK parser isn't providing.

 When it comes to XML, I've come to the conclusion that it's best to
 always explicitly define the XML library/parser that you're going to
 use to avoid problems just like this. Luckily, Resin makes this easy
 in the resin.conf file:

 server
   ...
   !-- Requires Apache's xerces.jar and xml-apis.jar libraries. --
   system-property
 javax
 .xml
 .parsers
 .DocumentBuilderFactory
 =org.apache.xerces.jaxp.DocumentBuilderFactoryImpl/
   system-property
 javax
 .xml
 .parsers
 .SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl/

   !-- Requires Apache's xalan.jar library. --
   system-property
 javax
 .xml
 .transform
 .TransformerFactory
 =org.apache.xalan.processor.TransformerFactoryImpl/
   ...
 /server

 The above is from our Resin 3.0.x resin.conf file. I assume the same
 will work for Resin 3.1.x?

 Rob



 -- Scott



 Here is the error as displayed in the Resin console.

 [2009-01-13 16:35:14,146] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(14) Attribute not-null must be declared for element
 type
 one-to-one.
 [2009-01-13 16:35:14,149] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(15) Attribute lazy with value true must have a value
 from the list false proxy no-proxy .
 [2009-01-13 16:35:14,158] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(28) Attribute not-null must be declared for element
 type
 one-to-one.

 Any help would be greatly appreciated.  Specificly if you have any
 documentation on how to integrate Hibernate with 3.1.8 or what the
 mapping files should be written.

 Thanks

 Todd Sowers


 --
 Todd Sowers
 DList.com
 phone: 646-827-6766
 t...@dlist.com
 www.dlist.com



 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest





___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Hybernate Resin 3.1.8

2009-01-16 Thread Rob Lockstone
Have you tried using the Apache Xerces parser? There are definitely  
differences and assumptions that people make, often unknowingly, when  
crafting XML that result in the XML only being parseable by the  
parser they themselves are using.

Anyway, that's what I would try.

If that doesn't work, can you post the error you're getting?  
Preferably with the XML data that Google is sending you. I generally  
do this by issuing the request from within a browser that properly  
displays raw XML, such as Firefox (or IE on Windows or Camino on OS  
X, notably Safari does not), then you might be able to find out what  
the offending part of the XML is and go from there.

Rob

On Jan 16, 2009, at 8:50 AM, Todd Sowers wrote:

 Thanks - This worked perfect.

 The issue we now encounter is the Google Contact API is not returning
 any data.  We believe this is because the Google Contacts API needs
 javax.xml.parsers.SAXParserFactory and we have defaulted the parser
 (to fix the previous Hibernate issue) to
 com.caucho.xml.parsers.XmlSAXParserFactory

 Any suggestions?

 Todd


 --
 Todd Sowers
 DList.com
 phone: 646-827-6766
 t...@dlist.com
 www.dlist.com



 On Jan 15, 2009, at 7:40 PM, Rob Lockstone wrote:


 On Jan 15, 2009, at 16:12, Scott Ferguson wrote:


 On Jan 15, 2009, at 3:59 PM, Todd Sowers wrote:

 Hello -

 We are in the process of upgrading from Resin 3.0.22 to Resin  
 3.1.8.
 In our 3.0.22 environment Hibernate is working without issue.  With
 the upgrade to 3.1.8 we are experiencing the following issue  
 that we
 know of.

 The mapping files are throwing error.  For example, in a one-to-one
 element, with in the mapping file, we have specified not-
 null=true.
 In 3.0.22 this works fine, in 3.1.8 this throws an error.

 You may need to double check the XML, because the default XML parser
 changed from 3.0 to 3.1.  Resin 3.0 defaulted XML to its own XML
 parser.  Resin 3.1 uses the JDK's parser.

 I'm not familiar with the Hibernate syntax, but it's possible that
 Resin's XML parser was either allowing some syntax or was providing
 defaults that the standard JDK parser isn't providing.

 When it comes to XML, I've come to the conclusion that it's best to
 always explicitly define the XML library/parser that you're going to
 use to avoid problems just like this. Luckily, Resin makes this easy
 in the resin.conf file:

 server
   ...
   !-- Requires Apache's xerces.jar and xml-apis.jar libraries. --
   system-property
 javax
 .xml
 .parsers
 .DocumentBuilderFactory
 =org.apache.xerces.jaxp.DocumentBuilderFactoryImpl/
   system-property
 javax
 .xml
 .parsers
 .SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl/

   !-- Requires Apache's xalan.jar library. --
   system-property
 javax
 .xml
 .transform
 .TransformerFactory
 =org.apache.xalan.processor.TransformerFactoryImpl/
   ...
 /server

 The above is from our Resin 3.0.x resin.conf file. I assume the same
 will work for Resin 3.1.x?

 Rob



 -- Scott



 Here is the error as displayed in the Resin console.

 [2009-01-13 16:35:14,146] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(14) Attribute not-null must be declared for element
 type
 one-to-one.
 [2009-01-13 16:35:14,149] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(15) Attribute lazy with value true must have a  
 value
 from the list false proxy no-proxy .
 [2009-01-13 16:35:14,158] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(28) Attribute not-null must be declared for element
 type
 one-to-one.

 Any help would be greatly appreciated.  Specificly if you have any
 documentation on how to integrate Hibernate with 3.1.8 or what the
 mapping files should be written.

 Thanks

 Todd Sowers


 --
 Todd Sowers
 DList.com
 phone: 646-827-6766
 t...@dlist.com
 www.dlist.com



 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest





 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Hybernate Resin 3.1.8

2009-01-16 Thread Todd Sowers
Rob -

Yes we have tried using the Apache Xerces parser and it doesn't work

The only time the Google API returns records is when we do not include  
the following:

server
  ...
  !-- Requires Apache's xerces.jar and xml-apis.jar libraries. --
  system-property
javax
.xml
.parsers
.DocumentBuilderFactory
=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl/
  system-property
javax
.xml
.parsers
.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl/

  !-- Requires Apache's xalan.jar library. --
  system-property
javax
.xml
.transform
.TransformerFactory
=org.apache.xalan.processor.TransformerFactoryImpl/
  ...
/server

In this case, hibernate returns errors.

We just are at a lose as what to do.  We absolutely need to use  
Hibernate, most of our application is developed using it.   By  
including the fore mentioned tags Hibernate works fine, but the Google  
API returns nothing.

Todd






--
Todd Sowers
DList.com
phone: 646-827-6766
t...@dlist.com
www.dlist.com



On Jan 16, 2009, at 12:46 PM, Rob Lockstone wrote:

 Have you tried using the Apache Xerces parser? There are definitely
 differences and assumptions that people make, often unknowingly, when
 crafting XML that result in the XML only being parseable by the
 parser they themselves are using.

 Anyway, that's what I would try.

 If that doesn't work, can you post the error you're getting?
 Preferably with the XML data that Google is sending you. I generally
 do this by issuing the request from within a browser that properly
 displays raw XML, such as Firefox (or IE on Windows or Camino on OS
 X, notably Safari does not), then you might be able to find out what
 the offending part of the XML is and go from there.

 Rob

 On Jan 16, 2009, at 8:50 AM, Todd Sowers wrote:

 Thanks - This worked perfect.

 The issue we now encounter is the Google Contact API is not returning
 any data.  We believe this is because the Google Contacts API needs
 javax.xml.parsers.SAXParserFactory and we have defaulted the parser
 (to fix the previous Hibernate issue) to
 com.caucho.xml.parsers.XmlSAXParserFactory

 Any suggestions?

 Todd


 --
 Todd Sowers
 DList.com
 phone: 646-827-6766
 t...@dlist.com
 www.dlist.com



 On Jan 15, 2009, at 7:40 PM, Rob Lockstone wrote:


 On Jan 15, 2009, at 16:12, Scott Ferguson wrote:


 On Jan 15, 2009, at 3:59 PM, Todd Sowers wrote:

 Hello -

 We are in the process of upgrading from Resin 3.0.22 to Resin
 3.1.8.
 In our 3.0.22 environment Hibernate is working without issue.   
 With
 the upgrade to 3.1.8 we are experiencing the following issue
 that we
 know of.

 The mapping files are throwing error.  For example, in a one-to- 
 one
 element, with in the mapping file, we have specified not-
 null=true.
 In 3.0.22 this works fine, in 3.1.8 this throws an error.

 You may need to double check the XML, because the default XML  
 parser
 changed from 3.0 to 3.1.  Resin 3.0 defaulted XML to its own XML
 parser.  Resin 3.1 uses the JDK's parser.

 I'm not familiar with the Hibernate syntax, but it's possible that
 Resin's XML parser was either allowing some syntax or was providing
 defaults that the standard JDK parser isn't providing.

 When it comes to XML, I've come to the conclusion that it's best to
 always explicitly define the XML library/parser that you're going to
 use to avoid problems just like this. Luckily, Resin makes this easy
 in the resin.conf file:

 server
  ...
  !-- Requires Apache's xerces.jar and xml-apis.jar libraries. --
  system-property
 javax
 .xml
 .parsers
 .DocumentBuilderFactory
 =org.apache.xerces.jaxp.DocumentBuilderFactoryImpl/
  system-property
 javax
 .xml
 .parsers
 .SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl/

  !-- Requires Apache's xalan.jar library. --
  system-property
 javax
 .xml
 .transform
 .TransformerFactory
 =org.apache.xalan.processor.TransformerFactoryImpl/
  ...
 /server

 The above is from our Resin 3.0.x resin.conf file. I assume the same
 will work for Resin 3.1.x?

 Rob



 -- Scott



 Here is the error as displayed in the Resin console.

 [2009-01-13 16:35:14,146] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(14) Attribute not-null must be declared for element
 type
 one-to-one.
 [2009-01-13 16:35:14,149] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(15) Attribute lazy with value true must have a
 value
 from the list false proxy no-proxy .
 [2009-01-13 16:35:14,158] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(28) Attribute not-null must be declared for element
 type
 one-to-one.

 Any help would be greatly appreciated.  Specificly if you have any
 documentation on how to integrate Hibernate with 3.1.8 or what the
 mapping files should be written.

 Thanks

 Todd Sowers


 --
 Todd Sowers
 DList.com
 phone: 646-827-6766
 t...@dlist.com
 www.dlist.com



 

Re: [Resin-interest] Hybernate Resin 3.1.8

2009-01-16 Thread Rob Lockstone
What Google API requests are resulting in errors? And what are the  
errors?

Rob

On Jan 16, 2009, at 10:13, Todd Sowers wrote:

 Rob -

 Yes we have tried using the Apache Xerces parser and it doesn't work

 The only time the Google API returns records is when we do not include
 the following:

 server
  ...
  !-- Requires Apache's xerces.jar and xml-apis.jar libraries. --
  system-property
 javax
 .xml
 .parsers
 .DocumentBuilderFactory
 =org.apache.xerces.jaxp.DocumentBuilderFactoryImpl/
  system-property
 javax
 .xml
 .parsers
 .SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl/

  !-- Requires Apache's xalan.jar library. --
  system-property
 javax
 .xml
 .transform
 .TransformerFactory
 =org.apache.xalan.processor.TransformerFactoryImpl/
  ...
 /server

 In this case, hibernate returns errors.

 We just are at a lose as what to do.  We absolutely need to use
 Hibernate, most of our application is developed using it.   By
 including the fore mentioned tags Hibernate works fine, but the Google
 API returns nothing.

 Todd






 --
 Todd Sowers
 DList.com
 phone: 646-827-6766
 t...@dlist.com
 www.dlist.com



 On Jan 16, 2009, at 12:46 PM, Rob Lockstone wrote:

 Have you tried using the Apache Xerces parser? There are definitely
 differences and assumptions that people make, often unknowingly, when
 crafting XML that result in the XML only being parseable by the
 parser they themselves are using.

 Anyway, that's what I would try.

 If that doesn't work, can you post the error you're getting?
 Preferably with the XML data that Google is sending you. I generally
 do this by issuing the request from within a browser that properly
 displays raw XML, such as Firefox (or IE on Windows or Camino on OS
 X, notably Safari does not), then you might be able to find out what
 the offending part of the XML is and go from there.

 Rob

 On Jan 16, 2009, at 8:50 AM, Todd Sowers wrote:

 Thanks - This worked perfect.

 The issue we now encounter is the Google Contact API is not  
 returning
 any data.  We believe this is because the Google Contacts API needs
 javax.xml.parsers.SAXParserFactory and we have defaulted the parser
 (to fix the previous Hibernate issue) to
 com.caucho.xml.parsers.XmlSAXParserFactory

 Any suggestions?

 Todd


 --
 Todd Sowers
 DList.com
 phone: 646-827-6766
 t...@dlist.com
 www.dlist.com



 On Jan 15, 2009, at 7:40 PM, Rob Lockstone wrote:


 On Jan 15, 2009, at 16:12, Scott Ferguson wrote:


 On Jan 15, 2009, at 3:59 PM, Todd Sowers wrote:

 Hello -

 We are in the process of upgrading from Resin 3.0.22 to Resin
 3.1.8.
 In our 3.0.22 environment Hibernate is working without issue.
 With
 the upgrade to 3.1.8 we are experiencing the following issue
 that we
 know of.

 The mapping files are throwing error.  For example, in a one-to-
 one
 element, with in the mapping file, we have specified not-
 null=true.
 In 3.0.22 this works fine, in 3.1.8 this throws an error.

 You may need to double check the XML, because the default XML
 parser
 changed from 3.0 to 3.1.  Resin 3.0 defaulted XML to its own XML
 parser.  Resin 3.1 uses the JDK's parser.

 I'm not familiar with the Hibernate syntax, but it's possible that
 Resin's XML parser was either allowing some syntax or was  
 providing
 defaults that the standard JDK parser isn't providing.

 When it comes to XML, I've come to the conclusion that it's best to
 always explicitly define the XML library/parser that you're going  
 to
 use to avoid problems just like this. Luckily, Resin makes this  
 easy
 in the resin.conf file:

 server
 ...
 !-- Requires Apache's xerces.jar and xml-apis.jar libraries. --
 system-property
 javax
 .xml
 .parsers
 .DocumentBuilderFactory
 =org.apache.xerces.jaxp.DocumentBuilderFactoryImpl/
 system-property
 javax
 .xml
 .parsers
 .SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl/

 !-- Requires Apache's xalan.jar library. --
 system-property
 javax
 .xml
 .transform
 .TransformerFactory
 =org.apache.xalan.processor.TransformerFactoryImpl/
 ...
 /server

 The above is from our Resin 3.0.x resin.conf file. I assume the  
 same
 will work for Resin 3.1.x?

 Rob



 -- Scott



 Here is the error as displayed in the Resin console.

 [2009-01-13 16:35:14,146] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(14) Attribute not-null must be declared for element
 type
 one-to-one.
 [2009-01-13 16:35:14,149] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(15) Attribute lazy with value true must have a
 value
 from the list false proxy no-proxy .
 [2009-01-13 16:35:14,158] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(28) Attribute not-null must be declared for element
 type
 one-to-one.

 Any help would be greatly appreciated.  Specificly if you have  
 any
 documentation on how to integrate Hibernate with 3.1.8 or what  
 the
 mapping files should be 

Re: [Resin-interest] Hybernate Resin 3.1.8

2009-01-16 Thread Todd Sowers


Rob -

There are no errors.  When we call the function, we ask it to return  
the result set count.  In our case it should be 37.  However it  
returns 0.


 The API we are using is the Google Contacts Data API (http://code.google.com/apis/contacts/docs/2.0/developers_guide_java.html 
)


This is the test class which should return data.  It returns nothing.

import com.google.gdata.client.contacts.ContactsService;
import com.google.gdata.data.contacts.ContactEntry;
import com.google.gdata.data.contacts.ContactFeed;
import com.google.gdata.util.AuthenticationException;
import com.google.gdata.util.ServiceException;
import com.google.gdata.client.Query;
import com.manmatch.Constants;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;



import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
* This is a test template
*/

 public class Contacts {

   public static void main(String[] args) {
Log log = LogFactory.getLog(Constants.PACKAGE);
 try {

   // Create a new Contacts service
   ContactsService myService = new ContactsService(My  
Application);

myService 
.setUserCredentials 
(INSERT_GOOGLE_USER_NAME 
***,***INSERT_GOOGLE_PASSWORD);



   // Get a list of all entries
   URL metafeedUrl = new URL(http://www.google.com/m8/feeds/contacts/default/full 
);

   log.info(Getting Contacts entries...\n);
   //ContactFeed resultFeed = myService.getFeed(metafeedUrl,  
ContactFeed.class);

   Query myQuery = new com.google.gdata.client.Query(metafeedUrl);
   myQuery.setMaxResults(5);
   ContactFeed resultFeed = myService.query(myQuery,  
ContactFeed.class);


   ListContactEntry entries = resultFeed.getEntries();
   for(int i=0; ientries.size(); i++) {
 ContactEntry entry = entries.get(i);
 log.info(\t + entry.getTitle().getPlainText());
   }
   log.info(\nTotal Entries: +entries.size());
 }
 catch(AuthenticationException e) {
   e.printStackTrace();
 }
 catch(MalformedURLException e) {
   e.printStackTrace();
 }
 catch(ServiceException e) {
   e.printStackTrace();
 }
 catch(IOException e) {
   e.printStackTrace();
 }
   }
 }

If we run this class in Eclipse as a Java application, it returns the  
contact data without issue.


Any help here would be greatly appreciated.  Thanks again.

--
Todd Sowers
DList.com
phone: 646-827-6766
t...@dlist.com
www.dlist.com


--
Todd Sowers
DList.com
phone: 646-827-6766
t...@dlist.com
www.dlist.com



On Jan 16, 2009, at 3:19 PM, Rob Lockstone wrote:


What Google API requests are resulting in errors? And what are the
errors?

Rob

On Jan 16, 2009, at 10:13, Todd Sowers wrote:


Rob -

Yes we have tried using the Apache Xerces parser and it doesn't work

The only time the Google API returns records is when we do not  
include

the following:

server
...
!-- Requires Apache's xerces.jar and xml-apis.jar libraries. --
system-property
javax
.xml
.parsers
.DocumentBuilderFactory
=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl/
system-property
javax
.xml
.parsers
.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl/

!-- Requires Apache's xalan.jar library. --
system-property
javax
.xml
.transform
.TransformerFactory
=org.apache.xalan.processor.TransformerFactoryImpl/
...
/server

In this case, hibernate returns errors.

We just are at a lose as what to do.  We absolutely need to use
Hibernate, most of our application is developed using it.   By
including the fore mentioned tags Hibernate works fine, but the  
Google

API returns nothing.

Todd

___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Hybernate Resin 3.1.8

2009-01-16 Thread Rob Lockstone
I don't have time to look at it now, but will this weekend if you  
don't figure it out.


Rob

On Jan 16, 2009, at 12:36, Todd Sowers wrote:



Rob -

There are no errors.  When we call the function, we ask it to return  
the result set count.  In our case it should be 37.  However it  
returns 0.


 The API we are using is the Google Contacts Data API (http://code.google.com/apis/contacts/docs/2.0/developers_guide_java.html 
)


This is the test class which should return data.  It returns nothing.

import com.google.gdata.client.contacts.ContactsService;
import com.google.gdata.data.contacts.ContactEntry;
import com.google.gdata.data.contacts.ContactFeed;
import com.google.gdata.util.AuthenticationException;
import com.google.gdata.util.ServiceException;
import com.google.gdata.client.Query;
import com.manmatch.Constants;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;



import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
* This is a test template
*/

 public class Contacts {

   public static void main(String[] args) {
Log log = LogFactory.getLog(Constants.PACKAGE);
 try {

   // Create a new Contacts service
   ContactsService myService = new ContactsService(My  
Application);

myService 
.setUserCredentials 
(INSERT_GOOGLE_USER_NAME 
***,***INSERT_GOOGLE_PASSWORD);



   // Get a list of all entries
   URL metafeedUrl = new URL(http://www.google.com/m8/feeds/contacts/default/full 
);

   log.info(Getting Contacts entries...\n);
   //ContactFeed resultFeed = myService.getFeed(metafeedUrl,  
ContactFeed.class);

   Query myQuery = new com.google.gdata.client.Query(metafeedUrl);
   myQuery.setMaxResults(5);
   ContactFeed resultFeed = myService.query(myQuery,  
ContactFeed.class);


   ListContactEntry entries = resultFeed.getEntries();
   for(int i=0; ientries.size(); i++) {
 ContactEntry entry = entries.get(i);
 log.info(\t + entry.getTitle().getPlainText());
   }
   log.info(\nTotal Entries: +entries.size());
 }
 catch(AuthenticationException e) {
   e.printStackTrace();
 }
 catch(MalformedURLException e) {
   e.printStackTrace();
 }
 catch(ServiceException e) {
   e.printStackTrace();
 }
 catch(IOException e) {
   e.printStackTrace();
 }
   }
 }

If we run this class in Eclipse as a Java application, it returns  
the contact data without issue.


Any help here would be greatly appreciated.  Thanks again.

--
Todd Sowers
DList.com
phone: 646-827-6766
t...@dlist.com
www.dlist.com


--
Todd Sowers
DList.com
phone: 646-827-6766
t...@dlist.com
www.dlist.com



On Jan 16, 2009, at 3:19 PM, Rob Lockstone wrote:


What Google API requests are resulting in errors? And what are the
errors?

Rob

On Jan 16, 2009, at 10:13, Todd Sowers wrote:


Rob -

Yes we have tried using the Apache Xerces parser and it doesn't work

The only time the Google API returns records is when we do not  
include

the following:

server
...
!-- Requires Apache's xerces.jar and xml-apis.jar libraries. --
system-property
javax
.xml
.parsers
.DocumentBuilderFactory
=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl/
system-property
javax
.xml
.parsers
.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl/

!-- Requires Apache's xalan.jar library. --
system-property
javax
.xml
.transform
.TransformerFactory
=org.apache.xalan.processor.TransformerFactoryImpl/
...
/server

In this case, hibernate returns errors.

We just are at a lose as what to do.  We absolutely need to use
Hibernate, most of our application is developed using it.   By
including the fore mentioned tags Hibernate works fine, but the  
Google

API returns nothing.

Todd


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Hybernate Resin 3.1.8

2009-01-15 Thread Scott Ferguson

On Jan 15, 2009, at 3:59 PM, Todd Sowers wrote:

 Hello -

 We are in the process of upgrading from Resin 3.0.22 to Resin 3.1.8.
 In our 3.0.22 environment Hibernate is working without issue.  With
 the upgrade to 3.1.8 we are experiencing the following issue that we
 know of.

 The mapping files are throwing error.  For example, in a one-to-one
 element, with in the mapping file, we have specified not-null=true.
 In 3.0.22 this works fine, in 3.1.8 this throws an error.

You may need to double check the XML, because the default XML parser  
changed from 3.0 to 3.1.  Resin 3.0 defaulted XML to its own XML  
parser.  Resin 3.1 uses the JDK's parser.

I'm not familiar with the Hibernate syntax, but it's possible that  
Resin's XML parser was either allowing some syntax or was providing  
defaults that the standard JDK parser isn't providing.

-- Scott



 Here is the error as displayed in the Resin console.

 [2009-01-13 16:35:14,146] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(14) Attribute not-null must be declared for element type
 one-to-one.
 [2009-01-13 16:35:14,149] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(15) Attribute lazy with value true must have a value
 from the list false proxy no-proxy .
 [2009-01-13 16:35:14,158] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(28) Attribute not-null must be declared for element type
 one-to-one.

 Any help would be greatly appreciated.  Specificly if you have any
 documentation on how to integrate Hibernate with 3.1.8 or what the
 mapping files should be written.

 Thanks

 Todd Sowers


 --
 Todd Sowers
 DList.com
 phone: 646-827-6766
 t...@dlist.com
 www.dlist.com






 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Hybernate Resin 3.1.8

2009-01-15 Thread Rob Lockstone

On Jan 15, 2009, at 16:12, Scott Ferguson wrote:


 On Jan 15, 2009, at 3:59 PM, Todd Sowers wrote:

 Hello -

 We are in the process of upgrading from Resin 3.0.22 to Resin 3.1.8.
 In our 3.0.22 environment Hibernate is working without issue.  With
 the upgrade to 3.1.8 we are experiencing the following issue that we
 know of.

 The mapping files are throwing error.  For example, in a one-to-one
 element, with in the mapping file, we have specified not-null=true.
 In 3.0.22 this works fine, in 3.1.8 this throws an error.

 You may need to double check the XML, because the default XML parser
 changed from 3.0 to 3.1.  Resin 3.0 defaulted XML to its own XML
 parser.  Resin 3.1 uses the JDK's parser.

 I'm not familiar with the Hibernate syntax, but it's possible that
 Resin's XML parser was either allowing some syntax or was providing
 defaults that the standard JDK parser isn't providing.

When it comes to XML, I've come to the conclusion that it's best to  
always explicitly define the XML library/parser that you're going to  
use to avoid problems just like this. Luckily, Resin makes this easy  
in the resin.conf file:

server
   ...
   !-- Requires Apache's xerces.jar and xml-apis.jar libraries. --
   system-property  
javax 
.xml 
.parsers 
.DocumentBuilderFactory 
=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl/
   system-property  
javax 
.xml 
.parsers 
.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl/

   !-- Requires Apache's xalan.jar library. --
   system-property  
javax 
.xml 
.transform 
.TransformerFactory 
=org.apache.xalan.processor.TransformerFactoryImpl/
   ...
/server

The above is from our Resin 3.0.x resin.conf file. I assume the same  
will work for Resin 3.1.x?

Rob



 -- Scott



 Here is the error as displayed in the Resin console.

 [2009-01-13 16:35:14,146] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(14) Attribute not-null must be declared for element  
 type
 one-to-one.
 [2009-01-13 16:35:14,149] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(15) Attribute lazy with value true must have a value
 from the list false proxy no-proxy .
 [2009-01-13 16:35:14,158] ERROR XMLHelper:61
 org.hibernate.util.XMLHelper.error(..) - Error parsing XML: XML
 InputStream(28) Attribute not-null must be declared for element  
 type
 one-to-one.

 Any help would be greatly appreciated.  Specificly if you have any
 documentation on how to integrate Hibernate with 3.1.8 or what the
 mapping files should be written.

 Thanks

 Todd Sowers


 --
 Todd Sowers
 DList.com
 phone: 646-827-6766
 t...@dlist.com
 www.dlist.com



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest