Skip to main content

PersistenceRA usage

9 replies [Last post]
mlaporta
Offline
Joined: 2007-04-02

Hi All,
I've just checkout, modify the configuration (persistence-ds.xml,persistence.xml) to run with hsqldb,build and deploy the PersistenceRA.
Mobicents management-console show this:

Name=PersistenceResourceAdaptor
ID=ResourceAdaptorID[PersistenceResourceAdaptor#org.mobicents#0.1]
Vendor=org.mobicents
Version=0.1
Resource adaptor entities
PersistenceRA ACTIVE

Here the logs during deploy phase of RA:

2007-05-16 14:29:19,546 INFO [ResourceAdaptorMBeanImpl] - Creating Resource Adaptor Entity. RA ID: ResourceAdaptorID[PersistenceResourceAdaptor#org.mobicents#0.1], name: PersistenceRA, Properties: null
2007-05-16 14:29:20,218 INFO [SleeContainer] - PROPERTIES: null
2007-05-16 14:29:20,250 INFO [ResourceAdaptorMBeanImpl] - Activating Resource Adaptor Entity. RA name: PersistenceRA
2007-05-16 14:29:20,250 INFO [PersistenceResourceAdaptor] - [@@@][1]
2007-05-16 14:29:20,250 INFO [PersistenceResourceAdaptor] - [@@@][2]
2007-05-16 14:29:20,250 INFO [PersistenceResourceAdaptor] - [@@@][3]
2007-05-16 14:29:20,250 INFO [PersistenceResourceAdaptor] - [@@@][4]
2007-05-16 14:29:20,250 INFO [PersistenceResourceAdaptor] - [@@@][5]
2007-05-16 14:29:20,250 INFO [PersistenceResourceAdaptor] - [@@@][6]
2007-05-16 14:29:20,250 INFO [PersistenceResourceAdaptor] - [@@@][7]
2007-05-16 14:29:20,265 INFO [PersistenceResourceAdaptor] - [@@@][8]
2007-05-16 14:29:20,265 INFO [PersistenceResourceAdaptor] - [@@@][9]
2007-05-16 14:29:20,265 INFO [PersistenceResourceAdaptor] - [@@@][10]
2007-05-16 14:29:20,265 INFO [PersistenceResourceAdaptor] - [@@@][11]
2007-05-16 14:29:20,265 INFO [PersistenceResourceAdaptor] - [@@@][12]
2007-05-16 14:29:20,437 WARN [ResourceAdaptorEntity] - Failed setting up Naming
Context
javax.persistence.PersistenceException: No Persistence provider for EntityManage
r named persistence-ra-unit
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.
java:55)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.
java:33)
at org.mobicents.slee.resource.persistence.ra.PersistenceResourceAdaptor
.getSBBResourceAdaptorInterface(Unknown Source)
at org.mobicents.slee.resource.ResourceAdaptorEntity.setupNamingContext(
ResourceAdaptorEntity.java:104)
at org.mobicents.slee.resource.ResourceAdaptorEntity.activate(ResourceAd
aptorEntity.java:176)
at org.mobicents.slee.container.SleeContainer.activateResourceAdaptorEnt
ity(SleeContainer.java:852)
at org.mobicents.slee.container.management.jmx.ResourceAdaptorMBeanImpl.
activateResourceAdaptorEntity(ResourceAdaptorMBeanImpl.java:144)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
java:74)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:76)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:68)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:96)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:213)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:484)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerA
daptorService.java:273)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
java:74)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:76)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:68)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:96)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:213)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:484)
at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFac
tory.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
java:74)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:76)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:68)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:96)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:213)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:484)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:
374)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
66)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
.java:707)
at java.lang.Thread.run(Thread.java:595)
2007-05-16 14:29:20,531 INFO [ResourceAdaptorMBeanImpl] - Creating RA Entity Li
nk. RA name: PersistenceRA, Link: PersistenceRA

Is the following line a really WARN level log or something goes wrong?

2007-05-16 14:29:20,437 WARN [ResourceAdaptorEntity] - Failed setting up Naming
Context
javax.persistence.PersistenceException: No Persistence provider for EntityManage
r named persistence-ra-unit.

I cannot find org.hibernate.ejb.HibernatePersistence on persistence.xml is that missed?

I create a sample persistence-sbb to understand how persistenceRA works here my configuration:

sbb-jar.xml

<?xml version="1.0"?>

example demostrate sbb connected to a persistence resource adaptor
PersistenceSbb
com.urmet
1.0
PersistenceSbb

com.urmet.persistence.PersistenceSbb

StartServiceEvent

javax.slee.serviceactivity.ServiceStartedEvent
javax.slee
1.0

ActivityEndEvent

javax.slee.ActivityEndEvent
javax.slee
1.0

PersistenceEvent

org.mobicents.fake.Event
mobicents
1.0

PersistenceAdaptorType
org.mobicents
0.1

slee/resource/PersistenceRA/persistenceacif

slee/resource/persistence/0.1/provider
PersistenceRA

PersistenceSbb.java


package com.urmet.persistence;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.slee.ActivityContextInterface;
import javax.slee.ActivityEndEvent;
import javax.slee.CreateException;
import javax.slee.RolledBackContext;
import javax.slee.SbbContext;
import javax.slee.serviceactivity.ServiceActivity;
import javax.slee.serviceactivity.ServiceActivityFactory;
import javax.slee.serviceactivity.ServiceStartedEvent;
import javax.sql.DataSource;

import org.apache.log4j.Logger;
import org.mobicents.slee.resource.persistence.ra.PersistenceActivityContextInterfaceFactory;
import org.mobicents.slee.resource.persistence.ra.SbbEntityManager;

/**
*
* @author Michele La Porta
*/
public abstract class PersistenceSbb implements javax.slee.Sbb {

private Logger logger = Logger.getLogger(PersistenceSbb.class);
private SbbContext sbbContext;

private PersistenceActivityContextInterfaceFactory persistenceActivityContextInterfaceFactory;
private SbbEntityManager sbbEntityManager;
private DataSource dataSource;

private static final String JNDI = "java:comp/env";
private static final String JNDI_DATASOURCE = "java:/persistence-ra";
private static final String JNDI_PERSISTENCE_ACI_FACTORY = "slee/resource/PersistenceRA/persistenceacif";
private static final String JNDI_PERSISTENCE_PROVIDER = "slee/resource/persistence/0.1/provider";
private static final String JNDI_SERVICE_ACTIVITY_FACTORY = "slee/serviceactivity/factory";

public PersistenceSbb() {
}

public void setSbbContext(SbbContext sbbContext) {
this.sbbContext = sbbContext;
try {
Context myEnv = (Context) new InitialContext().lookup(JNDI);
persistenceActivityContextInterfaceFactory = (PersistenceActivityContextInterfaceFactory)myEnv.lookup(JNDI_PERSISTENCE_ACI_FACTORY);
logger.info("setSbbContext persistenceActivityContextInterfaceFactory : " + persistenceActivityContextInterfaceFactory);

dataSource = (DataSource)new InitialContext().lookup(JNDI_DATASOURCE);
logger.info("setSbbContext dataSource: " + dataSource);

} catch (NamingException ne) {
logger.error("Could not set SBB context:" + ne.getMessage());
}
}

public void onStartServiceEvent(ServiceStartedEvent event, ActivityContextInterface aci) {
try {
Context myEnv = (Context) new InitialContext().lookup(JNDI);
ServiceActivity sa = ((ServiceActivityFactory) myEnv.lookup(JNDI_SERVICE_ACTIVITY_FACTORY)).getActivity();

//check if it's my service that is starting
if (sa.equals(aci.getActivity())) {
logger.debug("onStartServiceEvent event : " + event);
logger.debug("onStartServiceEvent aci : " + aci);
}
} catch (NamingException e) {
logger.error("Error onStartServiceEvent:" + e.getMessage());
e.printStackTrace();
}
}

public void onActivityEndEvent(ActivityEndEvent event, ActivityContextInterface aci) {
try {
Context myEnv = (Context) new InitialContext().lookup(JNDI);
//check if it's my service aci that is ending
ServiceActivity sa = ((ServiceActivityFactory) myEnv.lookup(JNDI_SERVICE_ACTIVITY_FACTORY)).getActivity();
if (sa.equals(aci.getActivity())) {
logger.debug("onActivityEndEvent event : " + event);
logger.debug("onActivityEndEvent aci : " + aci);
}
} catch (NamingException e) {
logger.error("Errpr onActivityEndEvent:" + e.getMessage());
e.printStackTrace();
}
}

public void onPersistenceEvent(Object event, ActivityContextInterface aci) {
logger.info("onPersistenceEvent call :" + event);
}

/**
* Convenience method to retrieve the SbbContext object stored in setSbbContext.
* @return this SBB's SbbContext object
*/
protected SbbContext getSbbContext() {
return this.sbbContext;
}

public void unsetSbbContext() {
this.sbbContext = null;
}

public void sbbCreate() throws CreateException {
}

public void sbbPostCreate() throws CreateException {
}

public void sbbActivate() {
}

public void sbbPassivate() {
}

public void sbbLoad() {
}

public void sbbStore() {
}

public void sbbRemove() {
}

public void sbbExceptionThrown(Exception exception, Object object, ActivityContextInterface activityContextInterface) {
}

public void sbbRolledBack(RolledBackContext rolledBackContext) {
}
}

Service is correctly deploy but how I can interact with persistenceRA?
Any advice or tips?
Is there any sample show persistenceRA usage?

Thanks

Michele

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mlaporta
Offline
Joined: 2007-04-02

Fresh checkout of mobicents source
I got

D:\workspace.jslee3\mobicents\ra\persistencera\ant-common-ra.xml:339: javax.nami
ng.CommunicationException [Root exception is java.rmi.RemoteException: Service u
navailable.]

ant-common-ra.xml build is missing jnpHost (needed when run jboss with -b options)
on line 339
on line 342
on line 345

Jboss console logs:
[i]
10:47:01,500 INFO [DeploymentMBeanImpl] First time deploying file:/D:/workspace
.jslee3/mobicents/ra/persistencera/ratype/jars/persistence-ratype-DU.jar
10:47:01,531 INFO [DeploymentMBeanImpl] Deploying file:/D:/workspace.jslee3/mob
icents/ra/persistencera/ratype/jars/persistence-ratype-DU.jar
10:47:01,531 INFO [DeploymentManager] Deploying from D:\jars\jboss-3.2.8.SP1\se
rver\all\tmp\deploy\tmpDUJars63835-contents\persistence-ratype-DU.jar
10:47:02,453 INFO [AbstractComponentDeployer] Deploying and installing D:\jars\
jboss-3.2.8.SP1\server\all\tmp\deploy\tmpDUJars63835-contents\persistence-events
.jar
10:47:02,453 INFO [AbstractComponentDeployer] ClassPathDirectory D:\jars\jboss-
3.2.8.SP1\server\all\tmp\deploy\tmpDUJarsUnpackaged63836-contents
10:47:02,500 INFO [SleeContainer] Installing org.mobicents.slee.container.manag
ement.EventTypeDescriptorImpl@1021e58
10:47:02,500 INFO [SleeContainer] Installing event Type:EventTypeID[org.mobicen
ts.fake.Event#mobicents#1.0], #13 descriptor org.mobicents.slee.container.manage
ment.EventTypeDescriptorImpl@1021e58
10:47:02,500 INFO [SleeContainer] Added Event org.mobicents.fake.Event#mobicent
s#1.0to the Container
10:47:02,500 INFO [AbstractComponentDeployer] Deploying and installing D:\jars\
jboss-3.2.8.SP1\server\all\tmp\deploy\tmpDUJars63835-contents\persistence-ratype
.jar
10:47:02,500 INFO [AbstractComponentDeployer] ClassPathDirectory D:\jars\jboss-
3.2.8.SP1\server\all\tmp\deploy\tmpDUJarsUnpackaged63836-contents
10:47:02,500 INFO [SleeContainer] Installing org.mobicents.slee.resource.Resour
ceAdaptorTypeDescriptorImpl@163769
10:47:02,500 INFO [SleeContainer] installing duid DeployableUnitID[0]
10:47:02,531 INFO [SleeContainer] descriptor = url = file:/D:/workspace.jslee3/
mobicents/ra/persistencera/ratype/jars/persistence-ratype-DU.jar
Date = Fri May 25 10:47:02 CEST 2007
deployableUnitID = DeployableUnitID[0]
description = null
components =
EventTypeID[org.mobicents.fake.Event#mobicents#1.0], #13
ResourceAdaptorTypeID[PersistenceAdaptorType#org.mobicents#0.1]
jars =
persistence-ratype.jar
persistence-events.jar
10:47:02,531 INFO [SleeContainer] VIRGIN INSTALLATION[EventTypeID[org.mobicents
.fake.Event#mobicents#1.0], #13] BY[file:/D:/workspace.jslee3/mobicents/ra/persi
stencera/ratype/jars/persistence-ratype-DU.jar]
10:47:02,562 INFO [SleeContainer] ADDIGN DEPS[EventTypeID[org.mobicents.fake.Ev
ent#mobicents#1.0], #13] TO[file:/D:/workspace.jslee3/mobicents/ra/persistencera
/ratype/jars/persistence-ratype-DU.jar]
10:47:02,578 INFO [SleeContainer] VIRGIN INSTALLATION[ResourceAdaptorTypeID[Per
sistenceAdaptorType#org.mobicents#0.1]] BY[file:/D:/workspace.jslee3/mobicents/r
a/persistencera/ratype/jars/persistence-ratype-DU.jar]
10:47:02,609 INFO [SleeContainer] ADDIGN DEPS[ResourceAdaptorTypeID[Persistence
AdaptorType#org.mobicents#0.1]] TO[file:/D:/workspace.jslee3/mobicents/ra/persis
tencera/ratype/jars/persistence-ratype-DU.jar]
10:47:02,625 INFO [DeploymentManager] Installation of deployable unit successfu
l
10:47:02,640 INFO [DeploymentMBeanImpl] Deployable unit deployed DeployableUnit
ID[0]
10:47:02,843 INFO [DeploymentMBeanImpl] First time deploying file:/D:/workspace
.jslee3/mobicents/ra/persistencera/ra/jars/persistence-ra-DU.jar
10:47:02,859 INFO [DeploymentMBeanImpl] Deploying file:/D:/workspace.jslee3/mob
icents/ra/persistencera/ra/jars/persistence-ra-DU.jar
10:47:02,953 INFO [DeploymentManager] Deploying from D:\jars\jboss-3.2.8.SP1\se
rver\all\tmp\deploy\tmpDUJars63837-contents\persistence-ra-DU.jar
10:47:28,359 INFO [AbstractComponentDeployer] Deploying and installing D:\jars\
jboss-3.2.8.SP1\server\all\tmp\deploy\tmpDUJars63837-contents\persistence-ra.jar

10:47:28,359 INFO [AbstractComponentDeployer] ClassPathDirectory D:\jars\jboss-
3.2.8.SP1\server\all\tmp\deploy\tmpDUJarsUnpackaged63838-contents
10:47:28,625 INFO [SleeContainer] Installing org.mobicents.slee.resource.Resour
ceAdaptorDescriptorImpl@9b04ac
10:47:29,109 INFO [SleeContainer] Inserting RA id: ResourceAdaptorID[Persistenc
eResourceAdaptor#org.mobicents#0.1] RA: org.mobicents.slee.resource.ResourceAdap
torType@1b829c7
10:47:29,109 INFO [SleeContainer] installing duid DeployableUnitID[1]
10:47:29,109 INFO [SleeContainer] descriptor = url = file:/D:/workspace.jslee3/
mobicents/ra/persistencera/ra/jars/persistence-ra-DU.jar
Date = Fri May 25 10:47:02 CEST 2007
deployableUnitID = DeployableUnitID[1]
description = null
components =
ResourceAdaptorID[PersistenceResourceAdaptor#org.mobicents#0.1]
jars =
persistence-ra.jar
10:47:29,109 INFO [SleeContainer] VIRGIN INSTALLATION[ResourceAdaptorID[Persist
enceResourceAdaptor#org.mobicents#0.1]] BY[file:/D:/workspace.jslee3/mobicents/r
a/persistencera/ra/jars/persistence-ra-DU.jar]
10:47:29,109 INFO [SleeContainer] ADDIGN DEPS[ResourceAdaptorID[PersistenceReso
urceAdaptor#org.mobicents#0.1]] TO[file:/D:/workspace.jslee3/mobicents/ra/persis
tencera/ra/jars/persistence-ra-DU.jar]
10:47:29,109 INFO [DeploymentManager] Installation of deployable unit successfu
l
10:47:29,109 INFO [DeploymentMBeanImpl] Deployable unit deployed DeployableUnit
ID[1]
10:47:29,250 INFO [ResourceAdaptorMBeanImpl] Creating Resource Adaptor Entity.
RA ID: ResourceAdaptorID[PersistenceResourceAdaptor#org.mobicents#0.1], name: Pe
rsistenceRA, Properties: null
10:47:29,734 INFO [SleeContainer] PROPERTIES: null
10:47:29,734 INFO [ResourceAdaptorMBeanImpl] Activating Resource Adaptor Entity
. RA name: PersistenceRA
10:47:29,734 INFO [PersistenceResourceAdaptor] [@@@][1]
10:47:29,734 INFO [PersistenceResourceAdaptor] [@@@][2]
10:47:29,734 INFO [PersistenceResourceAdaptor] [@@@][3]
10:47:29,734 INFO [PersistenceResourceAdaptor] [@@@][4]
10:47:29,734 INFO [PersistenceResourceAdaptor] [@@@][5]
10:47:29,734 INFO [PersistenceResourceAdaptor] [@@@][6]
10:47:29,734 INFO [PersistenceResourceAdaptor] [@@@][7]
10:47:29,765 INFO [PersistenceResourceAdaptor] [@@@][8]
10:47:29,765 INFO [PersistenceResourceAdaptor] [@@@][9]
10:47:29,765 INFO [PersistenceResourceAdaptor] [@@@][10]
10:47:29,765 INFO [PersistenceResourceAdaptor] [@@@][11]
10:47:29,765 INFO [PersistenceResourceAdaptor] [@@@][12]
10:47:30,062 INFO [Version] Hibernate EntityManager 3.2.1.GA
10:47:30,218 INFO [Version] Hibernate Annotations 3.2.1.GA
10:47:30,281 INFO [Environment] Hibernate 3.2.2
10:47:30,453 INFO [Environment] hibernate.properties not found
10:47:30,468 INFO [Environment] Bytecode provider name : cglib
10:47:30,484 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
10:47:46,031 INFO [AnnotationBinder] Binding entity from annotated class: org.m
obicents.persistencera.test.Test
10:47:46,140 INFO [EntityBinder] Bind entity org.mobicents.persistencera.test.T
est on table test
10:47:46,703 INFO [NamingHelper] JNDI InitialContext properties:{}
10:47:46,703 INFO [DatasourceConnectionProvider] Using datasource: java:/persis
tence-ra
10:48:08,437 INFO [SettingsFactory] RDBMS: Apache Derby, version: 10.2.1.6 - (4
52058)
10:48:08,609 INFO [SettingsFactory] JDBC driver: Apache Derby Network Client JD
BC Driver, version: 10.2.1.6 - (452058)
10:48:14,421 INFO [Dialect] Using dialect: org.hibernate.dialect.DerbyDialect
10:48:14,484 INFO [TransactionFactoryFactory] Transaction strategy: org.hiberna
te.ejb.transaction.JoinableCMTTransactionFactory
10:48:14,515 INFO [TransactionManagerLookupFactory] instantiating TransactionMa
nagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
10:48:14,562 INFO [TransactionManagerLookupFactory] instantiated TransactionMan
agerLookup
10:48:14,593 INFO [SettingsFactory] Automatic flush during beforeCompletion():
disabled
10:48:14,625 INFO [SettingsFactory] Automatic session close at end of transacti
on: disabled
10:48:14,671 INFO [SettingsFactory] Scrollable result sets: enabled
10:48:14,687 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
10:48:14,703 INFO [SettingsFactory] Connection release mode: auto
10:48:14,765 INFO [SettingsFactory] Default batch fetch size: 1
10:48:14,812 INFO [SettingsFactory] Generate SQL with comments: disabled
10:48:14,828 INFO [SettingsFactory] Order SQL updates by primary key: disabled
10:48:14,843 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.AST
QueryTranslatorFactory
10:48:14,890 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
10:48:14,906 INFO [SettingsFactory] Query language substitutions: {}
10:48:14,921 INFO [SettingsFactory] JPA-QL strict compliance: enabled
10:48:14,937 INFO [SettingsFactory] Second-level cache: enabled
10:48:14,953 INFO [SettingsFactory] Query cache: disabled
10:48:14,984 INFO [SettingsFactory] Cache provider: org.hibernate.cache.NoCache
Provider
10:48:15,015 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
10:48:15,031 INFO [SettingsFactory] Structured second-level cache entries: disa
bled
10:48:15,078 INFO [SettingsFactory] Echoing all SQL to stdout
10:48:15,093 INFO [SettingsFactory] Statistics: disabled
10:48:15,125 INFO [SettingsFactory] Deleted entity synthetic identifier rollbac
k: disabled
10:48:15,156 INFO [SettingsFactory] Default entity-mode: pojo
10:48:15,171 INFO [SettingsFactory] Named query checking : enabled
10:48:15,453 INFO [SessionFactoryImpl] building session factory
10:48:16,953 INFO [ResourceAdaptorMBeanImpl] Creating RA Entity Link. RA name:
PersistenceRA, Link: PersistenceRA
[/i]

From logs PersistenceRA seems in Creation but from CLI side I see

[i]
deploy:
[echo] Deploying PersistenceRA.
[slee-management] 25-mag-2007 10.47.02 org.mobicents.ant.tasks.InstallTask run
[slee-management] INFO: DeployableUnitID[0]
[slee-management] 25-mag-2007 10.47.29 org.mobicents.ant.tasks.InstallTask run
[slee-management] INFO: DeployableUnitID[1]
[slee-management] 25-mag-2007 10.47.29 org.mobicents.slee.container.management.j
mx.SleeCommandInterface invokeOperation
[slee-management] INFO: Loading properties: null
[slee-management] 25-mag-2007 10.47.29 org.mobicents.ant.tasks.CreateRaEntityTas
k run
[slee-management] INFO: No response
[slee-management] 25-mag-2007 10.48.16 org.mobicents.ant.tasks.ActivateRaEntityT
ask run
[slee-management] AVVERTENZA: Bad result: slee:name=ResourceAdaptorMBean.activat
eResourceAdaptorEntity
[slee-management] java.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setIn
terceptDuringConstruction(Z)V
[slee-management] 25-mag-2007 10.48.17 org.mobicents.ant.tasks.CreateRaLinkTask
run
[slee-management] INFO: No response

BUILD SUCCESSFUL
Total time: 1 minute 47 seconds
D:\workspace.jslee3\mobicents\ra\persistencera>
[/i]

I try from mobicents-console shows INACTIVE state when try to activate I see:

[i]
10:49:57,671 INFO [ResourceManagementMBeanImpl] Activating Resource Adaptor Ent
ity. RA name: PersistenceRA
10:49:57,671 INFO [PersistenceResourceAdaptor] [@@@][1]
10:49:57,671 INFO [PersistenceResourceAdaptor] [@@@][2]
10:49:57,671 INFO [PersistenceResourceAdaptor] [@@@][3]
10:49:57,671 INFO [PersistenceResourceAdaptor] [@@@][4]
10:49:57,671 INFO [PersistenceResourceAdaptor] [@@@][5]
10:49:57,671 INFO [PersistenceResourceAdaptor] [@@@][6]
10:49:57,671 INFO [PersistenceResourceAdaptor] [@@@][7]
10:49:57,671 INFO [PersistenceResourceAdaptor] [@@@][8]
10:49:57,671 INFO [PersistenceResourceAdaptor] [@@@][9]
10:49:57,671 INFO [PersistenceResourceAdaptor] [@@@][10]
10:49:57,671 INFO [PersistenceResourceAdaptor] [@@@][11]
10:49:57,671 WARN [SleeContainer] registerWithJndi failed for java:slee/resourc
es/PersistenceRA/persistenceacif
java.lang.ClassCastException: org.mobicents.slee.resource.persistence.ra.Persist
enceActivityContextInterfaceFactoryImp
at org.jboss.naming.Util.createSubcontext(Util.java:68)
at org.jboss.naming.Util.createSubcontext(Util.java:51)
at org.mobicents.slee.container.SleeContainer.registerWithJndi(SleeConta
iner.java:1030)
at org.mobicents.slee.resource.persistence.ra.PersistenceResourceAdaptor
.initializeNamingContext(Unknown Source)
at org.mobicents.slee.resource.persistence.ra.PersistenceResourceAdaptor
.start(Unknown Source)
at org.mobicents.slee.resource.persistence.ra.PersistenceResourceAdaptor
.entityActivated(Unknown Source)
at org.mobicents.slee.resource.ResourceAdaptorEntity.activate(ResourceAd
aptorEntity.java:185)
at org.mobicents.slee.container.SleeContainer.activateResourceAdaptorEnt
ity(SleeContainer.java:857)
at org.mobicents.slee.container.management.jmx.ResourceManagementMBeanIm
pl.activateResourceAdaptorEntity(ResourceManagementMBeanImpl.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
java:74)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:76)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:68)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:96)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:213)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:484)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerA
daptorService.java:273)
at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
java:74)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:76)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:68)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:96)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:213)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:484)
at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFac
tory.java:179)
at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
java:74)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:76)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:68)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:96)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:213)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:484)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:111)

at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerIntercepto
r.java:193)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.jav
a:179)
at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientIntercepto
r.invoke(InvokerAdaptorClientInterceptor.java:75)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:7
0)
at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodIntercepto
r.java:70)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
at $Proxy27.invoke(Unknown Source)
at org.mobicents.slee.container.management.console.server.mbeans.Resourc
eManagementMBeanUtils.activateResourceAdaptorEntity(Unknown Source)
at org.mobicents.slee.container.management.console.server.resources.Reso
urceServiceImpl.activateResourceAdaptorEntity(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(Remot
eServiceServlet.java:262)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServ
iceServlet.java:146)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
lter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrinc
ipalValve.java:81)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:102)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
yAssociationValve.java:177)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
0)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:684)
at java.lang.Thread.run(Thread.java:595)
10:49:57,703 INFO [PersistenceResourceAdaptor] [@@@][12]
10:50:13,421 INFO [AnnotationBinder] Binding entity from annotated class: org.m
obicents.persistencera.test.Test
10:50:13,421 INFO [EntityBinder] Bind entity org.mobicents.persistencera.test.T
est on table test
10:50:13,437 INFO [NamingHelper] JNDI InitialContext properties:{}
10:50:13,437 INFO [DatasourceConnectionProvider] Using datasource: java:/persis
tence-ra
10:50:13,437 INFO [SettingsFactory] RDBMS: Apache Derby, version: 10.2.1.6 - (4
52058)
10:50:13,437 INFO [SettingsFactory] JDBC driver: Apache Derby Network Client JD
BC Driver, version: 10.2.1.6 - (452058)
10:50:13,437 INFO [Dialect] Using dialect: org.hibernate.dialect.DerbyDialect
10:50:13,437 INFO [TransactionFactoryFactory] Transaction strategy: org.hiberna
te.ejb.transaction.JoinableCMTTransactionFactory
10:50:13,437 INFO [TransactionManagerLookupFactory] instantiating TransactionMa
nagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
10:50:13,437 INFO [TransactionManagerLookupFactory] instantiated TransactionMan
agerLookup
10:50:13,437 INFO [SettingsFactory] Automatic flush during beforeCompletion():
disabled
10:50:13,437 INFO [SettingsFactory] Automatic session close at end of transacti
on: disabled
10:50:13,437 INFO [SettingsFactory] Scrollable result sets: enabled
10:50:13,453 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
10:50:13,453 INFO [SettingsFactory] Connection release mode: auto
10:50:13,453 INFO [SettingsFactory] Default batch fetch size: 1
10:50:13,453 INFO [SettingsFactory] Generate SQL with comments: disabled
10:50:13,453 INFO [SettingsFactory] Order SQL updates by primary key: disabled
10:50:13,453 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.AST
QueryTranslatorFactory
10:50:13,468 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
10:50:13,468 INFO [SettingsFactory] Query language substitutions: {}
10:50:13,468 INFO [SettingsFactory] JPA-QL strict compliance: enabled
10:50:13,468 INFO [SettingsFactory] Second-level cache: enabled
10:50:13,468 INFO [SettingsFactory] Query cache: disabled
10:50:13,468 INFO [SettingsFactory] Cache provider: org.hibernate.cache.NoCache
Provider
10:50:13,468 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
10:50:13,468 INFO [SettingsFactory] Structured second-level cache entries: disa
bled
10:50:13,468 INFO [SettingsFactory] Echoing all SQL to stdout
10:50:13,468 INFO [SettingsFactory] Statistics: disabled
10:50:13,468 INFO [SettingsFactory] Deleted entity synthetic identifier rollbac
k: disabled
10:50:13,468 INFO [SettingsFactory] Default entity-mode: pojo
10:50:13,468 INFO [SettingsFactory] Named query checking : enabled
10:50:13,468 INFO [SessionFactoryImpl] building session factory
10:50:13,484 ERROR [STDERR] javax.management.MBeanException: org.jboss.jmx.conne
ctor.invoker.client.InvokerAdaptorException
10:50:13,531 ERROR [STDERR] at org.jboss.mx.server.ReflectedDispatcher.handl
eInvocationExceptions(ReflectedDispatcher.java:105)
10:50:13,531 ERROR [STDERR] at org.jboss.mx.server.ReflectedDispatcher.dispa
tch(ReflectedDispatcher.java:78)
10:50:13,531 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invoc
ation.java:76)
10:50:13,531 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invoc
ation.java:68)
10:50:13,531 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocat
ion.java:96)
10:50:13,531 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invo
ke(AbstractMBeanInvoker.java:213)
10:50:13,531 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MB
eanServerImpl.java:484)
10:50:13,531 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPProxyFac
tory.invoke(JRMPProxyFactory.java:179)
10:50:13,531 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor82.invoke(
Unknown Source)
10:50:13,531 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo
ke(DelegatingMethodAccessorImpl.java:25)
10:50:13,531 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:5
85)
10:50:13,531 ERROR [STDERR] at org.jboss.mx.server.ReflectedDispatcher.dispa
tch(ReflectedDispatcher.java:74)
10:50:13,531 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invoc
ation.java:76)
10:50:13,531 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invoc
ation.java:68)
10:50:13,531 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocat
ion.java:96)
10:50:13,531 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invo
ke(AbstractMBeanInvoker.java:213)
10:50:13,531 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MB
eanServerImpl.java:484)
10:50:13,531 ERROR [STDERR] at org.jboss.invocation.local.LocalInvoker.invok
e(LocalInvoker.java:111)
10:50:13,531 ERROR [STDERR] at org.jboss.invocation.InvokerInterceptor.invok
eLocal(InvokerInterceptor.java:193)
10:50:13,531 ERROR [STDERR] at org.jboss.invocation.InvokerInterceptor.invok
e(InvokerInterceptor.java:179)
10:50:13,531 ERROR [STDERR] at org.jboss.jmx.connector.invoker.client.Invoke
rAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:75)
10:50:13,531 ERROR [STDERR] at org.jboss.proxy.SecurityInterceptor.invoke(Se
curityInterceptor.java:70)
10:50:13,531 ERROR [STDERR] at org.jboss.proxy.ClientMethodInterceptor.invok
e(ClientMethodInterceptor.java:70)
10:50:13,531 ERROR [STDERR] at org.jboss.proxy.ClientContainer.invoke(Client
Container.java:100)
10:50:13,531 ERROR [STDERR] at $Proxy27.invoke(Unknown Source)
10:50:13,531 ERROR [STDERR] at org.mobicents.slee.container.management.conso
le.server.mbeans.ResourceManagementMBeanUtils.activateResourceAdaptorEntity(Unkn
own Source)
10:50:13,531 ERROR [STDERR] at org.mobicents.slee.container.management.conso
le.server.resources.ResourceServiceImpl.activateResourceAdaptorEntity(Unknown So
urce)
10:50:13,531 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(
Native Method)
10:50:13,531 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(N
ativeMethodAccessorImpl.java:39)
10:50:13,531 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo
ke(DelegatingMethodAccessorImpl.java:25)
10:50:13,531 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:5
85)
10:50:13,531 ERROR [STDERR] at com.google.gwt.user.server.rpc.RemoteServiceS
ervlet.processCall(RemoteServiceServlet.java:262)
10:50:13,531 ERROR [STDERR] at com.google.gwt.user.server.rpc.RemoteServiceS
ervlet.doPost(RemoteServiceServlet.java:146)
10:50:13,531 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpSe
rvlet.java:717)
10:50:13,531 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpSe
rvlet.java:810)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha
in.internalDoFilter(ApplicationFilterChain.java:252)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha
in.doFilter(ApplicationFilterChain.java:173)
10:50:13,531 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilte
r.doFilter(ReplyHeaderFilter.java:96)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha
in.internalDoFilter(ApplicationFilterChain.java:202)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha
in.doFilter(ApplicationFilterChain.java:173)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve
.invoke(StandardWrapperValve.java:214)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.StandardValveContext
.invokeNext(StandardValveContext.java:104)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.inv
oke(StandardPipeline.java:520)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve
.invokeInternal(StandardContextValve.java:198)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve
.invoke(StandardContextValve.java:152)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.StandardValveContext
.invokeNext(StandardValveContext.java:104)
10:50:13,531 ERROR [STDERR] at org.jboss.web.tomcat.security.CustomPrincipal
Valve.invoke(CustomPrincipalValve.java:81)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.StandardValveContext
.invokeNext(StandardValveContext.java:102)
10:50:13,531 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssocia
tionValve.invoke(SecurityAssociationValve.java:177)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.StandardValveContext
.invokeNext(StandardValveContext.java:102)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.inv
oke(StandardPipeline.java:520)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.in
voke(StandardHostValve.java:137)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.StandardValveContext
.invokeNext(StandardValveContext.java:104)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.i
nvoke(ErrorReportValve.java:118)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.StandardValveContext
.invokeNext(StandardValveContext.java:102)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.inv
oke(StandardPipeline.java:520)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.
invoke(StandardEngineValve.java:109)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.StandardValveContext
.invokeNext(StandardValveContext.java:104)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.inv
oke(StandardPipeline.java:520)
10:50:13,531 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:929)
10:50:13,531 ERROR [STDERR] at org.apache.coyote.tomcat5.CoyoteAdapter.servi
ce(CoyoteAdapter.java:160)
10:50:13,531 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.proc
ess(Http11Processor.java:799)
10:50:13,531 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http1
1ConnectionHandler.processConnection(Http11Protocol.java:705)
10:50:13,531 ERROR [STDERR] at org.apache.tomcat.util.net.TcpWorkerThread.ru
nIt(PoolTcpEndpoint.java:577)
10:50:13,531 ERROR [STDERR] at org.apache.tomcat.util.threads.ThreadPool$Con
trolRunnable.run(ThreadPool.java:684)
10:50:13,531 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
10:50:13,546 ERROR [STDERR] Caused by: org.jboss.jmx.connector.invoker.client.In
vokerAdaptorException
10:50:13,546 ERROR [STDERR] at org.jboss.jmx.connector.invoker.InvokerAdapto
rService.invoke(InvokerAdaptorService.java:297)
10:50:13,546 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor83.invoke(
Unknown Source)
10:50:13,546 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo
ke(DelegatingMethodAccessorImpl.java:25)
10:50:13,546 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:5
85)
10:50:13,546 ERROR [STDERR] at org.jboss.mx.server.ReflectedDispatcher.dispa
tch(ReflectedDispatcher.java:74)
10:50:13,546 ERROR [STDERR] ... 64 more
[/i]

It was almost working with patches 166/168.After last update doesnt't work.
I dont understand code for org.mobicents.slee.resource.persistence.ra.PersistenceResourceAdaptor
method initializeNamingContext shows
[i]
log.info("[@@@][9]");

try {
if (this.acif != null) {
// parse the string = java:slee/resource/PersistenceRA/persistenceacif
String jndiName = ((ResourceAdaptorActivityContextInterfaceFactory) this.acif)
.getJndiName();
log.info("[@@@][10]");
int begind = jndiName.indexOf(':');
int toind = jndiName.lastIndexOf('/');
String prefix = jndiName.substring(begind + 1, toind);
String name = jndiName.substring(toind + 1);
log
.debug("jndiName prefix =" + prefix + "; jndiName = "
+ name);
log.info("[@@@][11]");
SleeContainer.registerWithJndi(prefix, name, this.acif);
}
} catch (IndexOutOfBoundsException e) {
// not register with JNDI
log.debug(e);
}

log.info("[@@@][12]");

[/i]

On exception log is debug level but console show WARN

10:49:57,671 WARN [SleeContainer] registerWithJndi failed for java:slee/resourc
es/PersistenceRA/persistenceacif

What is wrong ? Is a regression?

Any hits/suggestions is appreciated.

Thanks Michele

baranowb
Offline
Joined: 2006-01-09

issue 155 and 168 are solved - meaning are patches are in code.
Im mnot sure why You get errors like this. Have You removed hibernate2 from jboss?

jnpHost is not needed when "-mc" or "-b 127.0.0.1"

Here is my console dump (errors are due to existing schema)

[code]
09:33:36,141 INFO [DeploymentMBeanImpl] Deployable unit deployed DeployableUnitID[1]
09:33:36,173 INFO [ResourceAdaptorMBeanImpl] Creating Resource Adaptor Entity. RA ID: ResourceAdaptorID[PersistenceResourceAdaptor#org.mobicents#0.1], name: PersistenceRA, Properties: null
09:33:36,188 INFO [SleeContainer] PROPERTIES: null
09:33:36,188 INFO [ResourceAdaptorMBeanImpl] Activating Resource Adaptor Entity. RA name: PersistenceRA
09:33:36,251 INFO [Version] Hibernate EntityManager 3.2.1.GA
09:33:36,266 INFO [Version] Hibernate Annotations 3.2.1.GA
09:33:36,282 INFO [Environment] Hibernate 3.2.2
09:33:36,298 INFO [Environment] hibernate.properties not found
09:33:36,298 INFO [Environment] Bytecode provider name : cglib
09:33:36,313 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
09:33:38,485 INFO [AnnotationBinder] Binding entity from annotated class: org.mobicents.persistencera.test.Test
09:33:38,563 INFO [EntityBinder] Bind entity org.mobicents.persistencera.test.Test on table test
09:33:38,891 INFO [NamingHelper] JNDI InitialContext properties:{}
09:33:38,891 INFO [DatasourceConnectionProvider] Using datasource: java:/persistence-ra
09:33:39,282 INFO [SettingsFactory] RDBMS: MySQL, version: 5.0.27-community
09:33:39,282 INFO [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.8 ( $Date: 2005/04/14 20:36:13 $, $Revision: 1.27.4.64 $ )
09:33:39,329 INFO [Dialect] Using dialect: org.hibernate.dialect.HSQLDialect
09:33:39,329 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
09:33:39,345 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
09:33:39,345 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
09:33:39,345 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
09:33:39,345 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
09:33:39,345 INFO [SettingsFactory] JDBC batch size: 15
09:33:39,345 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
09:33:39,345 INFO [SettingsFactory] Scrollable result sets: enabled
09:33:39,345 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
09:33:39,345 INFO [SettingsFactory] Connection release mode: auto
09:33:39,345 INFO [SettingsFactory] Default batch fetch size: 1
09:33:39,345 INFO [SettingsFactory] Generate SQL with comments: disabled
09:33:39,345 INFO [SettingsFactory] Order SQL updates by primary key: disabled
09:33:39,345 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
09:33:39,360 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
09:33:39,360 INFO [SettingsFactory] Query language substitutions: {}
09:33:39,360 INFO [SettingsFactory] JPA-QL strict compliance: enabled
09:33:39,360 INFO [SettingsFactory] Second-level cache: enabled
09:33:39,360 INFO [SettingsFactory] Query cache: disabled
09:33:39,360 INFO [SettingsFactory] Cache provider: org.hibernate.cache.NoCacheProvider
09:33:39,360 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
09:33:39,360 INFO [SettingsFactory] Structured second-level cache entries: disabled
09:33:39,360 INFO [SettingsFactory] Echoing all SQL to stdout
09:33:39,360 INFO [SettingsFactory] Statistics: disabled
09:33:39,360 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
09:33:39,376 INFO [SettingsFactory] Default entity-mode: pojo
09:33:39,376 INFO [SettingsFactory] Named query checking : enabled
09:33:39,423 INFO [SessionFactoryImpl] building session factory
09:33:40,282 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
09:33:40,298 INFO [SchemaExport] Running hbm2ddl schema export
09:33:40,313 INFO [SchemaExport] exporting generated schema to database
09:33:40,376 ERROR [SchemaExport] Unsuccessful: create table pra.test (ID integer not null, VALUE varchar(45) not null, primary key (ID), unique (ID))
09:33:40,376 ERROR [SchemaExport] Table 'test' already exists
09:33:40,376 ERROR [SchemaExport] Unsuccessful: create table hibernate_sequences ( sequence_name varchar(255), sequence_next_hi_value integer )
09:33:40,376 ERROR [SchemaExport] Table 'hibernate_sequences' already exists
09:33:40,376 INFO [SchemaExport] schema export complete
09:33:40,376 INFO [NamingHelper] JNDI InitialContext properties:{}
09:33:40,391 INFO [ResourceAdaptorMBeanImpl] Creating RA Entity Link. RA name: PersistenceRA, Link: PersistenceRA
09:34:06,626 INFO [ActivityManagerMBeanImpl] Periodic Liveliness Task is on the run, scanning through acs
09:34:06,626 INFO [ActivityManagerMBeanImpl] Periodic Liveliness Task has finished, scheduling another run
09:34:06,626 INFO [ActivityManagerMBeanImpl] Periodic Liveliness Task scheduled for next run

[/code]

mlaporta
Offline
Joined: 2007-04-02

Last time I try PersistenceRA I didn't notice mobicent-client writing this logs:
deploy:
[echo] Deploying PersistenceRA.
[slee-management] 4-giu-2007 14.32.51 org.mobicents.ant.tasks.InstallTask run
[slee-management] INFO: DeployableUnitID[6]
[slee-management] 4-giu-2007 14.33.50 org.mobicents.ant.tasks.InstallTask run
[slee-management] INFO: DeployableUnitID[7]
[slee-management] 4-giu-2007 14.33.50 org.mobicents.slee.container.management.jm
x.SleeCommandInterface invokeOperation
[slee-management] INFO: Loading properties: null
[slee-management] 4-giu-2007 14.33.50 org.mobicents.ant.tasks.CreateRaEntityTask
run
[slee-management] INFO: No response
[slee-management] 4-giu-2007 14.34.45 org.mobicents.ant.tasks.ActivateRaEntityTa
sk run
[slee-management] AVVERTENZA: Bad result: slee:name=ResourceAdaptorMBean.activat
eResourceAdaptorEntity
[slee-management] java.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setIn
terceptDuringConstruction(Z)V
[slee-management] 4-giu-2007 14.34.45 org.mobicents.ant.tasks.CreateRaLinkTask r
un
[slee-management] INFO: No response

BUILD SUCCESSFUL

The java.lang.NoSuchMethodError is provoked by different cglib library from persistenceRA/lib/ and the one in jboss/deploy/jboss-hibernate.sar.
I sostitute cglib-full-2.0.1.jar with cglib-nodep-2.1_3 + asm-1.5.3.jar. I had similar problem running hibernate3 I found cglib-nodep-2.1_3 + asm-2.2 is the right solution.
Now I have hibernate running,derby db schema exported successfully.

deploy:
[echo] Deploying PersistenceRA.
[slee-management] 4-giu-2007 14.40.49 org.mobicents.ant.tasks.InstallTask run
[slee-management] INFO: DeployableUnitID[0]
[slee-management] 4-giu-2007 14.41.31 org.mobicents.ant.tasks.InstallTask run
[slee-management] INFO: DeployableUnitID[1]
[slee-management] 4-giu-2007 14.41.31 org.mobicents.slee.container.management.jm
x.SleeCommandInterface invokeOperation
[slee-management] INFO: Loading properties: null
[slee-management] 4-giu-2007 14.41.31 org.mobicents.ant.tasks.CreateRaEntityTask
run
[slee-management] INFO: No response
[slee-management] 4-giu-2007 14.42.23 org.mobicents.ant.tasks.ActivateRaEntityTa
sk run
[slee-management] INFO: No response
[slee-management] 4-giu-2007 14.42.23 org.mobicents.ant.tasks.CreateRaLinkTask r
un
[slee-management] INFO: No response

BUILD SUCCESSFUL
Total time: 2 minutes 15 seconds
D:\workspace.jslee3\mobicents\ra\persistencera>

baranowb
Offline
Joined: 2006-01-09

PRa uses hibernate 3. In jb3 there is hibernate 2. I think that it is mentioned on wiki that hiberante.sar should be removed.
I think that java.net wiki points to this: http://groups.google.com/group/mobicents-public/web/persistence-ra-design

mlaporta
Offline
Joined: 2007-04-02

Ok I apply both patches to mobicents

https://mobicents.dev.java.net/issues/show_bug.cgi?id=166
https://mobicents.dev.java.net/issues/show_bug.cgi?id=168

Here the mobicents console log:

[i]
15:48:06,921 INFO [persistence-ra] Bound connection factory for resource adapte
r for ConnectionManager 'jboss.jca:service=LocalTxCM,name=persistence-ra to JNDI
name 'java:/persistence-ra'
15:48:18,453 INFO [DeploymentMBeanImpl] First time deploying file:/D:/workspace
.slee/mobicents/ra/persistencera/ratype/jars/persistence-ratype-DU.jar
15:48:18,468 INFO [DeploymentMBeanImpl] Deploying file:/D:/workspace.slee/mobic
ents/ra/persistencera/ratype/jars/persistence-ratype-DU.jar
15:48:18,500 INFO [DeploymentManager] Deploying from D:\jars\jboss-3.2.8.SP1\se
rver\all\tmp\deploy\tmpDUJars49171-contents\persistence-ratype-DU.jar
15:48:19,015 INFO [AbstractComponentDeployer] Deploying and installing D:\jars\
jboss-3.2.8.SP1\server\all\tmp\deploy\tmpDUJars49171-contents\persistence-events
.jar
15:48:19,062 INFO [AbstractComponentDeployer] ClassPathDirectory D:\jars\jboss-
3.2.8.SP1\server\all\tmp\deploy\tmpDUJarsUnpackaged49172-contents
15:48:19,093 INFO [SleeContainer] Installing org.mobicents.slee.container.manag
ement.EventTypeDescriptorImpl@200bde
15:48:19,109 INFO [SleeContainer] Installing event Type:EventTypeID[org.mobicen
ts.fake.Event#mobicents#1.0], #13 descriptor org.mobicents.slee.container.manage
ment.EventTypeDescriptorImpl@200bde
15:48:19,140 INFO [SleeContainer] Added Event org.mobicents.fake.Event#mobicent
s#1.0to the Container
15:48:19,156 INFO [AbstractComponentDeployer] Deploying and installing D:\jars\
jboss-3.2.8.SP1\server\all\tmp\deploy\tmpDUJars49171-contents\persistence-ratype
.jar
15:48:19,187 INFO [AbstractComponentDeployer] ClassPathDirectory D:\jars\jboss-
3.2.8.SP1\server\all\tmp\deploy\tmpDUJarsUnpackaged49172-contents
15:48:19,203 INFO [SleeContainer] Installing org.mobicents.slee.resource.Resour
ceAdaptorTypeDescriptorImpl@1eb41d6
15:48:19,218 INFO [SleeContainer] installing duid DeployableUnitID[0]
15:48:19,234 INFO [SleeContainer] descriptor = url = file:/D:/workspace.slee/mo
bicents/ra/persistencera/ratype/jars/persistence-ratype-DU.jar
Date = Thu May 17 15:48:18 CEST 2007
deployableUnitID = DeployableUnitID[0]
description = null
components =
EventTypeID[org.mobicents.fake.Event#mobicents#1.0], #13
ResourceAdaptorTypeID[PersistenceAdaptorType#org.mobicents#0.1]
jars =
persistence-ratype.jar
persistence-events.jar
15:48:19,328 INFO [SleeContainer] VIRGIN INSTALLATION[EventTypeID[org.mobicents
.fake.Event#mobicents#1.0], #13] BY[file:/D:/workspace.slee/mobicents/ra/persist
encera/ratype/jars/persistence-ratype-DU.jar]
15:48:19,359 INFO [SleeContainer] ADDIGN DEPS[EventTypeID[org.mobicents.fake.Ev
ent#mobicents#1.0], #13] TO[file:/D:/workspace.slee/mobicents/ra/persistencera/r
atype/jars/persistence-ratype-DU.jar]
15:48:19,390 INFO [SleeContainer] VIRGIN INSTALLATION[ResourceAdaptorTypeID[Per
sistenceAdaptorType#org.mobicents#0.1]] BY[file:/D:/workspace.slee/mobicents/ra/
persistencera/ratype/jars/persistence-ratype-DU.jar]
15:48:19,421 INFO [SleeContainer] ADDIGN DEPS[ResourceAdaptorTypeID[Persistence
AdaptorType#org.mobicents#0.1]] TO[file:/D:/workspace.slee/mobicents/ra/persiste
ncera/ratype/jars/persistence-ratype-DU.jar]
15:48:19,453 INFO [DeploymentManager] Installation of deployable unit successfu
l
15:48:19,468 INFO [DeploymentMBeanImpl] Deployable unit deployed DeployableUnit
ID[0]
15:48:19,765 INFO [DeploymentMBeanImpl] First time deploying file:/D:/workspace
.slee/mobicents/ra/persistencera/ra/jars/persistence-ra-DU.jar
15:48:19,781 INFO [DeploymentMBeanImpl] Deploying file:/D:/workspace.slee/mobic
ents/ra/persistencera/ra/jars/persistence-ra-DU.jar
15:48:19,875 INFO [DeploymentManager] Deploying from D:\jars\jboss-3.2.8.SP1\se
rver\all\tmp\deploy\tmpDUJars49173-contents\persistence-ra-DU.jar
15:48:49,546 INFO [AbstractComponentDeployer] Deploying and installing D:\jars\
jboss-3.2.8.SP1\server\all\tmp\deploy\tmpDUJars49173-contents\persistence-ra.jar

15:48:49,687 INFO [AbstractComponentDeployer] ClassPathDirectory D:\jars\jboss-
3.2.8.SP1\server\all\tmp\deploy\tmpDUJarsUnpackaged49174-contents
15:48:49,703 INFO [SleeContainer] Installing org.mobicents.slee.resource.Resour
ceAdaptorDescriptorImpl@17d812b
15:48:49,734 INFO [SleeContainer] Inserting RA id: ResourceAdaptorID[Persistenc
eResourceAdaptor#org.mobicents#0.1] RA: org.mobicents.slee.resource.ResourceAdap
torType@6a6484
15:48:49,765 INFO [SleeContainer] installing duid DeployableUnitID[1]
15:48:49,765 INFO [SleeContainer] descriptor = url = file:/D:/workspace.slee/mo
bicents/ra/persistencera/ra/jars/persistence-ra-DU.jar
Date = Thu May 17 15:48:19 CEST 2007
deployableUnitID = DeployableUnitID[1]
description = null
components =
ResourceAdaptorID[PersistenceResourceAdaptor#org.mobicents#0.1]
jars =
persistence-ra.jar
15:48:49,859 INFO [SleeContainer] VIRGIN INSTALLATION[ResourceAdaptorID[Persist
enceResourceAdaptor#org.mobicents#0.1]] BY[file:/D:/workspace.slee/mobicents/ra/
persistencera/ra/jars/persistence-ra-DU.jar]
15:48:49,890 INFO [SleeContainer] ADDIGN DEPS[ResourceAdaptorID[PersistenceReso
urceAdaptor#org.mobicents#0.1]] TO[file:/D:/workspace.slee/mobicents/ra/persiste
ncera/ra/jars/persistence-ra-DU.jar]
15:48:49,921 INFO [DeploymentManager] Installation of deployable unit successfu
l
15:48:49,937 INFO [DeploymentMBeanImpl] Deployable unit deployed DeployableUnit
ID[1]
15:48:50,078 INFO [ResourceAdaptorMBeanImpl] Creating Resource Adaptor Entity.
RA ID: ResourceAdaptorID[PersistenceResourceAdaptor#org.mobicents#0.1], name: Pe
rsistenceRA, Properties: null
15:48:50,156 INFO [SleeContainer] PROPERTIES: null
15:48:50,187 INFO [ResourceAdaptorMBeanImpl] Activating Resource Adaptor Entity
. RA name: PersistenceRA
15:48:50,203 INFO [PersistenceResourceAdaptor] [@@@][1]
15:48:50,218 INFO [PersistenceResourceAdaptor] [@@@][2]
15:48:50,218 INFO [PersistenceResourceAdaptor] [@@@][3]
15:48:50,234 INFO [PersistenceResourceAdaptor] [@@@][4]
15:48:50,250 INFO [PersistenceResourceAdaptor] [@@@][5]
15:48:50,250 INFO [PersistenceResourceAdaptor] [@@@][6]
15:48:50,265 INFO [PersistenceResourceAdaptor] [@@@][7]
15:48:50,281 INFO [PersistenceResourceAdaptor] [@@@][8]
15:48:50,296 INFO [PersistenceResourceAdaptor] [@@@][9]
15:48:50,312 INFO [PersistenceResourceAdaptor] [@@@][10]
15:48:50,312 INFO [PersistenceResourceAdaptor] [@@@][11]
15:48:50,328 INFO [PersistenceResourceAdaptor] [@@@][12]
15:48:50,421 INFO [Version] Hibernate EntityManager 3.2.1.GA
15:48:50,515 INFO [Version] Hibernate Annotations 3.2.1.GA
15:48:50,546 INFO [Environment] Hibernate 3.2.2
15:48:50,625 INFO [Environment] hibernate.properties not found
15:48:50,671 INFO [Environment] Bytecode provider name : cglib
15:48:50,687 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
15:48:57,843 INFO [AnnotationBinder] Binding entity from annotated class: org.m
obicents.persistencera.test.Test
15:48:57,968 INFO [EntityBinder] Bind entity org.mobicents.persistencera.test.T
est on table test
15:48:58,453 INFO [NamingHelper] JNDI InitialContext properties:{}
15:48:58,453 INFO [DatasourceConnectionProvider] Using datasource: java:/persis
tence-ra
15:49:02,656 INFO [SettingsFactory] RDBMS: Apache Derby, version: 10.2.1.6 - (4
52058)
15:49:02,671 INFO [SettingsFactory] JDBC driver: Apache Derby Network Client JD
BC Driver, version: 10.2.1.6 - (452058)
15:49:15,187 INFO [Dialect] Using dialect: org.hibernate.dialect.DerbyDialect
15:49:15,218 INFO [TransactionFactoryFactory] Transaction strategy: org.hiberna
te.ejb.transaction.JoinableCMTTransactionFactory
15:49:15,234 INFO [TransactionManagerLookupFactory] instantiating TransactionMa
nagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
15:49:15,265 INFO [TransactionManagerLookupFactory] instantiated TransactionMan
agerLookup
15:49:15,265 INFO [SettingsFactory] Automatic flush during beforeCompletion():
disabled
15:49:15,296 INFO [SettingsFactory] Automatic session close at end of transacti
on: disabled
15:49:15,312 INFO [SettingsFactory] Scrollable result sets: enabled
15:49:15,328 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
15:49:15,359 INFO [SettingsFactory] Connection release mode: auto
15:49:15,375 INFO [SettingsFactory] Default batch fetch size: 1
15:49:15,390 INFO [SettingsFactory] Generate SQL with comments: disabled
15:49:15,390 INFO [SettingsFactory] Order SQL updates by primary key: disabled
15:49:15,406 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.AST
QueryTranslatorFactory
15:49:15,421 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
15:49:15,437 INFO [SettingsFactory] Query language substitutions: {}
15:49:15,437 INFO [SettingsFactory] JPA-QL strict compliance: enabled
15:49:15,453 INFO [SettingsFactory] Second-level cache: enabled
15:49:15,468 INFO [SettingsFactory] Query cache: disabled
15:49:15,468 INFO [SettingsFactory] Cache provider: org.hibernate.cache.NoCache
Provider
15:49:15,484 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
15:49:15,500 INFO [SettingsFactory] Structured second-level cache entries: disa
bled
15:49:15,531 INFO [SettingsFactory] Echoing all SQL to stdout
15:49:15,546 INFO [SettingsFactory] Statistics: disabled
15:49:15,546 INFO [SettingsFactory] Deleted entity synthetic identifier rollbac
k: disabled
15:49:15,578 INFO [SettingsFactory] Default entity-mode: pojo
15:49:15,578 INFO [SettingsFactory] Named query checking : enabled
15:49:15,687 INFO [SessionFactoryImpl] building session factory
15:49:16,437 INFO [ResourceAdaptorMBeanImpl] Creating RA Entity Link. RA name:
PersistenceRA, Link: PersistenceRA
[/i]

When I try to undeploy and then deploy again mobicents console log :

[i]
.....
15:59:21,812 INFO [PersistenceResourceAdaptor] [@@@][11]
15:59:22,015 WARN [SleeContainer] registerWithJndi failed for java:slee/resourc
es/PersistenceRA/persistenceacif
java.lang.ClassCastException: org.mobicents.slee.resource.persistence.ra.Persist
enceActivityContextInterfaceFactoryImp
at org.jboss.naming.Util.createSubcontext(Util.java:68)
at org.jboss.naming.Util.createSubcontext(Util.java:51)
at org.mobicents.slee.container.SleeContainer.registerWithJndi(SleeConta
iner.java:1030)
at org.mobicents.slee.resource.persistence.ra.PersistenceResourceAdaptor
.initializeNamingContext(Unknown Source)
at org.mobicents.slee.resource.persistence.ra.PersistenceResourceAdaptor
.start(Unknown Source)
at org.mobicents.slee.resource.persistence.ra.PersistenceResourceAdaptor
.entityActivated(Unknown Source)
at org.mobicents.slee.resource.ResourceAdaptorEntity.activate(ResourceAd
aptorEntity.java:185)
at org.mobicents.slee.container.SleeContainer.activateResourceAdaptorEnt
ity(SleeContainer.java:857)
at org.mobicents.slee.container.management.jmx.ResourceAdaptorMBeanImpl.
activateResourceAdaptorEntity(ResourceAdaptorMBeanImpl.java:144)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
java:74)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:76)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:68)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:96)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:213)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:484)
at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerA
daptorService.java:273)
at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
java:74)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:76)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:68)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:96)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:213)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:484)
at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFac
tory.java:179)
at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
java:74)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:76)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:68)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:96)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:213)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:484)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:
374)
at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
66)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
.java:707)
at java.lang.Thread.run(Thread.java:595)
15:59:24,343 INFO [PersistenceResourceAdaptor] [@@@][12]
15:59:24,500 INFO [Version] Hibernate EntityManager 3.2.1.GA
.....
[/i]

My persistence-sbb is successfully deployed I define the following on sbb-jar.xml:

[i]


PersistenceAdaptorType
org.mobicents
0.1

slee/resource/PersistenceRA/persistenceacif

slee/resource/persistence/0.1/provider
PersistenceRA


[/i]

When setSbbContext is called I lookup "slee/resource/PersistenceRA/persistenceacif"
successfully but I cannot lookup "slee/resource/persistence/0.1/provider"
What's wrong here?

How I can deploy pojos?
How I can test the PersistenceRA ?

Thanks

Michele

baranowb
Offline
Joined: 2006-01-09

Hi Michele. I did post solution 3 times but java net cut my responses in the middle of the word ;/

Here is wiki http://wiki.java.net/bin/view/Communications/PersistenceRA that should be helpfull

Im not getting that error on redeploy though.

baranowb
Offline
Joined: 2006-01-09

hi Michele.

Looks like some introdction will be needed.
So firstly You need two patches that are not yet in core: waiting for reveiew of them, see:
issue 168 <- this one causes persistence.xml not to be unpacked, thus it causes provider error

also see:
issue 166 <-- this one allows to use JPA which is required

As its draft version and we are creating new scripts for reuse in ras, services, etc.
so packaging is kind of plain : just put Your compiled pojos in ra/pojos dir (I will try to figure some clever way to automate it)

Dont use events - this are stubs, there is one event but I had to put it there because of verification error (Im not sure of exact cause, just shooting from my memory).
PRA doesnt emit any events, there was idea of having async PRA but Eduardo and Ivelin had some doubts and convinced me not to do it that way (" make it simple, they say" :))

Use PRA PersistenceManager as simple manager in JPA or EJBS. I will create wiki page shortly when Im done with present wikis. Will post lilnk here

ivelin
Offline
Joined: 2003-07-13

both patches 166 & 168 can be applied. Sorry for the delay.

baranowb
Offline
Joined: 2006-01-09

hi Michele.

Looks like some introdction will be needed.
So firstly You need two patches that are not yet in core: waiting for reveiew of them, see:
https://mobicents.dev.java.net/issues/show_bug.cgi?id=168 <- this one causes persistence.xml not to be unpacked, thus it causes provider error

also see:
https://mobicents.dev.java.net/issues/show_bug.cgi?id=166 <-- this one allows to use JPA which is required

As its draft version and we are creating new scripts for reuse in ras, services, etc.
so packaging is kind of plain : just put Your compiled pojos in ra/pojos dir (I will try to figure some clever way to automate it)

Dont use events - this are stubs, there is one event but I had to put it there because of verification error (Im not sure of exact cause, just shooting from my memory).
PRA doesnt emit any events, there was idea of having async PRA but Eduardo and Ivelin had some doubts and convinced me not to do it that way (" make it simple, they say" :))

Use PRA PersistenceManager as simple manager in JPA or EJBS. I will create wiki page shortly when Im done with present wikis. Will post lilnk here

Message was edited by: baranowb