2 Replies Latest reply on Feb 4, 2012 1:00 AM by user9503787

    How to add server runtime

      Hi, I created a java project that has util classes. I need to use the HttpSevlet API. So i tried to add weblogic libraries. But it says "Weblogic System Libraries can only be used with projects that target a Weblogic Server runtime". Then I click the Server Runtime, but it's empty. how can I bring in the Weblogic Server runtime? I know I have it since the same project was imported fine. I just want to create a fresh project from the scratch and take the source from the imported proejct. I noticed that in the imported project there is a Oracle Weblogic Portal Server entry. But when I add it, it shows Error: No Oracle Weblogic Server Runtime on project... Thanks!
        • 1. Re: How to add server runtime
          While there is a way to turn a plain Java project into something that you can deploy to WLS, for a new user, I would recommend starting from scratch by creating a utility project instead (search for utility in the new project dialog). That project wizard will create a Java project with additional metadata for targetting WLS. The utility project wizard will help you to create WLS runtime on the first page of the wizard. Once you have a utility project created, you can move over your existing Java classes.

          Hope that helps.

          - Konstantin
          • 2. Re: How to add server runtime
            Thank you. That's exactly what I am looking for. I thought utility project is just a java project, but now I realize utility is under J2EE. However, utility doesn't have log4j included. I know log4j is in modules under install. what's the good way to add it in? I tried to add as External jar, but I got Classpath Dependency Validator Message error:
            Classpath entry C:/oracle/Middleware/modules/com.bea.core.apache.log4j_1.2.13.jar will not be exported or published. Runtime ClassNotFoundExceptions may result.      

            Also the project eventually needs to be a jar file to be distibuted and I have ant build file to build it already. Can the build be part of the project setup, meaning using the ant build? Thanks!