This wiki does not contain official documentation and is currently deprecated and read only. Please try reading the documentation on the Liferay Developer Network, the new site dedicated to Liferay documentation. DISCOVER Build your web site, collaborate with your colleagues, manage your content, and more. DEVELOP Build applications that run inside Liferay, extend the features provided out of the box with Liferay's APIs. DISTRIBUTE Let the world know about your app by publishing it in Liferay's marketplace. PARTICIPATE Become a part of Liferay's community, meet other Liferay users, and get involved in the open source project. Glassfish tips
Enable/Disable auto-deploy #
In Administration console, click 'Domain' and select 'Applications Configuration' tab. There is 'Auto Deploy' checkbox.
Enable debugging in GlassFish #
Edit: glassfish-3.1.2\domains\domain1\config\domain.xml and add following lines:
<jvm-options>-Xdebug</jvm-options> <jvm-options>-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005</jvm-options>
certutil issue #
Problem in Glassfish 2.1.1 using certutil (instead of keytool): after installing it and startup, when trying to sign in Liferay throws this exception and can't get logged in:
com.liferay.util.EncryptorException: com.liferay.util.EncryptorException: java.security.ProviderException: update() failed
...
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ARGUMENTS_BAD
at sun.security.pkcs11.wrapper.PKCS11.C_EncryptUpdate(Native Method)it's a bug in JDK > 1.6.0_13: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6928796
Solution: change the java.security's section on providers to be as follows:
security.provider.1=com.sun.crypto.provider.SunJCE # security.provider.1=sun.security.pkcs11.SunPKCS11 security.provider.2=sun.security.provider.Sun security.provider.3=sun.security.rsa.SunRsaSign security.provider.4=com.sun.net.ssl.internal.ssl.Provider security.provider.6=sun.security.jgss.SunProvider security.provider.7=com.sun.security.sasl.Provider security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI security.provider.9=sun.security.smartcardio.SunPCSC
(so: commented out SunPKCS, and put SunJCE at first, renumbered to match this sequence). Has succeeded with JDK 1.6.27 and 1.6.10.
Glassfish throws 'Class invariant violation' #
Following exception may happens:
Class invariant violation at org.apache.log4j.LogManager.getLoggerRepository(LogManager.java:199)
In any case, check if your "bundles\glassfish-3.1.1\domains\domain1\config\domain.xml" contains the following:
<jvm-options>-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false</jvm-options>
Web console not working? #
If web console is not working after portal is deployed, with the following message in the log:
File "D:\liferay@git\bundles\glassfish-3.1.2.2\lib\install\applications\__admingui\common\index.jsp" not found Then just use the following url:
http://localhost:4848/login.jsf
It will open the web console.
Keep generated JSP pages #
modify the file located in directory $Glassfish_Home/domains/domain1/config/default-web.xml
<servlet> <servlet-name>jsp</servlet-name> <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> ... <init-param> <param-name>keepgenerated</param-name> <param-value>true</param-value> </init-param>
Generated files are located here: glassfish-3.1.2.2\domains\domain1\generated\jsp\liferay-portal\org ...