Deploying Liferay in Virgo( Springsource dm server ) - liferay

I am getting following exception when I tried to deploy liferay war file into Virgo server. Can any one help me please?
[2010-11-10 06:24:16.647] start-signalling-3 System.out Loading jar:file:/D:/VGP/Servers/Spike-liferay inside virgo/virgo-web-server-2.1.0.RELEASE/virgo-web-server-2.1.0.RELEASE/work/osgi/configuration/org.eclipse.osgi/bundles/36/data/store/org.eclipse.osgi/bundles/63/1/bundlefile/WEB-INF/lib/portal-impl.jar!/portal.properties
[2010-11-10 06:28:21.647] start-signalling-3 System.out 06:28:21,553 ERROR [ContextLoader:220] Context initialization failed
[2010-11-10 06:28:21.662] start-signalling-3 System.out org.eclipse.virgo.util.osgi.manifest.parse.BundleManifestParseException: Error parsing bundle manifest header [JSR 286]
[2010-11-10 06:28:21.662] start-signalling-3 System.out HP005W:[col 3]: Unexpected space found
[2010-11-10 06:28:21.662] start-signalling-3 System.out HP013E:[col 4]: Expected a semicolon but found '286'
[2010-11-10 06:28:21.662] start-signalling-3 System.out
[2010-11-10 06:28:21.662] start-signalling-3 System.out at org.eclipse.virgo.util.osgi.manifest.parse.standard.StandardHeaderParser.parseBundleSymbolicName(StandardHeaderParser.java:96)
[2010-11-10 06:28:21.662] start-signalling-3 System.out at org.eclipse.virgo.util.osgi.manifest.internal.StandardBundleSymbolicName.parse(StandardBundleSymbolicName.java:33)
[2010-11-10 06:28:21.662] start-signalling-3 System.out at org.eclipse.virgo.util.osgi.manifest.internal.BaseParameterised.resetFromParseString(BaseParameterised.java:42)
[2010-11-10 06:28:21.662] start-signalling-3 System.out at org.eclipse.virgo.util.osgi.manifest.internal.StandardBundleManifest.initializeHeaders(StandardBundleManifest.java:118)
...........

Looks like the MANIFEST.MF is badly formed - there seems to be a space in a manifest header "JSR 286".

If someone is still interested http://sourceforge.net/projects/liferayforvirgo

Related

JSP compile error on WAS 8.5.5 on Linux (works as expected on Windows)

I have a strange behaviour on Webshphere 8.5.5.13 on Linux.
I have extended a large Enterprise application (IBM Maximo Enterprise Asset Management 7.6.0.9) and added some classes and a JSP file.
These changes work fine on Webshere on Windows (and Weblogic) for months for a lot of customers.
Now we have a customer who has deployed this Enterprise Application on Linux and here are unexpected problems.
When accessing my simple JSP on Linux I get the following error message in the SystemOut.log of the application server:
[8/28/18 16:16:06:336 CEST] 00000633 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /opt/IBM/WebSphere/AppServer/profiles/ctgAppSrv01/logs/ffdc/MXServer_79a40fc5_18.08.28_16.16.06.3072776788115294465046.txt com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.translateJsp 259
[8/28/18 16:16:06:337 CEST] 00000633 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[/webclient/common/eamdmtrequesthandler.jsp]: com.ibm.ws.jsp.JspCoreException: JSPG0049E: /webclient/common/eamdmtrequesthandler.jsp failed to compile :
JSPG0091E: An error occurred at line: 3 in the file: /webclient/common/eamdmtrequesthandler.jsp
JSPG0093E: Generated servlet error from file: /webclient/common/eamdmtrequesthandler.jsp
/opt/IBM/WebSphere/AppServer/profiles/ctgAppSrv01/temp/ctgNode01/MXServer/MAXIMO/maximouiweb.war/webclient/common/_eamdmtrequesthandler.java : 7 : The import de cannot be resolved
JSPG0091E: An error occurred at line: 8 in the file: /webclient/common/eamdmtrequesthandler.jsp
JSPG0093E: Generated servlet error from file: /webclient/common/eamdmtrequesthandler.jsp
/opt/IBM/WebSphere/AppServer/profiles/ctgAppSrv01/temp/ctgNode01/MXServer/MAXIMO/maximouiweb.war/webclient/common/_eamdmtrequesthandler.java : 87 : ExportXLS cannot be resolved to a type
JSPG0091E: An error occurred at line: 8 in the file: /webclient/common/eamdmtrequesthandler.jsp
JSPG0093E: Generated servlet error from file: /webclient/common/eamdmtrequesthandler.jsp
/opt/IBM/WebSphere/AppServer/profiles/ctgAppSrv01/temp/ctgNode01/MXServer/MAXIMO/maximouiweb.war/webclient/common/_eamdmtrequesthandler.java : 87 : ExportXLS cannot be resolved to a type
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.translateJsp(AbstractJSPExtensionServletWrapper.java:616)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper._checkForTranslation(AbstractJSPExtensionServletWrapper.java:477)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.checkForTranslation(AbstractJSPExtensionServletWrapper.java:298)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:167)
Facts:
All required classes are available in their correct folder. I have checked the EAR file and the installedApps folder in Websphere.
All files are readable and accessible. No permission issues. Websphere is running as root, SELinux is disabled
The same EAR file, which has this error on Linux, does not have this problem if deployed under Windows.
I get the same error message when I try to compile the JSP with the JspBatchCompiler.sh command from the commandline.
I have moved my classes from de.eam.webclient.servlet to psdi.webclient.servlet (an already existing package which is part of Maximo) and then the JSP works as expected.
I have checked the log file MXServer_79a40fc5_18.08.28_16.16.06.3072776788115294465046.txt and I have also verified, that the classpath contains my classes in my folder.
What can be the reason for Websphere not finding my top level package directory "de" and not finding the classes even if they are in the classpath and are found on Windows.
What can I do to track this down? Is this a bug in Websphere on Linux?
The JSP File:
<%# page language="java"
%><%# page contentType="text/html; charset=utf-8"
%><%# page import="de.eam.webclient.servlet.ExportXLS"
%><%
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
ExportXLS servlet = new ExportXLS();
servlet.handleRequest(request, response);
%>

