简体中文
会员名称: 登入密码: [Register] 注册 忘记密码 启用我的帐号
 
jforum2.17有否支持mssql?  XML
论坛首页 »开源项目» JForum论坛
发表人 内容
hanfeng450


注册时间: 2007-03-13 09:59:05
文章: 28
离线

jforum2.17有否支持mssql?
Admin

[Avatar]
注册时间: 2006-11-18 20:56:41
文章: 141
来自: 福州
离线

hanfeng450 wrote:jforum2.17有否支持mssql?

2.1.6时就有支持,但有些BUG,2.1.7里也有包含SQL Server 不过得手动安装,具体行还是不行,也没有测试过

相互帮助,共同进步.
[Email] [WWW] [MSN]
hanfeng450


注册时间: 2007-03-13 09:59:05
文章: 28
离线

我看过里面的文件了,不知什么原因。里面都没见有sqlserver的数据库生成脚本....
Admin

[Avatar]
注册时间: 2006-11-18 20:56:41
文章: 141
来自: 福州
离线

数据库跟本在:

/WEB-INF/config/database/sqlserver/

相互帮助,共同进步.
[Email] [WWW] [MSN]
hanfeng450


注册时间: 2007-03-13 09:59:05
文章: 28
离线

log4j:WARN No appenders could be found for logger (com.mchange.v2.log.MLog).
log4j:WARN Please initialize the log4j system properly.
2007-3-19 16:03:56 org.apache.catalina.core.ApplicationContext log
严重: StandardWrapper.Throwable
net.jforum.exceptions.DatabaseException: Error while trying to start the database: net.jforum.exceptions.DatabaseExcepti
on: java.sql.SQLException: Connections could not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:470)

at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:125)
at net.jforum.C3P0PooledConnection.getConnection(C3P0PooledConnection.java:137)
at net.jforum.ForumStartup.startDatabase(ForumStartup.java:7
at net.jforum.JForum.init(JForum.java:9
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:17
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:14
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Caused by: net.jforum.exceptions.DatabaseException: java.sql.SQLException: Connections could not be acquired from the un
derlying database!
... 20 more
Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
... 20 more
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from
its primary factory or source.
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1159)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:405)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:351)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:466)

... 18 more
2007-3-19 16:03:56 org.apache.catalina.core.StandardWrapperValve invoke
严重: Allocate exception for servlet jforum
net.jforum.exceptions.DatabaseException: Error while trying to start the database: net.jforum.exceptions.DatabaseExcepti
on: java.sql.SQLException: Connections could not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:470)

at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:125)
at net.jforum.C3P0PooledConnection.getConnection(C3P0PooledConnection.java:137)
at net.jforum.ForumStartup.startDatabase(ForumStartup.java:7
at net.jforum.JForum.init(JForum.java:9
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:17
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:14
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Caused by: net.jforum.exceptions.DatabaseException: java.sql.SQLException: Connections could not be acquired from the un
derlying database!
... 20 more
Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
... 20 more
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from
its primary factory or source.
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1159)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:405)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:351)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:466)

... 18 more
hanfeng450


注册时间: 2007-03-13 09:59:05
文章: 28
离线

上面这段是我用mssql做数据库时发生的错误。
但连mysql却没有出现这种情况。
真的很郁闷
Admin

[Avatar]
注册时间: 2006-11-18 20:56:41
文章: 141
来自: 福州
离线

你的SQLServer是否是sp3/sp4的呢?如果没升级JDBC连接会有点问题.如果不是可以换MS的JDBC驱动试试.
还有得说一下,JForum没有公开支持MSSQL因为.他还存在一些问题,包括程序上的,你最好能看看程序代码,进行相应测试与修改

相互帮助,共同进步.
[Email] [WWW] [MSN]
hanfeng450


注册时间: 2007-03-13 09:59:05
文章: 28
离线

我的mssql是sp3的
hanfeng450


注册时间: 2007-03-13 09:59:05
文章: 28
离线


几种连接方式都试了还是一样。看来真的要慢慢测代码了......................
Admin

[Avatar]
注册时间: 2006-11-18 20:56:41
文章: 141
来自: 福州
离线

你把/WEB-INF/config/SystemGlobals.properties
与jforum-custom.conf贴上来看看
先把你的密码去了,如果是远程数据服务器的话也去了,这样安全些

这篇文章被编辑了 1 次. 最近一次更新是在 2007-03-19 18:43:35


相互帮助,共同进步.
[Email] [WWW] [MSN]
hanfeng450


注册时间: 2007-03-13 09:59:05
文章: 28
离线

# JForum default configuration options
#
# If you are a developer and want to specify options specific to your
# machine, like database driver and password, that should not be
# commited to the CVS, please create a file named
# jforum-custom.conf under WEB-INF/config and put the custom
# keys and values there.
#
# Version: $Id: SystemGlobals.properties,v 1.152.2.3 2007/02/25 12:44:59 rafaelsteil Exp $

#####################
# GENERAL SETTINGS
#####################
forum.link = http://localhost:8080/trydone
homepage.link = http://localhost:8080/trydone
forum.name = My Forum
forum.page.title = ${forum.name} - your_board_title
forum.page.metatag.keywords = some keywords for your board
forum.page.metatag.description = here_goes_the_board_description

# Security Hash. You should change this value just before the
# first run of your forum. The value can be anything and *should*
# very a large and complex sequence. This value will be used to
# increase security
user.hash.sequence = 04904SDFfhfh449911-**%$nvMDFHDhskda6546546as4df4ads6f54ads654

# Page encoding
encoding = UTF-8

#####################
# DATABASE SETTINGS
#####################
# Database type to use
#database.driver.name = mysql
database.driver.name = sqlserver
# Can be net.jforum.SimpleConnection, net.jforum.PooledConnection
# or net.jforum.DataSourceConnection
database.connection.implementation = net.jforum.PooledConnection
#database.connection.implementation = net.jforum.SimpleConnection

# Enable / Disable transactions
database.use.transactions = true

# DataSource name, in case of using net.jforum.core.db.DataSourceConnection
database.datasource.name = java:/MySqlDS

# Time in seconds to healthcheck all database connections
database.ping.delay = 3600

# Extra parameters to pass to C3P0 (only when using PooledConnection)
# Form is key=value;key2=value2;keyN=valueN
c3p0.extra.params = checkoutTimeout=120000;debugUnreturnedConnectionStackTraces=false;unreturnedConnectionTimeout=180

# ############
# Cache Stuff
# ############
topicsPerPage = 15
postsPerPage = 15
usersPerPage = 30
hot.topic.begin = 20
topic.recent = 50

posts.cache.enabled = false
posts.cache.size = 100

################################
# GENERAL BOARD CONFIGURATIONS
################################
# Delay (in ms) between each post from the user
# Set it to 0 (zero) to disable the config
posts.new.delay = 15000

# If set to "true", only moderators and admins are
# allowed to see the error stack trace when an exception
# occurs in the board.
stacktrace.moderators.only = false

# Enable or disable registration of new users.
registration.enabled = true

#dateTime.format = dd/MM/yyyy HH\:mm\:ss
dateTime.format = yyyy/MM/dd HH\:mm\:ss

# RSS date and time format.
# If you want to include the timezone, use
#
# EEE, d MMM yyyy HH:mm:ss z
#
# However, currently, JForum does not include timezone
# when writing messages data to the database
rss.datetime.format = EEE, d MMM yyyy HH:mm:ss

# RSS
rss.enabled = true

# Captcha
captcha.registration = false
captcha.posts = false
captcha.ignore.case = false

captcha.width = 250
captcha.height = 50

captcha.min.words = 5
captcha.max.words = 7

captcha.min.font.size = 25
captcha.max.font.size = 35

# Caching
topic.cache.enabled = true
security.cache.enabled = true

# Default language to use. Can be any value
# existent at config/languages/locales.properties
i18n.board.default = en_US

# Allowed HTML tags to be used when posting a message
html.tags.welcome = u, a, img, i, u, li, ul, font, br, p, b
html.attributes.welcome = src, href, size, face, color, target, rel

# Allow or not relative links in the messages. If set to true,
# links starting with / are allowed, otherwise it should start
# with the values defined in the key html.links.allow.protocols
html.links.allow.relative = false

# Protocols allowed in the links posted in the messages. Only used
# if html.links.allow.relative is set to false. Any value different
# of those declared will result in an empty link.
html.links.allow.protocols = http://, https://, mailto:, ftp://

# Max length for the username
username.max.length = 25

avatar.maxHeight = 150
avatar.maxWidth = 150

# Allow or not the user to link to an external avatar
# To disable, set to "false"
avatar.allow.external.url = true

# #########################
# Terms Agreement / COPPA
# #########################
agreement.show = true
agreement.files.path = /templates/agreement
agreement.default.file = terms_en_US.txt

# #############
# ATTACHMENTS
# #############
attachments.anonymous = true

# Maximum of attachments per post
attachments.max.post = 3

# Create thumbnails for attached images
attachments.images.createthumb = true

# If the image size is less than the specified
# size, then thumbs are not created
attachments.images.thumb.maxsize.w = 400
attachments.images.thumb.maxsize.h = 400

# If "true", tell the application to display the
# regular download box for thumbnails as well.
# If "false", then only the thumb will be shown
# within the message, and then the user should
# click on the image to download the full version
attachments.images.thumb.box.show = true

# Icon to identify topics / posts with attachments
attachments.icon = images/icon_clip.gif

# Directory to store the files
attachments.upload.dir = upload
attachments.store.dir = ${application.path}/${attachments.upload.dir}

##################
# MAIL SETTINGS
##################
mail.lostPassword.messageFile = mail/lostPassword.txt
mail.lostPassword.subject = [${forum.name}] Password recovery

# If "true", a mail will be send to users when a topic is
# answered. To disable, set to "false"
mail.notify.answers = true

# SMTP config
mail.sender = email@sender.address
mail.smtp.auth = true
mail.smtp.host = localhost

# Non-SSL default port is 25. If SSL, the default por is 465.
mail.smtp.port = 25

mail.smtp.username = your@smtp.username
mail.smtp.password = smtppassword

# SSL support for SMTP. Set it to "true" if your
# host requires that (GMail does). Don't forget
# to change the mail.smtp.port too
mail.smtp.ssl = false

# If true, allow users to interact to the forum using any
# email client, by just sending a message to a specific address
mail.pop3.integration.enabled = false

# If "false", deletes all messages retrieved from a POP3
# connection. If "true", keep them in the server
mail.pop3.debug.keep.messages = true

# If the mail.smtp.host cannot be resolved, JavaMail sends a HELO
# without an hostname - which is a violation of the SMTP protocol
# You can set this property to force the hostname
mail.smtp.localhost =

# If "true", requires all new users to validate their email
# addresses in order to be accepted in the system
mail.user.email.auth = false

# Can be "text" or "html"
mail.messageFormat = text

mail.charset = UTF-8
mail.template.encoding = UTF-8

mail.newAnswer.messageFile = mail/mailNewReply.txt
mail.newAnswer.subject = [${forum.name}] Message posted: {0}

mail.newPm.subject = [${forum.name}] Private Message
mail.newPm.messageFile = mail/newPrivateMessage.txt

mail.newTopic.messageFile = mail/mailNewTopic.txt
mail.newTopic.subject = [${forum.name}] New Topic: {0}

mail.activationKey.subject = [${forum.name}] Activate forum account
mail.activationKey.messageFile = mail/activateAccount.txt

