Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Turbine startup failure

Status
Not open for further replies.

Baojong

Programmer
Joined
Jul 7, 2005
Messages
1
Location
GB
Hi everyone,
When I startup tomcat I keep getting this turbine failed to init message -

Turbine: Turbine: init() failed: java.lang.NullPointerException
at org.apache.turbine.services.logging.TurbineLoggingService.getL
onfig(TurbineLoggingService.java:153)
at org.apache.turbine.services.logging.TurbineLoggingService.init
eLoggingService.java:127)
at org.apache.turbine.services.TurbineBaseService.init(TurbineBas
e.java:108)
at org.apache.turbine.services.BaseInitableBroker.initClass(BaseI
Broker.java:150)
at org.apache.turbine.services.BaseServiceBroker.initService(Base
Broker.java:134)
at org.apache.turbine.services.TurbineServices.initPrimaryService
neServices.java:177)
at org.apache.turbine.Turbine.init(Turbine.java:182)
at org.apache.turbine.util.TurbineConfig.init(TurbineConfig.java:
at com.bfg.services.TurbineInit.init(TurbineInit.java:17)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardW
java:888)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.
6)
at org.apache.catalina.core.StandardContext.loadOnStartup(Standar
t.java:3363)
at org.apache.catalina.core.StandardContext.start(StandardContext
586)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.jav

at org.apache.catalina.core.StandardHost.start(StandardHost.java:
at org.apache.catalina.core.ContainerBase.start(ContainerBase.jav

at org.apache.catalina.core.StandardEngine.start(StandardEngine.j
)
at org.apache.catalina.core.StandardService.start(StandardService
50)
at org.apache.catalina.core.StandardServer.start(StandardServer.j
3)
at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:350
at org.apache.catalina.startup.Catalina.process(Catalina.java:129
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)

Log4j runs fine, just turbine is giving me a hard time.
Here is my web.xml from my app -

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"
<web-app>

<servlet>
<servlet-name>log4j-init</servlet-name>
<servlet-class>com.bfg.services.Log4jInit</servlet-class>

<init-param>
<param-name>log4j-init-file</param-name>
<param-value>/WEB-INF/log4j.properties</param-value>
</init-param>

<load-on-startup>1</load-on-startup>
</servlet>

<servlet>
<servlet-name>turbine-init</servlet-name>
<servlet-class>com.bfg.services.TurbineInit</servlet-class>

<init-param>
<param-name>turbine-resource-directory</param-name>
<param-value>D:/Apache Tomcat 4/webapps/bfg/WEB-INF</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

</web-app>

And here is my TurbineResources.properties file, which is where I think the problem could be -


# -------------------------------------------------------------------
#
# S E R V I C E S
#
# -------------------------------------------------------------------
# Classes for Turbine Services should be defined here.
# Format: services.[name].classname=[implementing class]
#
# To specify properties of a service use the following syntax:
# service.[name].[property]=[value]

services.PoolBrokerService.classname=org.apache.turbine.services.db.TurbinePoolBrokerService
services.MapBrokerService.classname=org.apache.turbine.services.db.TurbineMapBrokerService
.
.
.

# -------------------------------------------------------------------
#
# D A T A B A S E S E T T I N G S
#
# -------------------------------------------------------------------
# These are your database settings. Look in the
# org.apache.turbine.util.db.pool.* packages for more information.
# The default driver for Turbine is for MySQL.
#
# The parameters to connect to the default database. You MUST
# configure these properly.
# -------------------------------------------------------------------

database.default.driver=org.gjt.mm.mysql.Driver
database.default.url=jdbc:mysql://localhost/BFG
database.default.username=bfguser
database.default.password=bfg

# The number of database connections to cache per ConnectionPool
# instance (specified per database).

database.default.maxConnections=50

The amount of time (in milliseconds) that database connections will be

# cached (specified per database).
#
# Default: one hour = 60 * 60 * 1000

database.default.expiryTime=3600000

# The amount of time (in milliseconds) a connection request will have to wait
# before a time out occurs and an error is thrown.
#
# Default: ten seconds = 10 * 1000

database.connectionWaitTimeout=10000

# The interval (in milliseconds) between which the PoolBrokerService logs
# the status of it's ConnectionPools.
#
# Default: No logging = 0 = 0 * 1000

database.logInterval=0

# These are the supported JDBC drivers and their associated Turbine
# adaptor. These properties are used by the DBFactory. You can add
# all the drivers you want here.

database.adaptor=DBMM
database.adaptor.DBMM=org.gjt.mm.mysql.Driver

When I delete the just Turbine startup code from my web.xml everything runs fine, but if I remove just my Log4j startup code, tomcat starts up and than immediately shuts down again. My log4j.jar, turbine-2.1b4.jar, mm.mysql-2.0.14-bin.jar and velocity-1.2-dev.jar packages are all in the classpath. Any help or insight will be appreciated.
Cheers,
Bao.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top