Some Hybris first time use after installlation issues - sap-commerce-cloud

[2015-10-13:2043]
Here is a screen shot of the installed extensions...
=========
I think there is a problem with the initialisation script..
=========
I have now installed hybris5.6.0.2:
I have now been able to run the Hybris Administration Console
[localhost:9001]
I have logged in.
I have ran the Initialisation, because being a first time installation, except of taking about an hour to complete, it took about 1 minute 30 sec to complete. I suspect something is wrong.
It has been about six months since I worked with hybris, and I have forgotten the URLs for the hMC, and for the MCC... for the MCC, is it:
http://localhost:9001/mcc??
for the hMC is it:
http://localhost:9001/hMC??
Any suggestions?

You are missing the hmc/mmc extensions in your $HYBRIS_HOME/config/localextensions.xml
You need to have them declared as
<extension name='mcc' />
<extension name="hmc" />
The urls for accessing them are
http://localhost:9001/hmc/hybris
(or use: http://localhost:9001/hmc/hybris?wid=MC0x0, the parameters ensure that the hmc window gets opened in your current tab and not in a separate window)
http://localhost:9001/mmc
In order to get it to work you will have to:
first have to add those extensions (see above)
ant clean all (from within $HYBRIS_HOME/bin/platform, don't forget to also set the ant environment via ". ./setantenv.sh" or "setantenv.bat")
ant initialize
Then you should be able to access the hmc and mmc.
However, you don't seem to have a lot of extensions at all installed.
Not sure what you are trying to do..
If you plan to setup a new "application" by developing your own extensions, e.g. based on the accelerator (or other examples) you should take a look at how to generate those via ext-gen.
(see e.g. https://wiki.hybris.com/display/accdoc/Customizing+the+Accelerator+with+extgen+and+modulegen)
Good luck :)

By default under Hybris 5.6 the generated localextensions.xml is now totally empty (it used to be not) :
<path dir="${HYBRIS_BIN_DIR}" />
<extension name="yempty" />
When you run 'ant all' you can actually see what extensions are loaded :
[echo] core 5.6.0.1 [p*cib]
[echo] testweb 5.6.0.1 [p*w]
[echo] scripting 5.6.0.1 [p*ci]
[echo] paymentstandard 5.6.0.1 [p*ci]
[echo] mediaweb 5.6.0.1 [p*cw]
[echo] maintenanceweb 5.6.0.1 [p*w]
[echo] deliveryzone 5.6.0.1 [p*ci]
[echo] commons 5.6.0.1 [p*ci]
[echo] processing->(scripting,commons) 5.6.0.1 [p*ci]
[echo] impex->processing 5.6.0.1 [p*ci]
[echo] validation->impex 5.6.0.1 [p*ci]
[echo] catalog->(validation,commons) 5.6.0.1 [p*cib]
[echo] europe1->(impex,catalog) 5.6.0.1 [p*ci]
[echo] platformservices->(paymentstandard,impex,deliveryzone,europe1,processing) 5.6.0.1 [p*cb]
[echo] workflow->(catalog,platformservices,processing,commons) 5.6.0.1 [p*ci]
[echo] hac->(impex,catalog,processing,platformservices) 5.6.0.1 [p*w]
[echo] comments->(workflow,impex,catalog,processing) 5.6.0.1 [p*ci]
[echo] advancedsavedquery->(impex,catalog,processing) 5.6.0.1 [p*ci]
[echo] yempty 5.6.0.1 [cibw] path:/Users/*****/Workspace/hybris/hybris/bin/ext-template/yempty
Now the question is what do you want ? Do you want to run a B2C site ? If yes the best way is to run 'ant modulegen' and then add your own extensions, or if you simply want out of the box default sites, add those lines under your localextensions.xml file :
<extension name='apparelstore' />
<extension name='electronicsstore' />
<extension name='yacceleratorcore' />
<extension name='yacceleratorinitialdata' />
<extension name='yacceleratorfacades' />
<extension name='yacceleratorcockpits' />
<extension name='yacceleratorstorefront' />
By doing this you will have out of the box store fronts and HMC / Cockpits.

Post the hybris 5.5.1 version, there have been significant changes in the platform. The recipe concept has been introduced for the installation of extensions. This recipe is nothing but a .gradle file which contains information about the extensions to be written in the localextensions.xml and the property files (local.properties and custom.properties) to be modified. This is probably introduced with the intention of the "Separation of Concerns" ideology of hybris. Please find below the link which contains the information about recipes
https://wiki.hybris.com/display/release5/Sample+Scenarios+Installation

Related

Difficulties with installation script for hybris 5.6.02

The installation script reports a Build failure...
mlittle-mbook1:~ mlittle$ pwd
/Users/mlittle
mlittle-mbook1:~ mlittle$ cd hybris/bin/platform
mlittle-mbook1:platform mlittle$ ls -a
. .project build.number global.properties project.properties setantenv.sh tomcat
.. .settings build.xml hybrisserver.bat resources tcServer
.classpath adminserver.bat env.properties hybrisserver.sh roles.bat tenant_foo.properties
.externalToolBuilders adminserver.sh ext lib roles.sh tenant_junit.properties
.fbprefs apache-ant-1.9.1 extensions.xml license.bat ruleset.xml tenant_t1.properties
.pmd bootstrap extgen license.sh setantenv.bat tenant_t2.properties
mlittle-mbook1:platform mlittle$ . ./setantenv.sh
mlittle-mbook1:platform mlittle$ ant clean all
Buildfile: /Users/mlittle/hybris/bin/platform/build.xml
[echo] /Users/mlittle/hybris/bin/platform/tomcat/bin
[echo] /Users/mlittle/hybris/bin/platform/ext/core/web/webroot/WEB-INF/external-dependencies.xml was not found!
BUILD FAILED
It is looking for the path, and the file at that path..
Users/mlittle/hybris/bin/platform/ext/core/web/webroot/WEB-INF/external-dependencies.xml
When one looks in the path, I could not find Users/mlittle/hybris/bin/platform/ext/core/web/??
Any suggestions?
Best Regards.
====
Additional information... [2015-10-09-0952 EST]
Step:
Procedure:
MJL comment…
1:Go to the Download page and download the packages you want to install.
:Done
2.:Create the directory where you will extract the ZIP archives. This directory must meet the following conditions:
It must be close to the system root directory (for example C:\hybris. You may download the files directly to the root directory, because the ZIP files already contain directory hybris). Microsoft Windows requires the directory paths to be shorter than 255 characters. Any part of a directory path exceeding this limitation is truncated. The hybris Commerce Suite modules installation creates several sub-directories, therefore use short directory paths.
Do not use directory paths containing spaces (such as C:\hybris Platform). Building the hybris Commerce Suite fails if the directory path contains spaces
:I have created a directory:
/00hybris/
3.:Extract the ZIP archives into the created directory. After the installation has been completed, the chosen directory should contain the structure similar to the example below:And unzipped the downloand file…
hybris-commerce-suite-5.6.0.2.zip into that path to get...
README
build-tools
hybris
hybris-Mobile-Apps-SDK
hybris-ems
hybris-oms
hybris-sbg
installer
licenses
And in the 00hybris/hybris path
bin
But Sebastian, I cannot find the 00hybris/hybris/config path after unzipping the download file…
4.:Set Up Apache Ant:
To set up Apache Ant, perform the following steps:
1. Open a command prompt in Microsoft Windows (shell in Unix family systems).
2. Navigate to the ${HYBRIS_BIN_DIR}/platform directory, for example:C:\hybris\bin\platform.
3. On Microsoft Windows systems, run the setantenv.bat file by entering setantenv.bat. Do not close the command window.
4. On Unix-based systems (like Mac OS X or Linux), run setantenv.sh by entering . ./setantenv.sh. Do not close the command window.
5. C:\hybris\bin\platform>setantenv.bat
6. Setting ant home to: C:\hybris-5.0\hybris\bin\platform\apache-ant-1.8.2
7. Apache Ant(TM) version 1.8.2 compiled on March 26 2013
:With this..
a. created a new shell session
b. Navigated to 00hybris/hybris/bin/platform…
mlittle-mbook1:hybris mlittle$ cd bin/platform
mlittle-mbook1:platform mlittle$ pwd.
-bash: pwd.: command not found
mlittle-mbook1:platform mlittle$ pwd
/Users/mlittle/00hybris/hybris/bin/platform
c. From /Users/mlittle/00hybris/hybris/bin/platform
, I ran, mlittle-mbook1:platform mlittle$ . ./setantenv.sh
with the result…
mlittle-mbook1:platform mlittle$ . ./setantenv.sh
mlittle-mbook1:platform mlittle$
It appeared to run, but it gave back no response: why?
5:Perform Build Procedure for hybris Commerce Suite
Go to the Windows command prompt (shell in Unix family systems), navigate to the ${HYBRIS_BIN_DIR}/platform directory and type ant clean all.:See response below…
mlittle-mbook1:platform mlittle$ ant clean all
Buildfile: /Users/mlittle/00hybris/hybris/bin/platform/build.xml
[echo] /Users/mlittle/00hybris/hybris/bin/platform/tomcat/bin
[echo] /Users/mlittle/00hybris/hybris/bin/platform/ext/core/web/webroot/WEB-INF/external-dependencies.xml was not found!
[mkdir] Created dir: /Users/mlittle/00hybris/hybris/log
[mkdir] Created dir: /Users/mlittle/00hybris/hybris/data
[mkdir] Created dir: /Users/mlittle/00hybris/hybris/temp/hybris
[mkdir] Created dir: /Users/mlittle/00hybris/hybris/roles
[input]
[input] **** NO CONFIG FOLDER FOUND ****
[input]
[input] No config folder was found at /Users/mlittle/00hybris/hybris/config.
[input] A "fresh" folder containing basic configuration files and the hybris
[input] demo licence will be created for your convenience.
[input] Please adjust and review the configuration files (and license) and
[input] call 'ant' again. This directory will never be overridden or
[input] touched again. Always use this configuration folder for configuration
[input] of platform, do not change anything within the platform folder.
[input]
[input] Please choose the configuration template.
[input] Press [Enter] to use the default value ([develop], production)
[copy] Copying 27 files to /Users/mlittle/00hybris/hybris/config
[copy] Copying 1 file to /Users/mlittle/00hybris/hybris/config
BUILD FAILED
/Users/mlittle/00hybris/hybris/bin/platform/build.xml:20: The following error occurred while executing this line:
/Users/mlittle/00hybris/hybris/bin/platform/resources/ant/antmacros.xml:123: java.lang.UnsupportedClassVersionError: de/hybris/ant/taskdefs/DbDriverValidator : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1128)
at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1299)
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1354)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1315)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1068)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:266)
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:579)
at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:237)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:217)
at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:168)
at org.apache.tools.ant.taskdefs.ImportTask.importResource(ImportTask.java:230)
at org.apache.tools.ant.taskdefs.ImportTask.execute(ImportTask.java:162)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
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:601)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:179)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93)
at org.apache.tools.ant.Main.runBuild(Main.java:826)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Total time: 21 seconds
mlittle-mbook1:platform mlittle$
5: Continued
Checking what this has done…
a. it has created a directory structure under 00hybris/hybris:
bin
config
data
log
path.txt
path2.txt
roles
temp
And opening the 00Hybris/hybris/config/localextensions.xml file..
<path dir="${HYBRIS_BIN_DIR}" />
<!-- ext-platform-optional -->
<!-- ext-incubator -->
<!-- ext-commerce -->
<!-- ext-backoffice -->
<!-- ext-accelerator -->
<!-- ext-cockpit -->
<!-- ext-channel -->
<!-- ext-addon -->
<!-- ext-supportability -->
<!-- ext-content -->
<!-- ext-integration -->
<!-- ext-print -->
<!-- ext-template -->
<extension name="yempty" />
<!-- ext-atddtests -->
<!-- ext-data -->
<!-- ext-eventtracking -->
<!-- ext-integration/sap/adtreco -->
<!-- ext-integration/sap/asynchronousOM -->
<!-- ext-integration/sap/availability -->
<!-- ext-integration/sap/pointofsale -->
<!-- ext-integration/sap/creditCheck -->
<!-- ext-integration/sap/masterdata -->
<!-- ext-integration/sap/core -->
<!-- ext-integration/sap/testsupport -->
<!-- ext-integration/sap/synchronousPricing -->
<!-- ext-integration/sap/sapprodreco -->
<!-- ext-integration/sap/productconfig -->
<!-- ext-integration/sap/synchronousOM -->
</extensions>
It does not seem to have populated the variable with the value for ${HYBRIS_BIN_DIR}... 00hybris/hybris/bin??
====
2015-10-10-1726EST
OK... investigated...
The problem is because there is an incompatibility between the version hybris was compiled and what is on my machine...
I think the root cause of the problem might be the wrong java version:
java.lang.UnsupportedClassVersionError: de/hybris/ant/taskdefs/DbDriverValidator : Unsupported major.minor version 52.0
indicates a java version conflict.
Hybris 5.6 should work with java, you can check at https://wiki.hybris.com/display/release5/System+Requirements+-+Release+5.6
Do you maybe have java 6 installed?
You can see via
java -version
To be sure you should use java 8 as per https://wiki.hybris.com/display/general/Third-Party+Compatibility+-+Release+5.6
(btw, you can also signup for the https://experts.hybris.com/ forum to get more in-depth hybris answers)
Hybris 5.6+ requires Java 8, update your environment variables to point Java 1.8
More references here:
http://hybrisdude.blogspot.com/2015/09/hybris-setup-issue-unsupported.html
Found a post regarding this and it also helped to solve the issue :
hybris installation issure resolved

Liferay Web-Service: method in *LocalServiceImpl not getting build in *LocalServiceUtil

Methods I am defining in *LocalServiceImpl is not getting defined by service builder in *LocalServiceUtil.
Have gone through this question,but didn't work for me
Liferay: Any method written in *LocalServiceImpl not found in *LocalServiceUtil
service log:
build-service:
[echo] Loading jar:file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
[echo] 8 Jun, 2015 8:18:28 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
[echo] INFO: Global shared lib directory /home/rayon/shi/liferay bundle/liferay-plugins-sdk-6.1.1/lib/
[echo] 8 Jun, 2015 8:18:28 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
[echo] INFO: Global lib directory /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/lib/ext/
[echo] 8 Jun, 2015 8:18:28 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
[echo] INFO: Portal lib directory /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/
[echo] 8 Jun, 2015 8:18:28 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
[echo] Loading jar:file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
[echo] Loading jar:file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
[echo] INFO: Properties for portal loaded from [file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/classes/portal-ext.properties, jar:file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties, jar:file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties]
[echo] Loading file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/classes/portal-ext.properties
[echo] Building SampleWS3
[echo] Writing /home/rayon/shi/liferay bundle/liferay-plugins-sdk-6.1.1/portlets/SampleWs3-portlet/docroot/WEB-INF/service/com/test3/model/SampleWS3Wrapper.java
[mkdir] Created dir: /home/rayon/shi/liferay bundle/liferay-plugins-sdk-6.1.1/portlets/SampleWs3-portlet/docroot/WEB-INF/service-classes
compile-java:
[copy] Copied 6 empty directories to 6 empty directories under /home/rayon/shi/liferay bundle/liferay-plugins-sdk-6.1.1/portlets/SampleWs3-portlet/docroot/WEB-INF/service-classes
[javac] Compiling 18 source files to /home/rayon/shi/liferay bundle/liferay-plugins-sdk-6.1.1/portlets/SampleWs3-portlet/docroot/WEB-INF/service-classes
[zip] Building zip: /home/rayon/shi/liferay bundle/liferay-plugins-sdk-6.1.1/portlets/SampleWs3-portlet/docroot/WEB-INF/lib/SampleWs3-portlet-service.jar
[delete] Deleting directory /home/rayon/shi/liferay bundle/liferay-plugins-sdk-6.1.1/portlets/SampleWs3-portlet/docroot/WEB-INF/service-classes
BUILD SUCCESSFUL
stack-trace on deployment:
10:38:15,134 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner] [AutoDeployDir:177] Processing SampleWs3-portlet-6.1.1.1.war
10:38:15,135 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner] [PortletAutoDeployListener:77] Copying portlets for /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce- ga2/deploy/SampleWs3-portlet-6.1.1.1.war
10:38:15,135 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][BaseDeployer:763] Deploying SampleWs3-portlet-6.1.1.1.war
10:38:15,173 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][BaseDeployer:859] Updating SampleWs3 from version 6.1.1.1 to version 6.1.1.1
Expanding: /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/deploy/SampleWs3-portlet-6.1.1.1.war into /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/20150608103815174
Copying 1 file to /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/20150608103815174/WEB-INF
Copying 1 file to /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/20150608103815174/WEB-INF/classes
Copying 1 file to /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/20150608103815174/WEB-INF/classes
Copying 1 file to /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/20150608103815174/WEB-INF/jsp
10:38:15,308 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][BaseDeployer:2083] Modifying Servlet 2.5 /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/20150608103815174/WEB-INF/web.xml
Copying 102 files to /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/SampleWs3-portlet
Copying 1 file to /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/SampleWs3-portlet
Deleting directory /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/20150608103815174
10:38:15,355 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner] [PortletAutoDeployListener:87] Portlets for /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/deploy/SampleWs3-portlet-6.1.1.1.war copied successfully. Deployment will start in a few seconds.
8 Jun, 2015 10:38:20 AM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/SampleWs3-portlet]
10:38:20,787 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]][PluginPackageUtil:1033] Reading plugin package for SampleWs3-portlet
8 Jun, 2015 10:38:20 AM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
8 Jun, 2015 10:38:21 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/rayon/shi/liferay bundle 20th may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/SampleWs3-portlet
10:38:21,573 INFO [pool-2-thread-22][HotDeployImpl:178] Deploying SampleWs3-portlet from queue
10:38:21,574 INFO [pool-2-thread-22][PluginPackageUtil:1033] Reading plugin package for SampleWs3-portlet
Loading file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/35-SampleWs3-portlet/WEB-INF/classes/portlet.properties
Loading file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/35-SampleWs3-portlet/WEB-INF/classes/service.properties
10:38:21,710 INFO [pool-2-thread-22][ServiceComponentLocalServiceImpl:280] Upgrading Sample database to build number 62
Loading file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/35-SampleWs3-portlet/WEB-INF/classes/portlet.properties
8 Jun, 2015 10:38:21 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Loading file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/35-SampleWs3-portlet/WEB-INF/classes/service.properties
Loading file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/35-SampleWs3-portlet/WEB-INF/classes/service.properties
Loading file:/home/rayon/shi/liferay%20bundle%2020th%20may/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/temp/35-SampleWs3-portlet/WEB-INF/classes/portlet.properties
First of all: Check the sourcecode for your *LocalServiceUtil and make sure it really doesn't have the method's implementation. If the method is there, you'll have to look elsewhere. Here's where:
When you deploy a portlet, you can get the API on multiple ways: Someone might have deployed the plugin containing the services on tomcat's global class path. If you don't update that one, you probably won't see your updates.
Also, someone might have copied an older version of your plugin into their own plugin as well - naturally not seeing any updates unless they update their dependency. Check for changed names of the jar file as well. Also check for the classes: Some people like to add the compiled java classes to their source directories, ending up with two different implementations of the same code.

