- This topic has 14 replies, 2 voices, and was last updated 18 years, 2 months ago by
PKKALLA.
-
AuthorPosts
-
PKKALLAMemberHi Experts:
Need your help on deploying EJB.
Created a simple EJB and I am trying to deploy on weblogic8 and I am getting the following errors.
___________________________________________________________________________
<Error> <Deployer> <BEA-149027> <Unable to activate application, TestEar, from source, C:\Documents and Settings\Praveen\workspace\TestEar. Reason: weblogic.management.DeploymentException: Error while loading descriptors: Error processing file ‘META-INF/application.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 header] – with nested exception:
[weblogic.xml.process.ProcessorFactoryException: XML document does not appear to contain a properly formed DOCTYPE header]>
_________________________________________________________________________Any suggestion is greatly appreciated.
Thanks,
Praveen.April 4, 2007 at 1:28 pm #268421
Riyad KallaMemberPraveen,
It looks like your application.xml file is invalid… can you copy-paste it here for us to see?April 5, 2007 at 4:45 pm #268508
PKKALLAMemberRiyad.
Here is the content from application.xml
____________________________________________________________________________
<?xml version=”1.0″ encoding=”UTF-8″?>
<application xmlns=”http://java.sun.com/xml/ns/j2ee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” version=”1.4″ xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd”>
<display-name>TestEar</display-name>
<module id=”myeclipse.1175676910000″>
<web>
<web-uri>TestEarWeb.war</web-uri>
<context-root>/TestEarWeb</context-root>
</web>
</module>
<module id=”myeclipse.1175676652812″>
<ejb>TestEJB.jar</ejb>
</module>
</application>
___________________________________________________________________________________I don’t see Home, LocalHome, remoteInterface etc.
I would like to create EJB 2.0 classes. How do I do it.Thanks a lot for all your help.
Praveen.
April 5, 2007 at 5:08 pm #268509
Riyad KallaMemberPraveen,
I think the issue is that you are trying to deploy a J2EE 1.4 application to WebLogic 8 which IIRC only support J2EE 1.3. You need to upgrade to WebLogic 9 for J2EE 1.4 support or you need to re-create your project and be sure to specify the J2EE 1.3 specification when creating it.April 9, 2007 at 8:25 pm #268610
PKKALLAMemberRiyad:
I created recreated the project with J2EE 1.3 but it just created Approvers.java it didn’t create ApproversHome.java, ApproversLocalHome.java and ApproversLocal.java and ApproversBean.java.
Do I have to chnage something in the IDE to generate these files?
Thanks for you valuable suggestions.
Praveen.
April 9, 2007 at 9:04 pm #268612
PKKALLAMemberRiyad:
I am still getting the same error.
Here is what I did.
From the file menu selected New –> Project
In the wizard window selected “EJB Project”
Then gave BLProject and selected “Specification Level” as J2EE 1.3
and hit finish.Then on the src project, from the context selected “New” –> “Session Bean”.
Typed Approvers in the name field and selected “both” in the “select the access for EJB”.Am I don’t anything wrong?
Thanks,
Praveen.April 9, 2007 at 10:49 pm #268617
Riyad KallaMemberI created recreated the project with J2EE 1.3 but it just created Approvers.java it didn’t create ApproversHome.java, ApproversLocalHome.java and ApproversLocal.java and ApproversBean.java.
Do I have to chnage something in the IDE to generate these files?
Yes, you need to use XDoclet to generate the rest of those files as outlined in our EJB tutorial here:
http://www.myeclipseide.com/images/tutorials/quickstarts/firstejb/April 10, 2007 at 11:08 pm #268669
PKKALLAMemberRiyad:
i am getting following error when i ran xDoclet.
Buildfile: C:\Documents and Settings\Praveen\workspace\earEJB\.xdoclet-build.tmp.xml
N65540:
[ejbdoclet] C:\Documents and Settings\Praveen\workspace\earEJB\.xdoclet-build.tmp.xml:33: weblogic: Argument for createtables must be one of (Disabled|CreateOnly|DropAndCreate|DropAndCreateAlways|AlterOrCreate) if version attribute is >= 8.1
[ejbdoclet] at xdoclet.DocletTask.validateSubTasks(DocletTask.java:536)
[ejbdoclet] at xdoclet.DocletTask.validateOptions(DocletTask.java:498)
[ejbdoclet] at xdoclet.modules.ejb.EjbDocletTask.validateOptions(EjbDocletTask.java:81)
[ejbdoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:89)
[ejbdoclet] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[ejbdoclet] at org.apache.tools.ant.Task.perform(Task.java:364)
[ejbdoclet] at org.apache.tools.ant.Target.execute(Target.java:341)
[ejbdoclet] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[ejbdoclet] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[ejbdoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[ejbdoclet] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[ejbdoclet] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[ejbdoclet] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[ejbdoclet] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[ejbdoclet] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)BUILD FAILED
C:\Documents and Settings\Praveen\workspace\earEJB\.xdoclet-build.tmp.xml:33: Unexpected errorTotal time: 1 second
thanks,
praveenApril 11, 2007 at 12:15 am #268670
Riyad KallaMemberPraveen,
The error seems fairly straight forward. Did you set the doclet version to 8.1 or 9? If so, check your EJB XDoclet tags and see if you have set “createtables” argument anywhere to a value other than the ones listed:(Disabled|CreateOnly|DropAndCreate|DropAndCreateAlways|AlterOrCreate)
April 11, 2007 at 8:09 pm #268728
PKKALLAMemberRiyad:
My bad.
I think this is the best support I every got.
Thanks a lot.
Praveen.
April 12, 2007 at 6:27 am #268737
Riyad KallaMemberPraveen, thank you for the kind words. I’m glad it helped.
April 12, 2007 at 8:50 pm #268777
PKKALLAMemberSorry Riyad,
When I run xDoclet I am getting the followingjava.lang.UnsupportedClassVersionError: xjavadoc/ant/XJavadocTask (Unsupported major.minor version 49.0)
Thanks for your time
Praveen.
April 12, 2007 at 9:39 pm #268778
PKKALLAMemberPlease ignore my previous request. changing JDK to point to JDK 1.4.2 worked.
How ever I have a small problem and hoping you could help.
I deployed the ear file on weblogic 8.1
and in my JSP I have the following codeHelloWorldLocalHome localHome = (HelloWorldLocalHome)HelloWorldUtil.getLocalHome();
I am getting the following error when I run the JSP
________________________________________________________________________________
javax.naming.NameNotFoundException: While trying to look up comp/env/ejb/HelloWorldLocal in /app/webapp/TestWeb/13732961.; remaining name ‘comp/env/ejb/HelloWorldLocal’
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:869)
at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNamingNode.java:150)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:338)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:333)
at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:124)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.test.interfaces.HelloWorldUtil.lookupHome(HelloWorldUtil.java:24)
at com.test.interfaces.HelloWorldUtil.getLocalHome(HelloWorldUtil.java:66)
at jsp_servlet.__myjsp._jspService(__myjsp.java:151)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6310)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)___________________________________________________________________________________
I checked welogic server. I checked for weblogic I couldn’t find comp/env/ejb/HelloWorldLocal in the JNDI tree.
Thanks,
PraveenApril 13, 2007 at 10:11 am #268804
Riyad KallaMemberPraveen,
I’m sorry, I don’t know enough about WebLogic to know what it’s doing there exactly.Did you try googling for similar phrases like “NameNotFoundException: While trying to look up”?
April 16, 2007 at 10:35 pm #268929
PKKALLAMemberI am having problems deploying EJB.
When I select EJB project and click on deploy Icon and click on Add I don’t see weblogic server but if I can see weblogic server for war and ear projects.
Thanks for all your help.
Praveen.
-
AuthorPosts