-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Error with Generic DAO Sample App (Weblogic 10)
PostPosted: Mon May 07, 2007 12:21 pm 
Newbie

Joined: Mon May 07, 2007 12:09 pm
Posts: 2
I have been trying to use the generic dao pattern (DAOs as managed EJB 3.0 components) as described at http://www.hibernate.org/328.html however I get the following error when I deploy the sample on Weblogic 10.

Code:
C:\bea\user_projects\domains\Blumo\servers\AdminServer\cache\EJBCompilerCache\-1
6xu6ho5qzhq\auction\dao\ejb3\UserDAOBean_oqan4_UserDAOImpl.java:193: modifier tr
ansient not allowed here
  public transient java.util.List<auction.model.User> findByExample(auction.mode
l.User arg0, java.lang.String[] arg1)


**Note: This same error is repeated for each DAO.

Any thoughts on how to resolve this issue so I can use the generic dao? I took the sample AS-IS with no modifications to the code (I did update the persistance.xml to match our environment). We prefer to use managed EJB3
0 components and use assertions for configuration where possible so the persistence.xml is the only config file. No spring config, no ejb config, etc; is this part of the issue?

Thanks for any help or suggestions.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 07, 2007 12:34 pm 
Newbie

Joined: Mon May 07, 2007 12:09 pm
Posts: 2
Additionally, if I comment out the finByExample() method the app deploys without any errors. I then wrote a facade to expose the UserDAO and a JSP to to list all users but get the following error:

Code:
javax.ejb.EJBTransactionRolledbackException: EJB Exception: ; nested exception is: java.lang.ClassCastException: java.lang.Class
   at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:791)
   at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:261)
   at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:183)
   at weblogic.ejb.container.internal.StatelessLocalObject.preInvoke(StatelessLocalObject.java:52)
   at auction.dao.ejb3.UserDAOBean_oqan4_UserDAOImpl.findAll(UserDAOBean_oqan4_UserDAOImpl.java:281)
   at auction.controller.UserFacade.findAll(UserFacade.java:49)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
   at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
   at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
   at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:126)
   at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:114)
   at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at weblogic.ejb.container.injection.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:68)
   at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
   at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:126)
   at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:114)
   at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   at $Proxy121.findAll(Unknown Source)
   at auction.controller.UserFacade_kj7o8m_UserFacadeLocalImpl.findAll(UserFacade_kj7o8m_UserFacadeLocalImpl.java:387)
   at com.blumo.campaign.servlet.ListUsers.processRequest(ListUsers.java:44)
   at com.blumo.campaign.servlet.ListUsers.doGet(ListUsers.java:63)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
   at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
   at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
   at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
   at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3370)
   at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
   at weblogic.security.service.SecurityManager.runAs(Unknown Source)
   at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2117)
   at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2023)
   at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
   at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
   at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)


If I do not use the generic dao pattern and just write session beans for the CRUD functions everything work fine so I am confident that Hibernate is working as designed. I have not used Spring before and see references to it in the stack so I am wondering if the lack of a Spring config is part of the issue.

Again, thanks for any help.


Top
 Profile  
 
 Post subject: help
PostPosted: Mon Mar 09, 2009 1:27 am 
Beginner
Beginner

Joined: Fri Feb 20, 2009 2:19 am
Posts: 33
go through it once

[url]
http://forum.springframework.org/showth ... post230452[/url]

i want to create a saperate jar project of DAO and need to inject it in Spring 's project as a dependency and need to call CRUD methods from Spring bean ....

go through it once
[url]
http://forum.springframework.org/showth ... post230452[/url]


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.