블로그 이미지
올해목표 // 10월 어학연수 떠나자~ 자수씨

카테고리

전체글 (1457)
Brand New! (28)
주절주절 (213)
MOT (11)
해외쇼핑 (49)
쇼핑노트 (150)
취미생활 (94)
iPhone (4)
Eclipse (121)
Google (83)
Spring (31)
JAVA (176)
Ant (2)
Maven (29)
iBATIS (7)
Regular Expression (6)
Java Web Start (4)
WebServices (14)
JAXB (12)
CAS (13)
JBoss Seam (6)
OSGi (1)
Hibernate (2)
James (6)
Alfresco (17)
JavaScript (59)
WEB (49)
Database (20)
OS (26)
Tools (8)
Tips (26)
IT정보 (1)
Book (21)
Programming (37)
외부행사 (43)
주변인들 (17)
여행노트 (60)
학교생활 (30)
회사생활 (52)
사회생활 (5)
외국어공부 (12)
잡동사니 (30)
Total
Today
Yesterday
 
04-28 00:02
 

달력

« » 2024.4
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
 

최근에 올라온 글

최근에 달린 댓글

James 공식 홈페이지(http://james.apache.org/server/3/dev-build.html)에는 대충 설명되어 있어서 따로 정리합니다.


실행위치는 james-server 를 내려받은 최상단 pom.xml 이 있는 곳입니다.


Goals: clean pakcage

Profiles: with-assembly


Goals 에 clean 을 설정하는 이유는 혹시라도 모를 문제 발생을 미연에 방지하고자 사용합니다.

Profiles 에 with-assembly 는 "zip, targ.gz, war" 파일을 생성해 줍니다.




기본설정으로 빌드를 하면 메모리 부족을 확인할 수 있을 것 입니다.

VM arguments 에 다음과 같이 설정합니다.

-Xmx512m -XX:MaxPermSize=128m




지겹지겹...





Posted by 자수씨
, |


James 3 에서 제공하는 mailbox 는 jpa, jcr, maildir, hbase, memory 입니다.


기존에 사용하던 메일 시스템의 DB, Filesystem 과 연동을 위해서는 커스터마이징이 필수적입니다.


org.apache.james.container.spring.bean.factorypostprocessor.MailboxConfigurationBeanFactoryPostProcessor 

위의 클래스에서 jdbc 용 provider 를 확장하는게 첫 시작점이 될 것 같습니다.

 

각 provider 별 spring.xml 은 아래 xml 에 import 시켜서 사용합니다.

/apache-james-mailbox/spring/src/main/resources/META-INF/org/apache/james/spring-mailbox.xml

 

 

Posted by 자수씨
, |

어제 로컬에서 띄운 것을 확인하고 오늘와서 띄워보니 아래와 같은 오류가...

 

Caused by: <openjpa-2.2.1-r422266:1396819 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.rrt.jpa.model.JPARecipientRewrite".

 

구글링을 해보니 아래와 같은 해결책을 찾을 수 있었다.

http://djitz.com/neu-mscs/getting-started-using-apache-openjpa/

...

4. Run the Main class (right click the Main.java > Run As > Java Application).
 
If you followed everything correctly, you will see that OpenJPA creates the Patient table automatically. However, it will throw an Exception afterwards, and it goes like:
 
Exception in thread "main" <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: "com.djitz.model.Patient".
 
This happens because the OpenJPA fails to run enhanced the entity file (Patient.java) we created. What the OpenJPA (and also Hibernate) does is putting some more code in our Patient class after it is compiled. These code lines enable the OpenJPA to do some “magic”.
 
Now we need to add some lines on the run configuration to apply this enhancement.

F. Add run configuration for Enhancement
 
1. Right click the Main class > Run As > Run configurations
 2. Open the “Arguments” tab
 3. Paste the following in the VM arguments box:
 
-javaagent:[path-to-extraced-openjpa-zip-file]/openjpa-2.0.1.jar
 
4. Re-run the Main.java, there should be no error by now.

...

 

검색한대로 Java VM 에 아래의 파라미터를 추가하니 정상 동작합니다. (경로는 제 개발환경 기준...)

-javaagent:C:\Users\Administrator\.m2\repository\org\apache\openjpa\openjpa\2.2.1\openjpa-2.2.1.jar

 

 

 

 

Posted by 자수씨
, |


James-3.0은 설치해서 테스트는 해봤지만 실제로 주고받는 메시지들을 확인하고 싶어서 개발 환경에 소스를 내려받았습니다.


SVN: http://svn.apache.org/repos/asf/james/server/trunk



2012/11/13 - [JAVA/James] - [James 3] 3.0-beta4 에서 Main 클래스는 어디로...

지난 번에 포스팅했던 적이 있었는데 beta-4에서는 실행시킬 수 있는 클래스가 사라졌습니다. trunk를 체크아웃 받으니 app 프로젝트가 있습니다. (2013.01.08 기준)


"org.apache.james.app.spring.JamesAppSpringMain" 클래스를 실행시키니 ClassNotFoundException 이 후두둑 떨어집니다.


Caused by: java.lang.ClassNotFoundException: org.apache.james.transport.matchers.All

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source

...



검색을 해보니 현재 matcher 와 mailet 쪽을 작업 옮기는 작업 중인지 문제가...

(http://comments.gmane.org/gmane.comp.jakarta.james.user/19155)


MatcherLoader 와 MailetLoader 는 하나인데, matcher, mailet 패키지가 분산되어 발생한 문제인 것 같았습니다.


결국 해결책은 꼼수...




아직 이관되지 않은 matcher 와 mailet 을 org.apache.james.transport.matchers 쪽에 상속 받도록 해놨습니다.

package org.apache.james.transport.matchers;


public class All extends org.apache.james.mailet.standard.matchers.All {


}


10개의 클래스를 꼼수로 만드니 구동됩니다.


이제 다음 스텝으로... 두둥...





Posted by 자수씨
, |

http://mail-archives.apache.org/mod_mbox/james-server-user/201106.mbox/%3C4DFBC41D.9060107@gmx.de%3E


위의 내용을 참고하여 이클립스에 James를 띄우는 것은 성공...




security 쪽이 문제가 되서 "-Djava.security.manager" 옵션을 빼니깐 바로 되는군...


이제부터 IMAP 시작!!





Posted by 자수씨
, |

http://james.apache.org/server/3/dev-build.html 여기엔 분명히 "james-server-spring-deployment" 프로젝트 밑에 Main.java 를 통해 실행할 수 있게 되어 있는데... 3.0-beta4 에서는 해당 클래스가 보이질 않는다.

 

 

 2011년 10월 20일에 app 프로젝트로 이관되었 것을 히스토리를 통해 확인하였다.

 

 

음 근데... app 프로젝트는 아직 3.0-beta3까지 밖에 태깅이 안되어 있는데... 걍 trunk 쪽으로 작업을 해야 하나... 흐흠...

 

 

 

 

Posted by 자수씨
, |

글 보관함

최근에 받은 트랙백