Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 30736 invoked from network); 14 Jun 2010 15:59:33 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Jun 2010 15:59:33 -0000 Received: (qmail 70539 invoked by uid 500); 14 Jun 2010 08:52:53 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 70105 invoked by uid 500); 14 Jun 2010 08:52:50 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 70098 invoked by uid 99); 14 Jun 2010 08:52:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jun 2010 08:52:48 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [82.99.2.81] (HELO mx4.ciber-europe.com) (82.99.2.81) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jun 2010 08:52:40 +0000 Received: from eusex01.sweden.ecsoft ([10.46.0.69]) by mx4.ciber-europe.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 14 Jun 2010 10:52:18 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CB0B9E.E4BB1FA1" Subject: RE: Cocoon 2.2 + openjpa Date: Mon, 14 Jun 2010 10:56:38 +0200 Message-ID: <7C655C04B6F59643A1EF66056C0E095E0418785F@eusex01.sweden.ecsoft> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Cocoon 2.2 + openjpa Thread-Index: AcsJpNp9r5koeT3zSCmDyJRWbB219QB+I0cw References: ,<7C655C04B6F59643A1EF66056C0E095E041173B2@eusex01.sweden.ecsoft> ,<7C655C04B6F59643A1EF66056C0E095E0418728B@eusex01.sweden.ecsoft> From: "Robby Pelssers" To: X-OriginalArrivalTime: 14 Jun 2010 08:52:18.0122 (UTC) FILETIME=[E4C7AAA0:01CB0B9E] X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01CB0B9E.E4BB1FA1 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi Ali, =20 Suppose you have a cocoon application with multiple cocoon blocks A, B = and C. =20 The default rcl.properties will contain something like =20 com.mycompany.blockA.service%classes-dir=3D./target/classes =20 This will ensure that whenever you are running the application (while = still developing) you can make changes in your java classes and pressing = F5 in the browser will immediately reflect those changes. =20 You could also have a situation where block B depends on block A=20 =20 =20 com.mycompany.blockB.service%classes-dir=3D./target/classes = =20 =20 com.mycompany.blockA.service%classes-dir=3D../blockA/target/classes = --> use the classes from the target folder = of block A %exclude-lib=3Dcom.mycompany:blockA = --> exclude = the jar from block A =20 =20 I=92m no expert on classloaders but I think you should comment out these = lines when moving to a production environment. =20 =20 And just like you noticed this can even cause classloading issues while = still developing so also in that cause you can comment out these lines. =20 Robby =20 =20 From: Ali Mahdoui [mailto:mahdoui@hotmail.de]=20 Sent: Friday, June 11, 2010 10:28 PM To: Cocoon users Subject: RE: Cocoon 2.2 + openjpa =20 disabled everything from the rcl.properties, clean and run and now = everything works perfectly. Thanks Robby!!!!!!! could you please explain what was the problem? how does rcl.properties = causes the problem? Thanks again! Ali =20 =20 ________________________________ Subject: RE: Cocoon 2.2 + openjpa Date: Fri, 11 Jun 2010 10:41:24 +0200 From: robby.pelssers@ciber.com To: users@cocoon.apache.org You might want to disable everything from the rcl.properties file. I = had similar issues in the past and that helped fixing the classloader = issue. =20 Robby =20 From: Ali Mahdoui [mailto:mahdoui@hotmail.de]=20 Sent: Friday, June 11, 2010 10:22 AM To: Cocoon users Subject: RE: Cocoon 2.2 + openjpa =20 I have all that configured. The problem when i call fom some class this = code BeanClass bean =3D manager.find(BeanClass.class, id); i get always the exception that BeanClass can not be cast to = BeanClass.... After some debug jobs if found that the ClassLoader of the = entitiyManagerFactory is another as the one of my calling class and because of that i become the exception. I am wondering if there is some spring configuration properties which = schold be set, such that the entityManager uses another classLoader (for = example the one of the calling block...) Thanks for any help Ali ________________________________ Subject: RE: Cocoon 2.2 + openjpa Date: Fri, 11 Jun 2010 09:24:12 +0200 From: robby.pelssers@ciber.com To: users@cocoon.apache.org I=92d say=85 who cares if you=92re using Cocoon2.2? =20 Just start using openJPA as you would for any other java project=85 =20 -Add the needed dependencies to your pom.=20 -Start configuring some beans in your block-application-context.xml -write your pojo=92s and annotate them -from flowscript do the work you need to do by=20 =20 var mybean =3D cocoon.getComponent(=93mybean=94); mybean.doSomething(); =20 Robby =20 =20 =20 From: Ali Mahdoui [mailto:mahdoui@hotmail.de]=20 Sent: Thursday, June 10, 2010 11:24 PM To: Cocoon users Subject: Cocoon 2.2 + openjpa =20 Hi, is there any tutorial or example how to use openjpa with cocoon 2.2? Thanks! Ali =20 ________________________________ Tsch=FCss Werbung im E-Mail-Abbinder! = =20 =20 ________________________________ K=FCnftig E-Mails ohne Werbung =96 Nutzen Sie Hotmail auch = gesch=E4ftlich. =20 =20 ________________________________ K=FCnftig E-Mails =FCber Hotmail ohne Werbung versenden! = =20 ------_=_NextPart_001_01CB0B9E.E4BB1FA1 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable

Hi Ali,

 

Suppose you have a cocoon application = with multiple cocoon blocks A, B and C.

 

The default rcl.properties will contain something like

 

com.mycompany.blockA.service%classes<= /span>-dir=3D./target/classes

 

This will ensure that whenever you are = running the application (while still developing) you can make changes in your = java classes and pressing F5 in the browser will immediately reflect those = changes.

 

You could also have a situation where = block B depends on block A

 

 

com.mycompany.blockB.service%classes<= /span>-dir=3D./target/classes=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0

 

com.mycompany.blockA.service%classes-dir=3D../block= A/target/classes =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = =E0 use the classes from the target folder = of block A

%exclude-lib=3Dcom.mycompany:blockA=A0=A0 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 =E0 exclude the jar from block = A

 

 

I=92m no expert on classloaders but I think you should comment out these lines when moving to a = production environment.=A0 =

 

And just like you noticed this can even = cause classloading issues while still developing so also = in that cause you can comment out these lines.

 

Robby

 

 

From: Ali Mahdoui [mailto:mahdoui@hotmail.de]
Sent: Friday, June 11, = 2010 10:28 PM
To: Cocoon users
Subject: RE: Cocoon 2.2 + = openjpa

 

disabled everything from the rcl.properties, clean and run and now everything = works perfectly.

Thanks Robby!!!!!!!

could you please explain what was the problem? how does rcl.properties causes = the problem?

Thanks again!

Ali

 

 


Subject: RE: Cocoon 2.2 + openjpa
Date: Fri, 11 Jun 2010 10:41:24 +0200
From: robby.pelssers@ciber.com
To: users@cocoon.apache.org

You might want to disable everything from the rcl.properties file.  I had similar issues in the past and that helped fixing the = classloader issue.=

 =

Robby=

 =

From: Ali Mahdoui [mailto:mahdoui@hotmail.de]
Sent: Friday, June 11, = 2010 10:22 AM
To: Cocoon users
Subject: RE: Cocoon 2.2 + = openjpa
=

 


I have all that configured. The problem when i call fom some class this = code
BeanClass bean =3D manager.find(BeanClass.class, id);
i get always the exception that BeanClass can not be cast to = BeanClass....
After some debug jobs if found that the ClassLoader of the entitiyManagerFactory is another as the one of my calling class
and because of that i become the exception.
I am wondering if there is some spring configuration properties which = schold be set, such that the entityManager uses another classLoader (for example = the one of the calling block...)

Thanks for any help
Ali


Subject: = RE: Cocoon 2.2 + openjpa
Date: Fri, 11 Jun 2010 09:24:12 +0200
From: robby.pelssers@ciber.com
To: users@cocoon.apache.org

I=92d say=85 who cares if you=92re using Cocoon2.2?=

 =

Just start using openJPA as you would for = any other java project=85

 =

-Add the needed dependencies to  your pom. =

-Start configuring some beans in your = block-application-context.xml=

-write your pojo=92s and annotate = them=

-from flowscript do the work you need to do = by =

   

var mybean =3D  cocoon.getComponent(=93mybean=94);=

mybean.doSomething();=

 =

Robby=

 =

 =

 =

From: Ali Mahdoui [mailto:mahdoui@hotmail.de]
Sent: Thursday, June 10, = 2010 11:24 PM
To: Cocoon users
Subject: Cocoon 2.2 + = openjpa
=

 

Hi,

is there any tutorial or example how = to use openjpa with cocoon 2.2?

Thanks!

Ali

 


Tsch=FCss Werbung im = E-Mail-Abbinder!

 


K=FCnftig E-Mails ohne Werbung =96 = Nutzen Sie Hotmail = auch gesch=E4ftlich.

 


K=FCnftig E-Mails =FCber Hotmail ohne Werbung versenden!

------_=_NextPart_001_01CB0B9E.E4BB1FA1--