8 Replies Latest reply: Jun 9, 2011 4:27 PM by user161771 - oracle RSS

    Weblogic 10.3 warning msg: "A version attribute is required"

    user755499
      I noticed that when I upgraded to Weblogic 10.3.3/10.3.4 from 9.2 I started seeing a warning message regarding my application.xml file for my Application.ear, and one of my weblogic-ejb-jar.xml files. The application.ear file is easily modified if I know the correct values, but my weblogic-ejb.jar.xml file is autogenerated using:

      <java classname="weblogic.tools.ejbgen.EJBGen" fork="yes" failonerror="yes">
      <classpath refid="javac.classpath"/>
      <arg value="-source"/>
      <arg value="1.5"/>
      <arg value="-sourcepath"/>
      <arg value="${build.src}"/>
      <arg value="-d"/>
      <arg value="${build.gen}"/>
      <arg value="-descriptorDir"/>
      <arg value="${build.gen}/META-INF"/>
      <arg value="-valueObjectSuffix"/>
      <arg value="Info"/>
      <arg line="${ejbgen-classes}"/>


      The messages were:

      <Jan 26, 2011 1:43:16 PM EST> <Warning> <Munger> <BEA-2156203> <A version attribute was not found in element persistence in the deployment descriptor in /opt/Oracle/Middleware64/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/Application/ysyevg/Impl.jar/META-INF/weblogic-ejb-jar.xml. A version attribute is required, but this version of the Weblogic Server will assume that the JEE5 is used. Future versions of the Weblogic Server will reject descriptors that do not specify the JEE version.>
      <Jan 21, 2011 9:50:52 AM EST> <Warning> <Munger> <BEA-2156203> <A version attribute was not found in element application in the deployment descriptor in /export/Application/deploy/Application.ear/META-INF/application.xml. A version attribute is required, but this version of the Weblogic Server will assume that the JEE5 is used. Future versions of the Weblogic Server will reject descriptors that do not specify the JEE version.>

      My question is what are the valid values for this attribute as the examples that on come with the Weblogic server aren't that helpful and there doesn't seem to be much documentation on this.

      Here is my application.xml file:

      <application xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <description>Application</description>
      <display-name>Application</display-name>
      <module>
      <web>
      <web-uri>Application.war</web-uri>
      <context-root>Application</context-root>
      </web>
      </module>
      <module>
      <ejb>Impl.jar</ejb>
      </module>
      <module>
      <ejb>subscription_management_sdk.jar</ejb>
      </module>
      </application>

      Thanks,

      Ian
        • 1. Re: Weblogic 10.3 warning msg: "A version attribute is required"
          Jay SenSharma MiddlewareMagic
          Hi,

          "weblogic.tools.ejbgen.EJBGen" task is depracated from WLS 9 onwards so please use the "weblogic.ant.taskdefs.j2ee.Appc" utility to compile your Application for more information on this please refer to : http://middlewaremagic.com/weblogic/?p=573

          Because the Old compiler EJBGen will generate Old deployment descriptors... Which is different in WLS10.3.x...Or as an alternative before deploying your application on WLS10.3.x please use the DDConverter utility to convert all your Deployment descriptors to the current WLS Version standard.... Please refer to : http://middlewaremagic.com/weblogic/?p=2772

          Your error clearly indicates that your Deployment descriptors especially the EJB Deployment descriptors like "ejb-jar.xml" and "weblogic-ejb-jar.xml" are causing this WARNING... Please upgrade them using the "weblogic.DDConverter" utility.

          .
          .
          Thanks
          Jay SenSharma
          • 2. Re: Weblogic 10.3 warning msg: "A version attribute is required"
            JoeE6779305
            When I moved from Weblogic Server 9.2 to Weblogic Server 10.3.3, I ran the DDConverter.
            However, now that I am testing 10.3.4 I am getting the 'A version attribute is required' message.

            Can someone explain what the version attribute is, and where it goes within the weblogic-ejb-jar.xml?

            Do I really need to run DDConverter between the 10.3.3 and 10.3.4 versions? If so, what changing are being made?

            Thank you,
            Joe E.
            • 3. Re: Weblogic 10.3 warning msg: "A version attribute is required"
              612864
              Joe,
              Hi, I am using the following XSD schema headers in WebLogic 10.3.3.0 and 10.3.4.0 for a JEE5 compatible EAR running EJB 3.0 and Servlet 2.5.

              EAR Project: application.xml
              <application 
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
              xmlns="http://java.sun.com/xml/ns/javaee" 
              xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" 
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
              http://java.sun.com/xml/ns/javaee/application_5.xsd" 
              id="Application_ID" 
              version="5">
              EAR project: weblogic-application.xml
              <wls:weblogic-application 
              xmlns:wls="http://www.bea.com/ns/weblogic/weblogic-application" 
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
              http://java.sun.com/xml/ns/javaee/javaee_5.xsd 
              http://www.bea.com/ns/weblogic/weblogic-application 
              http://www.bea.com/ns/weblogic/weblogic-application/1.0/weblogic-application.xsd">
                  <!-- server-version: 10.3 -->
              EJB project: weblogic-ejb-jar.xml
              <wls:weblogic-ejb-jar 
              xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-ejb-jar" 
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
              http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd 
              http://xmlns.oracle.com/weblogic/weblogic-ejb-jar 
              http://xmlns.oracle.com/weblogic/weblogic-ejb-jar/1.2/weblogic-ejb-jar.xsd">
                  <!--weblogic-version:10.3.4-->
              War project: web.xml
              <web-app 
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
              xmlns="http://java.sun.com/xml/ns/javaee" 
              xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
              http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
              id="WebApp_ID" 
              version="2.5">
              War project: weblogic.xml
              <wls:weblogic-web-app xmlns:wls="http://www.bea.com/ns/weblogic/weblogic-web-app" 
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
              http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd 
              http://www.bea.com/ns/weblogic/weblogic-web-app 
              http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
                  <wls:weblogic-version>10.3</wls:weblogic-version>
              thank you
              / Michael O'Brien
              http://www.eclipselink.org
              • 4. Re: Weblogic 10.3 warning msg: "A version attribute is required"
                JoeE6779305
                Thank you Michael. That is the information I am looking for.

                Joe E.

                Edited by: JoeE6779305 on Jan 27, 2011 11:55 AM
                • 5. Re: Weblogic 10.3 warning msg: "A version attribute is required"
                  user755499
                  So I switched this is what I have done so far:

                  1) switched to Ant 1.7.1 underneath weblogic install
                  2) used the new ejbgen task -

                  <taskdef name="ejbgen"
                  classname="com.bea.wls.ejbgen.ant.EJBGenAntTask" classpathref="ejbgen.path"/>

                  <target name="generate">
                       <ejbgen source="1.5" outputDir="${build.gen}" descriptorDir="${build.gen}/META-INF" valueObjectSuffix="Info"
                  forceGeneration="true" fork="true" sourcePath="${build.src}" exitOnError="true">
                  <classpath refid="javac.classpath"/>
                            <fileset dir="${build.codeBase}/cm">
                                 <include name="impl/beans/Bean.java"/>
                  </fileset>
                  </ejbgen>
                  </target>

                  Thie still doesn't correctly update my ejb-jar.xml and weblogic-jar.xml as it still complains on deployment.

                  What is the actually thing that does it ?

                  Should I just build my jar as it is, have it packaged as part of the ear file, and then run DDconverter on it ?
                  My ear is a bunch of jars, a war file.

                  The only jar I am having an issue with is the one that generates the .xml files.

                  Thanks,

                  Ian
                  • 6. Re: Weblogic 10.3 warning msg: "A version attribute is required"
                    user161771 - oracle
                    There is a patch available for WLS 10.3.4 that takes out a warning where there should not be one in weblogic-ejb-jar.xml related to the persistence element. Open an inquiry with My Oracle Support and ask for the patch related to Bug 11720907.
                    • 7. Re: Weblogic 10.3 warning msg: "A version attribute is required"
                      867403
                      The warning

                      <08.06.2011 12:53 Uhr MESZ> <Warning> <Munger> <BEA-2156203> <A version attribute was not found in element persistence in the deployment descriptor in C:\projekte\devteam\integration-R1.16\EigenbeauskunftungPersistence\dd\EigenbeauskunftungPersistenceEJB/META-INF/weblogic-ejb-jar.xml. A version attribute is required, but this version of the Weblogic Server will assume that the JEE5 is used. Future versions of the Weblogic Server will reject descriptors that do not specify the JEE version.>

                      is also present in WebLogic version 10.3.5. any patch available for that?