facebook

Enterprise Application Error With Weblogic 7

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

    jadeite1000
    Member

    Hi All:

    I am using Weblogic 7, MyEclipse 5.1.
    I tried to create an enterprise application in MyEclipse.
    I tried the tutorial in the following url:

    http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/earprojects/index.html

    Please note, I add the xml files for weblogic but didnot add the source code yet and I get the following error. This error occurs when I tried to deploy the enterprise application to weblogic 7 server:

    <Jan 2, 2004 10:52:02 AM EST> <Error> <Deployer> <149027> <Unable to activate application, _appsdir_Test1_dir, from source, C:\bea\user_projects\Achievers\applications\Test1. Reason: Failed to parse deployment descriptor for C:\bea\user_projects\Achievers\applications\Test1. Error: 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:

    Also, I get the error even if add all of the source for the ejbs for the ejb project and all of the jsp for the web project.

    I believed it has to do with the xml created in the application.xml when I am using File/New Project/MyEclipse Enterprise Application Project.

    I don’t believe this has anything to do with my Code because I can get the enterprise application project to work in weblogic 7 by just using ant but not using MyEclipse to create the enterprise application project.

    I deploy the enterprise application by clicking on the “Project Development” button and choosing the project “TEST1” for deployment on weblogic 7.

    Is there a tutorial for creating an Enterprise Application using MyEclipse with Weblogic 7 or Weblogic 8?

    Yours,

    Desperate

    #264011

    Riyad Kalla
    Member

    Desperate,
    My guess is that you selected J2EE 1.4 spec (which is the default when you create an enterprise app) instead of J2EE 1.3. And WebLogic 7 only supports the 1.3 spec.

    Try and recreate the new enterprise project, specifcy J2EE 1.3, and you should be all set.

    #264020

    jadeite1000
    Member

    @support-rkalla wrote:

    Desperate,
    My guess is that you selected J2EE 1.4 spec (which is the default when you create an enterprise app) instead of J2EE 1.3. And WebLogic 7 only supports the 1.3 spec.

    Try and recreate the new enterprise project, specifcy J2EE 1.3, and you should be all set.

    Hi:

    You’re right. It was the J2EE 1.3 setting.
    I created a enterprise application project called “ex07”. An enterprise javabeans project called “ex07EJB” and a web project called “ex07Web” and when I tried the following url:

    http://localhost:7001/ex07Web/jsp/Client_71.jsp

    Error 404 not found.

    Here is the contents of my application.xml:

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE application PUBLIC “-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN” “http://java.sun.com/dtd/application_1_3.dtd”&gt;

    <application>
    <display-name>ex07</display-name>
    <module id=”myeclipse.1073063579093″>
    <web>
    <web-uri>ex07Web.war</web-uri>
    <context-root>/ex07Web</context-root>
    </web>
    </module>
    <module id=”myeclipse.1073063579234″>
    <ejb>ex07EJB.jar</ejb>
    </module>
    </application>

    This is just a plain web application that calls ejb. No struts or jsf framework used for the web project!!

    What should be the url. I placed my jsp files in a folder called “jsp”.

    Yours,

    Desperate.

    #264023

    Riyad Kalla
    Member

    What does your ex07Web project look like structure-wise? Is it a normal web project? If you put a new JSP, with just some simple text in it (like the default JSP template) called “index.jsp” into the WebRoot of the project, then redeploy it, can you see the page from:

    http://localhost:7001/ex07Web

    ?

    #264035

    jadeite1000
    Member

    @support-rkalla wrote:

    What does your ex07Web project look like structure-wise? Is it a normal web project? If you put a new JSP, with just some simple text in it (like the default JSP template) called “index.jsp” into the WebRoot of the project, then redeploy it, can you see the page from:

    http://localhost:7001/ex07Web

    ?

    Hi:

    I am able to setit up to run the jsp that calls the ejb now. I started the weblogic 7 server within MyEclipse 5.1.
    However, I am not able to debug the jsp pages.
    Code such as the following should be debuggable as long as I put a break point:

    <%

    try {
    // obtain CustomerHome
    Context jndiContext = getInitialContext();
    Object obj = jndiContext.lookup(“CustomerHomeLocal”);
    CustomerHomeLocal customerhome = (CustomerHomeLocal)obj;

    obj = jndiContext.lookup(“CreditCardHomeLocal”);
    CreditCardHomeLocal cardhome = (CreditCardHomeLocal)obj;

    out.print(“<H2>Creating Customer 71</H2>”);

    Integer primaryKey = new Integer(71);
    CustomerLocal customer = customerhome.create(primaryKey);
    customer.setName( new Name(“Smith”,”John”) );

    out.print(“<H2>Creating CreditCard</H2>”);

    // set Credit Card info
    Calendar now = Calendar.getInstance();
    CreditCardLocal card = cardhome.create(now.getTime(), “370000000000001”, “John Smith”, “O’Reilly”);

    out.print(“<H2>Linking CreditCard and Customer</H2>”);

    customer.setCreditCard(card);

    out.print(“<H2>Testing both directions on relationship</H2>”);

    String cardname = customer.getCreditCard().getNameOnCard();
    out.print(“customer.getCreditCard().getNameOnCard()=”+cardname+”<br>”);

    Name name = card.getCustomer().getName();
    String custfullname = name.getFirstName()+” “+name.getLastName();
    out.print(“card.getCustomer().getName()=”+custfullname+”<br>”);

    out.print(“<H2>Contents of Tables</H2>”);

    String table = “CUSTOMER”;
    %><%@ include file=”ViewTable.jsp” %><%

    table = “CREDIT_CARD”;
    %><%@ include file=”ViewTable.jsp” %><%

    out.print(“<H2>Unlink the beans using CreditCard, test Customer side</H2>”);

    card.setCustomer(null);

    CreditCardLocal newcardref = customer.getCreditCard();
    if (newcardref == null) {
    out.print(“Card is properly unlinked from customer bean<br>”);
    } else {
    out.print(“Whoops, customer still thinks it has a card!<br>”);
    }

    table = “CUSTOMER”;
    %><%@ include file=”ViewTable.jsp” %><%

    table = “CREDIT_CARD”;
    %><%@ include file=”ViewTable.jsp” %><%

    %>

    Why doesn’t it work.
    Is there something wrong with myEclipse 5.1 settings. It’s running weblogic 7.1 in debug mode.

    Yours,

    Desperate

    #264037

    Riyad Kalla
    Member

    Desperate,
    Debugging of JSPs require that the app server support the JSR-45 debugging specification, and WebLogic 7 unfortunately does not so JSP debugging is not going to be available to you. I’m sorry for the hassle.

    #264038

    jadeite1000
    Member

    @support-rkalla wrote:

    Desperate,
    Debugging of JSPs require that the app server support the JSR-45 debugging specification, and WebLogic 7 unfortunately does not so JSP debugging is not going to be available to you. I’m sorry for the hassle.

    Hi:

    If I installed weblogic 81 sp6 and set the domain in debug mode. Will I be able to get MyEclipse to debug the jsp in Weblogic 8 sp6. Do I have to do anything else special so I can debug the jsp pages.

    Yours,

    Desperate

    #264039

    jadeite1000
    Member

    @support-rkalla wrote:

    Desperate,
    Debugging of JSPs require that the app server support the JSR-45 debugging specification, and WebLogic 7 unfortunately does not so JSP debugging is not going to be available to you. I’m sorry for the hassle.

    Hi:

    If I installed weblogic 81 sp6 and set the domain in debug mode. Will I be able to get MyEclipse to debug the jsp in Weblogic 8 sp6. Do I have to do anything else special so I can debug the jsp pages.

    Yours,

    Desperate

    #264041

    Riyad Kalla
    Member

    Desperate,
    You just need to make sure that debugging is setup correctly per this FAQ entry:
    http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-10419.html

    However there is a bug we are tracking with “Source not found” issues when stopping in JSP breakpoints in large projects on WebLogic. We haven’t been able to track down exactly what is wrong because we cannot reproduce the problem internally, but our users can. The thread is here:
    https://www.genuitec.com/forums/topic/jsp-debugging-source-not-found-3/#post-263723

    #264043

    jadeite1000
    Member

    @support-rkalla wrote:

    Desperate,
    You just need to make sure that debugging is setup correctly per this FAQ entry:
    http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-10419.html

    However there is a bug we are tracking with “Source not found” issues when stopping in JSP breakpoints in large projects on WebLogic. We haven’t been able to track down exactly what is wrong because we cannot reproduce the problem internally, but our users can. The thread is here:
    https://www.genuitec.com/forums/topic/jsp-debugging-source-not-found-3/#post-263723

    Hi:

    I am using MyEclipse 5.1, Weblogic 7 sp7.
    In the “Debug” window, I can see things like the following:
    CustomerBean.ejbCreate(Integer)line 20
    and I can see the values of the variable in the “Variables” tab but in the CustomerBean.java source code, I cannot see the line 20 being highlighted.

    I am trying to debug an enterprise javabean. I am running the weblogic 7 within myEclipse(or I start weblogic 7 from MyEclipse).

    Is there an reason for this problem.

    Yours,

    Desperate

    #264046

    jadeite1000
    Member

    @support-rkalla wrote:

    Desperate,
    You just need to make sure that debugging is setup correctly per this FAQ entry:
    http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-10419.html

    However there is a bug we are tracking with “Source not found” issues when stopping in JSP breakpoints in large projects on WebLogic. We haven’t been able to track down exactly what is wrong because we cannot reproduce the problem internally, but our users can. The thread is here:
    https://www.genuitec.com/forums/topic/jsp-debugging-source-not-found-3/#post-263723

    Hi Riyad:

    In your forum you say I have to edit the weblogic.xml to debug the jsp for weblogic 8.1.
    This is the following code for weblogic.xml

    <!DOCTYPE weblogic-web-app PUBLIC “-//BEA
    Systems, Inc.//DTD Web Application 7.0//EN”
    http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd”&gt;
    <weblogic-web-app>
    <description>WebLogic Descriptor</description>
    <jsp-descriptor>
    <jsp-param>
    <param-name>debug</param-name>
    <param-value>true</param-value>
    </jsp-param>
    </jsp-descriptor>
    </weblogic-web-app>

    But which weblogic.xml file should I edit?
    I created an domain called “Achievers” but I cannot find the weblogic.xml file in the Achievers directory. I did a search for weblogic.xml file under c:\bea but there are so many weblogic.xml file.
    Can you please tell me which weblogic.xml file do I edit.
    I used the default server. I believed it’s called “myserver”.
    Weblogic does create such directory C:\beaWeblogic81\user_projects\domains\Achievers\myserver

    but cannot find the weblogic.xml file

    Yours,

    Desperate

    #264049

    Riyad Kalla
    Member

    I believe it would be under the web project WEB-INF dir that is deployed as part of the EAR. For example, this is my path:
    <WL install dir>\user_projects\domains\mydomain\applications\myear.ear\myWeb\WEB-INF

    for the “mydomain” domain, and the “myear.ear” application I deployed with the “myWeb” web module.

    #264065

    jadeite1000
    Member

    @support-rkalla wrote:

    I believe it would be under the web project WEB-INF dir that is deployed as part of the EAR. For example, this is my path:
    <WL install dir>\user_projects\domains\mydomain\applications\myear.ear\myWeb\WEB-INF

    for the “mydomain” domain, and the “myear.ear” application I deployed with the “myWeb” web module.

    Hi:

    I searched under the directory
    c:\beaWeblogic81\user_projects\domains\Achievers\

    and I cannot find the weblogic.xml file. If it’s not there, Am I suppose to create one and place it under the following directory

    c:\beaWeblogic81\user_projects\domains\Achievers\Ex071Weblogic81\Ex071Weblogic81Web\WEB-INF\

    Yours,

    Desperate

    #264075

    Riyad Kalla
    Member

    I’m using my WebLogic 8.1sp6 install to test with, and I’ve never manually created the weblogic.xml file… I believe WL created it manually when the project was deployed. The contents look like this:

    
    <?xml version="1.0"?>
    <!-- 
        **************************************************************************
        * $Archive: $
        * $Workfile: $
        * $Modtime: $
        * $Date: $
        * $Revision: $
        * $Author: $
        * sPVCSLabel = "zPVCSLabelz"
        **************************************************************************
    -->
    <!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
    <weblogic-web-app>
        <description>WebLogic Descriptor</description>
    
        <jsp-descriptor>
            <jsp-param>
                <param-name>verbose</param-name>
                <param-value>TRUE</param-value>
            </jsp-param>
            <jsp-param>
                <param-name>pageCheckSeconds</param-name>
                <param-value>1</param-value>
            </jsp-param>
            <jsp-param>
                <param-name>printNulls</param-name>
                <param-value>false</param-value>
            </jsp-param>
            <jsp-param>
                <param-name>debug</param-name>
                <param-value>true</param-value>
            </jsp-param>
            <jsp-param>
                <param-name>keepgenerated</param-name>
                <param-value>true</param-value>
            </jsp-param>
            <jsp-param>
                <param-name>workingDir</param-name>
                <param-value>mytestapp</param-value>
            </jsp-param>
        </jsp-descriptor>
        <container-descriptor>
            <servlet-reload-check-secs>-1</servlet-reload-check-secs>
            <prefer-web-inf-classes>true</prefer-web-inf-classes>
        </container-descriptor>
    </weblogic-web-app>
    
Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: Enterprise Application Error With Weblogic 7

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