Unable to create tar using ANT

I am trying to create tar and exclude file from directory roopendra
but its not seems to work. When I am trying to untar file I am getting error gzip: stdin: not in gzip format. my file exclude also not working. After running build.xml its creating tar but when I am trying to untar as below. I am using Ant version 1.9.3
Command :
$ tar -xvzf projecttar.tar.gz
Getting Error :
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
build.xml :
<?xml version="1.0"?>
<project name="testdir" default="all_task" basedir=".">
<property name="src" value="src"/>
<property name="build" value="build"/>
<property name="lib" value="lib"/>
<property name="project.dir" value="${project}/testdir" />
<target name="all_task">
<antcall target="create_directory"/>
<antcall target="create_tar"/>
</target>
<target name="create_directory">
<mkdir dir="${dist}" />
<echo message=" ${dist} directory created successfully" />
</target>
<target name="create_tar">
<tar destfile="${project}/build/projecttar.tar.gz" compression="gzip"
basedir="${project.dir}"
excludes="${project.dir}/roopendra/**"/>
</target>
</project>
Build Command :-
ant -buildfile build.xml -Ddist=/home/pathto/roop/projectRv/ -Dproject=/home/pathto/roop/
Output :-
Buildfile: /opt/apache-ant-1.9.3/build.xml
all_task:
create_directory:
[echo] /home/pathto/roop/projectRv/ directory created successfully
create_tar:
[tar] Building tar: /home/pathto/roop/build/projecttar.tar.gz
BUILD SUCCESSFUL
Total time: 0 seconds
I have already tried :
Ant not creating tar files
After run
ant -v
Output:
Apache Ant(TM) version 1.9.3 compiled on December 23 2013
Trying the default build file: build.xml
Buildfile: /opt/apache-ant-1.9.3/build.xml
Detected Java version: 1.7 in: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre
Detected OS: Linux
parsing buildfile /opt/apache-ant-1.9.3/build.xml with URI = file:/opt/apache-ant-1.9.3/build.xml
Project base dir set to: /opt/apache-ant-1.9.3
parsing buildfile jar:file:/opt/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/opt/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
Property "project" has not been set
Build sequence for target(s) `all_task' is [all_task]
Complete build sequence is [all_task, create_tar, create_directory, ]
all_task:
Project base dir set to: /opt/apache-ant-1.9.3
[antcall] calling target(s) [create_directory] in build file /opt/apache-ant-1.9.3/build.xml
parsing buildfile /opt/apache-ant-1.9.3/build.xml with URI = file:/opt/apache-ant-1.9.3/build.xml
Project base dir set to: /opt/apache-ant-1.9.3
Override ignored for property "src"
Override ignored for property "build"
Override ignored for property "lib"
Property "project" has not been set
Override ignored for property "project.dir"
Build sequence for target(s) `create_directory' is [create_directory]
Complete build sequence is [create_directory, create_tar, all_task, ]
[antcall] Entering /opt/apache-ant-1.9.3/build.xml...
Build sequence for target(s) `create_directory' is [create_directory]
Complete build sequence is [create_directory, create_tar, all_task, ]
create_directory:
Property "dist" has not been set
[mkdir] Skipping /opt/apache-ant-1.9.3/${dist} because it already exists.
Property "dist" has not been set
[echo] ${dist} directory created successfully
[antcall] Exiting /opt/apache-ant-1.9.3/build.xml.
Project base dir set to: /opt/apache-ant-1.9.3
[antcall] calling target(s) [create_tar] in build file /opt/apache-ant-1.9.3/build.xml
parsing buildfile /opt/apache-ant-1.9.3/build.xml with URI = file:/opt/apache-ant-1.9.3/build.xml
Project base dir set to: /opt/apache-ant-1.9.3
Override ignored for property "src"
Override ignored for property "build"
Override ignored for property "lib"
Property "project" has not been set
Override ignored for property "project.dir"
Build sequence for target(s) `create_tar' is [create_tar]
Complete build sequence is [create_tar, create_directory, all_task, ]
[antcall] Entering /opt/apache-ant-1.9.3/build.xml...
Build sequence for target(s) `create_tar' is [create_tar]
Complete build sequence is [create_tar, create_directory, all_task, ]
create_tar:
Property "project" has not been set
Property "project" has not been set
[antcall] Exiting /opt/apache-ant-1.9.3/build.xml.
BUILD FAILED
/opt/apache-ant-1.9.3/build.xml:28: The following error occurred while executing this line:
/opt/apache-ant-1.9.3/build.xml:42: basedir does not exist!
at org.apache.tools.ant.taskdefs.Tar.execute(Tar.java:249)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
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 org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Finally, I have got solution here http://www.donaldsimpson.co.uk/?p=122 . file permissions were not being preserved when Taring up a build with Ant
<target name="create_tar">
<tar destfile="${project}/build/projecttar.tar.gz" basedir="${project.dir}" longfile="gnu" compression="gzip">
<tarfileset dir="${project}/build/" filemode="755">
<include name="**/*roopendra/*.sh" />
</tarfileset>
</tar>
</target>

Primefaces tag library on tomcat, rendering an empty page from a valid jsp file

I've posted here earlier about how to make a tic tac toe for two users using jsf and I got the link for this great taglib, Primefaces. It's absolutely perfect for what I need to do, but I'm being stuck on trying to make it do anything, even render the examples from their website.
So I've been following this tutorial I found (sadly, there aren't many of them on the subject of Primefaces): http://java.dzone.com/articles/primefaces-quickstart-tutorial
Step by step, I made everything according to this tutorial, yet when I run it, it renders an empty page every time.
So I tried a simpler example from the official website: http://www.primefaces.org/gettingStarted.html
This (test.xhtml):
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<h:body>
<p:spinner />
</h:body>
</html>
renders an empty page, while this:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<h:body>
test test test test
<p:spinner />
</h:body>
</html>
renders only the "test test test test" text.
So I guess the problem must be in the tags, tomcat doesn't see them/doesn't know how to interprete them.
But, according to the tutorial and the primefaces website all I need to do is to put the jars in WEB-INF/lib as I have done (by the way, I'm using Eclipse and the empty project I created was "Dynamic Web Project").
In my WEB-INF/lib I have the following jars:
jsf-api-2.0.3.jar
jsf-impl-2.0.3.jar
jstl-1.0.2.jar
primefaces-3.3.RC1.jar
If it's of any help, here's the content of the tomcat console:
2012-05-27 13:18:11 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
2012-05-27 13:18:12 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Primefaces1' did not find a matching property.
2012-05-27 13:18:12 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2012-05-27 13:18:12 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1127 ms
2012-05-27 13:18:12 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
2012-05-27 13:18:12 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
2012-05-27 13:18:13 com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra 2.0.3 (SNAPSHOT 20100726) for context '/Primefaces1'
2012-05-27 13:18:17 org.primefaces.webapp.PostConstructApplicationEventListener processEvent
INFO: Running on PrimeFaces 3.3.RC1
2012-05-27 13:18:17 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
2012-05-27 13:18:17 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
2012-05-27 13:18:17 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/63 config=null
2012-05-27 13:18:17 org.apache.catalina.startup.Catalina start
INFO: Server startup in 5096 ms
What can be the case? Am I putting the jars in wrong place, is it a tomcat failure or maybe something else entirely?
Ok, I solved it, maybe someone will someday find this useful.
So, when using Primefaces with JSF, not only the webpage files have to have the .xhtml extension (a solution I've found here: http://www.coderanch.com/t/473437/JSF/java/not-allowed-template-text), but also the web.xml file must be modified (a solution I've found here: Simple primefaces application not working), like this:
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
Now it works perfectly well.

Liferay Service not getting deployed to Axis

I am creating a liferay service, I generated a lot of classes. When i try to build-service using Liferay ServiceBUilder, it shows in console that My service is build succesfully
[Console output redirected to file:/home/rajeshp/Desktop/LiferayDeveloperStudio/workspace/.metadata/.plugins/com.liferay.ide.eclipse.sdk/sdk.log]
Buildfile: /home/rajeshp/Desktop/LiferayDeveloperStudio/workspace/trunk/portlets/rosetta-services-portlet/build.xml
build-service:
[copy] Copying 1 file to /home/rajeshp/Desktop/LiferayDeveloperStudio/workspace/trunk/portlets/rosetta-services-portlet/docroot/WEB-INF/classes
[echo] Loading jar:file:/home/rajeshp/Desktop/LiferayDeveloperStudio/liferay-portal-6.0-ee-sp2/tomcat-6.0.32/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
[echo] 16:27:07,649 INFO [EasyConf:122] Refreshed the configuration of all components
[echo] 16:27:08,250 INFO [ConfigurationLoader:56] Properties for jar:file:/home/rajeshp/Desktop/LiferayDeveloperStudio/liferay-portal-6.0-ee-sp2/tomcat-6.0.32/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal loaded from [jar:file:/home/rajeshp/Desktop/LiferayDeveloperStudio/liferay-portal-6.0-ee-sp2/tomcat-6.0.32/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties, jar:file:/home/rajeshp/Desktop/LiferayDeveloperStudio/liferay-portal-6.0-ee-sp2/tomcat-6.0.32/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties]
[echo] Loading jar:file:/home/rajeshp/Desktop/LiferayDeveloperStudio/liferay-portal-6.0-ee-sp2/tomcat-6.0.32/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
[echo] Loading jar:file:/home/rajeshp/Desktop/LiferayDeveloperStudio/liferay-portal-6.0-ee-sp2/tomcat-6.0.32/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
[echo] 16:27:11,976 INFO [PortalImpl:295] Global lib directory /home/rajeshp/Desktop/LiferayDeveloperStudio/liferay-portal-6.0-ee-sp2/tomcat-6.0.32/lib/ext/
[echo] 16:27:11,978 INFO [PortalImpl:315] Portal lib directory /home/rajeshp/Desktop/LiferayDeveloperStudio/liferay-portal-6.0-ee-sp2/tomcat-6.0.32/webapps/ROOT/WEB-INF/lib/
[echo] Building ECData
[echo] Building WebArticleHelper
[delete] Deleting: /home/rajeshp/Desktop/LiferayDeveloperStudio/workspace/trunk/portlets/rosetta-services-portlet/ServiceBuilder.temp
[mkdir] Created dir: /home/rajeshp/Desktop/LiferayDeveloperStudio/workspace/trunk/portlets/rosetta-services-portlet/docroot/WEB-INF/service-classes
compile-java:
[javac] Compiling 18 source files to /home/rajeshp/Desktop/LiferayDeveloperStudio/workspace/trunk/portlets/rosetta-services-portlet/docroot/WEB-INF/service-classes
[zip] Building zip: /home/rajeshp/Desktop/LiferayDeveloperStudio/workspace/trunk/portlets/rosetta-services-portlet/docroot/WEB-INF/lib/rosetta-services-portlet-service.jar
[delete] Deleting directory /home/rajeshp/Desktop/LiferayDeveloperStudio/workspace/trunk/portlets/rosetta-services-portlet/docroot/WEB-INF/service-classes
BUILD SUCCESSFUL
Total time: 16 seconds
But I cant see the service deployed in Liferay Developer studio
Also, when i open http://localhost:8080/tunnel-web/axis
I cant find my service there,
the services-portlet is not giving any error while compiling, deploying, building-services, to add to more frustration, the same services-portlet and services are getting deployed in my collegeue's machine.
Can anybody figure out what the problem is? Thanks a lot in advance.
Once you run build-services you need to run build-wsdd ant task (or click "build wsdd" in the service.xml editor in the IDE). Also to try to test this you have to right-click the portlet project that is shown in the servers view and select "test web services". Or if you want to see the url directly you should use:
http://localhost:8080/rosetta-services-portlet/tunnel-web/axis
I think the link is : http://localhost:8080/rosetta-services-portlet/axis
........

Resources