Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 3.1_dev
    • Fix Version/s: 3.1_dev
    • Component/s: entity-persistence
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      Am using Embedded version of Glassfish to bootstrap application.

      Command to create the resource succeeds without any failures. However when the application tries to use the resource it outputs the following:

      SEVERE: Exception while preparing the app : Invalid resource : jdbc/customname__pm
      com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Invalid resource : jdbc/customname__pm
      at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl$MyDataSource.validateResource(ConnectorResourceAdminServiceImpl.java:272)
      at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl$MyDataSource.setResourceInfo(ConnectorResourceAdminServiceImpl.java:253)
      at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookupDataSourceInDAS(ConnectorResourceAdminServiceImpl.java:243)
      at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:536)
      at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:467)
      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:154)
      at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:119)
      at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:202)
      at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:475)
      at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:209)
      at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:162)

      Note: A similar bug has been marked as resolved http://java.net/jira/browse/GLASSFISH-13672 However I do not have any glassfish-resources.xml which could be used to resolve the issue. It was mentioned in this bug report that the user also found the bug without this file but no extra comments were made on how to resolve.

        Activity

        Hide
        Mitesh Meswani added a comment - - edited

        >Command to create the resource succeeds without any failures.
        How are you creating the resource?
        To isolate issue, can you please try to lookup resource "jdbc/customname" from your app to see if it succeeds.

        Show
        Mitesh Meswani added a comment - - edited >Command to create the resource succeeds without any failures. How are you creating the resource? To isolate issue, can you please try to lookup resource "jdbc/customname" from your app to see if it succeeds.
        Hide
        kumm added a comment -

        I've encountered this exception too.
        I've tried to create a jdbc resource form a domain.xml by the maven plugins's 'configFile' property.
        But i've found, this setting has ignored.
        Filed the issue here: http://java.net/jira/browse/EMBEDDED_GLASSFISH-121

        Show
        kumm added a comment - I've encountered this exception too. I've tried to create a jdbc resource form a domain.xml by the maven plugins's 'configFile' property. But i've found, this setting has ignored. Filed the issue here: http://java.net/jira/browse/EMBEDDED_GLASSFISH-121
        Hide
        Mitesh Meswani added a comment -

        I see that EMBEDDED_GLASSFISH-121 is resolved. I assume it was the root cause of your issue. I am marking this issue as resolved. If you still see the issue, please reopen posting the code you use to create the resource

        Show
        Mitesh Meswani added a comment - I see that EMBEDDED_GLASSFISH-121 is resolved. I assume it was the root cause of your issue. I am marking this issue as resolved. If you still see the issue, please reopen posting the code you use to create the resource

          People

          • Assignee:
            Mitesh Meswani
            Reporter:
            aloleary
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: