You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Anton Melser <me...@gmail.com> on 2011/06/20 12:21:49 UTC

Help getting a development env up and running with m2eclipse (+svn) and the latest 3.0 code

Hi,
I wrote on another thread but my problem is slightly different so I'm
creating another.
So, I have been having some problems getting an environment up and running.
I am particularly interested in using the latest and greatest code, and
would prefer to be using the 3.0 branch from svn if possible... I haven't
done a heap of java development (mainly .net), though I have done some web
stuff in eclipse (with spring), but it was a few years ago and it was never
more than about 20% of my time. There are many things that will be obvious
that I'm probably missing.
I am very interested in developing (and/or extending existing) mailets. I
realise it is probably possible to do as some do and just create a project
with my mailets and not have the whole thing in eclipse but things still
seem to be changing pretty rapidly in the 3.0 branch so I'd rather keep
up-to-date if possible.
I suppose my main problem at the moment is that eclipse keeps crashing when
I try and open any file. I have installed the latest Java EE IDE from the
eclipse site, and into that I installed the latest m2eclipse (with extras
for scm) and subclipse. I have Win7 enterprise x64 with the latest Oracle
JDK installed, and I suppose the only slightly non-std thing I did was to
specify -vm in eclipse.ini so it pointed to the jdk javaw instead of the jre
(to stop the maven warnings). I managed to get the projects by using "create
new project from scm" for m2eclipse but it ends up pulling hundreds of megs
of stuff even if only get
http://svn.apache.org/repos/asf/james/server/(there seems to be some
branch with lots and lots of stuff in it - not sure
if it's needed or not...).
I realise that the docs aren't yet properly up-to-date for 3.0 - I'd be more
than willing to help with docs (and/or dev work) if I can get up and running
reasonably quickly (otherwise my boss will say I have to use something
else...). Can anyone give me (simple) instructions on how to get debugging
with the latest svn code?
Thanks heaps!
Anton

Re: Help getting a development env up and running with m2eclipse (+svn) and the latest 3.0 code

Posted by Eric Charles <er...@apache.org>.
> No need to convince me! I would have done far more Java stuff were it not
> for our director of development (I also understand the true value
> proposition of FOSS - something he doesn't). At the end of his university
> studies he did an internship at Microsoft, and sometimes I think he was
> LITERALLY brainwashed...

I know that kind of boss and MS is so good making programmers s...

> It just gets a bit tiring when you do 10-11 hour
> days and then have to come home and do programming stuff for pleasure... so
> I stuck with mainly .net stuff. It's not ALL horrible, after all :-).

I believe software dev at work should be as fun as for pleasure.

> We have some quite complicated inbound processing needs and the James
> architecture looks just perfect. A couple of our architects did this big
> requirements study/brainstorm on how it should look but ended up losing all
> the work they did. After a few hours they couldn't find what they had come
> up with.

Sounds like your architects don't develop anymore, some I know have 
never... :/

> I'm not even supposed to be developping any more (starting out on a
> consulting role but the technical situation in my department is so dire I'm
> going to clean that up before they let me go and see real clients :-))

I'm also in the process of cleaning-out stuff this week.

>  but
> we need something, James looks perfect for the job and I'm certainly not
> redoing work they have already done and lost!
>

As you said, James is prefect for inbound processing.

>
>> ...
>> There is a sentence which states "(*) The screenshots on this page contain
>> an outdated list of projects. Refer to http://svn.apache.org/repos/**
>> asf/james/server/<http://svn.apache.org/repos/asf/james/server/>  for the
>> accurate list."
>>
>> The next version of the web site will have a red box around this.
>>
>> For the final release, updated screenshots will be placed.
>>
>> The Main class now resides in the james-server-container-spring module.
>>
>> I did see the message about the outdated list - I just thought it was
> referring to non-essential modules. Well, as there no longer seemed to be a
> main method then at least one primary module had changed too! I had a
> sneaking suspicion it was that particular Main.java
>
>
>>   Thanks for your time!
>>>
>>
>> Tks for yours :)
>>
>
> I have a tendency to get excited when I stumble upon very well done open
> source projects and usually starting thinking about replacing everything we
> currently have! Hopefully this time I will have some time to contribute back
> to James and really get to know the project.
> Cheers
> Anton
>

-- 
Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Help getting a development env up and running with m2eclipse (+svn) and the latest 3.0 code

Posted by Anton Melser <me...@gmail.com>.
Hey again,


> One-stop-shopping vs best-of-breed
> Welcome to Java
> James is a good playground to jump into :)


No need to convince me! I would have done far more Java stuff were it not
for our director of development (I also understand the true value
proposition of FOSS - something he doesn't). At the end of his university
studies he did an internship at Microsoft, and sometimes I think he was
LITERALLY brainwashed... It just gets a bit tiring when you do 10-11 hour
days and then have to come home and do programming stuff for pleasure... so
I stuck with mainly .net stuff. It's not ALL horrible, after all :-).
We have some quite complicated inbound processing needs and the James
architecture looks just perfect. A couple of our architects did this big
requirements study/brainstorm on how it should look but ended up losing all
the work they did. After a few hours they couldn't find what they had come
up with. I'm not even supposed to be developping any more (starting out on a
consulting role but the technical situation in my department is so dire I'm
going to clean that up before they let me go and see real clients :-)) but
we need something, James looks perfect for the job and I'm certainly not
redoing work they have already done and lost!


> ...
> There is a sentence which states "(*) The screenshots on this page contain
> an outdated list of projects. Refer to http://svn.apache.org/repos/**
> asf/james/server/ <http://svn.apache.org/repos/asf/james/server/> for the
> accurate list."
>
> The next version of the web site will have a red box around this.
>
> For the final release, updated screenshots will be placed.
>
> The Main class now resides in the james-server-container-spring module.
>
> I did see the message about the outdated list - I just thought it was
referring to non-essential modules. Well, as there no longer seemed to be a
main method then at least one primary module had changed too! I had a
sneaking suspicion it was that particular Main.java


>  Thanks for your time!
>>
>
> Tks for yours :)
>

I have a tendency to get excited when I stumble upon very well done open
source projects and usually starting thinking about replacing everything we
currently have! Hopefully this time I will have some time to contribute back
to James and really get to know the project.
Cheers
Anton

Re: Help getting a development env up and running with m2eclipse (+svn) and the latest 3.0 code

Posted by Eric Charles <er...@apache.org>.
Hi,
See comments inline.

On 20/06/11 22:42, Anton Melser wrote:
> Thanks for your quick replies - yes, I have read pretty much everything I
> could get my hands on. Unfortunately, I've gotten lazy and am used to the
> very tight integration of MS products - there is only one way to do it and
> either you have everything and it works or you don't and it won't...

One-stop-shopping vs best-of-breed
Welcome to Java
James is a good playground to jump into :)

> slightly confusing thing is that there are several conflicting statements
> about versions. For example, on the page mentioned above it says "Maven
> 2.2.1 - This is a Java-tailored, XML-configured, extensible build or make
> system.". In the build.txt (and readme.txt) in svn it says you need 3.0.2...
> The webpage says you need the 1.5 jdk, the readme.txt says 1.6 is mandatory.
> The webpage says you need to set or export MAVEN-OPTS - isn't this rather
>
> $ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
> than
> $ export "MAVEN-OPTS=-Xmx1024m -XX:MaxPermSize=128m"
> ? (I'm using ubuntu 11.04 x64 at home, where I am also trying to get this
> working!).
>

3.0.2, 1.6 and _ are now fixed in what we call "SVN trunk".
The website is only deployed on releases, so it will be updated on 
upcoming beta1 release.

> Also, if we are assuming that we should use trunk - when you import into
> eclipse there are no longer any james-server-spring-* projects - so how do
> we get around to debugging? Is the main class you see in the screenshot
> somewhere else now?

There is a sentence which states "(*) The screenshots on this page 
contain an outdated list of projects. Refer to 
http://svn.apache.org/repos/asf/james/server/ for the accurate list."

The next version of the web site will have a red box around this.

For the final release, updated screenshots will be placed.

The Main class now resides in the james-server-container-spring module.


> Thanks for your time!

Tks for yours :)

> Cheers
> Anton

