DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Cookies Revisited: A Networking Solution for Third-Party Cookies
  • Using Event-Driven Ansible to Monitor Your Web Application
  • The Blue Elephant in the Room: Why PHP Should Not Be Ignored Now or Ever
  • Azure Deployment Using FileZilla

Trending

  • Rust, WASM, and Edge: Next-Level Performance
  • Scaling Microservices With Docker and Kubernetes on Production
  • Using Java Stream Gatherers To Improve Stateful Operations
  • Efficient API Communication With Spring WebClient

Running RichFaces 4.1.0.Final on WebLogic 12c

By 
Markus Eisele user avatar
Markus Eisele
·
Dec. 19, 11 · Interview
Likes (0)
Comment
Save
Tweet
Share
7.2K Views

Join the DZone community and get the full member experience.

Join For Free

You might have noticed, that I simply love JSF. Not only the specification and the reference implementation Mojarra but also the most creative component suites on the market. This is my all-time favorite PrimeFaces and of course RichFaces. This is the reason why you find "running xxx on xxx" posts here :) Today is my RichFaces and WebLogic day, so a little followup on my earlier post this is more an update on how to get it running on latest WebLogic 12c. Here we go:

Preparation
Download the IDE of your choice. I will use NetBeans 7.1 RC 2 for this post. Download and install WebLogic Server 12c. Either with the platform installer of your choice or from the ZIP distribution. Go on with creating a domain and adding the server to NetBeans. (For more details see my earlier post.) Go back to NetBeans, check your maven settings and create a new Maven Web Application project. Let's call it rfshowcase for now. Enter the missing stuff (Group, Version and Package). Select or add your local Oracle WebLogic server as your runtime environment. Add the JBoss Maven repository and the magic richfaces-bom to your pom.xml:

<repositories>
 <repository>
 <id>jboss</id>
 <name>JBoss Repository</name>
 <url>http://repository.jboss.org/nexus/content/groups/public/</url>
 </repository>
</repositories> 
<properties>
 <org.richfaces.bom.version>4.1.0.Final</org.richfaces.bom.version>
 <!-- ... -->
    </properties>
 
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.richfaces</groupId>
                <artifactId>richfaces-bom</artifactId>
                <version>${org.richfaces.bom.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
<!-- ... -->
        </dependencies>
    </dependencyManagement>
Add the RichFaces dependencies:
<dependency>
 <groupId>org.richfaces.ui</groupId>
 <artifactId>richfaces-components-ui</artifactId>
</dependency>
 
<dependency>
 <groupId>org.richfaces.core</groupId>
 <artifactId>richfaces-core-impl</artifactId>
</dependency>

And you are done! Unlike with earlier version of WLS (compare my older post) JSF 2.x and JSTL 1.2 have been incorporated directly into the server's classpath. Applications deployed to WebLogic Server can seamlessly make use of JSF 2.x and JSTL 1.2 without requiring developers to deploy and reference separate shared libraries. So, you can actually start implementing your application.

Some simple tests
Let's go and add an index.xhtml to your Web Pages folder. Add the RichFaces namespaces to your html tag:

xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"

And start using your needed components. In my little example I stripped down the rich:panelMenu taken from the showcase.richfaces.org . Now right click on your project and "Run" it! NetBeans is starting your WLS instance and deploys your application. After this is done it should open a browser which points you to http://localhost:7001/rfshowcase/ and you see your application up and running. That's all. Nothing more to do. No library deployment, nothing else. That's what I would call a good progress. Compared to the stupid library deployment that was needed with earlier versions of WLS you know have the freedom to use whatever comes your way. Even if you feel like using another RI you could simply revert the classloader by specifying the prefer-application-packages tag in your weblogic.xml

13.12.2011 20:48:43 org.richfaces.application.InitializationListener onStart
INFO: RichFaces Core Implementation by JBoss, 
a division of Red Hat, Inc., version v.4.1.0.Final

Clazzloading or Oracle and RedHat vs. Google
If you look at your application from a classloader point of view you will see, that you have a good number (705) of classes in conflict. In the case of RichFaces all these are in the com.google.common.* package. The reason for that is, that WLS is distributing a com.google.common_1.0.0.0_0-6.jar which conflicts with the RichFaces dependency com.google.guava.guava.r08. Running my small tests this doesn't seem to do any harm at all. But it would be best to configure a so called FilteringClassLoader which provides a mechanism for you to configure deployment descriptors to explicitly specify that certain packages should always be loaded from the application, rather than being loaded by the system classloader. So you should change your project to be an EAR module and add this little paragraph to your weblogic-application.xml (ear level):
<prefer-application-packages>
   <package-name>com.google.common.*</package-name>
</prefer-application-packages>

 

From http://blog.eisele.net/2011/12/running-richfaces-410final-on-weblogic.html

RichFaces Web application

Opinions expressed by DZone contributors are their own.

Related

  • Cookies Revisited: A Networking Solution for Third-Party Cookies
  • Using Event-Driven Ansible to Monitor Your Web Application
  • The Blue Elephant in the Room: Why PHP Should Not Be Ignored Now or Ever
  • Azure Deployment Using FileZilla

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!