glassfish mysql datasource_GlassFish连接池(GlassFish connection pool)

GlassFish连接池(GlassFish connection pool)

我把mysql驱动程序放入glassfish / admin1 / lib,我在尝试与GlassFish 3.1.2建立连接时遇到此错误

SimpleCRUD_ConnectionPool的Ping连接池失败。 类名错误或类路径未设置为:com.mysql.jdbc.jdbc2.optional.MysqlDataSource请查看server.log以获取更多详细信息。

配置配置:

池名称:SimpleCRUD_ConnectionPool资源类型:javax.sql.DataSource javax.sql.XADataSource数据源类名:com.mysql.jdbc.Driver

有人有什么想法?

i put mysql driver into glassfish/admin1/lib and i get this error on trying make a connection with GlassFish 3.1.2

Ping Connection Pool failed for SimpleCRUD_ConnectionPool. Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource Please check the server.log for more details.

Hare the configuration:

Pool Name: SimpleCRUD_ConnectionPool Resource Type: javax.sql.DataSource javax.sql.XADataSource Datasource Classname: com.mysql.jdbc.Driver

has someone any idea?

原文:https://stackoverflow.com/questions/18618812

2020-03-03 13:03

满意答案

驱动程序和数据源不一样。 从您的配置看,您将Driver类设置为DataSource类名?

你真的需要XA吗? 你在做任何分布式交易吗?

如果是这样,请将数据源设置为com.mysql.jdbc.jdbc2.optional.MysqlXADataSource

如果没有,请选择常规DataSource类型,然后将类名设置为com.mysql.jdbc.jdbc2.optional.MysqlDataSource

A Driver and a DataSource are not the same. It looks from your configuration that you're setting a Driver class as the DataSource classname?

Do you really need XA? Are you doing any distributed transaction?

If so, set the data source to com.mysql.jdbc.jdbc2.optional.MysqlXADataSource

If not, select a regular DataSource type and then set the classname to com.mysql.jdbc.jdbc2.optional.MysqlDataSource

2013-09-04

相关问答

试试跑步: asadmin get * | 更多 上面的命令将显示所有 GlassFish属性。 将它管道为grep以获取您感兴趣的池属性: asadmin get * | grep TimerPool 希望这可以帮助。 Try running: asadmin get * | more The above command will display all GlassFish attributes. Pipe it to grep to get just the pool properties y...

看起来问题是由安装脚本(我们写的)没有清理现有安装引起的。 问题只发生在我们尝试在现有版本上安装较新版本的glassfish时。 我们的安装脚本在安装新软件包之前没有删除旧的glassfish目录,这是导致问题的原因 Looks like the problem was caused by an install script (that we wrote) not cleaning up an existing installation. The problem only occurred whe...

资源存储在域中,因此您在登录时隐式定义域。如果登录到domain2 ,则会在domain2中创建资源。 您可以在每个create-blah命令上使用--target子句进一步定义资源的target 。 目标将是您已登录的域中的server或cluster ,并发出命令。 The resources are stored within the domain, so you implicitly define the domain when logging in. If you login to do...

您可以通过服务器控制台监视应用程序资源。 转到server > Monitor > Resources ,查看应用程序的统计信息 示例如下: You can monitor your application resources through the server console. Go to server > Monitor > Resources and see the stats of your application Example below:

它始终是第一个猜测,由于缺乏清理,连接不会返回池中。 确保: 关闭所有打开的连接 关闭您使用的所有EntityManagers 在每一条道路上。 这是好习惯,做 使用 try

{

//open

//work

}

catch

{

//exception handling

}

finally

{

//close

}

你处理这些情况的任何地方。 附注:像findbugs / sonar这样的静态分析仪能够检测到这些情况。 Its always the first guess, that...

实际上我在Windows上面临同样的问题,它解决了从Prgramfile文件夹中删除我的glassfishe并从http://download.oracle.com/glassfish/4.0/promoted/glassfish-4.0-b87.zip下载新版本并解压缩你想要的但不是在programfile中,因为它需要管理员滚动,然后创建新的服务器。 Actually I faced the same problem on windows, and it resolved be delete ...

是。 虽然遗憾的是记录不足。 您可以创建一个应用程序范围的连接池,当您将war文件解压缩时,Glassfish会动态创建。 在取消部署时会破坏它。 但是,它仅适用于服务器上的此应用程序。 这是你应该做的。 像这样创建名为glassfish-resources.xml的文件(对于MySql): <?xml version="1.0" encoding="UTF-8"?>

/p>

似乎是一个类路径问题。 你的域的lib目录中有mysql连接器吗? 正确的路径应该是: glassfish-install-dir \ glassfish \ domains \ domain1 \ lib (如果您不使用默认域1,则使用不同的域名) Seems to be a classpath issue. Do you have the mysql connector in your domain's lib dir? The correct path should be: glassfis...

是的,可以在glassfish中创建JDBC Pool 我不确定命令行语法,但通过管理控制台很容易 请参阅管理控制台: http:// localhost:4848 / common / index.jsf资源 - > JDBC - > JDBC连接池 UPD: 命令行示例 asadmin create-jdbc-connection-pool

--restype=java.sql.Driver

--driverclassname=oracle.jdbc.pool.OracleDataSourc...

驱动程序和数据源不一样。 从您的配置看,您将Driver类设置为DataSource类名? 你真的需要XA吗? 你在做任何分布式交易吗? 如果是这样,请将数据源设置为com.mysql.jdbc.jdbc2.optional.MysqlXADataSource 如果没有,请选择常规DataSource类型,然后将类名设置为com.mysql.jdbc.jdbc2.optional.MysqlDataSource A Driver and a DataSource are not the same....

相关文章

DataSource用来取代DriverManager来获取Connection;通过DataSour

...

构建连接池对象JedisPool JedisPool jedisPool = new JedisP

...

Oceanus 底层的连接池使用 DBCP,例举几个重要的相关配置如下,原文参见: http://co

...

集群式连接池和普通的连接池主要的区别是: 1、普通连接池使用的是 JedisPool 2、集群式

...

使用MVC4 EF Linq获取foreach列表循环的时候遇到了如下的问题:报错提示 Ther

...

httpclient 的连接管理对象为HttpClientConnectionManager 初始

...

一次分布式程序运行下来,发现执行到最后的时候出错造成了 job异常退出,然后重新启动namenode是

...

Class.forName("com.mysql.jdbc.Driver");

...

启动android模拟器时.有时会报The connection to adb is down, an

...

最新问答

如果启用了复制处理程序,请确保将其置于其中一个安全角色之后。 我见过人们做的另一件事是在不同的端口上运行admin。 最好在需要auth的页面上使用SSL,这样你就不会发送明确的密码,因此管理和复制将发生在8443上,而常规查询将在8080上发生。 如果您要签署自己的证书,请查看此有用的SO页面: 如何在特定连接上使用不同的证书? I didn't know that /admin was the context for SOLR admin because /admin does not re

第一:在您的样本中,您有: 但是你在询问 //td[@class=‘CarMiniProfile-TableHeader’] (注意TableHeader中的大写'T')。 xpath区分大小写。 第二:通过查询// td [@ class ='CarMiniProfile-TableHeader'] / td,你暗示你在外部td中有一个'td'元素,而它们是兄弟姐妹。 有很多方法可以在这里获得制作和模型

这是你的答案: http://jsfiddle.net/gPsdk/40/ .preloader-container { position: absolute; top: 0px; right: 0px; bottom: 0px; left: 0px; background: #FFFFFF; z-index: 5; opacity: 1; -webkit-transition: all 500ms ease-out;

问题是,在启用Outlook库引用的情况下, olMailItem是一个保留常量,我认为当您将Dim olMailItem as Outlook.MailItem ,这不是问题,但是尝试设置变量会导致问题。 以下是完整的解释: 您已将olMailItem声明为对象变量。 在赋值语句的右侧,在将其值设置为对象的实例之前,您将引用此Object 。 这基本上是一个递归错误,因为你有对象试图自己分配自己。 还有另一个潜在的错误,如果之前已经分配了olMailItem ,这个语句会引发另一个错误(可能是

我建议使用wireshark http://www.wireshark.org/通过记录(“捕获”)设备可以看到的网络流量副本来“监听”网络上发生的对话。 当您开始捕获时,数据量似乎过大,但如果您能够发现任何看起来像您的SOAP消息的片段(应该很容易发现),那么您可以通过右键单击并选择来快速过滤到该对话'关注TCP Stream'。 然后,您可以在弹出窗口中查看您编写的SOAP服务与Silverlight客户端之间的整个对话。 如果一切正常,请关闭弹出窗口。 作为一个额外的好处,wireshar

Android默认情况下不提供TextView的合理结果。 您可以使用以下库并实现适当的aligntment。 https://github.com/navabi/JustifiedTextView Android Does not provide Justified aligntment of TextView By default. You can use following library and achieve proper aligntment. https://github.com/

你的代码适合我: class apples { public static void main(String args[]) { System.out.println("Hello World!"); } } 我将它下载到c:\ temp \ apples.java。 以下是我编译和运行的方式: C:\temp>javac -cp . apples.java C:\temp>dir apples Volume in drive C is HP_PAV

12个十六进制数字(带前导0x)表示48位。 那是256 TB的虚拟地址空间。 在AMD64上阅读wiki(我假设你在上面,对吗?)架构http://en.wikipedia.org/wiki/X86-64 12 hex digits (with leading 0x) mean 48 bits. That is 256 TB of virtual address space. Read wiki on AMD64 (I assume that you are on it, right?) ar

这将取决于你想要的。 对象有两种属性:类属性和实例属性。 类属性 类属性对于类的每个实例都是相同的对象。 class MyClass: class_attribute = [] 这里已经为类定义了MyClass.class_attribute ,您可以使用它。 如果您创建MyClass实例,则每个实例都可以访问相同的class_attribute 。 实例属性 instance属性仅在创建实例时可用,并且对于类的每个实例都是唯一的。 您只能在实例上使用它们。 在方法__init__中定

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值