-- 
Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Help getting a development env up and running with m2eclipse (+svn) and the latest 3.0 code

Posted by Eric Charles <er...@apache.org>.
Yes, this is a conf problem.

I'm not sure, but did you also copy the conf folder (with all xml file) 
under the root (so on same level container-spring.

Also, what is the content of your mailetcontainer.xml file that resides 
in that newly created folder?

Tks

On 21/06/11 07:35, Anton Melser wrote:
> Hi,
>
> On 21 June 2011 05:54, Eric Charles<er...@apache.org>  wrote:
>
>> We have renamed/moved the whole spring-beans.xml and the instructions
>> shouuld be now:
>>
>> Copy the context folder, log4j.properties  and META-INF folder from
>> container-spring\src\main\**config\james directory to a source folder of
>> container-spring project (you can use for example a new folder called stage
>> as Eclipse source folder).</li>
>>
>> Copy all files (except context folder log4j.properties and
>> META-INF/persistence.xml) from container-spring\src\main\**config\james
>> folder to a conf folder (conf folder must be a sub-folder of the
>> JAMES_SRC_HOME directory where you made the check-out).</li>
>>
>
> We're getting pretty close now! I get the following stacktrace:
>
> Exception in thread "main"
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'configurationprovider' defined in class path resource
> [context/james-server-context.xml]: Invocation of init method failed; nested
> exception is org.apache.commons.configuration.ConfigurationException: Unable
> to load configuration for component mailetcontainer.processors
>   at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
>   at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
>   at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
>   at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:263)
>   at
> org.apache.james.container.spring.bean.factorypostprocessor.ConfigurationBeanFactoryPostProcessor.postProcessBeanFactory(ConfigurationBeanFactoryPostProcessor.java:60)
>   at
> org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
> at
> org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:653)
>   at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
> at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>   at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
> at
> org.apache.james.container.spring.context.JamesServerApplicationContext.<init>(JamesServerApplicationContext.java:39)
>   at org.apache.james.container.spring.Main.init(Main.java:66)
> at org.apache.james.container.spring.Main.main(Main.java:42)
> Caused by: org.apache.commons.configuration.ConfigurationException: Unable
> to load configuration for component mailetcontainer.processors
> at
> org.apache.james.container.spring.provider.configuration.ConfigurationProviderImpl.getConfiguration(ConfigurationProviderImpl.java:138)
>   at
> org.apache.james.container.spring.provider.configuration.ConfigurationProviderImpl.afterPropertiesSet(ConfigurationProviderImpl.java:90)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
>   at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
> ... 16 more
> Caused by: java.lang.IllegalArgumentException: Passed in key must select
> exactly one node: processors
> at
> org.apache.commons.configuration.HierarchicalConfiguration.configurationAt(HierarchicalConfiguration.java:576)
>   at
> org.apache.commons.configuration.HierarchicalConfiguration.configurationAt(HierarchicalConfiguration.java:596)
> at
> org.apache.james.container.spring.provider.configuration.ConfigurationProviderImpl.getConfiguration(ConfigurationProviderImpl.java:132)
>   ... 19 more
>
> This seems to be nothing more than a config problem, and I should be pretty
> close to having a good dev setup now. Any ideas?
> Thanks heaps for your help!
> Cheers
> Anton
>

-- 
Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Help getting a development env up and running with m2eclipse (+svn) and the latest 3.0 code

Posted by Anton Melser <me...@gmail.com>.
Hi,

On 21 June 2011 05:54, Eric Charles <er...@apache.org> wrote:

> We have renamed/moved the whole spring-beans.xml and the instructions
> shouuld be now:
>
> Copy the context folder, log4j.properties  and META-INF folder from
> container-spring\src\main\**config\james directory to a source folder of
> container-spring project (you can use for example a new folder called stage
> as Eclipse source folder).</li>
>
> Copy all files (except context folder log4j.properties and
> META-INF/persistence.xml) from container-spring\src\main\**config\james
> folder to a conf folder (conf folder must be a sub-folder of the
> JAMES_SRC_HOME directory where you made the check-out).</li>
>

We're getting pretty close now! I get the following stacktrace:

Exception in thread "main"
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'configurationprovider' defined in class path resource
[context/james-server-context.xml]: Invocation of init method failed; nested
exception is org.apache.commons.configuration.ConfigurationException: Unable
to load configuration for component mailetcontainer.processors
 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
 at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
 at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:263)
 at
org.apache.james.container.spring.bean.factorypostprocessor.ConfigurationBeanFactoryPostProcessor.postProcessBeanFactory(ConfigurationBeanFactoryPostProcessor.java:60)
 at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:653)
 at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
 at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at
org.apache.james.container.spring.context.JamesServerApplicationContext.<init>(JamesServerApplicationContext.java:39)
 at org.apache.james.container.spring.Main.init(Main.java:66)
at org.apache.james.container.spring.Main.main(Main.java:42)
Caused by: org.apache.commons.configuration.ConfigurationException: Unable
to load configuration for component mailetcontainer.processors
at
org.apache.james.container.spring.provider.configuration.ConfigurationProviderImpl.getConfiguration(ConfigurationProviderImpl.java:138)
 at
org.apache.james.container.spring.provider.configuration.ConfigurationProviderImpl.afterPropertiesSet(ConfigurationProviderImpl.java:90)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 16 more
Caused by: java.lang.IllegalArgumentException: Passed in key must select
exactly one node: processors
at
org.apache.commons.configuration.HierarchicalConfiguration.configurationAt(HierarchicalConfiguration.java:576)
 at
org.apache.commons.configuration.HierarchicalConfiguration.configurationAt(HierarchicalConfiguration.java:596)
at
org.apache.james.container.spring.provider.configuration.ConfigurationProviderImpl.getConfiguration(ConfigurationProviderImpl.java:132)
 ... 19 more

This seems to be nothing more than a config problem, and I should be pretty
close to having a good dev setup now. Any ideas?
Thanks heaps for your help!
Cheers
Anton

Re: Help getting a development env up and running with m2eclipse (+svn) and the latest 3.0 code

Posted by Eric Charles <er...@apache.org>.
We have renamed/moved the whole spring-beans.xml and the instructions 
shouuld be now:

Copy the context folder, log4j.properties  and META-INF folder from 
container-spring\src\main\config\james directory to a source folder of 
container-spring project (you can use for example a new folder called 
stage as Eclipse source folder).</li>

Copy all files (except context folder log4j.properties and 
META-INF/persistence.xml) from container-spring\src\main\config\james 
folder to a conf folder (conf folder must be a sub-folder of the 
JAMES_SRC_HOME directory where you made the check-out).</li>

Tks


On 20/06/11 22:58, Anton Melser wrote:
>> Also, spring-beans.xml seems to be missing - I tried getting one from one
> of the other directories and using the instructions for with the project
> james-server-container-spring (right-click and try to run the Main.java as
> java application) but I get the following error:
> INFO  22:56:01,141 |
> org.apache.james.container.spring.context.JamesServerApplicationContext |
> Refreshing
> org.apache.james.container.spring.context.JamesServerApplicationContext@790bc49d:
> startup date [Mon Jun 20 22:56:01 CEST 2011]; root of context hierarchy
> Exception in thread "main"
> org.springframework.beans.factory.BeanDefinitionStoreException: IOException
> parsing XML document from class path resource
> [context/james-server-context.xml]; nested exception is
> java.io.FileNotFoundException: class path resource
> [context/james-server-context.xml] cannot be opened because it does not
> exist
>   at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
>   at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
>   at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
>   at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:126)
> at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:92)
>   at
> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
> at
> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
>   at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
> at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>   at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
> at
> org.apache.james.container.spring.context.JamesServerApplicationContext.<init>(JamesServerApplicationContext.java:39)
>   at org.apache.james.container.spring.Main.init(Main.java:66)
> at org.apache.james.container.spring.Main.main(Main.java:42)
> Caused by: java.io.FileNotFoundException: class path resource
> [context/james-server-context.xml] cannot be opened because it does not
> exist
> at
> org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)
>   at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
> ... 15 more
>
> Again, these are probably very obvious stupid things I am getting wrong -
> thanks for your patience!
> Cheers
> Anton

