Announcement Announcement Module
Collapse
No announcement yet.
issue with greenpages 2.0.0.RELEASE when upgrade eclipselink to 1.1.2 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • issue with greenpages 2.0.0.RELEASE when upgrade eclipselink to 1.1.2

    Hi,
    I've an issue with greenpages 2.0.0.RELEASE when upgrade eclipselink to 1.1.2 in springsource dm server 2.0.0.M3.
    The changes i've made against original version is below:

    1) fetch eclipselink from eclipse.org's own maven repository:
    PHP Code:
    <repository>
       <
    id>EclipseLink Repo</id>
       <
    url>http://www.eclipse.org/downloads/download.php?r=1&amp;nf=1&amp;file=/rt/eclipselink/maven.repo</url>
    </repository
    therefore, the dependency is changed to:
    PHP Code:
    <dependency>
        <
    groupId>javax.persistence</groupId>
        <
    artifactId>com.springsource.javax.persistence</artifactId>
        <
    version>1.99.0</version>
        <
    scope>compile</scope>
    </
    dependency>
    <
    dependency>
        <
    groupId>org.eclipse.persistence</groupId>
        <
    artifactId>org.eclipse.persistence.core</artifactId>
        <
    version>1.1.2</version>
        <
    scope>compile</scope>
    </
    dependency>
    <
    dependency>
        <
    groupId>org.eclipse.persistence</groupId>
        <
    artifactId>org.eclipse.persistence.jpa</artifactId>
        <
    version>1.1.2</version>
        <
    scope>compile</scope>
    </
    dependency
    2) modify the import in MANIFEST.MF to corresponding verion:
    PHP Code:
    Import-Bundleorg.eclipse.persistence.core;version="[1.1.2.v20090612-
     r4475,1.1.2.v20090612-r4475]"
    ,org.eclipse.persistence.jpa;version="[1
     .1.2.v20090612-r4475,1.1.2.v20090612-r4475]"
    Import-Packageavax.persistence;version="[1.99.0, 1.99.0]" 
    finnaly, build the package, copy the required dependencies to repository\bundles\usr, drop the artifact to pickup directory, and starting the dm server, when seen "<SPDE0010I> Deployment of 'greenpages' version '2.0.0.RELEASE' completed", open the greenpages's home page in browser, but when click the 'submit' button, the exeption is thrown as below:
    PHP Code:
    root cause

    com
    .springsource.kernel.osgi.framework.ExtendedClassNotFoundExceptionjavax.naming.NamingException in KernelBundleClassLoader: [bundle=org.eclipse.persistence.core_1.1.2.v20090612-r4475]
        
    com.springsource.kernel.osgi.framework.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:139)
        
    java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        
    java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        
    org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.updateLogins(EntityManagerSetupImpl.java:1013)
        
    org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.updateServerSession(EntityManagerSetupImpl.java:1192)
        
    org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:246)
        
    org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
        
    org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
        
    org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
        
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        
    java.lang.reflect.Method.invoke(Method.java:597)
        
    org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler.invoke(AbstractEntityManagerFactoryBean.java:431)
        
    $Proxy102.createEntityManager(Unknown Source)
        
    org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:222)
        
    $Proxy110.createQuery(Unknown Source)
        
    greenpages.jpa.JpaDirectory.search(JpaDirectory.java:57)
        
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        
    java.lang.reflect.Method.invoke(Method.java:597)
        
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
        
    org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
        
    org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
        
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        
    org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
        
    org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
        
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        
    org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
        
    org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
        
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        
    org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
        
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        
    org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
        
    org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
        
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        
    $Proxy99.search(Unknown Source)
        
    greenpages.web.GreenPagesController.search(GreenPagesController.java:58)
        
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        
    java.lang.reflect.Method.invoke(Method.java:597)
        
    org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:632)
        
    org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:150)
        
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:360)
        
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:348)
        
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:763)
        
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:709)
        
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:614)
        
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:526)
        
    javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803
    Any help?
    Thanx in advance..

  • #2
    I have experienced similar problems with EclipseLink. The problem is that the eclipselink manifests aren't fully OSGi-compliant. More specifically, they do not declare Import-Package statements for all packages they make use of (javax.naming being one of them), but instead rely on those classes being loaded by the boot classloader (see the org.osgi.framework.bootdelegation system property, alternatively osgi.compatibility.bootdelegation if using equinox).

    The ecpliselink bundles contained in the springsource bundle repository have correct manifests.

    The solution is to either activate one of the aforementioned system properties or modifying the manifests of the EclipseLink bundles.

    regards, Peter

    Comment


    • #3
      thanks Peter,
      by add javax.* to org.osgi.framework.bootdelegation in java6-server.profile, it worked for me.

      Comment

      Working...
      X