Vaadin NPE in ServerRpcHandler - java

This week I started using Vaadin and has made a big impression on me ever since. However, I came accross a problem which I am not able to resolve. Basically I made a web application where I display Contacts (stored in my database) and display them in a Table.
Since I am using Hibernate, I start off with the following lines of code:
JPAContainer<Contact>contactContainer = new JPAContainer<Contact>(Contact.class);
CachingMutableLocalEntityProvider<Contact> entityProvider = new CachingMutableLocalEntityProvider<Contact>(Contact.class, em);
contactContainer.setEntityProvider(entityProvider);
contactsList = new ContactsList(contactContainer);
As you can see, I pass my container to a class called ContactsList where the table etc. is built:
table = new Table();
table.setWidth(100, Unit.PERCENTAGE);
table.addStyleName(ValoTheme.TABLE_BORDERLESS);
table.addStyleName(ValoTheme.TABLE_COMPACT);
table.setSelectable(true);
table.setColumnCollapsingAllowed(true);
if(container != null)
{
table.setContainerDataSource(this.container);
table.setSortAscending(true);
table.setVisibleColumns("firstName", "lastName", "telephoneNr", "gsmNr", "creationDate");
table.setColumnHeaders(SpringUtil.getMessage("label.contacts_firstname", null),
SpringUtil.getMessage("label.contacts_lastname", null),
SpringUtil.getMessage("label.contacts_telephone_nr", null),
SpringUtil.getMessage("label.contacts_gsm_nr", null),
SpringUtil.getMessage("label.contacts_creationdate", null));
}
table.setMultiSelect(true);
table.setImmediate(true);
When I comment out all this code, my application runs perfectly without crashing (ofcourse not showing the contacts table) but when I try and compile this code, while debugging everything works well even after the table has been built but then a NPE is thrown in the class ServerRpcHandler on the lines:
if (invocation instanceof ServerRpcMethodInvocation) {
try {
ServerRpcManager.applyInvocation(connector,
(ServerRpcMethodInvocation) invocation);
} catch (RpcInvocationException e) {
manager.handleConnectorRelatedException(connector, e);
}
} else {
The full StackTrace is shown here:
SEVERE: java.lang.NullPointerException
at com.vaadin.addon.jpacontainer.provider.LocalEntityProvider.getEntityManager(LocalEntityProvider.java:215)
at com.vaadin.addon.jpacontainer.provider.LocalEntityProvider.doGetEntityManager(LocalEntityProvider.java:226)
at com.vaadin.addon.jpacontainer.provider.LocalEntityProvider.doGetEntityCount(LocalEntityProvider.java:510)
at com.vaadin.addon.jpacontainer.provider.CachingSupport$FilterCacheEntry.getEntityCount(CachingSupport.java:157)
at com.vaadin.addon.jpacontainer.provider.CachingSupport.getEntityCount(CachingSupport.java:826)
at com.vaadin.addon.jpacontainer.provider.CachingMutableLocalEntityProvider.getEntityCount(CachingMutableLocalEntityProvider.java:130)
at com.vaadin.addon.jpacontainer.JPAContainer.size(JPAContainer.java:912)
at com.vaadin.ui.AbstractSelect.size(AbstractSelect.java:762)
at com.vaadin.ui.Table.refreshRenderedCells(Table.java:1727)
at com.vaadin.ui.Table.attach(Table.java:4298)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:590)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:577)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:590)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:577)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:590)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:577)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:590)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:577)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:590)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:577)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:590)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:577)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:590)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:577)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:590)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:577)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:590)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:577)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:590)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:577)
at com.vaadin.ui.AbstractComponent.setParent(AbstractComponent.java:484)
at com.vaadin.ui.AbstractComponentContainer.addComponent(AbstractComponentContainer.java:210)
at com.vaadin.ui.CssLayout.addComponent(CssLayout.java:120)
at com.vaadin.navigator.Navigator$ComponentContainerViewDisplay.showView(Navigator.java:191)
at com.vaadin.navigator.Navigator.navigateTo(Navigator.java:568)
at com.vaadin.navigator.Navigator.navigateTo(Navigator.java:526)
at be.cematech.dashboard.ui.DashboardMenu$ValoMenuItemButton$1.buttonClick(DashboardMenu.java:167)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:508)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:198)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:161)
at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:977)
at com.vaadin.ui.Button.fireClick(Button.java:387)
at com.vaadin.ui.Button$1.click(Button.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:168)
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:118)
at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:290)
at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:183)
at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:92)
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1404)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:305)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
UPDATE
What might be useful to know is that I use this ContactList on a different page as well where I have the EXACT same lines of code but where it is able to show the table. Does this have something to do of having two EntityManagers and/or EntityProviders accessing the same data??
UPDATE2
#PersistenceContext
protected EntityManager em;

As per Update2 I saw you retrive at runtime your EntityManager with the annotation "#PersistenceContext".
This works out if you are using it in "CDI bean, EJB, Servlet, Servlet Listener, Servlet Filter, or JSF ManagedBean"
( http://tomee.apache.org/examples-trunk/injection-of-entitymanager/README.html )
My guess is that on the "other page" you are in a right context where the annotation works, while in "this" page you are not.
Check this and if it's the case I'd suggest to manually instantiate the EntityManager with for example
JPAContainerFactory.make(Contact.class, "PERSISTENCE_UNIT_NAME");
if you have/use a persistence.xml file in your project. Otherwise a way would be to custom create an EntityManagerFactory like
Persistence.createEntityManagerFactory( "persistence_unit_name", properties ).createEntityManager()
where properties is a Map of persistence properties like
Map<String, String> properties = new HashMap<String, String>();
properties.put(JDBC_DRIVER, this.jdbcDriver);
properties.put(JDBC_URL, this.url);
properties.put(JDBC_USER, this.username);
properties.put(JDBC_PASSWORD, this.password);
// Configure logging. FINE ensures all SQL is shown
properties.put(LOGGING_LEVEL, "FINE");
return properties;
The perk of EntityManager like this is that you can have it ready whenever you are in your app.
Cheers.

Related

POST not inserting data in database

I'm stuck on a webservice project. I have a resource class with 5 methods (4 GET methods and 1 POST method). Every single GET method works (that is, pulling data from the database is fine). But my POST method doesn't work (that's where the data is pushing to the database). The problem is occurring on Hibernate commit.
I'm using jdk 7, tomcat 6.0.41, jersey 2.x.
My POST method's code is:
#POST
#Path("/")
#Produces(MediaType.APPLICATION_JSON)
public Response postRequisicao(#FormParam("uuid") String uuid, #FormParam("geometria") String geometria, #FormParam("itens") String itensId) {
try {
LocalChecklist localChecklist = new LocalChecklist(uuid, new Date(), (Point) wktToGeometry(geometria));
LocalItemChecklistDAO.save(localChecklist, itensId);
} catch(Exception e) {
return Response.serverError().build();
}
return Response.ok().build();
}
My LocalChecklistDAO.save() method's code is:
public static void save(LocalChecklist localChecklist, String itensId) {
Session session = HibernateUtil.getSessionFactory().openSession();
session.beginTransaction();
session.save(localChecklist);
for(ItemChecklist itemChecklist: ItemChecklist.getListFromIds(itensId)) {
LocalItemChecklist item = new LocalItemChecklist(localChecklist, itemChecklist);
session.save(item);
}
session.getTransaction().commit();
session.close();
}
The exception sent in the line session.getTransaction().commit(); is:
SEVERE: Servlet.service() for servlet Jersey REST Service threw exception
org.hibernate.spatial.helper.FinderException: Tried retrieving OracleConnection from oracle.jdbc.driver.T4CConnection using method _getPC, but received null.
at org.hibernate.spatial.dialect.oracle.DefaultConnectionFinder.find(DefaultConnectionFinder.java:75)
at org.hibernate.spatial.dialect.oracle.DefaultConnectionFinder.find(DefaultConnectionFinder.java:44)
at org.hibernate.spatial.dialect.oracle.OracleJDBCTypeFactory.createStruct(OracleJDBCTypeFactory.java:119)
at org.hibernate.spatial.dialect.oracle.SDOGeometryValueBinder.store(SDOGeometryValueBinder.java:76)
at org.hibernate.spatial.dialect.oracle.SDOGeometryValueBinder.toNative(SDOGeometryValueBinder.java:83)
at org.hibernate.spatial.dialect.oracle.SDOGeometryValueBinder.bind(SDOGeometryValueBinder.java:66)
at org.hibernate.spatial.dialect.oracle.SDOGeometryValueBinder.bind(SDOGeometryValueBinder.java:52)
at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:286)
at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:281)
at org.hibernate.type.AbstractSingleColumnStandardBasicType.nullSafeSet(AbstractSingleColumnStandardBasicType.java:56)
at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2843)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3121)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3581)
at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:104)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:465)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:351)
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350)
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1222)
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:425)
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177)
at dao.LocalItemChecklistDAO.save(LocalItemChecklistDAO.java:23)
at resources.ResourceTester.adicionarLocal2(ResourceTester.java:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:745)
One thing I think it's worth to mention is: before committing, I can see the objects CAN get its ID from the database sequence, that is, before save(), its ID is null (as expected), and after save() (and before commit()) the object gets the exact ID it should get (from the sequence, as expected).
Can someone see something?
I think you have to seperate your transcation, and commit on the tx you receive.
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
Session session = sessionFactory.openSession();
Transaction tx = session.beginTransaction();
session.save(item);
tx.commit();
AT LAST!
I was searching for the problem since yesterday morning (my local time, UTC-3). I think that's a very specific case, in which, I removed ojdbc14.jar from tomcat's lib, and added ojdbc6.jar and it worked.
I don't know if this is a bug, but it's the second time that I get into problem using ojdbc14.jar. I don't remember what was the first problem I had using ojdbc14.jar, but I do remember that I had a problem with it.
I'll leave my answer here in case of someone in the future faces this problem.

Error when using a custom filter to filter results returned by Accumulo

I wrote a very simple custom filter to filter results returned by Accumulo. This is the filter that I wrote
public class MyFilter extends Filter {
#Override
public boolean accept(Key key, Value val) {
Long page = 1L;
Integer limit = 25;
if(key.getColumnQualifier().getBytes().equals("Class".getBytes()) && val.get().equals("1".getBytes())) {
if(page == 1) {
return true;
}
limit--;
if(limit == 1L) {
page++;
limit = 25;
}
}
return false;
}
}
I added this filter to Accumulo's scanner like this
Set<Range> ranges = new HashSet<>();
IteratorSetting iter = new IteratorSetting(15, "MyFilter", MyFilter.class);
myScanner.addScanIterator(iter);
Iterator<Entry<Key, Value>> kys = myScanner.iterator();
while(kys.hasNext()) { // This is line 335 in com.latize.ulysses3.service.AccumuloPivotTable.getRows
Entry<Key, Value> e = kys.next();
ranges.add(Range.exact(e.getKey().getRow()));
}
But whenever I try to run this piece of code, I get this stacktrace
java.lang.RuntimeException: org.apache.accumulo.core.client.impl.AccumuloServerException: Error on server accumulo.tablet.2:9997
at org.apache.accumulo.core.client.impl.ScannerIterator.hasNext(ScannerIterator.java:161)
at com.latize.ulysses3.service.AccumuloPivotTable.getRows(AccumuloPivotTable.java:335)
at com.latize.ulysses3.webservice.DataVault.getFilteredRows(DataVault.java:950)
at com.latize.ulysses3.webservice.DataVault$Proxy$_$$_WeldClientProxy.getFilteredRows(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:280)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:234)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:221)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
at org.jboss.resteasy.core.SynchronousDispatcher.invokePropagateNotFound(SynchronousDispatcher.java:217)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:224)
at org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.marmotta.platform.core.servlet.MarmottaResourceFilter$LMFFilterChain.doFilter(MarmottaResourceFilter.java:189)
at org.apache.marmotta.platform.core.filters.ModuleResourceFilter.doFilter(ModuleResourceFilter.java:169)
at org.apache.marmotta.platform.core.filters.ModuleResourceFilter$Proxy$_$$_WeldClientProxy.doFilter(Unknown Source)
at org.apache.marmotta.platform.core.servlet.MarmottaResourceFilter$LMFFilterChain.doFilter(MarmottaResourceFilter.java:184)
at com.latize.ulysses.platform.core.filters.ClickJackFilter.doFilter(ClickJackFilter.java:105)
at com.latize.ulysses.platform.core.filters.ClickJackFilter$Proxy$_$$_WeldClientProxy.doFilter(Unknown Source)
at org.apache.marmotta.platform.core.servlet.MarmottaResourceFilter$LMFFilterChain.doFilter(MarmottaResourceFilter.java:184)
at com.latize.ulysses.platform.core.filters.SessionTimeoutCookieFilter.doFilter(SessionTimeoutCookieFilter.java:125)
at com.latize.ulysses.platform.core.filters.SessionTimeoutCookieFilter$Proxy$_$$_WeldClientProxy.doFilter(Unknown Source)
at org.apache.marmotta.platform.core.servlet.MarmottaResourceFilter$LMFFilterChain.doFilter(MarmottaResourceFilter.java:184)
at org.apache.marmotta.platform.core.filters.MarmottaServerNameFilter.doFilter(MarmottaServerNameFilter.java:104)
at org.apache.marmotta.platform.core.servlet.MarmottaResourceFilter$LMFFilterChain.doFilter(MarmottaResourceFilter.java:184)
at com.latize.ulysses.platform.core.filters.UlyssesTemplatingFilter.doFilter(UlyssesTemplatingFilter.java:178)
at com.latize.ulysses.platform.core.filters.UlyssesTemplatingFilter$Proxy$_$$_WeldClientProxy.doFilter(Unknown Source)
at org.apache.marmotta.platform.core.servlet.MarmottaResourceFilter$LMFFilterChain.doFilter(MarmottaResourceFilter.java:184)
at org.apache.marmotta.platform.core.filters.TemplatingFilter.doFilter(TemplatingFilter.java:176)
at org.apache.marmotta.platform.core.filters.TemplatingFilter$Proxy$_$$_WeldClientProxy.doFilter(Unknown Source)
at org.apache.marmotta.platform.core.servlet.MarmottaResourceFilter$LMFFilterChain.doFilter(MarmottaResourceFilter.java:184)
at org.apache.marmotta.platform.security.filters.MarmottaAccessControlFilter.doFilter(MarmottaAccessControlFilter.java:142)
at org.apache.marmotta.platform.security.filters.MarmottaAccessControlFilter$Proxy$_$$_WeldClientProxy.doFilter(Unknown Source)
at org.apache.marmotta.platform.core.servlet.MarmottaResourceFilter$LMFFilterChain.doFilter(MarmottaResourceFilter.java:184)
at org.apache.marmotta.platform.user.filters.MarmottaAuthenticationFilter.doFilter(MarmottaAuthenticationFilter.java:228)
at org.apache.marmotta.platform.user.filters.MarmottaAuthenticationFilter$Proxy$_$$_WeldClientProxy.doFilter(Unknown Source)
at org.apache.marmotta.platform.core.servlet.MarmottaResourceFilter$LMFFilterChain.doFilter(MarmottaResourceFilter.java:184)
at org.apache.marmotta.platform.core.servlet.MarmottaResourceFilter.doFilter(MarmottaResourceFilter.java:135)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.marmotta.platform.core.servlet.MarmottaPreStartupFilter.doFilter(MarmottaPreStartupFilter.java:106)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:169)
at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:232)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.marmotta.platform.core.servlet.MarmottaOptionsFilter.doFilter(MarmottaOptionsFilter.java:83)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.accumulo.core.client.impl.AccumuloServerException: Error on server accumulo.tablet.2:9997
at org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner.java:293)
at org.apache.accumulo.core.client.impl.ScannerIterator$Reader.run(ScannerIterator.java:80)
at org.apache.accumulo.core.client.impl.ScannerIterator.hasNext(ScannerIterator.java:151)
... 69 more
Caused by: org.apache.thrift.TApplicationException: Internal error processing startScan
at org.apache.thrift.TApplicationException.read(TApplicationException.java:111)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:71)
at org.apache.accumulo.core.tabletserver.thrift.TabletClientService$Client.recv_startScan(TabletClientService.java:232)
at org.apache.accumulo.core.tabletserver.thrift.TabletClientService$Client.startScan(TabletClientService.java:208)
at org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner.java:410)
at org.apache.accumulo.core.client.impl.ThriftScanner.scan(ThriftScanner.java:285)
... 71 more
accumulo.tablet.2:9997 is the domain name of the machine that runs one of my tablet servers. The configuration is fine because other functions work properly. The port is up too. Can someone tell me why am I getting that error? Any help would be appreciated.
To use filter properly you have to add them to the accumulo classpath, typically by deploying the .jar file where the iterator is defined on each node of your system in $ACCUMULO_HOME/lib or $ACCUMULO_HOME/lib/ext. For a deeper understanding of iterators I recommend the very good documentation of accumulo.
For an easy deployment I'd like to suggest the use of Jenkins, Puppet or Chef. If this is to much of an effort for your project a simple shell script will do as well. You may find the cluster shell cssh very helpfull for administration issues as well! Be aware that you do NOT need any restart of accumulo after the deployment in the ext folder, however it is necessary for the lib folder.
I got the issue. I was getting a ClassNotFound exception when I checked the tserver's logs. It would seem I need to add the class to Accumulo's classpath. But if I want to get these filtered results as part of an application rather than run it from the terminal, how would I go about doing it? It is possible that I would not be able to add the filter to Accumulo's classpath.

Freemarker StringTemplateLoader

I am trying to load some Freemarker templating from the DB using stringLoader and executing them through template.process, but here is the problem, freemarker stuff like <#if... is executing but when I try to execute assign JspTaglibs it breaks.
Here is a simple example:
From the DB I get <#assign bean=JspTaglibs["/WEB-INF/struts-bean.tld]>, which i put in a in StringTemplateLoader. I create configuration, template.. so far everything is working. When I do template.process(data, out), the page reports:
Starting output:FreeMarker template error: The following has evaluated to null or missing: ==> JspTaglibs [in template "temp" at line 1, column 15] Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)?? The failing instruction (FTL stack trace): ---------- ==> #assign bean = JspTaglibs["/WEB-INF/s... [in template "temp" at line 1, column 1] ---------- Java stack trace (for programmers): ---------- freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...] at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:98) at freemarker.core.DynamicKeyName._eval(DynamicKeyName.java:87) at freemarker.core.Expression.eval(Expression.java:111) at freemarker.core.Assignment.accept(Assignment.java:106) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Environment.process(Environment.java:243) at freemarker.template.Template.process(Template.java:277) at org.apache.jsp.test5_jsp._jspService(test5_jsp.java:109) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2440) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2429) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)
Scenario that I have is that I have some code stored in the database and I would like to execute it by freemarker during template.process().
Is that even possible, and if it is, what am I doing wrong?
The problem is that JspTaglibs is not a core FreeMarker feature, but something that the FreemarkerServlet puts into the data-model, and something that requires Servlet environment and a HTTP request (as JSP requires that). Out of the box, there's no way to separate this feature from the FreemarkerServlet. However, maybe you can extend it so that you can still use it for your purpose. Most of the magic happens inside createModel, where among others, it adds JspTaglibs to the data-model.
It might also useful to know that FreeMarker (and thus FreemarkerServlet) can load templates directly from the database, if you give it a such TemplateLoader implementation through the FreeMarker Configuration. If all you want is serving templates from the database instead of where Struts traditionally stores them, you just need to provide the proper TemplateLoader.

Axis 2 WebService : wrong number of arguments when invoking method

I'm trying to set up a webservice using axis2.
I've created a Dynamic Web Projet under Eclipse, using Apache Tomcat 7 and the dynamic web version 2.5. I've added the Axis 2 Facets to the configuration.
I have the following class :
package com.jo.ws;
public class Test {
public int add(int a, int b) {
return a + b;
}
}
I then created a WebService for the projet, using the Bottom up Java bean Web Service, and adding my Test class to the service implementation.
I chose the "Start Service" in the slider, and changed Apache Axis in the configuration to Axis 2. I then generated a default services.xml file using the default option.
I can access my projet on the web at the following adress :
http://localhost:8888/Axis2WS/
This displays the Axis 2 page, and I can see my service is active
http://localhost:8888/Axis2WS/services/listServices
The wsdl is correctly generated and displayed
I can post it if needed.
But now if I do this :
http://localhost:8888/Axis2WS/services/Test?method=add&a=2&b=1
I get this :
<soapenv:Reason xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Text xml:lang="en-US">wrong number of arguments</soapenv:Text>
</soapenv:Reason>
I also got the error in my Eclipse console log, with the following stack trace :
[ERROR] wrong number of arguments
java.lang.IllegalArgumentException: wrong number of arguments
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:178)
at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.ja va:117)
at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMe ssageReceiver.java:40)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114 )
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:144)
at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:139)
at org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServ let.java:837)
at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:273)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.jav a:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java: 607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Any idea what I'm doing wrong ?
Thanks for your help !
The error came from the url I was typing in the browser..
The right url to invoke the method is :
http://localhost:8888/Axis2WS/services/Test/add?a=3&b=2
You need to replace the "?" with a "/" before the name of the method, and then write your parameters after you've added a "?" after the name of your method

Spring Data Neo4J repository findAll() results in a nullpointerexception

I have made a simple Repository containing all the persons in my system, everything seems to work fine. I can add, remove and even retrieve single persons based on a given key and value but for some reason i can't retrieve all persons stored in the Repository directly. I tried do it by using the findAll() method, which should return an iterable. I then try to iterate with the iterable and store each person in an arraylist which i want the function to return.
public List<Person> getAllPersons() {
Iterable<Person> p = personRepository.findAll();
System.out.println("person count: " + personRepository.count());
List<Person> persons = new ArrayList<Person>();
for (Person person : p) {
System.out.println("person");
persons.add(person);
}
return persons;
}
The printline prints "3" so the repository is not empty but still i get a nullpointerexception in the error below.
apr 16, 2014 3:45:54 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [bmsapp] in context with path [/bmsapp] threw exception [Request processing failed; nested exception is org.neo4j.graphdb.TransactionFailureException: Failed to mark transaction as rollback only.] with root cause
java.lang.NullPointerException
at org.neo4j.kernel.TopLevelTransaction.markAsRollbackOnly(TopLevelTransaction.java:93)
at org.neo4j.kernel.TopLevelTransaction.failure(TopLevelTransaction.java:86)
at org.neo4j.cypher.internal.spi.v2_0.TransactionBoundExecutionContext.close(TransactionBoundExecutionContext.scala:58)
at org.neo4j.cypher.internal.compiler.v2_0.spi.DelegatingQueryContext.close(DelegatingQueryContext.scala:32)
at org.neo4j.cypher.internal.compiler.v2_0.spi.ExceptionTranslatingQueryContext.org$neo4j$cypher$internal$compiler$v2_0$spi$ExceptionTranslatingQueryContext$$super$close(ExceptionTranslatingQueryContext.scala:34)
at org.neo4j.cypher.internal.compiler.v2_0.spi.ExceptionTranslatingQueryContext$$anonfun$close$1.apply$mcV$sp(ExceptionTranslatingQueryContext.scala:34)
at org.neo4j.cypher.internal.compiler.v2_0.spi.ExceptionTranslatingQueryContext$$anonfun$close$1.apply(ExceptionTranslatingQueryContext.scala:34)
at org.neo4j.cypher.internal.compiler.v2_0.spi.ExceptionTranslatingQueryContext$$anonfun$close$1.apply(ExceptionTranslatingQueryContext.scala:34)
at org.neo4j.cypher.internal.compiler.v2_0.spi.ExceptionTranslatingQueryContext.org$neo4j$cypher$internal$compiler$v2_0$spi$ExceptionTranslatingQueryContext$$translateException(ExceptionTranslatingQueryContext.scala:149)
at org.neo4j.cypher.internal.compiler.v2_0.spi.ExceptionTranslatingQueryContext.close(ExceptionTranslatingQueryContext.scala:34)
at org.neo4j.cypher.internal.compiler.v2_0.ClosingIterator.failIfThrows(ClosingIterator.scala:94)
at org.neo4j.cypher.internal.compiler.v2_0.ClosingIterator.next(ClosingIterator.scala:45)
at org.neo4j.cypher.internal.compiler.v2_0.PipeExecutionResult.next(PipeExecutionResult.scala:168)
at org.neo4j.cypher.internal.compiler.v2_0.PipeExecutionResult.next(PipeExecutionResult.scala:34)
at scala.collection.Iterator$$anon$11.next(Iterator.scala:328)
at scala.collection.convert.Wrappers$IteratorWrapper.next(Wrappers.scala:30)
at org.neo4j.cypher.internal.compiler.v2_0.PipeExecutionResult$$anon$1.next(PipeExecutionResult.scala:76)
at org.neo4j.helpers.collection.IteratorWrapper.next(IteratorWrapper.java:47)
at org.neo4j.helpers.collection.IteratorWrapper.next(IteratorWrapper.java:47)
at bmsapp.repository.NeoPersonDao.getAllPersons(NeoPersonDao.java:33)
at bmsapp.service.SimplePersonManager.getPersons(SimplePersonManager.java:32)
at bmsapp.web.HelloController.HelloHandler(HelloController.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:175)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:446)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:434)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)
I already wasted hours in order to fix this but without any luck. Can anybody please help me out here?
Try mark your personRepository.findAll() as #Transactional.
If it still doesn't work, can you post your personRepository.findAll() method plz?
Thanks for the answers! I have managed to solve the problem by adding
"<tx:annotation-driven mode="proxy"/>
to my application context xml file. It's working perfectly now! However i'm still not sure what this statemant does and why i only need it for the findAll() method and not any of the other's i've used. (count(), findOne(), findBySchemaPropertyValue() etc)
I tried the mode="proxy" and it didn't work for me, this should only have an impact if you are using non-injected transactional methods to call each other (explanation here).
This 'TransactionFailureException' is probably related to the issue: https://jira.spring.io/browse/DATAGRAPH-531. If that's the case, you need to change
service.findAll()
to:
service.findAll().as(Collection.class)
... and the it should go away.

Categories

Resources