-- 
Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Help getting a development env up and running with m2eclipse (+svn) and the latest 3.0 code

Posted by Anton Melser <me...@gmail.com>.
On 21 June 2011 05:57, Eric Charles <er...@apache.org> wrote:

> As non-root privilege user, you must use ports > 1024.
> I will mention this on the page.


This one was a very easy catch. I suppose it is preferable to have the
default config files ready for a production situation rather than a dev
one.


I hope you didn't bang your head on the door with these instructions not in
> line with "trunk/snapshots".
>
> We must release more often to avoid this.
>
> Tks
>

There has been some head-banging but I haven't done any for a while so no
worries :-). I fully realise that keeping instructions up-to-date for a very
quickly moving target (new branch getting ready for beta) is far more work
than is warranted. You guys have been very helpful and quick to answer my
(silly) questions - that's all that matters in the end!
Cheers
Anton

Re: Help getting a development env up and running with m2eclipse (+svn) and the latest 3.0 code

Posted by Eric Charles <er...@apache.org>.
As non-root privilege user, you must use ports > 1024.
I will mention this on the page.

I hope you didn't bang your head on the door with these instructions not 
in line with "trunk/snapshots".

We must release more often to avoid this.

Tks

On 20/06/11 23:42, Anton Melser wrote:
>>
>> Just to update - I managed to get debug working with the M2 source release
>> (after changing default ports to be>  1000). Apart from the screenshots, the
>> instructions, if followed properly (:-), if all else fails...), do work.
>> With an svn pull however, they don't... I can get started with this though
>> to see how things work. It would be good to get nice instructions for
>> getting svn to build from a clean install though!
>>
> Thanks,
> Anton
>

-- 
Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Help getting a development env up and running with m2eclipse (+svn) and the latest 3.0 code

Posted by Anton Melser <me...@gmail.com>.
>
> Just to update - I managed to get debug working with the M2 source release
> (after changing default ports to be > 1000). Apart from the screenshots, the
> instructions, if followed properly (:-), if all else fails...), do work.
> With an svn pull however, they don't... I can get started with this though
> to see how things work. It would be good to get nice instructions for
> getting svn to build from a clean install though!
>
Thanks,
Anton

Re: Help getting a development env up and running with m2eclipse (+svn) and the latest 3.0 code

Posted by Anton Melser <me...@gmail.com>.
On 20 June 2011 22:42, Anton Melser <me...@gmail.com> wrote:

> Hi,
>
> On 20 June 2011 12:51, Eric Charles <er...@apache.org> wrote:
>
>>  Hi,
>> Yes, this is the place to look at.
>>
>> The first step you could take is to build via command line with 'mvn
>> package -DskipTests=true' for example.
>>
>> Once ok (dependencies downloaded,...), give it a try in eclipse with the
>> tutorial and send us any feedback so we can enhance it.
>>
>> ...
>>
>> On 20/06/11 12:34, Norman Maurer wrote:
>>
>>> Hi there,
>>>
>>> did you read this?
>>>
>>> http://james.apache.org/**server/3/dev-build.html<http://james.apache.org/server/3/dev-build.html>
>>>
>>>
> Thanks for your quick replies - yes, I have read pretty much everything I
> could get my hands on. Unfortunately, I've gotten lazy and am used to the
> very tight integration of MS products - there is only one way to do it and
> either you have everything and it works or you don't and it won't... One
> slightly confusing thing is that there are several conflicting statements
> about versions. For example, on the page mentioned above it says "Maven
> 2.2.1 - This is a Java-tailored, XML-configured, extensible build or make
> system.". In the build.txt (and readme.txt) in svn it says you need 3.0.2...
> The webpage says you need the 1.5 jdk, the readme.txt says 1.6 is mandatory.
> The webpage says you need to set or export MAVEN-OPTS - isn't this rather
>
> $ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
> than
> $ export "MAVEN-OPTS=-Xmx1024m -XX:MaxPermSize=128m"
> ? (I'm using ubuntu 11.04 x64 at home, where I am also trying to get this
> working!).
>
> Also, if we are assuming that we should use trunk - when you import into
> eclipse there are no longer any james-server-spring-* projects - so how do
> we get around to debugging? Is the main class you see in the screenshot
> somewhere else now?
> Thanks for your time!
> Cheers
> Anton
>
> Also, spring-beans.xml seems to be missing - I tried getting one from one
of the other directories and using the instructions for with the project
james-server-container-spring (right-click and try to run the Main.java as
java application) but I get the following error:
INFO  22:56:01,141 |
org.apache.james.container.spring.context.JamesServerApplicationContext |
Refreshing
org.apache.james.container.spring.context.JamesServerApplicationContext@790bc49d:
startup date [Mon Jun 20 22:56:01 CEST 2011]; root of context hierarchy
Exception in thread "main"
org.springframework.beans.factory.BeanDefinitionStoreException: IOException
parsing XML document from class path resource
[context/james-server-context.xml]; nested exception is
java.io.FileNotFoundException: class path resource
[context/james-server-context.xml] cannot be opened because it does not
exist
 at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
 at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
 at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
 at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:126)
