-->
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.  [ 4 posts ] 
Author Message
 Post subject: NullPointerException on createEntityManagerFactory("PU&
PostPosted: Tue Jun 19, 2007 10:27 am 
Beginner
Beginner

Joined: Tue Mar 13, 2007 8:26 am
Posts: 25
Hello,

I'm having problem when creating a EntityManagerFactory. Executing this code:

Code:
private static EntityManagerFactory emf;

public static EntityManagerFactory getFactory() {
        if (emf == null) {
            synchronized (ConnectDB.class) {
                if (emf == null) {
                    emf = Persistence.createEntityManagerFactory("VCModelPU");
                }
            }
        }
        return emf;
    }


This exception is throwed:
Quote:
Initializing Sun's JavaServer Faces implementation (1.2_04-b10-p01) for context '/VCWeb'
WebModule[/VCWeb]PWC1275: Exception sending context initialized event to listener instance of class vcweb.listener.DatabaseApplicationListener
javax.persistence.PersistenceException: java.lang.NullPointerException
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:258)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
at visualcontrol.model.ConnectDB.getFactory(ConnectDB.java:33)
at vcweb.listener.DatabaseApplicationListener.contextInitialized(DatabaseApplicationListener.java:36)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4493)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5150)
at com.sun.enterprise.web.WebModule.start(WebModule.java:308)
....
Caused by: java.lang.NullPointerException
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:202)


The underling database is Firebird 1.5.4.4910.
Hibernate versions:
- Core: 3.2.4 sp1
- Annotations: 3.3.0.GA
- EntityManager: 3.3.1.GA

All mapping are annotated classes. If somebody need some file ask me please.

This is the hibernate log when this occurs:
Log params:
- log4j.logger.org.hibernate=info
- log4j.logger.org.hibernate.SQL=info
- log4j.logger.org.hibernate.type=info
- log4j.logger.org.hibernate.tool.hbm2ddl=info
- log4j.logger.org.hibernate.hql=debug
- log4j.logger.org.hibernate.transaction=info
- log4j.logger.org.hibernate.jdbc=info


Quote:
11:10:26,640 INFO Version:15 - Hibernate Annotations 3.3.0.GA
11:10:26,656 INFO Environment:514 - Hibernate 3.2.4.sp1
11:10:26,671 INFO Environment:547 - hibernate.properties not found
11:10:26,671 INFO Environment:681 - Bytecode provider name : cglib
11:10:26,671 INFO Environment:598 - using JDK 1.4 java.sql.Timestamp handling
11:10:26,796 INFO Version:15 - Hibernate EntityManager 3.3.1.GA
11:10:27,046 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.CliFor
11:10:27,046 INFO AnnotationBinder:930 - Binding type definition: SimNaoChar
11:10:27,062 INFO AnnotationBinder:930 - Binding type definition: TipoPessoaType
11:10:27,109 INFO EntityBinder:420 - Bind entity visualcontrol.model.entity.CliFor on table CliFor
11:10:27,296 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.Cliente
11:10:27,312 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.CondicaoPagamento
11:10:27,328 INFO AnnotationBinder:930 - Binding type definition: CondicaoPagamentoTipoType
11:10:27,328 INFO EntityBinder:420 - Bind entity visualcontrol.model.entity.CondicaoPagamento on table CONDPGTO
11:10:27,328 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.Cor
11:10:27,328 INFO EntityBinder:420 - Bind entity visualcontrol.model.entity.Cor on table CORES
11:10:27,328 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.Estoque
11:10:27,328 INFO EntityBinder:420 - Bind entity visualcontrol.model.entity.Estoque on table ESTOQUE
11:10:27,328 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.EstoqueProjetado
11:10:27,328 INFO QueryBinder:64 - Binding Named query: estoqueProjetado.programado => select ep from EstoqueProjetado ep where ep.dataPrevisao between :dataInicio and :dataPrevista and ep.produto = :produto and ep.cor = :cor order by ep.dataPrevisao desc
11:10:27,328 INFO QueryBinder:64 - Binding Named query: estoqueProjetado.programadoData => select ep from EstoqueProjetado ep where ep.dataPrevisao between :dataInicio and :dataPrevista order by ep.produto, ep.cor, ep.dataPrevisao desc
11:10:27,328 INFO EntityBinder:420 - Bind entity visualcontrol.model.entity.EstoqueProjetado on table ESTOQUEPROJETADO
11:10:27,343 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.Familia
11:10:27,343 INFO EntityBinder:420 - Bind entity visualcontrol.model.entity.Familia on table FAMILIA
11:10:27,343 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.Fornecedor
11:10:27,343 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.ItemPedidoVenda
11:10:27,343 INFO EntityBinder:420 - Bind entity visualcontrol.model.entity.ItemPedidoVenda on table PVENDA_ITEM
11:10:27,343 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.LocalCobranca
11:10:27,343 INFO EntityBinder:420 - Bind entity visualcontrol.model.entity.LocalCobranca on table LOCALCOB
11:10:27,343 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.Loja
11:10:27,343 INFO EntityBinder:420 - Bind entity visualcontrol.model.entity.Loja on table LOJA
11:10:27,343 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.Natureza
11:10:27,343 INFO EntityBinder:420 - Bind entity visualcontrol.model.entity.Natureza on table NATUREZA
11:10:27,343 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.PedidoVenda
11:10:27,343 INFO AnnotationBinder:930 - Binding type definition: OrigemEstoqueType
11:10:27,343 INFO EntityBinder:420 - Bind entity visualcontrol.model.entity.PedidoVenda on table PVENDA
11:10:27,406 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.Produto
11:10:27,406 INFO EntityBinder:420 - Bind entity visualcontrol.model.entity.Produto on table PRODUTO
11:10:27,406 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.Transportadora
11:10:27,406 INFO EntityBinder:420 - Bind entity visualcontrol.model.entity.Transportadora on table TRANSP
11:10:27,421 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.UF
11:10:27,421 INFO EntityBinder:420 - Bind entity visualcontrol.model.entity.UF on table UF
11:10:27,421 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.Usuario
11:10:27,421 INFO EntityBinder:420 - Bind entity visualcontrol.model.entity.Usuario on table USUARIOS
11:10:27,421 INFO AnnotationBinder:398 - Binding entity from annotated class: visualcontrol.model.entity.Vendedor
11:10:27,421 INFO EntityBinder:420 - Bind entity visualcontrol.model.entity.Vendedor on table VENDINT
11:10:27,437 INFO CollectionBinder:627 - Mapping collection: visualcontrol.model.entity.PedidoVenda.itens -> PVENDA_ITEM
11:10:27,453 INFO Version:17 - Hibernate Validator 3.0.0.GA
11:10:27,562 INFO NamingHelper:26 - JNDI InitialContext properties:{}
11:10:28,109 INFO DatasourceConnectionProvider:61 - Using datasource: jdbc/VCWeb
11:10:28,312 INFO SettingsFactory:89 - RDBMS: Firebird 1.54WI-V1.5.4.4910 Firebird 1.5/tcp (programador-pc)/P10, version: WI-V1.5.4.4910 Firebird 1.54WI-V1.5.4.4910 Firebird 1.5/tcp (programador-pc)/P10
11:10:28,312 INFO SettingsFactory:90 - JDBC driver: Jaybird JCA/JDBC driver, version: 2.1
11:10:28,343 INFO Dialect:152 - Using dialect: org.hibernate.dialect.FirebirdDialect
11:10:28,343 INFO TransactionFactoryFactory:34 - Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
11:10:28,343 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
11:10:28,343 INFO SettingsFactory:143 - Automatic flush during beforeCompletion(): disabled
11:10:28,343 INFO SettingsFactory:147 - Automatic session close at end of transaction: disabled
11:10:28,343 INFO SettingsFactory:162 - Scrollable result sets: enabled
11:10:28,343 INFO SettingsFactory:170 - JDBC3 getGeneratedKeys(): disabled
11:10:28,343 INFO SettingsFactory:178 - Connection release mode: auto
11:10:28,343 INFO SettingsFactory:205 - Default batch fetch size: 1
11:10:28,343 INFO SettingsFactory:209 - Generate SQL with comments: disabled
11:10:28,343 INFO SettingsFactory:213 - Order SQL updates by primary key: disabled
11:10:28,343 INFO SettingsFactory:217 - Order SQL inserts for batching: disabled
11:10:28,359 INFO SettingsFactory:386 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
11:10:28,359 INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
11:10:28,359 INFO SettingsFactory:225 - Query language substitutions: {}
11:10:28,359 INFO SettingsFactory:230 - JPA-QL strict compliance: enabled
11:10:28,359 INFO SettingsFactory:235 - Second-level cache: enabled
11:10:28,359 INFO SettingsFactory:239 - Query cache: disabled
11:10:28,359 INFO SettingsFactory:373 - Cache provider: org.hibernate.cache.NoCacheProvider
11:10:28,359 INFO SettingsFactory:254 - Optimize cache for minimal puts: disabled
11:10:28,359 INFO SettingsFactory:263 - Structured second-level cache entries: disabled
11:10:28,375 INFO SettingsFactory:290 - Statistics: disabled
11:10:28,375 INFO SettingsFactory:294 - Deleted entity synthetic identifier rollback: disabled
11:10:28,375 INFO SettingsFactory:309 - Default entity-mode: pojo
11:10:28,375 INFO SettingsFactory:313 - Named query checking : enabled
11:10:28,421 INFO SessionFactoryImpl:161 - building session factory
11:10:28,937 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
11:10:29,046 DEBUG QueryTranslatorImpl:246 - parse() - HQL: select ep from visualcontrol.model.entity.EstoqueProjetado ep where ep.dataPrevisao between :dataInicio and :dataPrevista and ep.produto = :produto and ep.cor = :cor order by ep.dataPrevisao desc
11:10:29,062 DEBUG AST:266 - --- HQL AST ---
\-[QUERY] 'query'
+-[SELECT_FROM] 'SELECT_FROM'
| +-[FROM] 'from'
| | \-[RANGE] 'RANGE'
| | +-[DOT] '.'
| | | +-[DOT] '.'
| | | | +-[DOT] '.'
| | | | | +-[IDENT] 'visualcontrol'
| | | | | \-[IDENT] 'model'
| | | | \-[IDENT] 'entity'
| | | \-[IDENT] 'EstoqueProjetado'
| | \-[ALIAS] 'ep'
| \-[SELECT] 'select'
| \-[IDENT] 'ep'
+-[WHERE] 'where'
| \-[AND] 'and'
| +-[AND] 'and'
| | +-[BETWEEN] 'between'
| | | +-[DOT] '.'
| | | | +-[IDENT] 'ep'
| | | | \-[IDENT] 'dataPrevisao'
| | | +-[COLON] ':'
| | | | \-[IDENT] 'dataInicio'
| | | \-[COLON] ':'
| | | \-[IDENT] 'dataPrevista'
| | \-[EQ] '='
| | +-[DOT] '.'
| | | +-[IDENT] 'ep'
| | | \-[IDENT] 'produto'
| | \-[COLON] ':'
| | \-[IDENT] 'produto'
| \-[EQ] '='
| +-[DOT] '.'
| | +-[IDENT] 'ep'
| | \-[IDENT] 'cor'
| \-[COLON] ':'
| \-[IDENT] 'cor'
\-[ORDER] 'order'
+-[DOT] '.'
| +-[IDENT] 'ep'
| \-[IDENT] 'dataPrevisao'
\-[DESCENDING] 'desc'

11:10:29,062 DEBUG ErrorCounter:68 - throwQueryException() : no errors
11:10:29,125 DEBUG HqlSqlBaseWalker:111 - select << begin [level=1, statement=select]
11:10:29,156 DEBUG FromElement:108 - FromClause{level=1} : visualcontrol.model.entity.EstoqueProjetado (ep) -> estoquepro0_
11:10:29,156 DEBUG FromReferenceNode:51 - Resolved : ep -> estoquepro0_.id
11:10:29,171 DEBUG FromReferenceNode:51 - Resolved : ep -> estoquepro0_.id
11:10:29,171 DEBUG FromElement:525 - handling property dereference [visualcontrol.model.entity.EstoqueProjetado (ep) -> dataPrevisao (class)]
11:10:29,171 DEBUG DotNode:568 - getDataType() : dataPrevisao -> org.hibernate.type.DateType@1580757
11:10:29,171 DEBUG FromReferenceNode:51 - Resolved : ep.dataPrevisao -> estoquepro0_.DATA_PREV
11:10:29,187 DEBUG FromReferenceNode:51 - Resolved : ep -> estoquepro0_.id
11:10:29,187 DEBUG FromElement:525 - handling property dereference [visualcontrol.model.entity.EstoqueProjetado (ep) -> produto (class)]
11:10:29,187 DEBUG DotNode:568 - getDataType() : produto -> org.hibernate.type.ManyToOneType(visualcontrol.model.entity.Produto)
11:10:29,187 DEBUG DotNode:525 - dereferenceShortcut() : property produto in visualcontrol.model.entity.EstoqueProjetado does not require a join.
11:10:29,187 DEBUG DotNode:554 - terminal propertyPath = [produto]
11:10:29,187 DEBUG FromReferenceNode:51 - Resolved : ep.produto -> estoquepro0_.ID_PRODUTO
11:10:29,187 DEBUG FromReferenceNode:51 - Resolved : ep -> estoquepro0_.id
11:10:29,187 DEBUG FromElement:525 - handling property dereference [visualcontrol.model.entity.EstoqueProjetado (ep) -> cor (class)]
11:10:29,187 DEBUG DotNode:568 - getDataType() : cor -> org.hibernate.type.ManyToOneType(visualcontrol.model.entity.Cor)
11:10:29,187 DEBUG DotNode:525 - dereferenceShortcut() : property cor in visualcontrol.model.entity.EstoqueProjetado does not require a join.
11:10:29,187 DEBUG DotNode:554 - terminal propertyPath = [cor]
11:10:29,187 DEBUG FromReferenceNode:51 - Resolved : ep.cor -> estoquepro0_.ID_COR
11:10:29,187 DEBUG FromReferenceNode:51 - Resolved : ep -> estoquepro0_.id
11:10:29,187 DEBUG FromElement:525 - handling property dereference [visualcontrol.model.entity.EstoqueProjetado (ep) -> dataPrevisao (class)]
11:10:29,187 DEBUG DotNode:568 - getDataType() : dataPrevisao -> org.hibernate.type.DateType@1580757
11:10:29,187 DEBUG FromReferenceNode:51 - Resolved : ep.dataPrevisao -> estoquepro0_.DATA_PREV
11:10:29,187 DEBUG HqlSqlBaseWalker:117 - select : finishing up [level=1, statement=select]
11:10:29,187 DEBUG HqlSqlWalker:509 - processQuery() : ( SELECT ( {select clause} estoquepro0_.id ) ( FromClause{level=1} ESTOQUEPROJETADO estoquepro0_ ) ( where ( and ( and ( between ( estoquepro0_.DATA_PREV estoquepro0_.id dataPrevisao ) ? ? ) ( = ( estoquepro0_.ID_PRODUTO estoquepro0_.id produto ) ? ) ) ( = ( estoquepro0_.ID_COR estoquepro0_.id cor ) ? ) ) ) ( order ( estoquepro0_.DATA_PREV estoquepro0_.id dataPrevisao ) desc ) )
11:10:29,203 DEBUG JoinProcessor:148 - Using FROM fragment [ESTOQUEPROJETADO estoquepro0_]
11:10:29,203 DEBUG HqlSqlBaseWalker:123 - select >> end [level=1, statement=select]
11:10:29,203 DEBUG AST:232 - --- SQL AST ---
\-[SELECT] QueryNode: 'SELECT' querySpaces (ESTOQUEPROJETADO)
+-[SELECT_CLAUSE] SelectClause: '{select clause}'
| +-[ALIAS_REF] IdentNode: 'estoquepro0_.id as id4_' {alias=ep, className=visualcontrol.model.entity.EstoqueProjetado, tableAlias=estoquepro0_}
| \-[SQL_TOKEN] SqlFragment: 'estoquepro0_.ID_COR as ID4_4_, estoquepro0_.DATA_PREV as DATA2_4_, estoquepro0_.ID_PRODUTO as ID5_4_, estoquepro0_.QUANTIDADE as QUANTIDADE4_'
+-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[ep], fromElementByTableAlias=[estoquepro0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
| \-[FROM_FRAGMENT] FromElement: 'ESTOQUEPROJETADO estoquepro0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=ep,role=null,tableName=ESTOQUEPROJETADO,tableAlias=estoquepro0_,origin=null,colums={,className=visualcontrol.model.entity.EstoqueProjetado}}
+-[WHERE] SqlNode: 'where'
| \-[AND] SqlNode: 'and'
| +-[AND] SqlNode: 'and'
| | +-[BETWEEN] BetweenOperatorNode: 'between'
| | | +-[DOT] DotNode: 'estoquepro0_.DATA_PREV' {propertyName=dataPrevisao,dereferenceType=4,propertyPath=dataPrevisao,path=ep.dataPrevisao,tableAlias=estoquepro0_,className=visualcontrol.model.entity.EstoqueProjetado,classAlias=ep}
| | | | +-[ALIAS_REF] IdentNode: 'estoquepro0_.id' {alias=ep, className=visualcontrol.model.entity.EstoqueProjetado, tableAlias=estoquepro0_}
| | | | \-[IDENT] IdentNode: 'dataPrevisao' {originalText=dataPrevisao}
| | | +-[NAMED_PARAM] ParameterNode: '?' {name=dataInicio, expectedType=org.hibernate.type.DateType@1580757}
| | | \-[NAMED_PARAM] ParameterNode: '?' {name=dataPrevista, expectedType=org.hibernate.type.DateType@1580757}
| | \-[EQ] BinaryLogicOperatorNode: '='
| | +-[DOT] DotNode: 'estoquepro0_.ID_PRODUTO' {propertyName=produto,dereferenceType=ROOT_LEVEL,propertyPath=produto,path=ep.produto,tableAlias=estoquepro0_,className=visualcontrol.model.entity.EstoqueProjetado,classAlias=ep}
| | | +-[ALIAS_REF] IdentNode: 'estoquepro0_.id' {alias=ep, className=visualcontrol.model.entity.EstoqueProjetado, tableAlias=estoquepro0_}
| | | \-[IDENT] IdentNode: 'produto' {originalText=produto}
| | \-[NAMED_PARAM] ParameterNode: '?' {name=produto, expectedType=org.hibernate.type.ManyToOneType(visualcontrol.model.entity.Produto)}
| \-[EQ] BinaryLogicOperatorNode: '='
| +-[DOT] DotNode: 'estoquepro0_.ID_COR' {propertyName=cor,dereferenceType=ROOT_LEVEL,propertyPath=cor,path=ep.cor,tableAlias=estoquepro0_,className=visualcontrol.model.entity.EstoqueProjetado,classAlias=ep}
| | +-[ALIAS_REF] IdentNode: 'estoquepro0_.id' {alias=ep, className=visualcontrol.model.entity.EstoqueProjetado, tableAlias=estoquepro0_}
| | \-[IDENT] IdentNode: 'cor' {originalText=cor}
| \-[NAMED_PARAM] ParameterNode: '?' {name=cor, expectedType=org.hibernate.type.ManyToOneType(visualcontrol.model.entity.Cor)}
\-[ORDER] OrderByClause: 'order'
+-[DOT] DotNode: 'estoquepro0_.DATA_PREV' {propertyName=dataPrevisao,dereferenceType=4,propertyPath=dataPrevisao,path=ep.dataPrevisao,tableAlias=estoquepro0_,className=visualcontrol.model.entity.EstoqueProjetado,classAlias=ep}
| +-[ALIAS_REF] IdentNode: 'estoquepro0_.id' {alias=ep, className=visualcontrol.model.entity.EstoqueProjetado, tableAlias=estoquepro0_}
| \-[IDENT] IdentNode: 'dataPrevisao' {originalText=dataPrevisao}
\-[DESCENDING] SqlNode: 'desc'

11:10:29,203 DEBUG ErrorCounter:68 - throwQueryException() : no errors
11:10:29,218 DEBUG QueryTranslatorImpl:216 - HQL: select ep from visualcontrol.model.entity.EstoqueProjetado ep where ep.dataPrevisao between :dataInicio and :dataPrevista and ep.produto = :produto and ep.cor = :cor order by ep.dataPrevisao desc
11:10:29,218 DEBUG QueryTranslatorImpl:217 - SQL: select estoquepro0_.id as id4_, estoquepro0_.ID_COR as ID4_4_, estoquepro0_.DATA_PREV as DATA2_4_, estoquepro0_.ID_PRODUTO as ID5_4_, estoquepro0_.QUANTIDADE as QUANTIDADE4_ from ESTOQUEPROJETADO estoquepro0_ where (estoquepro0_.DATA_PREV between ? and ?) and estoquepro0_.ID_PRODUTO=? and estoquepro0_.ID_COR=? order by estoquepro0_.DATA_PREV desc
11:10:29,218 DEBUG ErrorCounter:68 - throwQueryException() : no errors
11:10:29,250 DEBUG QueryTranslatorImpl:246 - parse() - HQL: select ep from visualcontrol.model.entity.EstoqueProjetado ep where ep.dataPrevisao between :dataInicio and :dataPrevista order by ep.produto, ep.cor, ep.dataPrevisao desc
11:10:29,250 DEBUG AST:266 - --- HQL AST ---
\-[QUERY] 'query'
+-[SELECT_FROM] 'SELECT_FROM'
| +-[FROM] 'from'
| | \-[RANGE] 'RANGE'
| | +-[DOT] '.'
| | | +-[DOT] '.'
| | | | +-[DOT] '.'
| | | | | +-[IDENT] 'visualcontrol'
| | | | | \-[IDENT] 'model'
| | | | \-[IDENT] 'entity'
| | | \-[IDENT] 'EstoqueProjetado'
| | \-[ALIAS] 'ep'
| \-[SELECT] 'select'
| \-[IDENT] 'ep'
+-[WHERE] 'where'
| \-[BETWEEN] 'between'
| +-[DOT] '.'
| | +-[IDENT] 'ep'
| | \-[IDENT] 'dataPrevisao'
| +-[COLON] ':'
| | \-[IDENT] 'dataInicio'
| \-[COLON] ':'
| \-[IDENT] 'dataPrevista'
\-[ORDER] 'order'
+-[DOT] '.'
| +-[IDENT] 'ep'
| \-[IDENT] 'produto'
+-[DOT] '.'
| +-[IDENT] 'ep'
| \-[IDENT] 'cor'
+-[DOT] '.'
| +-[IDENT] 'ep'
| \-[IDENT] 'dataPrevisao'
\-[DESCENDING] 'desc'

11:10:29,250 DEBUG ErrorCounter:68 - throwQueryException() : no errors
11:10:29,250 DEBUG HqlSqlBaseWalker:111 - select << begin [level=1, statement=select]
11:10:29,250 DEBUG FromElement:108 - FromClause{level=1} : visualcontrol.model.entity.EstoqueProjetado (ep) -> estoquepro0_
11:10:29,250 DEBUG FromReferenceNode:51 - Resolved : ep -> estoquepro0_.id
11:10:29,250 DEBUG FromReferenceNode:51 - Resolved : ep -> estoquepro0_.id
11:10:29,250 DEBUG FromElement:525 - handling property dereference [visualcontrol.model.entity.EstoqueProjetado (ep) -> dataPrevisao (class)]
11:10:29,250 DEBUG DotNode:568 - getDataType() : dataPrevisao -> org.hibernate.type.DateType@1580757
11:10:29,250 DEBUG FromReferenceNode:51 - Resolved : ep.dataPrevisao -> estoquepro0_.DATA_PREV
11:10:29,250 DEBUG FromReferenceNode:51 - Resolved : ep -> estoquepro0_.id
11:10:29,250 DEBUG FromElement:525 - handling property dereference [visualcontrol.model.entity.EstoqueProjetado (ep) -> produto (class)]
11:10:29,250 DEBUG DotNode:568 - getDataType() : produto -> org.hibernate.type.ManyToOneType(visualcontrol.model.entity.Produto)
11:10:29,250 DEBUG DotNode:525 - dereferenceShortcut() : property produto in visualcontrol.model.entity.EstoqueProjetado does not require a join.
11:10:29,265 DEBUG DotNode:554 - terminal propertyPath = [produto]
11:10:29,265 DEBUG FromReferenceNode:51 - Resolved : ep.produto -> estoquepro0_.ID_PRODUTO
11:10:29,265 DEBUG FromReferenceNode:51 - Resolved : ep -> estoquepro0_.id
11:10:29,265 DEBUG FromElement:525 - handling property dereference [visualcontrol.model.entity.EstoqueProjetado (ep) -> cor (class)]
11:10:29,265 DEBUG DotNode:568 - getDataType() : cor -> org.hibernate.type.ManyToOneType(visualcontrol.model.entity.Cor)
11:10:29,265 DEBUG DotNode:525 - dereferenceShortcut() : property cor in visualcontrol.model.entity.EstoqueProjetado does not require a join.
11:10:29,265 DEBUG DotNode:554 - terminal propertyPath = [cor]
11:10:29,265 DEBUG FromReferenceNode:51 - Resolved : ep.cor -> estoquepro0_.ID_COR
11:10:29,265 DEBUG FromReferenceNode:51 - Resolved : ep -> estoquepro0_.id
11:10:29,265 DEBUG FromElement:525 - handling property dereference [visualcontrol.model.entity.EstoqueProjetado (ep) -> dataPrevisao (class)]
11:10:29,265 DEBUG DotNode:568 - getDataType() : dataPrevisao -> org.hibernate.type.DateType@1580757
11:10:29,265 DEBUG FromReferenceNode:51 - Resolved : ep.dataPrevisao -> estoquepro0_.DATA_PREV
11:10:29,265 DEBUG HqlSqlBaseWalker:117 - select : finishing up [level=1, statement=select]
11:10:29,265 DEBUG HqlSqlWalker:509 - processQuery() : ( SELECT ( {select clause} estoquepro0_.id ) ( FromClause{level=1} ESTOQUEPROJETADO estoquepro0_ ) ( where ( between ( estoquepro0_.DATA_PREV estoquepro0_.id dataPrevisao ) ? ? ) ) ( order ( estoquepro0_.ID_PRODUTO estoquepro0_.id produto ) ( estoquepro0_.ID_COR estoquepro0_.id cor ) ( estoquepro0_.DATA_PREV estoquepro0_.id dataPrevisao ) desc ) )
11:10:29,265 DEBUG JoinProcessor:148 - Using FROM fragment [ESTOQUEPROJETADO estoquepro0_]
11:10:29,265 DEBUG HqlSqlBaseWalker:123 - select >> end [level=1, statement=select]
11:10:29,265 DEBUG AST:232 - --- SQL AST ---
\-[SELECT] QueryNode: 'SELECT' querySpaces (ESTOQUEPROJETADO)
+-[SELECT_CLAUSE] SelectClause: '{select clause}'
| +-[ALIAS_REF] IdentNode: 'estoquepro0_.id as id4_' {alias=ep, className=visualcontrol.model.entity.EstoqueProjetado, tableAlias=estoquepro0_}
| \-[SQL_TOKEN] SqlFragment: 'estoquepro0_.ID_COR as ID4_4_, estoquepro0_.DATA_PREV as DATA2_4_, estoquepro0_.ID_PRODUTO as ID5_4_, estoquepro0_.QUANTIDADE as QUANTIDADE4_'
+-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[ep], fromElementByTableAlias=[estoquepro0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
| \-[FROM_FRAGMENT] FromElement: 'ESTOQUEPROJETADO estoquepro0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=ep,role=null,tableName=ESTOQUEPROJETADO,tableAlias=estoquepro0_,origin=null,colums={,className=visualcontrol.model.entity.EstoqueProjetado}}
+-[WHERE] SqlNode: 'where'
| \-[BETWEEN] BetweenOperatorNode: 'between'
| +-[DOT] DotNode: 'estoquepro0_.DATA_PREV' {propertyName=dataPrevisao,dereferenceType=4,propertyPath=dataPrevisao,path=ep.dataPrevisao,tableAlias=estoquepro0_,className=visualcontrol.model.entity.EstoqueProjetado,classAlias=ep}
| | +-[ALIAS_REF] IdentNode: 'estoquepro0_.id' {alias=ep, className=visualcontrol.model.entity.EstoqueProjetado, tableAlias=estoquepro0_}
| | \-[IDENT] IdentNode: 'dataPrevisao' {originalText=dataPrevisao}
| +-[NAMED_PARAM] ParameterNode: '?' {name=dataInicio, expectedType=org.hibernate.type.DateType@1580757}
| \-[NAMED_PARAM] ParameterNode: '?' {name=dataPrevista, expectedType=org.hibernate.type.DateType@1580757}
\-[ORDER] OrderByClause: 'order'
+-[DOT] DotNode: 'estoquepro0_.ID_PRODUTO' {propertyName=produto,dereferenceType=ROOT_LEVEL,propertyPath=produto,path=ep.produto,tableAlias=estoquepro0_,className=visualcontrol.model.entity.EstoqueProjetado,classAlias=ep}
| +-[ALIAS_REF] IdentNode: 'estoquepro0_.id' {alias=ep, className=visualcontrol.model.entity.EstoqueProjetado, tableAlias=estoquepro0_}
| \-[IDENT] IdentNode: 'produto' {originalText=produto}
+-[DOT] DotNode: 'estoquepro0_.ID_COR' {propertyName=cor,dereferenceType=ROOT_LEVEL,propertyPath=cor,path=ep.cor,tableAlias=estoquepro0_,className=visualcontrol.model.entity.EstoqueProjetado,classAlias=ep}
| +-[ALIAS_REF] IdentNode: 'estoquepro0_.id' {alias=ep, className=visualcontrol.model.entity.EstoqueProjetado, tableAlias=estoquepro0_}
| \-[IDENT] IdentNode: 'cor' {originalText=cor}
+-[DOT] DotNode: 'estoquepro0_.DATA_PREV' {propertyName=dataPrevisao,dereferenceType=4,propertyPath=dataPrevisao,path=ep.dataPrevisao,tableAlias=estoquepro0_,className=visualcontrol.model.entity.EstoqueProjetado,classAlias=ep}
| +-[ALIAS_REF] IdentNode: 'estoquepro0_.id' {alias=ep, className=visualcontrol.model.entity.EstoqueProjetado, tableAlias=estoquepro0_}
| \-[IDENT] IdentNode: 'dataPrevisao' {originalText=dataPrevisao}
\-[DESCENDING] SqlNode: 'desc'

11:10:29,265 DEBUG ErrorCounter:68 - throwQueryException() : no errors
11:10:29,265 DEBUG QueryTranslatorImpl:216 - HQL: select ep from visualcontrol.model.entity.EstoqueProjetado ep where ep.dataPrevisao between :dataInicio and :dataPrevista order by ep.produto, ep.cor, ep.dataPrevisao desc
11:10:29,265 DEBUG QueryTranslatorImpl:217 - SQL: select estoquepro0_.id as id4_, estoquepro0_.ID_COR as ID4_4_, estoquepro0_.DATA_PREV as DATA2_4_, estoquepro0_.ID_PRODUTO as ID5_4_, estoquepro0_.QUANTIDADE as QUANTIDADE4_ from ESTOQUEPROJETADO estoquepro0_ where estoquepro0_.DATA_PREV between ? and ? order by estoquepro0_.ID_PRODUTO, estoquepro0_.ID_COR, estoquepro0_.DATA_PREV desc
11:10:29,265 DEBUG ErrorCounter:68 - throwQueryException() : no errors
11:10:30,406 INFO SessionFactoryImpl:769 - closing



I really have no ideas why this is happen.


Thanks for any help,

_________________
---
Felipe Marin Cypriano


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 19, 2007 5:39 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
If you really use EntityManager: 3.3.1.GA
I don't see how Ejb3configuration can raise an exception in line 202
Besides, you logs shows that the configuration is property processed (the sessionfactory is initialized)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 19, 2007 8:57 pm 
Beginner
Beginner

Joined: Tue Mar 13, 2007 8:26 am
Posts: 25
emmanuel wrote:
If you really use EntityManager: 3.3.1.GA
I don't see how Ejb3configuration can raise an exception in line 202
Besides, you logs shows that the configuration is property processed (the sessionfactory is initialized)


I'll double check this, remove and add all EntityManagers libraries and test again.

But, the error is not on line 202, look:
javax.persistence.PersistenceException: java.lang.NullPointerException
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:258)

_________________
---
Felipe Marin Cypriano


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 19, 2007 11:24 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Code:
Caused by: java.lang.NullPointerException
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:202)


is what really matters

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.