Topic
  • 5 replies
  • Latest Post - ‏2013-01-24T17:26:46Z by sutter
SystemAdmin
SystemAdmin
45 Posts

Pinned topic DDL generation always fails with openjpa.jdbc.meta.MappingTool not found

‏2013-01-23T17:43:06Z |
Error:java.lang.ClassNotFoundException: org.apache.openjpa.jdbc.meta.MappingTool

I can see the mapping tool class in
{WAS7 runtime}/feature_packs/jpa/plugins/com.ibm.ws.jpa.jar

I have tried setting the project properties for JPA implemenation to "Library Provided by Target Runtime" as well as making my own user library and putting all the jars in plugins/ and runtime/ into that user library as well as copying all jars to WEB-INF/lib.

Has anyone gotten DDL generation to work? Is there some extra installation of the feature packs that I missed?
Updated on 2013-01-24T17:26:46Z at 2013-01-24T17:26:46Z by sutter
  • sutter
    sutter
    94 Posts

    Re: DDL generation always fails with openjpa.jdbc.meta.MappingTool not found

    ‏2013-01-23T19:15:12Z  
    What operation are you attempting specifically? Are you trying to run the MappingTool via the bat/sh script? Or, during the build via ant task? Or, directly via a java invocation? As long as you have installed the Feature Pack and augmented your profile, the MappingTool should be usable without additional property settings.

    Kevin Sutter, JPA Architect, IBM WebSphere
  • SystemAdmin
    SystemAdmin
    45 Posts

    Re: DDL generation always fails with openjpa.jdbc.meta.MappingTool not found

    ‏2013-01-23T20:17:20Z  
    • sutter
    • ‏2013-01-23T19:15:12Z
    What operation are you attempting specifically? Are you trying to run the MappingTool via the bat/sh script? Or, during the build via ant task? Or, directly via a java invocation? As long as you have installed the Feature Pack and augmented your profile, the MappingTool should be usable without additional property settings.

    Kevin Sutter, JPA Architect, IBM WebSphere
    I'm right-clicking the project in eclipse > JPA tools > generate tables from entities.

    When I launch the profile manager I can expand the default WASv7 profile and see that it has JPA2 and OSGI environments under it. Is there any other way that the profile could be misconfigured for JPA?
  • sutter
    sutter
    94 Posts

    Re: DDL generation always fails with openjpa.jdbc.meta.MappingTool not found

    ‏2013-01-23T23:07:41Z  
    I'm right-clicking the project in eclipse > JPA tools > generate tables from entities.

    When I launch the profile manager I can expand the default WASv7 profile and see that it has JPA2 and OSGI environments under it. Is there any other way that the profile could be misconfigured for JPA?
    Thank you for the clarification. I've alerted the tooling folks about this post. Hopefully, they will have some insights on what could be the issue.

    You've mentioned you are running with the OSGi / JPA 2.0 Feature Pack. What version of RAD are you running with?

    In the mean time, if you want to make progress with generating your database tables, you could run the MappingTool outside of the tooling environment. Here is a link that describes this functionality (I know it's 8.5 documentation, but the basic idea is the same):

    http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/topic/com.ibm.websphere.base.doc/ae/rejb_wsmapping.html

    Kevin Sutter, JPA Architect, IBM WebSphere
  • SystemAdmin
    SystemAdmin
    45 Posts

    Re: DDL generation always fails with openjpa.jdbc.meta.MappingTool not found

    ‏2013-01-23T23:16:49Z  
    • sutter
    • ‏2013-01-23T23:07:41Z
    Thank you for the clarification. I've alerted the tooling folks about this post. Hopefully, they will have some insights on what could be the issue.

    You've mentioned you are running with the OSGi / JPA 2.0 Feature Pack. What version of RAD are you running with?

    In the mean time, if you want to make progress with generating your database tables, you could run the MappingTool outside of the tooling environment. Here is a link that describes this functionality (I know it's 8.5 documentation, but the basic idea is the same):

    http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/topic/com.ibm.websphere.base.doc/ae/rejb_wsmapping.html

    Kevin Sutter, JPA Architect, IBM WebSphere
    Well, now I'm running with RAD 8.0.2 I switched to eclipse to avoid a JAX-RS validation bug. The generating of tables from entities works without error in RAD 8.0.2. I wish it worked in Eclipse :(
  • sutter
    sutter
    94 Posts

    Re: DDL generation always fails with openjpa.jdbc.meta.MappingTool not found

    ‏2013-01-24T17:26:46Z  
    Well, now I'm running with RAD 8.0.2 I switched to eclipse to avoid a JAX-RS validation bug. The generating of tables from entities works without error in RAD 8.0.2. I wish it worked in Eclipse :(
    Good to know you are making progress. Unfortunately, the JPA tooling available in Eclipse (Dali) is very generic and doesn't integrate well with WebSphere's JPA solution. The best tooling support for WebSphere's JPA solution is to use RAD.

    Thanks,
    Kevin Sutter, JPA Architect, IBM WebSphere