Topic
1 reply Latest Post - ‏2013-12-18T10:30:00Z by AnandKumarMatta
AnandKumarMatta
AnandKumarMatta
11 Posts
ACCEPTED ANSWER

Pinned topic Problem connection pooling configuration

‏2013-11-29T13:40:12Z |

 

Hello Experts,

In my geronimo-web.xml I am trying to add connection pool entry.

 

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1" >
    <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
 
        <dep:moduleId>
            <dep:groupId>APP</dep:groupId>
            <dep:artifactId>APP</dep:artifactId>
            <dep:version>1.1</dep:version>
            <dep:type>war</dep:type>
        </dep:moduleId>
        <dep:dependencies>
        <dep:dependency>
        <dep:groupId>console.dbpool</dep:groupId>
            <dep:artifactId>APPWEB_P</dep:artifactId>
        </dep:dependency>
        </dep:dependencies>
        <dep:import-package>!org.apache.log4j*</dep:import-package>
        <dep:import-package>!org.quartz*</dep:import-package>
    </dep:environment>
    
    <context-root>/APP</context-root>
   
<resource-ref> 
       <resource-ref>
    <ref-name>jdbc/APPWEB_P</ref-name>   
        <resource-link>APPWEB_P</resource-link>
    </resource-ref>
</resource-ref>
</web-app> 

I am facing the validation problem in eclipse at <resource-ref>.  can some one explain it again. I really don't understand from the xsd. Please help me what is the problem I am following the documentation of Websphere community edition only.

Server: WES CE 3 and configuring db2 connection pooling.

error:

 

cvc-complex-type.2.4.a: Invalid content was found starting with element 'resource-ref'. One of 
 '{"http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1":work-dir, "http://geronimo.apache.org/xml/ns/
 naming-1.2":web-container, "http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1":container-config, 
 "http://geronimo.apache.org/xml/ns/naming-1.2":abstract-naming-entry, "http://geronimo.apache.org/
 xml/ns/naming-1.2":env-entry, "http://geronimo.apache.org/xml/ns/naming-1.2":ejb-ref, "http://
 geronimo.apache.org/xml/ns/naming-1.2":ejb-local-ref, "http://geronimo.apache.org/xml/ns/
 naming-1.2":service-ref, "http://geronimo.apache.org/xml/ns/naming-1.2":resource-ref, "http://
 geronimo.apache.org/xml/ns/naming-1.2":resource-env-ref, "http://geronimo.apache.org/xml/ns/
 naming-1.2":message-destination, "http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1":security-
 realm-name, "http://geronimo.apache.org/xml/ns/deployment-1.2":service, "http://java.sun.com/xml/
 ns/persistence":persistence}' is expected.

 

Updated on 2013-12-02T06:46:35Z at 2013-12-02T06:46:35Z by AnandKumarMatta
  • AnandKumarMatta
    AnandKumarMatta
    11 Posts
    ACCEPTED ANSWER

    Re: Problem connection pooling configuration

    ‏2013-12-18T10:30:00Z  in response to AnandKumarMatta

    I got the solution. I really surprised never seen this type of xml with 2 name space.

    Any have below is the geronimo-web.xml

    <?xml version="1.0" encoding="UTF-8"?>

    <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
        <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
            <dep:moduleId>
                <dep:groupId>APP</dep:groupId>
                <dep:artifactId>APPWEB_P</dep:artifactId>
                <dep:version>1.1</dep:version>
                <dep:type>war</dep:type>
            </dep:moduleId>
            <dep:dependencies>
                <dep:dependency>
                    <dep:groupId>console.dbpool</dep:groupId>
                    <dep:artifactId>APPWEB_P</dep:artifactId>
                    <dep:version>1.0</dep:version>
                    <dep:type>car</dep:type>
                </dep:dependency>
            </dep:dependencies>
            <dep:import-package>!org.apache.log4j*</dep:import-package>
            <dep:import-package>!org.quartz*</dep:import-package>
        </dep:environment>
        <context-root>APP</context-root>
        <nam:resource-ref xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2">
            <nam:ref-name>jdbc/APPWEB_P</nam:ref-name>
            <nam:pattern>
                <nam:groupId>console.dbpool</nam:groupId>
                <nam:artifactId>APPWEB_P</nam:artifactId>
                <nam:version>1.0</nam:version>
                <nam:name>APPWEB_P</nam:name>
            </nam:pattern>
        </nam:resource-ref>
    </web-app>

     

    Thank you

    - Anand