I am running into a different issue now.  (The spring-beans.xml problem does
not seem to be an issue.  I believe that file has just been renamed to
james-server-context.xml)

My current issue is that my Eclipse build does not seem to do OpenJPA
enhancements of the JPA classes.  Which gives me errors like the following.

How to fix the following?

INFO  15:24:32,440 | james.dnsservice | Registered cache, resolver and
search paths as DNSJava defaults
129  James  WARN   [main] openjpa.Runtime - An error occurred while
registering a ClassTransformer with PersistenceUnitInfo: name 'James', root
URL [file:/C:/u/p/james-server-src/container-spring/target/classes/]. The
error has been consumed. To see it, set your openjpa.Runtime log level to
TRACE. Load-time class transformation will not be available.
INFO  15:24:34,433 | james.domainlist | Set autodetect to: true
INFO  15:24:34,437 | james.domainlist | Set autodetectIP to: true
368  James  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.1
609  James  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class
"org.apache.openjpa.jdbc.sql.DerbyDictionary".
Exception in thread "main"
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'mailprocessor': Injection of resource dependencies failed; nested
exception is org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'mailetcontext': Injection of resource dependencies
failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'usersrepository': Injection of resource dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'domainlist': Invocation of init method
failed; nested exception is <openjpa-2.0.1-r422266:989424 nonfatal user
error> org.apache.openjpa.persistence.ArgumentException: This configuration
disallows runtime optimization, but the following listed types were not
enhanced at build time or at class load time with a javaagent: "
org.apache.james.domainlist.jpa.model.JPADomain
org.apache.james.user.jpa.model.JPAUser
org.apache.james.vut.jpa.model.JPAVirtualUser".
at
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:300)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
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:190)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
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.main(Main.java:39)
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'mailetcontext': Injection of resource dependencies
failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'usersrepository': Injection of resource dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'domainlist': Invocation of init method
failed; nested exception is <openjpa-2.0.1-r422266:989424 nonfatal user
error> org.apache.openjpa.persistence.ArgumentException: This configuration
disallows runtime optimization, but the following listed types were not
enhanced at build time or at class load time with a javaagent: "
org.apache.james.domainlist.jpa.model.JPADomain
org.apache.james.user.jpa.model.JPAUser
org.apache.james.vut.jpa.model.JPAVirtualUser".
at
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:300)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
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.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:435)
at
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:409)
at
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:541)
at
org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:156)
at
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
at
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:297)
... 14 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'usersrepository': Injection of resource
dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'domainlist': Invocation of init method failed; nested exception
is <openjpa-2.0.1-r422266:989424 nonfatal user error>
org.apache.openjpa.persistence.ArgumentException: This configuration
disallows runtime optimization, but the following listed types were not
enhanced at build time or at class load time with a javaagent: "
org.apache.james.domainlist.jpa.model.JPADomain
org.apache.james.user.jpa.model.JPAUser
org.apache.james.vut.jpa.model.JPAVirtualUser".
at
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:300)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
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.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:435)
at
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:409)
at
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:541)
at
org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:156)
at
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
at
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:297)
... 27 more

On Fri, Jan 28, 2011 at 1:50 PM, agks mehx <[email protected]> wrote:

> Thank you very much -- I am still stuck because I cannot find
> spring-beans.xml even after doing an mvn build, and the instructions refer
> to it.
>
> I am working against an svn checkout of the nightly -- may be something's
> changed?
>
>
> On Thu, Jan 27, 2011 at 9:46 PM, Luc Saulière <[email protected]>wrote:
>
>> You can find admirable tutorial at
>> http://james.apache.org/server/3/dev-build.html
>> For Eclipse you can read the "Build James Source from Eclipse" chapter...
>> It has worked perfectly for me on J3M2.
>>
>> Luc.
>>
>>
>> 2011/1/28 agks mehx <[email protected]>
>>
>> > I figured I should send this to the dev list rather than the user list
>> > where
>> > I first sent it to.  BTW, I searched the dev archive for eclipse and
>> only
>> > found something from 2003 which is probably outdated.  (also, I'm
>> > relatively
>> > new to Eclipse, used to do things in vi and on command-line before)
>>  Here
>> > goes:
>> >
>> > How does one step through source in Eclipse?  What IDE do you all use?
>>  How
>> > do you set it up?
>> >
>> > My failed attempt:
>> >  - first, used mvn to successfully build
>> > james-server-3.0-M2-source-release.zip
>> >  - second, created project in Eclipse based on the same folder as mvn
>> build
>> >  - third, got *inexplicable* errors e. g. AbstractHasMailAttributeTest
>> > cannot be resolved to a type at line 32
>> > in HasMailAttributeWithValueRegexTest.java
>> >  - fourth, searched entire folder including inside all .jar files and
>> .java
>> > files but could not find AbstractHasMailAttributeTest anywhere
>> >  - fifth, did not see any import for AbstractHasMailAttributeTest in
>> > HasMailAttributeWithValueRegexTest.java
>> >  - finally, many similar inexplicable errors -- makes me wonder how mvn
>> was
>> > able to build it?
>> >
>> > My reason for wanting to step through code -- the config documentation
>> is
>> > out of date and I want to set up a mailet-based mail server application.
>> >  Since I am flying blind and don't know how to set up users, etc. I
>> decided
>> > to just step through code and understand what's going on.
>> >
>> > Any updates on ETA for a full release including documentation?
>> >
>> > Thanks!!
>> >
>>
>
>

Reply via email to