[jbosstools-issues] [JBoss JIRA] (JBIDE-10077) JPA: NPEs when try to create some error markers

Dmitry Geraskov (Commented) (JIRA) jira-events at lists.jboss.org
Tue Dec 13 07:47:09 EST 2011


    [ https://issues.jboss.org/browse/JBIDE-10077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650413#comment-12650413 ] 

Dmitry Geraskov commented on JBIDE-10077:
-----------------------------------------

1. Create custom NamingStrategy
2. Add it to console configuration
3. Add throw new UnsupportedOperationException into method columnName
4. Create Entity and add @Column annotation to one of the fields with specified name
5. Build console configuration
6. When project validation is done:
Error marker should appear near column name and your exception in the log with Naming strategy exception message instead of NPE which appeared earlier.
                
> JPA: NPEs when try to create some error markers
> -----------------------------------------------
>
>                 Key: JBIDE-10077
>                 URL: https://issues.jboss.org/browse/JBIDE-10077
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: hibernate
>    Affects Versions: 3.3.0.M4
>            Reporter: Dmitry Geraskov
>            Assignee: Dmitry Geraskov
>            Priority: Critical
>             Fix For: 3.3.0.M5
>
>
> Earlier we used null as turget object in some places. Probably API changed in the place and null should not be used any more.
> Error log example:
> Nested exception 1: java.lang.NullPointerException
> 	at org.eclipse.jpt.jpa.core.internal.validation.JpaValidationPreferences.getProject(JpaValidationPreferences.java:63)
> 	at org.eclipse.jpt.jpa.core.internal.validation.JpaValidationPreferences.getProblemSeverityPreference(JpaValidationPreferences.java:46)
> 	at org.jboss.tools.hibernate.jpt.core.internal.validation.HibernateJpaValidationMessage.buildMessage(HibernateJpaValidationMessage.java:50)
> 	at org.jboss.tools.hibernate.jpt.core.internal.validation.HibernateJpaValidationMessage.buildMessage(HibernateJpaValidationMessage.java:37)
> 	at org.jboss.tools.hibernate.jpt.core.internal.validation.HibernateJpaValidationMessage.buildMessage(HibernateJpaValidationMessage.java:32)
> 	at org.jboss.tools.hibernate.jpt.core.internal.context.orm.HibernateOrmTableImpl.buildDefaultDBTableName(HibernateOrmTableImpl.java:80)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list