• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

web.xml error

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my log file I get this error:

####<Oct 2, 2002 10:55:39 AM PDT> <Info> <HTTP> <hewlett-yf9yyzb> <myserver> <ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system> <> <101160> <Deployment descriptor is malformed, check against the DTD: org.xml.sax.SAXParseException: Element type "ejb-local-ref" is not declared in the dtd or schema..>
####<Oct 2, 2002 10:55:39 AM PDT> <Info> <HTTP> <hewlett-yf9yyzb> <myserver> <ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system> <> <101160> <Deployment descriptor is malformed, check against the DTD: org.xml.sax.SAXParseException: Element type "local-home" is not declared in the dtd or schema..>
####<Oct 2, 2002 10:55:39 AM PDT> <Info> <HTTP> <hewlett-yf9yyzb> <myserver> <ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system> <> <101160> <Deployment descriptor is malformed, check against the DTD: org.xml.sax.SAXParseException: Element type "local" is not declared in the dtd or schema..>

But what I don't understand is that the dtd for web.xml is "http://java.sun.com/dtd/web-app_2_3.dtd" and they use ejb-local-ref, local-home and local. Why do I still get the error when the dtd mentions it.

<web-app>

<ejb-ref>
<ejb-local-ref>
<description>
Reference EJB resources in Weblogic Resources
</description>
<ejb-ref-name>GangsterEJB</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>

<local-home>com.sempire.builder.business_component.GangsterHome</local-home>
<local>com.sempire.builder.business_component.Gangster</local>

</ejb-local-ref>

<ejb-local-ref>
<description>
Reference EJB resources in Weblogic Resources
</description>
<ejb-ref-name>OrganizationEJB</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>

<local-home>com.sempire.builder.business_component.OrganizationHome</local-home>
<local>com.sempire.builder.business_component.Organization</local>

</ejb-local-ref>

<ejb-local-ref>
<description>
Reference EJB resources in Weblogic Resources
</description>
<ejb-ref-name>JobEJB</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>

<local-home>com.sempire.builder.business_component.JobHome</local-home>
<local>com.sempire.builder.business_component.Job</local>

</ejb-local-ref>

</web-app>

Do I need to specify ejb-local-ref in my ejb-jar.xml also??
and my ejb-jar.xml is:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE ejb-jar PUBLIC
"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
"http://java.sun.com/dtd/ejb-jar_2_0.dtd">

<ejb-jar>
<display-name>Business Component CMP 2.0</display-name>

<enterprise-beans>
<entity>
<display-name>Gangster Entity Bean</display-name>
<ejb-name>GangsterEJB</ejb-name>

<local-home>com.sempire.builder.business_component.GangsterHome</local-home>
<local>com.sempire.builder.business_component.Gangster</local>
<ejb-class>com.sempire.builder.business_component.GangsterBean</ejb-class>

<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>

<abstract-schema-name>GangsterEJB</abstract-schema-name>

<cmp-field><field-name>iD</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<cmp-field><field-name>nickname</field-name></cmp-field>
<cmp-field><field-name>badness</field-name></cmp-field>
<primkey-field>iD</primkey-field>

<resource-ref>
<res-ref-name>jdbc/GangsterDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

<query>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM GangsterEJB AS a]]>
</ejb-ql>
</query>
</entity>

<entity>
<display-name>Organization Entity Bean</display-name>
<ejb-name>OrganizationEJB</ejb-name>

<local-home>com.sempire.builder.business_component.OrganizationHome</local-home>
<local>com.sempire.builder.business_component.Organization</local>
<ejb-class>com.sempire.builder.business_component.OrganizationBean</ejb-class>

<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>

<abstract-schema-name>OrganizationEJB</abstract-schema-name>

<cmp-field><field-name>iD</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<cmp-field><field-name>description</field-name></cmp-field>
<primkey-field>iD</primkey-field>

<resource-ref>
<res-ref-name>jdbc/OrganizationDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

<query>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM OrganizationEJB AS a]]>
</ejb-ql>
</query>

</entity>

<entity>
<display-name>Job Entity Bean</display-name>
<ejb-name>JobEJB</ejb-name>

<local-home>com.sempire.builder.business_component.JobHome</local-home>
<local>com.sempire.builder.business_component.Job</local>
<ejb-class>com.sempire.builder.business_component.JobBean</ejb-class>

<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>

<abstract-schema-name>JobEJB</abstract-schema-name>

<cmp-field><field-name>iD</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<cmp-field><field-name>score</field-name></cmp-field>
<cmp-field><field-name>setupCost</field-name></cmp-field>
<primkey-field>iD</primkey-field>

<resource-ref>
<res-ref-name>jdbc/JobDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

<query>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM JobEJB AS a]]>
</ejb-ql>
</query>
</entity>

</enterprise-beans>

Thanks
Ronak Parekh
 
reply
    Bookmark Topic Watch Topic
  • New Topic