Foren

Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse

Gergo Feher, geändert vor 9 Jahren.

Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse

New Member Beiträge: 22 Beitrittsdatum: 30.03.15 Neueste Beiträge
Hi!
I succesfully deployed the Liferay war to Oracle Weblogic Server 12c, and Liferay works well. My problem is that how can i deploy my own portlet to the Weblogic server? I've been working on a Primefaces based JSF portlet, and i work with Maven. I know that Weblogic doesn't support hot deployment. So i made a war file with a Maven plugin in the pom.xml. I deployed that war file on the Weblogic Console, and it deployed successfully. The problem is that i can't find my portlet in the samples folder.
My questions are:
Is it possible to deploy my own portlet to Weblogic 12c?
If it is, what's the best way to do that?
thumbnail
Philip White, geändert vor 9 Jahren.

RE: Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse (Antwort)

Junior Member Beiträge: 76 Beitrittsdatum: 11.03.15 Neueste Beiträge
Hello Gergo!

We have tested PrimeFaces 4.0 in WebLogic 12c and it worked.

Please follow the exact instructions in this wiki article.

And then at the END of the wiki article, please follow the links to the official Liferay 6.2 documentation for "Installing Liferay on Oracle WebLogic 12c (12.1.2 and higher)” followed by "Configuration for Deploying JSF Portlets”.

These are the exact steps that the Liferay Faces team followed when we did our testing prior to the 3.2.4-ga5 release.

Hope that helps!

Phil
Gergo Feher, geändert vor 9 Jahren.

RE: Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse

New Member Beiträge: 22 Beitrittsdatum: 30.03.15 Neueste Beiträge
Hello Philip!

Thank you the quick answer, but i've already done those configurations that you suggested. I managed to deploy the Liferay war, my problem is that i can't use my own portlet on the Liferay page.
I use Oracle Extension Pack for Eclipse (oepe) Eclipse version. I developed my own JSF portlet, with Primefaces. When i want to deploy it there's a message that, there's no resource that can be added - i attached a picture, EclipseWeblogicServer.jpg.
So i deployed my war on Weblogic console - i attached a new picture, deployedportlets.jpg. As you will see, the LIFEUI is my portlet jsf based Primefaces application.
After that i want to find that my portlet application in the Sample menu (i configured to do that there), but i couldn't - samples.jpg.
I tried my application with the Tomcat bundle, and it worked. I found the application in the Samples menu. And on Tomcat the Eclipse Add/and Remove deployment worked.
So, my question is, what did i wrong? My Liferay war works on Weblogic, but i can't find the deployed portlet. Is it possible to deploy my portlet to Weblogic?

Thanks,
Gergo
thumbnail
Juan Gonzalez, geändert vor 9 Jahren.

RE: Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse

Liferay Legend Beiträge: 3089 Beitrittsdatum: 28.10.08 Neueste Beiträge
Hi Gergo,

Liferay does some preprocessing of portlets before they are actually deployed. This is done automatically by Liferay when your server supports hot deploy. In your case you have to make this preprocessing by yourself.

For that task, you can use Liferay Maven plugin, taking into account that you should use:

mvn liferay:direct-deploy


Remember to set the required Maven properties in your pom.xml (you have them in the previous link), so after executing that task, your ready-to-deploy WAR will be copied to that location.

Tell us if you had any problem.

Thanks!
thumbnail
Philip White, geändert vor 9 Jahren.

RE: Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse

Junior Member Beiträge: 76 Beitrittsdatum: 11.03.15 Neueste Beiträge
Hello Gergo!

Please try and deploy the attached primefaces4-portlet to your instance of weblogic to see if it works. This portlet was built using the latest patches and the "-P weblogic" profile from the liferay faces project.

If you have followed the directions that were given to install Liferay on weblogic, you will be able to copy this war into the liferay-6.2/deploy directory and watch the portlet autodeploy in the weblogic server log, and then add the portlet to a page from the
"+" -> Applications -> Samples menu.

Let us know if the portlet is working in your environment!

Phil
Gergo Feher, geändert vor 9 Jahren.

RE: Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse

New Member Beiträge: 22 Beitrittsdatum: 30.03.15 Neueste Beiträge
Thank you guys the instructions!

Unfortunately i can try it just in the evening. But i will inform you!

Thanks,
Gergo
Gergo Feher, geändert vor 9 Jahren.

RE: Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse

New Member Beiträge: 22 Beitrittsdatum: 30.03.15 Neueste Beiträge
Hi guys again!

