isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict Jabines <jabines...@gmail.com>
Subject Re: Integration of Apache Isis and postgresql
Date Mon, 13 Nov 2017 15:41:33 GMT
I need to pin point what is really the problem.

I got these lines of code in my web-app pom.xml:

<profile>
    <id>jdbc-postgres</id>
    <activation>
        <property>
            <name>!skip.jdbc-postgres</name>
        </property>
    </activation>
    <dependencies>
        <dependency>
            <groupId>postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>9.1-901.jdbc4</version>
        </dependency>
    </dependencies>
</profile>
and when I delete this lines, it works, there are no errors anymore.
So im guessing, this lines of code try to connect to the database but
failed because it was closed already.

Here is the full web-app pom.xml.


<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.
--><project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>jabines.pbi</groupId>
        <artifactId>mubuss</artifactId>
        <version>1.0-SNAPSHOT</version>
    </parent>

    <artifactId>mubuss-webapp</artifactId>
    <name>SimpleApp Webapp</name>

    <description>This assemblies and runs both the Wicket viewer and
the Restfulobjects viewer in a single webapp configured to run using
the datanucleus object store.</description>

    <packaging>war</packaging>

    <properties>
        <isis-maven-plugin.appManifest>domainapp.application.manifest.DomainAppAppManifest</isis-maven-plugin.appManifest>

        <jetty-console-maven-plugin.backgroundImage>${basedir}/src/main/jettyconsole/isis-banner.png</jetty-console-maven-plugin.backgroundImage>

        <maven-war-plugin.warName>${project.parent.artifactId}</maven-war-plugin.warName>

        <docker-plugin.imageName>DOCKER_REGISTRY_ACCOUNT/${project.parent.artifactId}</docker-plugin.imageName>
        <docker-plugin.resource.include>${maven-war-plugin.warName}.war</docker-plugin.resource.include>

        <docker-plugin.releaseServerId>docker-hub</docker-plugin.releaseServerId>
        <docker-plugin.releaseRegistryUrl>https://index.docker.io/v1/</docker-plugin.releaseRegistryUrl>
        <docker-plugin.snapshotServerId>docker-hub</docker-plugin.snapshotServerId>
        <docker-plugin.snapshotRegistryUrl>https://index.docker.io/v1/</docker-plugin.snapshotRegistryUrl>

    </properties>

    <build>
        <resources>
            <resource>
                <filtering>true</filtering>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**</include>
                </includes>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>com.github.odavid.maven.plugins</groupId>
                <artifactId>mixin-maven-plugin</artifactId>
                <version>0.1-alpha-39</version>
                <extensions>true</extensions>
                <configuration>
                    <mixins>
                        <mixin>
                            <groupId>com.danhaywood.mavenmixin</groupId>
                            <artifactId>standard</artifactId>
                        </mixin>
                        <mixin>
                            <groupId>com.danhaywood.mavenmixin</groupId>
                            <artifactId>enforcerrelaxed</artifactId>
                        </mixin>
                        <mixin>
                            <groupId>com.danhaywood.mavenmixin</groupId>
                            <artifactId>jettywar</artifactId>
                        </mixin>
                        <mixin>
                            <groupId>com.danhaywood.mavenmixin</groupId>
                            <artifactId>jettyconsole</artifactId>
                        </mixin>
                        <mixin>
                            <groupId>com.danhaywood.mavenmixin</groupId>
                            <artifactId>docker</artifactId>
                        </mixin>
                    </mixins>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.isis.tool</groupId>
                <artifactId>isis-maven-plugin</artifactId>
                <version>${isis.version}</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>swagger</goal>
                        </goals>
                        <configuration>

<appManifest>${isis-maven-plugin.appManifest}</appManifest>
                            <visibilities>
                                <visibility>PUBLIC</visibility>
                                <visibility>PRIVATE</visibility>
                            </visibilities>
                            <format>JSON</format>
                            <fileNamePrefix>swagger</fileNamePrefix>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>${project.groupId}</groupId>

<artifactId>${project.parent.artifactId}-application</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.hsqldb</groupId>
                        <artifactId>hsqldb</artifactId>
                        <version>2.3.1</version>
                    </dependency>
                    <!-- workaround to avoid conflict with plexus-default -->
                </dependencies>
            </plugin>
        </plugins>
    </build>

    <dependencies>

        <!-- this app -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>mubuss-application</artifactId>
        </dependency>

        <!-- isis -->
        <dependency>
            <groupId>org.apache.isis.mavendeps</groupId>
            <artifactId>isis-mavendeps-webapp</artifactId>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.apache.isis.mavendeps</groupId>
            <artifactId>isis-mavendeps-intellij</artifactId>
            <type>pom</type>
        </dependency>

    </dependencies>

    <profiles>
        <profile>
            <id>jdbc-hsqldb</id>
            <activation>
                <property>
                    <name>!skip.jdbc-hsqldb</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.hsqldb</groupId>
                    <artifactId>hsqldb</artifactId>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>jdbc-logging</id>
            <activation>
                <property>
                    <name>!skip.jdbc-logging</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.lazyluke</groupId>
                    <artifactId>log4jdbc-remix</artifactId>
                    <exclusions>
                        <exclusion>
                            <groupId>org.slf4j</groupId>
                            <artifactId>slf4j-api</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>jdbc-postgres</id>
            <activation>
                <property>
                    <name>!skip.jdbc-postgres</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>postgresql</groupId>
                    <artifactId>postgresql</artifactId>
                    <version>9.1-901.jdbc4</version>
                </dependency>
            </dependencies>
        </profile>
        <!--
        <profile>
            <id>jdbc-mssql</id>
            <activation>
                <property>
                    <name>!skip.jdbc-mssql</name>
                </property>
            </activation>

            mvn install:install-file -Dfile=sqljdbc4.jar \
                                     -DgroupId=com.microsoft.sqlserver \
                                     -DartifactId=jdbc \
                                     -Dversion=4.0 \
                                     -Dpackaging=jar

            <dependencies>
               <dependency>
                   <groupId>com.microsoft.sqlserver</groupId>
                   <artifactId>sqljdbc4</artifactId>
                   <version>4.0</version>
               </dependency>
            </dependencies>
        </profile>
        -->
    </profiles>

</project>

Im posting this to shed a light to other devs who will and are
experiencing this.


On Mon, Nov 13, 2017 at 10:51 PM, Paul Benedict Jabines <
jabinespbi@gmail.com> wrote:

> So Im happy to say that I already fix this. I knew I missed something in
> setting up the database.
>
> The problem is in pom.xml. So in simple-app archetype, there are many
> pom.xml, I just need to add the dependency in every pom.xml.
>
> Im happy that I can now proceed.
>
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
> www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
> <#m_8737915543117660442_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>



-- 
- Paul

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message