Highlighted

ADEP Data Services JEE 4.6 related Issue.

Avatar

Avatar

buntyk

Avatar

buntyk

buntyk

17-02-2012

Hello,

I tried to use build simple application in Flash Builder 4.6 with data model i.e. model driven development. I tried to follow the example of lcds data services but doesn't work for me.

I am able to generate the tables and able to generate form and display data in the datagrid without writing single line of code.

But when I try to insert data I get errror. And I am not able to go ahead since last few days.

Please help me.

Even if somebody can give me some detailed example for this...that would be helpful.

Thanks alot,

Replies

Highlighted

Avatar

Avatar

Rohit___Kumar

Employee

Avatar

Rohit___Kumar

Employee

Rohit___Kumar
Employee

17-02-2012

Hi Buntyk,

What error are you getting? As for the link: Check out the ADEP Data Services 4.6 documentation at: http://help.adobe.com/en_US/dataservicesjee/4.6/Modeling/index.html. Specificically refer to the various Model Driven Development sections.

Hope that helps,

Rohit

Highlighted

Avatar

Avatar

buntyk

Avatar

buntyk

buntyk

19-02-2012

Hello Rohit,

I read the link you have sent.

And I have gone through that again. But still I am getting some kind of

error...

"Error occurred completing a transaction

null"

I have mac and FB 4.6 installed on it. with Modeler plugin for 4.6 is also

installed.

I have installed ADEP Data Services JEE 4.6.

I have created tried to create the sample app MyDSApp using the

instructions in the link povided by you,

Developing Data Services forJava EE 4.6 Model-Driven Applications

There only thing I did change is I didn't have flex 4.5 sdk installed so I

used the default 4.6....rather than that everything is the same.

After I finished the app using the instructions I run it. It showed me the

product table's all the data.But when I tried to edit a cell in the

datagrid....I got message

*"Error occurred completing a transaction *

null"

So only thing is while updating I am getting error...

Please Let me know what is wrong.

Thank you,

Highlighted

Avatar

Avatar

buntyk

Avatar

buntyk

buntyk

19-02-2012

More over..

this is I found in the tomcat server log....

Data Services] Error notifying transaction before completion

handlers: org.hibernate.TransactionException: JDBC commit failed

at

org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:157)

at

flex.data.adapters.FlexHibernateSessionContext$SessionSynch.beforeCompletion(FlexHibernateSessionContext.java:139)

at

flex.data.DataServiceTransaction.notifyBeforeCompletion(DataServiceTransaction.java:2069)

at

flex.data.DataServiceTransaction.complete(DataServiceTransaction.java:1673)

at flex.data.DataService.serviceTransactedMessage(DataService.java:1028)

at flex.data.DataService.serviceMessage(DataService.java:528)

at flex.messaging.AsyncMessageBroker.in(AsyncMessageBroker.java:414)

at flex.messaging.MessageContext.doIn(MessageContext.java:295)

at flex.messaging.filters.AsyncMessageFilterChain.in

(AsyncMessageFilterChain.java:205)

at flex.messaging.MessageContext.doIn(MessageContext.java:295)

at

flex.messaging.AsyncMessageBroker$EndpointSplitter.in(AsyncMessageBroker.java:809)

at flex.messaging.MessageContext.doIn(MessageContext.java:295)

at flex.messaging.endpoints.BaseSocketServerEndpoint.in

(BaseSocketServerEndpoint.java:476)

at flex.messaging.MessageContext.doIn(MessageContext.java:295)

at

flex.messaging.endpoints.RTMPConnection.handleTCCommandIn(RTMPConnection.java:886)

at flex.messaging.endpoints.RTMPConnection.in(RTMPConnection.java:1032)

at

flex.messaging.endpoints.RTMPConnection.serviceTCMessage(RTMPConnection.java:1116)

at flex.messaging.endpoints.RTMPConnection.doRead(RTMPConnection.java:654)

at

flex.messaging.endpoints.RTMPProtocolHandler.doRead(RTMPProtocolHandler.java:124)

at

flex.messaging.socketserver.Connection$ConnectionReader.run(Connection.java:874)

at

java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:680)

Caused by: java.sql.SQLException: StandardXAConnectionHandle:commit:This

connection is part of a global transaction

at

org.enhydra.jdbc.standard.StandardXAConnectionHandle.commit(StandardXAConnectionHandle.java:129)

at

org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:166)

at

org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:142)

... 22 more

Error while completing transaction:

flex.data.DataServiceException: Error occurred completing a transaction

stacktrace=flex.data.DataServiceException: Error occurred completing a

transaction

at

flex.data.DataServiceTransaction.complete(DataServiceTransaction.java:1689)

at flex.data.DataService.serviceTransactedMessage(DataService.java:1028)

at flex.data.DataService.serviceMessage(DataService.java:528)

at flex.messaging.AsyncMessageBroker.in(AsyncMessageBroker.java:414)

at flex.messaging.MessageContext.doIn(MessageContext.java:295)

at flex.messaging.filters.AsyncMessageFilterChain.in

(AsyncMessageFilterChain.java:205)

at flex.messaging.MessageContext.doIn(MessageContext.java:295)

at

flex.messaging.AsyncMessageBroker$EndpointSplitter.in(AsyncMessageBroker.java:809)

at flex.messaging.MessageContext.doIn(MessageContext.java:295)

at flex.messaging.endpoints.BaseSocketServerEndpoint.in

(BaseSocketServerEndpoint.java:476)

at flex.messaging.MessageContext.doIn(MessageContext.java:295)

at

flex.messaging.endpoints.RTMPConnection.handleTCCommandIn(RTMPConnection.java:886)

at flex.messaging.endpoints.RTMPConnection.in(RTMPConnection.java:1032)

at

flex.messaging.endpoints.RTMPConnection.serviceTCMessage(RTMPConnection.java:1116)

at flex.messaging.endpoints.RTMPConnection.doRead(RTMPConnection.java:654)

at

flex.messaging.endpoints.RTMPProtocolHandler.doRead(RTMPProtocolHandler.java:124)

at

flex.messaging.socketserver.Connection$ConnectionReader.run(Connection.java:874)

at

java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:680)

Caused by: org.hibernate.TransactionException: JDBC commit failed

at

org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:157)

at

flex.data.adapters.FlexHibernateSessionContext$SessionSynch.beforeCompletion(FlexHibernateSessionContext.java:139)

at

flex.data.DataServiceTransaction.notifyBeforeCompletion(DataServiceTransaction.java:2069)

at

flex.data.DataServiceTransaction.complete(DataServiceTransaction.java:1673)

... 19 more

Caused by: java.sql.SQLException: StandardXAConnectionHandle:commit:This

connection is part of a global transaction

at

org.enhydra.jdbc.standard.StandardXAConnectionHandle.commit(StandardXAConnectionHandle.java:129)

at

org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:166)

at

org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:142)

... 22 more

Error invoking service 'data-service':

flex.data.DataServiceException: Error occurred completing a transaction

incomingMessage: Flex Message (flex.data.messages.DataMessageExt)

operation = transacted

id = null

clientId = 46CC4646-66D2-ED16-9DF7-9612C59D36F8

correlationId =

destination = MyDSApp.Product

messageId = D97330F0-08FD-2866-FD1F-9612C82F2A21

timestamp = 1329662712754

timeToLive = 0

body =

[

Flex Message (flex.data.messages.DataMessage)

operation = update

id = ASObject(1206661731){productid=1}

clientId = 46CC4646-66D2-ED16-9DF7-9612C59D36F8

correlationId = D97330F0-08FD-2866-FD1F-9612C82F2A21

destination = MyDSApp.Product

messageId = B97F910A-239C-E7B5-A7B5-9612DBAEAD61

timestamp = 1329662712766

timeToLive = 0

body =

[

[

price

],

[Proxy(inst=MyDSApp.package1.Product@20) proxyClass=class

flex.messaging.io.BeanProxy descriptor=[ excludes: null]],

MyDSApp.package1.Product@20

]

hdr(DSId) = 64813F88-6D96-4801-8435-C65442DF79C8

hdr(DSEndpoint) = my-rtmp

]

hdr(DSId) = 64813F88-6D96-4801-8435-C65442DF79C8

hdr(DSEndpoint) = my-rtmp

Exception: flex.data.DataServiceException: Error occurred completing a

transaction

at

flex.data.DataServiceTransaction.complete(DataServiceTransaction.java:1722)

at flex.data.DataService.serviceTransactedMessage(DataService.java:1028)

at flex.data.DataService.serviceMessage(DataService.java:528)

at flex.messaging.AsyncMessageBroker.in(AsyncMessageBroker.java:414)

at flex.messaging.MessageContext.doIn(MessageContext.java:295)

at flex.messaging.filters.AsyncMessageFilterChain.in

(AsyncMessageFilterChain.java:205)

at flex.messaging.MessageContext.doIn(MessageContext.java:295)

at

flex.messaging.AsyncMessageBroker$EndpointSplitter.in(AsyncMessageBroker.java:809)

at flex.messaging.MessageContext.doIn(MessageContext.java:295)

at flex.messaging.endpoints.BaseSocketServerEndpoint.in

(BaseSocketServerEndpoint.java:476)

at flex.messaging.MessageContext.doIn(MessageContext.java:295)

at

flex.messaging.endpoints.RTMPConnection.handleTCCommandIn(RTMPConnection.java:886)

at flex.messaging.endpoints.RTMPConnection.in(RTMPConnection.java:1032)

at

flex.messaging.endpoints.RTMPConnection.serviceTCMessage(RTMPConnection.java:1116)

at flex.messaging.endpoints.RTMPConnection.doRead(RTMPConnection.java:654)

at

flex.messaging.endpoints.RTMPProtocolHandler.doRead(RTMPProtocolHandler.java:124)

at

flex.messaging.socketserver.Connection$ConnectionReader.run(Connection.java:874)

at

java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:680)

Caused by: flex.data.DataServiceException: Error occurred completing a

transaction

at

flex.data.DataServiceTransaction.complete(DataServiceTransaction.java:1689)

... 19 more

Caused by: org.hibernate.TransactionException: JDBC commit failed

at

org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:157)

at

flex.data.adapters.FlexHibernateSessionContext$SessionSynch.beforeCompletion(FlexHibernateSessionContext.java:139)

at

flex.data.DataServiceTransaction.notifyBeforeCompletion(DataServiceTransaction.java:2069)

at

flex.data.DataServiceTransaction.complete(DataServiceTransaction.java:1673)

... 19 more

Caused by: java.sql.SQLException: StandardXAConnectionHandle:commit:This

connection is part of a global transaction

at

org.enhydra.jdbc.standard.StandardXAConnectionHandle.commit(StandardXAConnectionHandle.java:129)

at

org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:166)

at

org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:142)

... 22 more

Highlighted

Avatar

Avatar

Ashish_Vashisht

Avatar

Ashish_Vashisht

Ashish_Vashisht

19-02-2012

Hi

You need to set the following properties on your Fiber model, as appropriate for your app server:

  • hibernate.transaction.factory_class

  • hibernate.transaction.manager_lookup_class

Please see here: http://help.adobe.com/en_US/enterpriseplatform/10.0/AEPDeveloperGuide/WSa53bf8bf8189e60776c71f0d133f...

Regards,

Ashish Vashisht

Highlighted

Avatar

Avatar

buntyk

Avatar

buntyk

buntyk

19-02-2012

HI I checked but I am using Tomcat and on that page its written for JBOSS and also when I tried to put those values It gives error on model.

So probably not for Tomcat server.

What I created is just a basic app.

Here are the steps I did hundreds of times.

When I installed ADEP Data Services 4.6

It has built in tomcat server and sampledb

And on the link http://help.adobe.com/en_US/dataservicesjee/4.6/Modeling/WS4ba8596dc6a25eff-1bd28c95126af777a3e-8000...  is

" Create a simple model-driven application ".

I tried those steps to create the app. All steps as stated in the above link.

When I run the app it displays records in the datagrid. But then when I try to update any cell it gives error. As I have posted in my earlier messages.

So I am just stuck at starting point and not able to go ahead and try out more....

Please help.

Thanks,

Highlighted

Avatar

Avatar

Ashish_Vashisht

Avatar

Ashish_Vashisht

Ashish_Vashisht

20-02-2012

Hi

As mentioned on the page, you need to provide values for those properties as per your respective App Server. The exact App Server specific values can be found in the Hibernate documentation (also linked to on the page): http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/session-configuration.html#configurati...

Specifically for Tomcat, the below values should work:

<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>

<property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JOTMTransactionManagerLookup</property>

I will check to see that the sample documentation is updated to mention the same.

Thanks,

Ashish Vashisht

Highlighted

Avatar

Avatar

buntyk

Avatar

buntyk

buntyk

20-02-2012

HI Ashish,

I am able to figureout the problem.

Actually In the model

<annotation name="DMS" Table="PRODUCT" hibernate.connection.url="jdbc:hsqldb:hsql://localhost:9002/ordersDB" hibernate.connection.driver_class="org.hsqldb.jdbcDriver"/>

        <annotation name="RDS" introspectedColumns="PRODUCTID,DESCRIPTION,PRICE,PRODUCTNAME"/>

        <annotation name="ActionScriptGeneration" DisplayColumn="productname" Package="valueObjects" ImplicitServicePackage="services"/>

        <annotation name="service Group" service="Dummy,ProductService"/>

        <annotation name="FbEntityProperties" AssemblerClass="fiber.data.assemblers.FiberAssembler" contextRoot="/dataservices-samples" rootUrl="http://localhost:8400/dataservices-samples"/>

After putting these properties it worked ok.

Also The DMS was defined at model level but still I have to define DMS at the entity level for these above annotations...

Thanks for your help.

Highlighted

Avatar

Avatar

Rohit___Kumar

Employee

Avatar

Rohit___Kumar

Employee

Rohit___Kumar
Employee

22-02-2012

FYI, these properties get added when you actually introspect the entity and place it on the Model canvas.

Rohit