myBatisExtendedSessionFactory.initFromProcessEngineConfiguration(processEngineConfiguration, "/mappings.xml");
Hi Tamas,
I attached related files as "Src.zip".
Please let me know if you need more info!
júl. 07, 2015 3:51:46 DU org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1 call
WARNING: Exception encountered during export of archive
org.jboss.shrinkwrap.api.exporter.ArchiveExportException: Failed to write asset to output: /junit/extensions/TestDecorator.class
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$3.handle(StreamExporterDelegateBase.java:272)
at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:219)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.processNode(StreamExporterDelegateBase.java:233)
at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:105)
at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:109)
at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:109)
at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.doExport(AbstractExporterDelegate.java:95)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.access$001(StreamExporterDelegateBase.java:50)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:121)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:116)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:124)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:118)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Pipe closed
at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:261)
at java.io.PipedInputStream.receive(PipedInputStream.java:227)
at java.io.PipedOutputStream.write(PipedOutputStream.java:149)
at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:253)
at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:238)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate.closeEntry(JdkZipExporterDelegate.java:84)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate.closeEntry(JdkZipExporterDelegate.java:40)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:265)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:233)
at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:217)
... 14 more
júl. 07, 2015 3:51:46 DU org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1 call
WARNING: [SHRINKWRAP-120] Possible deadlock scenario: Got exception on closing the ZIP out stream: Pipe closed
java.io.IOException: Pipe closed
at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:261)
at java.io.PipedInputStream.receive(PipedInputStream.java:202)
at java.io.PipedOutputStream.write(PipedOutputStream.java:122)
at java.util.zip.ZipOutputStream.writeInt(ZipOutputStream.java:590)
at java.util.zip.ZipOutputStream.writeEXT(ZipOutputStream.java:427)
at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:262)
at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:343)
at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:238)
at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:360)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:148)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:118)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
júl. 07, 2015 3:51:50 DU org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1 call
WARNING: Exception encountered during export of archive
org.jboss.shrinkwrap.api.exporter.ArchiveExportException: Failed to write asset to output: /WEB-INF/lib/camunda-ejb-client-7.1.0-Final.jar
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$3.handle(StreamExporterDelegateBase.java:272)
at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:219)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.processNode(StreamExporterDelegateBase.java:233)
at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:105)
at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:109)
at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:109)
at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.doExport(AbstractExporterDelegate.java:95)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.access$001(StreamExporterDelegateBase.java:50)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:121)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:116)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:124)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:118)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Pipe closed
at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:261)
at java.io.PipedInputStream.receive(PipedInputStream.java:227)
at java.io.PipedOutputStream.write(PipedOutputStream.java:149)
at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:253)
at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:238)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate.closeEntry(JdkZipExporterDelegate.java:84)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate.closeEntry(JdkZipExporterDelegate.java:40)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:265)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:233)
at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:217)
... 14 more
júl. 07, 2015 3:51:50 DU org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1 call
WARNING: [SHRINKWRAP-120] Possible deadlock scenario: Got exception on closing the ZIP out stream: Pipe closed
java.io.IOException: Pipe closed
at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:261)
at java.io.PipedInputStream.receive(PipedInputStream.java:227)
at java.io.PipedOutputStream.write(PipedOutputStream.java:149)
at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:253)
at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:238)
at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:343)
at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:238)
at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:360)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:148)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:118)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
return (List<TaskDTO>) commandContext.getDbSqlSession().selectList("selectTasksForRegion", region, 0, 100);
return (List<TaskDTO>) commandContext.getDbSqlSession().selectList("selectTasksForRegion", region);
return (List<TaskDTO>) commandContext.getDbEntityManager().selectList("selectTasksForRegion", region, 0, 100);
Hi Masha,
There is a convention for the names of update and insert statements. The logic that determines the names is implemented in DbSqlSessionFactory [1] where the parameter “prefix” is either “update” or “insert”. That means, an insert of an instance of CarEntity becomes “insertCar”. An insert of an instance of FlightPlan becomes “insertFlig”. Please don’t ask me why someone thought performing String magic was a good idea ;)
Cheers,
Thorben
Von: Himasha Guruge [mailto:mash...@gmail.com]
Gesendet: Montag, 22. Februar 2016 12:47
An: Thorben Lindhauer <thorben....@camunda.com>
Betreff: Re: custom data in default database
Hi Tom,
I came across this method, for delete queries where we can pass the delete id of mappings file.
getDbEntityManager().delete(CommentEntity.class, "deleteCommentsByTaskId", taskId);
Apprecitate if you could tell how to go ahead with insert and updates to bind the update and insert ids of mapping files.
Thanks,
Masha
On Mon, Feb 22, 2016 at 5:08 PM, Himasha Guruge <mash...@gmail.com> wrote:
Hi Tom,
Thanks for the clarification, just one more doubt. I went through the engine samples and got an idea on how to create an Entity with the relevant method. But how are we going to map insert id name with dbEntityManager.insert() / delete() ? Because for select queries we were able to pass the select id name "selectTasksForRegion" like below.
return (List<TaskDTO>) commandContext.getDbEntityManager().selectList("selectTasksForRegion", region, 0, 100);
How are we going to do that for insert/delete ? For update however as I understood we need to first select the entity and then update attributes separately ,as u mentioned with getPersistentState.
Thanks,
Masha
Hi,
First, the code builds the String „insertPropertyEntity” based on the prefix and the class name (which is PropertyEntity). Then it removes the last six characters. That results in “insertProperty”.
Cheers,
Thorben
Von: Himasha Guruge [mailto:mash...@gmail.com]
Gesendet: Montag, 22. Februar 2016 13:45
An: Thorben Lindhauer <thorben....@camunda.com>
Betreff: Re: custom data in default database
Hi Tom,
As far as I understand, what you mean is that if we call getDbEntity.insert(propertyEntity);
It will auto detect the relevant statement from the mappings file ? whereas in this case it would look for 'insertPro' ?
<insert id="insertProperty" parameterType="org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity">
insert into ${prefix}ACT_GE_PROPERTY (
Thanks,
Masha