Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ejbc gives error for valid weblogic-ejb-jar.xml

2 views
Skip to first unread message

PC Sien

unread,
Aug 24, 2001, 5:00:02 PM8/24/01
to

I get SAXParseException when building ejb jar in WLS600:-

weblogic.ejbc -compiler javac E:\work\v20\tmp\wfeimpl.jar E:\work\v20\distribution\ejbs\wfeejb.jar
org.xml.sax.SAXParseException: The content of element type "entity-descriptor"
must match "(entity-cache?,lifecycle?,persistence?,entity-clustering?)".
at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1008)
at weblogic.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1280)
..

the dtd says :-
..
<!ELEMENT entity-descriptor (
pool?,
entity-cache?,
lifecycle?,
persistence?,
entity-clustering?,
invalidation-target?)
>

Why is the SAX parser validating against a different element spec?

-pc
==================
here's the ejb-jar.xml:-
======================
<?xml version="1.0"?>

<!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>
<enterprise-beans>
<entity>
<ejb-name>WFProcessBean</ejb-name>
<home>com.tlc.wfe.WFProcessHome</home>
<remote>com.tlc.wfe.WFProcess</remote>
<ejb-class>com.tlc.wfe.WFProcessBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>com.tlc.wfe.WFProcessPK</prim-key-class>
<reentrant>False</reentrant>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>WFProcessBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>


here's the weblogic-ejb-jar.xml:-
================================
<?xml version="1.0"?>

<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'
'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>

<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>WFProcessBean</ejb-name>
<entity-descriptor>
<pool>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
</pool>
<entity-cache>
<max-beans-in-cache>100</max-beans-in-cache>
<idle-timeout-seconds>120</idle-timeout-seconds>
</entity-cache>
<persistence>
<delay-updates-until-end-of-tx>false</delay-updates-until-end-of-tx>
</persistence>
</entity-descriptor>
<jndi-name>WFProcessHome</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>

shiv

unread,
Aug 25, 2001, 10:01:21 AM8/25/01
to

The <pool> stanza configures the behavior of the WebLogic Server free pool for
a stateless session and message driven EJBs. Look like your bean is an Entity
bean so <pool> won't apply

<weblogic-enterprise-bean>
<ejb-name>AccountBean</ejb-name>
<entity-descriptor>
<entity-cache>
<max-beans-in-cache>200</max-beans-in-cache>
</entity-cache>
</entity-descriptor>
</weblogic-enterprise-bean>

"PC Sien" <pcs...@tightlink.com> wrote:
>
>I get SAXParseException when building ejb jar in WLS600:-
>
>weblogic.ejbc -compiler javac E:\work\v20\tmp\wfeimpl.jar E:\work\v20\distribution\ejbs\wfeejb.jar
>org.xml.sax.SAXParseException: The content of element type "entity-descriptor"
>must match "(entity-cache?,lifecycle?,persistence?,entity-clustering?)".
> at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1008)
> at weblogic.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1280)

>...
>
>the dtd says :-
>...

Rob Woollen

unread,
Aug 25, 2001, 9:42:40 PM8/25/01
to
No, entity beans are pooled as well.

-- Rob

--

----------------------------------------------------------------------

AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server

by Michael Girdley, Rob Woollen, and Sandra Emerson

http://learnWebLogic.com

Rob Woollen

unread,
Aug 25, 2001, 9:45:44 PM8/25/01
to
Something is off here. It looks like the parser is finding the wls 5.1
dtd. Are you sure that you showed us the weblogic-ejb-jar.xml that your
are compiling?

Also, some of your settings are likely to be incorrect. In particular,
I would suggest removing the <method-intf>Remote</method-intf> from your
transaction declaration. You most likely want Required on both the
Remote and Home interfaces. Also, you probably do not want
delay-updates-until-end-of-tx set to false.

-- Rob

--

PC

unread,
Aug 31, 2001, 8:39:21 PM8/31/01
to

It turns out the weblogic600-ejb-jar.dtd file in the weblogic.jar in the
weblogic 6.0 installation is incorrect. I unzipped the weblogic.jar
file and extracted weblogic600-ejb-jar.dtd and found the following:-

<!--
The entity-descriptor element is used to specify deployment parameters
that are applicable to an entity bean.

Used in: weblogic-enterprise-bean
-->
<!ELEMENT entity-descriptor (
entity-cache?,
lifecycle?,
persistence?,
entity-clustering?)
>

The weblogic600-ejb-jar.dtd file is dated 2001/05/24

I am showing the exact weblogic-ejb-jar.xml I have.
It appears that I have a version of the weblogic.jar which has
a bug!

0 new messages