8 Replies Latest reply on Feb 7, 2013 12:33 PM by Stephen J.

    Service Interface Error with Jheadstart


      i have a very simple Fusion application project in Jdeveloper (version using business components on the model side and ADF/JHeadstart on the ViewController side. I am using the HR example DB schema to successfully generate via Jheadstart and run the application. However, once I create a service interface on my appmodule to expose web services, I get the following error. I have been trying to find a solution for about a week now without success. Not being able to figure this out will prevent our project from using the Jheadstart technology.

      If any experts out there can help, please chime in. I also hope this doesn't get pushed as a ADF issue because from my testing, the BC4J/ADF pages seems to be fine. Once I generate my pages from Jheadstart, this seems to happen. If you need my project, i can send that as well. Thanks.


      <Jan 24, 2013 9:59:19 AM HST> <Warning> <HTTP> <BEA-101162> <User defined listener com.sun.faces.config.ConfigureListener failed: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! javax.faces.event.PhaseListener.
      com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! javax.faces.event.PhaseListener
           at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:214)
           at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:200)
           at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
           at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
           Truncated. see log file for complete stacktrace
      Caused By: java.lang.ClassNotFoundException: javax.faces.event.PhaseListener
           at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
           at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
           at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
           Truncated. see log file for complete stacktrace
        • 1. Re: Service Interface Error with Jheadstart
          Have you tried going through the JHS Tutorial? It works very well for the most part. It also looks like you have a library issue with your project. This is not a JHS issue. Do you have two different projects? One JHS enabled and one not? If so, there could be some library differences.

          Suggestion, create a new project with JHS enabled and go through the initial tutorial. Does this work? If so, compare that with your problem project.

          Best of luck,

          • 2. Re: Service Interface Error with Jheadstart
            Thank you for the reply and suggestion.

            I did follow the Jheadstart tutorial and it worked fine except when I add a service interface in the business components app module and try to run the application.

            Yes, I have 2 projects: Model and ViewController but that is the default from creating a adf fusion application. ViewController has JHS enabled and the Model doe not.

            I am just wandering if it not a JHS issue, why does the project run properly when I delete the web service interface?


            • 3. Re: Service Interface Error with Jheadstart
              Stephen J.
              I tried adding a service interface to the application module on one of my existing JHeadstart applications and got a similar error. The stack trace was different, but it had the same "CONFIGURATION FAILED!" line at the top. This was in JDev with JHS

              On a different JDev app that does not use JHS it started up fine and ran with no errors after adding a service interface. There are some significant differences between the 2 applications (the JHS one is considerably more complex), so I'm not positive JHS was the error factor (looking through the full stack trace in the log I don't see any reference to anything from the jheadstart libraries).

              Have you tried building a simple ADF app without JHS and seeing if it works after adding a service interface?
              • 4. Re: Service Interface Error with Jheadstart
                Steven Davelaar-Oracle

                Using your own existing ADF BC model project, can you create a second temporary ViewController project where you do not use Jheadstart, and just create a drag and drop page and see whether that works correctly?

                Steven Davelaar,
                Jheadstart team.
                • 5. Re: Service Interface Error with Jheadstart
                  Hello all,

                  Thank you for the replies. Yes, using the same ADF BC Model with a service interface, I created one page in ADF and it ran perfectly. I created a page using Jheadstart and there were the same errors that Stephen described.

                  I tried to compare what the differences are between the two projects but because they are so different, I am out of ideas. Any experts can help me?


                  • 6. Re: Service Interface Error with Jheadstart
                    Steven Davelaar-Oracle

                    I was able to reproduce this. It is a weird problem.
                    When I add the Jheadstart library and phase listener in faces-config.xml to a vnlilla ADF ViewController project, the problem starts occurring.
                    It looks to me like a weird class loading issue. I will further investigate, but as a work around, you can try to create the service interface in a separate "ModelServiceInterface" project.
                    You can do this by creating an ADF lib from your model project and import this library in your ModelServiceInterface project. Make sure this ModelServiceInterface project is not included in the same application (.jws) file.

                    Note that apart from being a work around, it is widely considered an ADF best practice to generate service interface artefacts in a separate JDev project.

                    Steven Davelaar,
                    JHeadstart Team.
                    • 7. Re: Service Interface Error with Jheadstart
                      Hey Steven,

                      Thank you for looking into it.

                      If I use the work-around to create a separate project for the service interface, can I still use the business components from the existing Model project? I do not want to have to re-create another set of duplicate ADF BC objects in my new Model project just so I can use the service interface. Does that make sense?

                      Thanks again.

                      • 8. Re: Service Interface Error with Jheadstart
                        Stephen J.
                        Hi Colin, different Stephen here, but yes, you can.

                        As Steven mentions, you'll need to deploy your existing model project into an ADF Library jar file, then create a new application with your model project for the service interface and import that library into your new service interface model. Then just remember to recompile that library any time you make changes to the BCs in the original model project.