at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:92)
 at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
 at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
 at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at
org.apache.james.container.spring.context.JamesServerApplicationContext.<init>(JamesServerApplicationContext.java:39)
 at org.apache.james.container.spring.Main.init(Main.java:66)
at org.apache.james.container.spring.Main.main(Main.java:42)
Caused by: java.io.FileNotFoundException: class path resource
[context/james-server-context.xml] cannot be opened because it does not
exist
at
org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)
 at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
... 15 more

Again, these are probably very obvious stupid things I am getting wrong -
thanks for your patience!
Cheers
Anton



-- 
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq' | dc
This will help you for 99.9% of your problems ...

Re: Help getting a development env up and running with m2eclipse (+svn) and the latest 3.0 code

Posted by Anton Melser <me...@gmail.com>.
Hi,

On 20 June 2011 12:51, Eric Charles <er...@apache.org> wrote:

> Hi,
> Yes, this is the place to look at.
>
> The first step you could take is to build via command line with 'mvn
> package -DskipTests=true' for example.
>
> Once ok (dependencies downloaded,...), give it a try in eclipse with the
> tutorial and send us any feedback so we can enhance it.
>
> ...
> On 20/06/11 12:34, Norman Maurer wrote:
>
>> Hi there,
>>
>> did you read this?
>>
>> http://james.apache.org/**server/3/dev-build.html<http://james.apache.org/server/3/dev-build.html>
>>
>>
Thanks for your quick replies - yes, I have read pretty much everything I
could get my hands on. Unfortunately, I've gotten lazy and am used to the
very tight integration of MS products - there is only one way to do it and
either you have everything and it works or you don't and it won't... One
slightly confusing thing is that there are several conflicting statements
about versions. For example, on the page mentioned above it says "Maven
2.2.1 - This is a Java-tailored, XML-configured, extensible build or make
system.". In the build.txt (and readme.txt) in svn it says you need 3.0.2...
The webpage says you need the 1.5 jdk, the readme.txt says 1.6 is mandatory.
The webpage says you need to set or export MAVEN-OPTS - isn't this rather

$ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
than
$ export "MAVEN-OPTS=-Xmx1024m -XX:MaxPermSize=128m"
? (I'm using ubuntu 11.04 x64 at home, where I am also trying to get this
working!).

Also, if we are assuming that we should use trunk - when you import into
eclipse there are no longer any james-server-spring-* projects - so how do
we get around to debugging? Is the main class you see in the screenshot
somewhere else now?
Thanks for your time!
Cheers
Anton

-- 
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq' | dc
This will help you for 99.9% of your problems ...

Re: Help getting a development env up and running with m2eclipse (+svn) and the latest 3.0 code

Posted by Eric Charles <er...@apache.org>.
Hi,
Yes, this is the place to look at.

The first step you could take is to build via command line with 'mvn 
package -DskipTests=true' for example.

Once ok (dependencies downloaded,...), give it a try in eclipse with the 
tutorial and send us any feedback so we can enhance it.

Tks,
- Eric


