Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: IBM JVM9 - osgiBeanImplTest fails

  1. #1
    Join Date
    Aug 2008
    Location
    Melbourne
    Posts
    6

    Smile IBM JVM9 - osgiBeanImplTest fails

    Dear All
    created a very simple test from the maven archetype for 1.1.1 DM. Seems to run no problem at all when executed with the Sun 1.5_0_15 JDK, but fails when I run with the IBM J9 JVM on a windows (Vista) environment.

    BeanOsgiIntegrationTest

    I'll raise this with IBM as well, wish me luck

    Haven't tried against the J9 JVM on Linux yet

    Java(TM) 2 Runtime Environment, Standard Edition (build pwi32dev-20060511 (SR2))
    IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows 2000 x86-32 j9vmwi3223-20060504 (JIT enabled)
    J9VM - 20060501_06428_lHdSMR
    JIT - 20060428_1800_r8
    GC - 20060501_AA)
    JCL - 20060511a


    Any hints or tips, heres the stack trace, I'm at a loss as to why this is happening, and to be clear, if I change the JVM back to Sun, all works fine, with not a single change !. Yeah, looks like a classpath, but I thought the default osgi env was equinox, and not felix. I am not specifying any osgi env in my spring configs anywhere.



    java.lang.NoClassDefFoundError: org.apache.felix.framework.Felix
    at java.lang.J9VMInternals.verifyImpl(Native Method)
    at java.lang.J9VMInternals.verify(J9VMInternals.java: 59)
    at java.lang.J9VMInternals.initialize(J9VMInternals.j ava:120)
    at java.lang.Class.forNameImpl(Native Method)
    at java.lang.Class.forName(Class.java:131)
    at org.springframework.osgi.test.platform.Platforms.c lass$(Platforms.java:30)
    at org.springframework.osgi.test.platform.Platforms.< clinit>(Platforms.java:41)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.j ava:177)
    at org.springframework.osgi.test.AbstractConfigurable OsgiTests.getPlatformName(AbstractConfigurableOsgi Tests.java:134)
    at org.springframework.osgi.test.AbstractConfigurable OsgiTests.createPlatform(AbstractConfigurableOsgiT ests.java:77)
    at org.springframework.osgi.test.AbstractOsgiTests.st artup(AbstractOsgiTests.java:233)
    at org.springframework.osgi.test.AbstractOsgiTests.pr epareTestExecution(AbstractOsgiTests.java:374)
    at org.springframework.osgi.test.AbstractOsgiTests.ru nBare(AbstractOsgiTests.java:203)
    at org.springframework.osgi.test.AbstractOsgiTests$1. protect(AbstractOsgiTests.java:184)
    at junit.framework.TestResult.runProtected(TestResult .java:124)
    at org.springframework.osgi.test.AbstractOsgiTests.ru n(AbstractOsgiTests.java:181)
    at junit.framework.TestSuite.runTest(TestSuite.java:2 30)
    at junit.framework.TestSuite.run(TestSuite.java:225)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:64)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:615)
    at org.apache.maven.surefire.junit.JUnitTestSet.execu te(JUnitTestSet.java:213)
    at org.apache.maven.surefire.suite.AbstractDirectoryT estSuite.executeTestSet(AbstractDirectoryTestSuite .java:140)
    at org.apache.maven.surefire.suite.AbstractDirectoryT estSuite.execute(AbstractDirectoryTestSuite.java:1 27)
    at org.apache.maven.surefire.Surefire.run(Surefire.ja va:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:64)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:615)
    at org.apache.maven.surefire.booter.SurefireBooter.ru nSuitesInProcess(SurefireBooter.java:345)
    at org.apache.maven.surefire.booter.SurefireBooter.ma in(SurefireBooter.java:1009)
    Michael J Quinn
    Kinglake West - Australia

  2. #2
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    HI Michael,

    Thanks for reporting - I haven't tried J9 but I will. Equinox is indeed the default but the test you are seeing is a unit test from the test framework that starts all the platforms supported out of the box (including Felix).
    I've raised an issue on the matter which you can track here: http://jira.springframework.org/browse/OSGI-601

    Cheers,
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  3. #3
    Join Date
    Aug 2008
    Location
    Melbourne
    Posts
    6

    Default IBM J9 JVM - I'll step through some code

    Costin
    thanks for the reply, so in my plan is
    1 - I'll try the IBM J9 JVM on linux
    2 - I'll see if there is a later revision of the Windows J9 JVM from IBM
    3 - I'll step through the Spring DM source code.

    And thanks, I did not appreciate that the unit test framework tried to instantiate all supported platforms.

    Will let you know the results in 24hrs (its Monday morning here in AUS)

    cheers
    Michael J Quinn
    Kinglake West - Australia

  4. #4
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    2 - I'll see if there is a later revision of the Windows J9 JVM from IBM
    Do you have any links available? I can't find any downloads for J9 on Windows...

    And thanks, I did not appreciate that the unit test framework tried to instantiate all supported platforms.
    To be precise, the testing framework only instantiates one platform (the one you specify or Equinox by default). Felix is instantiated here by the testing framework unit tests which test not just the bootstrapping of the platform but the setup as well (with regard to file system access and so on).
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  5. #5
    Join Date
    Aug 2008
    Location
    Melbourne
    Posts
    6

    Default J9 on windows

    Unfortunately you need WAS 6.1 for windows to get the JVM
    Michael J Quinn
    Kinglake West - Australia

  6. #6
    Join Date
    Aug 2008
    Location
    Melbourne
    Posts
    6

    Default J9 on windows

    Or just get the RAD 7.5 beta which includes the WAS 6.1 runtime (and JVM)
    I'd put in the URL, but i'm not allowed (haven't got 15 posts yet :-), but I will soon ;-)
    )
    Michael J Quinn
    Kinglake West - Australia

  7. #7
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Thanks - I've got SDK 5 using this pre-packed environment:
    http://www.ibm.com/developerworks/java/jdk/eclipse/
    I'll try to run the test today and see what's the problem.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  8. #8
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Michael, sorry for the late reply. I've tested 1.1.x branch on J9 on windows and everything works.
    Below is the output from my j9 install:
    Code:
    java version "1.5.0"
    Java(TM) 2 Runtime Environment, Standard Edition (build pwi32dev-20080315 (SR7))
    
    IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-2008031
    5 (JIT enabled)
    J9VM - 20080314_17962_lHdSMr
    JIT  - 20080130_0718ifx2_r8
    GC   - 200802_08)
    JCL  - 20080314
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  9. #9
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Just to note, looking at the j9 log, it seems that the major difference, besides the OS used, is the SR - you're using SR2 while I'm on SR7. I recall something about SR5 being important but I'm not sure what bugfixes were available in that (or whether that's the correct number) - either way, try upgrading and see if that makes a difference.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  10. #10
    Join Date
    Jun 2008
    Location
    Dresden/Germany
    Posts
    3

    Default Ibm jvm v9

    Hi,

    we encountered the same problem using the following IBM JVM

    Code:
    java -version
    java version "1.5.0"
    Java(TM) 2 Runtime Environment, Standard Edition (build pap32dev-20070201 (SR4))
    IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 AIX ppc-32 j9vmap3223-20070201 (JIT enabled)
    J9VM - 20070131_11312_bHdSMR
    JIT  - 20070109_1805ifx1_r8
    GC   - 200701_09)
    JCL  - 20070126
    The reason seems to be a small difference in classloading between IBM and Sun JVM:

    1. AbstractConfigurableOsgiTests has a reference to the abstract class Platforms ("return (systemProperty == null ? Platforms.EQUINOX : systemProperty);"
    2. Platforms references not just only the names of the implementations but the classes (source and bytecode)
    Code:
    	public static final String EQUINOX = EquinoxPlatform.class.getName();
    
    	public static final String KNOPFLERFISH = KnopflerfishPlatform.class.getName();
    
    	public static final String FELIX = FelixPlatform.class.getName();
    The Sun JVM seems to be satisfied by just fetching the strings, the IBM JVM furthermore tries to load the classes.

    We're still tracking down this issue on our side so far we found the following implications:
    - you need all frameworks on the classpath before starting the tests (e.g. from maven)
    - the other frameworks must be deployed as bundles

    Kind Regards

    Dirk Mahler
    dirk.mahler@buschmais.com

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •