You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Borut Bolčina <bo...@gmail.com> on 2006/08/04 20:35:46 UTC
Error: unnamed
Hi, I returned to one of my web apps using Cayenne. I reconfigured the
project to use WTP 1.5, Maven2 + M2 Eclipse plugin and Tapestry and now I am
not being able to run the web app because of the error bellow. The web app
WEB-INF includes all 3 Cayenne files. WTP uses this location in my case
C:\Documents and
Settings\Borut\Desktop\Workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\Anniversary\WEB-INF
web.xml includes
<filter>
<filter-name>CayenneFilter</filter-name>
<filter-class>
org.objectstyle.cayenne.conf.WebApplicationContextFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>CayenneFilter</filter-name>
<servlet-name>Anniversary</servlet-name>
</filter-mapping>
I have written a post on how to configure Eclipse, Maven 2, WTP and Tapestry
here (
http://mail-archives.apache.org/mod_mbox/maven-users/200608.mbox/%3c44D0CCC4.5000402@najdi.si%3e),
if it will help someone.
I am stuck. Please advise.
DEBUG [04 avg 2006 20:14:44:765] Starting filters
DEBUG [04 avg 2006 20:14:44:765] Starting filter 'CayenneFilter'
DEBUG [04 avg 2006 20:14:44:812] canInitialize started.
DEBUG [04 avg 2006 20:14:44:812] initialize starting.
DEBUG [04 avg 2006 20:14:44:812] searching for: /WEB-INF/cayenne.xml
INFO [04 avg 2006 20:14:44:828] started configuration loading.
INFO [04 avg 2006 20:14:44:843] Error: unnamed <domain>.
ERROR [04 avg 2006 20:14:44:859] Exception starting filter CayenneFilter
org.objectstyle.cayenne.ConfigurationException: [v.1.2 July 18 2006] Error
during Configuration initialization. [v.1.2 July 18 2006] Domain 'name'
attribute must be not null.
at
org.objectstyle.cayenne.conf.Configuration.initializeSharedConfiguration(
Configuration.java:321)
at
org.objectstyle.cayenne.conf.ServletUtil.initializeSharedConfiguration(
ServletUtil.java:127)
at org.objectstyle.cayenne.conf.WebApplicationContextFilter.init(
WebApplicationContextFilter.java:142)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(
ApplicationFilterConfig.java:223)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(
ApplicationFilterConfig.java:304)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(
ApplicationFilterConfig.java:77)
at org.apache.catalina.core.StandardContext.filterStart(
StandardContext.java:3600)
at org.apache.catalina.core.StandardContext.start(StandardContext.java
:4189)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java
:442)
at org.apache.catalina.core.StandardService.start(StandardService.java
:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java
:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.objectstyle.cayenne.ConfigurationException: [v.1.2 July 18
2006] Domain 'name' attribute must be not null.
at org.objectstyle.cayenne.conf.RuntimeLoadDelegate.shouldLoadDataDomain
(RuntimeLoadDelegate.java:178)
at org.objectstyle.cayenne.conf.ConfigLoader$DomainHandler.init(
ConfigLoader.java:227)
at org.objectstyle.cayenne.conf.ConfigLoader$DomainsHandler.startElement
(ConfigLoader.java:183)
at org.gjt.xpp.sax2.Driver.parseSubTree(Driver.java:362)
at org.gjt.xpp.sax2.Driver.parse(Driver.java:310)
at org.objectstyle.cayenne.conf.ConfigLoader.loadDomains(
ConfigLoader.java:114)
at org.objectstyle.cayenne.conf.DefaultConfiguration.initialize(
DefaultConfiguration.java:197)
at
org.objectstyle.cayenne.conf.Configuration.initializeSharedConfiguration(
Configuration.java:312)
... 20 more
Re: Error: unnamed
Posted by Borut Bolčina <bo...@gmail.com>.
I cleaned up WEB-INF/lib directory and selectively copied there (manually,
not by maven plugin) only some of the previously installed jars. Cayenne
initializes ok now, but I do not know the name of the offending jar in the
classpath.
2006/8/4, Andrus Adamchik <an...@objectstyle.org>:
>
> Hmm.. unless there is another cayenne.xml copy anywhere in classpath,
> this may have something to do with XML namespace handling in the WTP
> environment. I vaguely recall similar issues reported some time ago,
> and I don't remember what the solution was (switching to default JDK
> XML parser??). If you find something (maybe run it in debugger,
> putting a breakpoint in Cayenne ConfigLoader), please share.
>
> Andrus
>
> On Aug 4, 2006, at 3:17 PM, Borut Bolčina wrote:
>
> > Here it is:
> > <?xml version="1.0" encoding="utf-8"?>
> > <domains project-version="1.1">
> > <domain name="NoviforumDomain">
> > <map name="AnniversaryMap" location="AnniversaryMap.map.xml" />
> >
> > <node name="NoviforumDomainNode"
> > datasource="NoviforumDomainNode.driver.xml"
> >
> > factory="org.objectstyle.cayenne.conf.DriverDataSourceFactory">
> > <map-ref name="AnniversaryMap" />
> > </node>
> > </domain>
> > </domains>
> >
> > 2006/8/4, Andrus Adamchik <an...@objectstyle.org>:
> >>
> >>
> >> On Aug 4, 2006, at 2:35 PM, Borut Bolčina wrote:
> >>
> >> > ERROR [04 avg 2006 20:14:44:859] Exception starting filter
> >> > CayenneFilter
> >> > org.objectstyle.cayenne.ConfigurationException: [v.1.2 July 18
> >> > 2006] Error
> >> > during Configuration initialization. [v.1.2 July 18 2006] Domain
> >> > 'name'
> >> > attribute must be not null.
> >>
> >> So how does cayenne.xml look like? Is there a name attribute for the
> >> domain:
> >>
> >> <domain name="XYZ">
> >> ...
> >>
> >> Andrus
> >>
> >>
>
>
Re: Error: unnamed
Posted by Andrus Adamchik <an...@objectstyle.org>.
Hmm.. unless there is another cayenne.xml copy anywhere in classpath,
this may have something to do with XML namespace handling in the WTP
environment. I vaguely recall similar issues reported some time ago,
and I don't remember what the solution was (switching to default JDK
XML parser??). If you find something (maybe run it in debugger,
putting a breakpoint in Cayenne ConfigLoader), please share.
Andrus
On Aug 4, 2006, at 3:17 PM, Borut Bolčina wrote:
> Here it is:
> <?xml version="1.0" encoding="utf-8"?>
> <domains project-version="1.1">
> <domain name="NoviforumDomain">
> <map name="AnniversaryMap" location="AnniversaryMap.map.xml" />
>
> <node name="NoviforumDomainNode"
> datasource="NoviforumDomainNode.driver.xml"
>
> factory="org.objectstyle.cayenne.conf.DriverDataSourceFactory">
> <map-ref name="AnniversaryMap" />
> </node>
> </domain>
> </domains>
>
> 2006/8/4, Andrus Adamchik <an...@objectstyle.org>:
>>
>>
>> On Aug 4, 2006, at 2:35 PM, Borut Bolčina wrote:
>>
>> > ERROR [04 avg 2006 20:14:44:859] Exception starting filter
>> > CayenneFilter
>> > org.objectstyle.cayenne.ConfigurationException: [v.1.2 July 18
>> > 2006] Error
>> > during Configuration initialization. [v.1.2 July 18 2006] Domain
>> > 'name'
>> > attribute must be not null.
>>
>> So how does cayenne.xml look like? Is there a name attribute for the
>> domain:
>>
>> <domain name="XYZ">
>> ...
>>
>> Andrus
>>
>>
Re: Error: unnamed
Posted by Borut Bolčina <bo...@gmail.com>.
Here it is:
<?xml version="1.0" encoding="utf-8"?>
<domains project-version="1.1">
<domain name="NoviforumDomain">
<map name="AnniversaryMap" location="AnniversaryMap.map.xml" />
<node name="NoviforumDomainNode"
datasource="NoviforumDomainNode.driver.xml"
factory="org.objectstyle.cayenne.conf.DriverDataSourceFactory">
<map-ref name="AnniversaryMap" />
</node>
</domain>
</domains>
2006/8/4, Andrus Adamchik <an...@objectstyle.org>:
>
>
> On Aug 4, 2006, at 2:35 PM, Borut Bolčina wrote:
>
> > ERROR [04 avg 2006 20:14:44:859] Exception starting filter
> > CayenneFilter
> > org.objectstyle.cayenne.ConfigurationException: [v.1.2 July 18
> > 2006] Error
> > during Configuration initialization. [v.1.2 July 18 2006] Domain
> > 'name'
> > attribute must be not null.
>
> So how does cayenne.xml look like? Is there a name attribute for the
> domain:
>
> <domain name="XYZ">
> ...
>
> Andrus
>
>
Re: Error: unnamed
Posted by Andrus Adamchik <an...@objectstyle.org>.
On Aug 4, 2006, at 2:35 PM, Borut Bolčina wrote:
> ERROR [04 avg 2006 20:14:44:859] Exception starting filter
> CayenneFilter
> org.objectstyle.cayenne.ConfigurationException: [v.1.2 July 18
> 2006] Error
> during Configuration initialization. [v.1.2 July 18 2006] Domain
> 'name'
> attribute must be not null.
So how does cayenne.xml look like? Is there a name attribute for the
domain:
<domain name="XYZ">
...
Andrus