Re: [Resin-interest] Hybernate & Resin 3.1.8
I have just skimmed this thread, so I'm sorry if I'm trying to solve the "wrong" problem, but can't you just fix the errors in your Hibernate mapping files, which you quoted in your original post? Those are DTD errors, but some parsers (read: Resin) will ignore them silently. For us this meant that our XML was accepted in the runtime environment (Resin parser) but caused errors in our JUnit tests (Xerces parser). I'd highly recommend having JUnit tests for all your Hibernate mappings (i.e. a TestCase for each *DAOImpl class). Spring and hsqldb really is helpful here. Good luck. /Mattias Todd Sowers wrote (2009-01-16 19:13): > 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: > > ... > > 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 > > > > 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. >> >> ... >> >> Rob >> >> > > > >> 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 >> >> ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Hybernate & Resin 3.1.8
Sorry, I don't have an answer for you. I used the jsp below along with the gdata libraries in my local resin configuration and it worked fine retrieving my contacts. It didn't matter if I specified the xerces xml parsers or not. It worked either way. I would guess you have something mis-configured or otherwise interfering, or perhaps one or more of the contacts you're retrieving has some bizarre or non-standard character(s) that are throwing off the xerces parser. My advice would be to try to boil it down to the simplest possible test case (one contact, no hibernate, nothing else) and then slowly start adding other code and features until it breaks. <%...@page import=" com.google.gdata.client.Query, com.google.gdata.client.contacts.ContactsService, com.google.gdata.data.contacts.ContactEntry, com.google.gdata.data.contacts.ContactFeed, com.google.gdata.util.AuthenticationException, com.google.gdata.util.ServiceException, java.net.URL, java.util.List" %> <% try { out .println(System.getProperty("javax.xml.parsers.DocumentBuilderFactory") +""); out.println(System.getProperty("javax.xml.parsers.SAXParserFactory") +""); out .println(System.getProperty("javax.xml.transform.TransformerFactory") +""); //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 "); out.println("Getting Contacts entries..."); //ContactFeed resultFeed = myService.getFeed(metafeedUrl, ContactFeed.class); Query myQuery = new Query(metafeedUrl); myQuery.setMaxResults(5); ContactFeed resultFeed = myService.query(myQuery, ContactFeed.class); List entries = resultFeed.getEntries(); for (int i=0; i < entries.size(); i++) { ContactEntry entry = entries.get(i); out.println(entry.getTitle().getPlainText()+""); } out.println("Total Entries: "+entries.size()); } catch (Exception e) { out.println("Exception: "+e.getMessage()+""); e.printStackTrace(); } %> On Jan 16, 2009, at 13:01, Todd Sowers wrote: Rob - Thank you so much. I can promise you we will not figure it out. We are out of ideas. Any guidance you can provide would be very much appreciated. Thanks, Todd Sowers On Jan 16, 2009, at 3:54 PM, Rob Lockstone wrote: 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); List entries = resultFeed.getEntries(); for(int i=0; iIf 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. 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 J
Re: [Resin-interest] Hybernate & Resin 3.1.8
Rob - Thank you so much. I can promise you we will not figure it out. We are out of ideas. Any guidance you can provide would be very much appreciated. Thanks, Todd Sowers -- Todd Sowers DList.com phone: 646-827-6766 t...@dlist.com www.dlist.com On Jan 16, 2009, at 3:54 PM, Rob Lockstone wrote: 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); List entries = resultFeed.getEntries(); for(int i=0; iIf 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: ... ... 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 ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Hybernate & Resin 3.1.8
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); List entries = resultFeed.getEntries(); for(int i=0; iIf 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: ... ... 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
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); List entries = resultFeed.getEntries(); for(int i=0; iIf 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: ... ... 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
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: > > > ... > > javax > .xml > .parsers > .DocumentBuilderFactory > ="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/> > javax > .xml > .parsers > .SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"/> > > > javax > .xml > .transform > .TransformerFactory > ="org.apache.xalan.processor.TransformerFactoryImpl"/> > ... > > > 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: ... >>> javax .xml .parsers .DocumentBuilderFactory ="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/> >>> javax .xml .parsers .SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"/> >>> javax .xml .transform .TransformerFactory ="org.apache.xalan.processor.TransformerFactoryImpl"/> ... 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.uti
Re: [Resin-interest] Hybernate & Resin 3.1.8
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: ... ... 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: >>> >>> >>> ... >>> >>> >> javax >>> .xml >>> .parsers >>> .DocumentBuilderFactory >>> ="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/> >>> >> javax >>> .xml >>> .parsers >>> .SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"/> >>> >>> >>> >> javax >>> .xml >>> .transform >>> .TransformerFactory >>> ="org.apache.xalan.processor.TransformerFactoryImpl"/> >>> ... >>> >>> >>> 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 >>>
Re: [Resin-interest] Hybernate & Resin 3.1.8
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: >> >> >> ... >> >> > javax >> .xml >> .parsers >> .DocumentBuilderFactory >> ="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/> >> > javax >> .xml >> .parsers >> .SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"/> >> >> >> > javax >> .xml >> .transform >> .TransformerFactory >> ="org.apache.xalan.processor.TransformerFactoryImpl"/> >> ... >> >> >> 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
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: > > > ... > >javax > .xml > .parsers > .DocumentBuilderFactory > ="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/> >javax > .xml > .parsers > .SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"/> > > >javax > .xml > .transform > .TransformerFactory > ="org.apache.xalan.processor.TransformerFactoryImpl"/> > ... > > > 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
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: ... ... 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
Re: [Resin-interest] Hybernate & Resin 3.1.8
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
[Resin-interest] Hybernate & Resin 3.1.8
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. 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