• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Resin-2.1.6 configuration problem

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having trouble adding my own servlet to Resin. I'm running Resin-2.1.6 which I installed in /usr/local/resin ($RESIN_HOME). I have the base install with only these modifications in resin.conf:
<http port='80'/>
<web-app id='helloworld'/>
I added added these two files (creating directories where needed):
$RESIN_HOME/doc/helloworld/WEB INF/classes/hello/HelloWorld.java
$RESIN_HOME/doc/helloworld/WEB-INF/web.xml
web.xml contains:
<web-app>
<servlet-mapping url-pattern='/servlet/*' servlet-name='invoker'/>
</web-app>
When I browse
http://localhost/helloworld/servlet/hello.HelloWold I get the following errors:
com.caucho.java.CompileClassNotFound: compiling hello.HelloWorld didn't produce a .class
at
com.caucho.java.CompilingClassLoader.getClassEntry(CompilingClassLoader.java:245)
at
com.caucho.util.DynamicClassLoader.findClass(DynamicClassLoader.java:558)
at
com.caucho.util.DynamicClassLoader.loadClass(DynamicClassLoader.java:510)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.beans.Beans.instantiate(Beans.java:187)
at java.beans.Beans.instantiate(Beans.java:48)
at
com.caucho.server.http.Application.instantiateServlet(Application.java:3170)
at
com.caucho.server.http.Application.createServlet(Application.java:3093)
at
com.caucho.server.http.Application.loadServlet(Application.java:3054)
at
com.caucho.server.http.QServletConfig.loadServlet(QServletConfig.java:418)
at
com.caucho.server.http.Application.getFilterChainServlet(Application.java:2794)
at
com.caucho.server.http.Application.buildFilterChain(Application.java:2750)
at
com.caucho.server.http.Invocation.service(Invocation.java:310)
at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:244)
at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
at
com.caucho.server.TcpConnection.run(TcpConnection.java:137)
at java.lang.Thread.run(Thread.java:536)
The funny thing is that it acually compiles and places the class file in $RESIN_HOME/doc/helloworld/WEB-INF/classes/test/HelloWorld.class.
I can't figure out what I'm doing wrong?
Thanks,
Scott
 
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks like a package problem. Have you tried removing the package statement from source? My reasoning for thinking this is the following two statements you made:

I added added these two files (creating directories where needed):
$RESIN_HOME/doc/helloworld/WEB INF/classes/hello/HelloWorld.java
$RESIN_HOME/doc/helloworld/WEB-INF/web.xml


and

The funny thing is that it acually compiles and places the class file in $RESIN_HOME/doc/helloworld/WEB-INF/classes/test/HelloWorld.class.

 
Chicken Farmer ()
Posts: 1932
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks like he's putting the class in package test, but expecting it to be in package hello. I wouldn't necessarily remove the package statement, but verify that you are declaring the package correctly.
 
Scott Glaser
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Duh, your both right. I completely over looked the package statement. Thanks!
 
Good heavens! What have you done! Here, try to fix it with this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic