Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

wildfly deployment error: mvn -DskipTests install fails with v4.3 #56

Open
ilarimikkonen opened this issue Nov 4, 2018 · 7 comments
Open

Comments

@ilarimikkonen
Copy link

versions in use:

postgres: psql (PostgreSQL) 10.5 (Ubuntu 10.5-0ubuntu0.18.04)
java: openjdk version "1.8.0_181"
maven: Apache Maven 3.5.2

others are as in here: https://github.com/afimb/chouette/tree/V3_4

error: when doing mvn -DskipTests install, there is an error:

[INFO] chouette_iev ....................................... FAILURE [01:15 min]

going further, when trying:
sudo ./jboss-cli.sh --connect --command="deploy /home/ilari/GTFS/chouette/chouette/chouette_iev/target/chouette.ear"

Result:

ilari@scrappy:/opt/wildfly-8.2.0.Final/bin$ sudo ./jboss-cli.sh --connect --command="deploy /home/ilari/GTFS/chouette/chouette/c houette_iev/target/chouette.ear"
{"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.subunit."chouette.ear"."mobi.chouette.service.jar".component.Scheduler.START" => "org.jboss .msc.service.StartException in service jboss.deployment.subunit."chouette.ear"."mobi.chouette.service.jar".component.Schedul er.START: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
Caused by: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
Caused by: javax.ejb.EJBTransactionRolledbackException: JBAS011048: Failed to construct component instance
Caused by: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
Caused by: javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.GenericJDBCException: Could not open connect ion
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection
Caused by: org.hibernate.exception.GenericJDBCException: Could not open connection
Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jbos s/datasources/iev
Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/iev
Caused by: javax.resource.ResourceException: Could not create connection
Caused by: org.postgresql.util.PSQLException: This ResultSet is closed."}}}}

I tried to follow the instructions as well as I could.

@mhicauber
Copy link
Contributor

mhicauber commented Nov 4, 2018

Hi

As stated in the logs, you have an issue with the iev datasource in wildfly. Can you checked it's been created successfully with the admin web console? There's a tool allowing you to test a datasource.

@ilarimikkonen
Copy link
Author

Hi,

says it's available and enabled (if this is what you mean). Please see the screencap & thanks for the quick reply!

screenshot from 2018-11-05 10-12-02

@ilarimikkonen
Copy link
Author

from wildfly logs. 1st there is a warning:

10:10:37,442 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016005: Starting Services for CDI deployment: chouette.ear
10:10:37,477 INFO [org.jboss.weld.Version] (MSC service thread 1-2) WELD-000900: 2.2.6 (Final)
10:10:37,689 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016008: Starting weld service for deployment chouette.ear
10:10:38,126 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 61) JBAS011409: Starting Persistence Unit (phase 2 of 2) Service 'chouette.ear/mobi.chouette.dao.jar#referential'
10:10:38,127 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 63) JBAS011409: Starting Persistence Unit (phase 2 of 2) Service 'chouette.ear#iev'
10:10:38,127 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 62) JBAS011409: Starting Persistence Unit (phase 2 of 2) Service 'chouette.ear/mobi.chouette.dao.jar#public'
10:10:38,233 INFO [org.hibernate.annotations.common.Version] (ServerService Thread Pool -- 62) HCANN000001: Hibernate Commons Annotations {4.0.4.Final}
10:10:38,422 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (ServerService Thread Pool -- 62) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Could not create connection

@ilarimikkonen
Copy link
Author

and then things get more serious later on:

10:10:39,071 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 62) HHH000319: Could not get database metadata: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/chouette
at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:154) [ironjacamar-jdbc-1.1.9.Final.jar:1.1.9.Final]
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:139) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:194) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:178) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:522) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:852) [hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:845) [hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:398) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:844) [hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
at org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44) [jipijapa-hibernate4-3-1.0.1.Final.jar:]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_181]
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:474) [wildfly-security-manager-1.0.0.Final.jar:1.0.0.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_181]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final.jar:2.1.1.Final]
Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/chouette
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:442)
at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:421)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:515)
at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:146) [ironjacamar-jdbc-1.1.9.Final.jar:1.1.9.Final]
... 20 more

@metienne
Copy link

metienne commented Nov 5, 2018

Hello,
Chouette was not tested with Postgresql 10;
with postgresql >= 9.4, use Wildfly 9.0.2
For Wildfly >= 10; you must install Hibernate 4 (version 5 is active by default) but chouette is not tested with it

@mhicauber
Copy link
Contributor

There's a "test connection" tool in the Connection tab - please check there that it pings your DB ok please.

I'm working on testing chouette on an up to date setup (Hib5 + wildfly 14 + PG11) - I'll let you know how it goes.

I've installed several times Chouette with the setup stated by @metienne without a problem, so if you just want to try Chouette I'd just stick to the versions he mentioned.

@ilarimikkonen
Copy link
Author

Hi, thanks @metienne and @mhicauber reverting to postgresql 9.4 helped.

It does state this in the docs: "Chouette V3.x requires Postgresql V9.4 or above" so I went with version 10.

BTW, if we select this as development base for our project, we are planning to contribute (at least) finnish translations

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants