[JBoss Tools] - MappingException "Could not determine type for: pg-uuid" Thrown When Opening Session Factory
by Dirk Weinhardt
Dirk Weinhardt [https://community.jboss.org/people/dweinhardt] created the discussion
"MappingException "Could not determine type for: pg-uuid" Thrown When Opening Session Factory"
To view the discussion, visit: https://community.jboss.org/message/824799#824799
--------------------------------------------------------------
Hi Community,
I am trying to use Hibernate Tools within Eclipse (Eclipse Juno Service Release 2 on Windows 7 x64, PostgreSQL 9.2 on Debian 6). I was able to set up a Hibernate Configuration. All my data objects are listed under the Configuration node as well as the database can be browsed under the Database node. But a MappingException is thrown for a pg-uuid ID column when trying to open a Session Factory.
Error Message: org.hibernate.MappingException: Could not determine type for: pg-uuid, at table: roles, for columns: [org.hibernate.mapping.Column(id)]
The affected ID property of the roles entity is defined as:
@Id
@Type(type = "pg-uuid")
@GeneratedValue(generator="hibernate-uuid")
@GenericGenerator(name="hibernate-uuid", strategy="uuid2")
protected UUID id;
We are not experiencing this issue when using the class and configuration with Hibernate 4.1.8 in a Spring MVC application.
What could we be doing wrong? Is any additional information required to understand this issue? Would this problem better be reported as a bug to the Hibernate Tools team?
Any help is highly appreciated.
Thank you,
Dirk
Full Stack Trace;
org.hibernate.MappingException: Could not determine type for: pg-uuid, at table: roles, for columns: [org.hibernate.mapping.Column(id)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:291)
at org.hibernate.cfg.Configuration$1.getIdentifierType(Configuration.java:2217)
at org.hibernate.type.EntityType.getIdentifierType(EntityType.java:553)
at org.hibernate.type.EntityType.getIdentifierOrUniqueKeyType(EntityType.java:578)
at org.hibernate.type.ManyToOneType.getColumnSpan(ManyToOneType.java:120)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:275)
at org.hibernate.mapping.ToOne.isValid(ToOne.java:105)
at org.hibernate.mapping.Property.isValid(Property.java:217)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:464)
at org.hibernate.mapping.SingleTableSubclass.validate(SingleTableSubclass.java:66)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1193)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1378)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
at org.hibernate.console.ConsoleConfiguration$5.execute(ConsoleConfiguration.java:278)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:273)
at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:43)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/824799#824799]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months
[JBoss Web Services] - Failed executing POST - ClientAbortException: java.io.IOException: Socket read failed
by Montia
Montia [https://community.jboss.org/people/Montia] created the discussion
"Failed executing POST - ClientAbortException: java.io.IOException: Socket read failed"
To view the discussion, visit: https://community.jboss.org/message/825383#825383
--------------------------------------------------------------
I am running JBoss 7.1.1.Final behind Apache 2.2 with mod_cluster-1.2.0.Final. I have a RESTEasy web service that is accessed over HTTPS from the same user session via repeated successive GET and POST requests to the same resource using jQuery.ajax().
The user logs into the application and goes through a series of questions where the answer to the current question determines the question that will be displayed next. The question to be displayed is acquired via a GET request to the test/question resource. The answer selected by the user is sent along with other data to the server as a JSON string via a POST request on the same resource when the user clicks a button.
About 1% of the time, when trying to send a POST request nothing happens on the client for exactly 5 minutes. After 5 minutes the error handler of the ajax() call indicates a Bad Request status code. We've noticed this behaviour only from IE8 and IE9. I have not noticed it at all when testing locally directly against the JBoss server.
After the 5 minutes, the following line is added to the Apache ssl access log:
"POST /myApp/rest/test/question HTTP/1.1" 400 226
And the following error is logged in the JBoss server.log:
SEVERE [org.jboss.resteasy.core.SynchronousDispatcher] (ajp--127.0.0.1-8009-5) Failed executing POST /myApp/test/question: org.jboss.resteasy.spi.ReaderException: ClientAbortException: java.io.IOException: Socket read failed
at org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:202) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.core.MethodInjectorImpl.injectArguments(MethodInjectorImpl.java:124) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:147) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.2.Final.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.myapp.util.JSONPRequestFilter.doFilter(JSONPRequestFilter.java:77) [classes:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.myapp.security.Authenticator.doFilter(Authenticator.java:59) [classes:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.event(JBossWebContext.java:67)
at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.invoke(JBossWebContext.java:48)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:489) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:505) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:445) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_32]
Caused by: ClientAbortException: java.io.IOException: Socket read failed
at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:357) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:420) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:379) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193) [jbossweb-7.0.13.Final.jar:]
at org.codehaus.jackson.impl.ByteSourceBootstrapper.ensureLoaded(ByteSourceBootstrapper.java:507) [jackson-core-asl-1.9.2.jar:1.9.2]
at org.codehaus.jackson.impl.ByteSourceBootstrapper.detectEncoding(ByteSourceBootstrapper.java:129) [jackson-core-asl-1.9.2.jar:1.9.2]
at org.codehaus.jackson.impl.ByteSourceBootstrapper.constructParser(ByteSourceBootstrapper.java:224) [jackson-core-asl-1.9.2.jar:1.9.2]
at org.codehaus.jackson.JsonFactory._createJsonParser(JsonFactory.java:785) [jackson-core-asl-1.9.2.jar:1.9.2]
at org.codehaus.jackson.JsonFactory.createJsonParser(JsonFactory.java:561) [jackson-core-asl-1.9.2.jar:1.9.2]
at org.codehaus.jackson.jaxrs.JacksonJsonProvider.readFrom(JacksonJsonProvider.java:414)
at org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl.proceed(MessageBodyReaderContextImpl.java:105) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.read(GZIPDecodingInterceptor.java:61) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl.proceed(MessageBodyReaderContextImpl.java:108) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:169) [resteasy-jaxrs-2.3.2.Final.jar:]
... 38 more
Caused by: java.io.IOException: Socket read failed
at org.apache.coyote.ajp.AjpProcessor.read(AjpProcessor.java:1135) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.ajp.AjpProcessor.readMessage(AjpProcessor.java:1213) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.ajp.AjpProcessor.receive(AjpProcessor.java:1152) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.ajp.AjpProcessor$SocketInputBuffer.doRead(AjpProcessor.java:1278) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.Request.doRead(Request.java:438) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:347) [jbossweb-7.0.13.Final.jar:]
... 51 more
The request goes through an authentication filter and then a second filter. In both instances, the request just gets passed along using chain.doFilter(ServletRequest, ServletResponse). Based on my debugging, the request makes it past the filters fine, but never makes it inside updateTestQuestion(), the method in the web service that handles the POST request:
@POST
@Path("/question")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response updateTestQuestion(@Context UriInfo uriInfo, TestQuestion curTestQuestion)
- where TestQuestion is a JavaBean with several properties and getter and setter methods:
@XmlRootElement
public class TestQuestion implements Serializable {
}
I am trying to find out what could be causing this or how I can debug it better. At this point I think there is some kind of breakdown in the client-server communication, but I do not know at which end and how to detect it.
Thank you,
Monica
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/825383#825383]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months