11 Replies Latest reply on May 14, 2014 8:48 AM by Veeraprathaban Rajamani

    Jboss 7.1 deployment Issue

    thenmozhi v Newbie

      Hi,

       

      I'm new to Jboss and im try to migrate the existing Jboss 4 to Jboss 7.1. Im facing many issues which been listed below

       

      1. I have application specific config files including log4j.xml), where i need to place all these files in Jboss 7.1

       

      2.  When i try to deploy the below warning occurs

      18:28:51,472 WARN  [org.jboss.as.ee] (MSC service thread 1-3) JBAS011001: Could not resolve resource-env-ref java:/PIDataSourceJNDI


      3. The server throws exception related all the listeners specified in my web.xml


      Please anyone help me out in resolving the above issues


        • 1. Re: Jboss 7.1 deployment Issue
          Filippe Spolti Novice

          Did you create a datasource into standalone.xml?

          • 2. Re: Jboss 7.1 deployment Issue
            thenmozhi v Newbie

            I created the data source through Jboss console

            • 3. Re: Jboss 7.1 deployment Issue
              Lalit Shaktawat Newbie

              Hi Thenmozhi

               

              log4j.xml file used for starting of server only. It is having information about variables and path. So this is not a matter. You can deploy your project simply by moving your files from source to deployment folder. i.e. /standalone/deployment and restart your server.

              check execution of server INFO / WARN message.

               

              If any problem persist share log files.

               

              Lalit

              • 4. Re: Jboss 7.1 deployment Issue
                thenmozhi v Newbie

                Hi Lalit,

                 

                Could you please provide the steps to use my own log4j.xml in Jboss 7.1

                • 5. Re: Jboss 7.1 deployment Issue
                  Lalit Shaktawat Newbie

                  Hi thenmozhi

                   

                  I found that on mine JBoss. I am having a structure of folder is /standalone/log. inside log I am having boot.log file. It is having all the information about boot login. When server will start to run. It pickup this file and start run. So please check your logfile information with this and compare. Accordingly changes will made. This is a first method. Another one is deploy your project as it is on deployment folder /standalone/deployment. Then start your server. Check for any error. If persist share your log files ( Server.log ).

                   

                  Note : As you shown that JNDI warning message. it comes when you are trying to deploy non compatible driver. Check driver information and trying to drop a compatible driver on deployment folder.

                   

                  May both method will be work fine for you.

                   

                  Lalit.

                  • 6. Re: Jboss 7.1 deployment Issue
                    thenmozhi v Newbie

                    HI Lalit,

                     

                    Thanks for your information. Below is the exception i'm getting while deploying the application

                     

                    14:46:22,450 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/myproj]] (MSC service thread 1-2) StandardWrapper.Throwable: java.lang.NoClassDefFoundError: org/apache/log4j/Logger

                      at com.util.LogManager.<clinit>(LogManager.java:42) [fwklog.jar:]

                      at com.util.FWKLogManagerUtil.<clinit>(FWKLogManagerUtil.java:43) [fwklog.jar:]

                      at com.myproj.classes.CustomActionServlet.init(CustomActionServlet.java:116) [custom.jar:]

                      at javax.servlet.GenericServlet.init(GenericServlet.java:242) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.13.Final.jar:]

                      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.13.Final.jar:]

                      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655) [jbossweb-7.0.13.Final.jar:]

                      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873) [jbossweb-7.0.13.Final.jar:]

                      at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) [rt.jar:1.6.0]

                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [rt.jar:1.6.0]

                      at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0]

                    • 7. Re: Jboss 7.1 deployment Issue
                      Kuldeep Sharma Novice

                      Create a jboss-deployment-structure.xml under WEB-INF/  directory and exclude JBoss Log4j. Add log4j jar file to your app's WEB-INF/lib directory.

                      Sample :

                      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
                      <deployment>
                        
                      <exclusions>
                        
                      <module name="org.apache.log4j"/>
                        
                      </exclusions>
                      </deployment>


                      Finally add this parameter "-Dorg.jboss.as.logging.per-deployment=false "in the VM.


                      Thanks!!

                      • 8. Re: Jboss 7.1 deployment Issue
                        thenmozhi v Newbie

                        Hi Kuldeep,

                         

                        I had implemented the abode steps you mentioned. But while deploying the application i get the below error message

                         

                        java.lang.NullPointerException

                          at com.util.FWKLogManagerUtil.setLogLevel(FWKLogManagerUtil.java:137) [fwklog.jar:]

                          at com.util.FWKLogManagerUtil.<clinit>(FWKLogManagerUtil.java:45) [fwklog.jar:]

                         

                        Its not picking up my log4j.properties file

                        • 9. Re: Jboss 7.1 deployment Issue
                          thenmozhi v Newbie

                          Hi All,

                           

                          Thanks for your valuable information.

                           

                          I followed the steps mentioned in the below link for loading log4j and Its worked !!!

                          http://stackoverflow.com/questions/14182257/using-applications-log4j-configuration-under-jboss-7-1-1

                          • 10. Re: Jboss 7.1 deployment Issue
                            Kuldeep Sharma Novice

                            Good to know that finally  it works .

                            • 11. Re: Jboss 7.1 deployment Issue
                              Veeraprathaban Rajamani Newbie

                              Hi Thenmozhi,

                               

                                 trying to write log file.

                               

                              First created log4j.xml inside WEB-INF dir

                              Then created jboss-deployment-structure.xml

                              <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">

                                  <deployment>

                                      <exclusions>

                                          <module name="org.apache.log4j" />

                                      </exclusions>

                                  </deployment>

                               

                                  <sub-deployment name="mnApi.war">

                                      <exclusions>

                                          <module name="org.apache.log4j" />

                                      </exclusions>

                                  </sub-deployment>

                              </jboss-deployment-structure>

                               

                               

                              But still not creating log file can you some suggestions.

                               

                              Thanks in advance.

                               

                              Regards,

                              Veeraprathaban.R