IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Glassfish et Payara Java Discussion :

Invalid resource : jdbc/bonecp_resource__pm


Sujet :

Glassfish et Payara Java

  1. #1
    Nouveau membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2011
    Messages
    53
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Aisne (Picardie)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Industrie

    Informations forums :
    Inscription : Avril 2011
    Messages : 53
    Points : 39
    Points
    39
    Par défaut Invalid resource : jdbc/bonecp_resource__pm
    Bonjour,

    Lorsque je veux déployer mon application il me met cette erreur ci :
    Invalid resource : jdbc/bonecp_resource__pm
    Bizarrement il y a un __pm qui vient ce greffer au nom de mon pool et je ne comprends pas.
    J'ai essayé plusieurs solutions :.
    Test 1 : http://stackoverflow.com/questions/1...dbc-default-pm
    Test 2 : Suppression de mon domain et création
    Test 3 : Connector mysql bien dans [domaindir]/lib/ext
    Et toujours la même erreur.
    Voici mon persistance.xml :

    Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/ persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
    http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
        <persistence-unit name="bdd_sdzee_PU" transaction-type="JTA">
            <jta-data-source>jdbc/bonecp_resource</jta-data-source>
            <class>com.projet.entities.personnes</class>
            <properties/>
        </persistence-unit>
    </persistence>


    Je ne sais pas du tout d'ou vient le problème. Des personnes peuvent m'aider je vous pris.

    Une très bonne soirée dans tous les cas

  2. #2
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    1) on pourrais avoir les logs complets de démarrage de ta webapp, pas juste le dernier message?
    2) comment a été configurée ta datasource?

  3. #3
    Nouveau membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2011
    Messages
    53
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Aisne (Picardie)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Industrie

    Informations forums :
    Inscription : Avril 2011
    Messages : 53
    Points : 39
    Points
    39
    Par défaut
    Bonjour oui bien sur tenez voici le log complet :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
     
    2016-02-29T13:19:01.896+0100|Infos: visiting unvisited references
    2016-02-29T13:19:02.037+0100|Infos: visiting unvisited references
    2016-02-29T13:19:02.088+0100|Infos: visiting unvisited references
    2016-02-29T13:19:02.099+0100|Infos: visiting unvisited references
    2016-02-29T13:19:02.100+0100|Infos: visiting unvisited references
    2016-02-29T13:19:02.100+0100|Infos: visiting unvisited references
    2016-02-29T13:19:02.101+0100|Infos: visiting unvisited references
    2016-02-29T13:19:02.171+0100|Grave: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
    2016-02-29T13:19:02.173+0100|Grave: java.lang.RuntimeException: Invalid resource : jdbc/bonecp_resource__pm
        at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:593)
        at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:517)
        at org.glassfish.persistence.common.PersistenceHelper.lookupPMResource(PersistenceHelper.java:63)
        at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupDataSource(ProviderContainerContractInfoBase.java:71)
        at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:142)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:107)
        at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223)
        at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510)
        at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230)
        at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
        at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
        at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189)
        at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
        at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
        at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
        at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
        at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Invalid resource : jdbc/bonecp_resource__pm
        at org.glassfish.jdbcruntime.service.JdbcDataSource.validateResource(JdbcDataSource.java:81)
        at org.glassfish.jdbcruntime.service.JdbcDataSource.setResourceInfo(JdbcDataSource.java:62)
        at org.glassfish.jdbcruntime.JdbcRuntimeExtension.lookupDataSourceInDAS(JdbcRuntimeExtension.java:136)
        at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:589)
        ... 50 more
    2016-02-29T13:19:02.173+0100|Grave: Exception while preparing the app
    2016-02-29T13:19:02.173+0100|Grave: Exception during lifecycle processing
    java.lang.RuntimeException: Invalid resource : jdbc/bonecp_resource__pm
        at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:593)
        at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:517)
        at org.glassfish.persistence.common.PersistenceHelper.lookupPMResource(PersistenceHelper.java:63)
        at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupDataSource(ProviderContainerContractInfoBase.java:71)
        at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:142)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:107)
        at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223)
        at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510)
        at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230)
        at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
        at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
        at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189)
        at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
        at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
        at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
        at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
        at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Invalid resource : jdbc/bonecp_resource__pm
        at org.glassfish.jdbcruntime.service.JdbcDataSource.validateResource(JdbcDataSource.java:81)
        at org.glassfish.jdbcruntime.service.JdbcDataSource.setResourceInfo(JdbcDataSource.java:62)
        at org.glassfish.jdbcruntime.JdbcRuntimeExtension.lookupDataSourceInDAS(JdbcRuntimeExtension.java:136)
        at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:589)
        ... 50 more
     
    2016-02-29T13:19:02.185+0100|Grave: Exception while preparing the app : Invalid resource : jdbc/bonecp_resource__pm
    com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Invalid resource : jdbc/bonecp_resource__pm
        at org.glassfish.jdbcruntime.service.JdbcDataSource.validateResource(JdbcDataSource.java:81)
        at org.glassfish.jdbcruntime.service.JdbcDataSource.setResourceInfo(JdbcDataSource.java:62)
        at org.glassfish.jdbcruntime.JdbcRuntimeExtension.lookupDataSourceInDAS(JdbcRuntimeExtension.java:136)
        at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:589)
        at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:517)
        at org.glassfish.persistence.common.PersistenceHelper.lookupPMResource(PersistenceHelper.java:63)
        at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupDataSource(ProviderContainerContractInfoBase.java:71)
        at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:142)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:107)
        at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223)
        at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510)
        at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230)
        at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
        at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
        at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189)
        at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
        at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
        at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
        at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
        at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
        at java.lang.Thread.run(Thread.java:745)

    Ma datasource a été configuré via un fichier xml, puis j'ai importé les données (add-resources dans asadmin) :
    Voici le fichier en question :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
     
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Default options loaded by BoneCP. Modify as per your needs. This file has
         been automatically generated. -->
    <!DOCTYPE resources PUBLIC "-//Sun Microsystems Inc.//DTD Application Server 9.0 Domain//EN" "*<install directory>/lib/dtds/sun-resources_1_3.dtd*">
    <resources>
         <jdbc-connection-pool name="bonecpPool" datasource-classname="com.jolbox.bonecp.BoneCPDataSource" transaction-isolation-level="read-committed" is-isolation-level-guaranteed="true" steady-pool-size="1" max-pool-size="20" res-type="javax.sql.DataSource">
     
         <!--jdbc-connection-pool-->
             <!--Specifies the Transaction Isolation Level on the pooled       
                 database connections. Optional. Has no default. If left       
                 unspecified the pool operates with default isolation level    
                 provided by the JDBC Driver. A desired isolation level can be 
                 set using one of the standard transaction isolation levels,   
                 which see.-->
             <!--transaction-isolation-level="read-committed"-->
     
             <!--Applicable only when a particular isolation level is          
                 specified for transaction-isolation-level. The default value  
                 is true. This assures that every time a connection is         
                 obtained from the pool, it is guaranteed to have the          
                 isolation set to the desired value. This could have some      
                 performance impact on some JDBC drivers. Can be set to false  
                 by that administrator when they are certain that the          
                 application does not change the isolation level before        
                 returning the connection.-->
             <!--is-isolation-level-guaranteed="true"-->
     
             <!--minimum and initial number of connections maintained in the pool.-->
             <!--steady-pool-size="1"-->
     
             <!--maximum number of conections that can be created-->
             <!--max-pool-size="20"-->
     
             <!--To aid user in detecting potential connection leaks by the    
                 application. When a connection is not returned back to the    
                 pool by the application within the specified period, it is    
                 assumed to be a potential leak and stack trace of the caller  
                 will be logged. Default is 0, which implies there is no leak  
                 detection, by default. A positive non-zero value turns on     
                 leak detection. Note however that, this attribute only        
                 detects if there is a connection leak. The connection can be  
                 reclaimed only if connection-leak-reclaim is set to true.-->
             <!--connection-leak-timeout-in-seconds="21600"-->
     
             <!--If enabled, connection will be reusable (put back into pool)  
                 after connection-leak-timeout-in-seconds occurs. Default      
                 value is false.          -->
             <!--connection-leak-reclaim="true"-->
         <!--jdbc-connection-pool-->
     
         <!-- Sets the name of the pool for JMX and thread names. -->
         <property name="poolName" value="BoneCPPool"/>
     
         <!-- Sets the minimum number of connections that will be contained in every partition.  -->
         <property name="driverClass" value="com.mysql.jdbc.Driver"/>
     
         <property name="minConnectionsPerPartition" value="1"/>
     
         <!-- Sets the maximum number of connections that will be contained in every partition. 
              Setting this to 5 with 3 partitions means you will have 15 unique 
              connections to the database. Note that the connection pool will not create all 
              these connections in one go but rather start off with minConnectionsPerPartition and gradually 
              increase connections as required. -->
         <property name="maxConnectionsPerPartition" value="20"/>
     
         <!-- Sets the acquireIncrement property.  When the available connections are about to run 
              out, BoneCP will dynamically create new ones in batches. This property controls how 
              many new connections to create in one go (up to a maximum of 
              maxConnectionsPerPartition). Note: This is a per partition setting. -->
         <property name="acquireIncrement" value="2"/>
     
         <!-- Sets number of partitions to use.  In order to reduce lock contention 
              and thus improve performance, each incoming connection request picks off a connection from 
              a pool that has thread-affinity, i.e. pool[threadId % partition_count]. The higher this number, 
              the better your performance will be for the case when you have plenty 
              of short-lived threads. Beyond a certain threshold, maintenance of these pools will start 
              to have a negative effect on performance (and only for the case when 
              connections on a partition start running out).  Default: 1, minimum: 1, recommended: 
              2-4 (but very app specific) -->
         <property name="partitionCount" value="1"/>
     
         <!-- Sets the JDBC connection URL. -->
         <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/test"/>
     
         <!-- Sets username to use for connections. -->
         <!-- <property name="username" value="(null or no default value)"/> -->
     
         <!-- Sets username to use for connections. Just delegates to setUsername for clients hardcoded 
              with "setUser" instead. -->
         <property name="user" value="root"/>
     
         <!-- Sets password to use for connections. -->
         <property name="password" value="root"/>
     
         <!-- Sets the idleConnectionTestPeriod.  This sets the time (in minutes), for a connection 
              to remain idle before sending a test query to the DB. This is 
              useful to prevent a DB from timing out connections on its end. Do 
              not use aggressive values here!   Default: 240 min, set to 0 
              to disable -->
         <property name="idleConnectionTestPeriodInMinutes" value="240"/>
     
         <!-- Sets the idleConnectionTestPeriod.  This sets the time (in seconds), for a connection 
              to remain idle before sending a test query to the DB. This is 
              useful to prevent a DB from timing out connections on its end. Do 
              not use aggressive values here!   Default: 240 min, set to 0 
              to disable -->
         <property name="idleConnectionTestPeriodInSeconds" value="14400"/>
     
         <!-- Sets Idle max age (in min).  The time (in minutes), for a 
              connection to remain unused before it is closed off. Do not use aggressive 
              values here!  Default: 60 minutes, set to 0 to disable. -->
         <property name="idleMaxAgeInMinutes" value="60"/>
     
         <!-- Sets Idle max age (in seconds).  The time (in seconds), for a 
              connection to remain unused before it is closed off. Do not use aggressive 
              values here!  Default: 60 minutes, set to 0 to disable. -->
         <property name="idleMaxAgeInSeconds" value="3600"/>
     
         <!-- Sets the connection test statement.  The query to send to the DB 
              to maintain keep-alives and test for dead connections. This is database specific and 
              should be set to a query that consumes the minimal amount of load 
              on the server. Examples: MySQL: "/* ping *\/ SELECT 1", PostgreSQL: "SELECT NOW()". 
    		  Oracle : "SELECT SYS_CONTEXT('USERENV','SID') session_id, SYS_CONTEXT('USERENV','CURRENT_USER') oracle_user, SYS_CONTEXT('USERENV','DB_NAME') db_name, SYS_CONTEXT('USERENV','OS_USER') app_os_user, SYS_CONTEXT('USERENV','HOST') app_host, SYS_CONTEXT('USERENV','IP_ADDRESS') app_os_ip_address FROM DUAL"
              If you do not set this, then BoneCP will issue a metadata request 
              instead that should work on all databases but is probably slower.  (Note: 
              In MySQL, prefixing the statement by /* ping *\/ makes the driver issue 
              1 fast packet instead. See http://blogs.sun.com/SDNChannel/entry/mysql_tips_for_java_developers ) Default: Use metadata request -->
         <property name="connectionTestStatement" value="/* ping *\/ SELECT 1"/>
       
         <!-- Sets statementsCacheSize setting.  The number of statements to cache. -->
         <property name="statementsCacheSize" value="0"/>
       
         <!-- Sets number of helper threads to create that will handle releasing a connection. 
               When this value is set to zero, the application thread is blocked 
              until the pool is able to perform all the necessary cleanup to recycle 
              the connection and make it available for another thread.  When a non-zero 
              value is set, the pool will create threads that will take care of 
              recycling a connection when it is closed (the application dumps the connection into 
              a temporary queue to be processed asychronously to the application via the release 
              helper threads).  Useful when your application is doing lots of work on 
              each connection (i.e. perform an SQL query, do lots of non-DB stuff and 
              perform another query), otherwise will probably slow things down. -->
         <property name="releaseHelperThreads" value="3"/>
       
         <!-- Sets the connection hook.  Fully qualified class name that implements the ConnectionHook 
              interface (or extends AbstractConnectionHook). BoneCP will callback the specified class according to the 
              connection state (onAcquire, onCheckIn, onCheckout, onDestroy). -->
         <!-- <property name="connectionHook" value="(null or no default value)"/> -->
       
         <!-- Specifies an initial SQL statement that is run only when a connection is 
              first created. -->
         <!-- <property name="initSQL" value="(null or no default value)"/> -->
       
         <!-- Instruct the pool to create a helper thread to watch over connection acquires 
              that are never released (or released twice). This is for debugging purposes only 
              and will create a new thread for each call to getConnection(). Enabling this 
              option will have a big negative impact on pool performance. -->
         <property name="closeConnectionWatch" value="false"/>
       
         <!-- If enabled, log SQL statements being executed. -->
         <property name="logStatementsEnabled" value="false"/>
       
         <!-- Sets the number of ms to wait before attempting to obtain a connection 
              again after a failure. -->
         <property name="acquireRetryDelayInMs" value="7000"/>
       
         <!-- Set to true to force the connection pool to obtain the initial connections 
              lazily. -->
         <property name="lazyInit" value="false"/>
       
         <!-- Set to true to enable recording of all transaction activity and replay the 
              transaction automatically in case of a connection failure. -->
         <property name="transactionRecoveryEnabled" value="false"/>
       
         <!-- After attempting to acquire a connection and failing, try to connect these many 
              times before giving up. Default 5. -->
         <property name="acquireRetryAttempts" value="5"/>
       
         <!-- Sets the connection hook class name. Consider using setConnectionHook() instead. -->
         <!-- <property name="connectionHookClassName" value="(null or no default value)"/> -->
       
         <!-- Set to true to disable JMX. -->
         <property name="disableJMX" value="false"/>
       
         <!-- If set, use datasourceBean.getConnection() to obtain a new connection instead of Driver.getConnection(). -->
         <!-- <property name="datasourceBean" value="(null or no default value)"/> -->
       
         <!-- Queries taking longer than this limit to execute are logged. -->
         <property name="queryExecuteTimeLimitInMs" value="0"/>
       
         <!-- Sets the Pool Watch thread threshold.  The pool watch thread attempts to 
              maintain a number of connections always available (between minConnections and maxConnections). This value 
              sets the percentage value to maintain. For example, setting it to 20 means 
              that if the following condition holds: Free Connections / MaxConnections < poolAvailabilityThreshold  
              new connections will be created. In other words, it tries to keep at 
              least 20% of the pool full of connections. Setting the value to zero 
              will make the pool create new connections when it needs them but it 
              also means your application may have to wait for new connections to be 
              obtained at times.  Default: 20. -->
         <property name="poolAvailabilityThreshold" value="20"/>
       
         <!-- If set to true, the pool will not monitor connections for proper closure. 
              Enable this option if you only ever obtain your connections via a mechanism 
              that is guaranteed to release the connection back to the pool (eg Spring's 
              jdbcTemplate, some kind of transaction manager, etc). -->
         <property name="disableConnectionTracking" value="false"/>
       
         <!-- Sets the maximum time (in milliseconds) to wait before a call to getConnection 
              is timed out.  Setting this to zero is similar to setting it 
              to Long.MAX_VALUE  Default: 0 ( = wait forever ) -->
         <property name="connectionTimeoutInMs" value="0"/>
       
         <!-- Sets the no of ms to wait when close connection watch threads are 
              enabled. 0 = wait forever. -->
         <property name="closeConnectionWatchTimeoutInMs" value="0"/>
       
         <!-- Sets number of statement helper threads to create that will handle releasing a 
              statement.  When this value is set to zero, the application thread is 
              blocked until the pool and JDBC driver are able to close off the 
              statement.  When a non-zero value is set, the pool will create threads 
              that will take care of closing off the statement asychronously to the application 
              via the release helper threads).  Useful when your application is opening up 
              lots of statements otherwise will probably slow things down. -->
         <property name="statementReleaseHelperThreads" value="0"/>
       
         <!-- Sets the maxConnectionAge in seconds. Any connections older than this setting will be 
              closed off whether it is idle or not. Connections currently in use will 
              not be affected until they are returned to the pool. -->
         <property name="maxConnectionAgeInSeconds" value="0"/>
       
         <!-- Sets the configFile. If configured, this will cause the pool to initialise using 
              the config file in the same way as if calling new BoneCPConfig(filename). -->
         <!-- <property name="configFile" value="(null or no default value)"/> -->
       
         <!-- Sets the queue serviceOrder. Values currently understood are FIFO and LIFO. -->
         <!-- <property name="serviceOrder" value="(null or no default value)"/> -->
       
         <!-- If set to true, keep track of some more statistics for exposure via 
              JMX. Will slow down the pool operation. -->
         <property name="statisticsEnabled" value="false"/>
       
         <!-- Sets the defaultAutoCommit setting for newly created connections. If not set, use driver 
              default. -->
         <!-- <property name="defaultAutoCommit" value="(null or no default value)"/> -->
       
         <!-- Sets the defaultReadOnly setting for newly created connections. If not set, use driver 
              default. -->
         <!-- <property name="defaultReadOnly" value="(null or no default value)"/> -->
       
         <!-- Sets the defaultCatalog setting for newly created connections. If not set, use driver 
              default. -->
         <!-- <property name="defaultCatalog" value="(null or no default value)"/> -->
       
         <!-- Sets the defaultTransactionIsolation. Should be set to one of: NONE, READ_COMMITTED, READ_UNCOMMITTED, REPEATABLE_READ 
              or SERIALIZABLE. If not set, will use driver default. -->
         <!-- <property name="defaultTransactionIsolation" value="(null or no default value)"/> -->
       
         <!-- If set to true, no attempts at passing in a username/password will be 
              attempted when trying to obtain a raw (driver) connection. Useful for cases when 
              you already have another mechanism on authentication eg NTLM. -->
         <property name="externalAuth" value="false"/>
       
         <!-- Sets the classloader to use to load JDBC driver and hooks (set to 
              null to use default). -->
         <!-- <property name="classLoader" value="(null or no default value)"/> -->
       
         <!-- If set to true, try to unregister the JDBC driver when pool is 
              shutdown. -->
         <property name="deregisterDriverOnClose" value="false"/>
       
         <!-- Sets the nullOnConnectionTimeout.  If true, return null on connection timeout rather than 
              throw an exception. This performs better but must be handled differently in your 
              application. This only makes sense when using the connectionTimeout config option. -->
         <!-- <property name="nullOnConnectionTimeout" value="(null or no default value)"/> -->
    </jdbc-connection-pool>
    <jdbc-resource enabled="true" jndi-name="jdbc/bonecp_resource" object-type="user" pool-name="bonecpPool"/>
    </resources>

  4. #4
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    j'aurais espéré que glassfish fasse un listing de toutes les connections et ocnfigurations jndi avant de démarrer ton application comme le fait wildfly :/

    Connais pas assez glassfish pour savoir ce qui pose problème. tu peux peux être faire un code qui explore le jndi depuis sa racine pour t'afficher tout ce qu'il trouve.

  5. #5
    Membre du Club
    Homme Profil pro
    Développeur android & Java Web application
    Inscrit en
    Avril 2016
    Messages
    105
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Côte d'Ivoire

    Informations professionnelles :
    Activité : Développeur android & Java Web application
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2016
    Messages : 105
    Points : 59
    Points
    59
    Par défaut
    Salut quand moi j'essaie de creer une connexion pool glassfish me met ca comme erreur :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    class java.lang.RuntimeException
    Aidez-moi SVP

Discussions similaires

  1. Réponses: 2
    Dernier message: 10/03/2015, 09h55
  2. Erreur :Invalid resource : jdbc/__default__pm
    Par ibtiag dans le forum NetBeans
    Réponses: 0
    Dernier message: 09/03/2015, 16h45
  3. Configurer une resource JDBC
    Par milanais dans le forum Eclipse Java
    Réponses: 0
    Dernier message: 19/07/2013, 18h54
  4. [MySQL] Obtention de diverses erreurs : undefined index et invalid resource
    Par kate59 dans le forum PHP & Base de données
    Réponses: 5
    Dernier message: 04/02/2008, 12h51
  5. [JDBC]Invalid Operation : Type de ResultSet
    Par zizou771 dans le forum JDBC
    Réponses: 7
    Dernier message: 10/10/2005, 12h56

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo