0 Replies Latest reply on Sep 19, 2016 9:45 AM by Dmitry Morozov

    Migration from Wildfly 8.2 Final to Wildfly 10.1

    Dmitry Morozov Newbie

      Hello everyone!

      I try to migrate application from wildfly 8.2 to wildfly 10.1, so in WF 8.2 application work just fine, but It can't be deployed to WF 10.1.

      For migration, I updated code base (code refactoring, for removing some deprecated methods) to Java 8 and was update some dependencies. Its still working on WF 8.2.

      Project has second structure:

       

      cpc-gui-ear-1.0.0-SNAPSHOT.ear:

           common-business-1.0.0-SNAPSHOT.jar (java classes)

           cpc-business-1.0.0-SNAPSHOT.jar (java classes)

           mail-service-1.0.9.jar (java classes)

           prodcat-webapp.war (just web files: bootstrap + angular)

           prodcat-weblib.jar (java classes and REST services)

           property-service-1.0.7.jar (java classes)

       

      for each module I added jboss-deployment-structure.xml, with <ear-subdeployments-isolated>false</ear-subdeployments-isolated>

       

      So, this config completely works on 8.2, but when I try to deploy this on 10.1 I got stacktrace:

       

      Cannot upload deployment: {"WFLYCTL0080: Failed services" => {"jboss.deployment.subunit.\"cpc-gui-ear-1.0.0-SNAPSHOT.ear\".\"cpc-business-1.0.0-SNAPSHOT.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"cpc-gui-ear-1.0.0-SNAPSHOT.ear\".\"cpc-business-1.0.0-SNAPSHOT.jar\".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of subdeployment \"cpc-business-1.0.0-SNAPSHOT.jar\" of deployment \"cpc-gui-ear-1.0.0-SNAPSHOT.ear\" Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class com.tele2.cpc.adapter.azure.AzureAdapter with ClassLoader ModuleClassLoader for Module \"deployment.cpc-gui-ear-1.0.0-SNAPSHOT.ear.cpc-business-1.0.0-SNAPSHOT.jar:main\" from Service Module Loader Caused by: java.lang.NoClassDefFoundError: javax/jms/Destination Caused by: java.lang.ClassNotFoundException: javax.jms.Destination from [Module \"deployment.cpc-gui-ear-1.0.0-SNAPSHOT.ear.cpc-business-1.0.0-SNAPSHOT.jar:main\" from Service Module Loader]"},"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.subunit.\"cpc-gui-ear-1.0.0-SNAPSHOT.ear\".\"prodcat-weblib.jar\".beanmanager","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".\"mail-service-1.0.9\".MailService","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".\"property-service-1.0.7\".PropertyCache","jboss.deployment.subunit.\"cpc-gui-ear-1.0.0-SNAPSHOT.ear\".\"cpc-business-1.0.0-SNAPSHOT.jar\".POST_MODULE","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.EAVResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.HardwareArticlesResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".\"property-service-1.0.7\".PropertyService","jboss.deployment.subunit.\"cpc-gui-ear-1.0.0-SNAPSHOT.ear\".\"property-service-1.0.7.jar\".beanmanager","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".\"common-business-1.0.0-SNAPSHOT\".FeatureToggleService","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.ExtraHandsetSubsidyResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.ArticlesResource","jboss.deployment.unit.\"cpc-gui-ear-1.0.0-SNAPSHOT.ear\".beanmanager","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.ZoneResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.ReleaseResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.DocumentResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.ComponentResource","jboss.deployment.subunit.\"cpc-gui-ear-1.0.0-SNAPSHOT.ear\".\"common-business-1.0.0-SNAPSHOT.jar\".beanmanager","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.CallPriceListsResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.CatalogsResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".\"common-business-1.0.0-SNAPSHOT\".WebServiceCacheService","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.CountryConfigResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.PricePlanResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.TimeResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.LoginResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.OfferingBundleResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.PlusServiceResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.InsuranceResource","jboss.deployment.subunit.\"cpc-gui-ear-1.0.0-SNAPSHOT.ear\".\"mail-service-1.0.9.jar\".beanmanager","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.ComponentsOfferingsResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.PropertyResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.WorkflowResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.VariantResource","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.MarginResource","jboss.deployment.subunit.\"cpc-gui-ear-1.0.0-SNAPSHOT.ear\".\"prodcat-webapp.war\".beanmanager","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".\"property-service-1.0.7\".PropertyDAO"],"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.ZoneResource.InstanceName is missing [jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.ZoneResource]","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.EAVResource.ValidatorFactory is missing [jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.EAVResource]","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.CallPriceListsResource.InAppClientContainer is missing [jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.CallPriceListsResource]","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.PropertyResource.Validator is missing [jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.PropertyResource]","jboss.naming.context.java.comp.\"cpc-gui-ear-1.0.0-SNAPSHOT\".prodcat-weblib.HardwareArticlesResource.InstanceName is missing

      ..... <a lot of lines related to prodcat-weblib dependencies>

       

       

      As I understood javax.jms.Destination  not found and after this error, deployment fails. So, I checked documentation And found what JSR-343:  Java Message Service API 2.0 is removed and now available only in standalone-full-ha.xml profile.

      For next step I just copy datasorces configuration from standalone to standalone-full-ha and try to deploy application. For this case deployment take a bit more of time and in result, I got strange error:

       

       

      Cannot upload deployment: {"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"cpc-gui-ear-1.0.0-SNAPSHOT.ear#prodcat\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"cpc-gui-ear-1.0.0-SNAPSHOT.ear#prodcat\": javax.persistence.PersistenceException: [PersistenceUnit: prodcat] Unable to build Hibernate SessionFactory Caused by: javax.persistence.PersistenceException: [PersistenceUnit: prodcat] Unable to build Hibernate SessionFactory Caused by: org.hibernate.tool.schema.extract.spi.SchemaExtractionException: More than one table found in namespace (, ) : CATALOG"},"WFLYCTL0412: Required services that are not installed:" => ["jboss.persistenceunit.\"cpc-gui-ear-1.0.0-SNAPSHOT.ear#prodcat\""],"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined}

       

      I found strange this error, because all tables and views have unique names... So, it look like what persistence unit is loaded few times...

       

      somebody can explain me how to resolve this issue?

       

      With Best Regards,

      Dmitry