On 20/06/11 12:34, Norman Maurer wrote:
> Hi there,
>
> did you read this?
>
> http://james.apache.org/server/3/dev-build.html
>
> Thanks,
> Norman
>
>
> 2011/6/20 Anton Melser<me...@gmail.com>:
>> Hi,
>> I wrote on another thread but my problem is slightly different so I'm
>> creating another.
>> So, I have been having some problems getting an environment up and running.
>> I am particularly interested in using the latest and greatest code, and
>> would prefer to be using the 3.0 branch from svn if possible... I haven't
>> done a heap of java development (mainly .net), though I have done some web
>> stuff in eclipse (with spring), but it was a few years ago and it was never
>> more than about 20% of my time. There are many things that will be obvious
>> that I'm probably missing.
>> I am very interested in developing (and/or extending existing) mailets. I
>> realise it is probably possible to do as some do and just create a project
>> with my mailets and not have the whole thing in eclipse but things still
>> seem to be changing pretty rapidly in the 3.0 branch so I'd rather keep
>> up-to-date if possible.
>> I suppose my main problem at the moment is that eclipse keeps crashing when
>> I try and open any file. I have installed the latest Java EE IDE from the
>> eclipse site, and into that I installed the latest m2eclipse (with extras
>> for scm) and subclipse. I have Win7 enterprise x64 with the latest Oracle
>> JDK installed, and I suppose the only slightly non-std thing I did was to
>> specify -vm in eclipse.ini so it pointed to the jdk javaw instead of the jre
>> (to stop the maven warnings). I managed to get the projects by using "create
>> new project from scm" for m2eclipse but it ends up pulling hundreds of megs
>> of stuff even if only get
>> http://svn.apache.org/repos/asf/james/server/(there seems to be some
>> branch with lots and lots of stuff in it - not sure
>> if it's needed or not...).
>> I realise that the docs aren't yet properly up-to-date for 3.0 - I'd be more
>> than willing to help with docs (and/or dev work) if I can get up and running
>> reasonably quickly (otherwise my boss will say I have to use something
>> else...). Can anyone give me (simple) instructions on how to get debugging
>> with the latest svn code?
>> Thanks heaps!
>> Anton
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Help getting a development env up and running with m2eclipse (+svn) and the latest 3.0 code

Posted by Norman Maurer <no...@googlemail.com>.
Hi there,

did you read this?

http://james.apache.org/server/3/dev-build.html

Thanks,
Norman


2011/6/20 Anton Melser <me...@gmail.com>:
> Hi,
> I wrote on another thread but my problem is slightly different so I'm
> creating another.
> So, I have been having some problems getting an environment up and running.
> I am particularly interested in using the latest and greatest code, and
> would prefer to be using the 3.0 branch from svn if possible... I haven't
> done a heap of java development (mainly .net), though I have done some web
> stuff in eclipse (with spring), but it was a few years ago and it was never
> more than about 20% of my time. There are many things that will be obvious
> that I'm probably missing.
> I am very interested in developing (and/or extending existing) mailets. I
> realise it is probably possible to do as some do and just create a project
> with my mailets and not have the whole thing in eclipse but things still
> seem to be changing pretty rapidly in the 3.0 branch so I'd rather keep
> up-to-date if possible.
> I suppose my main problem at the moment is that eclipse keeps crashing when
> I try and open any file. I have installed the latest Java EE IDE from the
> eclipse site, and into that I installed the latest m2eclipse (with extras
> for scm) and subclipse. I have Win7 enterprise x64 with the latest Oracle
> JDK installed, and I suppose the only slightly non-std thing I did was to
> specify -vm in eclipse.ini so it pointed to the jdk javaw instead of the jre
> (to stop the maven warnings). I managed to get the projects by using "create
> new project from scm" for m2eclipse but it ends up pulling hundreds of megs
> of stuff even if only get
> http://svn.apache.org/repos/asf/james/server/(there seems to be some
> branch with lots and lots of stuff in it - not sure
> if it's needed or not...).
> I realise that the docs aren't yet properly up-to-date for 3.0 - I'd be more
> than willing to help with docs (and/or dev work) if I can get up and running
> reasonably quickly (otherwise my boss will say I have to use something
> else...). Can anyone give me (simple) instructions on how to get debugging
> with the latest svn code?
> Thanks heaps!
> Anton
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org