简体   繁体   中英

object X is not a member of package Y

I am trying to implement an abstract Java class in Scala and in the eclipse IDE it is not showing errors but, when I try to compile it is throwing an error

The abstract Java class is defined as

package de.hybris.platform.webservices;

import de.hybris.platform.core.model.ItemModel;


public abstract class AbstractCommand<RESOURCE> extends AbstractYResponseBuilder<RESOURCE, Object, Object> implements
        Command<RESOURCE, Object, Object>
{
    ...
}

Code for Scala class is

package com.test.scala.poc.ws

import de.hybris.platform.webservices.AbstractCommand
import de.hybris.platform.core.model.product.ProductModel

class ProductCommand extends AbstractCommand[ProductModel] {

  override def execute(resourceModel: ProductModel, requestDTO: Object): ProductModel = null


}

And finally, the damn error message is

object webservices is not a member of package de.hybris.platform

Help resolving this is much appreciated!

It happens due to saved build logs of a previously failed build. Clean the build, close and restart IDE. It should be all fine.

IntelliJ 的Invalidated Caches and Restart在我的情况下是不够的,但是在丢弃文件夹.bloop/target/并在 Intellij 中重新导入bsp项目(然后build.sbt再次被消耗并进入 bloop)之后,一切都很好。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM