db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerold Christof Mosinzer <e0125...@stud3.tuwien.ac.at>
Subject Re: java.lang.InstatiationException
Date Sat, 19 May 2007 16:18:49 GMT
Hello!

This is my classpath=C:\Programme\Java\mysql-connector-java-5.0.5\src\;

This is my property file:

# Copyright 2001-2005 The Apache Software Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -------------------------------------------------------------------
# $Id: Torque.properties 239636 2005-08-24 12:38:09Z henning $
#
# This is the configuration file for Torque.
#
# Note that strings containing "," (comma) characters must backslash
# escape the comma (i.e. '\,')
#
# -------------------------------------------------------------------

torque.applicationRoot = .

# -------------------------------------------------------------------
#
#  L O G G I N G
#
# -------------------------------------------------------------------
# We use Log4J for all Torque logging and we embed the log4j
# properties within our application configuration.
# -------------------------------------------------------------------

# This first category is required and the category
# must be named 'default'. This is used for all logging
# where an explicit category is not specified.

log4j.category.org.apache.torque = ALL, org.apache.torque
log4j.appender.org.apache.torque = org.apache.log4j.FileAppender
log4j.appender.org.apache.torque.file = 
${torque.applicationRoot}/logs/torque.log
log4j.appender.org.apache.torque.layout = org.apache.log4j.PatternLayout
log4j.appender.org.apache.torque.layout.conversionPattern = %d [%t] 
%-5p %c - %m%n
log4j.appender.org.apache.torque.append = false

# -------------------------------------------------------------------
#
#  D E F A U L T S
#
# -------------------------------------------------------------------
#
# These values kick in, if you don't explicitly override them in your
# various database settings. At the moment they're only used if you
# configure the SharedPoolDataSourceFactory of the PerUserDataSourceFactory
# as your data source provider. It does not work with JNDI.
#
# The example is shown for SharedPoolDataSource.
#
# -------------------------------------------------------------------

# Time to wait for a connection to the database in milliseconds.
torque.defaults.pool.maxWait = 10000

# Maximum number of idle and active connections cached in a database
# definition.
# Note that, if you have multiple database definitions which access the
# same database URL, they don't share the connections but you have
# multiple pools and each has this maximum number. So if you have a
# connection licensed database engine, you must multiply this number by
# the number of times you use a specific database URL.
torque.defaults.pool.maxIdle = 8
torque.defaults.pool.maxActive = 10

# How often the pool is checked for connection which stayed in the pool
# for too long. Defaults to 5 minutes (5 * 60 * 1000)
# remove property if the idle object evictor should not be run
torque.defaults.pool.timeBetweenEvictionRunsMillis= 300000

# Lifetime of an idle connection in the pool in milliseconds.
# Defaults to one hour (1000 * 60 * 60)
torque.defaults.pool.minEvictableIdleTimeMillis = 3600000

# Sets the driver for the data sources.
torque.defaults.connection.driver = org.gjt.mm.mysql.Driver

# Sets the URL for the datasources
torque.defaults.connection.url = jdbc:mysql://localhost:3306/torque

# Sets login and password for the data sources.
torque.defaults.connection.user = root
torque.defaults.connection.password = g2ro1d

# -------------------------------------------------------------------
#
#  T O R Q U E  P R O P E R T I E S
#
# -------------------------------------------------------------------
# These are your database settings. Look in the
# org.apache.torque.pool.* packages for more information.
#
# The parameters to connect to the default database.  You MUST
# configure these properly.
# -------------------------------------------------------------------

torque.database.default=Lucullus
torque.database.Lucullus.adapter=MySql

# # Using commons-dbcp
torque.dsfactory.Lucullus.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory
# 
torque.dsfactory.bookstore.factory=org.apache.torque.dsfactory.PerUserPoolDataSourceFactory
torque.dsfactory.Lucullus.pool.maxIdle=8
torque.dsfactory.Lucullus.pool.maxActive=10
torque.dsfactory.Lucullus.pool.testOnBorrow=true
torque.dsfactory.Lucullus.pool.validationQuery=SELECT 1
torque.dsfactory.Lucullus.connection.driver = com.mysql.jdbc.Driver 
#org.gjt.mm.mysql.Driver
torque.dsfactory.Lucullus.connection.url = jdbc:mysql://localhost:Lucullus
torque.dsfactory.Lucullus.connection.user = root
torque.dsfactory.Lucullus.connection.password = g2ro1d


# # Using jndi
# 
torque.dsfactory.bookstore.factory=org.apache.torque.dsfactory.JndiDataSourceFactory
# torque.dsfactory.bookstore.jndi.path=jdbc/bookstore
# torque.dsfactory.bookstore.jndi.java.naming.factory.initial = 
org.apache.naming.java.javaURLContextFactory
# torque.dsfactory.bookstore.jndi.java.naming.factory.url.pkgs = 
org.apache.naming

# torque.dsfactory.bookstore.datasource.dataSourceName=jdbc/DBbookstore
# 
torque.dsfactory.bookstore.datasource.jndiEnvironment.java.naming.factory.initial = 
org.apache.naming.java.javaURLContextFactory
# 
torque.dsfactory.bookstore.datasource.jndiEnvironment.java.naming.factory.url.pkgs = 
org.apache.naming
# torque.dsfactory.bookstore.datasource.maxIdle=8
# torque.dsfactory.bookstore.datasource.maxActive=10

# # ConnectionPoolDataSource
# 
torque.dsfactory.bookstore.factory=org.apache.torque.dsfactory.JndiDataSourceFactory
# torque.dsfactory.bookstore.jndi.path=jdbc/DBbookstore
# torque.dsfactory.bookstore.jndi.java.naming.factory.initial = 
org.apache.naming.java.javaURLContextFactory
# torque.dsfactory.bookstore.jndi.java.naming.factory.url.pkgs = 
org.apache.naming
# 
torque.dsfactory.bookstore.datasource.classname=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
# torque.dsfactory.bookstore.datasource.driver = org.gjt.mm.mysql.Driver
# torque.dsfactory.bookstore.datasource.url = 
jdbc:mysql://localhost:3306/torque
# torque.dsfactory.bookstore.datasource.user = user
# torque.dsfactory.bookstore.datasource.password = password

# Determines if the quantity column of the IDBroker's id_table should
# be increased automatically if requests for ids reaches a high
# volume.

torque.idbroker.clever.quantity=true

# Determines whether the managers cache instances of the business objects.
# And also whether the MethodResultCache will really cache results.

torque.manager.useCache = true

Did I something wrong? I m not sure if the classpath set correctly.

Thx Alvaro

Zitat von Alvaro Coronel <alvarocoronel67@yahoo.com>:

> Hello Herold. It would be useful if you could also post the classpath 
> and the Torque.properties file you are using.
>
> Good luck,
> Álvaro.
>
> Gerold Christof Mosinzer <e0125116@stud3.tuwien.ac.at> wrote: Hello!
>
> I found this problem in apache forum. I tried out but i get no
> solution. Maybe i did something wrong. Wrong classpath or wrong
> jar-file. Please help me!
>
> Thx Gerry
>
> 19.05.2007 10:22:14 org.apache.catalina.core.AprLifecycleListener init
> INFO: The Apache Tomcat Native library which allows optimal performance
> in production environments was not found on the java.library.path:
> C:\Programme\Java\jre1.6.0_01\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Programme\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\Sonic\MyDVD;;C:\www\Apache2\bin;C:\www\php5;C:\www\mysql\bin;C:\www\perl\bin;C:\www\Tomcat5\bin;C:\php;C:\apache-ant-1.6.5\bin;C:\Java\jdk1.5.0_06\bin;C:\Sun\AppServer\bin;C:\Programme\QuickTime\QTSystem\;"C:\Programme\Zone
> Labs\ZoneAlarm\MailFrontier";d:\programme\matlab6p5\bin\win32;C:\Programme\JWDP\jwsdp-shared\bin;;C:\Java\jdk1.5.0_06\bin;;C:\windows\system32\chuck.exe;C:\apache-ant-1.6.5\bin;
> 19.05.2007 10:22:14 org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> 19.05.2007 10:22:14 org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 1242 ms
> 19.05.2007 10:22:14 org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> 19.05.2007 10:22:14 org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.10
> 19.05.2007 10:22:15 org.apache.catalina.core.ApplicationContext log
> INFO: ContextListener: contextInitialized()
> 19.05.2007 10:22:15 org.apache.catalina.core.ApplicationContext log
> INFO: SessionListener: contextInitialized()
> 19.05.2007 10:22:18 org.apache.torque.TorqueInstance initAdapters
> SCHWERWIEGEND: Error reading configuration seeking database adapters
> java.lang.InstantiationException: Unknown JDBC driver: MySql: Check
> your configuration file
> at org.apache.torque.adapter.DBFactory.create(DBFactory.java:130)
> at org.apache.torque.TorqueInstance.initAdapters(TorqueInstance.java:241)
> at org.apache.torque.TorqueInstance.initialize(TorqueInstance.java:158)
> at org.apache.torque.TorqueInstance.init(TorqueInstance.java:399)
> at org.apache.torque.Torque.init(Torque.java:135)
> at lucullus.Index.init(Index.java:105)
> at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
> at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4044)
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
> at
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
> at
> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
> at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
> at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
> at org.apache.catalina.core.StandardService.start(StandardService.java:448)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> 19.05.2007 10:22:18 org.apache.catalina.core.StandardContext loadOnStartup
> SCHWERWIEGEND: Servlet /Lucullus threw load() exception
> javax.servlet.ServletException: org.apache.torque.TorqueException:
> java.lang.InstantiationException: Unknown JDBC driver: MySql: Check
> your configuration file
> at lucullus.Index.init(Index.java:108)
> at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
> at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4044)
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
> at
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
> at
> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
> at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
> at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
> at org.apache.catalina.core.StandardService.start(StandardService.java:448)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Error in Torque initialization! org.apache.torque.TorqueException:
> org.apache.commons.configuration.ConfigurationException: Cannot locate
> configuration source Lucullus.properties
> 19.05.2007 10:22:19 org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> 19.05.2007 10:22:19 org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> 19.05.2007 10:22:19 org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/80  config=null
> 19.05.2007 10:22:19 org.apache.catalina.startup.Catalina start
> INFO: Server startup in 4717 ms
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>
>
>
> ---------------------------------
> Be a better Heartthrob. Get better relationship answers from someone 
> who knows.
> Yahoo! Answers - Check it out.




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


Mime
View raw message