More on this:
the problem is not what I've reported, since SqlFragment extends AST.
I've rechecked all the libraries I'm using, but the problem still occurs.
I'll add some info:
Hibernate init log:
Code:
17:14:35,482 INFO Configuration:1218 - configuring from resource: /hibernate.cfg.xml
17:14:35,484 INFO Configuration:1189 - Configuration resource: /hibernate.cfg.xml
17:14:35,495 INFO Configuration:438 - Mapping resource: /web/model/Categoria.hbm.xml
17:14:35,522 INFO HbmBinder:267 - Mapping class: web.model.Categoria -> CATEGORIA
17:14:35,525 INFO Configuration:438 - Mapping resource: web/model/Genere.hbm.xml
17:14:35,550 INFO HbmBinder:267 - Mapping class: web.model.Genere -> GENERE
17:14:35,552 INFO Configuration:438 - Mapping resource: web/model/Articolo.hbm.xml
17:14:35,584 INFO HbmBinder:267 - Mapping class: web.model.Articolo -> ARTICOLO
17:14:35,589 INFO Configuration:438 - Mapping resource: web/model/Autore.hbm.xml
17:14:35,640 INFO HbmBinder:267 - Mapping class: web.model.Autore -> AUTORE
17:14:35,646 INFO Configuration:438 - Mapping resource: web/model/Order.hbm.xml
17:14:35,695 INFO HbmBinder:267 - Mapping class: web.model.Order -> WEBORDER
17:14:35,701 INFO Configuration:438 - Mapping resource: web/model/OrderItem.hbm.xml
17:14:35,729 INFO HbmBinder:267 - Mapping class: web.model.OrderItem -> WEBORDERITEM
17:14:35,732 INFO Configuration:1330 - Configured SessionFactory: null
17:14:35,735 INFO Configuration:834 - processing extends queue
17:14:35,736 INFO Configuration:838 - processing collection mappings
17:14:35,737 INFO HbmBinder:2028 - Mapping collection: web.model.Categoria.sottocategoriaList -> CATEGORIA
17:14:35,738 INFO HbmBinder:2028 - Mapping collection: web.model.Categoria.genereList -> GENERE
17:14:35,740 INFO HbmBinder:2028 - Mapping collection: web.model.Genere.articoloList -> ARTICOLO
17:14:35,741 INFO HbmBinder:2028 - Mapping collection: web.model.Autore.articoloList -> ARTICOLO
17:14:35,743 INFO HbmBinder:2028 - Mapping collection: web.model.Order.orderitemList -> WEBORDERITEM
17:14:35,744 INFO Configuration:847 - processing association property references
17:14:35,746 INFO Configuration:874 - processing foreign key constraints
17:14:35,749 INFO Dialect:89 - Using dialect: org.hibernate.dialect.OracleDialect
17:14:35,751 INFO SettingsFactory:87 - Maximum outer join fetch depth: 1
17:14:35,752 INFO SettingsFactory:90 - Default batch fetch size: 1
17:14:35,754 INFO SettingsFactory:94 - Generate SQL with comments: disabled
17:14:35,756 INFO SettingsFactory:98 - Order SQL updates by primary key: disabled
17:14:35,759 INFO SettingsFactory:272 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
17:14:35,761 INFO SettingsFactory:106 - Query language substitutions: {no='N', true=1, yes='Y', false=0}
17:14:35,762 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
17:14:35,764 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 5
17:14:35,765 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
17:14:35,766 INFO DriverManagerConnectionProvider:80 - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@localhost:***:***
17:14:35,768 INFO DriverManagerConnectionProvider:83 - connection properties: {user=***, password=***, fixedString=true
}
17:14:35,769 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
17:14:35,770 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection
17:14:35,846 DEBUG DriverManagerConnectionProvider:115 - created connection to: jdbc:oracle:thin:@localhost:***:***, Isolation Level
: 2
17:14:35,848 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
17:14:35,849 INFO SettingsFactory:155 - Scrollable result sets: enabled
17:14:35,850 INFO SettingsFactory:163 - JDBC3 getGeneratedKeys(): disabled
17:14:35,851 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
17:14:35,853 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write
or transactional second-level cache is not recommended)
17:14:35,854 INFO SettingsFactory:175 - Automatic flush during beforeCompletion(): disabled
17:14:35,855 INFO SettingsFactory:178 - Automatic session close at end of transaction: disabled
17:14:35,856 INFO SettingsFactory:259 - Cache provider: org.hibernate.cache.EhCacheProvider
17:14:35,858 INFO SettingsFactory:186 - Second-level cache: enabled
17:14:35,859 INFO SettingsFactory:191 - Optimize cache for minimal puts: disabled
17:14:35,860 INFO SettingsFactory:198 - Structured second-level cache entries: enabled
17:14:35,861 INFO SettingsFactory:202 - Query cache: disabled
17:14:35,862 INFO SettingsFactory:209 - Echoing all SQL to stdout
17:14:35,863 INFO SettingsFactory:213 - Statistics: disabled
17:14:35,865 INFO SettingsFactory:217 - Deleted entity synthetic identifier rollback: disabled
17:14:35,866 INFO SettingsFactory:231 - Default entity-mode: pojo
17:14:35,867 INFO SessionFactoryImpl:139 - building session factory
17:14:36,057 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
17:14:36,059 INFO SessionFactoryImpl:365 - Checking 4 named queries
17:14:36,165 ERROR PersistenceManagerFactory:38 - error configuring
Additional stack trace:Code:
java.lang.ClassCastException
at org.hibernate.hql.ast.SyntheticAndFactory.addWhereFragment(SyntheticAndFactory.java:44)
at org.hibernate.hql.ast.JoinProcessor.addJoinNodes(JoinProcessor.java:98)
at org.hibernate.hql.ast.JoinProcessor.processJoins(JoinProcessor.java:70)
at org.hibernate.hql.ast.HqlSqlWalker.processQuery(HqlSqlWalker.java:354)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.afterQuery(HqlSqlBaseWalker.java:112)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:296)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.select(HqlSqlBaseWalker.java:132)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:202)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:158)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:413)
at org.hibernate.impl.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:374)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:277)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1033)
...
17:14:36,169 DEBUG DefaultComponentManager:145 - Error loading or setting up resource: java.util.HashMap
java.lang.RuntimeException
at web.component.PersistenceManagerFactory.init(PersistenceManagerFactory.java:39)
at com.opensymphony.xwork.interceptor.component.DefaultComponentManager.loadResource(DefaultComponentManager.java:154)
at com.opensymphony.xwork.interceptor.component.DefaultComponentManager.loadResource(DefaultComponentManager.java:139)
at com.opensymphony.xwork.interceptor.component.DefaultComponentManager.loadResource(DefaultComponentManager.java:139)
at com.opensymphony.xwork.interceptor.component.DefaultComponentManager.initializeObject(DefaultComponentManager.java:75)
at com.opensymphony.xwork.interceptor.component.ComponentInterceptor.before(ComponentInterceptor.java:29)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:34)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:166)
at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:115)
at com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(ServletDispatcher.java:278)
at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:248)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)