mstegeman1 / transitdatafeeder

Automatically exported from code.google.com/p/transitdatafeeder
0 stars 0 forks source link

Transaction failure for adding stop #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
[Aaron Antrim reporting issue for Chatham Area Transit]

What steps will reproduce the problem?
1. Log in
2. Click stops tab
3. click on the Add a Stop link
4. enter the data (name, latitude, and longitude).
5. Click save

This is the error message:
Transaction failed

<br/>org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(
AbstractJdbc2Statement.java:2569)<br/>org.postgresql.core.v3.QueryExecutorImpl.p
rocessResults(QueryExecutorImpl.java:1796)<br/>org.postgresql.core.v3.QueryExecu
torImpl.execute(QueryExecutorImpl.java:407)<br/>org.postgresql.jdbc2.AbstractJdb
c2Statement.executeBatch(AbstractJdbc2Statement.java:2708)<br/>org.jboss.resourc
e.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:774)<br/>org.
hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)<br/>org.h
ibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)<br/>org.hib
ernate.engine.ActionQueue.executeActions(ActionQueue.java:266)<br/>org.hibernate
.engine.ActionQueue.executeActions(ActionQueue.java:167)<br/>org.hibernate.event
.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListen
er.java:321)<br/>org.hibernate.event.def.DefaultFlushEventListener.onFlush(Defau
ltFlushEventListener.java:50)<br/>org.hibernate.impl.SessionImpl.flush(SessionIm
pl.java:1027)<br/>org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEnti
tyManagerImpl.java:304)<br/>org.jboss.seam.persistence.EntityManagerProxy.flush(
EntityManagerProxy.java:92)<br/>org.jboss.seam.framework.EntityHome.persist(Enti
tyHome.java:85)<br/>org.ideaproject.action.entityhome.LocationHome.persist(Locat
ionHome.java:114)<br/>sun.reflect.GeneratedMethodAccessor3026.invoke(Unknown 
Source)<br/>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
ssorImpl.java:43)<br/>java.lang.reflect.Method.invoke(Method.java:616)<br/>org.j
boss.seam.util.Reflections.invoke(Reflections.java:22)<br/>org.jboss.seam.interc
ept.RootInvocationContext.proceed(RootInvocationContext.java:32)<br/>org.jboss.s
eam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)<br/>o
rg.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.j
ava:28)<br/>org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocatio
nContext.java:68)<br/>org.jboss.seam.core.BijectionInterceptor.aroundInvoke(Bije
ctionInterceptor.java:77)<br/>org.jboss.seam.intercept.SeamInvocationContext.pro
ceed(SeamInvocationContext.java:68)<br/>org.jboss.seam.transaction.TransactionIn
terceptor$1.work(TransactionInterceptor.java:97)<br/>org.jboss.seam.util.Work.wo
rkInTransaction(Work.java:47)<br/>org.jboss.seam.transaction.TransactionIntercep
tor.aroundInvoke(TransactionInterceptor.java:91)<br/>org.jboss.seam.intercept.Se
amInvocationContext.proceed(SeamInvocationContext.java:68)<br/>org.jboss.seam.co
re.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)<br/>o
rg.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java
:68)<br/>org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:10
7)<br/>org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBean
Interceptor.java:185)<br/>org.jboss.seam.intercept.JavaBeanInterceptor.invoke(Ja
vaBeanInterceptor.java:103)<br/>org.ideaproject.action.entityhome.StopHome_$$_ja
vassist_seam_27.persist(StopHome_$$_javassist_seam_27.java)<br/>sun.reflect.Gene
ratedMethodAccessor3903.invoke(Unknown 
Source)<br/>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
ssorImpl.java:43)<br/>java.lang.reflect.Method.invoke(Method.java:616)<br/>org.j
boss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335)<br/>org.jboss.
el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:348)<br/>org.jboss.el.pa
rser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)<br/>org.jboss.el.parser
.AstValue.invoke(AstValue.java:96)<br/>org.jboss.el.MethodExpressionImpl.invoke(
MethodExpressionImpl.java:276)<br/>com.sun.facelets.el.TagMethodExpression.invok
e(TagMethodExpression.java:68)<br/>javax.faces.component.MethodBindingMethodExpr
essionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)

