Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

custom component: porting from lc 8.0 to lc 8.2

Avatar

Former Community Member

hello

i developed a java pojo custom component for lc 8.0, essentially it connected to a db and returned a complex object. Now the environment has been upgraded to lc 8.2 . I've loaded my processes (which include my custom component) on the new environment. When i start the process , my component reaches the finally block where i've logged the db connections closing. Immediatly after the system crushes with the following error(i haven't added the whole stack trace because its huge): 

2009-04-10 13:11:21,422 WARN  [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] Adding multiple last resources is disallowed. Current resource is org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@2ac6fb1
2009-04-10 13:11:21,431 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public abstract com.adobe.pof.GenericObject com.adobe.pof.omapi.POFObjectManagerLocal.writeObject(com.adobe.pof.GenericObject,com.adobe.idp.Context) throws com.adobe.pof.POFException, causedBy:
org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 643401bb:6b45:49df1884:29cb status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 643401bb:6b45:49df1884:29cb status: ActionStatus.ABORT_ONLY >))
    at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
    at com.adobe.pof.ConnectionWrapper.getConnection(ConnectionWrapper.java:45)
    at com.adobe.pof.ConnectionWrapper.prepareStatement(ConnectionWrapper.java:179)
    at com.adobe.pof.adapter.JDBCAdapter.prepareStatement(JDBCAdapter.java:5299)

After that jboss get stucked, printing exceptions every 2 minutes, and i need to stop and restart it. I don't see anything wrong with my code: i get the datasource object, i get a coonettin from it, make my queries/updates and finally i close the connection.

googling i've found this might be due to datasource item being local-tx-datasource instead of xa-datasource, but all datasources are of this kind.

Any hint about this problem will be greatly appreciated

thank you in advance

Stefano

3 Replies

Avatar

Former Community Member

Stefano,

If you are using the JBoss-MySQL turnkey, I would try two things:

1) if you are using the 3.x version of the MySQL JDBC driver replace it with a 5.0.x version

2) take a look at the data source sample posted at http://blogs.adobe.com/livecycle/adobe-ds.xml

Steve

Avatar

Former Community Member

hi Steve

thank you for your answer. Unluckly i'm not using mysql but oracle 9i (or 10i i don't know since i'm just a poor programmer). Anyway i did a test : i've bypassed the datasource file , hardcoding the connection parameters in my custom component and it has got executed without problem, then process has crushed again on a query done by some adobe component. there are many adobe sql component instances to read/write from the same schema my compnent uses, so i suppose the problem is inside datasource configuration. There's a datasource sample for oracle too?

I cannot give much details, since the new system has been recently installed and i don't know all info (i think jboss is 4.2 but i'm not sure)

thanks again

regards

Stfano

Avatar

Former Community Member

Hi Stefano,

A sample Oracle data source file is shipped with LiveCyce ES. If you look at the root of the installation folder you should find

..\third_party\datasources\adobe-ds-jboss-oracle.xml

It is attached, also.

Steve