annotated class

2008-02-14 Thread freak182

Hello,
Im developing an app using hibernate annotations.My problem is when i
configure my appContext.xml the annotated class cannot be found. here is the
code snippet of appContext.xml found in WEB-INF/config.







org.hibernate.dialect.MySQL5Dialect


org.hibernate.cache.OSCacheProvider


2
300
100

after_statement

5

select 1


true

update

true




  

com.test.server.model.Test
com.test.server.model.Test2




com.test.server




My question is, the appContext.xml should be put in the classpath or
/WEB-INF/config ?is there is difference between the two? Any idea.
Thanks a lot.
Cheers
-- 
View this message in context: 
http://www.nabble.com/annotated-class-tp15476390p15476390.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: annotated class

2008-02-14 Thread Nino Saturnino Martinez Vazquez Wael

Do you use maven to build with?

com.test.server.model.Test
com.test.server.model.Test2



freak182 wrote:

Hello,
Im developing an app using hibernate annotations.My problem is when i
configure my appContext.xml the annotated class cannot be found. here is the
code snippet of appContext.xml found in WEB-INF/config.







org.hibernate.dialect.MySQL5Dialect


org.hibernate.cache.OSCacheProvider


2
300
100

after_statement

5

select 1


true

update

true




  

com.test.server.model.Test
com.test.server.model.Test2




com.test.server




My question is, the appContext.xml should be put in the classpath or
/WEB-INF/config ?is there is difference between the two? Any idea.
Thanks a lot.
Cheers
  


--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: annotated class

2008-02-14 Thread Ned Collyer

What I've done is as follows

In WEB-INF/web.xml i have the following  listeners and params.


contextConfigLocation
${myConfigDir}/applicationContext.xml


Configures Log4J for this web app.
   
org.springframework.web.util.Log4jConfigListener


Configures spring with this web app.
   
org.springframework.web.context.ContextLoaderListener


This means that via a property I can tell the app to keep the
applicationContext.xml anywhere. (eg,
JETTY_OPTS="-DmyConfigDir=file:/someDirectory")

If you use this it should ... hopefully work for you.  I cant remember the
setup in too much detail, but it works :)


freak182 wrote:
> 
> My question is, the appContext.xml should be put in the classpath or
> /WEB-INF/config ?is there is difference between the two? Any idea.
> Thanks a lot.
> Cheers
> 

-- 
View this message in context: 
http://www.nabble.com/annotated-class-tp15476390p15476513.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: annotated class

2008-02-14 Thread C S

Here's another example of what to put in WEB-INF/web.xml


contextConfigLocation

classpath:applicationContext.xml
classpath:applicationContext-acegi-security.xml



Then put your appContext.xml in the classpath obviously.  I usually put mine
in the root source folder with no problems.



Ned Collyer wrote:
> 
> What I've done is as follows
> 
> In WEB-INF/web.xml i have the following  listeners and params.
> 
> 
> contextConfigLocation
> ${myConfigDir}/applicationContext.xml
> 
> 
> Configures Log4J for this web app.
>
> org.springframework.web.util.Log4jConfigListener
> 
> 
> Configures spring with this web app.
>
> org.springframework.web.context.ContextLoaderListener
> 
> 
> This means that via a property I can tell the app to keep the
> applicationContext.xml anywhere. (eg,
> JETTY_OPTS="-DmyConfigDir=file:/someDirectory")
> 
> If you use this it should ... hopefully work for you.  I cant remember the
> setup in too much detail, but it works :)
> 
> * Please note, this is to do with spring and the context file location,
> nothing to do with hibernate mappings not finding classes - so sorry if it
> doesn't cover that :)
> 
> 
> freak182 wrote:
>> 
>> My question is, the appContext.xml should be put in the classpath or
>> /WEB-INF/config ?is there is difference between the two? Any idea.
>> Thanks a lot.
>> Cheers
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/annotated-class-tp15476390p15480763.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: annotated class

2008-02-14 Thread Igor Vaynberg
isnt this a question for the spring list?

-igor


On Thu, Feb 14, 2008 at 1:04 AM, freak182 <[EMAIL PROTECTED]> wrote:
>
>  Hello,
>  Im developing an app using hibernate annotations.My problem is when i
>  configure my appContext.xml the annotated class cannot be found. here is the
>  code snippet of appContext.xml found in WEB-INF/config.
>
>  
> 
>  
> class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"
> id="sessionFactory">
> 
> 
> 
> 
> org.hibernate.dialect.MySQL5Dialect
> 
> 
> org.hibernate.cache.OSCacheProvider
> 
> 
>  key="hibernate.c3p0.acquire_increment">2
>  key="hibernate.c3p0.idle_test_period">300
> 100
> 
> after_statement
> 
> 5
> 
> select 1
> 
>  key="hibernate.c3p0.testConnectionOnCheckout">
> true
> 
>  key="hibernate.hbm2ddl.auto">update
>  
> key="hibernate.bytecode.use_reflection_optimizer">
> true
> 
> 
> 
> 
> 
> 
> com.test.server.model.Test
> com.test.server.model.Test2
> 
> 
> 
> 
> com.test.server
> 
>     
> 
>
>  My question is, the appContext.xml should be put in the classpath or
>  /WEB-INF/config ?is there is difference between the two? Any idea.
>  Thanks a lot.
>  Cheers
>  --
>  View this message in context: 
> http://www.nabble.com/annotated-class-tp15476390p15476390.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: annotated class

2008-02-18 Thread freak182

Hello,
Thank you guys for the reply...I finally got to work...i have same
configuration but there is one jar file not imported by the maven
tool...that might be the problem bcoz when i removed it, it run
smoothly..Thanks a lot..anyway, i have a copy of Wicket in Action MEAP to
guide me :)

Cheers...


Nino.Martinez wrote:
> 
> Do you use maven to build with?
> 
> com.test.server.model.Test
> com.test.server.model.Test2
> 
> 
> 
> freak182 wrote:
>> Hello,
>> Im developing an app using hibernate annotations.My problem is when i
>> configure my appContext.xml the annotated class cannot be found. here is
>> the
>> code snippet of appContext.xml found in WEB-INF/config.
>>
>> 
>>  >  
>> class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"
>>  id="sessionFactory">
>>  
>>  
>>  
>>  
>>  org.hibernate.dialect.MySQL5Dialect
>>  
>>  
>>  org.hibernate.cache.OSCacheProvider
>>  
>>  
>>  > key="hibernate.c3p0.acquire_increment">2
>>  > key="hibernate.c3p0.idle_test_period">300
>>  100
>>  
>>  after_statement
>>  
>>  5
>>  
>>  select 1
>>  
>>  > key="hibernate.c3p0.testConnectionOnCheckout">
>>  true
>>  
>>  update
>>  >  
>> key="hibernate.bytecode.use_reflection_optimizer">
>>  true
>>  
>>  
>>  
>>  
>>
>>  
>>  com.test.server.model.Test
>>  com.test.server.model.Test2
>>  
>>  
>>  
>>  
>>  com.test.server
>>  
>>  
>>  
>>
>> My question is, the appContext.xml should be put in the classpath or
>> /WEB-INF/config ?is there is difference between the two? Any idea.
>> Thanks a lot.
>> Cheers
>>   
> 
> -- 
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/annotated-class-tp15476390p15542017.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]