JBoss.orgCommunity Documentation
This chapter contains important information for migrating to newer versions of Errai. If you experience any problems, don’t hesitate to get in touch with us. See Reporting problems .
The first issues that will arise after replacing the jars or after changing the version numbers in the pom.xml
are unresolved package imports. This is due to refactorings that became necessary when the project grew. Most of these import problems can be resolved automatically by modern IDEs (Organize Imports). So, this should replace org.jboss.errai.bus.client.protocols.*
with org.jboss.errai.common.client.protocols.\*
for example.
The following is a list of manual steps that have to be carried out when upgrading:
org.jboss.errai.common.client.api.annotations.Portable
). See Marshalling for details.SimpleDispatcher
instead of the AsynDispatcher
. This has to be configured in Messaging (Errai Bus) Configuration .WEB-INF/web.xml
) for Errai CDI has changed ( org.jboss.errai.container.DevModeCDIBootstrap
is now org.jboss.errai.container.CDIServletStateListener
).<hostedWebapp>path-to-your-standard-webapp-folder</hostedWebapp>
. This is usually either war
or src/main/webapp
.The following is a list of manual steps that have to be carried out when upgrading from a 2.0.Beta version to 2.0.CR1 or 2.0.Final:
NoSubscribersToDeliverTo
exceptions. The snippet below shows how to activate automatic service discovery:
.web.xml<servlet>
<servlet-name>ErraiServlet</servlet-name>
<servlet-class>org.jboss.errai.bus.server.servlet.DefaultBlockingServlet</servlet-class>
<init-param>
<param-name>auto-discover-services</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
jboss7-support
module was deleted and is no longer needed as a dependency.There are some breaking API changes in the update from Errai 2.2.x to Errai 2.4.x and 3.0.x.
Here are the steps you’ll need to take to get your project compiling after you update:
ErrorCallback
interface has been made more general so the same type can be shared between Errai modules. This allows you reuse your own generic error handler class for, eg, Errai JAX-RS and ErraiBus callbacks. If you want to use a generic error handler throughout your app, change your ErrorCallback
implementations to ErrorCallback<?>
and change the first argument type of your error() method to Object. Otherwise, if you have use-case-specific error callbacks, implement the interfaces RestErrorCallback
or BusErrorCallback
as appropriate.IOCBeanManager
was replaced by two new types SyncBeanManager
and AsyncBeanManager
that need to be used instead. See Client-side Bean Manager for details.Note: Errai 3 is still changing rapidly, so this section is a work in progress. Please add any additional steps you had to take in upgrading your own codebase.
Here are the steps you’ll need to take to get your project running after you update: