1 2 3 Previous Next 39 Replies Latest reply on May 22, 2017 11:32 AM by getgolfedkid

    Application succesfully deployed, but cannot access the local URL

    getgolfedkid

      Hello,

       

      I am migrating an application from tomEE to JBoss EAP7 and Im encoutering some problems.

       

      I've recently deployed two web applications on JBoss EAP 7. However when I try to access them like I can access localhotst:8080/jboss-helloworld.

       

      I just get a "404 not found" for localhost:8080/xa-cms-admin/ and "Forbidden" for lcaolhost:8080/xa-cms-wli/

       

      While HelloWorld and Numberguess quickstarts are working.

       

      My war files' names are xa-cms-admin.war and xa-cms-wli.war and I have the following configuration in both pom.xml (only the name change slightly between admin and wli) :

       

      I do not know if the runtime names I put in the management console are relevant or not:

      • Runtime name: xa-cms-wli.war
      • Runtime name: xa-cms-admin

       

      I don't know why I put war on one and not on the other but it worked for the deployment...

       

           <plugin>

                 <groupId>org.wildfly.plugins</groupId>

                 <artifactId>wildfly-maven-plugin</artifactId>

                 <configuration>

                      <skip>false</skip>

                      <name>xa-cms-wli</name>

                 </configuration>

           </plugin>

           ...

             <build>

                  <finalName>xa-cms-wli</finalName>

             </build>

       

      However, when I try to go on localhost:8080/xa-cms-admin or localhost:8080/xa-cms-wli I just get a 404 not found.

      Only xa-cms-wli.war repositery and .deployed file are in standalone/deployements, I don't know why the xa-cms-admin.war isn't there...

       

      Don't hesitate to ask if you need more informations.

       

      Please check sreenshots below for more informations.

       

      Best Regards.

       

      Antoine

      deploy.pngSans titre.png

      Sans titreqsd.pngThis is what happens when I try to set the runtime name to xa-cms-admin.war to do like the xa-cms-wli name since it's in Forbidden status and not in 404.

        • 1. Re: Application succesfully deployed, but cannot access the local URL
          ctomc

          what does the server.log say?

          • 2. Re: Application succesfully deployed, but cannot access the local URL
            ehugonnet

            xa-cms-admin.war failed to deploy. Do you have openejb in your war ? WildFly uses its own ejb implementation so that might cause a conflict.

            How did you deploy your wars ? From the result i would say the first one was copeid in the standalone/deployments while the second was deployed using the web console. Am I right ?

            Please attach the server logs like ctomc asked.

            • 3. Re: Application succesfully deployed, but cannot access the local URL
              getgolfedkid

              Thank you for answering. Here's my server.log from yesterday :

               

              part 1 : antoine_serverlog_part1 - Pastebin.com

               

              part 2 : antoine_serverlog_part2 - Pastebin.com

               

              They are very long so I started JBoss to get you a fresh and concise server.log, I put it after the screenshot with some explanations.

               

              But it appers xa-cms-wli that was marked "Forbidden" on his URL yesterdat has been undeployed.

              Thus I redeployed it through the management web console but I had now the same error with the names (as shown in the last screenshot of my first response). So I erased .war in the runtime name to deploy it and I get this view in the management console :

               

              Sans titrewli.png

              As you can see there's no content, just as in the admin app.

              Now both URL show me "404 - not found"

               

              Here's the server.log I got this morning : concise_log_antoine - Pastebin.com

               

              The beginning is where i get the naming error in the console. And then when I "corrected" the name so it doesn't show any error. Still nothing works though.

               

              Thank you for helping me. Please ask if you need any more informations of if something I said isn't clear.

               

              Best Regards.

               

              Antoine

              • 4. Re: Application succesfully deployed, but cannot access the local URL
                getgolfedkid

                Indeed what you said is right, I copied the wli app in the deployments folder. However, this morning it has been undeployed contrary to the admin app that I deployed through the web console. Please see my response to ctomc for the details and the server.log

                 

                Concerning the OpenEJB, I have it in both pom.xml of the applications I'm trying to deploy, in the pom.xml of the mother app and thus I have EJB in the java code of the apps.

                 

                Best Regards.

                 

                Antoine

                • 5. Re: Application succesfully deployed, but cannot access the local URL
                  ehugonnet

                  Caused by: java.lang.IllegalArgumentException: WFLYEJB0059: La méthode AroundTimeout, sur la classe org.apache.openejb.monitoring.StatsInterceptor, annotée par @javax.interceptor.AroundTimeout doit renvoyer un type Objet

                      at org.jboss.as.ejb3.deployment.processors.AroundTimeoutAnnotationParsingProcessor.validateArgumentType(AroundTimeoutAnnotationParsingProcessor.java:106)

                      at org.jboss.as.ejb3.deployment.processors.AroundTimeoutAnnotationParsingProcessor.processAroundInvoke(AroundTimeoutAnnotationParsingProcessor.java:86)

                      at org.jboss.as.ejb3.deployment.processors.AroundTimeoutAnnotationParsingProcessor.deploy(AroundTimeoutAnnotationParsingProcessor.java:71)

                      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)

                       ... 5 more

                  You have openejb-core-4.7.3.jar in your war and it seems that the AroundTimeout annotated method should return and Object and that this is not the case for org.apache.openejb.monitoring.StatsInterceptor

                   

                  For wli you are missing the datasource it seems :

                  "jboss.persistenceunit.\"xa-cms-admin.war#xa-cms\" [jboss.naming.context.java.jdbc.\"net.atos.wli.web.cms.xa.DB\"] est manquant"

                   

                  Also you have a 'lot' of xml related jars, maybe you should use the jboss-deployment-structure.xml and depends on WildFly modules instead.

                  • 6. Re: Application succesfully deployed, but cannot access the local URL
                    getgolfedkid

                    Do you know how I could solve the openejb related issue and thus deploy correctly?

                     

                    Concerning the datasource I don't know why the datasource is missing though. I'll try to understand why. The datasources are located in openejb.xml (src) and tomee.xml files (target) at the moment. That's maybe why JBoss cannot find them ?

                     

                    Finally, could you tell me a bit more about the deployment structure you mentioned? I'm gathering docs to see how to do it in the meantime.

                     

                    Thank you very much.

                     

                    Antoine

                    • 7. Re: Application succesfully deployed, but cannot access the local URL
                      ehugonnet

                      Answering here both your comments :

                      * The provided scope in your pom is what you are looking for Also you should depend on the API not the implementation.

                      * openejb.xml and tomee.xml are implementation specific so they won't 'work' in WildFly / EAP. You need to add the datasource (and the jdbc driver) using the jboss-cli or the web console.

                      • 8. Re: Application succesfully deployed, but cannot access the local URL
                        getgolfedkid

                        Thank you for your answers

                         

                        I first tried to put compile in the <scope> tags of both pom.xml (wli and admin). However there were still the exception about OpenEJB.

                        Thus I completely removed dependencies linked to EJB in both pom files, I also added the mySQL JDBC driver through the CLI and the datasource through the Management console.

                         

                        I think both apps were able to be deployed (they were automatically deployed through Eclipse after launghing JBoss, I don't really know why), here's the log : pastebin.com/gMxAzH2w

                         

                        Moreover, the files are now present in the JBOSS_HOME/Standalone/deployments folder.

                         

                        However, I still have a problem because when I go to :

                         

                        http://localhost:8080/xa-cms-admin/      I get "Not Found"

                        http://localhost:8080/xa-cms-wli/      I get "Forbidden"

                         

                        I don't know if it because I didn't do the right things while adding the datasource and the driver or because of something else? Since xa-cms-admin is also linked to the wli datasource.

                         

                        I hope you will be able to help me about this.

                         

                        Best Regards.

                         

                        Antoine

                        • 9. Re: Application succesfully deployed, but cannot access the local URL
                          ehugonnet

                          Ahahah you should have used NetBeans instead

                          Eclipse and NetBeans will use the scanner (well until WildFly 11) because otherwise you can't just update a file in a deployment without rebuilding the whole archive(s).

                          So for the 2nd one we can see a successful deployed application on /xa-cms-wli so from my point of view the 401 error (if i read you correctly) is coming from the application.

                          The xa-cms-admin is a different story as i don't see the success message in your logs.

                          The datasource seems ok otherwise you would not deploy properly during the persistent-unit stage.

                          Without the code it becomes difficult to give more info

                          • 10. Re: Application succesfully deployed, but cannot access the local URL
                            getgolfedkid

                            So if I understand correctly, since xa-cms-wli was successfully deployed it means I now just have to adapt it to JBoss in order to complete the migration and make it work.

                             

                            However there are more problems about the xa-cms-admin since it hasn't really deployed.

                             

                            Please do not hesitate if you have an idea for the admin app but I cannot give the project code since it's not my creation.

                             

                            Since it's already 19:00 here I'll have to leave but I'll be back Monday morning if you have ideas that I can try

                             

                            Best Regards.

                            • 11. Re: Application succesfully deployed, but cannot access the local URL
                              ehugonnet

                              You do know there is a tool called JBoss Windup to help you with this kind of migration right ? Windup Migration Platform

                              Bon week-end

                              • 12. Re: Application succesfully deployed, but cannot access the local URL
                                getgolfedkid

                                Hello!

                                 

                                I've tried to resolve the problem of my admin app this morning. However, the deployments do not work at all. It seems the fact I deleted the EJB dependancies in the pom.xml make both application undeployable. Despite the fact it was working last Friday without EJB.

                                 

                                But, when I put the EJB back in the pom files, and consequently in the war files. I get the same error I was getting at the beginning of this post.

                                 

                                Here's the log about the dependancies error : log_ejb_error - Pastebin.com

                                 

                                I hope you'll be able to help me deploy.

                                 

                                Regards.

                                • 13. Re: Application succesfully deployed, but cannot access the local URL
                                  ehugonnet

                                  The JNDI names in your application are incorrect :

                                  * jboss.naming.context.java.jdbc.\"net.atos.wli.web.cms.xa.DB\" while the name is java:jboss/datasources/jdbc/net.atos.wli.web.cms.xa.DB

                                   

                                  java:jboss/datasources/jdbc/net.atos.wli.web.cms.xa.DB

                                  • 14. Re: Application succesfully deployed, but cannot access the local URL
                                    getgolfedkid

                                    Rather than changing the JNDI name in the apps shouldn't I change java:jboss/datasources/jdbc/net.atos.wli.web.cms.xa.DB to net.atos.wli.web.cms.xa.DB in the datasource of the management console ?

                                    1 2 3 Previous Next