getting ERROR: 503 Could not instantiate class org.jpublish.servlet.JPublishServlet

58 views
Skip to first unread message

nitish nitish

unread,
Sep 5, 2007, 4:17:14 AM9/5/07
to jpos-...@googlegroups.com
Hi All,

I am getting following exception, while I am trying to open login page(http://localhost:8080/login.html).

 [java] javax.servlet.UnavailableException: Could not instantiate class org.
jpublish.servlet.JPublishServlet
     [java]     at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.
java:333)
     [java]     at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebA
pplicationHandler.java:294)
     [java]     at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandle
r.java:567)
     [java]     at org.mortbay.http.HttpContext.handle(HttpContext.java:1723)
     [java]     at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApp
licationContext.java:514)


Could you please help me out?

Thanks,
Nitish
 

nitish nitish

unread,
Sep 6, 2007, 12:35:12 AM9/6/07
to jpos-...@googlegroups.com

Any clue?

chhil

unread,
Sep 6, 2007, 12:37:14 AM9/6/07
to jpos-...@googlegroups.com
Please make sure the jpublish jar files are in the classpath and/or in the location where jetty looks for jars.

-chhil

On 9/5/07, nitish nitish < nitish...@gmail.com > wrote:
Hi All,

I am getting following exception, while I am trying to open login page( http://localhost:8080/login.html).

nitish nitish

unread,
Sep 6, 2007, 1:09:21 AM9/6/07
to jpos-...@googlegroups.com
Hi ,
All the jars are in /build/lib folder and jetty also looks all the jars in same folder.If it's class path problem than it should throw "Class not found exception".Is it coming due to wrong version of jar?

--Nitish

nitish nitish

unread,
Sep 6, 2007, 5:13:44 AM9/6/07
to jpos-...@googlegroups.com
Hi,
I tried every thing ,but no luck.I unjared jpublish and jetty and made one jar,but  it's still
 throwing same exception.

 
  [java] 14:39:46.546 WARN!! Exception for /jposee/

  [java] javax.servlet.UnavailableException : Could not instantiate class org.jpublish.servlet.JPublishServlet
  [java]     at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:333)

  [java]     at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch (WebApplicationHandler.java:294)
  [java]     at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)

  [java]     at org.mortbay.http.HttpContext.handle(HttpContext.java:1723)
  [java]     at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:514)
 
If any one of you have any idea than please help me.

Thanks,
Nitish

nitish nitish

unread,
Sep 6, 2007, 5:44:05 AM9/6/07
to jpos-...@googlegroups.com
one more error i found in q2.log:

<log realm="jetty" at="Thu Sep 06 14:37:25 GMT+05:30 2007.937">
  <warn>
    start
    <exception name="Multiple exceptions">
    org.mortbay.util.MultiException[javax.servlet.ServletException: org/apache/commons/collections/map/LRUMap]
    at org.mortbay.http.HttpServer.start(HttpServer.java:640)
    at org.jpos.q2.jetty.Jetty.startService (Jetty.java:18)
    at org.jpos.q2.QBeanSupport.start(QBeanSupport.java:96)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java :39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke (StandardMetaDataImpl.java:414)
    at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
    at org.jpos.q2.QFactory.startQBean(QFactory.java:206)
    at org.jpos.q2.Q2.start(Q2.java:404)
    at org.jpos.q2.Q2.deploy(Q2.java :244)
    at org.jpos.q2.Q2.start(Q2.java:174)
    at org.jpos.q2.Q2.main(Q2.java:579)
    </exception>
  </warn>
</log>

Nitish

unread,
Sep 6, 2007, 9:33:51 AM9/6/07
to jPOS Users
Hi

When the ant run target is executed the following warning is
generated, looks like the ehcahce module requires an XML config file,
which is missing, this most likely looks like is causing the

org.mortbay.util.MultiException[javax.servlet.ServletException:org/
apache/commons/collections/map/LRUMap]

since LRUMap will be used in caching applications,

[java] 18:41:26,812 WARN Configurator:125 - No configuration
found. Configuring ehcache from ehcache-failsafe.xml found in the
classpath: jar:file:/D:/jposee/build/lib/ehcache-0.9.jar!/ehcache-
failsafe.xml
[java] 18:41:27,703 WARN EhCacheProvider:97 - Could not find
configuration [net.sf.hibernate.cache.UpdateTimestampsCache]; using
defaults.
[java] 18:41:27,734 WARN EhCacheProvider:97 - Could not find
configuration [net.sf.hibernate.cache.StandardQueryCache]; using
defaults.


Guys, It will really help if you could help me out here, I am really
stuck

Thanks
Nitish

Andres Alcarraz

unread,
Sep 6, 2007, 9:46:59 AM9/6/07
to jpos-...@googlegroups.com
Well I allways receive this warning, but I don't remember to have faced your error, could you give us the listo of modules you are using?, it may be caused for a wrong combination of jetty and jpublish modules.
May be the jpublish jar is not in the jposee/WEB-INF/lib directory where the libraries used by the web application should be? in this case would be a CLassLoader problem, I think web servers in general use a different class loader for each application so that each could have their own dependencies, but I may be wrong.

Good Luck.


2007/9/6, Nitish <nitish...@gmail.com>:

nitish nitish

unread,
Sep 6, 2007, 10:08:14 AM9/6/07
to jpos-...@googlegroups.com
Hi,

I am using following modules:
eecore
eetxn
eeweb
hibernate
hibernate_sql
jetty
jpublish
server and client simulator.

jpublish is already in /lib dir.I  copied all the jar in WEBINF/lib directory,but it couldn't help .Can you please
suggest which version should i use or if u can send me your jpublish and jetty combination that will really help me.

Thanking you in advance.
--Nitish

Florin T.PATRASCU

unread,
Sep 6, 2007, 10:45:48 AM9/6/07
to jpos-...@googlegroups.com
hi there,

Most probably there are some jar files missing or a combination of wrong file access permissions? Please be sure you have the EHCache library in the lib dir (where jpublish.jar is) You can download it from JPublish' SVN: http://jpublish.googlecode.com/svn/trunk/lib/ehcache-1.2.2.jar  (JPublish is using EHCache as the default cache manager)

To check if your jetty standalone is properly configured, download the JPublish hello-world app from here: http://jpublish.googlecode.com/files/hello.war.zip, and try to validate first that Jetty and JPublish works properly with your settings.

You are on Windows, correct? And I suppose " WEBINF/lib " is just a typo in your email, otherwise the correct folder should be: WEB-INF ?!

V/r
-florin



On 9/6/07, nitish nitish <nitish...@gmail.com> wrote:

Alejandro Revilla

unread,
Sep 6, 2007, 11:31:45 AM9/6/07
to jpos-...@googlegroups.com
Hey Florin, welcome!

For those of you that do not know Florin, he's the JPublish project lead
and it's quite an honor to have him around. Thank you for your
participation in our list!

For those of you doing web development and not using JPublish, you
should consider visiting http://code.google.com/p/jpublish

--Alejandro

Florin

unread,
Sep 13, 2007, 7:45:47 AM9/13/07
to jPOS Users
Thank you for your kind words Alejandro. As you know I am trying to
learn about jPOS and where is the best place to learn if not from it's
own user community. Indeed, regarding JPublish, guys please feel free
to ask questions, suggest ideas, even criticizing it :) I will be glad
to answer and participate in any discussions that help our products be
better for you.

Thanks again!
-florin

Reply all
Reply to author
Forward
0 new messages