9 Replies Latest reply on Dec 22, 2010 6:38 AM by wolfgangknauf

    How to start unknown software with JBOSS AS?

    fritz_ka_1980

      hi guys,

      im new to this board and new to jboss too

      my boss gave me some java sourcecode without any further information.

      all i know is that is was developed to run with jboss as.

      i am no experienced software engineer but i have to fix some bugs within this software, at least i should try it.

      i read some jboss tutorials but they werent helpful enough for me to compile and start the program

       

      so where should i start searching or do i need some kind of script to launch the program?

       

      please help me

       

      thanks in advance

        • 1. Re: How to start unknown software with JBOSS AS?
          wolfgangknauf

          Hi Fritz,

           

          such a general question is hard to answer ;-). You would have to provide more details about the app.

           

          For development, you might either use Eclipse (with JBossTools plugin: http://www.jboss.org/tools - you might also stick with the "Web Tools Platform" plugin and no JBoss specific plugin), or you might give NetBeans a try.

           

          But probably, the original developer had also his way of building the project, so you might take a look at the files in the project and try to find a clue. Maybe it was no IDE, but Ant or Maven.

           

          Best regards

           

          Wolfgang

          • 2. Re: How to start unknown software with JBOSS AS?
            wdfink

            As WKnauf say there is no short answer.

            First you should know what kind of app you have, only EJB's or a Web application. Different frameworks might be used like STRUTS, JSP ...

             

            For a simple EJB or Web application the Sun (Oracle) tutorials might helpful see java.sun.com

            • 3. Re: How to start unknown software with JBOSS AS?
              peterj

              Some things to look for in the application's source code:

               

              For building:

              a) Is there a build.xml file in the base directory? If so, you built it using Ant ( http://ant.apache.org)

              b) Is there a pom.xml file in the base directory? If so, you build it using Maven (http://maven.apache.org)

               

              For editing (and possibly building):

              c) Is there a .project file, a .classpath file and a .settings directory in the base directory? If so, then the project was edited using Eclipse (http://eclipse.org)

              d) Is there a build.xml file and an nbproject directory in the base directory? If so, then thep roject was edited using NetBeans (http://netbeans.org)

               

              When you build the application, does it result in a .war or .ear file? Or some other file? Eaither way, you deploy it by copying it to the jboss_home/server/xxx/deploy directory (where 'xxx' is the configuration name, usually 'default').

              • 4. Re: How to start unknown software with JBOSS AS?
                fritz_ka_1980

                hey guys, i´ve been a little busy in the last few day

                as peter assumed, there is a build.xml file.i will try to build it using apache.

                jboss.png

                • 5. Re: How to start unknown software with JBOSS AS?
                  wolfgangknauf

                  And there are also ".project" and ".classpath" files. So it is an Eclipse project. You need the "Eclipse IDE for Java EE Developers": http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/heliossr1

                   

                  The "build.xml" can be opened in Eclipse, and here you can start the ant task, too. No need to separately install Ant (though Peter dislikes IDEs for building/deploying ;-))

                   

                  Maybe you need more plugins for Eclipse to work. The files in ".settings" might provide some hints.

                   

                  Best regards

                   

                  Wolfgang

                   

                  Best regards

                   

                  Wolfgang

                  • 6. Re: How to start unknown software with JBOSS AS?
                    nickarls

                    The content of the WEB-INF\lib might also give hints as to what technologies are being used

                    • 7. Re: How to start unknown software with JBOSS AS?
                      fritz_ka_1980

                      hey guys,

                      i fiddled around with the sourcecode for a little  while. by now i can say i dont like sourcecode without any comments or  documentation -_-

                      eclipse shows me a lot of errors like "entity cannot resolved to a type" and trying to run the build.xml, i get s.th. like C:\var\opt\jboss\jboss-4.2.3.GA\client not found.

                      the  first errors seem to have to do s.th. with the persistence.jar, the  second looks like it was created with linux os in the first place

                       

                      this is the content of the spk/.settings

                      1.jpg

                      @ nicklas,

                      this is the content of the web-inf/lib

                      any interesting hints in there?

                      2.jpg

                      • 8. Re: How to start unknown software with JBOSS AS?
                        nickarls

                        Please post full stacktraces from logs.

                        Update your eclipse project settings and build file to reflect the paths to the application server

                        You appear to have a Struts 2 application with freemarker templating, some graph navigation language stuff(?) and some xwork dependency injection(?)

                        • 9. Re: How to start unknown software with JBOSS AS?
                          wolfgangknauf

                          As there is a file "org.eclipse.wst.common.project.facet.core.xml" in your ".settings" directory, I assume that you have at least the "WebToolsPlatform" plugin. So, you need the "Eclipse IDE for Java EE Developers" flavor of the Eclipse downloads.

                           

                          Here, you have to configure your JBoss server: go to Menu "Window" =>  "Preferences" => "Server" => "Runtime Environments" and add your JBoss installation.

                          Next, in your projects, go to the "Properties" => "Java Build Path" => tab "Libraries". Click "Add Library" => "Server runtime" => select the recently created JBoss runtime. By the way: if using Eclipse 3.6.1, you should restart eclipse before this step - I found that the libraries of the server runtime are not updated correctly.

                          Now, the compilation errors in your project should be gone.

                           

                          Best regards

                           

                          Wolfgang