Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 932659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:42:18+00:00 2026-05-15T20:42:18+00:00

I get compile errors when compiling valid code against a Java model enhanced with

  • 0

I get compile errors when compiling valid code against a Java model enhanced with JDO. I am confused at the errors because there is no direct usage of the package private static member interfaces in question from Scala. I understand Scala doesn’t support using such interfaces from Scala code, but I am confused that the Scala compiler complains about them.

Here is the error I am getting:

[scalac] Compiling 3 scala and 196 java source files to /home/alain/Documents/Project/build/model/src
[scalac] error: error while loading Error, Missing dependency 'class javax.jdo.spi.PersistenceCapable$ObjectIdFieldSupplier', required by /home/alain/Documents/Project/model/dist/model.jar(model/error/Error.class)
[scalac] error: error while loading Binder, Missing dependency 'class javax.jdo.spi.PersistenceCapable$ObjectIdFieldSupplier', required by /home/alain/Documents/Project/model/dist/model.jar(model/attachment/Binder.class)
[scalac] error: error while loading Journal, Missing dependency 'class javax.jdo.spi.PersistenceCapable$ObjectIdFieldSupplier', required by /home/alain/Documents/Project/model/dist/model.jar(model/note/Journal.class)
[scalac] error: error while loading Exemption, Missing dependency 'class javax.jdo.spi.PersistenceCapable$ObjectIdFieldSupplier', required by /home/alain/Documents/Project/model/dist/model.jar(model/exemption/Exemption.class)
[scalac] error: error while loading Flag, Missing dependency 'class javax.jdo.spi.PersistenceCapable$ObjectIdFieldSupplier', required by /home/alain/Documents/Project/model/dist/model.jar(model/flag/Flag.class)
[scalac] error: error while loading ConfigurationGroup, Missing dependency 'class javax.jdo.spi.PersistenceCapable$ObjectIdFieldSupplier', required by /home/alain/Documents/Project/model/dist/model.jar(model/configuration/ConfigurationGroup.class)
[scalac] error: error while loading IssueConfiguration, Missing dependency 'class javax.jdo.spi.PersistenceCapable$ObjectIdFieldSupplier', required by /home/alain/Documents/Project/model/dist/model.jar(model/analysis/configuration/IssueConfiguration.class)
[scalac] 7 errors found

Here is the Ant snippet I use to compile:

<target name="compile" depends="jar">
    <depend srcdir="src" destdir="${src.classes.dir}" cache="${build.dir}/src_dependencies" />
    <scalac srcdir="src" destdir="${src.classes.dir}" classpathref="src.build.classpath">
        <include name="**/*.scala"/>
        <include name="**/*.java"/>
    </scalac>
    <javac srcdir="src" destdir="${src.classes.dir}" source="1.6" target="1.6" nowarn="on"
       debug="on" encoding="UTF-8" classpathref="src.build.classpath" />
</target>

model.jar with the enhanced classes is on src.build.classpath.

I don’t understand why scalac cares about dependencies of Java classes it can’t resolve if they don’t affect the knowledge to compile my Scala source.

Interestingly IntelliJ’s Scala Plug-in is able to compile and run this code.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T20:42:19+00:00Added an answer on May 15, 2026 at 8:42 pm

    Keep the enhanced code out of the scalac build classpath. You will still need the unenhanced code in order to compile though.

    Here is how I solved this:

    1. Alter the regular JAR name to model-api.jar (inherited target uses src.classes.dir)

    2. I made the build of dependencies use model-api.jar instead of model.jar in src.build.classpath

    Here is a summary of the enhance target:

    <property name="production.enhanced.dir" value="${production.classes.dir}/../enhanced" />
    <copy todir="${production.enhanced.dir}">
        <fileset dir="${production.classes.dir}" />
    </copy>
    <jdodoclet ...>
    <jdoc ...>
    <jar destfile="dist/model.jar"> <fileset dir="${production.enhanced.dir}" />
        <fileset dir="src" excludes="**/*.java */.jj */.scala */.groovy" />
    </jar>
    

    The notable editions I had to make were copying the unenhanced classes to an sandbox directory, running the JDO enhancement on the sandbox directory and producing a runtime JAR with the original name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 456k
  • Answers 456k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Have a look at: Upload Multiple Images at Once using… May 15, 2026 at 10:32 pm
  • Editorial Team
    Editorial Team added an answer Store the part of your SQL query after FROM in… May 15, 2026 at 10:32 pm
  • Editorial Team
    Editorial Team added an answer My favourite example of a well-design C API is GTK+… May 15, 2026 at 10:32 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.