You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(55) |
Mar
(100) |
Apr
(203) |
May
(330) |
Jun
(190) |
Jul
(302) |
Aug
(323) |
Sep
(197) |
Oct
(245) |
Nov
(490) |
Dec
(330) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(194) |
Feb
(400) |
Mar
(416) |
Apr
(415) |
May
(359) |
Jun
(381) |
Jul
(491) |
Aug
(311) |
Sep
(291) |
Oct
(273) |
Nov
(355) |
Dec
(266) |
| 2005 |
Jan
(306) |
Feb
(303) |
Mar
(520) |
Apr
(346) |
May
(255) |
Jun
(221) |
Jul
(171) |
Aug
(247) |
Sep
(147) |
Oct
(125) |
Nov
(165) |
Dec
(65) |
| 2006 |
Jan
(90) |
Feb
(53) |
Mar
(121) |
Apr
(103) |
May
(113) |
Jun
(103) |
Jul
(104) |
Aug
(67) |
Sep
(78) |
Oct
(82) |
Nov
(78) |
Dec
(70) |
| 2007 |
Jan
(77) |
Feb
(76) |
Mar
(63) |
Apr
(30) |
May
(47) |
Jun
(41) |
Jul
(44) |
Aug
(44) |
Sep
(49) |
Oct
(33) |
Nov
(25) |
Dec
(21) |
| 2008 |
Jan
(45) |
Feb
(13) |
Mar
(15) |
Apr
(12) |
May
(9) |
Jun
(33) |
Jul
(30) |
Aug
(7) |
Sep
(20) |
Oct
(17) |
Nov
(20) |
Dec
(10) |
| 2009 |
Jan
(8) |
Feb
(5) |
Mar
(12) |
Apr
(17) |
May
(19) |
Jun
(97) |
Jul
(77) |
Aug
(33) |
Sep
(24) |
Oct
(41) |
Nov
(16) |
Dec
(32) |
| 2010 |
Jan
(24) |
Feb
(14) |
Mar
(50) |
Apr
(71) |
May
(70) |
Jun
(64) |
Jul
(45) |
Aug
(62) |
Sep
(32) |
Oct
(4) |
Nov
(12) |
Dec
(2) |
| 2011 |
Jan
(1) |
Feb
(3) |
Mar
(4) |
Apr
(3) |
May
(6) |
Jun
(1) |
Jul
(4) |
Aug
(3) |
Sep
(4) |
Oct
(6) |
Nov
(3) |
Dec
(3) |
| 2012 |
Jan
(4) |
Feb
(8) |
Mar
(6) |
Apr
(10) |
May
(2) |
Jun
(3) |
Jul
(11) |
Aug
(10) |
Sep
(4) |
Oct
|
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
(9) |
Apr
(1) |
May
(8) |
Jun
(2) |
Jul
(5) |
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(10) |
Dec
(8) |
| 2014 |
Jan
(3) |
Feb
(12) |
Mar
(9) |
Apr
(12) |
May
(2) |
Jun
|
Jul
(3) |
Aug
(1) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(2) |
| 2015 |
Jan
(1) |
Feb
(3) |
Mar
(4) |
Apr
(9) |
May
(2) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(7) |
Oct
(9) |
Nov
(7) |
Dec
(9) |
| 2016 |
Jan
(7) |
Feb
(5) |
Mar
(5) |
Apr
(5) |
May
(8) |
Jun
(4) |
Jul
(5) |
Aug
(4) |
Sep
(6) |
Oct
(7) |
Nov
(2) |
Dec
(3) |
| 2017 |
Jan
(7) |
Feb
(8) |
Mar
(7) |
Apr
(3) |
May
(4) |
Jun
(3) |
Jul
(5) |
Aug
(8) |
Sep
(4) |
Oct
(2) |
Nov
(3) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2021 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
(5) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
| 2026 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <jue...@we...> - 2003-06-17 17:51:13
|
Hi Ken,
=20
You can easily replace the default error message by defining a =
MessageSource, i.e. a "messages.properties" bundle or the like. If you =
define a message for the key "typeMismatch" there, you'll see that =
message in your form in case of an error with code "typeMismatch". You =
can even define more specific messages like for "typeMismatch.myField" =
or even "typeMismatch.myObject.myField" that will only get used on the =
specified field resp. object and field. Of course this works with your =
own error codes that your own validator produces too. See the FieldError =
javadoc for details.
=20
So I'd suggest to stick to CustomDateEditor but override the respective =
messages. This will both keep the offending entry and provide a =
localized message. Is that what you meant to achieve? If there's =
anything left, let's try to extend CustomDateEditor accordingly.
=20
Juergen
=20
=20
-----Original Message-----
From: Ken Krebs [mailto:kk...@kk...]
Sent: Tuesday, June 17, 2003 7:32 PM
To: j=FCrgen h=F6ller [werk3AT]
Cc: 'spring-dev-list'
Subject: MVC binding and validation
Juergen,
NOTE: This little problem is not pressing as I have an acceptable =
solution in place for petclinic which will be posted Real Soon Now ;-) =
.
In a couple of my petclinic forms, I use BaseCommandController's =
initBinder method to install a custom Date PropertyEditor to handle =
dates of the form "yyyy-mm-dd". The framework class CustomDateEditor is =
not convenient to subclass so I used it's code as a basis for my own =
SimpleDateEditor (code is shown below). In this class's setAsText =
method, I handle the ParseException to set the object to null because I =
do not like the error message that gets bound in if I let it throw an =
IllegalArgumentException as does CustomDateEditor. The message looks =
like a stack trace and would be incomprehensible to the average end =
user, i.e.: Failed to convert property value of type [java.lang.String] =
to required type [java.util.Date]; nested exception is: =
java.lang.IllegalArgumentException: Could not parse date: Unparseable =
date: "2000-06-". This message comes from BeanWrapperImpl's =
setPropertyValue throwing a TypeMismatchException. Setting the object =
value to null allows the problem to be handled by my validator which =
simply reports the now erased date entry as "invalid". Obviously, this =
is not ideal. It would be better to allow the PropertyEditor to provide =
a user-friendly, localizable exception while preserving the offending =
entry. Unfortunately, setAsText can't throw any checked Exceptions like =
the ErrorCodedPropertyVetoException that DataBinder's bind method uses.
What do you think ?
Ken
/*
* SimpleDateEditor.java
*
*/
package petclinic.validation;
import java.util.Date;
import java.beans.PropertyEditorSupport;
import java.text.SimpleDateFormat;
import java.text.ParseException;
/**
*
* @author Ken Krebs
*/
public class SimpleDateEditor extends PropertyEditorSupport {
=20
private SimpleDateFormat dateFormat;
=20
/** Creates a new instance of SimpleDateEditor */
public SimpleDateEditor() {
dateFormat =3D new SimpleDateFormat("yyyy-MM-dd");
dateFormat.setLenient(false);
}
=20
/**
* Parse the Date from the given text, using the specified =
DateFormat.
* Trap a ParseException to allow the Validator to handle it.
*/
public void setAsText(String text) {
try {
setValue(this.dateFormat.parse(text));
} catch (ParseException ex) {
// throw new IllegalArgumentException("Could not parse =
date: " + ex.getMessage());
setValue(null);
}
}
=20
/**
* Format the Date as String, using the specified DateFormat.
*/
public String getAsText() {
return this.dateFormat.format((Date) getValue());
}
=20
}
|
|
From: JP P. <jp....@ti...> - 2003-06-17 17:19:13
|
Hi Juergen, I'm very happy with your changes. Sorry to give you work on each idea :-(, but the simplicity of the current model shows the good abstraction level is reached. I just believe I lack some experience to finish my work in a high level of finishing touches as you can. I hope that you even have less work as starting from scratch ;-). Jean-Pierre -----Message d'origine----- De=A0: j=FCrgen h=F6ller [werk3AT] [mailto:jue...@we...]=20 Envoy=E9=A0: mardi 17 juin 2003 17:47 =C0=A0: JP Pawlak; Rod Johnson; spr...@li... Objet=A0: RE: [Springframework-developer] themes Hi Jean-Pierre, I've reworked your current implementation quite a bit, and committed it to the theme branch. I'm happy with it now, I hope you are too... :-) The most obvious change is the introduction of a Theme interface, consisting of "getName()" and "getMessageSource()". ThemeSource just has "Theme getTheme(String themeName)" anymore. A theme is effectively a MessageSource that is specific to a theme name, as indicated by the 3 getTheme() methods that all match their getMessage() counterparts, just with a theme name parameter. So this seems to be the most appropriate design for me. This allows for a very straightforward ThemeTag implementation, just extending MessageTag and overriding the default getMessageSource with the current theme's one! The UI contexts are now extremely thin, and the current ResourceBundleThemeSource is simply a factory for theme-specific ResourceBundleMessageSources. Furthermore, I've dissolved ConcreteThemeSource, and introduced a UiApplicationContextUtils helper class that features a initThemeSource(ApplicationContext) method, used by both AbstractXmlUiApplicationContext and StaticUiApplicationContext. This means less code, and is in line with the WebApplicationContext implementation strategy and WebApplicationContextUtils. The PagedList demo application should work unchanged. There's just one small fix in the cookie names that has nothing to do with the above changes: It's "...CookieLocaleResolver.LOCALE"/"CookieThemeResolver.THEME" now, instead of the previous "SessionXxxResolver" names. BTW, instead of directly setting the respective cookies via JavaScript, you could make PagedListController implement LocaleResolverAware and the new ThemeResolverAware. Then the controller could call setLocale/setTheme in case of respective requests, triggered by certain HTML links. Note that this implementation strategy allows for seamlessly changing the LocaleResolver/ThemeResolver implementation, e.g. from the cookie to the session version! Please go ahead with the test suite and the Javadocs! If we don't find any obstacles anymore, I'm all for integrating themes into the upcoming 0.9 release. This means that if you manage to finish it by the end of the week, you can promptly join the theme branch into the main branch, so that we will have one single codebase again. Regards, Juergen |
|
From: <jue...@we...> - 2003-06-17 15:49:16
|
Hi Jean-Pierre, I've reworked your current implementation quite a bit, and committed it = to the theme branch. I'm happy with it now, I hope you are too... :-) The most obvious change is the introduction of a Theme interface, = consisting of "getName()" and "getMessageSource()". ThemeSource just has = "Theme getTheme(String themeName)" anymore. A theme is effectively a = MessageSource that is specific to a theme name, as indicated by the 3 = getTheme() methods that all match their getMessage() counterparts, just = with a theme name parameter. So this seems to be the most appropriate = design for me. This allows for a very straightforward ThemeTag implementation, just = extending MessageTag and overriding the default getMessageSource with = the current theme's one! The UI contexts are now extremely thin, and the = current ResourceBundleThemeSource is simply a factory for theme-specific = ResourceBundleMessageSources. Furthermore, I've dissolved ConcreteThemeSource, and introduced a = UiApplicationContextUtils helper class that features a = initThemeSource(ApplicationContext) method, used by both = AbstractXmlUiApplicationContext and StaticUiApplicationContext. This = means less code, and is in line with the WebApplicationContext = implementation strategy and WebApplicationContextUtils. The PagedList demo application should work unchanged. There's just one = small fix in the cookie names that has nothing to do with the above = changes: It's = "...CookieLocaleResolver.LOCALE"/"CookieThemeResolver.THEME" now, = instead of the previous "SessionXxxResolver" names. BTW, instead of directly setting the respective cookies via JavaScript, = you could make PagedListController implement LocaleResolverAware and the = new ThemeResolverAware. Then the controller could call = setLocale/setTheme in case of respective requests, triggered by certain = HTML links. Note that this implementation strategy allows for seamlessly = changing the LocaleResolver/ThemeResolver implementation, e.g. from the = cookie to the session version! Please go ahead with the test suite and the Javadocs! If we don't find = any obstacles anymore, I'm all for integrating themes into the upcoming = 0.9 release. This means that if you manage to finish it by the end of = the week, you can promptly join the theme branch into the main branch, = so that we will have one single codebase again. Regards, Juergen -----Original Message----- From: JP Pawlak [mailto:jp....@ti...] Sent: Tuesday, June 17, 2003 11:05 AM To: 'Rod Johnson'; j=FCrgen h=F6ller [werk3AT]; spr...@li... Subject: RE : [Springframework-developer] themes Hi Rod, Juergen, Following the last Rod's proposal, I have committed a third version. It's effectively cleaner and more powerful to create an intermediate UI level. Current state: APPLICATION: Only adding the protected afterRefresh method. UI: ThemeSource NestingThemeSource UI-SUPPORT: ConcreteThemeSource AbstractXmlUiApplicationContext StaticUiApplicationContext The two lasts classes add theme capabilities on their respective ancestror. WEB: DispatcherServlet handles the ThemeResolver The ThemeResolver interface has moved in web.servlet.theme and joined its implementations. XmlWebApplicationContext and StaticWebApplicationContext are as original but extending the UI level classes instead of Application level. The core handling of the themes is now in the UI packages, except the Theme resolving which is web specific. A theme resolving scheme will to be added later for Swing and AWT applications. Jean-Pierre -----Message d'origine----- De=A0: Rod Johnson [mailto:rod...@in...]=20 Envoy=E9=A0: lundi 16 juin 2003 22:58 =C0=A0: JP Pawlak; 'j=FCrgen h=F6ller [werk3AT]'; spr...@li... Objet=A0: Re: [Springframework-developer] themes I have committed in the theme branch a new version having no more modification outer the web package. This is true with an exception: the refresh method from AbstractApplicationContext calls a protected afterRefresh method which by default does nothing. [RJ] Sounds promising The most war straightforward. Only the ThemeSource could not be directly generically implemented. To avoid the core code, I created a ConcreteThemeSource. The WebApplicationContext classes include a such object and are delegating to him for the theme related requests. They redefine also the new method afterRefresh to include the theme refresh. [RJ] It's almost like we need a new UIApplicationContext. A standalone Swing or SWT app might also want themes, would want all generic app context stuff, but wouldn't want the web app context stuff. ApplicationContext -> UIApplicationContext -> WebApplicationContext In the Struts galaxy, Struts-layout implements themes, but the whole library becomes quickly a nightmare as it uses extensively HTML generation by JSP Tags and blocks in a poor Html/Css technology. JBoss has also themes in his Nukes implementation. But here also bunches of HTML are hard-coded. [RJ] I think themes are a very promising area for Spring. I spend all day in messaging middleware (although I have a little web consulting coming up), but sure could have used this when I was at FT.com. Juergen, can you decide on whether this makes 0.9? I think it's definitely good for 1.0, but I don't want to delay 0.9 and it's basically a backward-compatible enhancement. Regards, Rod |
|
From: JP P. <jp....@ti...> - 2003-06-17 09:04:48
|
Hi Rod, Juergen, Following the last Rod's proposal, I have committed a third version. It's effectively cleaner and more powerful to create an intermediate UI level. Current state: APPLICATION: Only adding the protected afterRefresh method. UI: ThemeSource NestingThemeSource UI-SUPPORT: ConcreteThemeSource AbstractXmlUiApplicationContext StaticUiApplicationContext The two lasts classes add theme capabilities on their respective ancestror. WEB: DispatcherServlet handles the ThemeResolver The ThemeResolver interface has moved in web.servlet.theme and joined its implementations. XmlWebApplicationContext and StaticWebApplicationContext are as original but extending the UI level classes instead of Application level. The core handling of the themes is now in the UI packages, except the Theme resolving which is web specific. A theme resolving scheme will to be added later for Swing and AWT applications. Jean-Pierre -----Message d'origine----- De=A0: Rod Johnson [mailto:rod...@in...]=20 Envoy=E9=A0: lundi 16 juin 2003 22:58 =C0=A0: JP Pawlak; 'j=FCrgen h=F6ller [werk3AT]'; spr...@li... Objet=A0: Re: [Springframework-developer] themes I have committed in the theme branch a new version having no more modification outer the web package. This is true with an exception: the refresh method from AbstractApplicationContext calls a protected afterRefresh method which by default does nothing. [RJ] Sounds promising The most war straightforward. Only the ThemeSource could not be directly generically implemented. To avoid the core code, I created a ConcreteThemeSource. The WebApplicationContext classes include a such object and are delegating to him for the theme related requests. They redefine also the new method afterRefresh to include the theme refresh. [RJ] It's almost like we need a new UIApplicationContext. A standalone Swing or SWT app might also want themes, would want all generic app context stuff, but wouldn't want the web app context stuff. ApplicationContext -> UIApplicationContext -> WebApplicationContext In the Struts galaxy, Struts-layout implements themes, but the whole library becomes quickly a nightmare as it uses extensively HTML generation by JSP Tags and blocks in a poor Html/Css technology. JBoss has also themes in his Nukes implementation. But here also bunches of HTML are hard-coded. [RJ] I think themes are a very promising area for Spring. I spend all day in messaging middleware (although I have a little web consulting coming up), but sure could have used this when I was at FT.com. Juergen, can you decide on whether this makes 0.9? I think it's definitely good for 1.0, but I don't want to delay 0.9 and it's basically a backward-compatible enhancement. Regards, Rod |
|
From: Rod J. <rod...@in...> - 2003-06-16 21:01:07
|
I have committed in the theme branch a new version having no more modification outer the web package. This is true with an exception: the refresh method from AbstractApplicationContext calls a protected afterRefresh method which by default does nothing. [RJ] Sounds promising The most war straightforward. Only the ThemeSource could not be directly generically implemented. To avoid the core code, I created a ConcreteThemeSource. The WebApplicationContext classes include a such object and are delegating to him for the theme related requests. They redefine also the new method afterRefresh to include the theme refresh. [RJ] It's almost like we need a new UIApplicationContext. A standalone Swing or SWT app might also want themes, would want all generic app context stuff, but wouldn't want the web app context stuff. ApplicationContext -> UIApplicationContext -> WebApplicationContext In the Struts galaxy, Struts-layout implements themes, but the whole library becomes quickly a nightmare as it uses extensively HTML generation by JSP Tags and blocks in a poor Html/Css technology. JBoss has also themes in his Nukes implementation. But here also bunches of HTML are hard-coded. [RJ] I think themes are a very promising area for Spring. I spend all day in messaging middleware (although I have a little web consulting coming up), but sure could have used this when I was at FT.com. Juergen, can you decide on whether this makes 0.9? I think it's definitely good for 1.0, but I don't want to delay 0.9 and it's basically a backward-compatible enhancement. Regards, Rod |
|
From: JP P. <jp....@ti...> - 2003-06-16 20:52:56
|
Hi Rod, Juergen, I have committed in the theme branch a new version having no more modification outer the web package. This is true with an exception: the refresh method from AbstractApplicationContext calls a protected afterRefresh method which by default does nothing. The most war straightforward. Only the ThemeSource could not be directly generically implemented. To avoid the core code, I created a ConcreteThemeSource. The WebApplicationContext classes include a such object and are delegating to him for the theme related requests. They redefine also the new method afterRefresh to include the theme refresh. A better idea will always be appreciated. As soon as we can be OK for an implementation, I will go on javadoc. I have some time this week as I am in holidays at home. But next week, I go for effective holidays. =20 In the Struts galaxy, Struts-layout implements themes, but the whole library becomes quickly a nightmare as it uses extensively HTML generation by JSP Tags and blocks in a poor Html/Css technology. JBoss has also themes in his Nukes implementation. But here also bunches of HTML are hard-coded.=20 Jean-Pierre -----Message d'origine----- De=A0: Rod Johnson [mailto:rod...@in...]=20 Envoy=E9=A0: lundi 16 juin 2003 21:17 =C0=A0: j=FCrgen h=F6ller [werk3AT]; JP Pawlak; spr...@li... Objet=A0: Re: [Springframework-developer] themes >I've just reviewed the changes in the theme branch. I do consider themes a useful addition, AFAIK no other web framework does support that currently. >Thanks for the idea and the prototype, JP! +1. It is good functionality. > I'm not sure if the generic non-web >ApplicationContext should know about ThemeSources at all. +1 >We should probably move themes support into the web package, abandoning the tight coupling to the ApplicationContext (and its nesting). +1 >Whether we'll include in our upcoming release is mainly a matter of timing: What's our deadline? 26.6., one day before the TheServerSide Symposium? ;-) If possible, I don't want to force JP to keep his locally modified state unnecessarily long, so I'm keen on a prompt solution. I would prefer 25th (I fly out on 25th). Regards, Juergen -----Original Message----- From: Rod Johnson [mailto:rod...@in...] Sent: Saturday, June 14, 2003 12:14 PM To: JP Pawlak; spr...@li... Subject: Re: [Springframework-developer] themes JP, This sounds like it could be useful. I don't have time to look at the code changes in detail right now. Juergen, what do you think? I do think that this change is probably best left till after the 0.8 (or 0.9?) release. As it appears to be backward compatible, we can add it later. However, if Juergen thinks it's worth including in our imminent release, I'm open to that. I've just checked out your pagedlist demo (through the GUI and the code). Very impressive: a good demo for Spring! Regards, Rod ----- Original Message ----- From: "JP Pawlak" <jp....@ti...> To: <spr...@li...> Sent: Saturday, June 14, 2003 2:47 AM Subject: [Springframework-developer] themes > Hi Everybody, > > As I have the need for using themes, I made the job. > But I don't know about your feeling on this. As many central files had > to be touched, despite of the fact than no test was broken and a "real" > test run well, I committed it in a new branch "theme" for now. > > The javadoc and the test suite are to be made. I'm waiting on reactions > to know if I can make the change in the main repository and finish the > doc and testsuite. > > For users that will not handle themes nothing new is required in the > configuration. This implementation is mainly a map (themes) of new > messages sources and the user is able to choose the theme to use for > display. Changing the theme is close to the locale handling and using a > theme is close to the message source handling, but depending on the > chose theme. Accessing to the themes messages is done via a new tag > "theme" which runs like the "message" tag. For be able to change theme, > only a ThemeResolver bean (provided) has to be added (cookies or > session). > > What is preferably to put in theme's resources instead of the standard > message source? > Obviously, stylesheets and images paths which can vary both on locale > and on theme. > > I have changed the pagedlist demo to demonstrate also the theme > handling. > As I have some trouble to access on logged ftp at the official site, the > demo is visible at http://tech.jppawlak.info/spring/samples/pagedlist/ > The war file (renamed as zip) with sources is available at > > The modified spring library is on the repository under "theme" branch. > > The user can toggle between "theme" and "metal" themes. > Note: a little bug with JSTL handling makes some links don't work as > long as the session-id is added on the url. For testing, the best is to > change locale first. > I will fix this starting next week. > > For each theme, the css file is defined in the no-localized file and the > images in localized since they depend on locale. > > The modified and added (with +) files are: > context/ApplicationContext > + context/NestingThemeSource > + context/ThemeSource > context/support/AbstractApplicationContext > + context/support/ResourceBundleThemeSource > web/servlet/DispatcherServlet > + web/servlet/ThemeResolver > web/servlet/support/RequestContextUtils > + web/servlet/theme/CookieThemeResolver > + web/servlet/theme/FixedThemeResolver > + web/servlet/theme/SessionThemeResolver > web/tags/i21.tld > web/tags/TagInWebApplicationContext > + web/tags/ThemeTag > > Regards, > Jean-Pierre > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: eBay > Great deals on office technology -- on eBay now! Click here: > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Rod J. <rod...@in...> - 2003-06-16 19:20:55
|
>I've just reviewed the changes in the theme branch. I do consider themes a useful addition, AFAIK no other web framework does support that currently. >Thanks for the idea and the prototype, JP! +1. It is good functionality. > I'm not sure if the generic non-web >ApplicationContext should know about ThemeSources at all. +1 >We should probably move themes support into the web package, abandoning the tight coupling to the ApplicationContext (and its nesting). +1 >Whether we'll include in our upcoming release is mainly a matter of timing: What's our deadline? 26.6., one day before the TheServerSide Symposium? ;-) If possible, I don't want to force JP to keep his locally modified state unnecessarily long, so I'm keen on a prompt solution. I would prefer 25th (I fly out on 25th). Regards, Juergen -----Original Message----- From: Rod Johnson [mailto:rod...@in...] Sent: Saturday, June 14, 2003 12:14 PM To: JP Pawlak; spr...@li... Subject: Re: [Springframework-developer] themes JP, This sounds like it could be useful. I don't have time to look at the code changes in detail right now. Juergen, what do you think? I do think that this change is probably best left till after the 0.8 (or 0.9?) release. As it appears to be backward compatible, we can add it later. However, if Juergen thinks it's worth including in our imminent release, I'm open to that. I've just checked out your pagedlist demo (through the GUI and the code). Very impressive: a good demo for Spring! Regards, Rod ----- Original Message ----- From: "JP Pawlak" <jp....@ti...> To: <spr...@li...> Sent: Saturday, June 14, 2003 2:47 AM Subject: [Springframework-developer] themes > Hi Everybody, > > As I have the need for using themes, I made the job. > But I don't know about your feeling on this. As many central files had > to be touched, despite of the fact than no test was broken and a "real" > test run well, I committed it in a new branch "theme" for now. > > The javadoc and the test suite are to be made. I'm waiting on reactions > to know if I can make the change in the main repository and finish the > doc and testsuite. > > For users that will not handle themes nothing new is required in the > configuration. This implementation is mainly a map (themes) of new > messages sources and the user is able to choose the theme to use for > display. Changing the theme is close to the locale handling and using a > theme is close to the message source handling, but depending on the > chose theme. Accessing to the themes messages is done via a new tag > "theme" which runs like the "message" tag. For be able to change theme, > only a ThemeResolver bean (provided) has to be added (cookies or > session). > > What is preferably to put in theme's resources instead of the standard > message source? > Obviously, stylesheets and images paths which can vary both on locale > and on theme. > > I have changed the pagedlist demo to demonstrate also the theme > handling. > As I have some trouble to access on logged ftp at the official site, the > demo is visible at http://tech.jppawlak.info/spring/samples/pagedlist/ > The war file (renamed as zip) with sources is available at > > The modified spring library is on the repository under "theme" branch. > > The user can toggle between "theme" and "metal" themes. > Note: a little bug with JSTL handling makes some links don't work as > long as the session-id is added on the url. For testing, the best is to > change locale first. > I will fix this starting next week. > > For each theme, the css file is defined in the no-localized file and the > images in localized since they depend on locale. > > The modified and added (with +) files are: > context/ApplicationContext > + context/NestingThemeSource > + context/ThemeSource > context/support/AbstractApplicationContext > + context/support/ResourceBundleThemeSource > web/servlet/DispatcherServlet > + web/servlet/ThemeResolver > web/servlet/support/RequestContextUtils > + web/servlet/theme/CookieThemeResolver > + web/servlet/theme/FixedThemeResolver > + web/servlet/theme/SessionThemeResolver > web/tags/i21.tld > web/tags/TagInWebApplicationContext > + web/tags/ThemeTag > > Regards, > Jean-Pierre > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: eBay > Great deals on office technology -- on eBay now! Click here: > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <jue...@we...> - 2003-06-16 18:44:03
|
Hi JP, Rod, I've just reviewed the changes in the theme branch. I do consider themes = a useful addition, AFAIK no other web framework does support that = currently. Thanks for the idea and the prototype, JP! Unfortunately, I'm not too happy with the current implementation. It's a = bit too intrusive for my taste. For example, I'm not sure if the generic = non-web ApplicationContext should know about ThemeSources at all. We = should probably move themes support into the web package, abandoning the = tight coupling to the ApplicationContext (and its nesting). At the = moment, I'm just not sure how to integrate the ThemeSource there. I'm gonna think about the issue till tomorrow, maybe I'll make up my = mind :-) I'd appreciate any ideas on less intrusive modelling = alternatives... Whether we'll include in our upcoming release is mainly a matter of = timing: What's our deadline? 26.6., one day before the TheServerSide = Symposium? ;-) If possible, I don't want to force JP to keep his locally = modified state unnecessarily long, so I'm keen on a prompt solution. Regards, Juergen -----Original Message----- From: Rod Johnson [mailto:rod...@in...] Sent: Saturday, June 14, 2003 12:14 PM To: JP Pawlak; spr...@li... Subject: Re: [Springframework-developer] themes JP, This sounds like it could be useful. I don't have time to look at the = code changes in detail right now. Juergen, what do you think? I do think that this change is probably best left till after the 0.8 (or 0.9?) release. As it appears to be backward compatible, we can add it = later. However, if Juergen thinks it's worth including in our imminent release, = I'm open to that. I've just checked out your pagedlist demo (through the GUI and the = code). Very impressive: a good demo for Spring! Regards, Rod ----- Original Message ----- From: "JP Pawlak" <jp....@ti...> To: <spr...@li...> Sent: Saturday, June 14, 2003 2:47 AM Subject: [Springframework-developer] themes > Hi Everybody, > > As I have the need for using themes, I made the job. > But I don't know about your feeling on this. As many central files had > to be touched, despite of the fact than no test was broken and a = "real" > test run well, I committed it in a new branch "theme" for now. > > The javadoc and the test suite are to be made. I'm waiting on = reactions > to know if I can make the change in the main repository and finish the > doc and testsuite. > > For users that will not handle themes nothing new is required in the > configuration. This implementation is mainly a map (themes) of new > messages sources and the user is able to choose the theme to use for > display. Changing the theme is close to the locale handling and using = a > theme is close to the message source handling, but depending on the > chose theme. Accessing to the themes messages is done via a new tag > "theme" which runs like the "message" tag. For be able to change = theme, > only a ThemeResolver bean (provided) has to be added (cookies or > session). > > What is preferably to put in theme's resources instead of the standard > message source? > Obviously, stylesheets and images paths which can vary both on locale > and on theme. > > I have changed the pagedlist demo to demonstrate also the theme > handling. > As I have some trouble to access on logged ftp at the official site, = the > demo is visible at http://tech.jppawlak.info/spring/samples/pagedlist/ > The war file (renamed as zip) with sources is available at > > The modified spring library is on the repository under "theme" branch. > > The user can toggle between "theme" and "metal" themes. > Note: a little bug with JSTL handling makes some links don't work as > long as the session-id is added on the url. For testing, the best is = to > change locale first. > I will fix this starting next week. > > For each theme, the css file is defined in the no-localized file and = the > images in localized since they depend on locale. > > The modified and added (with +) files are: > context/ApplicationContext > + context/NestingThemeSource > + context/ThemeSource > context/support/AbstractApplicationContext > + context/support/ResourceBundleThemeSource > web/servlet/DispatcherServlet > + web/servlet/ThemeResolver > web/servlet/support/RequestContextUtils > + web/servlet/theme/CookieThemeResolver > + web/servlet/theme/FixedThemeResolver > + web/servlet/theme/SessionThemeResolver > web/tags/i21.tld > web/tags/TagInWebApplicationContext > + web/tags/ThemeTag > > Regards, > Jean-Pierre > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: eBay > Great deals on office technology -- on eBay now! Click here: > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: JP P. <jp....@ti...> - 2003-06-14 17:50:48
|
Minor enhancements were made. The second page follows now the theme and has a back button. The session-id issue was only on my development PC, they are fixed for links out of the form, but not for the form itself (JSTL <c:url> adds a jsessionid prefixed with a semicolon???). On the server, it works. Jean-Pierre |
|
From: Rod J. <rod...@in...> - 2003-06-14 15:03:51
|
Guys, It's probably a time for a beauty parade of logos. Can we get them on a server somewhere so we can see them all in one place, and maybe run them past colleagues? I guess we could even use the Wiki to centralize things, although it's not really what Wikis are for. Regards, Rod |
|
From: Rod J. <rod...@in...> - 2003-06-14 10:15:46
|
JP, This sounds like it could be useful. I don't have time to look at the code changes in detail right now. Juergen, what do you think? I do think that this change is probably best left till after the 0.8 (or 0.9?) release. As it appears to be backward compatible, we can add it later. However, if Juergen thinks it's worth including in our imminent release, I'm open to that. I've just checked out your pagedlist demo (through the GUI and the code). Very impressive: a good demo for Spring! Regards, Rod ----- Original Message ----- From: "JP Pawlak" <jp....@ti...> To: <spr...@li...> Sent: Saturday, June 14, 2003 2:47 AM Subject: [Springframework-developer] themes > Hi Everybody, > > As I have the need for using themes, I made the job. > But I don't know about your feeling on this. As many central files had > to be touched, despite of the fact than no test was broken and a "real" > test run well, I committed it in a new branch "theme" for now. > > The javadoc and the test suite are to be made. I'm waiting on reactions > to know if I can make the change in the main repository and finish the > doc and testsuite. > > For users that will not handle themes nothing new is required in the > configuration. This implementation is mainly a map (themes) of new > messages sources and the user is able to choose the theme to use for > display. Changing the theme is close to the locale handling and using a > theme is close to the message source handling, but depending on the > chose theme. Accessing to the themes messages is done via a new tag > "theme" which runs like the "message" tag. For be able to change theme, > only a ThemeResolver bean (provided) has to be added (cookies or > session). > > What is preferably to put in theme's resources instead of the standard > message source? > Obviously, stylesheets and images paths which can vary both on locale > and on theme. > > I have changed the pagedlist demo to demonstrate also the theme > handling. > As I have some trouble to access on logged ftp at the official site, the > demo is visible at http://tech.jppawlak.info/spring/samples/pagedlist/ > The war file (renamed as zip) with sources is available at > > The modified spring library is on the repository under "theme" branch. > > The user can toggle between "theme" and "metal" themes. > Note: a little bug with JSTL handling makes some links don't work as > long as the session-id is added on the url. For testing, the best is to > change locale first. > I will fix this starting next week. > > For each theme, the css file is defined in the no-localized file and the > images in localized since they depend on locale. > > The modified and added (with +) files are: > context/ApplicationContext > + context/NestingThemeSource > + context/ThemeSource > context/support/AbstractApplicationContext > + context/support/ResourceBundleThemeSource > web/servlet/DispatcherServlet > + web/servlet/ThemeResolver > web/servlet/support/RequestContextUtils > + web/servlet/theme/CookieThemeResolver > + web/servlet/theme/FixedThemeResolver > + web/servlet/theme/SessionThemeResolver > web/tags/i21.tld > web/tags/TagInWebApplicationContext > + web/tags/ThemeTag > > Regards, > Jean-Pierre > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: eBay > Great deals on office technology -- on eBay now! Click here: > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: JP P. <jp....@ti...> - 2003-06-14 01:47:33
|
Hi Everybody, As I have the need for using themes, I made the job. But I don't know about your feeling on this. As many central files had to be touched, despite of the fact than no test was broken and a "real" test run well, I committed it in a new branch "theme" for now. The javadoc and the test suite are to be made. I'm waiting on reactions to know if I can make the change in the main repository and finish the doc and testsuite. For users that will not handle themes nothing new is required in the configuration. This implementation is mainly a map (themes) of new messages sources and the user is able to choose the theme to use for display. Changing the theme is close to the locale handling and using a theme is close to the message source handling, but depending on the chose theme. Accessing to the themes messages is done via a new tag "theme" which runs like the "message" tag. For be able to change theme, only a ThemeResolver bean (provided) has to be added (cookies or session). What is preferably to put in theme's resources instead of the standard message source? Obviously, stylesheets and images paths which can vary both on locale and on theme. I have changed the pagedlist demo to demonstrate also the theme handling. As I have some trouble to access on logged ftp at the official site, the demo is visible at http://tech.jppawlak.info/spring/samples/pagedlist/ The war file (renamed as zip) with sources is available at http://tech.jppawlak.info/spring/pagedlist.zip The modified spring library is on the repository under "theme" branch. The user can toggle between "theme" and "metal" themes. Note: a little bug with JSTL handling makes some links don't work as long as the session-id is added on the url. For testing, the best is to change locale first. I will fix this starting next week. For each theme, the css file is defined in the no-localized file and the images in localized since they depend on locale. The modified and added (with +) files are: context/ApplicationContext + context/NestingThemeSource + context/ThemeSource context/support/AbstractApplicationContext + context/support/ResourceBundleThemeSource web/servlet/DispatcherServlet + web/servlet/ThemeResolver web/servlet/support/RequestContextUtils + web/servlet/theme/CookieThemeResolver + web/servlet/theme/FixedThemeResolver + web/servlet/theme/SessionThemeResolver web/tags/i21.tld web/tags/TagInWebApplicationContext + web/tags/ThemeTag Regards, Jean-Pierre |
|
From: <jue...@we...> - 2003-06-13 17:13:11
|
RG9uZSBhbmQgY29tbWl0dGVkIDotKQ0KDQoiaW50ZXJmYWNlTmFtZXMiIGlzIG5vdyBhIFN0cmlu ZyBhcnJheSwgYWNjZXB0aW5nIGJvdGggY29tbWEtc2VwYXJhdGVkIHN0cmluZ3MgKGF1dG9tYXRp Y2FsbHkgdmlhIFN0cmluZ0FycmF5UHJvcGVydHlFZGl0b3IpIGFuZCA8bGlzdD4gZGVmaW5pdGlv bnMuIEdsb2JhbCBpbnRlcmNlcHRvcnMgYXJlIHJldHJpZXZlZCB2aWEgYSAieHh4KiIgcGF0dGVy biwgYXMgcHJvcG9zZWQsIHJlZ2FyZGluZyB0aGVpciBvcmRlciB2YWx1ZXMgaWYgaW1wbGVtZW50 aW5nIE9yZGVyZWQuDQoNCkp1ZXJnZW4NCg0KDQotLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0K RnJvbTogcm9kLmpvaG5zb25AaW50ZXJmYWNlMjEuY29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BJbnRlcmNlcHRvci9Qb2ludGN1dCANCihyZWZzLCBvbmx5IGFw cHJvcHJpYXRlIGZvciBzaW5nbGV0b24gaW50ZXJjZXB0b3JzKSwgU3RyaW5nIA0KKG5hbWUgZW5h YmxpbmcgbG9va3VwIHdoZW4gY3JlYXRpbmcgYW4gaW5zdGFuY2UpIGFuZCByZWYgDQoodGFyZ2V0 KS4gQnV0IHRoZSBTdHJpbmdbXSBzb2x1dGlvbiBpcyBzaW1wbGVyIGFuZCBJIHRoaW5rIHdlIA0K c2hvdWxkIGp1c3QgZ28gZm9yIHRoYXQgbm93Lg0KDQpSZWdhcmRzLA0KUm9kDQo= |
|
From: <rod...@in...> - 2003-06-13 15:45:53
|
<juergen> In the course of my interceptor tests, I've noted that the AOP ProxyFactoryBean still takes comma-separated interceptor names for building the chain. Couldn't we change that to proper refs? The only issue I see is that "*" is also supported, for applying all "global" interceptors. But we should be able to mix refs and values in lists anyway, shouldn't we? </juergen> They actually need to be Strings. I know I implied otherwise at one point, but the ProxyFactoryBean will always depend on the BeanFactory because if an AOP-enabled object is a prototype it needs to create an independent interceptor chain each time it creates an instance. If any of the interceptors is also a proxy, a new instance will need to be created. So Strings must remain, but I think we can get rid of the CSV. The current XmlBeanFactory should accept a String[], with the normal <list> syntax (conversion is automatic in AbstractBeanFactory). No refs will be involved. I did mean to do this, but I doubt I'll have time before we release. String [] won't work yet in the properties parsing in ListableBeanFactoryImpl but I'm planning to fix that before 1.0. <juergen> Regarding global interceptors: Currently, all interceptor definitions whose name starts with "g_" get applied on "*". This is a bit strange, as "g_" could effectively mean global objects of any type. I'd suggest to introduce a "xxx*" syntax instead of "*", so that one can specify any name prefix for definitions to apply. Obviously, the current pattern would be achieved by "g_*" then. </juergen> Nice solution. Definitely an improvement. <juergen> So ProxyFactoryBean's strategy could be as follows: Take a List of interceptors instead of a comma-separated String of names, and treat everything except String elements as interceptor or target object. A String element would mean a global interceptor pattern like "global*". As a target object would never be a String anyway, this shouldn't cause any restricitions. Is there a better solution for the global stuff? </juergen> We could maybe have a mixed-type list of Interceptor/Pointcut (refs, only appropriate for singleton interceptors), String (name enabling lookup when creating an instance) and ref (target). But the String[] solution is simpler and I think we should just go for that now. Regards, Rod |
|
From: Kopylenko, D. <dko...@ac...> - 2003-06-13 14:50:57
|
Ken,
You would need to use newly introduced <ref external> attribute for =
external
references instead of <ref bean> for the references in the same file.
Regards,
Dmitriy
-----Original Message-----
From: Ken Krebs [mailto:kk...@kk...]=20
Sent: Friday, June 13, 2003 10:38 AM
To: "j=FCrgen h=F6ller [werk3AT]"
Cc: 'spring-dev-list'
Subject: [Springframework-developer] bean ref problem
Juergen,
Having just recompiled Spring, I have a new problem that wasn't there=20
before the renaming of ControllerServlet to DispatcherServlet.
In my applicationContext.xml, I define 4 beans representing the data=20
provider ("dataSource", "incrementer", and "dao") and the main business =
object, "clinic".
Several of my form beans defined in petclinic-servlet.xml reference the =
"clinic" bean. Now, on startup, I get a SAXParseException because the=20
"clinic" bean cannot be found. Apparently I need to do something extra=20
now to get "clinic" to be recognized. Before the recent changes, this=20
was not a problem. If I move all 4 beans to petclinic-servlet.xml, it=20
works fine but I really don't want to do this. The log output follows:
=20
2003-06-13 09:21:13,092 INFO =
[com.interface21.web.context.ContextLoader]=20
- <Loading root WebApplicationContext: using context class=20
'com.interface21.web.context.support.XmlWebApplicationContext'>
2003-06-13 09:21:13,102 INFO=20
[com.interface21.web.context.support.XmlWebApplicationContext] - <Using =
config location '/WEB-INF/applicationContext.xml'>
2003-06-13 09:21:13,152 INFO=20
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Loading=20
XmlBeanFactory from InputStream [java.io.ByteArrayInputStream@110769b]>
2003-06-13 09:21:13,342 INFO=20
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Cached shared=20
instance of Singleton bean 'clinicDAO'>
2003-06-13 09:21:13,392 INFO=20
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo=20
for class class petclinic.dao.ClinicJdbcDAO>
2003-06-13 09:21:13,422 INFO=20
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Cached shared=20
instance of Singleton bean 'dataSource'>
2003-06-13 09:21:13,422 INFO=20
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo=20
for class class com.interface21.jndi.JndiObjectFactoryBean>
2003-06-13 09:21:13,532 INFO [petclinic.dao.ClinicJdbcDAO$AllVetsQuery] =
- <Compiled OK>
2003-06-13 09:21:13,532 INFO [petclinic.dao.ClinicJdbcDAO$TypesQuery] - =
<Compiled OK>
2003-06-13 09:21:13,532 INFO=20
[petclinic.dao.ClinicJdbcDAO$SpecialtiesQuery] - <Compiled OK> =
2003-06-13
09:21:13,542 INFO=20
[petclinic.dao.ClinicJdbcDAO$OwnersByNameQuery] - <Compiled OK> =
2003-06-13
09:21:13,542 INFO [petclinic.dao.ClinicJdbcDAO$OwnerQuery] -=20
<Compiled OK>
2003-06-13 09:21:13,542 INFO=20
[petclinic.dao.ClinicJdbcDAO$PetsByOwnerQuery] - <Compiled OK> =
2003-06-13
09:21:13,542 INFO [petclinic.dao.ClinicJdbcDAO$VisitsQuery] -=20
<Compiled OK>
2003-06-13 09:21:13,542 INFO=20
[petclinic.dao.ClinicJdbcDAO$VetSpecialtiesQuery] - <Compiled OK> =
2003-06-13
09:21:13,552 INFO [petclinic.dao.ClinicJdbcDAO$OwnerInsert] -=20
<Compiled OK>
2003-06-13 09:21:13,552 INFO [petclinic.dao.ClinicJdbcDAO$PetInsert] -=20
<Compiled OK>
2003-06-13 09:21:13,552 INFO [petclinic.dao.ClinicJdbcDAO$VisitInsert] =
-=20
<Compiled OK>
2003-06-13 09:21:13,552 INFO [petclinic.dao.ClinicJdbcDAO$OwnerUpdate] =
-=20
<Compiled OK>
2003-06-13 09:21:13,552 INFO=20
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Cached shared=20
instance of Singleton bean 'messageSource'>
2003-06-13 09:21:13,552 INFO=20
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo=20
for class class =
com.interface21.context.support.ResourceBundleMessageSource>
2003-06-13 09:21:13,572 INFO=20
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Cached shared=20
instance of Singleton bean 'clinic'>
2003-06-13 09:21:13,572 INFO=20
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo=20
for class class petclinic.ClinicImpl>
2003-06-13 09:21:13,613 INFO [com.interface21.jdbc.core.JdbcTemplate] - =
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT id,first_name,last_name FROM vets ORDER BY=20
last_name,first_name}: params=3D{}]>
2003-06-13 09:21:13,643 INFO [com.interface21.jdbc.core.JdbcTemplate] - =
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT id,name FROM specialties}: params=3D{}]>
2003-06-13 09:21:13,643 INFO [com.interface21.jdbc.core.JdbcTemplate] - =
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT specialty_id FROM vet_specialties WHERE vet_id=3D?}: =
params=3D{1}]>
2003-06-13 09:21:13,643 INFO [com.interface21.jdbc.core.JdbcTemplate] - =
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT specialty_id FROM vet_specialties WHERE vet_id=3D?}: =
params=3D{3}]>
2003-06-13 09:21:13,653 INFO [com.interface21.jdbc.core.JdbcTemplate] - =
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT specialty_id FROM vet_specialties WHERE vet_id=3D?}: =
params=3D{6}]>
2003-06-13 09:21:13,653 INFO [com.interface21.jdbc.core.JdbcTemplate] - =
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT specialty_id FROM vet_specialties WHERE vet_id=3D?}: =
params=3D{2}]>
2003-06-13 09:21:13,653 INFO [com.interface21.jdbc.core.JdbcTemplate] - =
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT specialty_id FROM vet_specialties WHERE vet_id=3D?}: =
params=3D{4}]>
2003-06-13 09:21:13,653 INFO [com.interface21.jdbc.core.JdbcTemplate] - =
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT specialty_id FROM vet_specialties WHERE vet_id=3D?}: =
params=3D{5}]>
2003-06-13 09:21:13,663 INFO [com.interface21.jdbc.core.JdbcTemplate] - =
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT id,name FROM types ORDER BY name}: params=3D{}]> =
2003-06-13
09:21:13,663 INFO=20
[com.interface21.web.context.support.XmlWebApplicationContext] -=20
<BeanFactory for application context is [class=20
com.interface21.beans.factory.xml.XmlBeanFactory: defined beans=20
[clinicDAO,dataSource,messageSource,clinic,incrementer]]>
2003-06-13 09:21:13,663 INFO=20
[com.interface21.web.context.support.XmlWebApplicationContext] - <5=20
beans defined in ApplicationContext: Root WebApplicationContext> =
2003-06-13
09:21:13,663 INFO=20
[com.interface21.web.context.support.XmlWebApplicationContext] - <No=20
options bean ("contextOptions") found: using default> 2003-06-13
09:21:13,673 INFO=20
[com.interface21.web.context.support.XmlWebApplicationContext] -=20
<Refreshing listeners>
2003-06-13 09:21:13,673 INFO=20
[com.interface21.web.context.support.XmlWebApplicationContext] -=20
<Configuring singleton beans in context>
2003-06-13 09:21:13,673 INFO=20
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo=20
for class class =
com.interface21.jdbc.core.support.HsqlMaxValueIncrementer>
2003-06-13 09:21:13,703 INFO=20
[com.interface21.web.context.support.WebApplicationContextUtils] -=20
<Configuring config objects>
2003-06-13 09:21:13,703 INFO=20
[com.interface21.web.context.support.WebApplicationContextUtils] -=20
<Loader initialized on server name Apache Tomcat/4.1.18;=20
WebApplicationContext object is available in ServletContext with name=20
'interface com.interface21.web.context.WebApplicationContext.ROOT'>
2003-06-13 09:21:13,733 INFO=20
[com.interface21.web.servlet.DispatcherServlet] - <Servlet with name=20
'petclinic' entering init...>
2003-06-13 09:21:13,743 INFO=20
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo=20
for class class com.interface21.web.servlet.DispatcherServlet>
2003-06-13 09:21:13,763 INFO=20
[com.interface21.web.servlet.DispatcherServlet] - <Framework servlet=20
'petclinic' init>
2003-06-13 09:21:13,763 INFO=20
[com.interface21.web.context.support.XmlWebApplicationContext] - <Using =
config location '/WEB-INF/petclinic-servlet.xml'>
2003-06-13 09:21:13,763 INFO=20
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Loading=20
XmlBeanFactory from InputStream [java.io.ByteArrayInputStream@1b77832]>
2003-06-13 09:21:13,773 ERROR=20
[com.interface21.beans.factory.xml.XmlBeanFactory] -=20
<org.xml.sax.SAXParseException: An element with the identifier "clinic" =
must appear in the document.>
2003-06-13 09:21:13,793 ERROR=20
[com.interface21.web.servlet.DispatcherServlet] - <Servlet with name=20
'petclinic' : initialization error>
org.xml.sax.SAXParseException: An element with the identifier "clinic"=20
must appear in the document.
at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:267)
at=20
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.jav=
a:20
1)
at =
javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
at=20
com.interface21.beans.factory.xml.XmlBeanFactory.loadBeanDefinitions(Xml=
Bean
Factory.java:198)
at=20
com.interface21.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.j=
ava:
149)
at=20
com.interface21.context.support.AbstractXmlApplicationContext.refreshBea=
nFac
tory(AbstractXmlApplicationContext.java:40)
at=20
com.interface21.context.support.AbstractApplicationContext.refresh(Abstr=
actA
pplicationContext.java:208)
at=20
com.interface21.web.context.support.XmlWebApplicationContext.setServletC=
onte
xt(XmlWebApplicationContext.java:121)
at=20
com.interface21.web.servlet.FrameworkServlet.createWebApplicationContext=
(Fra
meworkServlet.java:160)
at=20
com.interface21.web.servlet.FrameworkServlet.initServletBean(FrameworkSe=
rvle
t.java:143)
at=20
com.interface21.web.servlet.HttpServletBean.init(HttpServletBean.java:93=
)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at=20
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav=
a:93
4)
at=20
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
at=20
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j=
ava:
3420)
at=20
org.apache.catalina.core.StandardContext.start(StandardContext.java:3608=
)
at=20
org.apache.catalina.core.StandardHostDeployer.start(StandardHostDeployer=
.jav
a:458)
at =
org.apache.catalina.core.StandardHost.start(StandardHost.java:872)
at=20
org.apache.catalina.servlets.ManagerServlet.start(ManagerServlet.java:10=
14)
at=20
org.apache.catalina.servlets.HTMLManagerServlet.start(HTMLManagerServlet=
.jav
a:379)
at=20
org.apache.catalina.servlets.HTMLManagerServlet.doGet(HTMLManagerServlet=
.jav
a:149)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at=20
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica=
tion
FilterChain.java:247)
at=20
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt=
erCh
ain.java:193)
at=20
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv=
e.ja
va:260)
at=20
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i=
nvok
eNext(StandardPipeline.java:643)
at=20
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4=
80)
at =
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at=20
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv=
e.ja
va:191)
at=20
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i=
nvok
eNext(StandardPipeline.java:643)
at=20
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator=
Base
.java:550)
at=20
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i=
nvok
eNext(StandardPipeline.java:641)
at=20
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4=
80)
at =
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at=20
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241=
5)
at=20
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java=
:180
)
at=20
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i=
nvok
eNext(StandardPipeline.java:643)
at=20
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa=
lve.
java:170)
at=20
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i=
nvok
eNext(StandardPipeline.java:641)
at=20
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java=
:172
)
at=20
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i=
nvok
eNext(StandardPipeline.java:641)
at=20
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4=
80)
at =
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at=20
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.=
java
:174)
at=20
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i=
nvok
eNext(StandardPipeline.java:643)
at=20
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4=
80)
at =
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at=20
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at=20
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:43=
2)
at=20
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC=
onne
ction(Http11Protocol.java:386)
at=20
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:53=
4)
at=20
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool=
.jav
a:530)
at java.lang.Thread.run(Thread.java:536)
I have attached the xml config files. Please advise.
Regards,
Ken
|
|
From: <jue...@we...> - 2003-06-13 14:49:29
|
Hi Ken,
The solution is simple: <ref bean=3D"clinic"/> refers to a bean defined =
in the same BeanFactory, i.e. the same XML file. To reference a bean in =
a parent context, use <ref external=3D"clinic"/>. Note that the former =
gets validated by an XML parse while that latter does not. The old =
"beanRef=3Dtrue" style didn't have that distinction, it was introduced =
with the spring-beans DTD.
Thus, simply change your <ref bean=3D"clinic"/> references to <ref =
external=3D"clinic"/>, and everything should work again :-)
Regards,
Ken
-----Original Message-----
From: Ken Krebs [mailto:kk...@kk...]
Sent: Friday, June 13, 2003 4:38 PM
To: j=FCrgen h=F6ller [werk3AT]
Cc: 'spring-dev-list'
Subject: [Springframework-developer] bean ref problem
Juergen,
Having just recompiled Spring, I have a new problem that wasn't there=20
before the renaming of ControllerServlet to DispatcherServlet.
In my applicationContext.xml, I define 4 beans representing the data=20
provider ("dataSource", "incrementer", and "dao") and the main business=20
object, "clinic".
Several of my form beans defined in petclinic-servlet.xml reference the=20
"clinic" bean. Now, on startup, I get a SAXParseException because the=20
"clinic" bean cannot be found. Apparently I need to do something extra=20
now to get "clinic" to be recognized. Before the recent changes, this=20
was not a problem. If I move all 4 beans to petclinic-servlet.xml, it=20
works fine but I really don't want to do this. The log output follows:
=20
2003-06-13 09:21:13,092 INFO [com.interface21.web.context.ContextLoader] =
- <Loading root WebApplicationContext: using context class=20
'com.interface21.web.context.support.XmlWebApplicationContext'>
2003-06-13 09:21:13,102 INFO=20
[com.interface21.web.context.support.XmlWebApplicationContext] - <Using=20
config location '/WEB-INF/applicationContext.xml'>
2003-06-13 09:21:13,152 INFO=20
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Loading=20
XmlBeanFactory from InputStream [java.io.ByteArrayInputStream@110769b]>
2003-06-13 09:21:13,342 INFO=20
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Cached shared=20
instance of Singleton bean 'clinicDAO'>
2003-06-13 09:21:13,392 INFO=20
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo=20
for class class petclinic.dao.ClinicJdbcDAO>
2003-06-13 09:21:13,422 INFO=20
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Cached shared=20
instance of Singleton bean 'dataSource'>
2003-06-13 09:21:13,422 INFO=20
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo=20
for class class com.interface21.jndi.JndiObjectFactoryBean>
2003-06-13 09:21:13,532 INFO [petclinic.dao.ClinicJdbcDAO$AllVetsQuery]=20
- <Compiled OK>
2003-06-13 09:21:13,532 INFO [petclinic.dao.ClinicJdbcDAO$TypesQuery] -=20
<Compiled OK>
2003-06-13 09:21:13,532 INFO=20
[petclinic.dao.ClinicJdbcDAO$SpecialtiesQuery] - <Compiled OK>
2003-06-13 09:21:13,542 INFO=20
[petclinic.dao.ClinicJdbcDAO$OwnersByNameQuery] - <Compiled OK>
2003-06-13 09:21:13,542 INFO [petclinic.dao.ClinicJdbcDAO$OwnerQuery] -=20
<Compiled OK>
2003-06-13 09:21:13,542 INFO=20
[petclinic.dao.ClinicJdbcDAO$PetsByOwnerQuery] - <Compiled OK>
2003-06-13 09:21:13,542 INFO [petclinic.dao.ClinicJdbcDAO$VisitsQuery] - =
<Compiled OK>
2003-06-13 09:21:13,542 INFO=20
[petclinic.dao.ClinicJdbcDAO$VetSpecialtiesQuery] - <Compiled OK>
2003-06-13 09:21:13,552 INFO [petclinic.dao.ClinicJdbcDAO$OwnerInsert] - =
<Compiled OK>
2003-06-13 09:21:13,552 INFO [petclinic.dao.ClinicJdbcDAO$PetInsert] -=20
<Compiled OK>
2003-06-13 09:21:13,552 INFO [petclinic.dao.ClinicJdbcDAO$VisitInsert] - =
<Compiled OK>
2003-06-13 09:21:13,552 INFO [petclinic.dao.ClinicJdbcDAO$OwnerUpdate] - =
<Compiled OK>
2003-06-13 09:21:13,552 INFO=20
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Cached shared=20
instance of Singleton bean 'messageSource'>
2003-06-13 09:21:13,552 INFO=20
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo=20
for class class =
com.interface21.context.support.ResourceBundleMessageSource>
2003-06-13 09:21:13,572 INFO=20
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Cached shared=20
instance of Singleton bean 'clinic'>
2003-06-13 09:21:13,572 INFO=20
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo=20
for class class petclinic.ClinicImpl>
2003-06-13 09:21:13,613 INFO [com.interface21.jdbc.core.JdbcTemplate] -=20
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT id,first_name,last_name FROM vets ORDER BY=20
last_name,first_name}: params=3D{}]>
2003-06-13 09:21:13,643 INFO [com.interface21.jdbc.core.JdbcTemplate] -=20
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT id,name FROM specialties}: params=3D{}]>
2003-06-13 09:21:13,643 INFO [com.interface21.jdbc.core.JdbcTemplate] -=20
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT specialty_id FROM vet_specialties WHERE vet_id=3D?}: =
params=3D{1}]>
2003-06-13 09:21:13,643 INFO [com.interface21.jdbc.core.JdbcTemplate] -=20
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT specialty_id FROM vet_specialties WHERE vet_id=3D?}: =
params=3D{3}]>
2003-06-13 09:21:13,653 INFO [com.interface21.jdbc.core.JdbcTemplate] -=20
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT specialty_id FROM vet_specialties WHERE vet_id=3D?}: =
params=3D{6}]>
2003-06-13 09:21:13,653 INFO [com.interface21.jdbc.core.JdbcTemplate] -=20
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT specialty_id FROM vet_specialties WHERE vet_id=3D?}: =
params=3D{2}]>
2003-06-13 09:21:13,653 INFO [com.interface21.jdbc.core.JdbcTemplate] -=20
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT specialty_id FROM vet_specialties WHERE vet_id=3D?}: =
params=3D{4}]>
2003-06-13 09:21:13,653 INFO [com.interface21.jdbc.core.JdbcTemplate] -=20
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT specialty_id FROM vet_specialties WHERE vet_id=3D?}: =
params=3D{5}]>
2003-06-13 09:21:13,663 INFO [com.interface21.jdbc.core.JdbcTemplate] -=20
<Executing SQL query using PreparedStatement:=20
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:=20
sql=3D{SELECT id,name FROM types ORDER BY name}: params=3D{}]>
2003-06-13 09:21:13,663 INFO=20
[com.interface21.web.context.support.XmlWebApplicationContext] -=20
<BeanFactory for application context is [class=20
com.interface21.beans.factory.xml.XmlBeanFactory: defined beans=20
[clinicDAO,dataSource,messageSource,clinic,incrementer]]>
2003-06-13 09:21:13,663 INFO=20
[com.interface21.web.context.support.XmlWebApplicationContext] - <5=20
beans defined in ApplicationContext: Root WebApplicationContext>
2003-06-13 09:21:13,663 INFO=20
[com.interface21.web.context.support.XmlWebApplicationContext] - <No=20
options bean ("contextOptions") found: using default>
2003-06-13 09:21:13,673 INFO=20
[com.interface21.web.context.support.XmlWebApplicationContext] -=20
<Refreshing listeners>
2003-06-13 09:21:13,673 INFO=20
[com.interface21.web.context.support.XmlWebApplicationContext] -=20
<Configuring singleton beans in context>
2003-06-13 09:21:13,673 INFO=20
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo=20
for class class =
com.interface21.jdbc.core.support.HsqlMaxValueIncrementer>
2003-06-13 09:21:13,703 INFO=20
[com.interface21.web.context.support.WebApplicationContextUtils] -=20
<Configuring config objects>
2003-06-13 09:21:13,703 INFO=20
[com.interface21.web.context.support.WebApplicationContextUtils] -=20
<Loader initialized on server name Apache Tomcat/4.1.18;=20
WebApplicationContext object is available in ServletContext with name=20
'interface com.interface21.web.context.WebApplicationContext.ROOT'>
2003-06-13 09:21:13,733 INFO=20
[com.interface21.web.servlet.DispatcherServlet] - <Servlet with name=20
'petclinic' entering init...>
2003-06-13 09:21:13,743 INFO=20
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo=20
for class class com.interface21.web.servlet.DispatcherServlet>
2003-06-13 09:21:13,763 INFO=20
[com.interface21.web.servlet.DispatcherServlet] - <Framework servlet=20
'petclinic' init>
2003-06-13 09:21:13,763 INFO=20
[com.interface21.web.context.support.XmlWebApplicationContext] - <Using=20
config location '/WEB-INF/petclinic-servlet.xml'>
2003-06-13 09:21:13,763 INFO=20
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Loading=20
XmlBeanFactory from InputStream [java.io.ByteArrayInputStream@1b77832]>
2003-06-13 09:21:13,773 ERROR=20
[com.interface21.beans.factory.xml.XmlBeanFactory] -=20
<org.xml.sax.SAXParseException: An element with the identifier "clinic"=20
must appear in the document.>
2003-06-13 09:21:13,793 ERROR=20
[com.interface21.web.servlet.DispatcherServlet] - <Servlet with name=20
'petclinic' : initialization error>
org.xml.sax.SAXParseException: An element with the identifier "clinic"=20
must appear in the document.
at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:267)
at=20
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java=
:201)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
at=20
com.interface21.beans.factory.xml.XmlBeanFactory.loadBeanDefinitions(XmlB=
eanFactory.java:198)
at=20
com.interface21.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.ja=
va:149)
at=20
com.interface21.context.support.AbstractXmlApplicationContext.refreshBean=
Factory(AbstractXmlApplicationContext.java:40)
at=20
com.interface21.context.support.AbstractApplicationContext.refresh(Abstra=
ctApplicationContext.java:208)
at=20
com.interface21.web.context.support.XmlWebApplicationContext.setServletCo=
ntext(XmlWebApplicationContext.java:121)
at=20
com.interface21.web.servlet.FrameworkServlet.createWebApplicationContext(=
FrameworkServlet.java:160)
at=20
com.interface21.web.servlet.FrameworkServlet.initServletBean(FrameworkSer=
vlet.java:143)
at=20
com.interface21.web.servlet.HttpServletBean.init(HttpServletBean.java:93)=
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at=20
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java=
:934)
at=20
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
at=20
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.ja=
va:3420)
at=20
org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)=
at=20
org.apache.catalina.core.StandardHostDeployer.start(StandardHostDeployer.=
java:458)
at =
org.apache.catalina.core.StandardHost.start(StandardHost.java:872)
at=20
org.apache.catalina.servlets.ManagerServlet.start(ManagerServlet.java:101=
4)
at=20
org.apache.catalina.servlets.HTMLManagerServlet.start(HTMLManagerServlet.=
java:379)
at=20
org.apache.catalina.servlets.HTMLManagerServlet.doGet(HTMLManagerServlet.=
java:149)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at=20
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat=
ionFilterChain.java:247)
at=20
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte=
rChain.java:193)
at=20
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve=
.java:260)
at=20
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(StandardPipeline.java:643)
at=20
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:48=
0)
at =
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at=20
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve=
.java:191)
at=20
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(StandardPipeline.java:643)
at=20
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorB=
ase.java:550)
at=20
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(StandardPipeline.java:641)
at=20
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:48=
0)
at =
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at=20
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415=
)
at=20
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:=
180)
at=20
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(StandardPipeline.java:643)
at=20
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVal=
ve.java:170)
at=20
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(StandardPipeline.java:641)
at=20
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:=
172)
at=20
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(StandardPipeline.java:641)
at=20
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:48=
0)
at =
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at=20
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.j=
ava:174)
at=20
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in=
vokeNext(StandardPipeline.java:643)
at=20
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:48=
0)
at =
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at=20
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at=20
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432=
)
at=20
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processCo=
nnection(Http11Protocol.java:386)
at=20
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534=
)
at=20
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.=
java:530)
at java.lang.Thread.run(Thread.java:536)
I have attached the xml config files. Please advise.
Regards,
Ken
|
|
From: Ken K. <kk...@kk...> - 2003-06-13 14:44:26
|
Juergen,
Having just recompiled Spring, I have a new problem that wasn't there
before the renaming of ControllerServlet to DispatcherServlet.
In my applicationContext.xml, I define 4 beans representing the data
provider ("dataSource", "incrementer", and "dao") and the main business
object, "clinic".
Several of my form beans defined in petclinic-servlet.xml reference the
"clinic" bean. Now, on startup, I get a SAXParseException because the
"clinic" bean cannot be found. Apparently I need to do something extra
now to get "clinic" to be recognized. Before the recent changes, this
was not a problem. If I move all 4 beans to petclinic-servlet.xml, it
works fine but I really don't want to do this. The log output follows:
2003-06-13 09:21:13,092 INFO [com.interface21.web.context.ContextLoader]
- <Loading root WebApplicationContext: using context class
'com.interface21.web.context.support.XmlWebApplicationContext'>
2003-06-13 09:21:13,102 INFO
[com.interface21.web.context.support.XmlWebApplicationContext] - <Using
config location '/WEB-INF/applicationContext.xml'>
2003-06-13 09:21:13,152 INFO
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Loading
XmlBeanFactory from InputStream [java.io.ByteArrayInputStream@110769b]>
2003-06-13 09:21:13,342 INFO
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Cached shared
instance of Singleton bean 'clinicDAO'>
2003-06-13 09:21:13,392 INFO
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo
for class class petclinic.dao.ClinicJdbcDAO>
2003-06-13 09:21:13,422 INFO
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Cached shared
instance of Singleton bean 'dataSource'>
2003-06-13 09:21:13,422 INFO
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo
for class class com.interface21.jndi.JndiObjectFactoryBean>
2003-06-13 09:21:13,532 INFO [petclinic.dao.ClinicJdbcDAO$AllVetsQuery]
- <Compiled OK>
2003-06-13 09:21:13,532 INFO [petclinic.dao.ClinicJdbcDAO$TypesQuery] -
<Compiled OK>
2003-06-13 09:21:13,532 INFO
[petclinic.dao.ClinicJdbcDAO$SpecialtiesQuery] - <Compiled OK>
2003-06-13 09:21:13,542 INFO
[petclinic.dao.ClinicJdbcDAO$OwnersByNameQuery] - <Compiled OK>
2003-06-13 09:21:13,542 INFO [petclinic.dao.ClinicJdbcDAO$OwnerQuery] -
<Compiled OK>
2003-06-13 09:21:13,542 INFO
[petclinic.dao.ClinicJdbcDAO$PetsByOwnerQuery] - <Compiled OK>
2003-06-13 09:21:13,542 INFO [petclinic.dao.ClinicJdbcDAO$VisitsQuery] -
<Compiled OK>
2003-06-13 09:21:13,542 INFO
[petclinic.dao.ClinicJdbcDAO$VetSpecialtiesQuery] - <Compiled OK>
2003-06-13 09:21:13,552 INFO [petclinic.dao.ClinicJdbcDAO$OwnerInsert] -
<Compiled OK>
2003-06-13 09:21:13,552 INFO [petclinic.dao.ClinicJdbcDAO$PetInsert] -
<Compiled OK>
2003-06-13 09:21:13,552 INFO [petclinic.dao.ClinicJdbcDAO$VisitInsert] -
<Compiled OK>
2003-06-13 09:21:13,552 INFO [petclinic.dao.ClinicJdbcDAO$OwnerUpdate] -
<Compiled OK>
2003-06-13 09:21:13,552 INFO
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Cached shared
instance of Singleton bean 'messageSource'>
2003-06-13 09:21:13,552 INFO
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo
for class class com.interface21.context.support.ResourceBundleMessageSource>
2003-06-13 09:21:13,572 INFO
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Cached shared
instance of Singleton bean 'clinic'>
2003-06-13 09:21:13,572 INFO
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo
for class class petclinic.ClinicImpl>
2003-06-13 09:21:13,613 INFO [com.interface21.jdbc.core.JdbcTemplate] -
<Executing SQL query using PreparedStatement:
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:
sql={SELECT id,first_name,last_name FROM vets ORDER BY
last_name,first_name}: params={}]>
2003-06-13 09:21:13,643 INFO [com.interface21.jdbc.core.JdbcTemplate] -
<Executing SQL query using PreparedStatement:
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:
sql={SELECT id,name FROM specialties}: params={}]>
2003-06-13 09:21:13,643 INFO [com.interface21.jdbc.core.JdbcTemplate] -
<Executing SQL query using PreparedStatement:
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:
sql={SELECT specialty_id FROM vet_specialties WHERE vet_id=?}: params={1}]>
2003-06-13 09:21:13,643 INFO [com.interface21.jdbc.core.JdbcTemplate] -
<Executing SQL query using PreparedStatement:
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:
sql={SELECT specialty_id FROM vet_specialties WHERE vet_id=?}: params={3}]>
2003-06-13 09:21:13,653 INFO [com.interface21.jdbc.core.JdbcTemplate] -
<Executing SQL query using PreparedStatement:
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:
sql={SELECT specialty_id FROM vet_specialties WHERE vet_id=?}: params={6}]>
2003-06-13 09:21:13,653 INFO [com.interface21.jdbc.core.JdbcTemplate] -
<Executing SQL query using PreparedStatement:
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:
sql={SELECT specialty_id FROM vet_specialties WHERE vet_id=?}: params={2}]>
2003-06-13 09:21:13,653 INFO [com.interface21.jdbc.core.JdbcTemplate] -
<Executing SQL query using PreparedStatement:
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:
sql={SELECT specialty_id FROM vet_specialties WHERE vet_id=?}: params={4}]>
2003-06-13 09:21:13,653 INFO [com.interface21.jdbc.core.JdbcTemplate] -
<Executing SQL query using PreparedStatement:
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:
sql={SELECT specialty_id FROM vet_specialties WHERE vet_id=?}: params={5}]>
2003-06-13 09:21:13,663 INFO [com.interface21.jdbc.core.JdbcTemplate] -
<Executing SQL query using PreparedStatement:
[PreparedStatementCreatorFactory.PreparedStatementCreatorImpl:
sql={SELECT id,name FROM types ORDER BY name}: params={}]>
2003-06-13 09:21:13,663 INFO
[com.interface21.web.context.support.XmlWebApplicationContext] -
<BeanFactory for application context is [class
com.interface21.beans.factory.xml.XmlBeanFactory: defined beans
[clinicDAO,dataSource,messageSource,clinic,incrementer]]>
2003-06-13 09:21:13,663 INFO
[com.interface21.web.context.support.XmlWebApplicationContext] - <5
beans defined in ApplicationContext: Root WebApplicationContext>
2003-06-13 09:21:13,663 INFO
[com.interface21.web.context.support.XmlWebApplicationContext] - <No
options bean ("contextOptions") found: using default>
2003-06-13 09:21:13,673 INFO
[com.interface21.web.context.support.XmlWebApplicationContext] -
<Refreshing listeners>
2003-06-13 09:21:13,673 INFO
[com.interface21.web.context.support.XmlWebApplicationContext] -
<Configuring singleton beans in context>
2003-06-13 09:21:13,673 INFO
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo
for class class com.interface21.jdbc.core.support.HsqlMaxValueIncrementer>
2003-06-13 09:21:13,703 INFO
[com.interface21.web.context.support.WebApplicationContextUtils] -
<Configuring config objects>
2003-06-13 09:21:13,703 INFO
[com.interface21.web.context.support.WebApplicationContextUtils] -
<Loader initialized on server name Apache Tomcat/4.1.18;
WebApplicationContext object is available in ServletContext with name
'interface com.interface21.web.context.WebApplicationContext.ROOT'>
2003-06-13 09:21:13,733 INFO
[com.interface21.web.servlet.DispatcherServlet] - <Servlet with name
'petclinic' entering init...>
2003-06-13 09:21:13,743 INFO
[com.interface21.beans.CachedIntrospectionResults] - <Getting BeanInfo
for class class com.interface21.web.servlet.DispatcherServlet>
2003-06-13 09:21:13,763 INFO
[com.interface21.web.servlet.DispatcherServlet] - <Framework servlet
'petclinic' init>
2003-06-13 09:21:13,763 INFO
[com.interface21.web.context.support.XmlWebApplicationContext] - <Using
config location '/WEB-INF/petclinic-servlet.xml'>
2003-06-13 09:21:13,763 INFO
[com.interface21.beans.factory.xml.XmlBeanFactory] - <Loading
XmlBeanFactory from InputStream [java.io.ByteArrayInputStream@1b77832]>
2003-06-13 09:21:13,773 ERROR
[com.interface21.beans.factory.xml.XmlBeanFactory] -
<org.xml.sax.SAXParseException: An element with the identifier "clinic"
must appear in the document.>
2003-06-13 09:21:13,793 ERROR
[com.interface21.web.servlet.DispatcherServlet] - <Servlet with name
'petclinic' : initialization error>
org.xml.sax.SAXParseException: An element with the identifier "clinic"
must appear in the document.
at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:267)
at
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
at
com.interface21.beans.factory.xml.XmlBeanFactory.loadBeanDefinitions(XmlBeanFactory.java:198)
at
com.interface21.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:149)
at
com.interface21.context.support.AbstractXmlApplicationContext.refreshBeanFactory(AbstractXmlApplicationContext.java:40)
at
com.interface21.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:208)
at
com.interface21.web.context.support.XmlWebApplicationContext.setServletContext(XmlWebApplicationContext.java:121)
at
com.interface21.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:160)
at
com.interface21.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:143)
at
com.interface21.web.servlet.HttpServletBean.init(HttpServletBean.java:93)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:934)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
at
org.apache.catalina.core.StandardHostDeployer.start(StandardHostDeployer.java:458)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:872)
at
org.apache.catalina.servlets.ManagerServlet.start(ManagerServlet.java:1014)
at
org.apache.catalina.servlets.HTMLManagerServlet.start(HTMLManagerServlet.java:379)
at
org.apache.catalina.servlets.HTMLManagerServlet.doGet(HTMLManagerServlet.java:149)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:550)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:536)
I have attached the xml config files. Please advise.
Regards,
Ken
|
|
From: <jue...@we...> - 2003-06-13 13:58:49
|
Um9kLCBldmVyeW9uZSwNCg0KSSd2ZSBqdXN0IGNvbW1pdHRlZCBIaWJlcm5hdGVJbnRlcmNlcHRv ciBhbmQgSmRvSW50ZXJjZXB0b3IsIHRvZ2V0aGVyIHdpdGggdGhlIEFPUCBwYWNrYWdlIGNoYW5n ZXMuIFRoZSBFSkIgaW50ZXJjZXB0b3JzIGFyZSBub3cgaW4gY29tLmludGVyZmFjZTIxLmVqYi5h Y2Nlc3MsIHRoZSB0cmFuc2FjdGlvbiBpbnRlcmNlcHRvciBzdHVmZiBpbiBjb20uaW50ZXJmYWNl MjEudHJhbnNhY3Rpb24uaW50ZXJjZXB0b3IuIFRoZSBtaXNjIGludGVyY2VwdG9ycyBoYX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XBsZW1lbnRhdGlvbnMgYXJlIGluIHRoZSByZXNwZWN0aXZlIHRv b2wncyBjb20uaW50ZXJmYWNlMjEub3JtIHBhY2thZ2UsIG5vdCBpbiBzdWJwYWNrYWdlcyBvZiBj b20uaW50ZXJmYWNlMjEuZGFvIG9yIGNvbS5pbnRlcmZhY2UyMS50cmFuc2FjdGlvbi4NCiANClJl Z2FyZHMsDQpKdWVyZ2VuDQo= |
|
From: Ken K. <kk...@kk...> - 2003-06-13 06:20:18
|
The problem is solved :-) . For some reason, with HSQL, the hsqldb.jar MUST be available in the Tomcat/common/lib directory to for Tomcat to be able to load the driver class for use in a connection pool. This is not true with MYSQL. !!?? I should be posting the code for the demo for your comments, if you wish to make any, over the weekend. I will then start taking it apart to stage it and will also begin writing the accompanying tutorial text. Hopefully it will all be done by June 25. Ken |
|
From: Rod J. <rod...@in...> - 2003-06-11 21:33:01
|
I've added a mission statement page to the wiki. I think this is important. Contributions welcome...this is a starting point. Not sure whether it's better to discuss here, or for people to modify the page. Use your own judgment. Regards, Rod ____________________________________________________ Rod Johnson J2EE Consultant and Author +44 7973 409 132 rod...@in... Author of "Expert One-on-One J2EE Design and Development" (October 2002). http://www.amazon.com/exec/obidos/tg/detail/-/1861007841/ Founder, Spring Framework: http://sourceforge.net/projects/springframework |
|
From: <jue...@we...> - 2003-06-11 18:38:53
|
Hi Dmitriy,
No problem, I'll outline the basics. I assume some Hibernate and some =
Spring transaction knowledge.
1.
Register a Hibernate SessionFactory, either via LocalSessionFactoryBean =
(with an optional config "location" parameter, the default is a =
"hibernate.cfg.xml" in the classpath) or via JndiObjectFactoryBean (only =
necessary for the Hibernate JCA connector):
<bean id=3D"sessionFactory" =
class=3D"com.interface21.orm.hibernate.LocalSessionFactoryBean"/>
2.
Pass the SessionFactory reference to your data access object (assuming a =
sessionFactory property):
<bean id=3D"hibernateTest" class=3D"werk3.example.HibernateTest">
<property name=3D"sessionFactory"><ref =
bean=3D"sessionFactory"/></property>
</bean>
3.
In your data access object, use HibernateTemplate like as follows (the =
executeFind method is for a returned List, the general execute for a =
returned Object):
HibernateTemplate hibernateTemplate =3D new =
HibernateTemplate(this.sessionFactory);
List result =3D hibernateTemplate.executeFind(new HibernateCallback() {
public Object doInHibernate(Session session) throws HibernateException =
{
return session.find("from to in class werk3.example.TestObject");
}
});
A HibernateTemplate instance is threadsafe and reusable, thus it will =
typically be kept as instance of the data access object. In case of =
exceptions, HibernateTemplate will throw according (unchecked) =
DataAccessException subclasses. Therefore, a client of such a data =
access object does not need to know that the object uses Hibernate at =
all.
4.
If you want to use transactions, use Spring's transaction infrastructure =
with either JtaTransactionManager or HibernateTransactionManager. Taking =
part in Spring-managed JTA transactions just requires configuring =
Hibernate to access a transactional DataSource (in "hibernate.cfg.xml") =
- no special Hibernate setup necessary (unlike standard Hibernate), even =
for proper JVM-level caching!
HibernateTransactionManager would be registered as follows:
<bean id=3D"transactionManager" =
class=3D"com.interface21.orm.hibernate.HibernateTransactionManager">
<property name=3D"sessionFactory"><ref =
bean=3D"sessionFactory"/></property>
<!-- <property name=3D"dataSource"><ref =
bean=3D"dataSource"/></property> -->
</bean>
Transaction begins by TransactionTemplate or TransactionInterceptor then =
create a new Session with an active Hibernate transaction for the given =
SessionFactory, and bind it to the current thread. HibernateTemplate and =
any code using SessionFactoryUtils.getSession will automatically take =
part in such transactions.
The optional "dataSource" property takes a JDBC DataSource that =
HibernateTransactionManager will export a Hibernate Session's JDBC =
connection for, using the same mechanism as =
DataSourceTransactionManager. Obviously, the DataSource must be the =
same one that Hibernate uses. JdbcTemplate and any code using =
DataSourceUtils will automatically take part in such transactions, so =
this effectively allows for transactions spanning one DataSource but =
both Hibernate access and plain JDBC access.
5.
Changing or mixing data access tools is quite easy. Your data access =
object's client interface does not have to change when you switch =
between Hibernate, JDO, and plain JDBC - or mix various of them in =
distinct implementations. You just have to care for a proper transaction =
strategy, be it JTA or HibernateTransactionManager's DataSource support.
BTW, Spring's JDO support is very similarly modelled to the Hibernate =
one. There's LocalPersistenceManagerFactoryBean, JdoTemplate, =
JdoTransactionManager. Of course, JdoTemplate throws DataAccessException =
subclasses too.
A final note: I've used "Data access object" as a quite generic term. Of =
course, you don't have to separate DAOs from your business objects if =
you don't want to. In small to mid-size projects, blending business and =
data access objects may be appropriate. In the end, the most important =
thing is a clear business API, IMHO.
Hope that helps,
Juergen
-----Original Message-----
From: Kopylenko, Dmitry [mailto:dko...@ac...]
Sent: Wednesday, June 11, 2003 2:04 PM
To: j=FCrgen h=F6ller [werk3AT]
Subject: Hibernate
Hello Juergen.
Would it be much trouble for you to provide a simple usage example of
Hibernate within the Spring?
Thanks,
Dmitriy.
|
|
From: Ken K. <kk...@kk...> - 2003-06-10 21:29:05
|
Thomas, tri...@tr... wrote: >Ken, > > > >>I have been using the incrementers for Mysql and Hsql for the petclinic >>demo. The Mysql version of the incrementer was changed to use an UPDATE >>statement on the sequence. The Hsql version uses an INSERT statement as >>the Mysql version used to do. I notice that the Hsql version leaves >>extra rows in the sequence table because of this. There also is a >>different way of caching blocks of keys. I don't understand why this is >>so. Is this something that just never got changed after the Mysql >>version got reworked ??? >> >> >> > >I don't think HSQL has the feature, of bumping up the id, that I used for MySQL. > The most reliable way of retrieving new ids was actually retrieving them from a >sequence table and caching the ids. We could clean up the extra rows after we >are done however, and just leave the last one. I'll make that change today or >tomorrow. > I have pretty much finished my proposed refactoring of the incrementer class hierarchy. As I don't have commit rights, could you make your changes to the files I've done and commit them ? > > >A more generic approach would be the following: > >"select current_id from sequence_table;" >store current_id in x >"update sequence_table set current_id = current_id + 10 where current_id = x" >check update count - if it is 0 then repeat the whole process again (someone >else incremented the sequence) > >This approach does not work if you are using transactions with isolation level >serializable. If someone else increments the sequence while your transaction is >running, but before you try to increment the sequnce, then you will never be >able to retrieve the new current_id and your whole transaction will fail. > >HSQL does not support any isolation levels other than READ_UNCOMMITTED, so this >approach would work. I'll try it when I am making the change. > Thanks for the enlightenment ;=}. > >Unless we can come up with a general solution that will always work in all >databases, I would prefer to provide a few specific solutions and let anybody >that needs a different solution provide their own implementation. > I think a generalized solution that would work in most full-featured db's would be useful. > >Do you have a new download available - I would like to set up a datasource and >deploy the demo app on the website. > I'm getting close. I've got one more problem to solve (see my recent posting about this) and a few more little things to do. The demo needs to use the refactored incrementers. I should have a new petclinic available in a couple of days. If you could check it out on JBoss that would be great. Ken |
|
From: <tri...@tr...> - 2003-06-10 20:54:57
|
Ken, > I have been using the incrementers for Mysql and Hsql for the petclinic > demo. The Mysql version of the incrementer was changed to use an UPDATE > statement on the sequence. The Hsql version uses an INSERT statement as > the Mysql version used to do. I notice that the Hsql version leaves > extra rows in the sequence table because of this. There also is a > different way of caching blocks of keys. I don't understand why this is > so. Is this something that just never got changed after the Mysql > version got reworked ??? > I don't think HSQL has the feature, of bumping up the id, that I used for MySQL. The most reliable way of retrieving new ids was actually retrieving them from a sequence table and caching the ids. We could clean up the extra rows after we are done however, and just leave the last one. I'll make that change today or tomorrow. A more generic approach would be the following: "select current_id from sequence_table;" store current_id in x "update sequence_table set current_id = current_id + 10 where current_id = x" check update count - if it is 0 then repeat the whole process again (someone else incremented the sequence) This approach does not work if you are using transactions with isolation level serializable. If someone else increments the sequence while your transaction is running, but before you try to increment the sequnce, then you will never be able to retrieve the new current_id and your whole transaction will fail. HSQL does not support any isolation levels other than READ_UNCOMMITTED, so this approach would work. I'll try it when I am making the change. Unless we can come up with a general solution that will always work in all databases, I would prefer to provide a few specific solutions and let anybody that needs a different solution provide their own implementation. Do you have a new download available - I would like to set up a datasource and deploy the demo app on the website. Thomas |
|
From: Ken K. <kk...@kk...> - 2003-06-10 20:54:25
|
Help anybody,
I'm having some difficulty with getting a Tomcat 4.1.18 pooled
connection DataSource working for petclinic demo :=(.
I have set up my applicationContext.xml to support configuration of a
DataSource bean for either Mysql or Hsql. Both jdbc drivers are deployed
in /WEB-INF/lib. You will notice that there are 2 beans defined for each
database but only 1 DataSource bean is used at any given time. For each
database there is a DriverManagerDataSource version both of which work
well. For each database there is also a JndiObjectFactoryBean version. I
have defined the Jndi objects in petclinic.xml which is deployed in the
Tomcat webapps dir. The pooled Mysql version works fine. The pooled Hsql
version throws an exception when first accessed because it can't load
the driver class. I have checked the className spec, etc. again and
again and have not been able to figure out why it won't load. The
relevant log output follows:
blah,blah,blah ...
2003-06-10 13:40:12 ContextConfig[/petclinic_demo_tutorial-1.0]:
Adding path '/WEB-INF/lib/hsqldb.jar'
blah,blah,blah ...
2003-06-10 13:40:13 ContextConfig[/petclinic_demo_tutorial-1.0]: Pipline
Configuration:
2003-06-10 13:40:13 ContextConfig[/petclinic_demo_tutorial-1.0]:
org.apache.catalina.core.StandardContextValve/1.0
2003-06-10 13:40:13 ContextConfig[/petclinic_demo_tutorial-1.0]:
======================
2003-06-10 13:40:13
NamingContextListener[/Standalone/localhost/petclinic_demo_tutorial-1.0]:
Creating JNDI naming context
2003-06-10 13:40:13
NamingContextListener[/Standalone/localhost/petclinic_demo_tutorial-1.0]:
Resource parameters for jdbc/petclinicHSQL =
ResourceParams[name=jdbc/petclinicHSQL,
parameters={url=jdbc:hsqldb:hsql://localhost:9001, maxIdle=10,
maxActive=50, driverClassName=org.hsqldb.jdbcDriver, maxWait=10000,
removeAbandoned=true, username=sa,
factory=org.apache.commons.dbcp.BasicDataSourceFactory,
logAbandoned=true, removeAbandonedTimeout=60, password=}]
2003-06-10 13:40:13
NamingContextListener[/Standalone/localhost/petclinic_demo_tutorial-1.0]:
Adding resource ref jdbc/petclinicHSQL
2003-06-10 13:40:13
NamingContextListener[/Standalone/localhost/petclinic_demo_tutorial-1.0]:
ResourceRef[className=javax.sql.DataSource,factoryClassLocation=null,factoryClassName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Shareable},{type=auth,content=Container},{type=url,content=jdbc:hsqldb:hsql://localhost:9001},{type=maxIdle,content=10},{type=maxActive,content=50},{type=driverClassName,content=org.hsqldb.jdbcDriver},{type=maxWait,content=10000},{type=removeAbandoned,content=true},{type=username,content=sa},{type=factory,content=org.apache.commons.dbcp.BasicDataSourceFactory},{type=logAbandoned,content=true},{type=removeAbandonedTimeout,content=60},{type=password,content=}]
2003-06-10 13:40:13
NamingContextListener[/Standalone/localhost/petclinic_demo_tutorial-1.0]:
Resource parameters for jdbc/petclinicMYSQL =
ResourceParams[name=jdbc/petclinicMYSQL,
parameters={url=jdbc:mysql://localhost:3306/petclinic?autoReconnect=true,
maxIdle=10, maxActive=50, driverClassName=org.gjt.mm.mysql.Driver,
maxWait=10000, removeAbandoned=true, username=pc,
factory=org.apache.commons.dbcp.BasicDataSourceFactory,
logAbandoned=true, removeAbandonedTimeout=60, password=pc}]
2003-06-10 13:40:13
NamingContextListener[/Standalone/localhost/petclinic_demo_tutorial-1.0]:
Adding resource ref jdbc/petclinicMYSQL
2003-06-10 13:40:13
NamingContextListener[/Standalone/localhost/petclinic_demo_tutorial-1.0]:
ResourceRef[className=javax.sql.DataSource,factoryClassLocation=null,factoryClassName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Shareable},{type=auth,content=Container},{type=url,content=jdbc:mysql://localhost:3306/petclinic?autoReconnect=true},{type=maxIdle,content=10},{type=maxActive,content=50},{type=driverClassName,content=org.gjt.mm.mysql.Driver},{type=maxWait,content=10000},{type=removeAbandoned,content=true},{type=username,content=pc},{type=factory,content=org.apache.commons.dbcp.BasicDataSourceFactory},{type=logAbandoned,content=true},{type=removeAbandonedTimeout,content=60},{type=password,content=pc}]
2003-06-10 13:40:13
NamingContextListener[/Standalone/localhost/petclinic_demo_tutorial-1.0]:
Resource parameters for UserTransaction = null
2003-06-10 13:40:13 StandardManager[/petclinic_demo_tutorial-1.0]:
Seeding random number generator class java.security.SecureRandom
2003-06-10 13:40:13 StandardManager[/petclinic_demo_tutorial-1.0]:
Seeding of random number generator has been completed
2003-06-10 13:40:13 StandardContext[/petclinic_demo_tutorial-1.0]:
Posting standard context attributes
2003-06-10 13:40:13 StandardContext[/petclinic_demo_tutorial-1.0]:
Configuring application event listeners
2003-06-10 13:40:13 StandardContext[/petclinic_demo_tutorial-1.0]:
Configuring event listener class
'com.interface21.web.context.ContextLoaderListener'
2003-06-10 13:40:13 StandardContext[/petclinic_demo_tutorial-1.0]:
Sending application start events
2003-06-10 13:40:14 StandardContext[/petclinic_demo_tutorial-1.0]:
Exception sending context initialized event to listener instance of
class com.interface21.web.context.ContextLoaderListener
java.sql.SQLException: Cannot load JDBC driver class 'org.hsqldb.jdbcDriver'
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
at
com.interface21.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:146)
at
com.interface21.jdbc.core.JdbcTemplate.doWithResultSetFromPreparedQuery(JdbcTemplate.java:279)
at com.interface21.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:264)
at com.interface21.jdbc.object.SqlQuery.execute(SqlQuery.java:121)
at com.interface21.jdbc.object.SqlQuery.execute(SqlQuery.java:129)
at petclinic.dao.ClinicJdbcDAO.getVets(Unknown Source)
at petclinic.ClinicImpl.afterPropertiesSet(Unknown Source)
at
com.interface21.beans.factory.support.AbstractBeanFactory.callLifecycleMethodsIfNecessary(AbstractBeanFactory.java:429)
at
com.interface21.beans.factory.support.AbstractBeanFactory.createBean(AbstractBeanFactory.java:121)
at
com.interface21.beans.factory.support.AbstractBeanFactory.getSharedInstance(AbstractBeanFactory.java:167)
at
com.interface21.beans.factory.support.AbstractBeanFactory.getBeanInternal(AbstractBeanFactory.java:234)
at
com.interface21.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:215)
at
com.interface21.beans.factory.support.ListableBeanFactoryImpl.preInstantiateSingletons(ListableBeanFactoryImpl.java:224)
at
com.interface21.beans.factory.support.XmlBeanFactory.loadBeanDefinitions(XmlBeanFactory.java:225)
at
com.interface21.beans.factory.support.XmlBeanFactory.<init>(XmlBeanFactory.java:160)
at
com.interface21.context.support.AbstractXmlApplicationContext.parseDocument(AbstractXmlApplicationContext.java:87)
at
com.interface21.context.support.AbstractXmlApplicationContext.refreshBeanFactory(AbstractXmlApplicationContext.java:59)
at
com.interface21.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:208)
at
com.interface21.web.context.support.XmlWebApplicationContext.setServletContext(XmlWebApplicationContext.java:121)
at
com.interface21.web.context.ContextLoader.initContext(ContextLoader.java:56)
at
com.interface21.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:20)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3269)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3598)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
at
org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:529)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:228)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)
at org.apache.commons.digester.Digester.endElement(Digester.java:1036)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:585)
at
org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java:647)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1008)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1469)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
at org.apache.commons.digester.Digester.parse(Digester.java:1514)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:335)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:803)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:452)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:409)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
at
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:273)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245)
at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307)
2003-06-10 13:40:14 StandardContext[/petclinic_demo_tutorial-1.0]:
Context startup failed due to previous errors
The hsqldb.jar path is added as shown in the log, the Jndi objects are
created, the className is identical to that specified in the
DriverManagerDataSource version, and the named class is in the hsqldb.jar.
So why won't it load ???
I have attached the configuration files. Any help would be greatly
appreciated.
BTW, I'm nearly complete with the functionality I'm going to implement
in version 1. I will then post the code for anybody who wants to make
comments or suggestions. I will also start decomposing it into stages
and writing accompanying tutorial text. I hope to be finished before the
TSS Symposium.
Regards,
Ken Krebs
|
|
From: Ken K. <kk...@kk...> - 2003-06-10 19:59:24
|
Thomas, I have been using the incrementers for Mysql and Hsql for the petclinic demo. The Mysql version of the incrementer was changed to use an UPDATE statement on the sequence. The Hsql version uses an INSERT statement as the Mysql version used to do. I notice that the Hsql version leaves extra rows in the sequence table because of this. There also is a different way of caching blocks of keys. I don't understand why this is so. Is this something that just never got changed after the Mysql version got reworked ??? I have pretty much completed and tested (with the exception of testing on the Oracle version) most of my proposed refactoring of this class hierarchy. Should the Hsql version be changed to use a similar implementation as Mysql ??? It seems like they could both use the virtually the same code with the exception of the SQL used to get the last inserted value. Regards, Ken Krebs |