1 2 3 Previous Next 39 Replies Latest reply on May 22, 2017 11:32 AM by getgolfedkid Go to original post
      • 15. Re: Application succesfully deployed, but cannot access the local URL
        ehugonnet

        the prefix is defined per specifications.

        This "jboss.naming.context.java.jdbc." is quite strange and feels like a typo somewhere

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

          What do you mean by "defined per specifications".

           

          I'll try to find where is the generation of the jboss.naming.context.java.jdbc

           

          By the way, since I deleted all the EJB dependancies in my pom files, obviously a lot of my java classes contain errors. Is there a way to allow EJB to be imported by my classes but ignored in the war file to enable deployment ?

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

            Scope provided in maven.

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

              Indeed, I tried to use this scope but I still get the dependancies errors that are related to JNDI.

               

              I just did the log again if you want to take a look at it but it's the same as yesterday : dependancies_log - Pastebin.com

               

              As you stated before, the problem might be the JNDI name that's not correct. I'll try to correct that but if you have any other suggestion to solve the problem I'll be happy to try it.

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

                1/ Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.undertow.deployment.default-server.default-host./.session is already registered <-- It seems that you have the same war deployed twice.

                2/ Could you share your persistence-unit.xml ?

                3/ Could you remove the test applications like jboss-numberguess.war and jboss-helloworld.war

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

                  I removed jboss-numberguess.war and jboss-helloworld.war

                   

                  Concerning the duplicate problem, I checked in my standalone/deployments folder and only my two .war files are here with their respective .dodeploy file when I clean the server. I also checked the web console but they were no .war displayed, so I don't know where the duplicate could be.

                   

                  Here's my persistence.xml file :

                   

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

                  <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">

                    <persistence-unit name="xa-cms" transaction-type="JTA">

                      <provider>org.hibernate.ejb.HibernatePersistence</provider>

                      <jta-data-source>jdbc/net.atos.wli.web.cms.xa.DB</jta-data-source>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.t####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <class>net.atos.wli.web.cms.xa.core.model.####.####</class>

                      <properties>

                        <property name="hibernate.ejb.cfgfile" value="hibernate/xa-cms-core.cfg.xml" />

                      </properties>

                    </persistence-unit>

                  </persistence>

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

                    What's in hibernate/xa-cms-core.cfg.xml ?

                     

                    Also stop the server and remove the $JBOSS_HOME/standalone/data folder

                     

                    Do you have any jndi.properties in your war ?

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

                      Here's the content of the xa-cms-core.cfg.xml file :

                       

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

                      <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

                       

                       

                      <hibernate-configuration>

                        <session-factory>

                          <property name="hibernate.transaction.manager_lookup_class">org.apache.openejb.hibernate.TransactionManagerLookup</property>

                          <property name="hibernate.dialect">${hibernate.dialect}</property>

                          <property name="hibernate.hbm2ddl.auto">update</property>

                          <property name="hibernate.show_sql">false</property>

                          <property name="hibernate.format_sql">false</property>

                          <!--property name="hibernate.cache.provider_class">net.sf.ehcache.hibernate.EhCacheProvider</property-->

                        </session-factory>

                      </hibernate-configuration>

                       

                       

                      I stopped the server, removed the folder, and started the server again, however the duplicate exceptions were still there.

                       

                      And there are no jndi.properties file in the war

                       

                      EDIT : I think it may come from the datasource since I cannot connect to it, it's the same used in the tomEE version so I don't really know why it cannot be reached here. I maybe have done mistakes in the configuration of the datasource.

                      jndico.png

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

                        <property name="hibernate.transaction.manager_lookup_class">org.apache.openejb.hibernate.TransactionManagerLookup</property> <----- You are in WildFly, you shouldn't use this.

                        I'm not even sure you need this configuration file, so maybe you should remove it from the persistence-unit and from the war.

                         

                        Also all the classes are in net.atos.wli.web.cms.xa.core.model. shouldn't they be in a package with admin since we are talking about the admin war?

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

                          Ok, is the driver installed ? Could you share your standalone(-full).xml ?

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

                            To install the driver I put the driver's jar in JBOSS_HOME/modules/com/mysql/main with the following module.xml file :

                             

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

                            -<module name="com.mysql" xmlns="urn:jboss:module:1.0"> -<resources> <resource-root path="mysql-connector-java-5.1.42-bin.jar"/> </resources> -<dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/> <module name="javax.transaction.api"/>

                            <!-- See * below -->

                            </dependencies> </module>

                             

                            Here's the standalone-full file : standalone_full - Pastebin.com

                             

                            And the standalone file : standalone - Pastebin.com

                             

                            I'll see what changes when I delete the config file we were talking about before.

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

                              <driver>mysql-connector-java-5.1.42-bin</driver>

                              <driver name="mysql">

                              Doesn't match !

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

                                Indeed I changed it not long ago to see if it would make a differene, however it was <driver>mysql<driver> before and I changed it back again^^

                                 

                                But, I found out the URL to the datasource I'm trying to connect to isn't available at all (can't ping it).

                                 

                                So I created a new datasource with the same JNDI name as the previous datasource (I deleted the previous one aswell) and now I have a connection to my database.

                                kekmysql.png

                                However, I still have the same problems when launching the server, even though my base connection is enabled.

                                 

                                Here's the log, it's still the same JNDI problem : log - Pastebin.com

                                 

                                16:15:58,014 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: L'opération ("deploy") a échoué - adresse : ([("deployment" => "xa-cms-admin.war")]) - description de l'échec : {"WFLYCTL0180: Services avec des dépendances manquantes/non disponibles" => [

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

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

                                ]}

                                 

                                I tried to change the JNDI name to just java:jboss/net.atos.wli.web.cms.xa.DB but it didn't change anything.

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

                                  Could you paste your web.xml file ?

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

                                    Here's the file for the admin app :

                                     

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

                                    <!DOCTYPE web-app

                                            PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

                                            "http://java.sun.com/dtd/web-app_2_3.dtd">

                                    <web-app id="cms-admin">

                                        <display-name>xa-cms-admin Tapestry 5 Application</display-name>

                                        <context-param>

                                            <!-- The only significant configuration for Tapestry 5, this informs Tapestry

                                    of where to look for pages, components and mixins. -->

                                            <param-name>tapestry.app-package</param-name>

                                            <param-value>net.atos.wli.web.cms.xa.admin</param-value>

                                        </context-param>

                                        <filter>

                                            <filter-name>app</filter-name>

                                            <filter-class>org.apache.tapestry5.TapestryFilter</filter-class>

                                        </filter>

                                        <filter-mapping>

                                            <filter-name>app</filter-name>

                                            <url-pattern>/*</url-pattern>

                                        </filter-mapping>

                                    </web-app>