This discussion is archived
0 Replies Latest reply: Jan 29, 2013 11:18 AM by 987897 RSS

Problem building application with weblogic.jar placed out of bea install.

987897 Newbie
Currently Being Moderated
Weblogic version: 10.3

EJB Version: 2.x

Method for generating webservices fomr EJBs: servicegen task.

Application Build steps:
Step1) Maven to build the complete application and generate ejb-jar.jar and other projects jars and wars.
Step2) Post maven build success there is an ant script used to generate webservices using ejb’s in the project using servicegen task. Attached is build.xml for ant.

Following is the class path :

.;C:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc.jar;C:\PROGRA~1\IBM\SQLLIB\java\sqlj.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cu.jar;C:\PROGRA~1\IBM\SQLLIB\bin;C:\PROGRA~1\IBM\SQLLIB\java\common.jar;C:\Program Files\IBM\RationalSDLC\ClearQuest\cqjni.jar;C:\bea10.3\wlserver_10.3\server\lib\weblogic.jar;C:\Jeevesh DEV\ULM Core\UnitLinkCore\UnitLink\nordea-ulc\lib\webservices.jar;%JAVA_HOME%\lib\tools.jar;C:\Jeevesh DEV\ULM Core\UnitLinkCore\UnitLink\nordea-ulc\libslf4j-log4j12-1.5.2.jar;C:\Jeevesh DEV\ULM Core\UnitLinkCore\UnitLink\nordea-ulc\lib\struts.jar;C:\Jeevesh DEV\ULM Core\UnitLinkCore\UnitLink\nordea-ulc\lib\bootstrap.jar;C:\Jeevesh DEV\ULM Core\UnitLinkCore\UnitLink\nordea-ulc\lib\db2jcc.jar;C:\Jeevesh DEV\ULM Core\UnitLinkCore\UnitLink\nordea-ulc\lib\db2jcc_license_cu.jar;C:\Jeevesh DEV\ULM Core\UnitLinkCore\UnitLink\nordea-ulc\lib\ehcache-core-2.0.0.jar;C:\Jeevesh DEV\ULM Core\UnitLinkCore\UnitLink\nordea-ulc\lib\j2ee.jar;C:\Jeevesh DEV\ULM Core\UnitLinkCore\UnitLink\nordea-ulc\lib\jdom.jar;C:\Jeevesh DEV\ULM Core\UnitLinkCore\UnitLink\nordea-ulc\lib\log4j-1.2.9.jar;C:\Jeevesh DEV\ULM Core\UnitLinkCore\UnitLink\nordea-ulc\lib\slf4j-api-1.5.8.jar;C:\Jeevesh DEV\ULM Core\UnitLinkCore\UnitLink\Deployment\ulc-dto.jar;C:\Jeevesh DEV\ULM Core\UnitLinkCore\UnitLink\Deployment\ulc-jar.jar;C:\Jeevesh DEV\ULM Core\UnitLinkCore\UnitLink\Deployment\scheduler-ejb.jar;C:\Jeevesh DEV\ULM Core\UnitLinkCore\UnitLink\nordea-ulc\lib\com.bea.core.xml.beaxmlbeans_2.0.0.0_2-5-1.jar;

Problem Area:

As you could notice in the yellow highlighted one that am referring to weblogic.jar from bea installation folder. Now if I use the weblogic.jar from the installation folder then build happens successfully.

However if I copy weblogic.jar to some other location say : C:\Jeevesh DEV\ULM Core\UnitLinkCore\UnitLink\nordea-ulc\lib\weblogic.jar
And include this path in the class path in place of weblogic.jar from the installation path, then I get the following errors: Please refer red highlighted part below…

C:\Jeevesh DEV\ULM Core\UnitLinkCore\UnitLink\ulc-ear>ant
Buildfile: build.xml

ejbwebservice:
[servicegen] weblogic.xml.process.ProcessorFactoryException: XML document does not appear to contain a properly formed D
OCTYPE header
[servicegen] at weblogic.xml.process.ProcessorFactory.getProcessor(ProcessorFactory.java:301)
[servicegen] at weblogic.xml.process.ProcessorFactory.getProcessor(ProcessorFactory.java:241)
[servicegen] at weblogic.ejb20.dd.xml.DDUtils.processXML(DDUtils.java:320)
[servicegen] at weblogic.ejb20.dd.xml.DDUtils.processXML(DDUtils.java:295)
[servicegen] at weblogic.ejb20.dd.xml.DDUtils.processEjbJarXML(DDUtils.java:265)
[servicegen] at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:118)
[servicegen] at weblogic.webservice.dd.EJBJarIntrospector.<init>(EJBJarIntrospector.java:47)
[servicegen] at weblogic.webservice.util.WebServiceEarFile.init(WebServiceEarFile.java:177)
[servicegen] at weblogic.webservice.util.WebServiceEarFile.readDD(WebServiceEarFile.java:235)
[servicegen] at weblogic.webservice.util.WebServiceEarFile.<init>(WebServiceEarFile.java:74)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:177)
[servicegen] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[servicegen] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[servicegen] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[servicegen] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[servicegen] at java.lang.reflect.Method.invoke(Method.java:597)
[servicegen] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[servicegen] at org.apache.tools.ant.Task.perform(Task.java:348)
[servicegen] at org.apache.tools.ant.Target.execute(Target.java:357)
[servicegen] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[servicegen] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[servicegen] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[servicegen] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[servicegen] at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
[servicegen] at org.apache.tools.ant.Main.runBuild(Main.java:758)
[servicegen] at org.apache.tools.ant.Main.startAnt(Main.java:217)
[servicegen] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
[servicegen] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
[servicegen] --------------- nested within: ------------------
[servicegen] Error processing file 'META-INF/ejb-jar.xml'. weblogic.xml.process.XMLProcessingException: XML document doe
s not appear to contain a properly formed DOCTYPE header - with nested exception:
[servicegen] [weblogic.xml.process.ProcessorFactoryException: XML document does not appear to contain a properly formed
DOCTYPE header]

--------------- nested within: ------------------
weblogic.webservice.util.WebServiceJarException: Could not process ejb-jar C:\DOCUME~1\ac30416\LOCALS~1\Temp\ulc-ear.ear
-86826932\ejb.jar - with nested exception:
[weblogic.webservice.dd.EJBProcessingException: Can read in ejb DD files. - with nested exception:
[Error processing file 'META-INF/ejb-jar.xml'. weblogic.xml.process.XMLProcessingException: XML document does not appear
to contain a properly formed DOCTYPE header - with nested exception:
[weblogic.xml.process.ProcessorFactoryException: XML document does not appear to contain a properly formed DOCTYPE heade
r]]]
at weblogic.webservice.util.WebServiceEarFile.init(WebServiceEarFile.java:183)
at weblogic.webservice.util.WebServiceEarFile.readDD(WebServiceEarFile.java:235)
at weblogic.webservice.util.WebServiceEarFile.<init>(WebServiceEarFile.java:74)
at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:177)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Please help as its urgent for me as we cannot have local installation of weblogic. We may just use the required jars.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points