Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Weblogic 10.3 and eclipselink

Hi,
    WebLogic may cache EJB session beans in certain situations, If you are using injection of the persistence unit the PU may be cached along with this bean, as issue with caching was fixed on the server in the 11gR1 release in July 2009 - if you are using the following PU injection on a session bean.

@PersistenceContext(unitName="example", type=PersistenceContextType.TRANSACTION)

    Try undeploying and redeploying and/or bouncing your server to clear the cache, the cache may behave differently depending on how you deploy..

See also...
http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial#Troubleshooting_2
"3) If you have changed your entity schema between deployments and you find some weird behavior where you are seeing both your new entities and the old entities (without the schema changes) - this is most likely due to a cached entity on the server that has not been updated for some reason - usually when you combine both manual deployment to the autodeploy directory and "run-on-server" from the Eclipse IDE.
  • The workaround is to clear non-session entities from the cache under
  • user_projects\domains\base_domain\servers\AdminServer\cache\EJBCompilerCache"
If you are using session bean PU deployment, you may see something similar to the following for  WebLogic 10.3.0 (However this was fixed in WebLogic in Dec 2008 - which would align with 10.3.1 released in July 2009 as part of 11gR1)
C:\opt\wls103far8a\user_projects\domains\base_domain\servers\AdminServer\cache\EJBCompilerCache\bi5iz0rnwaep\org\eclipse\persistence\example\jpa\server\business>dir /B ApplicationService.class ApplicationService2_dt84dc_ApplicationServiceLocal2Impl.class
ApplicationService2_dt84dc_ApplicationServiceLocal2Impl.java
ApplicationService2_dt84dc_Impl.class
ApplicationService2_dt84dc_Impl.java
ApplicationService2_dt84dc_Intf.class
ApplicationService2_dt84dc_Intf.java
ApplicationServiceLocal.class
ApplicationService_5ptwty_ApplicationServiceLocalImpl.class
ApplicationService_5ptwty_ApplicationServiceLocalImpl.java
ApplicationService_5ptwty_Impl.class
ApplicationService_5ptwty_Impl.java
ApplicationService_5ptwty_Intf.class
ApplicationService_5ptwty_Intf.java
Cell.class

Can you also...
    - rename your jta datasource in you persistence.xml and verify that the change is picked up on the redeployment (ie you get a different name not found)
    - post your persistence.xml (version with original JTA setup)
    - post your persistence.xml (version with RESOURCE_LOCAL setup - that is not working)
    - state how you are using the PU (Servlet injection, EJB injection or static factory)
    - search your server's file system for cached versions of your persistence.xml
    - verify in your admin console that there is no persistence unit under the application entry in the deployment explorer on the domain

    thank you
    /michael

kusanagihk wrote:
thx to your replies

yes, I am running in weblogic so the default transaction-type MUST be JTA
and the datasource is setuped on weblogic admin console and it is globally
defined (ie. can be accessed through jndi) <-- I proved it worked earlier
using a jsp

so the problem lies somewhere in the configuration (I guess); and once
again, I need to remind a funny point --> I already removed the persistence
unit --> jtaDS (however the exception still tells me I have defined this
jtaDS which is the funny thing)

also I tried to remove the persistence.xml file and deploy again --> same
exception was caught (jtaDS not defined etc etc) this doesn't make sense...
since there is no persistence.xml... already... how come eclipselink tries
to setup the non-existing things????

So I wonder if this is a bug or something on either eclipselink or weblogic
But I hope it is config problems only

thx and nice day folks
  


Back to the top