Your browser may not support display of this image. 
<br/>com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerIm
pl.java:102)<br/>javax.faces.component.UICommand.broadcast(UICommand.java:387)<b
r/>org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)<br/>
org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)<br/>o
rg.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)<br/>org.a
jax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)<br/>com
.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:
82)<br/>com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)<br/>com.sun.faces.
lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)<br/>javax.faces.webapp.F
acesServlet.service(FacesServlet.java:265)<br/>org.apache.catalina.core.Applicat
ionFilterChain.internalDoFilter(ApplicationFilterChain.java:290)<br/>org.apache.
catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<b
r/>org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83
)<br/>org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)<br/>org
.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)<br/>
org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)<br/>org.jbo
ss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)<br/>org.
jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)<br/>org.jboss.s
eam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)<br/>org.jbos
s.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)<br/>org.jboss.seam.se
rvlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)<br/>org.ajax4jsf.w
ebapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)<br/>org.ajax4jsf.webapp.
BaseFilter.handleRequest(BaseFilter.java:290)<br/>org.ajax4jsf.webapp.BaseFilter
.processUploadsAndHandleRequest(BaseFilter.java:368)<br/>org.ajax4jsf.webapp.Bas
eFilter.doFilter(BaseFilter.java:495)<br/>org.jboss.seam.web.Ajax4jsfFilter.doFi
lter(Ajax4jsfFilter.java:56)<br/>org.jboss.seam.servlet.SeamFilter$FilterChainIm
pl.doFilter(SeamFilter.java:69)<br/>org.jboss.seam.web.LoggingFilter.doFilter(Lo
ggingFilter.java:60)<br/>org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFil
ter(SeamFilter.java:69)<br/>org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilte
r.java:158)<br/>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:235)<br/>org.apache.catalina.core.ApplicationFilter
Chain.doFilter(ApplicationFilterChain.java:206)<br/>org.jboss.web.tomcat.filters
.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)<br/>org.apache.catalina.c
ore.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)<br/
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
.java:206)<br/>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrap
perValve.java:235)<br/>org.apache.catalina.core.StandardContextValve.invoke(Stan
dardContextValve.java:191)<br/>org.jboss.web.tomcat.security.SecurityAssociation
Valve.invoke(SecurityAssociationValve.java:190)<br/>org.apache.catalina.authenti
cator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)<br/>org.jboss.web.tom
cat.security.JaccContextValve.invoke(JaccContextValve.java:92)<br/>org.jboss.web
.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstabl
ishmentValve.java:126)<br/>org.jboss.web.tomcat.security.SecurityContextEstablis
hmentValve.invoke(SecurityContextEstablishmentValve.java:70)<br/>org.apache.cata
lina.core.StandardHostValve.invoke(StandardHostValve.java:127)<br/>org.apache.ca
talina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)<br/>org.jboss.w
eb.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:15
8)<br/>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.j
ava:109)<br/>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.j
ava:330)<br/>org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:436)<b
r/>org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.ja
va:384)<br/>org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:4
47)<br/>java.lang.Thread.run(Thread.java:636)<br/>

Other information:
This issue occurs regardless of the logged in user.  The error is produced for 
admin and normal users.  Chatham Area Transit has 863 stops entered.

Original issue reported on code.google.com by aaronant...@yahoo.com on 24 Aug 2010 at 9:22

GoogleCodeExporter commented 9 years ago
looks like the database gets not properly initialized. Manually adding to rows 
to the table "location_type" with values (0, 'stop') and (1, 'station') solves 
this problem. In psql, you would do it like this:

INSERT INTO idea.location_type(location_type_id, location_type_description) 
VALUES(0, 'stop');
INSERT INTO idea.location_type(location_type_id, location_type_description) 
VALUES(1, 'station');

After adding those two rows to the table, I was able to create new stops and 
stations and save them in the database.

Original comment by rie...@gmail.com on 4 May 2011 at 9:01

GoogleCodeExporter commented 9 years ago
Added Marcel Rieser's suggestion... also did it manually in the South African 
implementation, and it works fine. 

Original comment by johanwjo...@gmail.com on 13 Jul 2011 at 9:22