facebook

No ClassLoaders found for: net.sf.ehcache.hibernate.Provider

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #231548 Reply

    johnjoreilly
    Member

    I am using jboss 3.2.6 tomcat 5.0 (I have no choice in these) Eclipse 3.0.2, myeclipse 3.8.4+QF2.

    I am trying to write a “simple” hibernate+ejb+struts application.

    My enterprise application project has a web project and an ejb project with hibernate capabilities.

    I can test the hibernate layer as in the hibernate quickstart example – it works fine.

    Using an xdoclet-based session bean, I replaced the business method with a method that looks just like the successful test.

    I then call that method from my struts action.

    Below is part of the resulting stack trace. Any suggestions are welcome.

    12:02:59,373 INFO [Server] JBoss (MX MicroKernel) [3.2.6 (build: CVSTag=JBoss_3_2_6 date=200410140106)] Started in 2m:8s:886ms
    12:03:54,833 INFO [Engine] StandardContext[/fooWeb]action: Looking up name com/mycompany/foo/ejb/FooHome
    12:03:55,004 INFO [Environment] Hibernate 2.1.5
    12:03:55,020 INFO [Environment] hibernate.properties not found
    12:03:55,036 INFO [Environment] using CGLIB reflection optimizer
    12:03:55,051 INFO [Configuration] configuring from resource: /hibernate.cfg.xml
    12:03:55,051 INFO [Configuration] Configuration resource: /hibernate.cfg.xml
    12:03:55,114 INFO [Configuration] Mapping resource: com/mycompany/foo/Worktypet.hbm.xml
    12:03:55,332 INFO [Binder] Mapping class: com.mycompany.foo.Worktypet -> WORKTYPET
    12:03:55,551 INFO [Configuration] Configured SessionFactory: null
    12:03:55,551 INFO [Configuration] processing one-to-many association mappings
    12:03:55,551 INFO [Configuration] processing one-to-one association property references
    12:03:55,551 INFO [Configuration] processing foreign key constraints
    12:03:55,629 INFO [Dialect] Using dialect: net.sf.hibernate.dialect.Oracle9Dialect
    12:03:55,629 INFO [SettingsFactory] Use outer join fetching: true
    12:03:55,629 INFO [DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!)
    12:03:55,645 INFO [DriverManagerConnectionProvider] Hibernate connection pool size: 20
    12:03:55,645 INFO [DriverManagerConnectionProvider] using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@morlap09.mycompany.local:1521:xxx
    12:03:55,645 INFO [DriverManagerConnectionProvider] connection properties: {user=xxx, password=xxxxx}
    12:03:55,660 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
    12:07:33,099 INFO [SettingsFactory] Use scrollable result sets: true
    12:07:33,099 INFO [SettingsFactory] Use JDBC3 getGeneratedKeys(): false
    12:07:33,099 INFO [SettingsFactory] Optimize cache for minimal puts: false
    12:07:33,099 INFO [SettingsFactory] Query language substitutions: {}
    12:07:33,099 INFO [SettingsFactory] cache provider: net.sf.ehcache.hibernate.Provider
    12:07:33,114 INFO [STDOUT] %%%% Error Creating SessionFactory %%%%
    12:07:33,130 INFO [STDOUT] net.sf.hibernate.HibernateException: could not instantiate CacheProvider: net.sf.ehcache.hibernate.Provider
    at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:134)
    at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1132)
    at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:766)
    at com.mycompany.foo.HibernateSessionFactory.currentSession(HibernateSessionFactory.java:49)
    at com.mycompany.foo.ejb.FooBean.listWorktypes(FooBean.java:104)
    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:324)
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
    at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
    at org.jboss.ejb.Container.invoke(Container.java:709)
    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:324)
    at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
    at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)
    at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
    at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
    at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
    at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:100)
    at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
    at $Proxy434.listWorktypes(Unknown Source)
    at com.mycompany.struts.action.ListWorktypesAction.execute(ListWorktypesAction.java:89)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:480)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:502)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:72)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:275)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: net.sf.ehcache.hibernate.Provider

    #231562 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev, this is a hibernate issue.

    You might try searching for the exception in the hibernate forums, you may have a better chance of finding someone in a similar boat.

    #231569 Reply

    johnjoreilly
    Member

    OK, I solved the problem by manually copying ehcache-0.9.jar from my workspace to jboss-3.2.6\server\myserver\lib. It seems like that should have been done during MyEclipse deployment – in which case it WOULD be a MyEclipse issue, and not a Hibernate issue, or am I missing something?

    #231580 Reply

    Scott Anderson
    Participant

    Actually, for enabling core capabilities of the *server* itself, you need to do as you did. It looks like you’re installing a new caching manager and that is a server-specific configuration, not an application-specific configuration. For adding additional jars / capabilities to your *application*, you can use Window > Preferences > MyEclipse > JBoss 3 > Paths > Append to classpath.

    Hope that clears it up a bit.

    #231587 Reply

    johnjoreilly
    Member

    So, all those jars cluttering up the package explorer do not get deployed along with the rest of the project? That seems odd to me.

    #231588 Reply

    Scott Anderson
    Participant

    Yes, they do get deployed if they’re in WEB-INF/lib or you’ve turned on portions of our extended deployment support as detailed in the Advanced section of the Web Development Quickstart here: http://myeclipseide.com/enterpriseworkbench/help/topic/com.genuitec.myeclipse.doc/html/quickstarts/webprojects/index.html#dependent_projects

    #231618 Reply

    johnjoreilly
    Member

    But, what if, as in this case, the jar is not part of a web project, but part of an ejb w/hibernate project called ‘foo’, and resides in C:\eclipse\workspace\foo\lib and appears directly under foo in the package explorer?

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: No ClassLoaders found for: net.sf.ehcache.hibernate.Provider

You must be logged in to post in the forum log in