cancel
Showing results for 
Search instead for 
Did you mean: 

pls help me with eclipse

goodguy
Champ in-the-making
Champ in-the-making
I have spend 3 days and night to try to setup the development environment using eclipse; but still not able to get it going.

Please can you help if you have a bit more step by step instruction / advice compare to the one in wiki?

Thank you in advance. I truly appreciate.
6 REPLIES 6

freedev
Champ in-the-making
Champ in-the-making
Hi,

what you need exactly? Do you want recompile everything with eclipse?

If yes, you don't need it: you can do recompile and deploy using ant.

In the other hand, if you need to be able to edit the complete sources using eclipse. If you specify in the eclipse project the complete source list and the related libraries you can recompile the classes (but not to deploy its), only to check the project consistency.

Bye,
Vincenzo

freedev
Champ in-the-making
Champ in-the-making
Hi goodguy,

look here http://wiki.alfresco.com/wiki/Alfresco_SVN_Development_Environment

explain how to build a eclipse project.

Bye,
Vincenzo

goodguy
Champ in-the-making
Champ in-the-making
freedev,

Thank you for your prompt reply.

I have consulted the link that you have sent. It's the one that I have used. My aim is mainly on the web-client changes.

In the http://wiki.alfresco.com/wiki/Alfresco_SVN_Development_Environment
, after building the project using eclipse, what is the process to deploy the new code. Do I just manually copy over to an alfresco instance that works?

What I have done so far is create a web project in eclipse, and then import all the files from the alfresco_war into it. Then deploy the code to a tomcat instance. Hence I am able to see the changes in JSP files for example. What I have encountered so far is after I deploy the code into tomcat, if I just start tomcat, it works.

However, if I start tomcat inside eclipse, I got this error:


24/10/2007 11:36:17 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
11:36:44,500 ERROR [transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to perform ImageMagick transformation:
Execution result:
   os:         Windows XP
   command:    imconvert "C:\tomcat5\temp\Alfresco\ImageMagickContentTransformer_init_source_19293.gif"  "C:\tomcat5\temp\Alfresco\ImageMagickContentTransformer_init_target_19294.png"
   succeeded:  false
   exit code:  1
   out:       
   err:        CreateProcess: imconvert "C:\tomcat5\temp\Alfresco\ImageMagickContentTransformer_init_source_19293.gif" "C:\tomcat5\temp\Alfresco\ImageMagickContentTransformer_init_target_19294.png" error=2
11:36:50,203 WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
11:36:53,718 WARN  [alfresco.util.OpenOfficeConnectionTester] Yhteyttä OpenOfficeen ei onnistuttu käynnistämään.
11:36:59,937 INFO  [domain.schema.SchemaBootstrap]
11:37:10,890 INFO  [domain.schema.SchemaBootstrap]
11:37:15,593 WARN  [repo.admin.ConfigurationChecker] Alfrescon 'dir.root' muuttuja on asetettu relatiiviseen polkuun './alf_data'.  'dir.root' pitäisi should be yliajaa osoittamaan tiettyyn kansioon.
11:37:15,609 INFO  [repo.admin.ConfigurationChecker] Alfresco juuri data hakemisto ('dir.root') on: .\alf_data
11:37:15,703 ERROR [repo.admin.ConfigurationChecker] SISÄLLÖN EHEYS VIRHE: Indeksejä ei löytynyt 5 tilalle.
11:37:15,703 INFO  [repo.admin.ConfigurationChecker] Voit asettaa 'index.recovery.mode=FULL' jos haluat uudelleen rakentaa indeksit.
11:37:15,703 ERROR [repo.admin.ConfigurationChecker] SISÄLLÖN EHEYS VIRHE: Systeemi sisältöä ei löytynyt tilasta.
11:37:15,703 ERROR [repo.admin.ConfigurationChecker] Varmista, että 'dir.root' muuttuja osoittaa oikeaan datan sijainti paikaan.
11:37:15,718 ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: Varmista, että 'dir.root' muuttuja osoittaa oikeaan datan sijainti paikaan.
   at org.alfresco.repo.admin.ConfigurationChecker.check(ConfigurationChecker.java:312)
   at org.alfresco.repo.admin.ConfigurationChecker.access$000(ConfigurationChecker.java:72)
   at org.alfresco.repo.admin.ConfigurationChecker$1.execute(ConfigurationChecker.java:178)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155)
   at org.alfresco.repo.admin.ConfigurationChecker.onBootstrap(ConfigurationChecker.java:182)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
   at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:241)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
   at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
   at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
   at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
   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:120)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:448)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
   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:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
