简体   繁体   中英

weblogic.ejbc compiler is deprecated : EJB Application deployment in WebLogic 12c

I'm using EJB 2.1, jdk 1.6 with Weblogic 11g for application development. Latest I have been process of deploying application in WebLogic 12c.

As I understood from online source, I need to have jdk 1.7 and higher to run application in weblogic 12c. I also getting below error, when I compile EJB 2.1 with JDK 1.7 or higher.

DEPRECATED: The weblogic.ejbc compiler is deprecated and will be removed in a future version of WebLogic Server.  Please use weblogic.appc instead.

java.lang.NoSuchMethodError: weblogic.xml.babel.baseparser.BaseParser.setMaxAttrsPerElement(I)V
        at weblogic.xml.stax.XMLStreamReaderBase.prime(XMLStreamReaderBase.java:89)
        at weblogic.xml.stax.XMLStreamReaderBase.setInput(XMLStreamReaderBase.java:148)
        at weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:322)
        at weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:54)
        at weblogic.application.descriptor.BasicMunger2.<init>(BasicMunger2.java:96)
        at weblogic.application.descriptor.BasicMunger2.<init>(BasicMunger2.java:114)
        at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:79)
        at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:63)
        at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:45)
        at weblogic.ejb.container.metadata.EjbJarReader.<init>(EjbJarReader.java:46)
        at weblogic.ejb.container.metadata.EjbJarLoader.createXMLStreamReader(EjbJarLoader.java:49)
        at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:438)
        at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:832)
        at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:841)
        at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.processEjbJarXML(EjbDescriptorReaderImpl.java:440)
        at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:263)
        at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:250)
        at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:92)
        at weblogic.ejbc20.getDescriptorFromJar(ejbc20.java:683)
        at weblogic.ejbc20.runBody(ejbc20.java:455)
        at weblogic.utils.compiler.Tool.run(Tool.java:159)
        at weblogic.utils.compiler.Tool.run(Tool.java:116)
        at weblogic.ejbc.main(ejbc.java:36)
        at BuildEjbs.main(BuildEjbs.java:97)
Exception in thread "main" java.lang.NoSuchMethodError: weblogic.xml.babel.baseparser.BaseParser.setMaxAttrsPerElement(I)V
        at weblogic.xml.stax.XMLStreamReaderBase.prime(XMLStreamReaderBase.java:89)
        at weblogic.xml.stax.XMLStreamReaderBase.setInput(XMLStreamReaderBase.java:148)
        at weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:322)
        at weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:54)
        at weblogic.application.descriptor.BasicMunger2.<init>(BasicMunger2.java:96)
        at weblogic.application.descriptor.BasicMunger2.<init>(BasicMunger2.java:114)
        at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:79)
        at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:63)
        at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:45)
        at weblogic.ejb.container.metadata.EjbJarReader.<init>(EjbJarReader.java:46)
        at weblogic.ejb.container.metadata.EjbJarLoader.createXMLStreamReader(EjbJarLoader.java:49)
        at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:438)
        at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:832)
        at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:841)
        at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.processEjbJarXML(EjbDescriptorReaderImpl.java:440)
        at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:263)
        at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:250)
        at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:92)
        at weblogic.ejbc20.getDescriptorFromJar(ejbc20.java:683)
        at weblogic.ejbc20.runBody(ejbc20.java:455)
        at weblogic.utils.compiler.Tool.run(Tool.java:159)
        at weblogic.utils.compiler.Tool.run(Tool.java:116)
        at weblogic.ejbc.main(ejbc.java:36)
        at BuildEjbs.main(BuildEjbs.java:97)
Going to the <application> build directory
Deleting JAR files
*****FINISHED JAR AND EJBC FOR ALL THE EJBS*****

Is it possible to compile EJB 2.1 with JDK 1.6 or least version through deprecated way?

we are using ejb 3.0 compiled on jdk1.6 and deployed on weblogic 12c jdk 1.7.We have not faced any issue like this.It is working perfectly fine.I think you will require to do changes in your deployment descriptor. You can try using descriptors defined in weblogic documentation. https://docs.oracle.com/cd/E13222_01/wls/docs103/ejb/DDreference-ejb-jar.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM