小编kar*_*arx的帖子

无法从Glassfish连接到JDBC连接池

我正在使用MySql运行GlassFish Server开源版3.1.2.2(版本5)

我使用NetBeans创建了一个JDBC连接池.

谷歌搜索这个问题我发现添加它是一个类路径问题. 未设置将MySQL数据库连接到Glassfish类路径或类名错误, 并且 http://bhapca.blogspot.in/2009/06/class-name-is-wrong-or-classpath-is-not.html 添加了jar目录.

C:\Program Files\glassfish-3.1.2.2\glassfish\domains\domain1\lib
Run Code Online (Sandbox Code Playgroud)

并且也尝试过

C:\Program Files\glassfish-3.1.2.2\glassfish\domains\domain1\lib\ext
Run Code Online (Sandbox Code Playgroud)

多次重启服务器.重新创建连接池.仍然没有成功.

当我尝试从管理控制台ping它时,我得到了这个

Error An error has occurred
Ping Connection Pool failed for AffableBeanPool. Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource Please check the server.log for more details.
Run Code Online (Sandbox Code Playgroud)

相关服务器日志条目:

Log Entry Detail

Timestamp

Jul 15, 2013 15:45:49.340
Log Level

WARNING
Logger

javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service
Name-Value Pairs

_ThreadID=22;_ThreadName=Thread-2;
Record Number

3172
Message ID

RAR8054
Complete Message

Exception while creating an unpooled [test] connection for pool [ …
Run Code Online (Sandbox Code Playgroud)

mysql sql glassfish

14
推荐指数
2
解决办法
5万
查看次数

请使用表情符号阅读文本文件并打印出来

输入 - >

输出 - >≡ƒÿé≡ƒÿé

我只想保持表情符号的原始状态.

我所做的就是这个

#include <stdio.h>
#include <stdlib.h>

int main()
{
    char ch;
    FILE *fp;

    fp = fopen("test.txt","r");
    while( ( ch = fgetc(fp) ) != EOF )
        printf("%c",ch);

    fclose(fp);
return 0;
}
Run Code Online (Sandbox Code Playgroud)

c unicode text file-handling emoji

5
推荐指数
1
解决办法
1421
查看次数

R将数据帧列写入具有前导零的csv

我有一个表存储不同长度的前缀.. 表片段(ClusterTable)

ClusterTable[ClusterTable$FeatureIndex == "Prefix2",'FeatureIndex', 'FeatureValue')]

   FeatureIndex FeatureValue
80      Prefix2           80
81      Prefix2           81
30      Prefix2           30
70      Prefix2           70
51      Prefix2           51
84      Prefix2           84
01      Prefix2           01
63      Prefix2           63
28      Prefix2           28
26      Prefix2           26
65      Prefix2           65
75      Prefix2           75
Run Code Online (Sandbox Code Playgroud)

我使用以下方法写入 csv 文件:

write.csv(ClusterTable, file = "My_Clusters.csv")
Run Code Online (Sandbox Code Playgroud)

特征值 01 丢失前导零。

我首先尝试将列转换为字符

ClusterTable$FeatureValue <- as.character(ClusterTable$FeatureValue)
Run Code Online (Sandbox Code Playgroud)

并尝试将其附加到一个空字符串以在写入文件之前将其转换为字符串。

ClusterTable$FeatureValue <- paste("",ClusterTable$FeatureValue)
Run Code Online (Sandbox Code Playgroud)

另外,我在这个表中有各种长度的前缀,所以我不能使用固定长度的简单格式说明符。即表也有值 001(Prefix3),0001(Prefix4) 等。谢谢

csv r export-to-csv

5
推荐指数
2
解决办法
1万
查看次数

在 Google Play 控制台的预启动测试中提供自动登录凭据 [Ionic]

我最近在 google play 上上传了我的第一个 ionic 应用程序。我开始探索 google play 控制台并遇到了预发布测试。

我们需要为登录的文本字段、密码和登录按钮的按钮提供android资源名称以使其工作。

关于如何获取此 android 资源名称或将它们附加到我的元素的任何想法。或者一种从构建的 apk 中获取资源名称的方法。我对可用于android开发的工具不太熟悉。

android cordova ionic-framework

5
推荐指数
1
解决办法
2369
查看次数

睡在Java Web应用程序中

我想在我的java应用程序中使用Thread.sleep().但是不起作用.删除睡眠后程序有效.

在我的程序中,我正在运行多个线程,并希望每个线程以可变速度向前移动.有些人可能会被处理得更少一些.所以我使用随机数作为参数使用睡眠.如果有另一种方法可以做到这一点.不用睡觉.

这是我使用睡眠功能的部分.

public void run()
    {
        Random r = new Random();
        int t;
        while(true)
        {
            if(total == 1)
            {
                // win();
                break;
            }
            if(doa == 1)
                break;
            // Player x = e[r.nextInt(20)%2];
            Player x = choose();
            x.attack(this, 10 + (power==1?5:0));
            if(r.nextInt(100)%(5 - (power==2?2:0)) == 0)
                System.out.println(" " + name + " used Potion effect (" + potionno++ + ") .. now " + name + "'s Health is " + (h+= 10 + r.nextInt(20))); 
            try
            {
                sleep(50 + r.nextInt(1000)); …
Run Code Online (Sandbox Code Playgroud)

java

1
推荐指数
1
解决办法
1858
查看次数

标签 统计

android ×1

c ×1

cordova ×1

csv ×1

emoji ×1

export-to-csv ×1

file-handling ×1

glassfish ×1

ionic-framework ×1

java ×1

mysql ×1

r ×1

sql ×1

text ×1

unicode ×1