Ola galera… estou tendo problemas no datasource do tomcat, nao tenho muitas ideia do que pode ser… mas estou tendo o seguinte erro:
...
12:49:26,622 DEBUG NamingHelper:58 - lookup: java:hibernate
12:49:26,622 INFO NamingHelper:68 - Creating subcontext: java:hibernate
12:49:26,638 WARN SessionFactoryObjectFactory:98 - Could not bind factory to JNDI
javax.naming.NamingException: Context is read only
at org.apache.naming.NamingContext.checkWritable(NamingContext.java:902)
at org.apache.naming.NamingContext.createSubcontext(NamingContext.java:516)
at org.apache.naming.NamingContext.createSubcontext(NamingContext.java:537)
at org.apache.naming.SelectorContext.createSubcontext(SelectorContext.java:421)
at javax.naming.InitialContext.createSubcontext(InitialContext.java:464)
at org.hibernate.util.NamingHelper.bind(NamingHelper.java:69)
...
Segue abaixo as configuracoes
frotaway.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context
path="/frotaway"
docBase="D:/projetos/eclipse3.2.1/frotaway/web"
debug="1"
reloadable="true">
<Resource
name="jdbc/frotaway"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
password="password"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://201.83.22.184:3306/frotaway?autoReconnect=true"
username="ususario"/>
</Context>
hibernate.cfg.xml
<hibernate-configuration>
<session-factory name="java:hibernate/SessionFactory">
<!-- Conexao com o banco de dados -->
<property name="connection.datasource">java:/comp/env/jdbc/frotaway</property>
<property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<property name="show_sql">true</property>
<mapping resource="br/com/peopleway/model/persistence/to/Person.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Alguem sabe o que pode estar ocorrendo ? desde já muito obrigado.