XML Serialization in EJB

Discussions

EJB design: XML Serialization in EJB

  1. XML Serialization in EJB (2 messages)

    I am working on Weblogic8.1 ...I am using XML Serialization in my application...this needs DOM4J.jar
    i have this file in the classpath...so the application compilation is done...
    I am creating the jar file out of the class files related to the application and deploying it in the server...
    but during run time its unable to find out files that is related to struts...

    java.rmi.RemoteException: EJB Exception: ; nested exception is:
            java.lang.NoClassDefFoundError: org/apache/xml/serialize/OutputFormat
            at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:186)
            at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
            at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
            at bny.pt.projects.ProjectModule_vxzdss_EOImpl_811_WLStub.searchProjects(Unknown Source)
            at bny.pt.projects.ProjectSearchAction.execute(ProjectSearchAction.java:56)
            at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:480)

            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
            at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.jav
    a:1053)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
            at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletC
    ontext.java:6316)
            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:36
    22)
            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)

    Caused by: java.lang.NoClassDefFoundError: org/apache/xml/serialize/OutputFormat
            at bny.pt.common.XMLProcessor.getScheduleOverRunReport(XMLProcessor.java:128)
            at bny.pt.projects.ProjectBean.searchProjects(ProjectBean.java:199)
            at bny.pt.projects.ProjectModule_vxzdss_EOImpl.searchProjects(ProjectModule_vxzdss_EOImpl.ja
    va:97)
            at bny.pt.projects.ProjectModule_vxzdss_EOImpl_WLSkel.invoke(Unknown Source)
            at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
            ... 21 more

    Threaded Messages (2)

  2. XML Serialization in EJB[ Go to top ]

    Put your EJB jar in an EAR file and put your shared classes
    in APP-INF/lib and APP-INF/classes

    Your ear file will look something like this

    app.ear
    --------------

    APP-INF/lib/utils.jar
    APP-INF/classes/Util.class
    META-INF/application.xml
    myejb.jar


    Jirawat Uttayaya
  3. XML Serialization in EJB[ Go to top ]

    This in all probability sounds like a class loader visibility problem. Make sure that DOM4J / related XML parser classes are not present in Weblogic's app server common lib areas / along with weblogic.jar. If present, it is trying to load it via appserver's root class loader and it is not finding it, because you have placed it inside a child loader's classpath.

    sanjaya_ganesh@yahoo.com