I have one more question:
Can i deploy PrimeFaces 5.1 portlet? I tried that with that Tomcat bundle, and worked there.

Thank you,
Gergo
thumbnail
Philip White, geändert vor 9 Jahren.

RE: Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse

Junior Member Beiträge: 76 Beitrittsdatum: 11.03.15 Neueste Beiträge
Hello Gergo!

You can simply rely on Maven Central for obtaining the Liferay Portal dependencies. However if you are behind a firewall that does not have visibility to the Internet, then you would need to run the “ant install” command in order to install them into your local $HOME/.m2/repository location.

Regarding your question, you can use PrimeFaces 5.1 but you need to apply all of the patches for GA5 (mentioned in this blog post).

Hope this helps!

Phil
Gergo Feher, geändert vor 9 Jahren.

RE: Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse

New Member Beiträge: 22 Beitrittsdatum: 30.03.15 Neueste Beiträge
Hi again!

Unfortunately i had no time to try things you said. But now i have some deployment problems. Here is the error message:

<2015.04.13. 12:12:10 CEST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "5507421118300" for task "8". Error is: "weblogic.application.ModuleException: Error: Unresolved Webapp Library references for "WebAppModule(FirstPorlet-1.0.0-SNAPSHOT:FirstPorlet-1.0.0-SNAPSHOT)", defined in weblogic.xml [Extension-Name: jsf, exact-match: false]"
weblogic.application.ModuleException: Error: Unresolved Webapp Library references for "WebAppModule(FirstPorlet-1.0.0-SNAPSHOT:FirstPorlet-1.0.0-SNAPSHOT)", defined in weblogic.xml [Extension-Name: jsf, exact-match: false]
at weblogic.servlet.internal.WebAppModule.mergeWebAppLibraries(WebAppModule.java:523)

I couldn't upgrade mojarra, is it because of that? I downloaded the liferay-faces-3.2.4-ga5 version. I navigated to the support directory. There i ran mvn clean install command, then it installed a liferay-faces-support-3.2.4-ga5 pom file to my local .m2 directory, but there was no jsf jar file. So i couldn't replace the glassfish.jsf_1.0.0.0_2-1-20.jar.

What am i doing wrong?
thumbnail
Philip White, geändert vor 9 Jahren.

RE: Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse (Antwort)

Junior Member Beiträge: 76 Beitrittsdatum: 11.03.15 Neueste Beiträge
Hello Gergo!

Happy to help again! I think I was able to reproduce your current problem and found a fix for it. There was a previous issue addressing this particular error.

First, what you'll need to do is to go into this path directory's pom.xml -> [source]/support/weblogic/glassfish-jsf/pom.xml

Then, all you need to do is remove the "-SNAPSHOT" from the line of code "<version>3.2.4-ga5-SNAPSHOT</version>". So, it should go from this -->
<modelversion>4.0.0</modelversion>
	<parent>
		<groupid>com.liferay.faces.support</groupid>
		<artifactid>liferay-faces-support-weblogic</artifactid>
		<version>3.2.4-ga5-SNAPSHOT</version>
		<relativepath>../pom.xml</relativepath>
	</parent>


to this corrected one -->

<modelversion>4.0.0</modelversion>
	<parent>
		<groupid>com.liferay.faces.support</groupid>
		<artifactid>liferay-faces-support-weblogic</artifactid>
		<version>3.2.4-ga5/version&gt;
		<relativepath>../pom.xml</relativepath>
	</version></parent>


After you remove "-SNAPSHOT", just do a "mvn -P weblogic install" on the command line, and that should put the jar in your local maven repo! :-)

Hope this helps!

Phil
Gergo Feher, geändert vor 9 Jahren.

RE: Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse

New Member Beiträge: 22 Beitrittsdatum: 30.03.15 Neueste Beiträge
Hello!

Thank you, Removing the "-SNAPSHOT" was OK., but the mvn -P weblogic install command failed after that also. The error message is the following:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.5 .1:install-file (install) on project glassfish.jsf_1.0.0.0_2-1-21:
The specified file 'C:\Users\gergo.feher\Desktop\Environment\liferay-faces-3.2.4-ga5\support\ weblogic\glassfish-jsf\${env.MW_HOME}\wlserver\modules\glassfish.jsf_1.0.0.0_2-1 -20.jar' not exists

