Liferay 7 Login Fragment error - liferay

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

Related

Why is Wildfly 17 complaining about missing BearerTokenAuthenticationMechanism ctor?

we're trying to upgrade from Wildfly 15 to Wildfly 17. When starting the application under 17 we get lot's of DEBUGs in log as follows:
2019-07-16 08:30:41,031|DEBUG| org.jboss.as.domain.management|Identification of operation not progressing after [15000000000] ns has been requested
2019-07-16 08:30:51,029|DEBUG| io.undertow.request|Matched prefix path /management for path /management
2019-07-16 08:30:51,029|DEBUG| io.undertow.request.security|Setting authentication required for exchange HttpServerExchange{ POST /management}
2019-07-16 08:30:51,029|DEBUG| org.wildfly.security|Unable to create instance
java.security.NoSuchAlgorithmException: ELY00011: Unable to create service for 'HttpServerAuthenticationMechanismFactory.BEARER_TOKEN'
at org.wildfly.security.WildFlyElytronProvider$ProviderService.newInstance(WildFlyElytronProvider.java:342)
at org.wildfly.security.http.util.SecurityProviderServerMechanismFactory.getMechanismNames(SecurityProviderServerMechanismFactory.java:79)
at org.wildfly.security.http.util.SetMechanismInformationMechanismFactory.getMechanismNames(SetMechanismInformationMechanismFactory.java:58)
at org.wildfly.security.http.util.FilterServerMechanismFactory.getMechanismNames(FilterServerMechanismFactory.java:100)
at org.wildfly.security.http.util.SortedServerMechanismFactory.getMechanismNames(SortedServerMechanismFactory.java:50)
at org.wildfly.security.auth.server.HttpAuthenticationFactory.getAllSupportedMechNames(HttpAuthenticationFactory.java:65)
at org.wildfly.security.auth.server.AbstractMechanismAuthenticationFactory.getMechanismNames(AbstractMechanismAuthenticationFactory.java:77)
at org.jboss.as.domain.http.server.ManagementHttpServer.lambda$secureDomainAccess$3(ManagementHttpServer.java:447)
at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.authenticate(HttpAuthenticator.java:253)
at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.access$800(HttpAuthenticator.java:242)
at org.wildfly.security.http.HttpAuthenticator.authenticate(HttpAuthenticator.java:97)
at org.wildfly.elytron.web.undertow.server.SecurityContextImpl.authenticate(SecurityContextImpl.java:96)
at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:50)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodException: org.wildfly.security.http.bearer.BearerTokenAuthenticationMechanism.<init>(java.security.Provider)
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getConstructor(Class.java:1825)
at org.wildfly.security.WildFlyElytronProvider$ProviderService.newInstance(WildFlyElytronProvider.java:339)
Why is this and how can I get rid of these log entries?
Best regards
Mark.
This appears to be a bug in the WildFlyElytronProvider, I have created the following so we can implement a fix - https://issues.jboss.org/browse/ELY-1847
As this is just a DEBUG message you should be able to ignore in the meantime if you are not trying to use this mechanism.

CDIIntegrationService errors were found when Weblogic upgrade from 12.1.2 to 12.1.3

I have upgraded Weblogic version in linux server by changing the wl_home path in the setDomainEnv.sh for 12.1.2 to 12.1.3 and restart. when restarting it gives below errors.
Appreciate if anyone can give idea about this.
java.lang.IllegalAccessError: tried to access method com.bea.logging.LogBufferHandler.bufferLogObject(Ljava/lang/Object;)V from class weblogic.logging.log4j.WLLog4jMemoryBufferAppender
java.lang.IllegalStateException: Unable to perform operation: post construct on weblogic.diagnostics.lifecycle.LoggingServerService
java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.diagnostics.lifecycle.DiagnosticFoundationService errors were found
java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.diagnostics.lifecycle.DiagnosticFoundationService
java.lang.IllegalArgumentException: While attempting to resolve the dependencies of com.oracle.injection.integration.CDIIntegrationService errors were found
java.lang.IllegalStateException: Unable to perform operation: resolve on com.oracle.injection.integration.CDIIntegrationService
Use the wllog4j.jar which is part of WLS 12.1.3 build. The one part of WLS_HOME/server/lib diretory.
If your domains-home/lib folder holds older wllog4.jar which was part of 12.1.2 then you will face this issue

axis 1.4 linux help - happyaxis not happy AXISCLASSPATH all wrong?

I'm trying to use axis 1.4 on turnkey linux tomcat6 appliance.
Short version is that assuming it's the root of the problem; what is the correct way to set AXISCLASSPATH on debian?
Long version is:
axis.war deploys correctly. I've added AXIS_HOME and AXIS_LIB to etc/environment like so:
CATALINA_HOME="/usr/share/tomcat6"
CATALINA_BASE="/var/lib/tomcat6"
CATALINA_OPTS="-server -Xms384M -Xmx512M -XX:MaxPermSize=256M"
JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.26"
AXIS_HOME="/var/lib/tomcat6/webapps/axis"
AXIS_LIB="/var/lib/tomcat6/webapps/axis/WEB-INF/lib"
and all echo correctly. tomcat6 admin page shows axis running, /localhost/axis loads fine but happyaxis is kicking:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented
it from fulfilling this request.
exception
org.apache.jasper.JasperException: An exception occurred processing
JSP page /happyaxis.jsp at line 45
42: */ 43: Class classExists(String classname) { 44:
try { 45: return Class.forName(classname); 46: }
catch (ClassNotFoundException e) { 47: return null; 48:
}
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:521)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
javax.servlet.ServletException:
java.lang.UnsupportedClassVersionError:
com/ibm/wsdl/factory/WSDLFactoryImpl : Unsupported major.minor version
51.0 (unable to load class com.ibm.wsdl.factory.WSDLFactoryImpl) org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:865)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:794)
org.apache.jsp.happyaxis_jsp._jspService(happyaxis_jsp.java:808)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.UnsupportedClassVersionError:
com/ibm/wsdl/factory/WSDLFactoryImpl : Unsupported major.minor version
51.0 (unable to load class com.ibm.wsdl.factory.WSDLFactoryImpl) org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2822)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:128)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:169)
org.apache.jsp.happyaxis_jsp.classExists(happyaxis_jsp.java:34)
org.apache.jsp.happyaxis_jsp.probeClass(happyaxis_jsp.java:77)
org.apache.jsp.happyaxis_jsp.needClass(happyaxis_jsp.java:151)
org.apache.jsp.happyaxis_jsp._jspService(happyaxis_jsp.java:650)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
I have used axis in the past on ubuntu and had issues with openjdk. So I tried removing openjdk and installed sun-java-6 and get the same error.
According to every bit of documentation I've seen, $AXISCLASSPATH needs to point to the axis/lib .jar files and may be the issue but the apache documentation is very old:
Unix users have to do something similar. Below we have installed AXIS
into /usr/axis and are using the bash shell. See your shell's
documentation for differences. To make variables permeate you will
need to add them to your shell's startup (dot) files. Again, see your
shell's documentation.
set AXIS_HOME=/usr/axis
set AXIS_LIB=$AXIS_HOME/lib
set AXISCLASSPATH=$AXIS_LIB/axis.jar:$AXIS_LIB/commons-discovery.jar:
$AXIS_LIB/commons-logging.jar:$AXIS_LIB/jaxrpc.jar:$AXIS_LIB/saaj.jar:
$AXIS_LIB/log4j-1.2.8.jar:$AXIS_LIB/xml-apis.jar:$AXIS_LIB/xercesImpl.jar
export AXIS_HOME; export AXIS_LIB; export AXISCLASSPATH
when I deploy, xercesImpl.jar is not present in the lib director and log4-1.2.8.jar is just log4j.jar
I copied xercesImpl from elsewhere in the file system and after an exhaustive search I have tried setting this variable from the command line, etc/environment, tomcat6.sh and a few others, all without success.
The only method I found that will echo correctly was with the command line code:
export AXISCLASSPATH:$AXIS_LIB/axis.jar;$AXIS_LIB/commons-discover.jar;$AXIS_LIB/commons-logging.jar;$AXIS_LIB/jaxrpc.jar;$AXIS_LIB/saaj.jar;$AXIS_LIB/log4j.jar
still no change. as a stab in the dark I copied wsdl4j.jar from elsewhere on the filesystem to /lib and added it to the above export command and still no joy
"Unsupported major.minor version 51.0 " means "JVM version too low; 51== Java7".
Steve
(who wrote happyaxis.jsp 10 years ago)

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

Error while starting the Glassfish server + BIRT dependencies

I'm trying to deploy a Java web application on a GlassFish server (v 3.1.2) using Eclipse Indigo 3.7.1 but I'm always having this Exception:
cannot Deploy MetricsReportingProject
Deployment Error for module: MetricsReportingProject: Error occurred during deployment:
Exception while loading the app :
java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException:
java.lang.RuntimeException:
com.sun.faces.config.ConfigurationException:
java.util.concurrent.ExecutionException:
com.sun.faces.config.ConfigurationException:
Unable to parse document 'bundle://136.0:1/com/sun/faces/jsf-ri-runtime.xml':
DTD factory class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory.. Please see server.log for more details.
Here are my project's dependencies:
Hibernate 3.4.0 dependencies
BIRT DE and BIRT Viewer 3.7.1
JSF 2.0
PrimeFaces 3.2
The project was working when I'had created it but the problem appears after making some modifications and restarting the server many times.
Can anyone help me to solve this problem.
I hand the same problem.
Glassfish provides a
- xercesImpl-2.9.1.jar
- xml-apis-1.3.04.jar
But in the Birt Lib, they have xercesImpl-2.9.0.jar
I just deleted xercesImpl-2.9.0.jar from Birt Lib and redeployed. It worked fine.

Resources