11:37:15,718 ERROR [[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.alfresco.error.AlfrescoRuntimeException: Varmista, että 'dir.root' muuttuja osoittaa oikeaan datan sijainti paikaan.
   at org.alfresco.repo.admin.ConfigurationChecker.check(ConfigurationChecker.java:312)
   at org.alfresco.repo.admin.ConfigurationChecker.access$000(ConfigurationChecker.java:72)
   at org.alfresco.repo.admin.ConfigurationChecker$1.execute(ConfigurationChecker.java:178)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155)
   at org.alfresco.repo.admin.ConfigurationChecker.onBootstrap(ConfigurationChecker.java:182)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
   at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:241)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
   at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
   at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
   at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
   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:120)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:448)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
   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:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
11:37:15,718 ERROR [[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextListener
org.alfresco.error.AlfrescoRuntimeException: Varmista, että 'dir.root' muuttuja osoittaa oikeaan datan sijainti paikaan.
   at org.alfresco.repo.admin.ConfigurationChecker.check(ConfigurationChecker.java:312)
   at org.alfresco.repo.admin.ConfigurationChecker.access$000(ConfigurationChecker.java:72)
   at org.alfresco.repo.admin.ConfigurationChecker$1.execute(ConfigurationChecker.java:178)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155)
   at org.alfresco.repo.admin.ConfigurationChecker.onBootstrap(ConfigurationChecker.java:182)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
   at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:241)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
   at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
   at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
   at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
   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:120)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:448)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
   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:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
24/10/2007 11:37:15 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
24/10/2007 11:37:15 org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
24/10/2007 11:37:19 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
24/10/2007 11:37:20 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
24/10/2007 11:37:20 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/172  config=null
24/10/2007 11:37:20 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
24/10/2007 11:37:20 org.apache.catalina.startup.Catalina start
INFO: Server startup in 63250 ms


any idea?

freedev
Champ in-the-making
Champ in-the-making
freedev,

Thank you for your prompt reply.

I have consulted the link that you have sent. It's the one that I have used. My aim is mainly on the web-client changes.

In the http://wiki.alfresco.com/wiki/Alfresco_SVN_Development_Environment
, after building the project using eclipse, what is the process to deploy the new code. Do I just manually copy over to an alfresco instance that works?

To deploy an updated version of alfresco I use ant.
You need to define the environment variables:
    export JAVA_HOME="/opt/apps/sun/jdk1.6.0_03"
    export ALFRESCO_REPOSITORY="/opt/alfresco-community-tomcat-2.1.0"
    export TOMCAT_HOME="$ALFRESCO_REPOSITORY/tomcat"
    export VIRTUAL_TOMCAT_HOME="$ALFRESCO_REPOSITORY/virtual-tomcat"
I have linux, but I think with windows it is pretty the same.
After the variables definition into the alfresco-sdk you type simply ant and the build process will start deploying an updated copy of alfresco.war into the $ALFRESCO_REPOSITORY directory.
You can still use eclipse to modify the source code.

What I have done so far is create a web project in eclipse, and then import all the files from the alfresco_war into it. Then deploy the code to a tomcat instance. Hence I am able to see the changes in JSP files for example. What I have encountered so far is after I deploy the code into tomcat, if I just start tomcat, it works.

IMHO, better connect eclipse to the alfresco subversion repository and export the entire project (what I did).

Bye,
Vincenzo

goodguy
Champ in-the-making
Champ in-the-making
I notice the compile using ANT took about 6 minutes to complete. If I only need to change the web-client bit, what is the best way for setting up a development and deploy environment?

I am new to Alfresco, and thank you for your patient.

Thank you.

freedev
Champ in-the-making
Champ in-the-making
Hi goodguy,

try to look inside the build.xml, there are a lot of targets called "incremental-something".
You could use one of them to avoid to rebuild all, anyway depends what you have to do.
First of all, I think you need to study the project architecture before continue.

Bye,
Vincenzo