It's clear that no jar in this location, but i don't understand why it tries to find it there. The pom configuration says, that i have to search the jar and the pom in this folders:
<configuration>
<file>${env.MW_HOME}/wlserver/modules/glassfish.jsf_${weblogic.shipped.jar.version}.jar</file>
<pomFile>${env.MW_HOME}/wlserver/plugins/maven/com/oracle/weblogic/glassfish.jsf_${weblogic.shipped.jar.version}/${weblogic.short.version}/glas sfish.jsf_${weblogic.shipped.jar.version}.${weblogic.short.version}.pom</pomFile>
</configuration>

I think my MW_HOME variable is correct:
export MW_HOME=C:\Users\gergo.feher\Desktop\Environment\wls12130

And i can find the jar at this location:
c:\Users\gergo.feher\Desktop\Environment\wls12130\wlserver\modules\glassfish.jsf_2.0.0.0_2-1-20.jar
And the pomFile at this location:
c:\Users\gergo.feher\Desktop\Environment\wls12130\wlserver\plugins\maven\com\oracle\weblogic\glassfish.jsf_2.0.0.0_2-1-20\12.1.3\glassfish.jsf_2.0.0.0_2-1-20.12.1.3.pom

I run this mvn -P weblogic install command from this location:
c:\Users\gergo.feher\Desktop\Environment\liferay-faces-3.2.4-ga5\support\

Thank you for your help,
Gergo
thumbnail
Philip White, geändert vor 9 Jahren.

RE: Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse (Antwort)

Junior Member Beiträge: 76 Beitrittsdatum: 11.03.15 Neueste Beiträge
Hello Gergo!

So, it might be that "mvn -P weblogic install command failed" for you possibly because you are using a newer version of WebLogic than that which we tested with. Please download and extract the "wls1212_dev.zip" like we mention in our Wiki.

Once you are able to do that, please try again and see if this works! :-)

Phil
Gergo Feher, geändert vor 9 Jahren.

RE: Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse

New Member Beiträge: 22 Beitrittsdatum: 30.03.15 Neueste Beiträge
Hello!

Yes, i use Weblogic 12.1.3. version. I will try it with version 12.1.2.

Thanks,
Gergo
Gergo Feher, geändert vor 8 Jahren.

RE: Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse

New Member Beiträge: 22 Beitrittsdatum: 30.03.15 Neueste Beiträge
Hi Philip!

Finally i could deploy my Primefaces JSF portlet on Weblogic server! As you said it worked on Weblogic 12.1.2. And it worked when i deployed liferay-portal-6.2-ce-ga3 war to my server, it didn't work with version ga2!

Thank you for your help!
Gergo
Abhishek Kumar, geändert vor 7 Jahren.

RE: Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse

New Member Beitrag: 1 Beitrittsdatum: 28.06.16 Neueste Beiträge
How can I setup Liferay IDE eclipse, with Oracle Weblogic 12C as my App Server for Liferay 6.2 ?
thumbnail
Gregory Amerson, geändert vor 7 Jahren.

RE: Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse

Liferay Legend Beiträge: 1123 Beitrittsdatum: 16.02.10 Neueste Beiträge
Hello Abhishek,

We don't have specific support for treating Oracle Weblogic as a "Liferay server". But you can install Oracle's own Eclipse plugin to get support for starting/stopping the server.

For deploying projects you will need to use the "ant or maven or gradle" deploy tasks for your project. Let us know how you are setting up your project if you want more info on how to setup Liferay IDE and your project type (maven or other).
arun yadav, geändert vor 6 Jahren.

RE: Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse

New Member Beitrag: 1 Beitrittsdatum: 30.05.17 Neueste Beiträge
hi gergo,
i m trying to deploy war file of liferay6.2 on web logic server but i m not able to do that i m getting error like

'weblogic.kernel.Default (self-tuning)'][PortalApplicationContext:89] org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/base-spring.xml]; nested exception is java.lang.NoSuchMethodError: org.apache.xerces.impl.xpath.regex.RegularExpression.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/util/Locale;)
thumbnail
Neil Griffin, geändert vor 6 Jahren.

RE: Liferay 6.2 + Primefaces + Oracle Weblogic Server 12c + Eclipse

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
In order to help us better help you with the problem, please download the attached com.liferay.faces.demo.jsf.applicant.portlet.war artifact and copy it to the $LIFERAY_HOME/deploy folder in your Liferay 6.2 WebLogic environment. After that, see if you can add the "JSF Applicant" portlet to a portal page and use the portlet successfully.