Fórumok

SDK broken?

adam gibbons, módosítva 16 év-val korábban

SDK broken?

New Member Bejegyzések: 12 Csatlakozás dátuma: 2008.01.09. Legújabb bejegyzések
I'm having a few problems with the SDK, I've downloaded the latest versions but there seems to be a few problems with it.
I'm using it in conjunction with the latest Liferay-tomcat6 server.
First problem I had was that there was no \lib\ext in my tomcat root. This seems to be necicarry when creating or deploying a new theme.
Once I fixed that I also get the following error when I try and run the deploy ant task:

Buildfile: C:\liferay\build.xml
compile:
[copy] Copying 340 files to C:\liferay\themes\iConnect-theme\docroot
[copy] Copying 8 files to C:\liferay\themes\iConnect-theme\docroot
[java] Exception in thread "main" java.lang.NoClassDefFoundError: com/liferay/portal/kernel/util/StringUtil
[java] at com.liferay.util.FileUtil.read(FileUtil.java:413)
[java] at com.liferay.util.FileUtil.read(FileUtil.java:395)
[java] at com.liferay.util.FileUtil.read(FileUtil.java:391)
[java] at com.liferay.portal.tools.CSSBuilder.<init>(CSSBuilder.java:47)
[java] at com.liferay.portal.tools.CSSBuilder.main(CSSBuilder.java:38)
[java] Java Result: 1
[java] [INFO] Using charset Cp1252
war:
[delete] Deleting: C:\liferay\dist\iConnect-theme-4.3.6.1.war
[zip] Building zip: C:\liferay\dist\iConnect-theme-4.3.6.1.war
deploy:
[copy] Copying 1 file to C:\Documents and Settings\AGibbons\Desktop\liferay-portal-tomcat-6.0-4.3.5\webapps
BUILD SUCCESSFUL
Total time: 4 seconds

I'm fairly certain StringUtil is supposed to be in portal-ipl.jar, however when I look in the JAR there is no com/liferay/portal/kernel/util/StringUtil path or class file.

Please help! I need to make a proto-type in Liferay by Friday afternoon!!!
thumbnail
Ray Auge, módosítva 16 év-val korábban

RE: SDK broken?

Liferay Legend Bejegyzések: 1197 Csatlakozás dátuma: 2005.02.08. Legújabb bejegyzések
Try making the path to the liferay libs in tomcat be <tomcat>/common/lib/ext. That should work.

The SDK really needs access to the libs in that folder.

Hope that helps.
adam gibbons, módosítva 16 év-val korábban

RE: SDK broken?

New Member Bejegyzések: 12 Csatlakozás dátuma: 2008.01.09. Legújabb bejegyzések
I managed to get it working by using differnt JAR files. However after playing around trying to make my own theme I've hit upon another problem...

SEVERE: Null component Catalina:type=DataSource,path=/,host=localhost,class=javax.sql.DataSource,name="jdbc/LiferayPool"
Loading jar:file:/C:/Documents%20and%20Settings/AGibbons/Desktop/liferay-portal-tomcat-6.0-4.3.5/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
Loading jar:file:/C:/Documents%20and%20Settings/AGibbons/Desktop/liferay-portal-tomcat-6.0-4.3.5/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
Loading file:/C:/Documents%20and%20Settings/AGibbons/Desktop/liferay-portal-tomcat-6.0-4.3.5/webapps/ROOT/WEB-INF/classes/portal-ext.properties
Starting Liferay Enterprise Portal 4.3.5 (Owen / Build 4305 / December 4, 2007)
15:15:04,967 ERROR [StartupAction:83] javax.naming.NameNotFoundException: Name java:comp is not bound in this Context
javax.naming.NameNotFoundException: Name java:comp is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.liferay.util.JNDIUtil._lookup(JNDIUtil.java:169)
at com.liferay.util.JNDIUtil.lookup(JNDIUtil.java:65)
at com.liferay.util.JNDIUtil.lookup(JNDIUtil.java:47)
at com.liferay.portal.jndi.PortalJNDIImpl.getDataSource(PortalJNDIImpl.java:49)
at com.liferay.portal.kernel.jndi.PortalJNDIUtil.getDataSource(PortalJNDIUtil.java:42)
at com.liferay.portal.events.StartupAction.run(StartupAction.java:80)
at com.liferay.portal.events.EventsProcessor._process(EventsProcessor.java:151)
at com.liferay.portal.events.EventsProcessor.process(EventsProcessor.java:76)
at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:121)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4042)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4348)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
15:15:04,983 WARN [StartupAction:91] Name java:comp is not bound in this Context
21-Jan-2008 15:15:05 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war

No idea how've managed to do this one. Any ideas?
thumbnail
Björn Ryding, módosítva 16 év-val korábban

RE: SDK broken?

Liferay Master Bejegyzések: 582 Csatlakozás dátuma: 2007.05.16. Legújabb bejegyzések
adam gibbons:
I'm having a few problems with the SDK, I've downloaded the latest versions but there seems to be a few problems with it.
I'm using it in conjunction with the latest Liferay-tomcat6 server.
First problem I had was that there was no \lib\ext in my tomcat root.!


Your Liferay Tomcat 6 bundle should have the folder <tomcat>/lib/ext. Have you changed the build.properties file in the SDK to reflect that? The SDK is preconfigured for Tomcat 5.5 (<tomcat>/common/lib/ext).
adam gibbons, módosítva 16 év-val korábban

RE: SDK broken?

New Member Bejegyzések: 12 Csatlakozás dátuma: 2008.01.09. Legújabb bejegyzések
I've got this working now, thanks for all your help. In the end i did the following:

extract liferay-portal-tomcat-6.0-4.3.6.zip ~->
C:\Documents and Settings\AGibbons\Desktop\liferay-portal-tomcat-6.0-4.3.6

extract liferay-plugins-sdk-4.3.6.zip ~->
c:\liferaySDK

set CATALINA_HOME = C:\Documents and Settings\AGibbons\Desktop\liferay-portal-tomcat-6.0-4.3.6
set ANT_HOME = C:\apache-ant-1.7.0
add CLASSPATH = C:\liferay\lib
add PATH = C:\apache-ant-1.7.0\bin

Edit: ...\liferay-portal-tomcat-6.0-4.3.6\conf\Catalina\localhost\ROOT.XML
Comment out the Hypersonic section, and uncomment the SQL Server section to look like:
<Resource
name="jdbc/LiferayPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://localhost/iConnect"
username="iConnect"
password="conn2008"
maxActive="50"
/>

Copy jtds.jar to ...\liferay-portal-tomcat-6.0-4.3.6\lib

Edit C:\liferaySDK\build.properties:
javac.compiler=modern
app.server.dir=C:/Documents and Settings/AGibbons/Desktop/liferay-portal-tomcat-6.0-4.3.6
app.server.lib.global.dir=${app.server.dir}/lib/ext

Create a project in eclipse for ...\liferay-portal-tomcat-6.0-4.3.6
Create a project in eclipse for ...\liferaySDK

Now I just need to make a custome theme and add some mock content by firday lol...
Luther J Maloney, módosítva 16 év-val korábban

RE: SDK broken?

New Member Bejegyzések: 10 Csatlakozás dátuma: 2008.01.30. Legújabb bejegyzések
I'm developing on Windows XP, and the paths generated by ant do not appear to be correct. The error message is as follows:

BUILD FAILED
C:\nbis_intranet_portal\themes\build-common-theme.xml:57: C:\nbis_intranet_portal\themes\test-theme\liferay-tomcat-6.0.14libext no
t found.
at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:422)
at org.apache.tools.ant.types.FileSet.iterator(FileSet.java:69)
at org.apache.tools.ant.types.resources.Union.getCollection(Union.java:105)
at org.apache.tools.ant.types.resources.Union.getCollection(Union.java:88)
at org.apache.tools.ant.types.resources.BaseResourceCollectionContainer.cacheCollection(BaseResourceCollectionContainer.ja
va:244)
at org.apache.tools.ant.types.resources.BaseResourceCollectionContainer.iterator(BaseResourceCollectionContainer.java:120)

at org.apache.tools.ant.types.Path.iterator(Path.java:687)
at org.apache.tools.ant.types.Path.iterator(Path.java:684)
at org.apache.tools.ant.types.resources.Union.getCollection(Union.java:105)

I have verified that the paths are configured correctly in the properties file(s), and that there are no conflicting libraries on the classpath (the classpath is empty by default). Tomcat is installed in the C:\liferay-tomcat-6.0.14 directory.
thumbnail
Björn Ryding, módosítva 16 év-val korábban

RE: SDK broken?

Liferay Master Bejegyzések: 582 Csatlakozás dátuma: 2007.05.16. Legújabb bejegyzések
Luther J Maloney:
BUILD FAILED
C:\nbis_intranet_portal\themes\build-common-theme.xml:57: C:\nbis_intranet_portal\themes\test-theme\liferay-tomcat-6.0.14libext not found.


The error message indicates that you have written liferay-tomcat-6.0.14/lib/ext rather than liferay-tomcat-6.0.14\lib\ext. Hopefully you just need to change your slashes.

Cheers,
Björn
thumbnail
Björn Ryding, módosítva 16 év-val korábban

RE: SDK broken?

Liferay Master Bejegyzések: 582 Csatlakozás dátuma: 2007.05.16. Legújabb bejegyzések
Björn Ryding:
Luther J Maloney:
BUILD FAILED
C:\nbis_intranet_portal\themes\build-common-theme.xml:57: C:\nbis_intranet_portal\themes\test-theme\liferay-tomcat-6.0.14libext not found.


The error message indicates that you have written liferay-tomcat-6.0.14/lib/ext rather than liferay-tomcat-6.0.14\lib\ext. Hopefully you just need to change your slashes.

Cheers,
Björn


Sorry, it should of course be the other way around. You should use "/" and not "\".