Java EE server error on Jboss server

Asked

Viewed 85 times

0

Hello.

I did a project in Netbeans on a computer and it works fine, but when I try to run the same project on another computer it returns this error:

Implantando C:\Projetos\confeccao\dist\confeccao.war
{"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"confeccao.war#ConfeccaoPU\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"confeccao.war#ConfeccaoPU\": Failed to start service"}}}}
C:\Projetos\confeccao\nbproject\build-impl.xml:1102: O módulo não foi implantado.
Verifique o log do servidor para ver mais detalhes.
FALHA NA CONSTRUÇÃO (tempo total: 9 segundos)

Does anyone know what it can be?

Filing cabinet persistence.xml

<?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="ConfeccaoPU" transaction-type="JTA">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <!--<jta-data-source>jboss/datasources/ntiProdDS</jta-data-source>-->
    <jta-data-source>java:/ntiDS</jta-data-source>
    <class>...</class>
    <class>...</class>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
      <property name="hibernate.show_sql" value="true"/>
      <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
    </properties>
  </persistence-unit>
</persistence>

standalone.xml

    <subsystem xmlns="urn:jboss:domain:datasources:1.0">
        <datasources>
            <datasource jndi-name="java:/ntiDS" pool-name="ntiDS" enabled="true" use-java-context="true">
                <connection-url>jdbc:postgresql://localhost:5432/banco</connection-url>
                <driver>org.postgresql</driver>
                <pool>
                    <min-pool-size>10</min-pool-size>
                    <max-pool-size>100</max-pool-size>
                    <prefill>true</prefill>
                </pool>
                <security>
                    <user-name>usuario</user-name>
                    <password>senha</password>
                </security>
                <statement>
                    <prepared-statement-cache-size>32</prepared-statement-cache-size>
                    <share-prepared-statements>true</share-prepared-statements>
                </statement>
            </datasource>
            <drivers>
                <driver name="org.postgresql" module="org.postgresql">
                    <xa-datasource-class>org.postgresql.Driver</xa-datasource-class>
                </driver>
            </drivers>
        </datasources>
    </subsystem>

More details of the error:

...
16:44:32,890 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 8.3)
16:44:32,891 WARN  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) JBAS010402: Unable to instantiate driver class "org.postgresql.Driver": org.jboss.msc.service.DuplicateServiceException: Service jboss.jdbc-driver.confeccao_warorg_postgresql_Driver_8_3 is already registered
16:44:32,893 INFO  [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016005: Starting Services for CDI deployment: confeccao.war
16:44:32,914 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) JBAS011402: Starting Persistence Unit Service 'confeccao.war#ConfeccaoPU'
16:44:32,931 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-2) HHH000204: Processing PersistenceUnitInfo [
    name: ConfeccaoPU
    ...]
16:44:33,161 INFO  [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-2) HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
16:44:33,172 INFO  [org.hibernate.dialect.Dialect] (MSC service thread 1-2) HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
16:44:33,179 INFO  [org.hibernate.engine.jdbc.internal.LobCreatorBuilder] (MSC service thread 1-2) HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
16:44:33,182 INFO  [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (MSC service thread 1-2) HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory
16:44:33,184 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-2) HHH000397: Using ASTQueryTranslatorFactory
16:44:33,636 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.persistenceunit."confeccao.war#ConfeccaoPU": org.jboss.msc.service.StartException in service jboss.persistenceunit."confeccao.war#ConfeccaoPU": Failed to start service
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: ConfeccaoPU] Unable to build EntityManagerFactory
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)
    at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    ... 3 more
Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.collection.OneToManyPersister
    at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:248)
    at org.hibernate.persister.internal.PersisterFactoryImpl.createCollectionPersister(PersisterFactoryImpl.java:196)
    at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:375)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)
    at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
    ... 9 more
Caused by: org.hibernate.HibernateException: Unable to parse order-by fragment
    at org.hibernate.sql.ordering.antlr.OrderByFragmentTranslator.render(OrderByFragmentTranslator.java:66)
    at org.hibernate.sql.Template.renderOrderByStringTemplate(Template.java:696)
    at org.hibernate.persister.collection.AbstractCollectionPersister.<init>(AbstractCollectionPersister.java:558)
    at org.hibernate.persister.collection.OneToManyPersister.<init>(OneToManyPersister.java:85)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_79]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_79]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_79]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_79]
    at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:226)
    ... 14 more
Caused by: java.lang.ClassCastException: antlr.CommonToken cannot be cast to antlr.Token
    at antlr.CharScanner.makeToken(CharScanner.java:173)
    at org.hibernate.sql.ordering.antlr.GeneratedOrderByLexer.mIDENT(GeneratedOrderByLexer.java:238)
    at org.hibernate.sql.ordering.antlr.GeneratedOrderByLexer.nextToken(GeneratedOrderByLexer.java:138)
    at antlr.TokenBuffer.fill(TokenBuffer.java:69)
    at antlr.TokenBuffer.LA(TokenBuffer.java:80)
    at antlr.LLkParser.LA(LLkParser.java:52)
    at org.hibernate.sql.ordering.antlr.GeneratedOrderByFragmentParser.expression(GeneratedOrderByFragmentParser.java:504)
    at org.hibernate.sql.ordering.antlr.GeneratedOrderByFragmentParser.sortKey(GeneratedOrderByFragmentParser.java:325)
    at org.hibernate.sql.ordering.antlr.GeneratedOrderByFragmentParser.sortSpecification(GeneratedOrderByFragmentParser.java:241)
    at org.hibernate.sql.ordering.antlr.GeneratedOrderByFragmentParser.orderByFragment(GeneratedOrderByFragmentParser.java:190)
    at org.hibernate.sql.ordering.antlr.OrderByFragmentTranslator.render(OrderByFragmentTranslator.java:60)
    ... 22 more

16:44:34,011 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "confeccao.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"confeccao.war#ConfeccaoPU\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"confeccao.war#ConfeccaoPU\": Failed to start service"}}
16:44:35,521 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment confeccao.war in 1518ms
16:44:35,524 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.persistenceunit."confeccao.war#ConfeccaoPU": org.jboss.msc.service.StartException in service jboss.persistenceunit."confeccao.war#ConfeccaoPU": Failed to start service

16:44:35,526 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"confeccao.war#ConfeccaoPU\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"confeccao.war#ConfeccaoPU\": Failed to start service"}}}}
  • In this other machine has the Postegres with the base banco turning at the door 5432?

  • @Igorventurelli Yes. on both machines has Postgresql on port 5432 on different networks.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.