New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions from SQL configuration #597

Closed
timowest opened this Issue Dec 15, 2013 · 4 comments

Comments

Projects
None yet
2 participants
@timowest
Member

timowest commented Dec 15, 2013

  • query().from(regCdBal).where(regCdBal.reportingDt.eq(date)).list(regCdBal)
java.lang.NullPointerException
    at com.mysema.query.sql.Configuration.get(Configuration.java:105)
    at com.mysema.query.sql.AbstractSQLQuery.get(AbstractSQLQuery.java:350)
    at com.mysema.query.sql.AbstractSQLQuery.newInstance(AbstractSQLQuery.java:588)
    at com.mysema.query.sql.AbstractSQLQuery.list(AbstractSQLQuery.java:522)
    at com.sabfin.common.dao.RegCdBalDao.getBalances(RegCdBalDao.java:37)
    at com.sabfin.common.dao.RegCdBalDaoTest.getBalances(RegCdBalDaoTest.java:30)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
  • .transform(groupBy(regCdBal.regCdLocal).as(map(regCdBal.leCd, regCdBal)));
com.mysema.query.QueryException: java.lang.NullPointerException
    at com.mysema.query.sql.SQLResultIterator.next(SQLResultIterator.java:85)
    at com.mysema.query.group.GroupByMap.transform(GroupByMap.java:57)
    at com.mysema.query.group.GroupByMap.transform(GroupByMap.java:35)
    at com.mysema.query.support.ProjectableQuery.transform(ProjectableQuery.java:80)
    at com.sabfin.common.dao.RegCdBalDao.getBalances(RegCdBalDao.java:37)
    at com.sabfin.common.dao.RegCdBalDaoTest.getBalances(RegCdBalDaoTest.java:30)
    at com.mysema.query.sql.Configuration.get(Configuration.java:105)
    at com.mysema.query.sql.AbstractSQLQuery.get(AbstractSQLQuery.java:350)
    at com.mysema.query.sql.AbstractSQLQuery.newInstance(AbstractSQLQuery.java:588)

timowest added a commit that referenced this issue Dec 15, 2013

@palexis

This comment has been minimized.

Show comment
Hide comment
@palexis

palexis Dec 15, 2013

I'm getting the following exception now:

java.lang.IllegalArgumentException: Found no type for java.math.BigInteger
    at com.mysema.query.sql.JavaTypeMapping.getType(JavaTypeMapping.java:131)
    at com.mysema.query.sql.Configuration.getType(Configuration.java:177)
    at com.mysema.query.sql.Configuration.get(Configuration.java:105)
    at com.mysema.query.sql.AbstractSQLQuery.get(AbstractSQLQuery.java:350)
    at com.mysema.query.sql.AbstractSQLQuery.newInstance(AbstractSQLQuery.java:588)
    at com.mysema.query.sql.AbstractSQLQuery.list(AbstractSQLQuery.java:522)

table details:

desc reg_cd_bal
Name         Null     Type         
------------ -------- ------------ 
REG_CD_LOCAL NOT NULL NUMBER(38)   
REG_BAL_AMT           NUMBER(38,2) 
REPORTING_DT          DATE         
CURR_CD               VARCHAR2(3)  
LE_CD                 VARCHAR2(10) 

Also I'm attaching the insert query as well (rename attachment extension to .sql)

reg_cd_bal__insert

palexis commented Dec 15, 2013

I'm getting the following exception now:

java.lang.IllegalArgumentException: Found no type for java.math.BigInteger
    at com.mysema.query.sql.JavaTypeMapping.getType(JavaTypeMapping.java:131)
    at com.mysema.query.sql.Configuration.getType(Configuration.java:177)
    at com.mysema.query.sql.Configuration.get(Configuration.java:105)
    at com.mysema.query.sql.AbstractSQLQuery.get(AbstractSQLQuery.java:350)
    at com.mysema.query.sql.AbstractSQLQuery.newInstance(AbstractSQLQuery.java:588)
    at com.mysema.query.sql.AbstractSQLQuery.list(AbstractSQLQuery.java:522)

table details:

desc reg_cd_bal
Name         Null     Type         
------------ -------- ------------ 
REG_CD_LOCAL NOT NULL NUMBER(38)   
REG_BAL_AMT           NUMBER(38,2) 
REPORTING_DT          DATE         
CURR_CD               VARCHAR2(3)  
LE_CD                 VARCHAR2(10) 

Also I'm attaching the insert query as well (rename attachment extension to .sql)

reg_cd_bal__insert

timowest added a commit that referenced this issue Dec 15, 2013

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Dec 15, 2013

Member

@palexis Could you try again?

Member

timowest commented Dec 15, 2013

@palexis Could you try again?

@palexis

This comment has been minimized.

Show comment
Hide comment
@palexis

palexis Dec 15, 2013

Awesome Timo, it works perfectly now. Thanks a lot :)

palexis commented Dec 15, 2013

Awesome Timo, it works perfectly now. Thanks a lot :)

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Dec 22, 2013

Member

Released in 3.3.0

Member

timowest commented Dec 22, 2013

Released in 3.3.0

@timowest timowest closed this Dec 22, 2013

@timowest timowest added this to the 3.3.0 milestone Apr 13, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment