Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.
Informações
titleAtenção

Esta FAQ é destinada às instalações do fluig com atualização 1.5.13 ou anterior.

Índice

Índice
maxLevel4
outlinetrue
exclude.*ndice
stylenone

 

Plataforma

Produto:  fluig

Versão: 1.5.6, 1.5.7, 1.5.9

Banco de Dados: Oracle, MySQL

 

Ocorrência

Após a atualização do fluig, ao tentar iniciar os serviços são exibidos avisos e erros no arquivo de log, como no exemplo abaixo, e o fluig não inicia.

Bloco de código
languagejava
themeEclipse
titleserver.log
linenumberstrue
collapsetrue
16:49:25,787 WARN  [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (Thread-69) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Could not create connection
	at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:351)
	at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:299)
	at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:873)
	at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:418)
	at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:467)
	at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:439)
	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:354)
	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:327)
	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:510)
	at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:143)
	at com.totvs.technology.wcm.WCMService.validateConfigurations(WCMService.java:686) [wcm-deploy.jar:]
	at com.totvs.technology.wcm.WCMService.doStartUp(WCMService.java:411) [wcm-deploy.jar:]
	at com.totvs.technology.wcm.WCMService.access$300(WCMService.java:86) [wcm-deploy.jar:]
	at com.totvs.technology.wcm.WCMService$StandAloneScanner.run(WCMService.java:931) [wcm-deploy.jar:]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_76]
Caused by: java.sql.SQLRecoverableException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
 
	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:673)
	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:715)
	at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:385)
	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)
	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:564)
	at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:323)
	... 14 more
Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
 
	at oracle.net.ns.NSProtocolStream.negotiateConnection(NSProtocolStream.java:272)
	at oracle.net.ns.NSProtocol.connect(NSProtocol.java:263)
	at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1360)
	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:486)
	... 19 more
16:49:25,803 INFO  [stdout] (Thread-69) ===============================================================
16:49:25,803 INFO  [stdout] (Thread-69) == Atenção, não constam no banco de dados as configurações   ==
16:49:25,803 INFO  [stdout] (Thread-69) == da plataforma. Certifique-se que a instalação/atualização ==
16:49:25,803 INFO  [stdout] (Thread-69) == foi realizada através do instalador gráfico ou linha     ==
16:49:25,803 INFO  [stdout] (Thread-69) == de comando.                                               ==
16:49:25,803 INFO  [stdout] (Thread-69) ===============================================================
16:49:25,803 ERROR [stderr] (Thread-69) com.totvs.technology.wcm.WCMService$NoConfigException
16:49:25,803 ERROR [stderr] (Thread-69) 	at com.totvs.technology.wcm.WCMService.validateConfigurations(WCMService.java:705)
16:49:25,803 ERROR [stderr] (Thread-69) 	at com.totvs.technology.wcm.WCMService.doStartUp(WCMService.java:411)
16:49:25,803 ERROR [stderr] (Thread-69) 	at com.totvs.technology.wcm.WCMService.access$300(WCMService.java:86)
16:49:25,803 ERROR [stderr] (Thread-69) 	at com.totvs.technology.wcm.WCMService$StandAloneScanner.run(WCMService.java:931)
16:49:25,803 ERROR [stderr] (Thread-69) 	at java.lang.Thread.run(Thread.java:745)
16:49:25,803 INFO  [stdout] (Thread-69) ***************************************
16:49:25,803 INFO  [stdout] (Thread-69) Startup stoped.
16:49:25,803 INFO  [stdout] (Thread-69) ***************************************

 

Causa

No arquivo de log, o aviso "Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Could not create connection" indica que não foi possível realizar a conexão com o banco de dados.

Logo abaixo é exibido o aviso "Caused by: java.sql.SQLRecoverableException: Listener refused the connection with the following error: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor" indicando que a instância do banco foi iniciada antes do listener ou que o Oracle não reconhece o serviço configurado.

 

Solução

Verifique as configurações do banco e se as informações estão corretas no arquivo de configuração do fluig.

...

corretas no arquivo de configuração do fluig.

Deck of Cards
effectDuration0.5
historyfalse
idsample
effectTypefade
Card
defaulttrue
id1
label1.6 e superiores

 

  • Acesse o diretório [Instalação fluig]\appserver\domain\configuration e edite o arquivo domain.xml;
  • Procure pelo bloco <datasources>;
  • Nesse bloco verifique todas as informações relacionadas à conexão com o banco, como por exemplo, usuário, senha e nome da base.

 

Exemplo de configuração com banco de dados Oracle:

Bloco de código
languagexml
themeEclipse
titledomain.xml
collapsetrue
<datasources>
    <datasource jta="true" jndi-name="java:/jdbc/FluigDS" pool-name="FluigDS" enabled="true" use-java-context="false">
        <connection-url>jdbc:oracle:thin:@192.168.0.1:1521:FLUIG</connection-url>
        <driver>oracleDriver</driver>
        <new-connection-sql>alter session set nls_comp = 'LINGUISTIC' nls_sort = 'BINARY_CI'</new-connection-sql>
        <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
        <pool>
            <min-pool-size>10</min-pool-size>
            <max-pool-size>20</max-pool-size>
        </pool>
        <security>
            <user-name>usuario</user-name>
            <password>senha</password>
        </security>
        <validation>
            <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>
            <validate-on-match>true</validate-on-match>
            <background-validation>false</background-validation>
        </validation>
        <statement>
            <share-prepared-statements>false</share-prepared-statements>
        </statement>
    </datasource>
    <datasource jta="false" jndi-name="java:/jdbc/FluigDSRO" pool-name="FluigDSRO" enabled="true" use-java-context="false">
        <connection-url>jdbc:oracle:thin:@192.168.0.1:1521:FLUIG</connection-url>
        <driver>oracleDriver</driver>
        <new-connection-sql>alter session set nls_comp = 'LINGUISTIC' nls_sort = 'BINARY_CI'</new-connection-sql>
        <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
        <pool>
            <min-pool-size>5</min-pool-size>
            <max-pool-size>15</max-pool-size>
        </pool>
        <security>
            <user-name>usuario</user-name>
            <password>senha</password>
        </security>
        <validation>
            <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>
            <validate-on-match>true</validate-on-match>
            <background-validation>false</background-validation>
        </validation>
        <timeout>
            <blocking-timeout-millis>30000</blocking-timeout-millis>
        </timeout>
        <statement>
            <share-prepared-statements>false</share-prepared-statements>
        </statement>
    </datasource>
    <drivers>
        <driver name="oracleDriver" module="com.oracle.jdbc">
            <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
        </driver>
    </drivers>
</datasources>
Card
id2
label1.5.9 e anteriores

 

  • Acesse o diretório [Instalação fluig]\jboss\standalone\configuration

...

  •  e edite o

...

  • arquivo standalone.xml;
  • Procure pelo

...

  • bloco <datasources>;
  • Nesse bloco verifique todas as informações relacionadas à conexão com o banco, como por exemplo, usuário, senha e nome da base.

 

Exemplo de configuração com banco de dados Oracle:

Bloco de código
languagexml
themeEclipse
titlestandalone.xml
collapsetrue
<datasources>
    <datasource jta="true" jndi-name="java:/jdbc/FluigDS" pool-name="FluigDS" enabled="true" use-java-context="false">
        <connection-url>jdbc:oracle:thin:@192.168.0.1:1521:FLUIG</connection-url>
        <driver>oracleDriver</driver>
        <new-connection-sql>alter session set nls_comp = 'LINGUISTIC' nls_sort = 'BINARY_CI'</new-connection-sql>
        <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
        <pool>
            <min-pool-size>10</min-pool-size>
            <max-pool-size>20</max-pool-size>
        </pool>
        <security>
            <user-name>usuario</user-name>
            <password>senha</password>
        </security>
        <validation>
            <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>
            <validate-on-match>true</validate-on-match>
            <background-validation>false</background-validation>
        </validation>
        <statement>
            <share-prepared-statements>false</share-prepared-statements>
        </statement>
    </datasource>
    <datasource jta="false" jndi-name="java:/jdbc/FluigDSRO" pool-name="FluigDSRO" enabled="true" use-java-context="false">
        <connection-url>jdbc:oracle:thin:@192.168.0.1:1521:FLUIG</connection-url>
        <driver>oracleDriver</driver>
        <new-connection-sql>alter session set nls_comp = 'LINGUISTIC' nls_sort = 'BINARY_CI'</new-connection-sql>
        <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
        <pool>
            <min-pool-size>5</min-pool-size>
            <max-pool-size>15</max-pool-size>
        </pool>
        <security>
            <user-name>usuario</user-name>
            <password>senha</password>
        </security>
        <validation>
            <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>
            <validate-on-match>true</validate-on-match>
            <background-validation>false</background-validation>
        </validation>
        <timeout>
            <blocking-timeout-millis>30000</blocking-timeout-millis>
        </timeout>
        <statement>
            <share-prepared-statements>false</share-prepared-statements>
        </statement>
    </datasource>
    <drivers>
        <driver name="oracleDriver" module="com.oracle.jdbc">
            <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
        </driver>
    </drivers>
</datasources>
Nota

...

titleObservações!

Para saber mais sobre como configurar o banco de dados Oracle acesse Configuração do banco de dados Oracle.

...

Consulte também a página Alterar informação de conexão com banco de dados do fluig.