facebook

Error deploying EJB on weblogic8

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #268390 Reply

    PKKALLA
    Member

    Hi 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.

    #268421

    Riyad Kalla
    Member

    Praveen,
    It looks like your application.xml file is invalid… can you copy-paste it here for us to see?

    #268508

    PKKALLA
    Member

    Riyad.

    Here is the content from application.xml

    ____________________________________________________________________________

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <application xmlns=”http://java.sun.com/xml/ns/j2ee&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; version=”1.4″ xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd”&gt;
    <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.

    #268509

    Riyad Kalla
    Member

    Praveen,
    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.

    #268610

    PKKALLA
    Member

    Riyad:

    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.

    #268612

    PKKALLA
    Member

    Riyad:

    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.

    #268617

    Riyad Kalla
    Member

    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?

    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/

    #268669

    PKKALLA
    Member

    Riyad:

    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 error

    Total time: 1 second

    thanks,
    praveen

    #268670

    Riyad Kalla
    Member

    Praveen,
    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)

    #268728

    PKKALLA
    Member

    Riyad:

    My bad.

    I think this is the best support I every got.

    Thanks a lot.

    Praveen.

    #268737

    Riyad Kalla
    Member

    Praveen, thank you for the kind words. I’m glad it helped.

    #268777

    PKKALLA
    Member

    Sorry Riyad,
    When I run xDoclet I am getting the following

    java.lang.UnsupportedClassVersionError: xjavadoc/ant/XJavadocTask (Unsupported major.minor version 49.0)

    Thanks for your time

    Praveen.

    #268778

    PKKALLA
    Member

    Please 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 code

    HelloWorldLocalHome 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,
    Praveen

    #268804

    Riyad Kalla
    Member

    Praveen,
    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”?

    #268929

    PKKALLA
    Member

    I 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.

Viewing 15 posts - 1 through 15 (of 15 total)
Reply To: Error deploying EJB on weblogic8

You must be logged in to post in the forum log in