how to ant build liferay-yuicompressor.jar? - jar

I am using liferay 5.2 sp 2 on weblogic 10.
I need liferay-yuicompressor.jar file in the lib folder of domain.
I am tryign to create .jar file as per described on this link:
http://issues.liferay.com/browse/LPS-3169
When i ant build-yui i am facing below exception.
get-swing-ex:
[mkdir] Created dir: D:\Liferay Material\GOSI\liferay-portal-src-5.2.2\liferay-portal-src-5.2.2\portal-impl\20130301133406114\rhino1_6R7\toolsrc\com\liferay\mozilla\javasc
ript\tools\debugger\downloaded
[get] Getting: http://java.sun.com/products/jfc/tsc/articles/treetable2/downloads/src.zip
[get] To: D:\Liferay Material\GOSI\liferay-portal-src-5.2.2\liferay-portal-src-5.2.2\portal-impl\20130301133406114\rhino1_6R7\toolsrc\com\liferay\mozilla\javascript\tool
s\debugger\downloaded\swingExSrc.zip
[get] http://java.sun.com/products/jfc/tsc/articles/treetable2/downloads/src.zip permanently moved to http://www.oracle.com/technetwork/java/index.html
[unzip] Expanding: D:\Liferay Material\GOSI\liferay-portal-src-5.2.2\liferay-portal-src-5.2.2\portal-impl\20130301133406114\rhino1_6R7\toolsrc\com\liferay\mozilla\javascri
pt\tools\debugger\downloaded\swingExSrc.zip into D:\Liferay Material\GOSI\liferay-portal-src-5.2.2\liferay-portal-src-5.2.2\portal-impl\20130301133406114\rhino1_6R7\toolsrc\co
m\liferay\mozilla\javascript\tools\debugger\downloaded
BUILD FAILED
As per my understanding it is trying to get the .zip file from http://java.sun.com/products/jfc/tsc/articles/treetable2/downloads/src.zip
but it is no longer available and moved to http://www.oracle.com/technetwork/java/index.html
I need your help in getting liferay-yuicompressor.jar file.
Please help me out...

Nakul, I was responding your other post facing exception while deploying liferay on weblogic. Sorry I misunderstood your last comment on that post, as I used LifeRay 6.x, not 5.x.
How about we disable the minification for the runtime so that you do not need to use the liferay-yuicompressor.jar.
You can add the below to portal-ext.properties
javascript.fast.load=false
theme.css.fast.load=false
If you still prefer to do minification for performance reason, you can do it during the build time as described here: http://yui.github.com/yuicompressor/. Between runtime and build time minification, I always prefer build time.

try to comment
<ant antfile="toolsrc/build.xml" target="compile"/>
into the root build.xml
more than that if you will have similiar problems with xbean.jar just set
without-xmlimpl: no
into build.properties file

Related

unable to launch custom brackets.exe

I have created a desktop app using brackets-shell version sprint-38. I have done the following changes.
config.h -changed APP_NAME from 'Brackets' to 'MyBrackets'.
appshell_config.gypi - changed appname from 'Brackets' to 'MyBrackets'.
Gruntfile - changed build.name from 'Brackets' to 'MyBrackets'.
After building brackets-shell with these changes i used to get 'MyBrackets.exe'
inside brackets-shell/release folder.
while executing the exe one file chooser popup comes, and node & MyBrackets.exe processes will start in the background.
his works fine with Sprint38,But after migrating to brackets-shell tag version release-1.3 or master, this dose not work. The file chooser is not coming as well as no node process starts.
Is any thing i am missing with the latest release ?
Bingo!!!
I got the problem. actually xcopy command is not generating properly in MyBrackets.vscsproj file. and this is well know problem i think so. To fix this problem one fix-msvc.sh file has written.
Since brackets.vscsproj name is hardcoded here so changes is not reflecting in my MyBrackets.vscsproj

Flex Localization: Could not find compiled resource bundle

I tried every solution i found in the internet.
Im using flex 4.5, This is what im doing:
created directory locale/en_US in my src directory
add resources.properties file to that directory with some mappings.
add -locale en_US -source-path=./locale/{locale} -allow-source-path-overlap=true to the compile args.
checked in the framework that the en_US locale directory appear.
add metadata:
<fx:Metadata>
[ResourceBundle("resources")]
</fx:Metadata>
starting the app gives me the exception:
Error: Could not find compiled resource bundle 'resources' for locale 'en_US'.
This is some of the main solutions i tried:
uncheck "Remove unused RSLs" from the build path.
add the directory as a source path.
using the argument -include-resource-bundles and give my directory here (with using the argument -resource-bundle-list to get all bundles).
Any idea what else can i do?
Here is my structure for a mobile app (Android and iOS):
In src/locale I have 3 subdirs: de_DE, en_US, ru_RU
And in compiler options: -locale=ru_RU,en_US,de_DE -source-path=locale/{locale}
For another mobile app I have:
In src/locale 4 subdirs: en_US, hr_HR, sr_RS, sl_SI.
I had to add the latter 3 dirs with copylocale command.
And in compiler options: -locale hr_HR sr_RS sl_SI en_US -allow-source-path-overlap=true
Both apps work well for me with the latest Apache Flex SDK.
Here is the contents of a src/locale/hr_HR/recources.properties file:
# resources.properties file for locale hr_HR
navbar.tables=Stolovi za igranje:
navbar.all=Svi
navbar.vacant_long=Slobodni
navbar.vacant_short=Slb.
navbar.full_long=Su puni
navbar.full_short=Su puni
comments.good_long=dobri
comments.good_short=Dbr.
comments.bad_long=loši
comments.bad_short=loši
comments.without_long=neutralni
comments.without_short=ntr.
help.title=Pomoć
OK i found a solution here:
http://www.nbilyk.com/flex-localization-example
im really not sure why it should be that difficult.
anyway, if someone ever need a help with that. after you successfully compile the file using ant (like described in the link), if you want to load it dynamcally like i needed just use (for example):
resourceManager.localeChain = ["en_US", "es_ES"];
resourceManager.loadResourceModule("Resources_en_US.swf");
resourceManager.loadResourceModule("Resources_es_ES.swf");
worked well for me, no need to add anything to the compiler args for that solution.
Try using the fully qualified directory path name. If you're using ant you can use ${basedir}/src/locale/{locale}

Automation_agent and qtp_air resource bundles not found when adding automation libs to AIR project

I'm trying to add the automation libraries to my project in Flash Builder so we can automate our testing.
I've added this to the additional compiler settings:
-include-libraries+="${flexlib}/libs/automation/automation.swc","${flexlib}/libs/automation/automation_agent.swc","${flexlib}/libs/automatio n/automation_dmv.swc","${flexlib}/libs/automation/automation_spark.swc ","${flexlib}/libs/automation/automation_air.swc","${flexlib}/libs/aut omation/automation_airspark.swc","${flexlib}/libs/automation/qtp_air.swc"
and -locale nl_BE fr_BE
After compiling this I get 2 errors:
Unable to resolve resource bundle "automation_agent"
Unable to resolve resource bundle "qtp_air"
However, in my nl_BE and fr_BE folders under flex_sdk\frameworks\locale\ the automation_agent_rb.swc and qtp_air_rb.swc are present.
If I switch to en_US, it works fine.
Can somebody explain to me why Flash Builder can't find these resource bundles?
Try explicitly adding automation_agent_rb.swc and qtp_air_rb.swc to your library-path as well.

convert .WAR for auto deploy in karaf/servicemix

I've got very simple .WAR containing example servlet. I'm able to deploy it in servicemix using the following command:
osgi:install file:///home/seiho/apache-servicemix-4.4.2/deploy/TestServlet.war?Bundle-SymbolicName=TestServlet&Webapp-Context=/TestServlet
And then see it in my browser. But only with full path to a file, e.g.: localhost:8080/TestServlet/index.html or localhost:8080/TestServlet/TestServlet (my servlet is TestServlet class).
I'd like to launch the index.html page automatically after entering: localhost:8080/TestServlet
how to do it?
MORE IMPORTANT
I need a way to convert the .WAR file or servlet project (I've got the sources) so that new .WAR file can be auto-deployed by copying it to $SERVICEMIX_HOME/deploy directory.
I've tried editing the MANIFEST.MF file, but with no success. Probably I'm doing something wrong.
Thanks for any advice/help.
To be recognised as a wab, you need to add a context path header to your manifest:
Web-ContextPath: TestServlet
It's working now! I was doing my MANIFEST.MF according to this page: http://team.ops4j.org/wiki/display/ops4j/Pax+Web+Extender+-+War+-+OSGi-fy
The problem was that for some reason "Bundle-Version: 1.0" line was required as opposed to optional as stated on that page.
Honestly, just adding the Bundle-Version fix-it.
I knew it was something wrong with the MANIFEST.MF and after Holly Cummins' question I played with it a bit more. Thanks Holly.
I still can't do anything with the manual site launching (have to manually enter the index.html).
http://localhost:8080/TestServlet/ gives me this:
HTTP ERROR 404
Problem accessing /TestServlet/. Reason:
Not Found
Powered by Jetty://
http://localhost:8080/TestServlet/index.html gives me proper site.

Liferay 6 on Glassfish 3.1 - issue using liferay-ui tags in portlet jsp files

We are seeing this issue on our current Glassfish 3.1 cluster setup. Below are details of issue
- We are running Glassfish version 3.1
We are running liferay 6.0.6
The liferay war is deployed on the Glassfish cluster and working fine on both the nodes.
The same liferay war works fine one Tomcat server as well.
When we deploy our custom portlets on Glassfish cluster it starts working immediately after deployment. (before doing a restart of glassfish cluster)
Once we do a restart of the cluster nodes the same portlet application stops working and Complains and give attached error.
My research till now shows that the java.lang.NoClassDefFoundError: com/liferay/portal/util/PropsValues is part of portal-impl.jar file which is part of liferay portal and should be made available to our portlet. Somehow after the restart the jar files are loaded in a different manner and the same jar file is not available to portlet.
We have also tried the Glassfish 3.1 Bundled liferay 6.1 setup and see the same issue on it as well.
As suggested by liferay forums we have placed the portal-service.jar and portlet.jar in [glassfish home]/lib directory.
when we do a lsof -p pid on the glassfish node instance process it shows the required jar file is open by this process. Not sure why is this not available to our application.
I would appreciate any help or pointers to resolve/investigate this issue.
java.lang.NoClassDefFoundError: com/liferay/portal/util/PropsValues
at org.apache.jsp.html.taglib.ui.search_005fiterator.page_jsp._jspService(page_jsp.java from :500)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217) at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:785)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:649)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:534) at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:323)
at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:418)
at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:92)
This is a related thread on liferay forum by me but I have not really got any response on it from anyone. [Same issue posted on liferay Forum]
i have also tried placing portal-impl.jar in my portlet/WEB-INF/lib dir (which is not recommended way) and I failed since it requires me to bring all other dependent jars in it too.
I am now running out of options and thinking about implementing the pagination feature using some other third party library instead of using liferay tags.
Here is the specific tag which is giving us error
<liferay-ui:search-iterator />
List of jars in my portlet WEB-INF/lib folder
SiebelClientWS-0.0.1-SNAPSHOT.jar
spring-asm-3.0.5.RELEASE.jar
XmlSchema-1.4.7.jar
spring-aspects-3.0.5.RELEASE.jar
aspectjrt-1.6.11.jar
spring-beans-3.0.5.RELEASE.jar
aspectjweaver-1.6.11.jar
spring-context-3.0.5.RELEASE.jar
axiom-api-1.2.11.jar
spring-context-support-3.0.5.RELEASE.jar
axiom-impl-1.2.11.jar
spring-core-3.0.5.RELEASE.jar
axis2-1.5.4.jar
spring-expression-3.0.5.RELEASE.jar
axis2-kernel-1.5.4.jar
spring-jdbc-3.0.5.RELEASE.jar
axis2-transport-http-1.5.4.jar
spring-tx-3.0.5.RELEASE.jar
axis2-transport-local-1.5.4.jar
spring-web-3.0.5.RELEASE.jar
c3p0-0.9.1.2.jar
spring-webmvc-3.0.5.RELEASE.jar
commons-codec-1.4.jar
spring-webmvc-portlet-3.0.5.RELEASE.jar
commons-httpclient-3.1.jar
util-bridges.jar
commons-logging.jar
util-java.jar
flexjson-2.1.jar
util-taglib.jar
httpcore-4.0.jar
woden-api-1.0M9.jar
httpcore-nio-4.0-beta1.jar
woden-impl-commons-1.0M9.jar
log4j.jar
woden-impl-dom-1.0M9.jar
neethi-2.0.2.jar
wsdl4j-1.6.2.jar
spring-aop-3.0.5.RELEASE.jar
wss4j-1.6.2.jar
I changed
/html/taglib/ui/search_paginator/page.jsp
/html/taglib/ui/search_iterator/page.jsp
/html/taglib/ui/page_iterator/start.jsp
and removed the calls to PropsValues and replaced them with calls to the com.liferay.portal.kernel.util.PropsUtil and PropsKeys instead and that go the rid of the error for me.
I made an improvement request
http://issues.liferay.com/browse/LPS-30660
com/liferay/portal/util/PropsValues is part of portal-impl.jar file which is part of liferay portal and should be made available to our portlet.
That is not true, portal-impl.jar is not available to your portlets and it is not meant to. You MUST NOT put it in your WEB-INF/lib. That jar is only available, and should be that way, to Liferay (liferay application).
Can you show contents (list of jars) of your (deployed) portlets WEB-INF/lib?

Resources