Re: Wicket 1.4.5 : Spring integration problem?

2010-02-03 Thread vlk67

I have to say, that 'Application Object Approach' is working OK. But I have
tried to use "Annotation-based Approach" and it's working not so well.
Sometime I have got exception:

ERROR [http-8000-2] - Could not deserialize object using
`org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
java.lang.RuntimeException: Could not deserialize object using
`org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
at 
org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:431)
at
org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:234)
at
org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:735)
at
org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:310)
at org.apache.wicket.Session.getPage(Session.java:779)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:458)
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.InvalidClassException: com.bs.service.ILogRecordService;
could not resolve class [com.bs.service.ILogRecordService] when
deserializing proxy
at
org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeReadResolve(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at 
org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:409)

there is my web.xml:

wicketApplication

org.apache.wicket.protocol.http.WicketFilter

applicationClassName
com.bs.web.wicket.WebApp


applicationFactoryClassName
   
org.apache.wicket.spring.SpringWebApplicationFactory


applicationBean
wicketApplication




and there is my applicationContext.xml:









  
  



   
PROPAGATION_REQUIRED,-com.bs.common.RollingTransactionException


   
PROPAGATION_REQUIRED,-com.bs.common.RollingTransactionException

PROPAGATION_REQUIRED,readOnly



























Re: Wicket 1.4.5 : Spring integration problem?

2010-01-20 Thread Pierre Goupil
+1 with Alex. I'm glad to help you, though :-)


On Wed, Jan 20, 2010 at 9:55 AM, Alex Objelean wrote:

>
> You could try the wicket-spring library. It allows a very nice integration
> using a SpringBean annotation, similar to Autowired from spring.
>
> Alex
>
>
> Umanga wrote:
> >
> > Thanks Pierre,
> >
> > yes,that was a problem with web.xml ,
> >
> > I forgot to change the filter setting :
> >
> > 
> > applicationFactoryClassName
> >
> >
> org.apache.wicket.spring.SpringWebApplicationFactory
> > 
> >
> > Now everything works fine.
> >
> > Pierre Goupil wrote:
> >> Maybe it comes from the web.xml : can we ses it, please?
> >>
> >> Regards,
> >>
> >> Pierre
> >>
> >>
> >> On Wed, Jan 20, 2010 at 7:41 AM, Ashika Umanga Umagiliya <
> >> auma...@biggjapan.com> wrote:
> >>
> >>
> >>> Greetings all,
> >>>
> >>> I followed the easy 'Application Object Approach' to integrate Spring
> >>> with
> >>> my Wicket app. (
> >>>
> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
> )
> >>>
> >>> In my application class :
> >>>
> >>> public class NihonBareApplication extends WebApplication
> >>> { private CommonService commonService;
> >>>   public CommonService getCommonService() {
> >>>   return commonService;
> >>>   }
> >>>   public void setCommonService(CommonService cs) {
> >>> this.commonService = cs; }
> >>> }
> >>>
> >>>
> >>> And in my pages :
> >>>
> >>> public class FamiliesPage extends WebPage {
> >>>  public CommonService getCommonService(){
> >>>   System.out.println(">>>"+
> >>> ((NihonBareApplication)getApplication()).getCommonService());
> >>>   return
> >>> ((NihonBareApplication)getApplication()).getCommonService();
> >>>   }
> >>> }
> >>>
> >>>
> >>> But eventhough the bean injected into 'NihonbareApplication' object,
> the
> >>> getCommonService() method of my page returns null for the bean.
> >>>
> >>> What could be the problem?
> >>>
> >>> Thanks in advance.
> >>>
> >>> -
> >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >>> For additional commands, e-mail: users-h...@wicket.apache.org
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Wicket-1.4.5-%3A-Spring-integration-problem--tp27237445p27238481.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Ad augusta per angusta

Des résultats grandioses par des voies étroites


Re: Wicket 1.4.5 : Spring integration problem?

2010-01-20 Thread Alex Objelean

You could try the wicket-spring library. It allows a very nice integration
using a SpringBean annotation, similar to Autowired from spring.

Alex


