Hi,

Your ejbDoclet setup has a bit of an identity crisis. You've specified ejbSpec="2.1" in one place and a deployment descriptor schema pointing at http://java.sun.com/dtd/ejb-jar_2_0.dtd.

So, there's a couple of things wrong here, and the correct solution depends upon which version of weblogic that you're using.

WL 8.1 is an EJB 2.0 container, so you just need to specify ejbSpec="2.0" and forget about the schema attribute in the deploymentdescriptor tag. The schema attribute expects a pointer to an additional XML schema, not a DTD, and only applies in the 2.1 case. In any event, a correct ejb-jar.xml with a DOCTYPE element will be generated

WL 9.x is an EJB 2.1 container so use ejbSpec="2.1" and still forget about the schema attribute in the deploymentdescriptor tag. In this case there will be no DOCTYPE, Instead, the <ejb-jar > element will contain xmlns attributes defining the schema. The schema attribute in the deploymentdescriptor tag can be used to add an additional xmlns attribute. Of course, WL 8.1 will barf on any of this.

Cheers,

Steve Coy

On 28/11/2006, at 3:22 AM, Manu wrote:

Hi,
Thanks for the tip, but it doesn't seem to work in my case. I always had it,
and the generated ejb-jar.xml does not include DOCTYPE.
Do YOU have it generated in your case ?

By the way, I use the following piece of Pom :

<ejbdoclet ejbSpec="2.1" ejbClassNameSuffix="Impl" force="true"
destDir="${basedir}/src/generated/java">
   <fileset dir="${basedir}/src/main/java" includes="**/*Impl.java"/>
   <entitypk/>
   <deploymentdescriptor
       schema="http://java.sun.com/dtd/ejb-jar_2_0.dtd";
       xmlencoding="ISO-8859-1"
       validateXML="true"
       destDir="${basedir}/src/generated/resources/META-INF"
       useIDs="true"/>
   <packageSubstitution packages="impl" substituteWith="interfaces" />
   <weblogic
       version="8.1"
       createtables="Disabled"
       destDir="${basedir}/src/generated/resources/META-INF"/>
</ejbdoclet>

Any more suggestions ?

Manu :-Þ

2006/11/27, Marco Mistroni <[EMAIL PROTECTED]>:

hi,
wild guess... have you specified the ejb version you are using?
here's what i m using

<ejbdoclet
destDir="${project.build.directory}/generated-sources/ xdoclet"
            excludedTags="@author,@version"
            ejbSpec="2.1">

<deploymentdescriptor
                        destDir="${project.build.outputDirectory
}/META-INF"
                        useIDs="true"/>
<websphere

destDir="${project.build.outputDirectory}/META-INF"/>


  <jboss version="4.0"
                        destDir="${project.build.outputDirectory
}/META-INF"
                        dataSource="${mw.dataSource}"
                        datasourceMapping="Hypersonic SQL"
                        createTable="true"
                        removeTable="true"/>


hth
marco



On 11/27/06, Manu <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm experiencing trouble with the generation of ejb-jar.xml by ejbdoclet
> (xdoclet).
> It does not seem to include at the top of the file a DOCTYPE directive.
> I don't know if this is strictly required by the standard, but my
Weblogic
> server tells me it is not valid for that reason.
>
> Any idea of how to make ejbdoclet (subtag <deploymentdescriptor/>)
> generate
> it for me ?
> Or tell Weblo bypass this validation ?
>
> Thanks for your help.
>
> --
> Manu (:-Þ)
>
>




--
Manu (:-Þ)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to