mail.summary.weekly.messageFile = mail/summaryMessage.txt
mail.summary.weekly.subject = [${forum.name}] Weekly Summary

# ##############
# Helper Sutff
# ##############
topic.time.field = topic_time
extension.field = extension

# ##################
# Banning of users
# ##################
# Set it to "true" to send "403 Forbidden" header instead of
# displaying a nice error message to the user, in case of banning
banlist.send.403forbidden = false

# ########
# SEARCH
# ########
search.indexing.enabled = true

search.indexer.quartz = net.jforum.util.search.quartz.QuartzSearchManager
search.indexer.default = net.jforum.util.search.simple.SimpleSearchManager

search.indexer.implementation = ${search.indexer.default}

# Minumum size the word must have in order to get indexed.
# For cyrillic alphabets, the recommended value is "1"
search.min.word.size = 3
search.max.word.size = 100

# Values less than one mean no maximum number of words.
search.max.words.message = 0
search.exclude.words = and,the,for,but

search.word.filter.regex = .*

# Word matching type
# -> "equals" means that only the "complete" words (aka, not certain pieces)
# will be matched
# -> "like" means that the SQL LIKE clause will be used
search.word.matching = equals

# #######
# KARMA
# #######
karma.min.points = 1
karma.max.points = 5

#############################
# SSO / User authentication
#############################
# Auhentication type: use one of the following options
#
# sso: SSO based authentication. The called class will be the one
# specified by the key "sso.implementation", whic must be an implementation
# of net.jforum.sso.SSO
#
# default: Non-SSO authentication, which relies on the key
# "login.authenticator" to validate users. For more information, please see
# net.jforum.sso.LoginAuthenticator and the default implementation.
authentication.type = default

# The above key will be used when "authentication.type" is set to "default"
# Can be any implementation of net.jforum.sso.LoginAuthenticator
#
# For LDAP authentication, set the value to net.jforum.sso.LDAPAuthenticator. Also,
# see the LDAP section below
login.authenticator = net.jforum.sso.DefaultLoginAuthenticator

# When using authentication.type = default, you may choose to disable
# the automatic login feature, which will prevents users to get
# automatic logged in when they come back to the forum
auto.login.enabled = true

# The above key will be be used then "authentication.type" is set to "sso"
# The default implementation (used here) only checks if request.getRemoteUser()
# is not null. This may be enough for many situations.
sso.implementation = net.jforum.sso.RemoteUserSSO

# Special attributes used when creating a new user
# Only if auhentication.type = sso
# The attribute name to search in the session for the password.
sso.password.attribute = password

# Same as above
sso.email.attribute = email

# The default email to use if sso.email.attribute is empty
sso.default.email = sso@user

# The default password to use if sso.password.attribute is empty
sso.default.password = sso

# Optional redirect for SSO
# If any value is set, the user will be redirected to the defined
# redict, using the following logic:
# request.getContextPath() + <sso.redirect> + returnPath);
sso.redirect =

# #######
# LDAP
# #######
# Security protocol to use, e.g: "ssl"
# Leave it empty (default) to let the provider figure it out
ldap.security.protocol =

# Security authentication to use. Possible values: "none", "simple", "strong",
# "EXTERNAL" (SASL). Leave empty (default) to let the provider figure it out
ldap.authentication =

# Class that provides a LDAP factory
ldap.factory = com.sun.jndi.ldap.LdapCtxFactory

# The prefix your LDAP server requires. e.g 'uid='
# The username supplied gets inserted just after the prefix,
# e.g: 'uid=username' so adjust the prefix properly
ldap.login.prefix = uid=

# The suffix your LDAP server requires.
# e.g 'ou=Users,dc=department,dc=company,dc=com'
ldap.login.suffix = ou=Users,dc=department,dc=company,dc=com

# The url of your LDAP server.
# Notice that if your LDAP server uses SSL you will need to configure your
# server certificate so that Java Secure Sockets Extension (JSSE) will accept it.
# Read http://java.sun.com/products/jndi/tutorial/ldap/security/ssl.html
ldap.server.url = ldap://localhost

