Fórum

i got an error msg while deploying a new portlet. plz help me

Sidharth Rishikesh, modificado 10 Anos atrás.

i got an error msg while deploying a new portlet. plz help me

New Member Postagens: 7 Data de Entrada: 22/07/13 Postagens Recentes
hii my name is Sidharth Rishikesh... Im new to liferay......
i ve added liferay to Eclipse Java EE IDE : Version: Indigo Service Release 2: with liferay tomcat server

Liferay home page was opened up...
i created a new portlet in liferay to print " hello" with portlet name: " portel_exp1 "

but via deploying the portlet i got an err msg as given below....


Buildfile: F:\liferay-plugins-sdk-6.1.1\liferay-plugins-sdk-6.1.1\portlets\portel_exp1-portlet\build.xml

BUILD FAILED
F:\liferay-plugins-sdk-6.1.1\liferay-plugins-sdk-6.1.1\portlets\portel_exp1-portlet\build.xml:5: The following error occurred while executing this line:
F:\liferay-plugins-sdk-6.1.1\liferay-plugins-sdk-6.1.1\portlets\build-common-portlet.xml:7: The following error occurred while executing this line:
F:\liferay-plugins-sdk-6.1.1\liferay-plugins-sdk-6.1.1\build-common-plugin.xml:5: The following error occurred while executing this line:
F:\liferay-plugins-sdk-6.1.1\liferay-plugins-sdk-6.1.1\build-common.xml:70: .

Task cannot continue because ECJ is not installed.

ECJ was automatically installed. Please rerun your task.



The content inside this abv files are give below...


--------------------------------------------------------------------------------
build.xml:5
---------------------------------------------------------------------------------

<?xml version="1.0"?>
<!DOCTYPE project>

<project name="portel_exp1-portlet" basedir="." default="deploy">
<import file="F:\liferay-plugins-sdk-6.1.1\liferay-plugins-sdk-6.1.1\portlets\build-common-portlet.xml" />
</project>

--------------------------------------------------------------------------------------------
build-common-portlet.xml:7
--------------------------------------------------------------------------------------------

<?xml version="1.0"?>
<!DOCTYPE project>

<project name="build-common-portlet">
<property name="project.dir" value="../.." />

<import file="../build-common-plugin.xml" />

<target name="build-css">
<java
classname="com.liferay.portal.tools.SassToCssBuilder"
classpathref="portal.classpath"
fork="true"
newenvironment="true"
>
<jvmarg value="-Dliferay.lib.portal.dir=${app.server.lib.portal.dir}" />
<arg value="sass.dir=${basedir}/docroot" />
</java>
</target>

<target name="war" depends="compile">
<antcall target="build-css" />

<antcall target="build-common-plugin.war" />
</target>
</project>



-------------------------------------------------------------------------------------------------------------------------------------------------
build-common-plugin.xml:5:
---------------------------------------------------------------------------------------------------------------------------------------------------

<?xml version="1.0"?>
<!DOCTYPE project>

<project name="build-common-plugins" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-common.xml" />

<target name="build-service">
<for param="service.file">
<path>
<fileset
dir="."
includes="*/docroot/WEB-INF/service.xml"
/>
</path>
<sequential>
<antelope:stringutil string="@{service.file}" property="service.file.index">
<antelope:indexof string="docroot" fromindex="0" />
</antelope:stringutil>

<antelope:stringutil string="@{service.file}" property="portlet.dir">
<antelope:substring beginindex="0" endindex="${service.file.index}" />
</antelope:stringutil>

<ant dir="${portlet.dir}" target="build-service" inheritAll="false" />
</sequential>
</for>
</target>

<target name="clean">
<antcall target="loop-modules">
<param name="loop.modules.cmd" value="clean-module" />
</antcall>
</target>

<target name="clean-module">
<ant dir="${module.name}" target="clean" inheritAll="false" />
</target>

<target name="compile">
<antcall target="loop-modules">
<param name="loop.modules.cmd" value="compile-module" />
</antcall>
</target>

<target name="compile-module">
<ant dir="${module.name}" target="compile" inheritAll="false" />
</target>

<target name="deploy">
<antcall target="loop-modules">
<param name="loop.modules.cmd" value="deploy-module" />
</antcall>
</target>

<target name="deploy-module">
<ant dir="${module.name}" target="deploy" inheritAll="false" />
</target>

<target name="jar">
<antcall target="loop-modules">
<param name="loop.modules.cmd" value="jar-module" />
</antcall>
</target>

<target name="jar-module">
<ant dir="${module.name}" target="jar" inheritAll="false" />
</target>

<target name="loop-modules">
<if>
<not>
<equals arg1="${plugins.includes}" arg2="" />
</not>
<then>
<for param="module.name">
<path>
<dirset dir="." excludes="${plugins.excludes}" includes="${plugins.includes}" />
</path>
<sequential>
<antelope:stringutil string="@{module.name}" property="module.name.unix">
<antelope:replace regex="\\" replacement="/" />
</antelope:stringutil>

<antelope:grep in="${module.name.unix}" regex="(.*/)(.*)" group="2" property="module.name" />

<antcall target="${loop.modules.cmd}" />
</sequential>
</for>
</then>
</if>
</target>

<target name="setup-eclipse">
<antcall target="loop-modules">
<param name="loop.modules.cmd" value="setup-eclipse-module" />
</antcall>
</target>

<target name="setup-eclipse-module">
<ant dir="${module.name}" target="setup-eclipse" inheritAll="false" />
</target>

<target name="war">
<antcall target="loop-modules">
<param name="loop.modules.cmd" value="war-module" />
</antcall>
</target>

<target name="war-module">
<ant dir="${module.name}" target="war" inheritAll="false" />
</target>
</project>


----------------------------------------------------------------------------------------------------------------------------------------

build-common.xml:70: .

----------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0"?>
<!DOCTYPE project>

<project name="build-common">
<property environment="env" />

<property file="${project.dir}/build.${user.name}.properties" />
<property file="${project.dir}/build.${env.COMPUTERNAME}.properties" />
<property file="${project.dir}/build.${env.HOST}.properties" />
<property file="${project.dir}/build.${env.HOSTNAME}.properties" />
<property file="${project.dir}/build.properties" />

<property name="app.server.classes.portal.dir" value="${app.server.portal.dir}/WEB-INF/classes" />
<property name="app.server.lib.portal.dir" location="${app.server.portal.dir}/WEB-INF/lib" />

<path id="lib.classpath">
<fileset dir="${project.dir}/lib" includes="*.jar" />
</path>

<path id="plugin.classpath">
<path refid="plugin-lib.classpath" />
<fileset dir="${app.server.lib.global.dir}" includes="*.jar" />
<fileset dir="${app.server.lib.portal.dir}" includes="annotations.jar,commons-logging.jar,log4j.jar,util-bridges.jar,util-java.jar,util-taglib.jar" />
<fileset dir="${project.dir}/lib" includes="activation.jar,jsp-api.jar,mail.jar,servlet-api.jar" />
</path>

<path id="portal.classpath">
<pathelement location="${app.server.classes.portal.dir}" />
<fileset dir="${app.server.lib.global.dir}" includes="*.jar" />
<fileset dir="${app.server.lib.portal.dir}" includes="*.jar" />
<fileset dir="${project.dir}/lib" includes="activation.jar,jargs.jar,jsp-api.jar,qdox.jar,servlet-api.jar" />
</path>

<path id="test.classpath">
<path refid="plugin.classpath" />
<fileset dir="${app.server.lib.portal.dir}" includes="commons-io.jar" />
<fileset dir="${project.dir}/lib" includes="junit.jar" />
<pathelement location="test-classes/integration" />
<pathelement location="test-classes/unit" />
</path>

<taskdef classpathref="lib.classpath" resource="net/sf/antcontrib/antlib.xml" />
<taskdef classpathref="lib.classpath" resource="ise/antelope/tasks/antlib.xml" uri="antlib:ise.antelope.tasks" />

<condition property="correct.ant.version">
<antversion atleast="1.7.0" />
</condition>

<if>
<not>
<equals arg1="${correct.ant.version}" arg2="true" />
</not>
<then>
<fail>Please use Ant 1.7.0 or above.</fail>
</then>
</if>

<whichresource resource="/org/eclipse/jdt/core/JDTCompilerAdapter.class" property="ecj.compiler" />

<if>
<and>
<equals arg1="${javac.compiler}" arg2="org.eclipse.jdt.core.JDTCompilerAdapter" />
<not>
<isset property="ecj.compiler" />
</not>
</and>
<then>
<copy file="${project.dir}/lib/ecj.jar" todir="${ant.home}/lib" />

<fail>
.

Task cannot continue because ECJ is not installed.

ECJ was automatically installed. Please rerun your task.
</fail>
</then>
</if>

<target name="compile-java">
<copy todir="${javac.destdir}">
<fileset dir="${javac.srcdir}" excludes="**/*.java" />
</copy>

<javac
classpathref="${javac.classpathref}"
compiler="${javac.compiler}"
debug="${javac.debug}"
deprecation="${javac.deprecation}"
destdir="${javac.destdir}"
encoding="${javac.encoding}"
includeAntRuntime="false"
nowarn="${javac.nowarn}"
srcdir="${javac.srcdir}"
/>
</target>

<target name="format-javadoc">
<java
classname="com.liferay.portal.tools.JavadocFormatter"
classpathref="portal.classpath"
fork="true"
newenvironment="true"
>
<jvmarg value="-Xmx512m" />
<arg value="javadoc.init=${init}" />
<arg value="javadoc.input.dir=${input.dir}" />
<arg value="javadoc.limit=${limit}" />
<arg value="javadoc.output.file.prefix=${output.file.prefix}" />
<arg value="javadoc.update=${update}" />
</java>
</target>

<target name="format-source">
<java
classname="com.liferay.portal.tools.SourceFormatter"
classpathref="portal.classpath"
fork="true"
newenvironment="true"
>
<jvmarg value="-Xmx512m" />
<jvmarg value="-Xss2048k" />
</java>

<delete file="ServiceBuilder.temp" />
</target>

<target name="print-current-time">
<tstamp>
<format property="current.time" pattern="MMMM d, yyyy 'at' hh:mm aa" />
</tstamp>

<echo message="${current.time}" />
</target>

<target name="setup-eclipse">
<java
classname="com.liferay.portal.tools.PluginsEnvironmentBuilder"
classpathref="portal.classpath"
fork="true"
newenvironment="true"
>
<jvmarg value="-Dplugins.env.dir=." />
</java>
</target>
</project>




plz find me a solution for this...
Samita Bhujbal, modificado 10 Anos atrás.

RE: i got an error msg while deploying a new portlet. plz help me

Regular Member Postagens: 117 Data de Entrada: 05/07/11 Postagens Recentes
Hey U need to add ecj.jar file in eclipse. It will resolve your problem.
thumbnail
Sachin Dhus, modificado 10 Anos atrás.

RE: i got an error msg while deploying a new portlet. plz help me

Junior Member Postagens: 40 Data de Entrada: 25/04/12 Postagens Recentes
Hi Sidharth Rishikesh,

I think u forgot to create build.${user.name}.properties in SDK. Create this file in SDK & override following properties

app.server.portal.dir=D\:\\Deployment\\tomcat-7.0.29\\webapps\\ROOT
app.server.lib.global.dir=D\:\\Deployment\\tomcat-7.0.29\\lib\\ext
app.server.deploy.dir=D\:\\Deployment\\tomcat-7.0.29\\webapps
app.server.type=tomcat
app.server.dir=D\:\\Deployment\\tomcat-7.0.29
javac.compiler=modern

Regards,
Sachin
Sidharth Rishikesh, modificado 10 Anos atrás.

RE: i got an error msg while deploying a new portlet. plz help me

New Member Postagens: 7 Data de Entrada: 22/07/13 Postagens Recentes
i ve already created " create build.${user.name}.properties " n all..
bt nw a new err msg is poping out
compile-java:

BUILD FAILED
F:\liferay-plugins-sdk-6.1.1\liferay-plugins-sdk-6.1.1\build-common-plugin.xml:651: The following error occurred while executing this line:
F:\liferay-plugins-sdk-6.1.1\liferay-plugins-sdk-6.1.1\build-common.xml:95: java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main : Unsupported major.minor version 51.0

Total time: 922 milliseconds
thumbnail
Althaf Hussain, modificado 10 Anos atrás.

RE: i got an error msg while deploying a new portlet. plz help me

Junior Member Postagens: 60 Data de Entrada: 03/05/12 Postagens Recentes
Sidharth Rishikesh:
i ve already created " create build.${user.name}.properties " n all..
bt nw a new err msg is poping out
compile-java:

BUILD FAILED
F:\liferay-plugins-sdk-6.1.1\liferay-plugins-sdk-6.1.1\build-common-plugin.xml:651: The following error occurred while executing this line:
F:\liferay-plugins-sdk-6.1.1\liferay-plugins-sdk-6.1.1\build-common.xml:95: java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main : Unsupported major.minor version 51.0

Total time: 922 milliseconds



Hi,

Check whether JRE is configured correctly or not.
Sidharth Rishikesh, modificado 10 Anos atrás.

RE: i got an error msg while deploying a new portlet. plz help me

New Member Postagens: 7 Data de Entrada: 22/07/13 Postagens Recentes
i ve installed java 1.7 and 1.6 both versions err msg iz passing out... can u plz provied me vich jre is supported by liferay 6.1 .. os iz win xp ..
thumbnail
Althaf Hussain, modificado 10 Anos atrás.

RE: i got an error msg while deploying a new portlet. plz help me

Junior Member Postagens: 60 Data de Entrada: 03/05/12 Postagens Recentes
Remove the configured server and add again, No issues with Java versions.
Sidharth Rishikesh, modificado 10 Anos atrás.

RE: i got an error msg while deploying a new portlet. plz help me

New Member Postagens: 7 Data de Entrada: 22/07/13 Postagens Recentes
thankq freinds i got liferay in eclipse