Problems with extending portlets

18666, modified 20 Years ago. New Member Posts: 23 Join Date: 7/12/05 Recent Posts
Hi,<br /><br />I want to make some changes to the calendar portlet. So I built the ext environment and when i deploy the ext-ear everything works great. However, when I run deploy from ext-ejb and ext-web the deployments complete successfully, but when i start jboss-tomcat I get a lot of NoClassDefFound errors, as if the jndi can&#39;t link the appropriate ejb&#39;s. <br /><br />I am using Liferay 3.6.1 on WinXP<br />Jboss-Tomcat, MySQL 5.0<br /><br />Can any one please help me. Thank you in advance.<br /><br />Peter
thumbnail
11329, modified 20 Years ago. Expert Posts: 322 Join Date: 3/24/05 Recent Posts
did you get jboss-tomcat from our site?
18666, modified 20 Years ago. New Member Posts: 23 Join Date: 7/12/05 Recent Posts
<br />did you get jboss-tomcat from our site?<br />
<br /><br />Yes, I got the source of 3.6.1 and then i downloaded the bundled jboss-tomcat enterprise edition. I followed the directions on how to extend the environment and everything works fine until I run deploy from ext-ejb and ext-web.
thumbnail
21811, modified 20 Years ago. New Member Posts: 8 Join Date: 2/17/06 Recent Posts
<br />Yes, I got the source of 3.6.1 and then i downloaded the bundled jboss-tomcat enterprise edition. I followed the directions on how to extend the environment and everything works fine until I run deploy from ext-ejb and ext-web.<br />
<br /><br />I get the same problem with jboss-jetty, but only with the ext-ejb. <br />If I do the ext-web it updates the pages and all is deployed ok. <br />(see my &quot;Deply Error&quot; post)<br /><br />Can anyone help?<br />
thumbnail
13006, modified 20 Years ago. Liferay Master Posts: 690 Join Date: 8/18/04 Recent Posts
it is good sharing the ideas who extended portlet successfully can give some notes.<br /><br />i did some of the prjs on liferay i am happy but only one thing since long time i am unable to solve is i am discussing below. <br /><br />basically i changed liferay code and done the prjs.<br /><br />i dont want to do this anymore. because if i want to migrate to new version really i am changing the code compiling and then i am doing ext environment and replacing jsps . this way working fine.mainly when new vesion comes if i want to migrate its a pain so that why i want to do extn, <br /> <br />let me give a hand to finish thius task adding a new extn table and generating ejb&#39;s, i hope it is simple who did already thanks for every one who is participating this <br /><br />if we want to add a new table and generating ejb&#39;s successfully in extension environment thats a great help for new users.<br /><br /><br />mainly examples for extension environment, if suppose we want add a userextn table which is extn to User_ table then ,how service.xml file,what to add in build.xml in ext-ejb.<br /><br />before that i tried it is giving as Build Successfull but not generating code <img src="@theme_images_path@/emotions/oh_my.gif" style="vertical-align:middle" emoid=":o" border="0" alt="ohmy.gif" /> <br /><br />here what i did<br />my basic requirement is adding more fields to the User Table. prev i changed liferay code. i dont want to do in future. so i stared to created my own table User_Ext which have the fields are userId,Region,col1,col2.<br /><br /><br />then i gone to ext/ext-ejb/service.xml<br /><br />it is like this for reports<br /><br /><br />&lt;?xml version=&quot;1.0&quot;?&gt;<br />&lt;&#33;DOCTYPE service-builder PUBLIC &quot;-//Liferay//DTD Service Builder 3.6.1//EN&quot; &quot;http://www.liferay.com/dtd/liferay-service-builder_3_6_1.dtd&quot;&gt;<br /><br />&lt;service-builder root-dir=&quot;..&quot; package-dir=&quot;com.ext.portlet&quot;&gt;<br />&lt;portlet name=&quot;Reports&quot; short-name=&quot;Reports&quot; /&gt;<br />&lt;entity name=&quot;ReportsEntry&quot; local-service=&quot;false&quot; persistence-class=&quot;com.ext.portlet.reports.service.persistence.ReportsEntryPersistence&quot;&gt;<br /><br />&#60;&#33;-- PK fields --&#62;<br /><br />&lt;column name=&quot;entryId&quot; type=&quot;String&quot; primary=&quot;true&quot; /&gt;<br /><br />&#60;&#33;-- Audit fields --&#62;<br /><br />&lt;column name=&quot;companyId&quot; type=&quot;String&quot; /&gt;<br />&lt;column name=&quot;userId&quot; type=&quot;String&quot; /&gt;<br />&lt;column name=&quot;userName&quot; type=&quot;String&quot; /&gt;<br />&lt;column name=&quot;createDate&quot; type=&quot;Date&quot; /&gt;<br />&lt;column name=&quot;modifiedDate&quot; type=&quot;Date&quot; /&gt;<br /><br />&#60;&#33;-- Other fields --&#62;<br /><br />&lt;column name=&quot;name&quot; type=&quot;String&quot; /&gt;<br /><br />&#60;&#33;-- Order --&#62;<br /><br />&lt;order by=&quot;asc&quot;&gt;<br />&lt;order-column name=&quot;name&quot; case-sensitive=&quot;false&quot; /&gt;<br />&lt;/order&gt;<br /><br />&#60;&#33;-- Finder methods --&#62;<br /><br />&lt;finder name=&quot;CompanyId&quot; return-type=&quot;Collection&quot;&gt;<br />&lt;finder-column name=&quot;companyId&quot; /&gt;<br />&lt;/finder&gt;<br />&lt;finder name=&quot;UserId&quot; return-type=&quot;Collection&quot;&gt;<br />&lt;finder-column name=&quot;userId&quot; /&gt;<br />&lt;/finder&gt;<br />&lt;/entity&gt;<br />&lt;exceptions&gt;<br />&lt;exception&gt;EntryName&lt;/exception&gt;<br />&lt;/exceptions&gt;<br />&lt;/service-builder&gt;<br /><br /><br />if i want to generate ejbs for my table, where i have to mention?<br />my table is basically extension of user table<br /><br />my build-parent.xml in ext-ejb<br /><br /><br />&lt;?xml version=&quot;1.0&quot;?&gt;<br /><br />&lt;project name=&quot;ext-ejb-parent&quot;&gt;<br /> &lt;import file=&quot;../build-common.xml&quot; /&gt;<br /><br /> &lt;target name=&quot;clean&quot;&gt;<br /> &lt;delete includeEmptyDirs=&quot;true&quot; failonerror=&quot;false&quot;&gt;<br /> &lt;fileset dir=&quot;&#036;{classes.dir}&quot; excludes=&quot;&#036;{classes.dir.excludes}&quot; /&gt;<br /> &lt;/delete&gt;<br /> &lt;/target&gt;<br /><br /> &lt;target name=&quot;compile&quot;&gt;<br /> &lt;mkdir dir=&quot;&#036;{classes.dir}&quot; /&gt;<br /> &lt;javac<br /> classpathref=&quot;project.classpath&quot;<br /> compiler=&quot;&#036;{javac.compiler}&quot;<br /> debug=&quot;&#036;{javac.debug}&quot;<br /> deprecation=&quot;&#036;{javac.deprecation}&quot;<br /> destdir=&quot;&#036;{classes.dir}&quot;<br /> fork=&quot;&#036;{javac.fork}&quot;<br /> memoryMaximumSize=&quot;&#036;{javac.memoryMaximumSize}&quot;<br /> nowarn=&quot;&#036;{javac.nowarn}&quot;<br /> srcdir=&quot;&#036;{source.dir}&quot;<br /> /&gt;<br /> &lt;/target&gt;<br /><br /> &lt;target name=&quot;java2html&quot;&gt;<br /> &lt;java<br /> classname=&quot;com.liferay.util.Java2Html&quot;<br /> classpathref=&quot;project.classpath&quot;<br /> fork=&quot;true&quot;&gt;<br /> &lt;arg value=&quot;&#036;{java2html.bat}&quot; /&gt;<br /> &lt;arg value=&quot;&#036;{source.dir}&quot; /&gt;<br /> &lt;arg value=&quot;&#036;{java2html.dir}&quot; /&gt;<br /> &lt;/java&gt;<br /> &lt;move file=&quot;&#036;{java2html.dir}/stylesheet.css&quot; tofile=&quot;&#036;{java2html.dir}/java2html.css&quot; /&gt;<br /> &lt;antcall target=&quot;javadoc&quot; /&gt;<br /> &lt;replace dir=&quot;&#036;{java2html.dir}&quot;&gt;<br /> &lt;include name=&quot;**/package-summary.html&quot; /&gt;<br /> &lt;replacefilter<br /> token=&quot;/&#092;&quot;<br /> value=&quot;/&quot;<br /> /&gt;<br /> &lt;/replace&gt;<br /> &lt;/target&gt;<br /><br /> &lt;target name=&quot;javadoc&quot;&gt;<br /> &lt;mkdir dir=&quot;&#036;{javadoc.dir}&quot; /&gt;<br /> &lt;javadoc<br /> classpathref=&quot;project.classpath&quot;<br /> destdir=&quot;&#036;{api.dir}/ext-ejb&quot;<br /> packagenames=&quot;*.*&quot;<br /> sourcepath=&quot;&#036;{source.dir}&quot;<br /> /&gt;<br /> &lt;/target&gt;<br /><br /> &lt;target name=&quot;deploy&quot; depends=&quot;compile&quot;&gt;<br /> &lt;if&gt;<br /> &lt;or&gt;<br /> &lt;equals arg1=&quot;&#036;{app.server.type}&quot; arg2=&quot;jetty&quot; /&gt;<br /> &lt;equals arg1=&quot;&#036;{app.server.type}&quot; arg2=&quot;resin&quot; /&gt;<br /> &lt;equals arg1=&quot;&#036;{app.server.type}&quot; arg2=&quot;tomcat&quot; /&gt;<br /> &lt;equals arg1=&quot;&#036;{app.server.type}&quot; arg2=&quot;websphere&quot; /&gt;<br /> &lt;/or&gt;<br /> &lt;then&gt;<br /> &lt;jar<br /> basedir=&quot;&#036;{classes.dir}&quot;<br /> excludes=&quot;portal-ext.properties,system-ext.properties,content/Language*.properties&quot;<br /> jarfile=&quot;ext-ejb.jar&quot;<br /> /&gt;<br /><br /> &lt;copy file=&quot;ext-ejb.jar&quot; todir=&quot;&#036;{app.server.lib.dir}&quot; /&gt;<br /><br /> &lt;if&gt;<br /> &lt;or&gt;<br /> &lt;equals arg1=&quot;&#036;{app.server.type}&quot; arg2=&quot;resin&quot; /&gt;<br /> &lt;equals arg1=&quot;&#036;{app.server.type}&quot; arg2=&quot;tomcat&quot; /&gt;<br /> &lt;/or&gt;<br /> &lt;then&gt;<br /> &lt;property name=&quot;properties.dir&quot; value=&quot;&#036;{app.server.dir}/common/classes&quot; /&gt;<br /> &lt;/then&gt;<br /> &lt;else&gt;<br /> &lt;property name=&quot;properties.dir&quot; value=&quot;&#036;{app.server.lib.dir}&quot; /&gt;<br /> &lt;/else&gt;<br /> &lt;/if&gt;<br /><br /> &lt;copy todir=&quot;&#036;{properties.dir}&quot;&gt;<br /> &lt;fileset dir=&quot;&#036;{classes.dir}&quot; includes=&quot;*.properties,content/Language*.properties&quot; /&gt;<br /> &lt;/copy&gt;<br /><br /> &lt;replace file=&quot;&#036;{properties.dir}/portal-ext.properties&quot;&gt;<br /> &lt;replacetoken&gt;portal.release=enterprise&lt;/replacetoken&gt;<br /> &lt;replacevalue&gt;portal.release=professional&lt;/replacevalue&gt;<br /> &lt;/replace&gt;<br /> &lt;/then&gt;<br /> &lt;else&gt;<br /> &lt;if&gt;<br /> &lt;and&gt;<br /> &lt;or&gt;<br /> &lt;equals arg1=&quot;&#036;{app.server.type}&quot; arg2=&quot;jboss-jetty&quot; /&gt;<br /> &lt;equals arg1=&quot;&#036;{app.server.type}&quot; arg2=&quot;jboss-tomcat&quot; /&gt;<br /> &lt;/or&gt;<br /> &lt;equals arg1=&quot;&#036;{jboss.ejb.expand}&quot; arg2=&quot;off&quot; /&gt;<br /> &lt;/and&gt;<br /> &lt;then&gt;<br /> &lt;jar<br /> basedir=&quot;&#036;{classes.dir}&quot;<br /> excludes=&quot;portal-ext.properties,system-ext.properties,content/Language*.properties&quot;<br /> jarfile=&quot;ext-ejb.jar&quot;<br /> /&gt;<br /> <br /> &lt;copy file=&quot;ext-ejb.jar&quot; todir=&quot;&#036;{app.server.lib.dir}&quot; /&gt;<br /> &lt;/then&gt;<br /> &lt;else&gt;<br /> &lt;copy todir=&quot;&#036;{app.server.deploy.dir}/ext.ear/ext-ejb.jar&quot;&gt;<br /> &lt;fileset dir=&quot;&#036;{classes.dir}&quot; /&gt;<br /> &lt;fileset dir=&quot;&#036;{source.dir}&quot; includes=&quot;&#036;{classes.dir.excludes}&quot; /&gt;<br /> &lt;/copy&gt;<br /> <br /> &lt;manifest file=&quot;&#036;{app.server.deploy.dir}/ext.ear/ext-ejb.jar/META-INF/MANIFEST.MF&quot;&gt;<br /> &lt;attribute name=&quot;Class-Path&quot; value=&quot;&#036;{classpath.manifest}&quot; /&gt;<br /> &lt;/manifest&gt; <br /><br /> &lt;if&gt;<br /> &lt;or&gt;<br /> &lt;equals arg1=&quot;&#036;{app.server.type}&quot; arg2=&quot;jonas-jetty&quot; /&gt;<br /> &lt;equals arg1=&quot;&#036;{app.server.type}&quot; arg2=&quot;jonas-tomcat&quot; /&gt;<br /> &lt;/or&gt;<br /> &lt;then&gt;<br /> &lt;manifest file=&quot;&#036;{app.server.deploy.dir}/ext.ear/ext-ejb.jar/META-INF/MANIFEST.MF&quot;&gt;<br /> &lt;attribute name=&quot;Class-Path&quot; value=&quot;&#036;{classpath.manifest.jonas}&quot; /&gt;<br /> &lt;/manifest&gt;<br /> <br /> &lt;tstamp&gt;<br /> &lt;format property=&quot;tstamp.dir&quot; pattern=&quot;yyyyMMddkkmmssSSS&quot; /&gt;<br /> &lt;/tstamp&gt;<br /> <br /> &lt;mkdir dir=&quot;&#036;{tstamp.dir}&quot; /&gt;<br /> <br /> &lt;java<br /> classname=&quot;org.objectweb.jonas.server.Bootstrap&quot;<br /> classpath=&quot;&#036;{classpath.jonas.genic}&quot;<br /> fork=&quot;true&quot;<br /> maxmemory=&quot;512m&quot;<br /> &gt;<br /> &lt;jvmarg value=&quot;-Dinstall.root=&#036;{env.JONAS_ROOT}&quot; /&gt;<br /> &lt;jvmarg value=&quot;-Djonas.base=&#036;{env.JONAS_ROOT}&quot; /&gt;<br /> &lt;jvmarg value=&quot;-Djava.security.policy=&#036;{env.JONAS_ROOT}/conf/java.policy&quot; /&gt;<br /> &lt;jvmarg value=&quot;-Djava.endorsed.dirs=&#036;{env.JONAS_ROOT}/lib/endorsed&quot; /&gt;<br /> &lt;jvmarg value=&quot;-Djava.io.tmpdir=&#036;{tstamp.dir}&quot; /&gt;<br /> &lt;arg value=&quot;org.objectweb.jonas_ejb.genic.GenIC&quot; /&gt;<br /> &lt;arg value=&quot;-d&quot; /&gt;<br /> &lt;arg value=&quot;&#036;{app.server.deploy.dir}/ext.ear/ext-ejb.jar&quot; /&gt;<br /> &lt;arg value=&quot;-noaddinjar&quot; /&gt;<br /> &lt;arg value=&quot;-protocols&quot; /&gt;<br /> &lt;arg value=&quot;jrmp&quot; /&gt;<br /> &lt;arg value=&quot;-keepgenerated&quot; /&gt;<br /> &lt;arg value=&quot;-invokecmd&quot; /&gt;<br /> &lt;arg value=&quot;classes/META-INF/ejb-jar.xml&quot; /&gt;<br /> &lt;/java&gt;<br /> <br /> &lt;delete dir=&quot;&#036;{tstamp.dir}&quot; /&gt;<br /> &lt;/then&gt;<br /> &lt;/if&gt;<br /> &lt;/else&gt;<br /> &lt;/if&gt;<br /> &lt;/else&gt;<br /> &lt;/if&gt;<br /> &lt;/target&gt;<br /><br /> &lt;target name=&quot;build-ejbxml&quot;&gt;<br /> &lt;java<br /> classname=&quot;com.liferay.portal.tools.EJBXMLBuilder&quot;<br /> classpathref=&quot;project.classpath&quot;<br /> fork=&quot;true&quot;<br /> newenvironment=&quot;true&quot;<br /> &gt;<br /> &lt;arg value=&quot;ext-ejb.jar&quot; /&gt;<br /> &lt;/java&gt;<br /> &lt;/target&gt;<br /> <b>&lt;target name=&quot;build-ejbxml-suresh&quot;&gt;<br /> &lt;property name=&quot;modelDirPath.dir&quot; value=&quot;src/com/ext/portal/ejbs/&quot; /&gt;<br /> &lt;antcall target=&quot;build-ejb-userext&quot;&gt;<br /> &lt;param name=&quot;ejbXmlName&quot; value=&quot;&#036;{modelDirPath.dir}/UserExt/service.xml&quot; /&gt;<br /> &lt;/antcall&gt;<br /> &lt;/target&gt;</b> <b>&lt;target name=&quot;build-ejb-userext&quot;&gt;<br /> &lt;java<br /> classname=&quot;com.liferay.portal.tools.EJBXMLBuilder&quot;<br /> classpathref=&quot;project.classpath&quot;<br /> fork=&quot;true&quot;<br /> newenvironment=&quot;true&quot;<br /> &gt;<br /> &lt;arg value=&quot;ext-ejb.jar&quot; /&gt;<br /> &lt;/java&gt;<br /> &lt;/target&gt;</b> &lt;target name=&quot;build-service&quot;&gt;<br /> &lt;java<br /> classname=&quot;com.liferay.portal.tools.ServiceBuilder&quot;<br /> classpathref=&quot;project.classpath&quot;<br /> fork=&quot;true&quot;<br /> maxmemory=&quot;384m&quot;<br /> newenvironment=&quot;true&quot;<br /> &gt;<br /> &lt;jvmarg value=&quot;-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog&quot; /&gt;<br /> &lt;arg value=&quot;service.xml&quot; /&gt;<br /> &lt;arg value=&quot;src/com/ext/portal/ejbs/UserExt/service.xml&quot; /&gt;<br /> &lt;arg value=&quot;classes/META-INF/ext-hbm.xml&quot; /&gt;<br /> &lt;arg value=&quot;classes/META-INF/ext-spring-enterprise.xml&quot; /&gt;<br /> &lt;arg value=&quot;classes/META-INF/ext-spring-professional.xml&quot; /&gt;<br /> &lt;arg value=&quot;com.liferay.portal.spring.util.SpringUtil&quot; /&gt;<br /> &lt;/java&gt;<br /> &lt;delete file=&quot;ServiceBuilder.temp&quot; /&gt;<br /> <b>&lt;antcall target=&quot;build-ejbxml&quot; /&gt;<br />&lt;antcall target=&quot;build-ejbxml-suresh&quot; /&gt;</b><br /> &lt;/target&gt;<br />&lt;/project&gt;<br /><br /><br /><br /> i placed my service.xml in &#092;SourceForge&#092;liferay&#092;ext&#092;ext-ejb&#092;src&#092;com&#092;ext&#092;portal&#092;ejbs&#092;UserExt<br /><br /><br /> my <b>service.xml </b>looks like this<br /><br /><br />&lt;?xml version=&quot;1.0&quot;?&gt;<br />&lt;&#33;DOCTYPE service-builder PUBLIC &quot;-//Liferay//DTD Service Builder 3.6.1//EN&quot; &quot;http://www.liferay.com/dtd/liferay-service-builder_3_6_1.dtd&quot;&gt;<br /><br />&lt;service-builder root-dir=&quot;..&quot; package-dir=&quot;com.ext.portal.ejbs&quot;&gt;<br /> &lt;portlet name=&quot;UserExt&quot; short-name=&quot;UserX&quot; /&gt;<br /> &lt;entity name=&quot;User_Ext&quot; local-service=&quot;true&quot;&gt;<br /><br /> &#60;&#33;-- PK fields --&#62;<br /><br /> &lt;column name=&quot;userId&quot; type=&quot;String&quot; primary=&quot;true&quot; /&gt;<br /><br /> &#60;&#33;-- Audit fields --&#62;<br /><br /> &lt;column name=&quot;userId&quot; type=&quot;String&quot; /&gt;<br /><br /> &#60;&#33;-- Other fields --&#62;<br /><br /> &lt;column name=&quot;Region&quot; type=&quot;String&quot; /&gt;<br /> &lt;column name=&quot;col1&quot; type=&quot;String&quot; /&gt;<br /> &lt;column name=&quot;col2&quot; type=&quot;String&quot; /&gt;<br /> <br /> &#60;&#33;-- Finder methods --&#62;<br /><br /> &lt;finder name=&quot;UserId&quot; return-type=&quot;Collection&quot;&gt;<br /> &lt;finder-column name=&quot;userId&quot; /&gt;<br /> &lt;/finder&gt;<br /> &lt;/entity&gt;<br /> <br /> <br />&lt;/service-builder&gt;<br /><br /><br /><br />thanq <img src="@theme_images_path@/emotions/big_grin.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="biggrin.gif" /> <img src="@theme_images_path@/emotions/big_grin.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="biggrin.gif" />