# Field that holds the user's email
ldap.field.email = mail

# ActiveDirectory
# To configure LDAPAuthenticator integrating with Microsoft Active Directory. The following two keys should be necessary.
# They are similar to ldap.login.prefix and ldap.login.suffix , but it's used when looking up user infomation
# rather than authentication. It's used when the login Distinguished Name (DN) is formatted differently from the lookup
# DN on some LDAP servers, for example, Microsoft Active Directory. If it's the case, you should add these keys in additional
# to ldap.login.prefix and ldap.login.suffix .
#
# The following example is for configuring on Microsoft Active Directory:
# ===========================
# ldap.login.prefix=CN=
# ldap.login.suffix=CN=Users,DC=jform,DC=net
# ldap.lookup.suffix=CN=Users
# ===========================
ldap.lookup.prefix =
ldap.lookup.suffix =

###############################
# INTERNAL CONFIGURATION STUFF
###############################
i18n.internal = en_US

database.driver.config = ${config.dir}/database/${database.driver.name}/${database.driver.name}.properties
sql.queries.driver = ${config.dir}/database/${database.driver.name}/${database.driver.name}.sql
sql.queries.generic = ${config.dir}/database/generic/generic_queries.sql
database.support_subqueries = false

# ${application.path}, ${installation}, and ${servlet.name} are set by the web application
resource.dir = ${application.path}/WEB-INF
config.dir = ${resource.dir}/config
installation.config = ${config.dir}/jforum-custom.conf

# Only change these values if you know what you're doing
anonymous.userId = 1
defaultUserGroup = 1

cache.engine.default = net.jforum.cache.DefaultCacheEngine
cache.engine.jboss = net.jforum.cache.JBossCacheEngine
jboss.cache.properties = ${config.dir}/jboss-cache-cluster.xml

cache.engine.implementation = ${cache.engine.default}

cacheable.objects = net.jforum.repository.BBCodeRepository, \
net.jforum.repository.RankingRepository, \
net.jforum.repository.SmiliesRepository, \
net.jforum.repository.ForumRepository, \
net.jforum.repository.TopicRepository, \
net.jforum.SessionFacade, \
net.jforum.repository.PostRepository, \
net.jforum.util.search.quartz.QuartzSearchIndexerJob, \
net.jforum.repository.Tpl, \
net.jforum.repository.RolesRepository, \
net.jforum.repository.SecurityRepository, \
net.jforum.repository.BanlistRepository


# The template to use
template.dir = default

# If you change this value, is necessary to edit WEB-INF/web.xml as well
servlet.extension = .page

###########
# COOKIES
###########
cookie.name.data = jforumUserId
cookie.name.user = jforumUserInfo
cookie.name.autologin = jforumAutoLogin
cookie.name.userHash = jforumUserHash

##################
# OTHER SETTINGS
##################
tmp.dir = tmp
cache.dir = cache
templates.mapping = ${config.dir}/templatesMapping.properties
locales.dir = config/languages/
locales.names = locales.properties

smilie.image.dir = images/smilies
smilie.image.pattern = <img src\="#CONTEXT#/images/smilies/\#IMAGE\#" border\="0">

useFilesystemCache = false
avatarMaxKbSize = 25

background.tasks = true

clickstream.config = ${config.dir}/clickstream-jforum.xml
quartz.config = ${config.dir}/quartz-jforum.properties

# Default charset used by the servlet container.
#
# **It's unlikely** you will have tho change this value,
# even if you're using a Cyrillic alphabet.
#
# For detailed information, please see
# http://www.jforum.net/confluence/display/configuration/charEncodingContainer
#
default.container.encoding = ISO-8859-1

# the period in milliseconds the config files are watched for changes
# set it to 0 (zero) to disable it completely
file.changes.delay = 2000

# System version
version = 2.1.7

##########
# Summary
##########
summary.enabled = false
summary.days.before = 7

jforum.version.url = http://www.jforum.net/latest_version.txt
hanfeng450


注册时间: 2007-03-13 09:59:05
文章: 28
离线

jforum.conf:
#Installation specific configuration options
#Mon Mar 12 12:54:53 CST 2007
i18n.board.default=zh_CN
forum.link=http\://localhost\:8080/trydone/
database.support.autokeys=true
database.connection.pool.timeout=5000
installed=true
database.support.subqueries=true
homepage.link=http\://localhost\:8080
database.connection.pool.min=5
database.connection.pool.max=10
user.hash.sequence=348032218c3b45d92e8075662f8b1614
mysql.encoding=
dbencoding=utf-8
dbunicode=true
database.connection.implementation=net.jforum.PooledConnection
database.connection.host=localhost
mysql.unicode=


##mysql connnection
#dao.driver=net.jforum.dao.mysql.MysqlDataAccessDriver
#database.driver.name=mysql
#database.connection.driver=com.mysql.jdbc.Driver
#database.connection.dbname=trydone
#database.connection.password=root
#database.connection.username=root
#database.connection.port=3306
#database.connection.string=jdbc\:mysql\://${database.connection.host}\:${database.connection.port}/${database.connection.dbname}?user\=${database.connection.username}&password\=${database.connection.password}&autoReconnect\=true${mysql.unicode}${mysql.encoding}&useNewIO\=false&zeroDateTimeBehavior\=convertToNull&useServerPrepStmts\=false&dumpQueriesOnException\=true&jdbcCompliantTruncation\=false

##ms sql connection
#database.connection.driver=net.sourceforge.jtds.jdbc.Driver
#database.connection.driver=sun.jdbc.odbc.JdbcOdbcDriver
database.connection.driver=com.microsoft.jdbc.sqlserver.SQLServerDriver

dao.driver=net.jforum.dao.sqlserver.SqlServerDataAccessDriver

database.driver.name=sqlserver
database.connection.dbname=trydone
database.connection.username=sa
database.connection.port=1433
database.connection.password=123
#database.connection.string=jdbc\:odbc\:sqlserver\://${database.connection.host}\:${database.connection.port}/${database.connection.dbname};SelectMethod=cursor
#database.connection.string=jdbc\:jtds\:sqlserver\://${database.connection.host}\:${database.connection.port}/${database.connection.dbname};SelectMethod=cursor
database.connection.string=jdbc\:microsoft\:sqlserver\://${database.connection.host}\:${database.connection.port}/${database.connection.dbname};SelectMethod=cursor


#如果要用默认的模板,把下一行删除
#template.dir=trydone
hanfeng450


注册时间: 2007-03-13 09:59:05
文章: 28
离线

还有,我的数据库是sqlserver2000.需要换成sqlserver2005吗?
hanfeng450


注册时间: 2007-03-13 09:59:05
文章: 28
离线

我在C3P0PooledConnection.java加了
this.ds.setUser(SystemGlobals.getValue(ConfigKeys.DATABASE_CONNECTION_USERNAME));
this.ds.setPassword(SystemGlobals.getValue(ConfigKeys.DATABASE_CONNECTION_PASSWORD));
这两句,
jforum.conf
database.connection.driver=net.sourceforge.jtds.jdbc.Driver

database.connection.string=jdbc\:jtds\:sqlserver\://${database.connection.host}\:${database.connection.port}/${database.connection.dbname};SelectMethod=cursor
用这个就能连接到数据库了。
不过连接到后,发现库表的的结构好像少了些
user_authhash这个字段...
hanfeng450


注册时间: 2007-03-13 09:59:05
文章: 28
离线

jforum_users在sqlserver那里的确是少了user_authhash这个字段。mysql里面是有的
 
论坛首页 »开源项目» JForum论坛
前往:   
Powered by JForum 2.1.8 © JForum Team Template: Trydone