Introduction to Troubleshooting FAQ

When coding on any platform, you can sometimes run into issues that have no clear resolution. This can be particularly frustrating. If you have issues building, deploying, or running apps and modules, you want to resolve them fast. These frequently asked questions and answers help you troubleshoot and correct problems.

Here are the troubleshooting sections:

Click a question to view the answer.

Modules

How can I configure dependencies on Liferay artifacts? 

What are optional package imports and how can I specify them? 

When developing modules, you can declare optional package imports. An optional package import is one your module can use if it's available, but can still function without it. Specifying optional package imports is straightforward.


How can I connect to a JNDI data source from my module? 

Connecting to an application server's JNDI data sources from Liferay's OSGi environment is almost the same as connecting to them from the Java EE environment. In an OSGi environment, the only difference is that you must use Liferay DXP's class loader to load the application server's JNDI classes.


My module has an unresolved requirement. What can I do? 

If one of your bundles imports a package that no other bundle in the Liferay OSGi runtime exports, Liferay DXP reports an unresolved requirement:

! could not resolve the bundles: ...
    Unresolved requirement: Import-Package: ...
    ...
    Unresolved requirement: Require-Capability ...
    

To satisfy the requirement, find a module that provides the capability, add it to your build file's dependencies, and deploy it.


An IllegalContextNameException reports that my bundle's context name does not follow Bundle-SymbolicName syntax. How can I fix the context name? 



Why doesn't the package I use from the fragment host resolve? 

The application server and database started, but Liferay DXP failed to connect to the database. What happened and how can I fix this? 

Liferay DXP initialization can fail while attempting to connect to a database server that isn't ready. Configuring startup to retry JDBC connections facilitates connecting Liferay DXP to databases.


How can I adjust my module's logging? 

How can I implement logging in my module or plugin? 

Why did the entity sort order change when I migrated to a new database type? 

After creating a relational mapping between Service Builder entities, my portlet is using too much memory. What can I do? 

Services and Components


How can I see what's happening in the OSGi container? 

How can I detect unresolved OSGi components? 

module components that use Service Builder use Dependency Manager (DM) and most other module components use Declarative Services (DS). Gogo shell commands and tools help you find and inspect unsatisfied component references for DM and DS components.


What is the safest way to call OSGi services from non-OSGi code? 

How can I use files to configure components? 

How can I access OSGi Services from my Ext plugin? 
« Semantic VersioningResolving Bundle Requirements »
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0