You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Manaster, Carl" <Ca...@ACTIVX.com> on 2006/04/27 23:16:44 UTC

Applet communication with Turbine 2.3.2

Hi,

A little background first.  We are in the process of upgrading from an
older version of Turbine.  I am new to all of these technologies -
turbine, torque, velocity, tomcat - and find it all quite confusing.
But I'm mostly getting by.

Simultaneous with our upgrade, I was developing a little applet that
sits in a turbine-generated web page and communicates with a servlet
that uses turbine to talk to the database.  My understanding is that
applets aren't allowed to talk directly to the database because of web
security issues, but that's just another matter I don't understand very
well.  Anyway, before our conversion the applet and servlet I had
written were working pretty well together.  Now they do not; the servlet
fails to load.  I'll toss the exception report onto the end of this
message.

My servlet class inherits from BaseTurbineServlet, a homegrown (but not
by me) subclass of HttpServlet that provides access to turbine services.
To make BaseTurbineServlet compile I had to comment out init(), which
looked like this:

public final void init(RunData data) {
  if (Turbine.firstDoGet) {
    synchronized (Turbine.class) {
      if (Turbine.firstDoGet) {
        log("Turbine: Starting HTTP initialization of services");
        TurbineServices.getInstance().initServices(data);
        log("Turbine: Completed HTTP initialization of services");
        // Mark that we're done.
        Turbine.firstDoGet = false;
      }
    }
  }
}

and I suspect that some of this may have been important.  But it really
looks like the class is failing to load, not failing to initialize, if
that's a meaningful distinction.  I've got web.xml configured to point
to this class, this class is really there in the right place in the
classes hierarchy.  I don't know what's wrong or how to fix it or how to
find out how to fix it.  If you do, please share.

Thanks.

Peace,
--Carl

------------------
Carl Manaster
ActivX Biosciences
carlm@activx.com
858/526-2514 

------------------------------------------------------------------------

ERROR [http-8080-Processor24] (StandardWrapperValve.java:145) - Allocate
exception for servlet AssayServlet
java.lang.NullPointerException
	at
org.apache.log4j.spi.LocationInfo.<init>(LocationInfo.java:95)
	at
org.apache.log4j.spi.LoggingEvent.getLocationInformation(LoggingEvent.ja
va:182)
	at
org.apache.log4j.helpers.PatternParser$LocationPatternConverter.convert(
PatternParser.java:475)
	at
org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:5
6)
	at org.apache.log4j.PatternLayout.format(PatternLayout.java:495)
	at
org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:292)
	at
org.apache.log4j.RollingFileAppender.subAppend(RollingFileAppender.java:
225)
	at
org.apache.log4j.WriterAppender.append(WriterAppender.java:150)
	at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
	at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(Ap
penderAttachableImpl.java:57)
	at org.apache.log4j.Category.callAppenders(Category.java:187)
	at org.apache.log4j.Category.forcedLog(Category.java:372)
	at org.apache.log4j.Category.log(Category.java:864)
	at
org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:193)
	at
org.apache.catalina.core.ApplicationContext.log(ApplicationContext.java:
667)
	at
org.apache.catalina.core.ApplicationContextFacade.log(ApplicationContext
Facade.java:269)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
a:1141)
	at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:7
57)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:130)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)
	at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:432)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86
9)
	at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:667)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)
	at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:80)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)
	at java.lang.Thread.run(Thread.java:595)

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org