java - jpa stopped working on Glassfish 4.0 - org.postgresql.util.PSQLException : ERROR : There is no "family" relationship -


i have glassfish 4.0 mounted on centos 6.5. - ejb jsf - jpa - java7 applications work correctly, started throwing same error when trying access database. database server postgresql 9.3. bases in scheme "public".

this persistence.xml file

<?xml version="1.0" encoding="utf-8"?> <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence"xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">   <persistence-unit name="ar.gob.ambiente.servicios_especiesforestales_war_1.0-snapshotpu" transaction-type="jta">     <jta-data-source>especiesforestalessrvndi</jta-data-source>     <exclude-unlisted-classes>false</exclude-unlisted-classes>     <properties>     </properties>   </persistence-unit> </persistence> 

this connection pool in glassfish-resources.xml:

<jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="org.postgresql.ds.pgsimpledatasource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="post-gre-sql_especiesforestales_postgrespool_1" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.datasource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">     <property name="servername" value="192.168.1.42"/>     <property name="portnumber" value="5432"/>     <property name="databasename" value="especiesforestales"/>     <property name="user" value="postgres"/>     <property name="password" value="postgres"/>     <property name="url" value="jdbc:postgresql://192.168.1.42:5432/especiesforestales"/>     <property name="driverclass" value="org.postgresql.driver"/> </jdbc-connection-pool> <jdbc-resource enabled="true" jndi-name="especiesforestalessrvndi" object-type="user" pool-name="post-gre-sql_especiesforestales_postgrespool_1"/> 

this section of institution declare fields , annotations:

@xmlrootelement(name = "familia") @entity @table(name = "familia") public class familia implements serializable { private static final long serialversionuid = 1l; @id @generatedvalue(strategy = generationtype.identity) private long id; private string nombre;  @column (nullable=true, length=50) @size(message = "el campo subfamilia no puede tener más de 50 caracteres", max = 50) private string subfamilia;       @onetoone(fetch=fetchtype.lazy, cascade=cascadetype.all) @joincolumn(name="adminentidad_id") private adminentidad adminentidad;  @onetomany(mappedby="familia") private list<genero> generos; 

all data access methods throw error, findall ( ) of abstractfacade, show example of query in jpql :

@stateless public class familiafacade extends abstractfacade<familia> { @persistencecontext(unitname = "ar.gob.ambiente.servicios_especiesforestales_war_1.0-snapshotpu") private entitymanager em;  @override protected entitymanager getentitymanager() {     return em; }  ...  public list<familia> getactivos(){     em = getentitymanager();             list<familia> result;     string querystring = "select fam familia fam "              + "where fam.adminentidad.habilitado = true";                        query q = em.createquery(querystring);     result = q.getresultlist();     return result; }    

finally , leave here showing me error in server log:

local exception stack:  exception [eclipselink-4002] (eclipse persistence services -    2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.databaseexception internal exception: org.postgresql.util.psqlexception: error: no existe la relación «familia»   position: 53 error code: 0 call: select id, nombre, subfamilia, adminentidad_id familia query: readallquery(referenceclass=familia sql="select id, nombre, subfamilia, adminentidad_id familia") @  org.eclipse.persistence.exceptions.databaseexception.sqlexception(databaseexcept ion.java:340) @ org.eclipse.persistence.internal.databaseaccess.databaseaccessor.basicexecutecall(databaseaccessor.java:679) @ org.eclipse.persistence.internal.databaseaccess.databaseaccessor.executecall(databaseaccessor.java:558) @ org.eclipse.persistence.internal.sessions.abstractsession.basicexecutecall(abstractsession.java:1995) @ org.eclipse.persistence.sessions.server.serversession.executecall(serversession.java:570) @ org.eclipse.persistence.internal.queries.datasourcecallquerymechanism.executecall(datasourcecallquerymechanism.java:242) @ org.eclipse.persistence.internal.queries.datasourcecallquerymechanism.executecall(datasourcecallquerymechanism.java:228) @ org.eclipse.persistence.internal.queries.datasourcecallquerymechanism.executeselectcall(datasourcecallquerymechanism.java:299) @ org.eclipse.persistence.internal.queries.datasourcecallquerymechanism.selectallrows(datasourcecallquerymechanism.java:694) @ org.eclipse.persistence.internal.queries.expressionquerymechanism.selectallrowsfromtable(expressionquerymechanism.java:2714) @ org.eclipse.persistence.internal.queries.expressionquerymechanism.selectallrows(expressionquerymechanism.java:2667) @ org.eclipse.persistence.queries.readallquery.executeobjectlevelreadquery(readallquery.java:477) @ org.eclipse.persistence.queries.objectlevelreadquery.executedatabasequery(objectlevelreadquery.java:1155) @ org.eclipse.persistence.queries.databasequery.execute(databasequery.java:899) @ org.eclipse.persistence.queries.objectlevelreadquery.execute(objectlevelreadquery.java:1114) @ org.eclipse.persistence.queries.readallquery.execute(readallquery.java:402) @ org.eclipse.persistence.queries.objectlevelreadquery.executeinunitofwork(objectlevelreadquery.java:1202) @ org.eclipse.persistence.internal.sessions.unitofworkimpl.internalexecutequery(unitofworkimpl.java:2894) @ org.eclipse.persistence.internal.sessions.abstractsession.executequery(abstractsession.java:1797) @ org.eclipse.persistence.internal.sessions.abstractsession.executequery(abstractsession.java:1779) @ org.eclipse.persistence.internal.sessions.abstractsession.executequery(abstractsession.java:1744) @ org.eclipse.persistence.internal.jpa.queryimpl.executereadquery(queryimpl.java:258) @ org.eclipse.persistence.internal.jpa.queryimpl.getresultlist(queryimpl.java:468) @ ar.gob.ambiente.servicios.especiesforestales.facades.abstractfacade.findall(abstractfacade.java:49) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ org.glassfish.ejb.security.application.ejbsecuritymanager.runmethod(ejbsecuritymanager.java:1081) @ org.glassfish.ejb.security.application.ejbsecuritymanager.invoke(ejbsecuritymanager.java:1153) @ com.sun.ejb.containers.basecontainer.invokebeanmethod(basecontainer.java:4695) @ com.sun.ejb.ejbinvocation.invokebeanmethod(ejbinvocation.java:630) @ com.sun.ejb.containers.interceptors.aroundinvokechainimpl.invokenext(interceptormanager.java:822) @ com.sun.ejb.ejbinvocation.proceed(ejbinvocation.java:582) @ org.jboss.weld.ejb.abstractejbrequestscopeactivationinterceptor.aroundinvoke(abstractejbrequestscopeactivationinterceptor.java:46) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ com.sun.ejb.containers.interceptors.aroundinvokeinterceptor.intercept(interceptormanager.java:883) @ com.sun.ejb.containers.interceptors.aroundinvokechainimpl.invokenext(interceptormanager.java:822) @ com.sun.ejb.ejbinvocation.proceed(ejbinvocation.java:582) @ com.sun.ejb.containers.interceptors.systeminterceptorproxy.docall(systeminterceptorproxy.java:163) @ com.sun.ejb.containers.interceptors.systeminterceptorproxy.aroundinvoke(systeminterceptorproxy.java:140) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ com.sun.ejb.containers.interceptors.aroundinvokeinterceptor.intercept(interceptormanager.java:883) @ com.sun.ejb.containers.interceptors.aroundinvokechainimpl.invokenext(interceptormanager.java:822) @ com.sun.ejb.containers.interceptors.interceptormanager.intercept(interceptormanager.java:369) @ com.sun.ejb.containers.basecontainer.__intercept(basecontainer.java:4667) @ com.sun.ejb.containers.basecontainer.intercept(basecontainer.java:4655) @ com.sun.ejb.containers.ejblocalobjectinvocationhandler.invoke(ejblocalobjectinvocationhandler.java:212) @ com.sun.ejb.containers.ejblocalobjectinvocationhandlerdelegate.invoke(ejblocalobjectinvocationhandlerdelegate.java:88) @ com.sun.proxy.$proxy451.findall(unknown source) @ ar.gob.ambiente.servicios.especiesforestales.facades.__ejb31_generated__familiafacade__intf____bean__.findall(unknown source) @ ar.gob.ambiente.servicios.especiesforestales.managedbeans.mbfamilia.getitems(mbfamilia.java:126) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ javax.el.beanelresolver.getvalue(beanelresolver.java:363) @ com.sun.faces.el.demuxcompositeelresolver._getvalue(demuxcompositeelresolver.java:176) @ com.sun.faces.el.demuxcompositeelresolver.getvalue(demuxcompositeelresolver.java:203) @ com.sun.el.parser.astvalue.getvalue(astvalue.java:140) @ com.sun.el.parser.astvalue.getvalue(astvalue.java:204) @ com.sun.el.valueexpressionimpl.getvalue(valueexpressionimpl.java:226) @ org.jboss.weld.el.weldvalueexpression.getvalue(weldvalueexpression.java:50) @ com.sun.faces.facelets.el.tagvalueexpression.getvalue(tagvalueexpression.java:109) @ javax.faces.component.componentstatehelper.eval(componentstatehelper.java:194) @ javax.faces.component.componentstatehelper.eval(componentstatehelper.java:182) @ javax.faces.component.uidata.getvalue(uidata.java:732) @ org.primefaces.component.datatable.datatable.getvalue(datatable.java:1002) @ org.primefaces.component.api.uidata.getdatamodel(uidata.java:629) @ org.primefaces.component.api.uidata.setrowmodel(uidata.java:436) @ org.primefaces.component.api.uidata.setrowindex(uidata.java:428) @ org.primefaces.component.api.uidata.processphase(uidata.java:280) @ org.primefaces.component.api.uidata.processdecodes(uidata.java:245) @ javax.faces.component.uiform.processdecodes(uiform.java:225) @ javax.faces.component.uiform.processdecodes(uiform.java:225) @ javax.faces.component.uicomponentbase.processdecodes(uicomponentbase.java:1223) @ javax.faces.component.uicomponentbase.processdecodes(uicomponentbase.java:1223) @ org.primefaces.component.layout.layout.processdecodes(layout.java:226) @ javax.faces.component.uicomponentbase.processdecodes(uicomponentbase.java:1223) @ javax.faces.component.uicomponentbase.processdecodes(uicomponentbase.java:1223) @ javax.faces.component.uiviewroot.processdecodes(uiviewroot.java:929) @ com.sun.faces.lifecycle.applyrequestvaluesphase.execute(applyrequestvaluesphase.java:78) @ com.sun.faces.lifecycle.phase.dophase(phase.java:101) @ com.sun.faces.lifecycle.lifecycleimpl.execute(lifecycleimpl.java:198) @ javax.faces.webapp.facesservlet.service(facesservlet.java:646) @ org.apache.catalina.core.standardwrapper.service(standardwrapper.java:1682) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:318) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:160) @ org.apache.catalina.core.standardpipeline.doinvoke(standardpipeline.java:734) @ org.apache.catalina.core.standardpipeline.invoke(standardpipeline.java:673) @ com.sun.enterprise.web.webpipeline.invoke(webpipeline.java:99) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:174) @ org.apache.catalina.connector.coyoteadapter.doservice(coyoteadapter.java:357) @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:260) @ com.sun.enterprise.v3.services.impl.containermapper.service(containermapper.java:246) @ org.glassfish.grizzly.http.server.httphandler.runservice(httphandler.java:191) @ org.glassfish.grizzly.http.server.httphandler.dohandle(httphandler.java:168) @ org.glassfish.grizzly.http.server.httpserverfilter.handleread(httpserverfilter.java:189) @ org.glassfish.grizzly.filterchain.executorresolver$9.execute(executorresolver.java:119) @ org.glassfish.grizzly.filterchain.defaultfilterchain.executefilter(defaultfilterchain.java:288) @ org.glassfish.grizzly.filterchain.defaultfilterchain.executechainpart(defaultfilterchain.java:206) @ org.glassfish.grizzly.filterchain.defaultfilterchain.execute(defaultfilterchain.java:136) @ org.glassfish.grizzly.filterchain.defaultfilterchain.process(defaultfilterchain.java:114) @ org.glassfish.grizzly.processorexecutor.execute(processorexecutor.java:77) @ org.glassfish.grizzly.nio.transport.tcpniotransport.fireioevent(tcpniotransport.java:838) @ org.glassfish.grizzly.strategies.abstractiostrategy.fireioevent(abstractiostrategy.java:113) @ org.glassfish.grizzly.strategies.workerthreadiostrategy.run0(workerthreadiostrategy.java:115) @ org.glassfish.grizzly.strategies.workerthreadiostrategy.access$100(workerthreadiostrategy.java:55) @ org.glassfish.grizzly.strategies.workerthreadiostrategy$workerthreadrunnable.run(workerthreadiostrategy.java:135) @ org.glassfish.grizzly.threadpool.abstractthreadpool$worker.dowork(abstractthreadpool.java:564) @ org.glassfish.grizzly.threadpool.abstractthreadpool$worker.run(abstractthreadpool.java:544) @ java.lang.thread.run(thread.java:745) caused by: org.postgresql.util.psqlexception: error: no existe la relación «familia»   position: 53 @ org.postgresql.core.v3.queryexecutorimpl.receiveerrorresponse(queryexecutorimpl.java:2161) @ org.postgresql.core.v3.queryexecutorimpl.processresults(queryexecutorimpl.java:1890) @ org.postgresql.core.v3.queryexecutorimpl.execute(queryexecutorimpl.java:255) @ org.postgresql.jdbc2.abstractjdbc2statement.execute(abstractjdbc2statement.java:559) @ org.postgresql.jdbc2.abstractjdbc2statement.executewithflags(abstractjdbc2statement.java:417) @ org.postgresql.jdbc2.abstractjdbc2statement.executequery(abstractjdbc2statement.java:302) @ com.sun.gjc.spi.jdbc40.preparedstatementwrapper40.executequery(preparedstatementwrapper40.java:642) @ org.eclipse.persistence.internal.databaseaccess.databaseaccessor.executeselect(databaseaccessor.java:1002) @ org.eclipse.persistence.internal.databaseaccess.databaseaccessor.basicexecutecall(databaseaccessor.java:641) ... 116 more ]] 

and more...


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -