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 5970683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:24:36+00:00 2026-05-22T20:24:36+00:00

The scalac Java parser is taking objection to my Java code imported `Entity’ is

  • 0

The scalac Java parser is taking objection to my Java code

imported `Entity' is permanently hidden by definition of object Entity in package domain    Asset.java

This seems to be a collision between an import and a class with the same name in the package being compiled.

In my package I have a class

package iMP2020.domain;

public interface Entity {
    public Serializable getId();
}

with the same name as an imported class from a different package

package iMP2020.domain;
import javax.persistence.Entity; // compiler warning

@Entity
public class Asset {

where it is complaining about the import. Javac is quite happy. Note that I don’t have to reference my version of the class- just its existence is enough to trigger the warning on the import.

I can fix this by removing the import and explicitly referencing @Entity, but is it a bug in the compiler?

  • 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-22T20:24:37+00:00Added an answer on May 22, 2026 at 8:24 pm

    I don’t seem to be able to reproduce this except with the Scala Eclipse plugin, so I’m going to wait for that to stabilise before coming to a conclusion.

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

Sidebar

Related Questions

I have an application where I would like to have mixed Java and Scala
When I retrieve any Scalar value from the database, I usually write code like
I read the tutorial on parser combinators for Scala , and I was wondering
I've been attempting to write an XML parser to read through a Wikipedia XML
Possible Duplicate: Generate MD5 hash in Java Hi, I want to compute the MD5
I am looking for a library for Java or Scala allowing boolean composition of
Scalar-valued functions can be called from .NET as follows: SqlCommand cmd = new SqlCommand(testFunction,
Using Scala's command line REPL: def foo(x: Int): Unit = {} def foo(x: String):
In Scala, is it possible to get the string representation of a type at
We have scalar functions in our database for returning things like number of tasks

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.