You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by daryn nakhuda <da...@marinated.org> on 2002/03/29 18:38:58 UTC

resource-env-ref

Following the jdni howto (
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html );
I setup the following in my web.xml, and made sure it's in the right place
according to the dtd, but I still get the following error:

PARSE error at line 121 column 23
org.xml.sax.SAXParseException: Element type "res-env-ref-name" must be
declared.

What am I doing wrong?


--web.xml--
<!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">
.
.
</taglib>
.
.
  <resource-env-ref>
    <res-env-ref-name>
      jdo/sajdo
    </res-env-ref-name>
    <res-env-ref-type>
      com.sun.forte4j.persistence.PersistenceManagerFactoryImpl
    </res-env-ref-type>
  </resource-env-ref>
.
.
<resource-ref>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: resource-env-ref

Posted by Dan Hinojosa <dh...@qwest.net>.

daryn nakhuda wrote:

>Following the jdni howto (
>http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html );
>I setup the following in my web.xml, and made sure it's in the right place
>according to the dtd, but I still get the following error:
>
>PARSE error at line 121 column 23
>org.xml.sax.SAXParseException: Element type "res-env-ref-name" must be
>declared.
>
>What am I doing wrong?
>
>
>--web.xml--
><!DOCTYPE web-app
>        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>        "http://java.sun.com/dtd/web-app_2_3.dtd">
>.
>.
></taglib>
>.
>.
>  <resource-env-ref>
>    <res-env-ref-name>
>      jdo/sajdo
>    </res-env-ref-name>
>    <res-env-ref-type>
>      com.sun.forte4j.persistence.PersistenceManagerFactoryImpl
>    </res-env-ref-type>
>  </resource-env-ref>
>.
>.
><resource-ref>
>
>
>--
>To unsubscribe:   <ma...@jakarta.apache.org>
>For additional commands: <ma...@jakarta.apache.org>
>Troubles with the list: <ma...@jakarta.apache.org>
>
>
>
<!ELEMENT web-app (icon?, display-name?, description?, distributable?,
context-param*, filter*, filter-mapping*, listener*, servlet*,
servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?,
error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*,
login-config?, security-role*, env-entry*, ejb-ref*,  ejb-local-ref*)>

The DTD above requires that it be in order, otherwise you will get that 
message.   It looks okay but this is something you should look for. : )

-- 
Dan Hinojosa
Java & XML Consultant | Developer | Instructor
P.O. Box 4675
Albuquerque, NM 87196
(505) 363-5832 dhinojosa@qwest.net
 




--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>