9 Replies Latest reply on Nov 10, 2009 10:33 AM by Dustin S.

    Hibernate OSGi ClassNotFoundException

    Dustin S. Newbie

      Hi All,

       

      I am trying to get a project which depends on Hibernate to start on the bus. I have installed the various dependencies and Hibernate is listed as Active

       

      113 Installed     60 JBoss Hibernate Annotations (3.4.0.GA)

      114 Active        60 JBoss Hibernate Object-Relational Mapper (3.3.1.GA)

      116 Active        60 JGroups Toolkit (2.2.8)

      117 Active        60 Concurrent (1.3.4)

      118 Active        60 Javassist Java Programming Assistant (3.3.0.ga)

      119 Active        60 dom4j DOM Processor (1.6.1)

      120 Active        60 ANTLR (2.7.7)

       

      However, when trying to start the project which depends on Hibernate I get the exception below:

       

      The OSGi Hibernate bundles were downloaded from SpringSource Repo and do include the following class and do export the package that it is in.

       

      Any ideas?

       

      java.lang.NoClassDefFoundError: org/hibernate/ObjectNotFoundException

      at java.lang.Class.getDeclaredConstructors0(Native Method)

      at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)

      at java.lang.Class.getDeclaredConstructors(Class.java:1836)

      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:191)

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:859)

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:831)

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

      at java.security.AccessController.doPrivileged(Native Method)

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)

      at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:68)

      at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:343)

      at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)

      at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:308)

      at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:138)

      at java.lang.Thread.run(Thread.java:619)

      Caused by: java.lang.ClassNotFoundException: org.hibernate.ObjectNotFoundException

      at org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:558)

      at org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleImpl.java:59)

      at org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1427)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

        • 1. Re: Hibernate OSGi ClassNotFoundException
          Dave Stanley Novice

          Hi Dustin,

          Can you verify the hibernate packages are exported correctly

           

          >packages/exports 114

           

          If so, then you may just need to just add an import statement for the org.hibernate.* packages to your bundle.

           

          You can verify the imports by running:

          >packages/imports

           

           

          Regards

          /Dave

          • 2. Re: Hibernate OSGi ClassNotFoundException
            Dustin S. Newbie

            Hi Dave,

             

            That resolved my previous error, thank you.

             

            I'm running into another one though. When I try to start the bundle which depends on hibernate I get the following. I'm assuming this means it can't find the host bundle:

             

            Unresolved constraint in bundle 113: host; (bundle-symbolic-name=com.springsource.org.hibernate)

             

            JBoss Hibernate Annotations (3.4.0.GA)

             

            (It's a fragment bundle so its not Active)

             

            However the unresolved constraint doesn't make sense because I have

             

            JBoss Hibernate Object-Relational Mapper (3.3.1.GA)

             

            which defines as its symbolic-name

             

            Bundle-SymbolicName = com.springsource.org.hibernate

             

            I'm using FUSE 4.1.0.2.

             

            Any ideas?

            • 3. Re: Hibernate OSGi ClassNotFoundException
              Dustin S. Newbie

              So it looks like the support for fragment bundles may not be very good. I see there are various bugs about it but none of them have resolutions.

               

              I tried creating a Hibernate Uber jar to avoid the fragments which I was able to do, however, the ESB still gives me strange NoClassDefFoundError errors.

               

              The bundle I want to start says that it imports Spring ORM

               

              smx@root:/> packages/imports 121

              ...

              ...

              Spring ORM (135): org.springframework.orm; version=2.5.6

              Spring ORM (135): org.springframework.orm.hibernate3; version=2.5.6

              Spring ORM (135): org.springframework.orm.hibernate3.annotation; version=2.5.6

              Spring ORM (135): org.springframework.orm.hibernate3.support; version=2.5.6

              Spring ORM (135): org.springframework.orm.ibatis; version=2.5.6

              Spring ORM (135): org.springframework.orm.ibatis.support; version=2.5.6

              Spring ORM (135): org.springframework.orm.jdo; version=2.5.6

              Spring ORM (135): org.springframework.orm.jdo.support; version=2.5.6

              Spring ORM (135): org.springframework.orm.jpa; version=2.5.6

              Spring ORM (135): org.springframework.orm.jpa.persistenceunit; version=2.5.6

              Spring ORM (135): org.springframework.orm.jpa.support; version=2.5.6

              Spring ORM (135): org.springframework.orm.jpa.vendor; version=2.5.6

              Spring ORM (135): org.springframework.orm.toplink; version=2.5.6

              Spring ORM (135): org.springframework.orm.toplink.support; version=2.5.6

               

              and bundle 135 exports those packages:

               

              smx@root:/> packages/exports 135

              Spring ORM (135): org.springframework.orm; version=2.5.6

              Spring ORM (135): org.springframework.orm.hibernate3; version=2.5.6

              Spring ORM (135): org.springframework.orm.hibernate3.annotation; version=2.5.6

              Spring ORM (135): org.springframework.orm.hibernate3.support; version=2.5.6

              Spring ORM (135): org.springframework.orm.ibatis; version=2.5.6

              Spring ORM (135): org.springframework.orm.ibatis.support; version=2.5.6

              Spring ORM (135): org.springframework.orm.jdo; version=2.5.6

              Spring ORM (135): org.springframework.orm.jdo.support; version=2.5.6

              Spring ORM (135): org.springframework.orm.jpa; version=2.5.6

              Spring ORM (135): org.springframework.orm.jpa.persistenceunit; version=2.5.6

              Spring ORM (135): org.springframework.orm.jpa.support; version=2.5.6

              Spring ORM (135): org.springframework.orm.jpa.vendor; version=2.5.6

              Spring ORM (135): org.springframework.orm.toplink; version=2.5.6

              Spring ORM (135): org.springframework.orm.toplink.support; version=2.5.6

               

              However, when I go to start 121, it gives me

               

              Caused by: java.lang.NoClassDefFoundError:  not found from bundle

                   at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:112)

                   at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)

                   at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

                   at org.springframework.util.ClassUtils.forName(ClassUtils.java:211)

                   at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385)

                   at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)

                   ... 11 more

              Caused by: java.lang.NoClassDefFoundError: org/springframework/orm/hibernate3/support/HibernateDaoSupport

                   at java.lang.ClassLoader.defineClass1(Native Method)

                   at java.lang.ClassLoader.defineClass(ClassLoader.java:621)

                   at org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1537)

                   at org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:502)

                   at org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleImpl.java:59)

                   at org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1427)

                   at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

                   at org.apache.felix.framework.searchpolicy.ModuleImpl.getClassByDelegation(ModuleImpl.java:421)

                   at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1354)

                   at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:746)

                   at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)

                   ... 16 more

               

               

              I don't understand why it can't find the class?

              • 4. Re: Hibernate OSGi ClassNotFoundException
                Dustin S. Newbie

                To answer my own question, figured out how to get the class found although I'm not so sure it's not a bug.

                 

                In <Import-Package> I have org.springframework.orm.* so I figured this should include everything from Spring ORM

                 

                I ended up having to explicitly add org.springframework.orm.hibernate3.support to the imports.

                • 5. Re: Hibernate OSGi ClassNotFoundException
                  Dustin S. Newbie

                  Does anyone know if FUSE (Apache Felix OSGi) supports Spring-DM context-class-loader attributes?

                   

                  i.e.

                   

                  <osgi:service ref="simpleDataService" interface="..." context-class-loader="service-provider" />

                   

                  <osgi:reference interface="..." context-class-loader="service-provider"/>

                   

                  These would essentially be required to get Hibernate to work but I am not having much luck -- adding these seems to have no affect.

                  • 6. Re: Hibernate OSGi ClassNotFoundException
                    Oisin Hurley Novice

                     

                    In <Import-Package> I have org.springframework.orm.* so I figured this should include everything from Spring ORM

                     

                     

                    IIRC, the Import-Package directive won't work with *-style globbing, you need to expressly mention each package and the 'sub-packages' to make sure that the import works. (I am assuming <Import-Package> translates direct to Import-Package in the manifest.)

                    • 7. Re: Hibernate OSGi ClassNotFoundException
                      Dustin S. Newbie

                      In general, does anyone know if the FUSE ESB (Apache Felix OSGi) has support for issues related to Thread Context Class Loader?

                       

                      I know Equinox has solved this with setting the TCCL to a "ContextFinder" -- http://wiki.eclipse.org/index.php/Context_Class_Loader_Enhancements

                       

                      And Spring DM has solved it with the context-class-loader attribute.

                       

                      Does FUSE/Felix have anything that is equivalent?

                      • 8. Re: Hibernate OSGi ClassNotFoundException
                        Dustin S. Newbie

                        For those interested in using Hibernate with Felix, I had to create a Hibernate Uber Jar and fix one of their classes. Solution below:

                         

                        org.hibernate.jdbc.BorrowedConnectionProxy.java

                        /*
                         * Hibernate, Relational Persistence for Idiomatic Java
                         *
                         * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
                         * indicated by the @author tags or express copyright attribution
                         * statements applied by the authors.  All third-party contributions are
                         * distributed under license by Red Hat Middleware LLC.
                         *
                         * This copyrighted material is made available to anyone wishing to use, modify,
                         * copy, or redistribute it subject to the terms and conditions of the GNU
                         * Lesser General Public License, as published by the Free Software Foundation.
                         *
                         * This program is distributed in the hope that it will be useful,
                         * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
                         * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
                         * for more details.
                         *
                         * You should have received a copy of the GNU Lesser General Public License
                         * along with this distribution; if not, write to:
                         * Free Software Foundation, Inc.
                         * 51 Franklin Street, Fifth Floor
                         * Boston, MA  02110-1301  USA
                         *
                         */
                        package org.hibernate.jdbc;
                        
                        import org.hibernate.HibernateException;
                        
                        import java.lang.reflect.InvocationHandler;
                        import java.lang.reflect.Method;
                        import java.lang.reflect.Proxy;
                        import java.lang.reflect.InvocationTargetException;
                        import java.sql.Connection;
                        
                        /**
                         * A proxy for <i>borrowed</i> connections which funnels all requests back into the
                         * ConnectionManager from which it was borrowed to be properly handled (in terms of
                         * connection release modes).
                         * <p></p>
                         * Note: the term borrowed here refers to connection references obtained via
                         * {@link org.hibernate.Session#connection()} for application usage.
                         * 
                         * @author Steve Ebersole
                         */
                        public class BorrowedConnectionProxy implements InvocationHandler
                        {
                        
                             @SuppressWarnings("unchecked")
                             private static final Class[] PROXY_INTERFACES = new Class[]
                             { Connection.class, ConnectionWrapper.class };
                        
                             private final ConnectionManager connectionManager;
                             private boolean useable = true;
                        
                             public BorrowedConnectionProxy(ConnectionManager connectionManager)
                             {
                                  this.connectionManager = connectionManager;
                             }
                        
                             /**
                              * {@inheritDoc}
                              */
                             public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
                             {
                                  if ("close".equals(method.getName()))
                                  {
                                       connectionManager.releaseBorrowedConnection();
                                       return null;
                                  }
                                  // should probably no-op commit/rollback here, at least in JTA scenarios
                                  if (!useable)
                                  {
                                       throw new HibernateException(
                                                 "connnection proxy not usable after transaction completion");
                                  }
                        
                                  if ("getWrappedConnection".equals(method.getName()))
                                  {
                                       return connectionManager.getConnection();
                                  }
                        
                                  try
                                  {
                                       return method.invoke(connectionManager.getConnection(), args);
                                  }
                                  catch (InvocationTargetException e)
                                  {
                                       throw e.getTargetException();
                                  }
                             }
                        
                             /**
                              * Generates a Connection proxy wrapping the connection managed by the passed
                              * connection manager.
                              * 
                              * @param connectionManager
                              *            The connection manager to wrap with the connection proxy.
                              * @return The generated proxy.
                              */
                             public static Connection generateProxy(ConnectionManager connectionManager)
                             {
                                  BorrowedConnectionProxy handler = new BorrowedConnectionProxy(connectionManager);
                                  return (Connection) Proxy.newProxyInstance(getProxyClassLoader(),
                                            PROXY_INTERFACES, handler);
                             }
                        
                             /**
                              * Marks a borrowed connection as no longer usable.
                              * 
                              * @param connection
                              *            The connection (proxy) to be marked.
                              */
                             public static void renderUnuseable(Connection connection)
                             {
                                  if (connection != null && Proxy.isProxyClass(connection.getClass()))
                                  {
                                       InvocationHandler handler = Proxy.getInvocationHandler(connection);
                                       if (BorrowedConnectionProxy.class.isAssignableFrom(handler.getClass()))
                                       {
                                            ((BorrowedConnectionProxy) handler).useable = false;
                                       }
                                  }
                             }
                        
                             /**
                              * Convience method for unwrapping a connection proxy and getting a handle to an
                              * underlying connection.
                              * 
                              * @param connection
                              *            The connection (proxy) to be unwrapped.
                              * @return The unwrapped connection.
                              */
                             public static Connection getWrappedConnection(Connection connection)
                             {
                                  if (connection != null && connection instanceof ConnectionWrapper)
                                  {
                                       return ((ConnectionWrapper) connection).getWrappedConnection();
                                  }
                                  else
                                  {
                                       return connection;
                                  }
                             }
                        
                             /**
                              * Determines the appropriate class loader to which the generated proxy should be
                              * scoped.
                              * 
                              * @return The class loader appropriate for proxy construction.
                              */
                             public static ClassLoader getProxyClassLoader()
                             {
                                  return BorrowedConnectionProxy.class.getClassLoader();
                             }
                        }
                        

                         

                        Pom.xml

                         

                        <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                             xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
                             <modelVersion>4.0.0</modelVersion>
                             <groupId>edu.utah.further.party3</groupId>
                             <artifactId>party3-hibernate-osgi-uber</artifactId>
                             <version>3.3.1.GA</version>
                             <packaging>bundle</packaging>
                             <name>Hibernate OSGi Uber Jar</name>
                             <description>Hibernate OSGi jar containing all Hibernate classes</description>
                        
                             <!-- =========================================== -->
                             <!-- Properties / version numbers                -->
                             <!-- =========================================== -->
                             <properties>
                                  <!-- General -->
                                  <final.name>party3-hibernate-osgi-uber</final.name>
                             </properties>
                        
                             <!-- =========================================== -->
                             <!-- Dependencies                                -->
                             <!-- =========================================== -->
                             <dependencies>
                        
                                  <!-- ########################## -->
                                  <!-- Compile-time               -->
                                  <!-- ########################## -->
                                  
                                  <dependency>
                                       <groupId>org.hibernate</groupId>
                                       <artifactId>com.springsource.org.hibernate.annotations</artifactId>
                                       <version>3.4.0.GA</version>
                                  </dependency>
                        
                                  <dependency>
                                       <groupId>org.hibernate</groupId>
                                       <artifactId>com.springsource.org.hibernate</artifactId>
                                       <version>3.3.1.GA</version>
                                       <exclusions>
                                            <exclusion>
                                                 <groupId>commons-logging</groupId>
                                                 <artifactId>commons-logging</artifactId>
                                            </exclusion>
                                       </exclusions>
                                  </dependency>
                        
                                  <dependency>
                                       <groupId>javax.transaction</groupId>
                                       <artifactId>com.springsource.javax.transaction</artifactId>
                                       <version>1.1.0</version>
                                  </dependency>
                        
                             </dependencies>
                        
                             <build>
                                  <plugins>
                                       <plugin>
                                            <groupId>org.apache.felix</groupId>
                                            <artifactId>maven-bundle-plugin</artifactId>
                                            <version>2.0.0</version>
                                            <extensions>true</extensions>
                                            <configuration>
                                                 <instructions>
                                                      <Embed-Dependency>
                                                           org.hibernate;scope=compile;inline=true,
                                                      </Embed-Dependency>
                                                      <Embed-Transitive>false</Embed-Transitive>
                                                      <Bundle-SymbolicName>edu.utah.further.org.hibernate</Bundle-SymbolicName>
                                                      <Bundle-Version>3.3.1.GA</Bundle-Version>
                                                      <Private-Package>
                                                           org.hibernate.jdbc;version="3.3.1.GA";-split-package:=merge-first,
                                                      </Private-Package>
                                                      <Export-Package>
                                                           org.hibernate;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.action;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.annotations;version="3.4.0.GA";-split-package:=merge-first,
                                                           org.hibernate.annotations.common;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.annotations.common.annotationfactory;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.annotations.common.reflection;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.annotations.common.reflection.java;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.annotations.common.reflection.java.generics;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.annotations.common.util;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.bytecode;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.bytecode.cglib;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.bytecode.javassist;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.bytecode.util;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.cache;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.cache.access;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.cache.entry;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.cache.impl;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.cache.impl.bridge;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.cache.jbc2;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.cache.jbc2.access;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.cache.jbc2.builder;version="3.3.1.GA",
                                                           org.hibernate.cache.jbc2.collection;version="3.3.1.GA",
                                                           org.hibernate.cache.jbc2.entity;version="3.3.1.GA",
                                                           org.hibernate.cache.jbc2.query;version="3.3.1.GA",
                                                           org.hibernate.cache.jbc2.timestamp;version="3.3.1.GA",
                                                           org.hibernate.cache.jbc2.util;version="3.3.1.GA",
                                                           org.hibernate.cfg;version="3.4.0.GA";-split-package:=merge-first,
                                                           org.hibernate.cfg.annotations;version="3.4.0.GA";-split-package:=merge-first,
                                                           org.hibernate.cfg.annotations.reflection;version="3.4.0.GA";-split-package:=merge-first,
                                                           org.hibernate.cfg.search;version="3.4.0.GA",
                                                           org.hibernate.classic;version="3.3.1.GA",
                                                           org.hibernate.collection;version="3.3.1.GA",
                                                           org.hibernate.connection;version="3.3.1.GA",
                                                           org.hibernate.context;version="3.3.1.GA",
                                                           org.hibernate.criterion;version="3.3.1.GA",
                                                           org.hibernate.dialect;version="3.3.1.GA",
                                                           org.hibernate.dialect.function;version="3.3.1.GA",
                                                           org.hibernate.dialect.lock;version="3.3.1.GA",
                                                           org.hibernate.ejb;version="3.4.0.GA",
                                                           org.hibernate.engine;version="3.3.1.GA",
                                                           org.hibernate.engine.loading;version="3.3.1.GA",
                                                           org.hibernate.engine.query;version="3.3.1.GA",
                                                           org.hibernate.engine.query.sql;version="3.3.1.GA",
                                                           org.hibernate.engine.transaction;version="3.3.1.GA",
                                                           org.hibernate.event;version="3.3.1.GA",
                                                           org.hibernate.event.def;version="3.3.1.GA",
                                                           org.hibernate.exception;version="3.3.1.GA",
                                                           org.hibernate.hql;version="3.3.1.GA",
                                                           org.hibernate.hql.antlr;version="3.3.1.GA",
                                                           org.hibernate.hql.ast;version="3.3.1.GA",
                                                           org.hibernate.hql.ast.exec;version="3.3.1.GA",
                                                           org.hibernate.hql.ast.tree;version="3.3.1.GA",
                                                           org.hibernate.hql.ast.util;version="3.3.1.GA",
                                                           org.hibernate.hql.classic;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.id;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.id.enhanced;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.id.insert;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.impl;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.intercept;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.intercept.cglib;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.intercept.javassist;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.jdbc;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.jdbc.util;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.jmx;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.loader;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.loader.collection;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.loader.criteria;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.loader.custom;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.loader.custom.sql;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.loader.entity;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.loader.hql;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.lob;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.mapping;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.metadata;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.param;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.persister;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.persister.collection;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.persister.entity;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.pretty;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.property;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.proxy;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.proxy.dom4j;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.proxy.map;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.proxy.pojo;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.proxy.pojo.cglib;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.proxy.pojo.javassist;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.secure;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.sql;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.stat;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.tool.hbm2ddl;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.tool.instrument;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.tool.instrument.cglib;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.tool.instrument.javassist;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.transaction;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.transform;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.tuple;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.tuple.component;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.tuple.entity;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.type;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.usertype;version="3.3.1.GA";-split-package:=merge-first,
                                                           org.hibernate.util;version="3.3.1.GA";-split-package:=merge-first
                                                   </Export-Package>
                                                      <Import-Package>
                                                           org.hibernate.repackage;resolution:=optional,
                                                           com.ibm;resolution:=optional,
                                                           com.opensymphony;resolution:=optional,
                                                           org.jboss.cache;resolution:=optional,
                                                           net.sf.ehcache;resolution:=optional,
                                                           net.sf.ehcache;resolution:=optional,
                                                           net.sf.swarmcache;resolution:=optional,
                                                           javax.security;resolution:=optional,
                                                           org.logicalcobwebs;resolution:=optional,
                                                           *
                                                      </Import-Package>
                                                      <Bundle-Classpath>.</Bundle-Classpath>
                                                 </instructions>
                                            </configuration>
                                       </plugin>
                                  </plugins>
                             </build>
                        </project>
                        

                         

                        • 9. Re: Hibernate OSGi ClassNotFoundException
                          chandraprabha rajput Novice

                          Hi,

                           

                          I am getting the same problem .

                           

                          Could please let me know how did you fixed this problem.

                           

                          Thanks,

                          Chandra