property for user to haspusersetup卸载怎么处理

1660人阅读
Spring(6)
& & & & 项目进行压力测试的时候,运行大概1小时候,后台抛出以下异常:
Nov 9, :59 AM com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector run
WARNING: com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@4b9cafa7 -- APPARENT DEADLOCK!!! Complete Status:
Managed Threads: 3
Active Threads: 3
Active Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@19f67d43 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@599c706 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@32d95dc9 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
Pending Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask@5c9c5133
com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask@1a971ac5
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@365e8926
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@787e39ac
Pool thread stack traces:
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]
java.lang.StringCoding.set(StringCoding.java:53)
java.lang.StringCoding.encode(StringCoding.java:270)
java.lang.String.getBytes(String.java:946)
com.mysql.jdbc.ConnectionImpl.configureCharsetProperties(ConnectionImpl.java:1578)
com.mysql.jdbc.ConnectionImpl.configureClientCharacterSet(ConnectionImpl.java:1628)
com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3425)
com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2045)
com.mysql.jdbc.ConnectionImpl.&init&(ConnectionImpl.java:718)
com.mysql.jdbc.JDBC4Connection.&init&(JDBC4Connection.java:46)
sun.reflect.GeneratedConstructorAccessor35.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main]
com.mysql.jdbc.ResultSetImpl.getInstance(ResultSetImpl.java:344)
com.mysql.jdbc.MysqlIO.buildResultSetWithUpdates(MysqlIO.java:2607)
com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:2490)
com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1746)
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2135)
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
com.mysql.jdbc.ConnectionImpl.setupServerForTruncationChecks(ConnectionImpl.java:5240)
com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3508)
com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2045)
com.mysql.jdbc.ConnectionImpl.&init&(ConnectionImpl.java:718)
com.mysql.jdbc.JDBC4Connection.&init&(JDBC4Connection.java:46)
sun.reflect.GeneratedConstructorAccessor35.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:562)目测该问题是c3p0连接池导致的线程死锁。网上搜了搜说是C3P0的Bug,推荐使用阿里的数据库连接池Druid,更换后果然正常了。
& & & & 阿里巴巴推出的国产数据库连接池,据网上测试对比,比目前的DBCP或C3P0数据库连接池性能更好,Druid与其他数据库连接池使用方法基本一样(与DBCP非常相似),将数据库的连接信息全部配置给DataSource对象。
基于纯Java代码使用:
package demo.
import java.io.InputS
import java.sql.C
import java.sql.SQLE
import java.util.P
import javax.sql.DataS
import com.alibaba.druid.pool.DruidDataSourceF
public class DBUtil {
private static DataSource ds =
InputStream in = DBUtil.class.getClassLoader()
.getResourceAsStream(&ds.properties&);
Properties props = new Properties();
props.load(in);
ds = DruidDataSourceFactory.createDataSource(props);
}catch(Exception ex){
ex.printStackTrace();
public static Connection openConnection() throws SQLException{
return ds.getConnection();
ds.properties内容
driverClassName = oracle.jdbc.driver.OracleDriver
url = jdbc:oracle:thin:@127.0.0.1:1521:ORCL
username = ******
password = ******
initialSize = 5
maxActive = 10
minIdle = 3
maxWait = 60000
removeAbandoned = true
removeAbandonedTimeout = 180
timeBetweenEvictionRunsMillis = 60000
minEvictableIdleTimeMillis = 300000
validationQuery = SELECT 1 FROM DUAL
testWhileIdle = true
testOnBorrow = false
testOnReturn = false
poolPreparedStatements = true
maxPoolPreparedStatementPerConnectionSize = 50
filters = stat
基于Spring的配置:
&bean id=&druidDataSource& class=&com.alibaba.druid.pool.DruidDataSource&
init-method=&init& destroy-method=&close&&
&!-- 数据库基本信息配置 --&
&property name=&driverClassName& value=&${oracle.driver}& /&
&property name=&url& value=&${oracle.url}& /&
&property name=&username& value=&${oracle.username}& /&
&property name=&password& value=&${oracle.password}& /&
&!-- 初始化连接数量 --&
&property name=&initialSize& value=&${druid.initialSize}& /&
&!-- 最大并发连接数 --&
&property name=&maxActive& value=&${druid.maxActive}& /&
&!-- 最大空闲连接数 --&
&property name=&maxIdle& value=&${druid.maxIdle}& /&
&!-- 最小空闲连接数 --&
&property name=&minIdle& value=&${druid.minIdle}& /&
&!-- 配置获取连接等待超时的时间 --&
&property name=&maxWait& value=&${druid.maxWait}& /&
&!-- 超过时间限制是否回收 --&
&property name=&removeAbandoned& value=&${druid.removeAbandoned}& /&
&!-- 超过时间限制多长; --&
&property name=&removeAbandonedTimeout& value=&${druid.removeAbandonedTimeout}& /&
&!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 --&
&property name=&timeBetweenEvictionRunsMillis& value=&${druid.timeBetweenEvictionRunsMillis}& /&
&!-- 配置一个连接在池中最小生存的时间,单位是毫秒 --&
&property name=&minEvictableIdleTimeMillis& value=&${druid.minEvictableIdleTimeMillis}& /&
&!-- 用来检测连接是否有效的sql,要求是一个查询语句--&
&property name=&validationQuery& value=&${druid.validationQuery}& /&
&!-- 申请连接的时候检测 --&
&property name=&testWhileIdle& value=&${druid.testWhileIdle}& /&
&!-- 申请连接时执行validationQuery检测连接是否有效,配置为true会降低性能 --&
&property name=&testOnBorrow& value=&${druid.testOnBorrow}& /&
&!-- 归还连接时执行validationQuery检测连接是否有效,配置为true会降低性能
&property name=&testOnReturn& value=&${druid.testOnReturn}& /&
&!-- 打开PSCache,并且指定每个连接上PSCache的大小 --&
&property name=&poolPreparedStatements& value=&${druid.poolPreparedStatements}& /&
&property name=&maxPoolPreparedStatementPerConnectionSize& value=&${druid.maxPoolPreparedStatementPerConnectionSize}& /&
&!--属性类型是字符串,通过别名的方式配置扩展插件,常用的插件有:
监控统计用的filter:stat
日志用的filter:log4j
防御SQL注入的filter:wall --&
&property name=&filters& value=&${druid.filters}& /&
启用Web监控统计功能需要在Web应用的web.xml中加入以下内容:
&filter-name&DruidWebStatFilter&/filter-name&
&filter-class&com.alibaba.druid.support.http.WebStatFilter&/filter-class&
&init-param&
&param-name&exclusions&/param-name&
&param-value&*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*&/param-value&
&/init-param&
&filter-mapping&
&filter-name&DruidWebStatFilter&/filter-name&
&url-pattern&/*&/url-pattern&
&/filter-mapping&
&servlet-name&DruidStatView&/servlet-name&
&servlet-class&com.alibaba.druid.support.http.StatViewServlet&/servlet-class&
&/servlet&
&servlet-mapping&
&servlet-name&DruidStatView&/servlet-name&
&url-pattern&/druid/*&/url-pattern&
&/servlet-mapping&
访问监控页面:http://ip:port/projectName/druid/index.html
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:62748次
排名:千里之外
原创:22篇
转载:43篇
(1)(1)(3)(1)(4)(3)(7)(15)(5)(2)(4)(16)(1)(2)spring-boot 整合 druid 页面出错 (*) property for user to setup - wdd668的专栏 - CSDN博客
spring-boot 整合 druid 页面出错 (*) property for user to setup
在&http://localhost:8012/druid/datasource.html
数据源页面提示:
(*) property for user to setup
& & &* 配置DataSource
& & &* @return
& & &* @throws SQLException
& & public DataSource druidDataSource() throws SQLException {
& & & & DruidDataSource druidDataSource = new DruidDataSource();
& & & & druidDataSource.setUsername(&root&);
& & & & druidDataSource.setPassword(&&);
& & & & druidDataSource.setDriverClassName(&com.mysql.jdbc.Driver&);
& & & & druidDataSource.setUrl(&jdbc:mysql://localhost:3306/test1&);
& & & & druidDataSource.setMaxActive(100);
& & & & druidDataSource.setFilters(&stat,wall,log4j&);
& & & & druidDataSource.setInitialSize(10);
& & & & return druidDataS
原因 数据源没有关闭
& & @Bean(destroyMethod = &close&, initMethod = &init&) &
我的热门文章
即使是一小步也想与你分享How To: Add a custom property to the UserProperties collection of an Outlook e-mail item
Today I want to tell you the story about Outlook user properties. Each item in Outlook such as , ,
and etc. (except for the NoteItem) provides you with the UserProperties property which returns an instance of the UserProperties class. Note that you will receive an exception if you try to programmatically add a user property to a DocumentItem object in Outlook (“Property is read-only”. The error code is 0x).
The UserProperties object represents a collection of the UserProperty instances. The collection provides you with the Add method we are currently interested in. The Add method accepts the following four parameters (the last two are optional):
Name – The name of the property we are going to add. The following characters are forbidden: [,],_ and #. You will get an exception with the error code 0x if you use them.
Type – The type of the property we are going to add. It is defined by the OlUserPropertyType enumeration.
AddToFolderFields – Indicates whether a user property should be added to the UserDefinedProperties folder collection as well. By default it is true and it is added as a custom field to the folder that contains the item.
DisplayFormat – Specifies how it will be displayed in the Outlook user interface. You can get all possible values for this parameter from the DisplayFormat property.
The third parameter allows you to show the value of your custom property in the explorer view. You just need to pass true when you add a user property. Then you will be able to add a custom column to the current view of a particular folder where your item resides (see the CurrentView property of the Explorer class in Outlook if you are going to add it programmatically). In the code below I pass false because we are not going to modify the current folder view.
Please pay attention to the fact that user properties and their values can be transmitted to other Outlook clients due to the changes made in Outlook 2003 SP2. Later versions of Outlook already have these changes implemented. You can read more about this in the
In the code I intend to demonstrate how to add a user property to the MailItem object in Outlook. To get the code running you need to pass an instance of the MailItem class to the AddUserProperty method. I will show you the code for VSTO and . So, let's start coding!
C# and Add-in Express:
private void AddUserProperty(Outlook.MailItem mail)
Outlook.UserProperties mailUserProperties = null;
Outlook.UserProperty mailUserProperty = null;
mailUserProperties = mail.UserProperties;
mailUserProperty = mailUserProperties.Add(&TestUserProperty&,
Outlook.OlUserPropertyType.olText, false, 1);
// Where 1 is OlFormatText (introduced in Outlook 2007)
mailUserProperty.Value = &Eugene Astafiev&;
mail.Save();
catch (Exception ex)
System.Windows.Forms.MessageBox.Show(ex.Message);
if (mailUserProperty != null) Marshal.ReleaseComObject(mailUserProperty);
if (mailUserProperties != null) Marshal.ReleaseComObject(mailUserProperties);
VB.NET and Add-in Express:
Private Sub AddUserProperty(mail As Outlook.MailItem)
Dim mailUserProperties As Outlook.UserProperties = Nothing
Dim mailUserProperty As Outlook.UserProperty = Nothing
mailUserProperties = mail.UserProperties
mailUserProperty = mailUserProperties.Add(&TestUserProperty&, _
Outlook.OlUserPropertyType.olText, False, 1)
' Where 1 is OlFormatText (introduced in Outlook 2007)
mailUserProperty.Value = &Eugene Astafiev&
mail.Save()
Catch ex As Exception
System.Windows.Forms.MessageBox.Show(ex.Message)
If Not IsNothing(mailUserProperty) Then
Marshal.ReleaseComObject(mailUserProperty)
If Not IsNothing(mailUserProperties) Then
Marshal.ReleaseComObject(mailUserProperties)
C# and VSTO:
using System.Runtime.InteropServices;
private void AddUserProperty(Outlook.MailItem mail)
Outlook.UserProperties mailUserProperties = null;
Outlook.UserProperty mailUserProperty = null;
mailUserProperties = mail.UserProperties;
mailUserProperty = mailUserProperties.Add(&TestUserProperty&,
Outlook.OlUserPropertyType.olText, false, 1);
// Where 1 is OlFormatText (introduced in Outlook 2007)
mailUserProperty.Value = &Eugene Astafiev&;
mail.Save();
catch (Exception ex)
System.Windows.Forms.MessageBox.Show(ex.Message);
if (mailUserProperty != null) Marshal.ReleaseComObject(mailUserProperty);
if (mailUserProperties != null) Marshal.ReleaseComObject(mailUserProperties);
VB.NET and VSTO:
Imports System.Runtime.InteropServices
Private Sub AddUserProperty(mail As Outlook.MailItem)
Dim mailUserProperties As Outlook.UserProperties = Nothing
Dim mailUserProperty As Outlook.UserProperty = Nothing
mailUserProperties = mail.UserProperties
mailUserProperty = mailUserProperties.Add(&TestUserProperty&, _
Outlook.OlUserPropertyType.olText, False, 1)
' Where 1 is OlFormatText (introduced in Outlook 2007)
mailUserProperty.Value = &Eugene Astafiev&
mail.Save()
Catch ex As Exception
System.Windows.Forms.MessageBox.Show(ex.Message)
If Not IsNothing(mailUserProperty) Then
Marshal.ReleaseComObject(mailUserProperty)
If Not IsNothing(mailUserProperties) Then
Marshal.ReleaseComObject(mailUserProperties)
See you on our forums and in the e-mail support!
, , , , , , ,
Filed under ,
How to send the outlook.mailitem to this method……..
how to read the current opened mailitem of outlook.
where should i call this method.
please provide me total code.
Post a comment
Please fill in the fields below (* indicates required fields).
Your name*
Your e-mail*
Send me a copy
Eugene Starostin
Dmitry Kostochko
Andrei Smolin
Sergey Grischenko
Eugene Astafiev
Renat Tlebaldziyeu
Fokke Post
Pieter van der Westhuizen
Type the characters you see in the picture*
Customers sayAbout Add-in Express
Add-in Express&
for Microsoft& Office and .net
Solid framework for deep customization of Microsoft Office. Use solution templates,
visual designers and components to develop version-neutral, secure and easy deployable extensions for all Office versions.
Supported Office extensions
COM add-ins, Outlook plug-ins, RTD servers, smart tags, Excel XLL and UDF
Requirements
Office versions: 2016 - 2000
IDE: VS 2017 - 2010; VB.NET, C#, C++/CLI
This technology is now available for our custom development services only. Based on the Add-in Express for Office core, it is designed for building custom-tailored Office add-ins with far less coding than you usually have to do. Plus, it includes all Add-in Express features such as True RAD, visual designers, Outlook view and form regions, etc.
Extensions: VSTO-based application-level Office add-ins
Applications: Outlook, Excel, Word, PowerPoint, Visio, InfoPath
Office versions: , 2010 (x86 and x64)
IDE: VSTO 2005 SE, ; VB.NET, C#
Add-in Express&
for Microsoft& Office and Delphi& VCL
Get the best platform for building version-neutral, fast and easy deployable plug-ins by using Add-in Express projects templates, visual designers, components and wizards in combination with a perfect Delphi compiler.
Supported Office extensions
COM add-ins, Outlook plug-ins, smart tags, Excel RTD and UDF
Requirements
Office versions: 2016 - 2000
IDE: Embarcadero Delphi XE2 - Delphi 10.2 Tokyo
Add-in Express&
for Internet Explorer& and Microsoft& .net
Use this visual tool to create thread-safe, secure, isolated, deployable and context-sensitive Internet Explorer add-ons.
Use visual designers and components to customize the IE interface with your own buttons, menu items, context menus, side-bars etc.
Requirements
Internet Explorer versions: 6 - 11 (x86, x64)
IDE: VS 2010 - 2017; VB.NET, C#, C++/CLI
Add-in Express& Regions for Microsoft& Outlook& and VSTO
Use this VSTO extension to develop advanced view and form regions for 17 different areas of the main Outlook Explorer window and all Outlook Inspector windows.
Supported extensions
Application-level Outlook add-ins
Requirements
Outlook versions: 2016 - 2003
IDE: Visual Studio 2017 - 2010 with VSTO installed
for Visual Studio& and WiX Toolset
This is an extension for Visual Studio that allows developers to quickly create WiX-based setup projects in a familiar Visual Studio way.
The Designer for WiX Toolset lets you forget the plain Windows Installer XML and concentrate on your deployment logic. It integrates several editors with the Visual Studio IDE and provides a set of vdproj designers to configure the file system, registry, user interface, custom actions, launch conditions and more for your setup projects.
Requirements
Visual Studio versions: , , 2017
WiX versions: 3.6 and higher
This technology is now available for our custom development services only. This visual toolkit allows creating secure, managed, isolated, deployable and version-neutral plug-ins for Outlook Express and Windows Mail. It provides powerful solution templates, Outlook Express - specific components, visual designers and wizards for advanced customization of Outlook Express menus, toolbars, panes and regions.
Extensions: Outlook Express plug-ins
Versions: Outlook Express 6.x, Windows Mail 6.x
IDE: VS ; VB.NET, C#, C++/CLI
VDProj to WiX Converter
for Microsoft& Visual Studio&
This Visual Studio extension lets you convert any VDProj setup projects to WiX in a click.
All Visual Studio versions and all vdproj features are supported, including variables, msm and msi packages, custom actions, built-in dialogs, etc.
Requirements
Visual Studio versions: , , 2017
WiX versions: 3.6 and higher
Security Manager
for Microsoft& Outlook
Add just a few lines of code to bypass the Outlook Object Model guard and avoid security warnings in add-ins and applications that automate Microsoft Outlook.
Supported application types
Stand-alone apps, Outlook add-ins
Requirements
Outlook versions: 2016 - 2000
Languages: VB.NET, C#, Delphi XE2 - Delphi 10.2 Tokyo, C++ (MFC/ATL/CLI), VBA, etc.
3 editions in 1 package: .NET, VCL and ActiveX
Ribbon Designer
for Microsoft& SharePoint& and Office 365
The specialized components of the Ribbon Designer allow you to quickly build custom SharePoint or Office 365 ribbons and add a new ribbon to your existing project.
Requirements
SharePoint editions: SharePoint 2010 and 2013 Foundation, Standard, Enterprise, SharePoint Online
Office 365 Plans: P, E1 - E4
IDEs: VS 2010 with SharePoint Developer Tools installed, VS 2012, VS 2013
The innovative technology for customizing Outlook views and forms. It is included in all Add-in Express for Office products and can be used to extend Outlook views, e-mail, task and appointment windows, To-Do bar, Reading and Navigation panes with your own custom sub-panes.
Extensions: application-level Outlook add-ins
Outlook versions: , , 2010 (x86 and x64)
.NET Edition: VS , 2010; VB.NET, C#, C++/CLI
.NET Framework: 2.0 and higher
VCL Edition: Delphi 5 - XE
ServicesContact us and NDA
Downloads by product
Support service resources
Blogs by productsHow-to samples
FAQ, EULA and money back
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in
the United States and/or other countries. All other trademarks are property of their respective owners.}

我要回帖

更多关于 haspusersetup 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信