Forum LAMS for Tech-Heads - General Forum: Building LAMS 2.3.4 on Mac OS X


 
You may request notification for Building LAMS 2.3.4 on Mac OS X.
Search: 

1: Building LAMS 2.3.4 on Mac OS X
06/14/10 01:54 AM
[ Reply | Forward ]
I am trying to build LAMS 2.3.4 on Mac OS X Tiger using Eclipse. I have downloaded the source code and have followed the instructions here (http://wiki.lamsfoundation.org/pages/viewpage.action?pageId=12484629), but when I try to build it I get the following error:

Buildfile: /Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_build/build.xml
rebuild-db:
preparedirs:
rebuild-db:
[copy] Copying 2 files to /Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_common/build
[sql] Executing resource: /Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_common/build/create_lams_11_db.sql
[sql] Executing resource: /Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_common/db/sql/drop_lams_11_tables.sql
[sql] Executing resource: /Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_common/db/sql/create_lams_11_tables.sql
[sql] Executing resource: /Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_common/db/sql/create_integration_tables.sql
[sql] Executing resource: /Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_common/db/sql/insert_lams_users.sql
[sql] Executing resource: /Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_common/db/sql/insert_types_data.sql
[sql] Executing resource: /Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_common/build/insert_lams_windows_config_data.sql
[sql] Executing resource: /Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_common/db/sql/create_quartz_table.sql
[sql] Executing resource: /Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_common/db/sql/create_notebook_tables.sql
[sql] Executing resource: /Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_common/db/sql/create_presence_chat_tables.sql
[sql] 628 of 628 SQL statements executed successfully
[delete] Deleting: /Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_common/build/create_lams_11_db.sql
init:
[mkdir] Created dir: /Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_build/assembly
clean:
[delete] Deleting directory /Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_build/assembly
build-subprojects:
preparedirs:
clean:
compile:
[javac] Compiling 359 source files to /Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_common/build/classes/java

BUILD FAILED
/Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_build/build.xml:50: The following error occurred while executing this line:
/Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_common/build.xml:168: /Users/Tim/Documents/Tim/Investigacion/I-AGENT/Code/LAMS_2.3.4/lams2.3.4/lams_common/D:/jboss-4.0.2/server/default/lib not found.

Total time: 14 seconds

Any suggestions would be gratefully received.

Tim

Posted by Timothy Read

2: Re: Building LAMS 2.3.4 on Mac OS X
In response to 1 06/14/10 08:41 AM
[ Reply | Forward ]
The problem was the D: - thanks anyway. For some reason the build process is working as if it were on Windows...

Tim

Posted by Timothy Read

3: Re: Re: Building LAMS 2.3.4 on Mac OS X
In response to 2 06/14/10 11:03 AM
[ Reply | Forward ]
So, it builds and initially runs in jboss, but when I enter the default sysadmin login and password I get the following error:


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: org/eclipse/jdt/internal/compiler/lookup/BlockScope
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:272)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.lamsfoundation.lams.web.filter.LocaleFilter.doFilterInternal(LocaleFilter.java:142)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
org.lamsfoundation.lams.web.session.SystemSessionFilter.doFilter(SystemSessionFilter.java:71)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

root cause

java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/lookup/BlockScope
org.eclipse.jdt.internal.compiler.parser.Parser.consumeClassHeaderName(Parser.java:1219)
org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:2671)
org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:5370)
org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:5702)
org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:5667)
org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:4393)
org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:295)
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:321)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:387)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.lamsfoundation.lams.web.filter.LocaleFilter.doFilterInternal(LocaleFilter.java:142)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
org.lamsfoundation.lams.web.session.SystemSessionFilter.doFilter(SystemSessionFilter.java:71)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

Now I am stumped... Any suggestions, thanks.

Tim

Posted by Timothy Read

4: Re: Building LAMS 2.3.4 on Mac OS X
In response to 1 06/15/10 02:55 AM
[ Reply | Forward ]
Hola Tim

Como estas? Un gusto ver que estas compilando LAMS.

The error you are getting is because you need to edit two files:

lams_build/common.properties

In there, you need to make sure that you tell Ant that you are compiling in Unix (see the osPropertiesName var) and change any MySQL DB settings.

Also, have a look at the lams_build/unix.properties and set the path to where you have jboss-4.0.2 on the filesystem (jboss.home).

I think after that, you should be good to go. Otherwise, just post here.

Saludos,

Ernie

Posted by Ernie Ghiglione

5: Re: Re: Building LAMS 2.3.4 on Mac OS X
In response to 4 06/17/10 02:22 AM
[ Reply | Forward ]
Hola Ernie:

Me alegro mucho oir de ti... Thanks for replying.

Since I had been fiddling around with the source I decided to download it again and
start from scratch. I modified common.properties and unix.properties as per the instructions. I also had to modify
lams_common/db/sql/insert_lams_unix_config_data.sql even though it wasn't in the instructions.

Then, following the order of build steps in the instructions, lams built perfectly with only a few warnings about deprecated methods.

Initially when I ran jboss I got an out of memory error, so I had to modify the jboss start script to allocate more memory:

$JAVA" -Xms128m -Xmx512m

And then jboss started perfectly:

2010-06-17 10:00:06,653 INFO [Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 41s:197ms

But.... when I try to connect to lams (http://localhost:8080/lams), the browser just says waiting
and eventually finishes, but nothing appears and there are no errors on the jboss console!!

The weird thing is that when I try to stop jboss (with a CTRL-C) I get the following error message:

Java HotSpot(TM) 64-Bit Server VM warning: Exception java.lang.OutOfMemoryError occurred dispatching signal Unknown Signal to handler- the VM may need to be forcibly terminated

Which I don't understand. I am using a Macbook Pro, which as far as I know is not a 64 bit machine...

If I modify the amount of max memory, like:

$JAVA" -Xms128m -Xmx1024m

Which I think is a huge amount...

Then I do get something in the web browser, a purely text only login page (no images of colors) with the following information:

LAMS - Learning Activity Management System

Version 2.3.4
Login

Username:

Password:

Login

Forgot your password?
Help?

Version 2.3.4 © 2002-2010 LAMS Foundation.

And the jboss console shows:

2010-06-17 10:15:43,696 DEBUG [JspRedirectStrategy] ===>LOGIN PAGE: there is no auth obj in session or accessing login page before login succeed, auth obj created. session id: C67B02EB81F265C04A025F737224780D
2010-06-17 10:15:43,697 DEBUG [SessionManager] Failed on finding current system session with null sessionId
2010-06-17 10:15:43,700 DEBUG [JspRedirectStrategy] Set locale information for login page:es_ES
2010-06-17 10:15:43,751 DEBUG [SessionManager] Failed on finding current system session with null sessionId
2010-06-17 10:15:43,892 DEBUG [SessionManager] Failed on finding current system session with null sessionId
2010-06-17 10:15:43,894 DEBUG [SessionManager] Failed on finding current system session with null sessionId

But if I try to login with the default sysadmin/sysadmin then the page just goes blank and the jboss console has the following info:

2010-06-17 10:17:59,488 INFO [UniversalLoginModule] initialize
2010-06-17 10:17:59,488 INFO [UniversalLoginModule] login
2010-06-17 10:17:59,489 DEBUG [UniversalLoginModule] ===> authenticating user: sysadmin
2010-06-17 10:17:59,904 DEBUG [UniversalLoginModule] ===> authentication type: LAMS
2010-06-17 10:17:59,920 INFO [UniversalLoginModule] User 'sysadmin' authenticated, loginOk=true
2010-06-17 10:17:59,920 INFO [UniversalLoginModule] commit, loginOk=true
2010-06-17 10:17:59,922 INFO [UniversalLoginModule] ===> Assign user to role SYSADMIN
2010-06-17 10:17:59,922 INFO [UniversalLoginModule] ===> Found SYSADMIN
2010-06-17 10:17:59,927 INFO [UniversalLoginModule] ===> Assign user to role AUTHOR
2010-06-17 10:18:04,532 INFO [STDOUT] java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/flow/FlowContext

What could be wrong?

Any help will be gratefully appreciated.

Mil gracias y hasta luego.

Tim

Posted by Timothy Read

6: Re: Re: Re: Building LAMS 2.3.4 on Mac OS X
In response to 5 06/17/10 10:31 AM
[ Reply | Forward ]
Hi Ernie, once again...

Just a follow on from my earlier message. For one thing I think that Mac OS X SnowLeopard is 64 bits, which would explain the JVM message.

I was wondering if the problem is with jboss-4.0.2 so I downloaded jboss-5.1.0.GA, and it behaves a lot better (that is to say without lams installed). It starts and stops perfectly.

However, I when I try to build lams for it I get a compile error because eclipse cannot find javax.servlet classes. I managed to fix this problem and build and deploy lams by copying servlet-api.jar and jsp-api.jar from common/lib to  servlet/default/lib. However, now when I try to start jboss-5.1.0 I get the following error:

17:53:18,170 INFO  [ProfileServiceImpl] Loading profile: default from:
org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@118a770(root=/home/tread/Escritorio/jboss-5.0.1.GA/server,
key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
17:53:18,174 INFO  [ProfileImpl] Using
repository:org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@118a770(root=/home/tread/Escritorio/jboss-5.0.1.GA/server,
key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
17:53:18,175 INFO  [ProfileServiceImpl] Loaded profile:
ProfileImpl@c791f4{key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default]}
17:53:20,961 ERROR [AbstractKernelController] Error installing to
Instantiated: name=jboss.management.local:j2eeType=J2EEDomain,name=Manager
state=Described mode=Manual requiredState=Configured
java.lang.ClassNotFoundException:
org.jboss.management.j2ee.LocalJBossServerDomain from
BaseClassLoader@1ee1775{VFSClassLoaderPolicy@462631{name=vfsfile:/home/tread/Escritorio/jboss-5.0.1.GA/server/default/conf/jboss-service.xml
domain=ClassLoaderDomain@1f7708{name=DefaultDomain parentPolicy=BEFORE
parent=org.jboss.system.NoAnnotationURLClassLoader@1d8957f}
roots=[MemoryContextHandler@24470614[path=
context=vfsmemory://3j011-twhkmw-gajrsf24-1-gajrst29-6
real=vfsmemory://3j011-twhkmw-gajrsf24-1-gajrst29-6],
DelegatingHandler@944281[path=lams-valve.jar
context=file:/home/tread/Escritorio/jboss-5.0.1.GA/server/default/lib/
real=file:/home/tread/Escritorio/jboss-5.0.1.GA/server/default/lib/lams-valve.jar],
DelegatingHandler@32842021[path=jboss-cache.jar
context=file:/home/tread/Escritorio/jboss-5.0.1.GA/server/default/lib/
real=file:/home/tread/Escritorio/jboss-5.0.1.GA/server/default/lib/jboss-cache.jar],
DelegatingHandler@5452358[path=jboss-serialization.jar
context=file:/home/tread/Escritorio/jboss-5.0.1.GA/server/default/lib/
real=file:/home/tread/Escritorio/jboss-5.0.1.GA/server/default/lib/jboss-serialization.jar],
DelegatingHandler@641337[path=servlet-api.jar
context=file:/home/tread/Escritorio/jboss-5.0.1.GA/server/default/lib/
real=file:/home/tread/Escritorio/jboss-5.0.1.GA/server/default/lib/servlet-api.jar],
DelegatingHandler@7988008[path=jsp-api.jar
context=file:/home/tread/Escritorio/jboss-5.0.1.GA/server/default/lib/
real=file:/home/tread/Escritorio/jboss-5.0.1.GA/server/default/lib/jsp-api.jar],
DelegatingHandler@3177540[path=mail.jar
context=file:/home/tread/Escritorio/jboss-5.0.1.GA/server/default/lib/
real=file:/home/tread/Escritorio/jboss-5.0.1.GA/server/default/lib/mail.jar],
DelegatingHandler@19821108[path=jgroups.jar
context=file:/home/tread/Escritorio/jboss-5.0.1.GA/server/default/lib/
real=file:/home/tread/Escritorio/jboss-5.0.1.GA/server/default/lib/jgroups.jar],
DelegatingHandler@4970343[path=lams-session.jar
context=file:/home/tread/Escritorio/jboss-5.0.1.GA/server/default/lib/
real=file:/home/tread/Escritorio/jboss-5.0.1.GA/server/default/lib/lams-session.jar]]
delegates=null exported=[, org.jboss.serial.util,
org.jgroups.jmx.protocols, org.jgroups.demos, org.jboss.cache.xml,
javax.mail.internet, org.jboss.serial.objectmetamodel,
javax.mail.util, org.jboss.serial.exception, org.jgroups.stack,
org.jgroups.demos.applets, javax.servlet, org.jgroups.tests,
org.jgroups.persistence, org.jboss.cache.lock,
javax.servlet.jsp.tagext, org.jboss.cache.loader.bdbje,
org.jboss.serial.classmetamodel, org.jgroups.demos.wb,
org.jgroups.protocols.pbcast, org.jboss.cache.loader.tcp,
javax.servlet.jsp, org.lamsfoundation.lams.web.session,
org.jgroups.util, org.jboss.serial.references, com.sun.mail.iap,
javax.mail.search, javax.servlet.jsp.el, org.jgroups.blocks,
org.jboss.cache.factories, org.jboss.cache.aop.collection,
org.jgroups.tests.stack, javax.mail, javax.mail.event,
org.jboss.cache.aop.util, org.jgroups, org.jboss.cache.aop.eviction,
org.jgroups.protocols, org.jgroups.jmx.protocols.pbcast,
org.jgroups.tests.perf.transports, org.jboss.serial,
com.sun.mail.imap, org.jgroups.protocols.ring, org.jboss.cache.aop,
org.jboss.cache.aop.interceptors, org.jboss.cache.loader,
org.jboss.cache.aop.references, javax.servlet.resources,
org.jgroups.tests.perf, org.jgroups.jmx, com.sun.mail.pop3,
org.jboss.cache.interceptors, org.jboss.cache.statetransfer,
org.jgroups.auth, com.sun.mail.util, org.jboss.serial.io,
org.jgroups.conf, org.jboss.cache.util, org.jboss.cache.loader.jdbm,
javax.servlet.jsp.resources, com.sun.mail.smtp, org.jboss.cache.rpc,
org.jboss.cache.marshall, org.jboss.serial.finalcontainers,
org.jboss.serial.persister, com.sun.mail.handlers, org.jgroups.debug,
org.jboss.cache.eviction,
org.lamsfoundation.lams.integration.security, org.jgroups.mux,
META-INF, com.sun.mail.imap.protocol, org.jboss.cache.loader.rmi,
org.jboss.cache, org.jboss.serial.objectmetamodel.safecloning,
org.jboss.cache.transaction, org.jboss.cache.optimistic,
org.jboss.cache.buddyreplication, org.jboss.cache.aop.annotation,
org.jboss.cache.config, javax.servlet.http] <IMPORT-ALL>NON_EMPTY}}
    at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:422)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1213)
    at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:286)
    at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:344)
    at org.jboss.system.ServiceCreator.installPlainMBean(ServiceCreator.java:211)


Is it actually possible to build, deploy and run lams on Mac? I am beginning to wonder...

Thanks,

Tim

Posted by Timothy Read

7: Re: Re: Re: Re: Building LAMS 2.3.4 on Mac OS X
In response to 6 06/18/10 03:47 AM
[ Reply | Forward ]
Hi Ernie,

Just a one liner to say don't worry. I realized that I was complicating life too much. I have downloaded the 2.4 version from the CVS, followed the instructions and it compiles and runs fin on my Mac...

Now lets see if I can actually do something with all this lovely source code.

Thanks anyway,

Tim

Posted by Timothy Read

8: Re: Re: Re: Re: Re: Building LAMS 2.3.4 on Mac OS X
In response to 7 06/18/10 07:35 PM
[ Reply | Forward ]
Great!

Sorry I didn't get to this before you figured it out! :-)

If you need any help, please post here in the forums.

Thanks,

Ernie

Posted by Ernie Ghiglione

9: Re: Re: Re: Re: Re: Re: Building LAMS 2.3.4 on Mac OS X
In response to 8 06/23/10 12:58 AM
[ Reply | Forward ]
Well, since you mentioned help ;-)

When I use the Author and try to drag and drop any tool onto the panel I get a popup message saying:

System Error

A following system error has occurred:

You may need to re-start LAMS Author to continue. Do you want to save the following information about this error to help fix this problem?


And in the jboss console I get the following:


ERROR [LamsCoreToolService] A tool which is defined in the database appears to missing from the classpath. Unable to get the tool output definitions. ToolContentId 3
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'qaService' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:387)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:971)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:880)
at org.lamsfoundation.lams.tool.service.LamsCoreToolService.findToolService(LamsCoreToolService.java:846)
at org.lamsfoundation.lams.tool.service.LamsCoreToolService.getOutputDefinitionsFromTool(LamsCoreToolService.java:381)
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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)

(snip)

2010-06-23 08:52:21,254 ERROR [AuthoringAction] Exception thrown getToolOutputDefinitions
org.lamsfoundation.lams.tool.exception.ToolException: A tool which is defined in the database appears to missing from the classpath. Unable to get the tool output definitions. ToolContentId 3
at org.lamsfoundation.lams.tool.service.LamsCoreToolService.getOutputDefinitionsFromTool(LamsCoreToolService.java:387)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)


It sounds like a classpath error. What can I do to fix it?

Thanks,
Tim

Posted by Timothy Read

Reply to first post on this page
Back to LAMS for Tech-Heads - General Forum