组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
reza tashtboland
How to prevent util-java .jar file to be deployed in the portlet web app?
2013年2月1日 上午6:24
答复

reza tashtboland

等级: New Member

帖子: 4

加入日期: 2011年7月2日

最近的帖子

hi
after deploy portlet in liferay 6.1.1 ce ga2 in application server glassfish , liferay auto copy 3 jar file to portlet lib folder
How can it be prevented ?

thanks
附件

附件: Screenshot-1.png (3.8k)
David H Nebinger
RE: How to prevent util-java .jar file to be deployed in the portlet web ap
2013年2月1日 上午7:13
答复

David H Nebinger

等级: Liferay Legend

帖子: 7157

加入日期: 2006年9月1日

最近的帖子

You cannot. They are required to be there, which is why they're copied in.
reza tashtboland
RE: How to prevent util-java .jar file to be deployed in the portlet web ap
2013年2月1日 上午7:51
答复

reza tashtboland

等级: New Member

帖子: 4

加入日期: 2011年7月2日

最近的帖子

thanks

After installation portlet in liferay the following error occurs

[#|2013-02-01T15:14:34.198+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=126;_ThreadName=Thread-2;|SLF4J: Found binding in [jar:file:/media/Portal/************/glassfish-3.1.2/domains/domain1/autodeploy/************/WEB-INF/lib/util-java.jar!/org/slf4j/impl/StaticLoggerBinder.class]|#]

[#|2013-02-01T15:14:34.198+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=126;_ThreadName=Thread-2;|SLF4J: Found binding in [jar:file:/media/Portal/************/glassfish-3.1.2/domains/domain1/autodeploy/************/WEB-INF/lib/slf4j-simple-1.6.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]|#]

[#|2013-02-01T15:14:34.198+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=126;_ThreadName=Thread-2;|SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.|#]

After deleting the util-java.jar from portlet lib and restart application server problem is resolved

classpath :

jackcess-1.2.7.jar
commons-codec.jar
portals-bridges.jar
dom4j-full.jar
struts.jar
org.springframework.orm-3.0.5.RELEASE.jar
camel-core-2.8.2.jar
mysql.jar
gson-2.0.jar
velocity-1.5.jar
org.springframework.context.support-3.0.5.RELEASE.jar
commons-beanutils.jar
commons-logging-1.1.1.jar
util-taglib.jar
poi-scratchpad-3.8-20120326.jar
asm-5.1.0.jar
jasperreports-4.5.0.jar
antlr.jar
hibernate-infinispan.jar
org.springframework.asm-3.0.5.RELEASE.jar
iText.jar
displaytag-export-poi.jar
org.springframework.jdbc-3.0.5.RELEASE.jar
hibernate-core-4.1.9.Final.jar
org.springframework.web.struts-3.0.5.RELEASE.jar
commons-logging.jar
quartz.jar
rome-1.0.jar
poi-ooxml-schemas-3.8-20120326.jar
hibernate-annotations.jar
commons-fileupload.jar
jericho-html-3.1.jar
commons-pool.jar
standard.jar
ehcache-core-2.4.3.jar
jfreechart-1.0.13.jar
jta.jar
commons-logging-1.1.jar
groovy-all-1.7.5.jar
itextpdf-5.1.3.jar
activation.jar
org.springframework.expression-3.0.5.RELEASE.jar
org.springframework.aop-3.0.5.RELEASE.jar
javassist-3.12.1.GA.jar
poi-excelant-3.8-20120326.jar
commons-collections.jar
jdom.jar
commons-io.jar
poi-ooxml-3.8-20120326.jar
itext-2.1.7.jar
commons-lang.jar
commons-digester.jar
hibernate-3.2.7.ga.jar
slf4j-api-1.6.3.jar
ojdbc6.jar
poi-examples-3.8-20120326.jar
core-renderer3.jar
org.springframework.web.servlet-3.0.5.RELEASE.jar
jboss-archive-browsing.jar
logkit-1.0.1.jar
commons-dbcp.jar
org.springframework.instrument.tomcat-3.0.5.RELEASE.jar
hibernate-entitymanager.jar
jcommon-1.0.9.jar
xerces-2.6.2.jar
org.springframework.jms-3.0.5.RELEASE.jar
org.springframework.web-3.0.5.RELEASE.jar
jstl.jar
org.springframework.aspects-3.0.5.RELEASE.jar
util-bridges1.jar
slf4j-simple-1.6.3.jar
org.springframework.core-3.0.5.RELEASE.jar
log4j-1.2.16.jar
org.springframework.test-3.0.5.RELEASE.jar
ejb3-persistence-3.3.1.jar
org.springframework.context-3.0.5.RELEASE.jar
displaytag-1.2.jar
commons-collections-3.1.jar
mail.jar
camel-jpa-2.8.2.jar
jxl-2.6.9.jar
Tidy.jar
org.springframework.instrument-3.0.5.RELEASE.jar
org.springframework.beans-3.0.5.RELEASE.jar
hpna_bean_validator_0.1.jar
org.springframework.transaction-3.0.5.RELEASE.jar
jcl104-over-slf4j.jar
org.springframework.oxm-3.0.5.RELEASE.jar
displaytag-portlet-1.1.jar
hibernate-jpa-2.0-api-1.0.1.Final.jar
poi-3.8-20120326.jar
org.springframework.web.portlet-3.0.5.RELEASE.jar
cglib-nodep.jar
David H Nebinger
RE: How to prevent util-java .jar file to be deployed in the portlet web ap
2013年2月1日 上午9:22
答复

David H Nebinger

等级: Liferay Legend

帖子: 7157

加入日期: 2006年9月1日

最近的帖子

So did you read the link found at http://www.slf4j.org/codes.html#multiple_bindings as the emitted error says?

Remove the slf4j-simple-1.6.3.jar from your project and go again.

Frankly I'm surprised your project works. You'll have so many conflicts between the jars Liferay is using and the manually applied ones that you're using, it's hard to believe there's not other stuff going on.

Anyway, removing the slf4j-simple jar will use the binding defined in util-java.jar (which you cannot remove) so slf4j will route messages to Liferay's logging mechanism.
Steve Weiss
RE: How to prevent util-java .jar file to be deployed in the portlet web ap
2014年7月9日 上午7:22
答复

Steve Weiss

等级: New Member

帖子: 10

加入日期: 2011年9月20日

最近的帖子

I'm having a similar problem with util-java.jar. I'm working on a portlet that has its own custom asset type, and uses the asset framework. The error I get when I deploy the portlet is the following:

Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.liferay.util.portlet.PortletProps
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.liferay.portlet.PortletBagFactory.getPluginPropertyValue(PortletBagFactory.java:372)
at com.liferay.portlet.PortletBagFactory.newAssetRendererFactoryInstances(PortletBagFactory.java:574)
at com.liferay.portlet.PortletBagFactory.create(PortletBagFactory.java:202)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(PortletHotDeployListener.java:546)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:321)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:120)
... 23 more

If I move util-java.jar from my portlet's WEB-INF/lib to tomcat/lib/ext and restart, the error goes away, but of course every time I re-deploy the portlet it comes back.