Liferay 7 Login Fragment error

I have created login fragment for login.jsp which is working perfectly fine.
Now I need to add some code to fetch some data from custom tables so I have added XYZLocalServiceUtil call using scriptlet.
Now service call is working but problem is when I deploy fragment hook it gives following error and portlet becomes unavailable, but only for first time after deployment.
When I refresh page, next time it works properly without any error. I am not sure why it is not able to get following dependency for first time.
07:17:00,237 ERROR [http-nio-9080-exec-9][PortletRequestDispatcherImpl:265] Unable to dispatch request: javax.el.ELException: Provider com.sun.el.ExpressionFactoryImpl not found
07:17:00,242 ERROR [http-nio-9080-exec-9][PortletServlet:111] javax.portlet.PortletException: org.apache.jasper.JasperException: javax.el.ELException: Provider com.sun.el.ExpressionFactoryImpl not found
javax.portlet.PortletException: org.apache.jasper.JasperException: javax.el.ELException: Provider com.sun.el.ExpressionFactoryImpl not found
at com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:267)
at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:102)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:594)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:610)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.doView(MVCPortlet.java:160)
at com.liferay.portal.kernel.portlet.LiferayPortlet.doDispatch(LiferayPortlet.java:303)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.doDispatch(MVCPortlet.java:497)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:262)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.render(MVCPortlet.java:317)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:103)
at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:57)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:117)
at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:530)
at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:605)
at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:391)
at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.render(MonitoringInvokerPortlet.java:265)
at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1580)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:64)
at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
at com.liferay.portlet.PortletContainerImpl._render(PortletContainerImpl.java:707)
at com.liferay.portlet.PortletContainerImpl.render(PortletContainerImpl.java:162)
at com.liferay.portlet.SecurityPortletContainerWrapper.render(SecurityPortletContainerWrapper.java:133)
at com.liferay.portlet.RestrictPortletContainerWrapper.render(RestrictPortletContainerWrapper.java:133)
...
I have tried by adding following dependency in gradle file but no luck.
compile group: 'org.glassfish', name: 'javax.el', version: '3.0.0'
I am using "liferay-ce-portal-7.0-ga4", If anyone faced similar issue please suggest the way to resolve it.
Thanks

Groovy - Grab - download failed

I have a fresh installation of Groovy 2.1.4 and I'd like to create a script that uses HTTP builder.
I've added the following line at the top of the script:
#Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.6')
When I run the script in GroovyConsole, I get the following error:
1 compilation error:
Exception thrown
VI 01, 2013 12:15:39 ODP. org.codehaus.groovy.runtime.StackTraceUtils sanitize
WARNING: Sanitizing stacktrace:
java.lang.RuntimeException: Error grabbing Grapes -- [download failed: commons-logging#commons-logging;1.1.1!commons-logging.jar]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
... (aso) ...
java.lang.RuntimeException: Error grabbing Grapes -- [download failed: commons-logging#commons-logging;1.1.1!commons-logging.jar]
When I run the following command on the Windows command line:
grape -V resolve org.codehaus.groovy.modules.http-builder http-builder 0.6
I get the same error, i.e.:
:: problems summary ::
:::: WARNINGS
[NOT FOUND ] commons-logging#commons-logging;1.1.1!commons-logging.jar (0ms)
==== localm2: tried
file:C:\Documents and Settings\Administrator/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
Error in resolve:
Error grabbing Grapes -- [download failed: commons-logging#commons-logging;1.1.1!commons-logging.jar]
When I try to resolve commons-logging directly, via the following command:
grape -V resolve commons-logging commons-logging 1.1.1
I get the same error, i.e. not found.
When I instead try to download the latest version, i.e. 1.1.3, via the appropriate command, it works. But even after that, resolving the http-client still fails.
Where's the problem?
Try deleting ~/.m2 directory and also ~/.groovy/grapes directories.
It worked for me.
It looks like your Grape settings are set only to look in your local .m2 directory for the library. Check your grapeConfig.xml configuration file. (If you don't have one, you can create it--it should go in the same directory where your groovysh.history and grapes cache directory are created by Groovy.) You can copy the example file shown on the Groovy Grape reference page.
If that doesn't help, I would try deleting your grapes cache directory and try it again.
My problem was, groovy (v2.4.8) was looking in the maven repository fist (~/.m2/repository/) and finding the pom file but not finding the associated artifact/JAR. Instead of just moving on to the next resolver, which would have succeeded, it just gives up. The workaround would be to remove the pom file, the specific directory cache, or just temporarily rename the repository and run groovy again as other suggested. Or you could try to manually add it to the repository. But these are just temporary and you'll likely run into the issue again if you clear your groovy cache or with another dependency.
To troubleshoot this issue you can turn on verbose logging and try to manually install the dependency. So if your error is something like:
java.lang.RuntimeException: Error grabbing Grapes -- [download failed: commons-logging#commons-logging;1.1.1!commons-logging.jar, download failed: commons-codec#commons-codec;1.6!commons-codec.jar, download failed: commons-lang#commons-lang;2.4!commons-lang.jar]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
Which means your dependency is commons-logging-1.1.1.jar. You can run:
grape -V install commons-logging commons-logging 1.1.1
What ended up solving the problem for me was overriding the default configuration and setting usepoms="false" in the localm2 resolver. It works in my case because I have the pom but not the JAR, so since Ivy isn't considering the POM now and the JAR was never there to begin with, it goes onto the next resolver which does find it. So in summary:
Create this file: ~/.groovy/grapeConfig.xml
With these contents:
<ivysettings>
<settings defaultResolver="downloadGrapes"/>
<resolvers>
<chain name="downloadGrapes" returnFirst="true">
<filesystem name="cachedGrapes">
<ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
<artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision](-[classifier]).[ext]"/>
</filesystem>
<ibiblio name="localm2" root="file:${user.home}/.m2test/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true" usepoms="false"/>
<ibiblio name="jcenter" root="https://jcenter.bintray.com/" m2compatible="true"/>
<ibiblio name="ibiblio" m2compatible="true"/>
</chain>
</resolvers>
</ivysettings>
I was tempted not to use the maven 2 cache at all, but if I removed the line, I got errors about not being able to find "localm2". Although updating it to point to fictitious directory worked.
Deleting .m2 and grapes did not resolve the issue for me as when they were repopulated, the jar was not being downloaded. In my case, I was missing xml-apis-1.3.04.jar
I eventually resolved the issue by manually downloading the jar file and copying it into ~/.m2/repository/xml-apis/xml-apis/<version>
Hopefully this is useful if simply deleting the directories isn't working.
this might help someone down the line as i faced similar issue in windows
java.lang.RuntimeException: Error grabbing Grapes -- [download failed: commons-collections#commons-collections;3.2.2!commons-collections.jar]
the required jar above was not being downloaded in C:/Users/%USER%/.groovy/grapes/common-collections/jars/ folder.
so manually downloaded the required version from https://jar-download.com/
and added in the corresponding folder
Not quite the same case as the question, adding it in case someone finds himself in a similar case with me where I did not have any direct access on the machine to check the grapeConfig.xml configuration file, as suggested by the accepted answer. What worked for me was to configure a grab resolver.
I did something similar with what is stated in the documentation and it worked (documentation link):
#GrabResolver(name='restlet', root='http://maven.restlet.org/')
#Grab(group='org.restlet', module='org.restlet', version='1.1.6')
I solved a similar issue by using a newer version of commons-codec:commons-codec in groovy script using the #Grab annotation:
#Grapes([
#Grab('org.slf4j:slf4j-simple:1.7.25'),
#Grab('commons-codec:commons-codec:1.14'),
#Grab('io.github.http-builder-ng:http-builder-ng-apache:1.0.4')
])
you need create ~/.groovy/grapeConfig.xml
coments
<ivysettings>
<settings defaultResolver="downloadGrapes"/>
<resolvers>
<chain name="downloadGrapes" returnFirst="true">
<filesystem name="cachedGrapes">
<ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
<artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision](-[classifier]).[ext]"/>
</filesystem>
<ibiblio name="localm2" root="file:${user.home}/.m2test/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true" usepoms="false"/>
<ibiblio name="jcenter" root="https://jcenter.bintray.com/" m2compatible="true"/>
<ibiblio name="ibiblio" m2compatible="true"/>
</chain>
</resolvers>
</ivysettings>
I had a similar error when using Groovy + Java 7.
The error from groovy was:
General error during conversion: Error grabbing Grapes -- [unresolved dependency: com.microsoft.sqlserver#mssql-jdbc;6.4.0.jre7: not found]
When trying the
grape -V resolve com.microsoft.sqlserver mssql-jdbc 6.4.0.jre7
command i had these errors:
java.net.SocketException: Connection reset
javax.net.ssl.SSLException: Received fatal alert: protocol_version
The way to fix this was adding the -Dhttps.protocols=TLSv1.2 parameter:
grape -Dhttps.protocols=TLSv1.2 -V resolve com.microsoft.sqlserver mssql-jdbc 6.4.0.jre7
Then the package is downloaded and i can use it from Groovy

Liferay pentaho Integaration throwing error javax.naming.OperationNotSupportedException: Context is read only error

Integrating pentaho in liferay using pentaho.war and then after starting tomcat getting below error:
06:01:23,701 ERROR [JNDIResourceProvider] error closing context
javax.naming.OperationNotSupportedException: Context is read only
at org.apache.naming.NamingContext.checkWritable(NamingContext.java:962) at org.apache.naming.NamingContext.close(NamingContext.java:762)
at com.tonbeller.tbutils.res.JNDIResourceProvider.close(JNDIResourceProv
ider.java:68)
at com.tonbeller.tbutils.res.CompositeResourceProvider.close(CompositeRe
sourceProvider.java:56)
at com.tonbeller.tbutils.res.ResourcesFactory.initialize(ResourcesFactor
y.java:163)
at com.tonbeller.tbutils.res.ResourcesFactory.<init>(ResourcesFactory.ja
va:92)
at com.tonbeller.tbutils.res.ResourcesFactory.<clinit>(ResourcesFactory.
java:89)
at com.tonbeller.tbutils.res.ResourcesFactoryContextListener.contextInit
ialized(ResourcesFactoryContextListener.java:23)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:4779)
at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
java:1566)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
java:1556)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:619)
Please help
Thanks in advance
Tomcat's JNDI implementation is read only.
The error is caused by the SessionFactory trying to remove itself from JNDI.
Its not that serious, all you are getting is an ungraceful shutdown.
Try adding a file named resfactory.properties under WEB-INF/classes containing the following line:
tbeller.usejndi=false
see: http://jpivot.sourceforge.net/wcf/api/com/tonbeller/tbutils/res/package-summary.html

Running Vaadin-based Portlet in Liferay

got an " Caused by: java.lang.ClassNotFoundException: com.vaadin.ui.CustomComponent "
when trying to run a vaadin-portlet in liferay .
Make sure that in your liferay-plugin-package.properties file you have specified vaadin.jar in your portal-dependency-jars= property. It should look like this:
name=Vaadin
module-group-id=liferay
module-incremental-version=1
tags=
short-description=
change-log=
page-url=http://www.liferay.com
author=Liferay, Inc.
licenses=
portal-dependency-jars=vaadin.jar

Resources