4 Replies Latest reply on Jun 10, 2016 12:33 AM by armahdi

    Issue with deployed dependencies

    armahdi

      We have an issue when deploying an application that has a dependency on a deployed rar. we had to provide a jboss-deployment-structure.xml with reference to that deployed rar.

      now the rar file comes with a version. and that rar file is used in a lot of applications. everytime we create a new version, it would be needed to update all the jboss-deploymen-structure.xml descriptors in the application where it is a dependency. This can become a maintenance headache. How can we circumvent that. I have posted another question where an issue not very similar to this is occurring for properties files, but it seems there has to be away to externalize these somehow.

        • 1. Re: Issue with deployed dependencies
          nickarls

          Not that I think it's a good idea but I wonder if it would even be possible to have an OS level symlink from the delpoyment directory foo-latest.rar -> a file outside the deployment directory

          • 2. Re: Issue with deployed dependencies
            jaikiran

            Can you post the exact content of your jboss-deployment-structure.xml? And what exactly happens if this dependency isn't specified? Just trying to understand why that .rar dependency is needed as a deployment level dependency.

            • 3. Re: Issue with deployed dependencies
              armahdi

              Thanks for your replies guys.

               

              Jai, the rar is deployed in the deployments folder. in the same folder i have an application which is a war file and in its WEB-INF folder we have placed a jboss-deployment-structure.xml whose contents are as below:

              <?xml version="1.0" encoding="UTF-8"?>  

              <jboss-deployment-structure>  

                  <deployment>  

                      <dependencies>  

                          <module name="deployment.InstitutionConnector-1.2.0.rar" />

                          <module name="javax.api"/>

                          <module name="javax.transaction.api"/>

                          <module name="javax.jms.api"/>

                         -->

               

               

                     </dependencies>

                  </deployment>  

              </jboss-deployment-structure> 

              If i remove the first module name i will get :

               

              17:16:28,736 INFO [com.comp.event.dao.EventDao] (pool-6-thread-1) java.lang.NoClassDefFoundError: com/comp/institution/InstInteractionSpec

              17:16:28,736 ERROR [com.comp.event.propagator.Propagator] (pool-6-thread-1) Unexpected error polling - com/comp/institution/InstAppserverRecord

              InstInteractionSpec and InstAppserverRecord are actual classes inside the InstitutionConnector-1.2.0.jar which resides in InstitutionConnector-1.2.0.rar as well. Also, sometimes in some applications that use the InstitutionConnector-1.2.0.rar we need to add it in manifest.mf file through maven.

               

              now I am going to try to circumvent this issue by providing the jar in the modules and then refer here as a module. I think I have tried that approach before and failed. but lets see it again. We did our migration like more than six months back and we are revisiting this for this particular issue

              I will revert back and see if that works.

              • 4. Re: Issue with deployed dependencies
                armahdi

                We tried to extract the jar from within the rar which is the actual source code and made that as a module and then we started getting the NoClassDefFoundError. I believe that was the same error which forced us to put the name of the rar in the jboss-deployment-structure.xml. So that did not work