Results 1 to 9 of 9

Thread: Using struts in dm server gives http status 503 error

  1. #1
    Join Date
    Mar 2010
    Posts
    12

    Default Using struts in dm server gives http status 503 error

    Hi,

    I developed an enterprise application using spring, struts and hibernate, now I want to transfer it to work with OSGi dm server.

    I found a book "Pro SpringSource dm server" where the author has explained a way to migrate WAR to OSGi bundles. I successfully migrated the application given in book.

    The first step of migration says that remove the lib folder in WEB-INF directory and import all the relevant packages. I did the same. Application has been successfully deployed in the dm server.

    But when I tried to connect to URL it is giving me the error:

    SpringSource dm Server - Error report

    HTTP Status 503 - Servlet action is currently unavailable

    type: Status report message: Servlet action is currently unavailable

    description: The requested service (Servlet action is currently unavailable) is not currently available.
    What could be the reason for this?

    I am out of clues to solve this issue. Can you pass any help you may have.

    Thanks in anvance.

  2. #2
    Join Date
    Oct 2008
    Location
    Winchester, UK
    Posts
    535

    Default

    Look in serviceability/logs/log.log to see if there is a stack trace or other error to give you a clue about the cause of the failure. Once you see something, try googling it as vanilla Tomcat users may have hit the same problem. If it's class loading or resource finding related, then you have to start scratching your head and asking whether you have the correct set of package imports and exports in your bundles.

    Hope that helps!
    Glyn Normington
    SpringSource

  3. #3
    Join Date
    Mar 2010
    Posts
    12

    Default

    Thanks Gyln.

    I looked into the serviceability\logs\logging.log; Below is the log.

    [2010-04-07 09:45:48.411] main <SPKB0001I> Server starting.
    [2010-04-07 09:46:04.849] main <SPOF0001I> OSGi telnet console available on port 2401.
    [2010-04-07 09:46:26.587] main <SPKE0000I> Boot subsystems installed.
    [2010-04-07 09:46:29.624] main <SPKE0001I> Base subsystems installed.
    [2010-04-07 09:46:31.706] server-dm-14 <SPPM0000I> Installing profile 'web'.
    [2010-04-07 09:46:33.756] server-dm-14 <SPPM0001I> Installed profile 'web'.
    [2010-04-07 09:46:34.523] server-dm-5 <SPSC0001I> Creating HTTP/1.1 connector with scheme http on port 8080.
    [2010-04-07 09:46:36.323] server-dm-5 <SPSC0001I> Creating HTTP/1.1 connector with scheme https on port 8443.
    [2010-04-07 09:46:36.339] server-dm-5 <SPSC0001I> Creating AJP/1.3 connector with scheme http on port 8009.
    [2010-04-07 09:46:36.386] server-dm-5 <SPSC0000I> Starting ServletContainer.
    [2010-04-07 09:46:44.041] server-dm-11 <SPPM0002I> Server open for business with profile 'web'.
    [2010-04-07 09:46:46.185] Deployer Recovery <SPSC1000I> Creating web application '/'.
    [2010-04-07 09:46:46.921] async-delivery-thread-1 <SPSC1001I> Starting web application '/'.
    [2010-04-07 09:46:48.909] Deployer Recovery <SPDE0010I> Deployment of 'com.springsource.server.servlet.splash' version '1.0.2.SR02' completed.
    [2010-04-07 09:46:51.664] Deployer Recovery <SPSC1000I> Creating web application '/admin'.
    [2010-04-07 09:46:52.102] async-delivery-thread-1 <SPSC1001I> Starting web application '/admin'.
    [2010-04-07 09:46:52.806] Deployer Recovery <SPDE0010I> Deployment of 'com.springsource.server.servlet.admin' version '1.0.2.SR02' completed.
    [2010-04-07 09:46:57.346] fs-watcher <SPDE0048I> Processing 'INITIAL' event for file 'server.admin.splash-1.0.2.SR02.jar'.
    [2010-04-07 09:46:57.534] fs-watcher <SPDE0031I> File 'server.admin.splash-1.0.2.SR02.jar' already deployed.
    [2010-04-07 09:46:57.534] fs-watcher <SPDE0048I> Processing 'INITIAL' event for file 'server.admin.web-1.0.2.SR02.jar'.
    [2010-04-07 09:46:57.549] fs-watcher <SPDE0031I> File 'server.admin.web-1.0.2.SR02.jar' already deployed.
    [2010-04-07 09:47:51.303] Connection(7)-127.0.0.1 <SPSC1000I> Creating web application '/LibTEMgt'.
    [2010-04-07 09:47:51.350] async-delivery-thread-1 <SPSC1001I> Starting web application '/LibTEMgt'.
    [2010-04-07 09:47:53.135] Connection(7)-127.0.0.1 <SPDE0010I> Deployment of 'LibTEMgt' version '0' completed.
    ------------
    As seen there is no error, last three line shows that deployment completed succesfully.
    Then where could be the error? Could you pass any pointer on this?

    I heard about Struts OSGi plugin. Is it required to run my application?

    Thanks in advance
    Gohil

  4. #4
    Join Date
    Oct 2008
    Location
    Winchester, UK
    Posts
    535

    Default

    Hmmm. That log actually looks like the event log which is in serviceability/eventlogs/eventlog.log.

    The diagnostic log serviceability/logs/log.log contains entries like this:
    Code:
    [2010-04-06 11:20:49.835] startup-tracker              com.springsource.osgi.medic.eventlog.default                     KE0001I Kernel starting.
    Please confirm that you really are looking at serviceability/logs/log.log.

    If so, have you changed the file config/serviceability.xml?
    Glyn Normington
    SpringSource

  5. #5
    Join Date
    Mar 2010
    Posts
    12

    Default

    Thanks Glyn again.

    There is no entry for
    • serviceability/eventlogs/eventlog.log
    • config/serviceability.xml

    as I am using dm server version 1.0.2.SR02 and haven't changed anything in config directory and I posted the entry of serviceability\logs\logging.log previously.

    However I found something in serviceability\trace\LibTEMgt-0\trace.log;

    Attaching trace.log file as I am not able to post of too long contents in the file (This file contains all the execution that I did with application but I am posting only last execution trace of application)

    I found eventlog.log and serviceability.xml entries in dm server version 2.

    So I am trying to deploy app. in dm server version 2. Does it make any difference?

    Thanks in advance,
    Gohil
    Attached Files Attached Files

  6. #6
    Join Date
    Oct 2008
    Location
    Winchester, UK
    Posts
    535

    Default

    It probably won't make much difference deploying in dm Server 2, but at least I won't confuse you by talking different terminology!

    trace.log in v1 became log.log in v2.

    So, did you find anything suitably suspicious in the trace.log you attached?
    Glyn Normington
    SpringSource

  7. #7
    Join Date
    Mar 2010
    Posts
    12

    Default

    I found:

    Code:
    [2010-04-07 14:20:01.575] async-delivery-thread-1             org.springframework.web.context.ContextLoader.unknown E Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'applicationUserMgr' defined in ServletContext resource [/WEB-INF/applicationContext-service.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.orm.hibernate.HibernateTransactionManager] for bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/applicationContext-persistence-hibernate.xml]; nested exception is java.lang.ClassNotFoundException.....
    and

    Code:
    2010-04-07 14:20:01.825] async-delivery-thread-1  e.[springsource.server.catalina].[localhost].[/LibTEMgt].unknown I Marking servlet action as unavailable
    [2010-04-07 14:20:01.825] async-delivery-thread-1  e.[springsource.server.catalina].[localhost].[/LibTEMgt].unknown E Servlet /LibTEMgt threw load() exception
    javax.servlet.UnavailableException
    	at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:880).....
    First one says that it is not able to find class for particular bean but I am not able to figure out second one.

    Could you put your pointer on this?

    Thanks in advance,
    Gohil

  8. #8
    Join Date
    Mar 2010
    Posts
    12

    Default

    Hi Glyn,

    Thanks a lot for your help...

    I analyzed the trace.log and now I am successfully able to run application though it is giving me some error on database connection but I think I will solve it.


    Thanks,
    Gohil

  9. #9
    Join Date
    Oct 2008
    Location
    Winchester, UK
    Posts
    535

    Default

    Glad to hear you are making progress. Please post back here if you learn any general lessons that could benefit others.
    Glyn Normington
    SpringSource

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •