Reputation: 422
I'm hoping someone can point something about this problem. I deployed two portlets from the same Liferay project, one in the Control Panel and another in the more general add more category.
But upon viewing them on the portal, the one that can be added to the pages shows that portlet is temporarily unavailable, and the other shows in Control Panel, but shows nothing but the title.
I looked at the log in liferay-(today's date).log and the errors show that the server can't find the jsp's. Errors are like so:
ERROR [http-bio-8080-exec-5][PortletRequestDispatcherImpl:115] javax.servlet.ServletException: Archivo JSP "/registros/view.jsp" no encontrado
javax.servlet.ServletException: Archivo JSP "/registros/view.jsp" no encontrado
at org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:412)
etc... etc...
for the portlet in the add more category, and for the portlet in control panel:
ERROR [http-bio-8080-exec-3][MVCPortlet:366] null is not a valid include
15:54:51,434 ERROR [http-bio-8080-exec-3][ComboServlet:92] javax.servlet.ServletException: Resource /css/EContinuaAdmin.css does not exist in caja- virtual-portlet
javax.servlet.ServletException: Resource /css/EContinuaAdmin.css does not exist in caja-virtual-portlet
at com.liferay.portal.servlet.ComboServlet.getResourceURL(ComboServlet.java:364)
etc... etc...
ERROR [http-bio-8080-exec-3][status_jsp:769] javax.servlet.ServletException: Resource /js/EContinuaAdmin.js does not exist in caja-virtual-portlet
javax.servlet.ServletException: Resource /js/EContinuaAdmin.js does not exist in caja- virtual-portlet
at com.liferay.portal.servlet.ComboServlet.getResourceURL(ComboServlet.java:364)
etc... etc...
And also for this last portlet:
ERROR [http-bio-8080-exec-3][MVCPortlet:366] null is not a valid include
15:55:43,057 WARN [http-bio-8080-exec-3][code_jsp:128] {code="404", msg="/caja- virtual-portleticon.png", uri=/caja-virtual-portleticon.png}
15:57:48,762 WARN [http-bio-8080-exec-1][code_jsp:128] {code="404", msg="/caja- virtual-portleticon.png", uri=/caja-virtual-portleticon.png}
15:57:50,002 WARN [http-bio-8080-exec-3][code_jsp:128] {code="404", msg="/caja- virtual-portleticon.png", uri=/caja-virtual-portleticon.png}
15:58:12,180 ERROR [http-bio-8080-exec-7][MVCPortlet:366] null is not a valid include
15:58:12,934 ERROR [http-bio-8080-exec-7][ComboServlet:92] javax.servlet.ServletException: Resource /css/EContinuaAdmin.css does not exist in caja- virtual-portlet
javax.servlet.ServletException: Resource /css/EContinuaAdmin.css does not exist in caja-virtual-portlet
at com.liferay.portal.servlet.ComboServlet.getResourceURL(ComboServlet.java:364)
etc... etc...
I can understand most of the errors in the second case I've shown, because there's effectively no such js or css files in the project, but I don't understand why it's not finding the jsp's. I'll show my portlet.xml so it is clear:
<portlet>
<portlet-name>caja-virtual</portlet-name>
<display-name>Caja Virtual</display-name>
<portlet-class>com.cide.cajaVirtual.EContinua.portlet.CajaVirtualPortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/registros/view.jsp</value>
</init-param>
There are two folders where I have jsp's: admin and registros, so why is this happening. And also, what to do about the other errors, I'm not sure. Should I drop simply an EContinuaAdmin.css and a EContinuaAdmin.js in the js and css folders? Finally, why is the project asking for those files isn't clear to me, I only have a main.css and a main.js in those folders which Eclipse creates automatically for the liferay plugin project.
Aditionally (and I'm sorry if this looks like it should be another question, it's just that I want to show all the errors because the log is too cryptic to me and I wanna discard options) I see this last two errors in the log which I don't know why happen:
ERROR [http-bio-8080-exec-2][DefaultTransactionExecutor:93] Application exception overridden by commit exception
org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [com.liferay.portal.model.impl.PortalPreferencesImpl] with identifier [11178]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.liferay.portal.model.impl.PortalPreferencesImpl#11178]
etc... etc...
ERROR [http-bio-8080-exec-2][PortalPreferencesImpl:192] org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [com.liferay.portal.model.impl.PortalPreferencesImpl] with identifier [11178]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.liferay.portal.model.impl.PortalPreferencesImpl#11178]
org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [com.liferay.portal.model.impl.PortalPreferencesImpl] with identifier [11178]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.liferay.portal.model.impl.PortalPreferencesImpl#11178]
at
etc... etc...
Upvotes: 0
Views: 5660
Reputation: 48057
/registros/view.jsp
(for tomcat it should be in webapps/caja-virtual-portlet/registros/view.jsp
). If not, make sure that your project has it in docroot/registros/view.jsp
liferay-portlet.xml
for paths that you give - e.g. for css, js and the icon. The URL I see for your icon shows a missing "/" - which you should add to the icon entry in liferay-portlet.xml
caja- virtual-portleticon.png
in your log come from - seems like a line-break after formatting an xml file. If that doesn't help, try to check if deployment worked like it should: E.g. if you find all the resources that you expect in your WAR file - they might be ending up in directories where Ant (or whatever you build with) doesn't expect them.
Upvotes: 1