Legacy Knowledge Base
Published Jul. 2, 2025

Exporting an empty package 'com.liferay.training.servicebuilder.gradebook.exception'

Written By

Rita Schaff

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • I have tried to follow this tutorial:
    Back-End Developer - DXP 7.1 → Exercises: Create the Gradebook Service Layer - Steps 8-10,
  • When I try to deploy by dragging the project to the Liferay server, I get the following error message:
    modules:gradebook:gradebook-api:compileJava UP-TO-DATE
    :modules:gradebook:gradebook-api:buildCSS UP-TO-DATE
    :modules:gradebook:gradebook-api:processResources UP-TO-DATE
    :modules:gradebook:gradebook-api:transpileJS SKIPPED
    :modules:gradebook:gradebook-api:configJSModules SKIPPED
    :modules:gradebook:gradebook-api:replaceSoyTranslation UP-TO-DATE
    :modules:gradebook:gradebook-api:wrapSoyAlloyTemplate SKIPPED
    :modules:gradebook:gradebook-api:classes UP-TO-DATE
    :modules:gradebook:gradebook-api:jar[Exporting an empty package 'com.liferay.training.servicebuilder.gradebook.exception', Exporting an empty package 'com.liferay.training.servicebuilder.gradebook.model', Exporting an empty package 'com.liferay.training.servicebuilder.gradebook.service', Exporting an empty package 'com.liferay.training.servicebuilder.gradebook.service.persistence']
    
    [aQute.bnd.annotation.ProviderType annotation used in class com.liferay.training.gradebook.model.AssignmentModel. Bnd versioning annotations are deprecated as of Bnd 3.2 and support will be removed in Bnd 4.0. Please change to use OSGi versioning annotations., aQute.bnd.annotation.ProviderType annotation used in class com.liferay.portal.kernel.model.BaseModel. Bnd versioning annotations are deprecated as of Bnd 3.2 and support will be removed in Bnd 4.0. Please change to use OSGi versioning annotations., aQute.bnd.annotation.ProviderType annotation used in class com.liferay.training.gradebook.model.Assignment. Bnd versioning annotations are deprecated as of Bnd 3.2 and support will be removed in Bnd 4.0. Please change to use OSGi versioning annotations., aQute.bnd.annotation.ProviderType annotation used in class com.liferay.training.gradebook.model.SubmissionModel. Bnd versioning annotations are deprecated as of Bnd 3.2 and support will be removed in Bnd 4.0. Please change to use OSGi versioning annotations., aQute.bnd.annotation.ProviderType annotation used in class com.liferay.training.gradebook.model.Submission. Bnd versioning annotations are deprecated as of Bnd 3.2 and support will be removed in Bnd 4.0. Please change to use OSGi versioning annotations., aQute.bnd.annotation.ProviderType annotation used in class com.liferay.training.gradebook.service.AssignmentLocalService. Bnd versioning annotations are deprecated as of Bnd 3.2 and support will be removed in Bnd 4.0. Please change to use OSGi versioning annotations., aQute.bnd.annotation.ProviderType annotation used in class com.liferay.training.gradebook.service.AssignmentService. Bnd versioning annotations are deprecated as of Bnd 3.2 and support will be removed in Bnd 4.0. Please change to use OSGi versioning annotations., aQute.bnd.annotation.ProviderType annotation used in class com.liferay.training.gradebook.service.SubmissionLocalService. Bnd versioning annotations are deprecated as of Bnd 3.2 and support will be removed in Bnd 4.0. Please change to use OSGi versioning annotations., aQute.bnd.annotation.ProviderType annotation used in class com.liferay.training.gradebook.service.SubmissionService. Bnd versioning annotations are deprecated as of Bnd 3.2 and support will be removed in Bnd 4.0. Please change to use OSGi versioning annotations.]
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Build has errors
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    
    BUILD FAILED
    
    Total time: 1.156 secs
    

Environment

  • DXP 7.1

Resolution

  • The build error happens because the exporting package is empty, so the check exports cannot pass.
  • Before building the whole project, please
    1. Execute the buildService task first under gradebook-service project
    2. And after buildService, in the gradebook-api project, the export package for example is:
      com.liferay.training.gradebook.exception
    3. Make sure that you have the same line in your bnd.bnd file's 4th line, like:
      Bundle-Name: gradebook-apiBundle-SymbolicName: com.liferay.training.servicebuilder.gradebook.api
      Bundle-Version: 1.0.0
      Export-Package:\
       com.liferay.training.gradebook.exception,\
       com.liferay.training.servicebuilder.gradebook.model,\
       com.liferay.training.servicebuilder.gradebook.service,\
       com.liferay.training.servicebuilder.gradebook.service.persistence
      -check: EXPORTS
      -includeresource: META-INF/service.xml=../gradebook-service/service.xml
Did this article resolve your issue ?

Legacy Knowledge Base