Liferay on Glassfish. Spring portlet is deployed successfully but not showing up in the Liferay "Add Application" list - deployment

I'm using Liferay 6.1.2 on Glassfish 3.2.2. I'm able to deploy Spring portlet successfully (A working and verified portlet on the previous glassfish/liferay build) but it is not showing up in the Liferay "Add Application" list.
I've checked the xml namespace declarations, liferay xml files (portlet, display) and all seem to be compliant with the liferay specs. The logs do not show any errors but I did notice that the logs were NOT showing the "x portlets are available for use" message as it used to in the previous build.

The problem was with the Liferay build itself. The web.xml parser is faulty and breaks when comments/filters are present in web.xml. I got the latest patches from Liferay and that fixed it. The other way to fix it is to remove comments from web.xml and clean up the filter declarations properly.

Related

When downloading Mojarra libraries for JSF it is showing error "zip file is empty" in Eclipse

I'm working on JSF project, I'm trying to set up project facets in Eclipse, When I'm downloading Mojarra libraries for JSF2.2 it is giving error message. I'm using Eclipse Neon 2.
See the below image for more information.
Update: Updated.
Adding Mojarra Manually When Eclipse Luna/NEON/Oxygen JSF Download Library Is Empty...
When I was setting up a fresh install of JavaEE on my laptop today, the JSF Download Library would not return any results to download. Some searching suggested that I had to change my proxy settings but since I was not behind a proxy,
Actually some sorts are saying temporarily / Website is offline that's why its not downloadable ...
it would not help me. Lucky enough, JSF are just another bunch of jars that can be added to a user library.
You can download the JSF Scroll down here for newest versions of JSF jars...
Download JSF API JAR JSF API jar file
Download JSF IMPL JAR JSF IMPl jar file
Then simply; click the “Manage Libraries” icon on the JSF capabilities page click “New” and name your library
click “Add external jars” and browse to the jars you downloaded
Finally you are fully featured to the JSF Mojjara Library
Thanks...
I have downloaded javax.faces.jar file from maven repository. Added that jar file to classpath, now it is working fine.
javax.faces.jar
I found other sotution, when you start a new dynamic Web proyect pick "New runtime", then Oracle>Glassfish, install it and restart eclipse, JSF library is probided by Glassfish so in JSF Capabilities panel (when the new proyect is created) , glassfish is assigned by default (the System library). it works for me :)

Not able to create Liferay Plugin Project in Eclipse

I am new to liferay and i am trying to create a new Liferay Plugin Project.
I did a right click on package explorer and clicked on 'New Liferay Plugin Project'.
After that i entered the Project and Display name then i selected the Liferay MVC as my portlet framework and i clicked finish.
As soon i click on finish, it shows "Error creating Liferay Plugin Project: Please see eclipse error log for the details".
After this i changed ivy.jar.url in build.properties file from "http://repo1.maven.org/maven2/org/apache/ivy/ivy/2.3.0/ivy- 2.3.0.jar"
to "=C:\Rahul13615\liferay\plugins.ivy\ivy-2.3.0.jar".
I did and still i am getting the same error.
Maybe it's not exact answer to your question, but for Liferay 6.2 development I recommend using Apache Maven 3 as build tool.
Download Maven separately https://maven.apache.org/ and install.
Then at command line run command (https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-2/creating-liferay-maven-plugins-from-the-command-lin)
mvn archetype:generate -DarchetypeCatalog=https://repository.liferay.com/nexus/content/groups/liferay-ce
and choose desired plugin through wizard.
After that import that project as an Maven project to Eclipse IDE.
As you mentioned that you are new to Liferay development I recommend offical Liferay documentation but instead of Liferay MVC I recommend Spring MVC Portlet due to bigger community and documentation. Resources related to Spring development in Liferay couldn't be found at official Liferay documentation so it's better to Google for blog articles etc. I develop at Liferay 6.2, Spring, Spring Webflow, Spring MVC, Thymeleaf, Maven stack and I have few articles related to problems which I came across at my blog http://lukasgrygar.com
Office Network not allowed(Blocking) to create new liferay workspace Project
We are facing some issues while trying to create new workspace in Liferay, When we are in Office network it fails. It's not accepting to auto download eclipse liferay projects's plugins. These repository sites are giving errors on eclipse connection time out.
Note: when we are in Citrix VM or open networks it works perfectly. Browser able to reach, If you hit below mentioned URL in browser.. But Its failing to reach at Eclipse level. https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public/com/liferay/com.liferay.gradle.plugins.workspace/1.5.0/com.liferay.gradle.plugins.workspace-1.5.0.pom
Eclipse Version:Eclipse neon
Liferay Version:7.1

Can't add Liferay portlet from SVN to the App Server

I'm checking out a Liferay portlet from SVN created by another developer into my Liferay 6.2 plugins SDK. This portlet is located at C:\Users\me\Liferay\liferay-plugins-sdk-6.2\portlets
I then import the project at the root from the Liferay Plugins SDK into my Eclipse workspace
When I try to Right+click -> Add the project to the Liferay server it doesn't register. There are various applications created by others I've imported into the workspace but none of them deploy correctly unless I run a Liferay->SDK->deploy. The only thing that I can add directly to the server is the theme I've developed.
Specs:
Eclipse Luna
Liferay 6.2 EE bundled with Tomcat 7
Liferay plugins SDK 6.2
jdk-1.7
We've all been using Liferay 6.2 to develop our applications; Why are some reasons an imported portlet would fail to get added to the server?
The plugins sdk assumes a certain directory structure and I'm not sure if you match that. Also, there's a configuration file named build.username.properties (replace username with your actual login name) at the root of the plugins sdk, pointing to the root directory of your liferay installation. This will need to be correctly configured for the build process to correctly associate the correct Liferay installation
Make sure that the plugin-sdk's version matches the Liferay version and the other developers didn't mess with the build processes (e.g. hardcoding their own additions and directory names)
Lastly, note that the plugins typically must be deployed through Liferay's deploy folder, not directly to the appserver. If only the deployment to Liferay fails, you can find the built plugins in your SDK's dist folder once Ant has done its job.
If your problems still persist, you might want to give more detail: mentioning "restart with a bunch of errors" is kind of hard to give the correct answer to.

Liferay portlet development on JBoss AS 6

I am trying to create a new Portlet project (basically a portlet for Liferay) in Eclipse (Helios with Liferay SDK installed). I use JBoss AS 6.10.final and Liferay 6.05.
The problem is that everytime I try to create new portlet, it asks me for Runtime Enviroment. I want this enviroment to be JBoss AS, but Eclipse only suggests different Tomcat distributions. I dont have Tomcat bundle installed and I am not going to since it will run on JBoss AS.
Liferay is already installed on JBoss and running (when I start the JBoss AS, I can access the liferay portal page - it has all jars and wars on correct places in AS).
I havent found any tutorial how to make this work. Could someone perhaps provide some step by step guide or direct me to any existing one? Thank you!
PS: I hope that my question is not too confusing, if so, I will try to edit it and make myself clearer...
I have finally figured it out:
I changed the build.username.properties file
app.server.portal.dir=c:\\Programs\\jboss-6.1.0.Final-ESB-4.12\\server\\default\\deploy\\liferay-portal-6.0.5.war
app.server.lib.global.dir=c:\\Programs\\jboss-6.1.0.Final-ESB-4.12\\common\\lib
app.server.deploy.dir=c:\\Programs\\jboss-6.1.0.Final-ESB-4.12\\server\\default\\deploy
app.server.type=jboss
app.server.dir=c:\\Programs\\jboss-6.1.0.Final-ESB-4.12
so it points to the directory with liferay war files. Then I had to check in Eclipse that I do not want this file to be overwritten again and it works just fine. I can deploy all projects to JBoss using Liferay SDK!

Why not able to get the 'Run on Server' option for JSF jsp page on eclipse, weblogic, JBossTools?

I am trying to run a JSF 1.2 application created using Eclipse Ganemede and JBoss Tools on WebLogic 10.0 MP1
I have created a simple JSF helloworld application and have added a simple JSP. I have configured a weblogic domain and a server using the JBoss Tools plugin through eclipse. When I right click on the JSP file I can only see "Run Configurations..." options and NOT "Run on Server..". I do get this ('run on server') option when I right click on the application in the eclipse, but it doesn't run the
This is strange as in another JSF application on the same eclipse workspace, i am able to 'run on server' the JSP pages by right clicking on them.
Can anyone suggest a solution for this ?
Thanks.
Ankit
Do you see any error log when you start the server associated to your JSF application (either in the eclipse Error log view or in the logs of the server)?
As illustrated by this thread:
There are certain classes, identified by their package, that the server supplies which webapps aren't allowed to override.
If such classes are found in a jar in WEB-INF/lib, Tomcat deals with this by ignoring the offending jar.
Obviously, javax.servlet is one of those packages. Assuming javax.servlet.jar only contained javax.servlet classes, this shouldn't by itself cause your webapp to fail.
I would start by removing this jar from the webapp since it is always wrong to have a jar like this in WEB-INF/lib.
Not much of a solution, but at least you can provide some more details/logs which may be enough for you to get a better grasp on this issue.
Can you add the project by dragging the project to the server ?
If not then it's not a WTP project of some reason and then no run-as will be available.
There might be some error in web.xml.Even i faced the same issue after clearing the errors in web.xml ,i can able to see run-as option