-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: java.lang.UnsupportedOperationException
PostPosted: Sun May 22, 2005 8:30 am 
Beginner
Beginner

Joined: Wed May 18, 2005 9:48 am
Posts: 31
Hi all,

when I run Tomcat 5.5 with jdk 5 and Hibernate 3.0.3 i get this error while loading hibernate:

Code:
14:24:14,484  INFO Environment: Hibernate 3.0.3
14:24:14,500  INFO Environment: loaded properties from resource hibernate.properties: {hibernate.connection.username=intranet, hibernate.connection.password=****, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect, hibernate.connection.pool_size=1, hibernate.connection.url=jdbc:postgresql://28.100.0.100/intranet_fnac, hibernate.connection.driver_class=org.postgresql.Driver}
14:24:14,593  INFO Environment: using CGLIB reflection optimizer
14:24:14,593  INFO Environment: using JDK 1.4 java.sql.Timestamp handling
14:24:14,781  INFO Configuration: configuring from resource: /hibernate.cfg.xml
14:24:14,781  INFO Configuration: Configuration resource: /hibernate.cfg.xml
14:24:15,750  INFO Configuration: Mapping resource: bbdd/hibernateXML/tUsuarios.hbm.xml
14:24:16,343  INFO HbmBinder: Mapping class: bbdd.modelos.tUsuarios -> usuarios
14:24:16,390  INFO Configuration: Configured SessionFactory: null
14:24:16,390  INFO Configuration: processing extends queue
14:24:16,390  INFO Configuration: processing collection mappings
14:24:16,390  INFO Configuration: processing association property references
14:24:16,390  INFO Configuration: processing foreign key constraints
14:24:16,562  INFO NamingHelper: JNDI InitialContext properties:{}
14:24:16,578  INFO DatasourceConnectionProvider: Using datasource: java:comp/env/jdbc/intranet
14:24:21,390  INFO Dialect: Using dialect: org.hibernate.dialect.PostgreSQLDialect
14:24:21,406  INFO TransactionFactoryFactory: Using default transaction strategy (direct JDBC transactions)
14:24:21,406  INFO TransactionManagerLookupFactory: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
14:24:21,406  INFO SettingsFactory: Automatic flush during beforeCompletion(): disabled
14:24:21,468  INFO SettingsFactory: Automatic session close at end of transaction: disabled
14:24:21,468  INFO SettingsFactory: Scrollable result sets: disabled
14:24:21,468  INFO SettingsFactory: JDBC3 getGeneratedKeys(): disabled
14:24:21,468  INFO SettingsFactory: Connection release mode: null
14:24:21,468  INFO SettingsFactory: Default batch fetch size: 1
14:24:21,468  INFO SettingsFactory: Generate SQL with comments: disabled
14:24:21,593  INFO SettingsFactory: Order SQL updates by primary key: disabled
14:24:21,593  INFO SettingsFactory: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
14:24:21,593  INFO ASTQueryTranslatorFactory: Using ASTQueryTranslatorFactory
14:24:21,593  INFO SettingsFactory: Query language substitutions: {}
14:24:21,593  INFO SettingsFactory: Second-level cache: enabled
14:24:21,718  INFO SettingsFactory: Query cache: disabled
14:24:21,718  INFO SettingsFactory: Cache provider: org.hibernate.cache.EhCacheProvider
14:24:21,718  INFO SettingsFactory: Optimize cache for minimal puts: disabled
14:24:21,718  INFO SettingsFactory: Structured second-level cache entries: enabled
14:24:21,734  INFO SettingsFactory: Statistics: disabled
14:24:21,734  INFO SettingsFactory: Deleted entity synthetic identifier rollback: disabled
14:24:21,843  INFO SettingsFactory: Default entity-mode: pojo
14:24:22,625  INFO SessionFactoryImpl: building session factory
14:24:22,656  WARN Configurator: No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/D:/Netbeans/intranet/build/web/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
14:24:23,343  INFO SessionFactoryObjectFactory: Not binding factory to JNDI, no JNDI name configured
14:24:23,343  INFO SessionFactoryImpl: Checking 0 named queries
14:24:23,484 ERROR StandardWrapper[/intranet:jsp]: Servlet.service() para servlet jsp lanzó excepción
java.lang.UnsupportedOperationException
        at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:116)
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:554)
        at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:56)
        at org.hibernate.jdbc.AbstractBatcher.openConnection(AbstractBatcher.java:424)
        at org.hibernate.jdbc.JDBCContext.connect(JDBCContext.java:168)
        at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:103)
        at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:49)
        at org.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:24)
        at org.hibernate.jdbc.JDBCContext.beginTransaction(JDBCContext.java:231)
        at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1073)
        at bbdd.oConexion.beginTransaction(oConexion.java:172)
        at bbdd.dao.UsuariosDAO.<init>(UsuariosDAO.java:33)
        at org.apache.jsp.acceso_jsp._jspService(acceso_jsp.java:55)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)


Could you help me?

Thanks a lot.[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 22, 2005 8:51 am 
Newbie

Joined: Wed May 11, 2005 10:28 am
Posts: 10
I think this is because you're using both a hibernate.cfg.xml file and a hibernate.properties file. Try sticking with one of them, this solved the problem for me when it first occured. However it seemes there are other possibilities as well


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 22, 2005 9:34 am 
Newbie

Joined: Wed May 11, 2005 10:28 am
Posts: 10
Try this: http://forum.hibernate.org/viewtopic.ph ... nexception

The bottomline is provide username and password when configuring in server.xml (or web.xml), but don't provide them in hibernate.cfg.xml again


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.