|
From: Juergen H. <ju...@in...> - 2006-04-20 19:15:54
|
Thomas, This could be a side effect of our new namespace handler for dynamic languages (the "lang:" namespace). However, I can't reproduce this: I can run all sorts of application contexts nicely without groovy.jar on my classpath, until I actually start using the Groovy support. Could you please try to track down the root cause of the NoClassDefFoundError that you experienced? Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of Thomas Risberg Sent: Thursday, April 20, 2006 1:59 PM To: spr...@li... Subject: [Springframework-developer] Groovy dependency I like Groovy and all, but I'm not sure I want to use it all the time. Running with the latest CVS code and just loading up an ApplicationContext using ClassPathXmlApplicationContext I get this exception: Exception in thread "main" java.lang.NoClassDefFoundError: org/ codehaus/groovy/control/CompilationFailedException Looks like we have introduced an unintended hard dependency on groovy.jar. Thomas ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Juergen H. <ju...@in...> - 2006-04-20 20:19:27
|
Hmm... that's odd. I explicitly played around with Groovy on and off the
classpath, and it did work here... Although the namespace handler is a
little fragile, since it does always instantiate the GroovyScriptFactory.
Rob and/or myself will have a look at the issue tomorrow. This is of course
crucial to fix for M4.
Juergen
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf Of
tho...@tr...
Sent: Thursday, April 20, 2006 9:49 PM
To: spr...@li...
Subject: Re: [Springframework-developer] Groovy dependency
Juergen,
Yes, it looks like the namespace handler being used is the
LangNamespaceHandler from the scriptiong support.
Here is the stacktrace:
INFO: Loading XML bean definitions from class path resource
[applicationContext.xml] Exception in thread "main"
java.lang.NoClassDefFoundError:
org/codehaus/groovy/control/CompilationFailedException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at
org.springframework.scripting.config.LangNamespaceHandler.class$(LangNamespa
ceHandler.java:31)
at
org.springframework.scripting.config.LangNamespaceHandler.init(LangNamespace
Handler.java:31)
at
org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.initHa
ndlerMappings(DefaultNamespaceHandlerResolver.java:119)
at
org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.<init>
(DefaultNamespaceHandlerResolver.java:84)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.createN
amespaceHandlerResolver(DefaultXmlBeanDefinitionParser.java:126)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.createH
elper(DefaultXmlBeanDefinitionParser.java:92)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registe
rBeanDefinitions(DefaultXmlBeanDefinitionParser.java:84)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDe
finitions(XmlBeanDefinitionReader.java:509)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefi
nitions(XmlBeanDefinitionReader.java:353)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefini
tions(XmlBeanDefinitionReader.java:302)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefini
tions(XmlBeanDefinitionReader.java:277)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadB
eanDefinitions(AbstractBeanDefinitionReader.java:129)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadB
eanDefinitions(AbstractBeanDefinitionReader.java:145)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadB
eanDefinitions(AbstractBeanDefinitionReader.java:171)
at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDe
finitions(AbstractXmlApplicationContext.java:116)
at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDe
finitions(AbstractXmlApplicationContext.java:82)
at
org.springframework.context.support.AbstractRefreshableApplicationContext.re
freshBeanFactory(AbstractRefreshableApplicationContext.java:89)
at
org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:279)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(Cl
assPathXmlApplicationContext.java:92)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(Cl
assPathXmlApplicationContext.java:77)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(Cl
assPathXmlApplicationContext.java:68)
at springdeveloper.TestOne.testContext(TestOne.java:18)
at springdeveloper.TestOne.main(TestOne.java:14)
I have uploaded the very simple testcase to
http://springdeveloper.com/downloads/TestContext.zip
This is all running under OS X - I can try another OS when I get home later.
Thomas
> Thomas,
>
> This could be a side effect of our new namespace handler for dynamic
> languages (the "lang:" namespace).
>
> However, I can't reproduce this: I can run all sorts of application
> contexts nicely without groovy.jar on my classpath, until I actually
> start using the Groovy support.
>
> Could you please try to track down the root cause of the
> NoClassDefFoundError that you experienced?
>
> Juergen
>
>
> -----Original Message-----
> From: spr...@li...
> [mailto:spr...@li...] On
> Behalf Of Thomas Risberg
> Sent: Thursday, April 20, 2006 1:59 PM
> To: spr...@li...
> Subject: [Springframework-developer] Groovy dependency
>
> I like Groovy and all, but I'm not sure I want to use it all the time.
>
> Running with the latest CVS code and just loading up an
> ApplicationContext using ClassPathXmlApplicationContext I get this
> exception:
>
> Exception in thread "main" java.lang.NoClassDefFoundError: org/
> codehaus/groovy/control/CompilationFailedException
>
> Looks like we have introduced an unintended hard dependency on groovy.jar.
>
> Thomas
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on
> Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=1216
> 42 _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on
> Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=1216
> 42 _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Rob H. <ro...@in...> - 2006-04-21 15:37:06
|
I refined the LangNamespaceHandler loading code so that it will only register BeanDefinitionParsers for languages that are on the classpath. Rob On 20 Apr 2006, at 21:19, Juergen Hoeller wrote: > Hmm... that's odd. I explicitly played around with Groovy on and > off the > classpath, and it did work here... Although the namespace handler is a > little fragile, since it does always instantiate the > GroovyScriptFactory. > > Rob and/or myself will have a look at the issue tomorrow. This is > of course > crucial to fix for M4. > > Juergen > > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On > Behalf Of > tho...@tr... > Sent: Thursday, April 20, 2006 9:49 PM > To: spr...@li... > Subject: Re: [Springframework-developer] Groovy dependency > > Juergen, > > Yes, it looks like the namespace handler being used is the > LangNamespaceHandler from the scriptiong support. > > Here is the stacktrace: > > INFO: Loading XML bean definitions from class path resource > [applicationContext.xml] Exception in thread "main" > java.lang.NoClassDefFoundError: > org/codehaus/groovy/control/CompilationFailedException > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:164) > at > org.springframework.scripting.config.LangNamespaceHandler.class$ > (LangNamespa > ceHandler.java:31) > at > org.springframework.scripting.config.LangNamespaceHandler.init > (LangNamespace > Handler.java:31) > at > org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver. > initHa > ndlerMappings(DefaultNamespaceHandlerResolver.java:119) > at > org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver. > <init> > (DefaultNamespaceHandlerResolver.java:84) > at > org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.c > reateN > amespaceHandlerResolver(DefaultXmlBeanDefinitionParser.java:126) > at > org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.c > reateH > elper(DefaultXmlBeanDefinitionParser.java:92) > at > org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.r > egiste > rBeanDefinitions(DefaultXmlBeanDefinitionParser.java:84) > at > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.register > BeanDe > finitions(XmlBeanDefinitionReader.java:509) > at > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBe > anDefi > nitions(XmlBeanDefinitionReader.java:353) > at > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBean > Defini > tions(XmlBeanDefinitionReader.java:302) > at > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBean > Defini > tions(XmlBeanDefinitionReader.java:277) > at > org.springframework.beans.factory.support.AbstractBeanDefinitionReader > .loadB > eanDefinitions(AbstractBeanDefinitionReader.java:129) > at > org.springframework.beans.factory.support.AbstractBeanDefinitionReader > .loadB > eanDefinitions(AbstractBeanDefinitionReader.java:145) > at > org.springframework.beans.factory.support.AbstractBeanDefinitionReader > .loadB > eanDefinitions(AbstractBeanDefinitionReader.java:171) > at > org.springframework.context.support.AbstractXmlApplicationContext.load > BeanDe > finitions(AbstractXmlApplicationContext.java:116) > at > org.springframework.context.support.AbstractXmlApplicationContext.load > BeanDe > finitions(AbstractXmlApplicationContext.java:82) > at > org.springframework.context.support.AbstractRefreshableApplicationCont > ext.re > freshBeanFactory(AbstractRefreshableApplicationContext.java:89) > at > org.springframework.context.support.AbstractApplicationContext.refresh > (Abstr > actApplicationContext.java:279) > at > org.springframework.context.support.ClassPathXmlApplicationContext.<in > it>(Cl > assPathXmlApplicationContext.java:92) > at > org.springframework.context.support.ClassPathXmlApplicationContext.<in > it>(Cl > assPathXmlApplicationContext.java:77) > at > org.springframework.context.support.ClassPathXmlApplicationContext.<in > it>(Cl > assPathXmlApplicationContext.java:68) > at springdeveloper.TestOne.testContext(TestOne.java:18) > at springdeveloper.TestOne.main(TestOne.java:14) > > I have uploaded the very simple testcase to > http://springdeveloper.com/downloads/TestContext.zip > > This is all running under OS X - I can try another OS when I get > home later. > > Thomas > > >> Thomas, >> >> This could be a side effect of our new namespace handler for dynamic >> languages (the "lang:" namespace). >> >> However, I can't reproduce this: I can run all sorts of application >> contexts nicely without groovy.jar on my classpath, until I actually >> start using the Groovy support. >> >> Could you please try to track down the root cause of the >> NoClassDefFoundError that you experienced? >> >> Juergen >> >> >> -----Original Message----- >> From: spr...@li... >> [mailto:spr...@li...] On >> Behalf Of Thomas Risberg >> Sent: Thursday, April 20, 2006 1:59 PM >> To: spr...@li... >> Subject: [Springframework-developer] Groovy dependency >> >> I like Groovy and all, but I'm not sure I want to use it all the >> time. >> >> Running with the latest CVS code and just loading up an >> ApplicationContext using ClassPathXmlApplicationContext I get this >> exception: >> >> Exception in thread "main" java.lang.NoClassDefFoundError: org/ >> codehaus/groovy/control/CompilationFailedException >> >> Looks like we have introduced an unintended hard dependency on >> groovy.jar. >> >> Thomas >> >> >> >> ------------------------------------------------------- >> Using Tomcat but need to do more? Need to support web services, >> security? >> Get stuff done quickly with pre-integrated technology to make your >> job >> easier Download IBM WebSphere Application Server v.1.0.1 based on >> Apache Geronimo >> http://sel.as-us.falkag.net/sel? >> cmd=lnk&kid=120709&bid=263057&dat=1216 >> 42 _______________________________________________ >> Springframework-developer mailing list >> Spr...@li... >> https://lists.sourceforge.net/lists/listinfo/springframework- >> developer >> >> >> >> ------------------------------------------------------- >> Using Tomcat but need to do more? Need to support web services, >> security? >> Get stuff done quickly with pre-integrated technology to make your >> job >> easier Download IBM WebSphere Application Server v.1.0.1 based on >> Apache Geronimo >> http://sel.as-us.falkag.net/sel? >> cmd=lnk&kid=120709&bid=263057&dat=1216 >> 42 _______________________________________________ >> Springframework-developer mailing list >> Spr...@li... >> https://lists.sourceforge.net/lists/listinfo/springframework- >> developer >> > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your job > easier Download IBM WebSphere Application Server v.1.0.1 based on > Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > -- Rob Harrop VP, Technology Strategy Interface21 - Spring Services from the Source http://www.springframework.com |
|
From: Eugene K. <eu...@pl...> - 2006-04-20 19:21:01
|
Juergen, Can you please tell if there is any progress on SPR-1711 and what are the chances to get it in 2.0 release? http://opensource2.atlassian.com/projects/spring/browse/SPR-1711 I saw that there are new methods for adding custom attributes to the bean info, but not sure if they has been wired up to the parser. Thanks Eugene |
|
From: Rob H. <ro...@in...> - 2006-04-21 08:19:11
|
Eugene, I added <meta> tags to the XML parser to allow you to attach metadata to BeanDefinitions and to PropertyValue definitions. From the parser you are restricted to String/String since we don't have bean wiring running at the time the parser runs. If you need something more extensive you can build your own tag set and add the metadata that way. Rob On 20 Apr 2006, at 20:20, Eugene Kuleshov wrote: > Juergen, > > Can you please tell if there is any progress on SPR-1711 and what > are the chances to get it in 2.0 release? > http://opensource2.atlassian.com/projects/spring/browse/SPR-1711 > > I saw that there are new methods for adding custom attributes to > the bean info, but not sure if they has been wired up to the parser. > > Thanks > > Eugene > > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > -- Rob Harrop VP, Technology Strategy Interface21 - Spring Services from the Source http://www.springframework.com |
|
From: Eugene K. <eu...@pl...> - 2006-04-21 21:32:58
|
Rob, This is really great! Can you please tell me since what build it had been avaialable? SF cvs is down and I can't see the history. Thanks in advance Eugene Rob Harrop wrote: > Eugene, > > I added <meta> tags to the XML parser to allow you to attach metadata to > BeanDefinitions and to PropertyValue definitions. From the parser you > are restricted to String/String since we don't have bean wiring running > at the time the parser runs. If you need something more extensive you > can build your own tag set and add the metadata that way. > > Rob > On 20 Apr 2006, at 20:20, Eugene Kuleshov wrote: > >> Juergen, >> >> Can you please tell if there is any progress on SPR-1711 and what >> are the chances to get it in 2.0 release? >> http://opensource2.atlassian.com/projects/spring/browse/SPR-1711 >> >> I saw that there are new methods for adding custom attributes to the >> bean info, but not sure if they has been wired up to the parser. >> >> Thanks >> >> Eugene |
|
From: Rob H. <ro...@in...> - 2006-04-21 21:35:08
|
Eugene, Its new, but you can get in one of the shiny new nightly snapshots: http://www.springframework.org/snaphots Rob On 21 Apr 2006, at 22:32, Eugene Kuleshov wrote: > Rob, > > This is really great! Can you please tell me since what build it > had been avaialable? SF cvs is down and I can't see the history. > > Thanks in advance > > Eugene > > > Rob Harrop wrote: >> Eugene, >> I added <meta> tags to the XML parser to allow you to attach >> metadata to BeanDefinitions and to PropertyValue definitions. From >> the parser you are restricted to String/String since we don't have >> bean wiring running at the time the parser runs. If you need >> something more extensive you can build your own tag set and add >> the metadata that way. >> Rob >> On 20 Apr 2006, at 20:20, Eugene Kuleshov wrote: >>> Juergen, >>> >>> Can you please tell if there is any progress on SPR-1711 and >>> what are the chances to get it in 2.0 release? >>> http://opensource2.atlassian.com/projects/spring/browse/SPR-1711 >>> >>> I saw that there are new methods for adding custom attributes >>> to the bean info, but not sure if they has been wired up to the >>> parser. >>> >>> Thanks >>> >>> Eugene > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > -- Rob Harrop VP, Technology Strategy Interface21 - Spring Services from the Source http://www.springframework.com |
|
From: Eugene K. <eu...@pl...> - 2006-04-22 17:05:11
|
Rob, Juergen, I noticed that it is not possible to attach metadata to the bean context itself. I've filed a request for that some time ago. See http://opensource.atlassian.com/projects/spring/browse/SPR-1646 Attributes from multiple xml files could be aggregated on given context and beans tag could be defined like this: <!ELEMENT beans ( description?, meta?, (import | alias | bean)* )> Thanks Eugene Rob Harrop wrote: > Its new, but you can get in one of the shiny new nightly snapshots: > http://www.springframework.org/snaphots > > Rob > On 21 Apr 2006, at 22:32, Eugene Kuleshov wrote: > >> Rob, >> >> This is really great! Can you please tell me since what build it had >> been avaialable? SF cvs is down and I can't see the history. >> >> Thanks in advance >> >> Eugene >> >> >> Rob Harrop wrote: >>> Eugene, >>> I added <meta> tags to the XML parser to allow you to attach metadata >>> to BeanDefinitions and to PropertyValue definitions. From the parser >>> you are restricted to String/String since we don't have bean wiring >>> running at the time the parser runs. If you need something more >>> extensive you can build your own tag set and add the metadata that way. >>> Rob |
|
From: Eugene K. <eu...@pl...> - 2006-04-25 05:14:22
|
I am also wondering if it is possible make default xml parser to
handle nested value, list, set, map and props tag (for simple/string types)?
Value element would be more convenient then value attribute e.g.
multiline CDATA.
Lists are also quite common use case. E.g. somehow made up example:
<meta key="org.javatx.auth.Role">
<list>
<value>Admin</value>
<value>Observer</value>
</list>
</meta>
So, as props. Here is an example:
<meta key="org.javatx.Transactional">
<props>
<prop key="timeout">1000</prop>
<prop key="propagation">required</prop>
<prop key="isolation">serializable</prop>
</props>
</meta>
Thanks
Eugene
Eugene Kuleshov wrote:
> Rob, Juergen,
>
> I noticed that it is not possible to attach metadata to the bean
> context itself. I've filed a request for that some time ago. See
> http://opensource.atlassian.com/projects/spring/browse/SPR-1646
>
> Attributes from multiple xml files could be aggregated on given
> context and beans tag could be defined like this:
>
> <!ELEMENT beans (
> description?,
> meta?,
> (import | alias | bean)*
> )>
>
> Thanks
>
> Eugene
>
>
> Rob Harrop wrote:
>
>> Its new, but you can get in one of the shiny new nightly snapshots:
>> http://www.springframework.org/snaphots
>>
>> Rob
>> On 21 Apr 2006, at 22:32, Eugene Kuleshov wrote:
>>
>>> Rob,
>>>
>>> This is really great! Can you please tell me since what build it
>>> had been avaialable? SF cvs is down and I can't see the history.
>>>
>>> Thanks in advance
>>>
>>> Eugene
>>>
>>>
>>> Rob Harrop wrote:
>>>> Eugene,
>>>> I added <meta> tags to the XML parser to allow you to attach
>>>> metadata to BeanDefinitions and to PropertyValue definitions. From
>>>> the parser you are restricted to String/String since we don't have
>>>> bean wiring running at the time the parser runs. If you need
>>>> something more extensive you can build your own tag set and add the
>>>> metadata that way.
>>>> Rob
|
|
From: Eugene K. <eu...@pl...> - 2006-05-27 02:57:20
|
I updated SPR-1711 [*] that is requesting support for bean metadata
and attached implementation of custom namespace handler and bean
decorators that allow to declare lists and maps of string as bean
attributes (test and examples are in the archive attached to that jira
issue).
For example:
<bean id="foo">
<meta:list name="testList">
<meta:value>value1</meta:value>
<meta:value>value2</meta:value>
</meta:list>
<meta:map name="testMap">
<meta:entry key="key1">value1</meta:entry>
<meta:entry key="key2">value2</meta:entry>
</meta:map>
</bean>
I wonder if something like this can be incorporated into Spring code?
Thanks
Eugene
[*] http://opensource.atlassian.com/projects/spring/browse/SPR-1711
Eugene Kuleshov wrote:
>
> I am also wondering if it is possible make default xml parser to
> handle nested value, list, set, map and props tag (for simple/string
> types)?
>
> Value element would be more convenient then value attribute e.g.
> multiline CDATA.
>
> Lists are also quite common use case. E.g. somehow made up example:
>
> <meta key="org.javatx.auth.Role">
> <list>
> <value>Admin</value>
> <value>Observer</value>
> </list>
> </meta>
>
> So, as props. Here is an example:
>
> <meta key="org.javatx.Transactional">
> <props>
> <prop key="timeout">1000</prop>
> <prop key="propagation">required</prop>
> <prop key="isolation">serializable</prop>
> </props>
> </meta>
>
>
> Thanks
>
> Eugene
|
|
From: <tho...@tr...> - 2006-04-20 19:49:25
|
Juergen,
Yes, it looks like the namespace handler being used is the
LangNamespaceHandler from the scriptiong support.
Here is the stacktrace:
INFO: Loading XML bean definitions from class path resource
[applicationContext.xml]
Exception in thread "main" java.lang.NoClassDefFoundError:
org/codehaus/groovy/control/CompilationFailedException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at
org.springframework.scripting.config.LangNamespaceHandler.class$(LangNamespaceHandler.java:31)
at
org.springframework.scripting.config.LangNamespaceHandler.init(LangNamespaceHandler.java:31)
at
org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.initHandlerMappings(DefaultNamespaceHandlerResolver.java:119)
at
org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.<init>(DefaultNamespaceHandlerResolver.java:84)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.createNamespaceHandlerResolver(DefaultXmlBeanDefinitionParser.java:126)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.createHelper(DefaultXmlBeanDefinitionParser.java:92)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:84)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:509)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:277)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:129)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:145)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:171)
at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:116)
at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:82)
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:279)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:68)
at springdeveloper.TestOne.testContext(TestOne.java:18)
at springdeveloper.TestOne.main(TestOne.java:14)
I have uploaded the very simple testcase to
http://springdeveloper.com/downloads/TestContext.zip
This is all running under OS X - I can try another OS when I get home later.
Thomas
> Thomas,
>
> This could be a side effect of our new namespace handler for dynamic
> languages (the "lang:" namespace).
>
> However, I can't reproduce this: I can run all sorts of application
> contexts
> nicely without groovy.jar on my classpath, until I actually start using
> the
> Groovy support.
>
> Could you please try to track down the root cause of the
> NoClassDefFoundError that you experienced?
>
> Juergen
>
>
> -----Original Message-----
> From: spr...@li...
> [mailto:spr...@li...] On Behalf
> Of
> Thomas Risberg
> Sent: Thursday, April 20, 2006 1:59 PM
> To: spr...@li...
> Subject: [Springframework-developer] Groovy dependency
>
> I like Groovy and all, but I'm not sure I want to use it all the time.
>
> Running with the latest CVS code and just loading up an ApplicationContext
> using ClassPathXmlApplicationContext I get this
> exception:
>
> Exception in thread "main" java.lang.NoClassDefFoundError: org/
> codehaus/groovy/control/CompilationFailedException
>
> Looks like we have introduced an unintended hard dependency on groovy.jar.
>
> Thomas
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
|