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__中定
總結
以上是生活随笔為你收集整理的glassfish mysql datasource_GlassFish连接池(GlassFish connection pool)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 丁磊的“阿甘哲学”
- 下一篇: (2022-2028年年)全球与中国实验