Umanga wrote:
> 
> Thanks Pierre,
> 
> yes,that was a problem with web.xml ,
> 
> I forgot to change the filter setting :
> 
> 
> applicationFactoryClassName
> 
> org.apache.wicket.spring.SpringWebApplicationFactory
> 
> 
> Now everything works fine.
> 
> Pierre Goupil wrote:
>> Maybe it comes from the web.xml : can we ses it, please?
>>
>> Regards,
>>
>> Pierre
>>
>>
>> On Wed, Jan 20, 2010 at 7:41 AM, Ashika Umanga Umagiliya <
>> auma...@biggjapan.com> wrote:
>>
>>   
>>> Greetings all,
>>>
>>> I followed the easy 'Application Object Approach' to integrate Spring
>>> with
>>> my Wicket app. (
>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach)
>>>
>>> In my application class :
>>>
>>> public class NihonBareApplication extends WebApplication
>>> { private CommonService commonService;
>>>   public CommonService getCommonService() {
>>>   return commonService;
>>>   }
>>>   public void setCommonService(CommonService cs) {
>>> this.commonService = cs; }
>>> }
>>>
>>>
>>> And in my pages :
>>>
>>> public class FamiliesPage extends WebPage {
>>>  public CommonService getCommonService(){
>>>   System.out.println(">>>"+
>>> ((NihonBareApplication)getApplication()).getCommonService());
>>>   return
>>> ((NihonBareApplication)getApplication()).getCommonService();
>>>   }
>>> }
>>>
>>>
>>> But eventhough the bean injected into 'NihonbareApplication' object, the
>>> getCommonService() method of my page returns null for the bean.
>>>
>>> What could be the problem?
>>>
>>> Thanks in advance.
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>> 
>>
>>
>>   
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Wicket-1.4.5-%3A-Spring-integration-problem--tp27237445p27238481.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket 1.4.5 : Spring integration problem?

2010-01-19 Thread Ashika Umanga Umagiliya

Thanks Pierre,

yes,that was a problem with web.xml ,

I forgot to change the filter setting :


   applicationFactoryClassName
   
org.apache.wicket.spring.SpringWebApplicationFactory

   

Now everything works fine.

Pierre Goupil wrote:

Maybe it comes from the web.xml : can we ses it, please?

Regards,

Pierre


On Wed, Jan 20, 2010 at 7:41 AM, Ashika Umanga Umagiliya <
auma...@biggjapan.com> wrote:

  

Greetings all,

I followed the easy 'Application Object Approach' to integrate Spring with
my Wicket app. (
http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach)

In my application class :

public class NihonBareApplication extends WebApplication
{ private CommonService commonService;
  public CommonService getCommonService() {
  return commonService;
  }
  public void setCommonService(CommonService cs) {
this.commonService = cs; }
}


And in my pages :

public class FamiliesPage extends WebPage {
 public CommonService getCommonService(){
  System.out.println(">>>"+
((NihonBareApplication)getApplication()).getCommonService());
  return ((NihonBareApplication)getApplication()).getCommonService();
  }
}


But eventhough the bean injected into 'NihonbareApplication' object, the
getCommonService() method of my page returns null for the bean.

What could be the problem?

Thanks in advance.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org






  




Re: Wicket 1.4.5 : Spring integration problem?

2010-01-19 Thread Pierre Goupil
Maybe it comes from the web.xml : can we ses it, please?

Regards,

Pierre


On Wed, Jan 20, 2010 at 7:41 AM, Ashika Umanga Umagiliya <
auma...@biggjapan.com> wrote:

> Greetings all,
>
> I followed the easy 'Application Object Approach' to integrate Spring with
> my Wicket app. (
> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach)
>
> In my application class :
>
> public class NihonBareApplication extends WebApplication
> { private CommonService commonService;
>   public CommonService getCommonService() {
>   return commonService;
>   }
>   public void setCommonService(CommonService cs) {
> this.commonService = cs; }
> }
>
>
> And in my pages :
>
> public class FamiliesPage extends WebPage {
>  public CommonService getCommonService(){
>   System.out.println(">>>"+
> ((NihonBareApplication)getApplication()).getCommonService());
>   return ((NihonBareApplication)getApplication()).getCommonService();
>   }
> }
>
>
> But eventhough the bean injected into 'NihonbareApplication' object, the
> getCommonService() method of my page returns null for the bean.
>
> What could be the problem?
>
> Thanks in advance.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Ad augusta per angusta

Des résultats grandioses par des voies étroites


Wicket 1.4.5 : Spring integration problem?

2010-01-19 Thread Ashika Umanga Umagiliya

Greetings all,

I followed the easy 'Application Object Approach' to integrate Spring 
with my Wicket app. 
(http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach 
)


In my application class :

public class NihonBareApplication extends WebApplication
{   
   private CommonService commonService;

   public CommonService getCommonService() {
   return commonService;
   }
   public void setCommonService(CommonService cs) { 
   this.commonService = cs;  
   }

}


And in my pages :

public class FamiliesPage extends WebPage {
 public CommonService getCommonService(){
   System.out.println(">>>"+ 
((NihonBareApplication)getApplication()).getCommonService());

   return ((NihonBareApplication)getApplication()).getCommonService();
   }
}


But eventhough the bean injected into 'NihonbareApplication' object, the 
getCommonService() method of my page returns null for the bean.


What could be the problem?

Thanks in advance.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org