Ok. I think this happens because nuxeo-ear deploys -ds.xml files before
other jars so may be the
org.nuxeo.ecm.core.repository.JBossRepository
class is not yet visible on the classpath at the time the -ds.xml is
deployed.
In the case of the default -ds.xml it works because this is deployed
inside nuxeo-core-jca.rar
and thus jboss will deploy the ds after this rar module is deployed and
at this time jboss-adapter bundle is already on the classpath
For now, you can workaround that by putting your ds.xml inside your own
.jar - if you have one.
I will also think about a real fix for this (so that you can use
datasource folder for you ds deployment)
Regards,
Bogdan
Yuri Nadestin wrote:
Got it, thanks.
There is one small problem though,
If I leave <mbean> declaration in the -ds.xml file uncommented:
<mbean code="org.nuxeo.ecm.core.repository.JBossRepository"
name="nx:type=repository,name=MyRepo">
<constructor>
<arg type="java.lang.String" value="MyRepo"/>
</constructor>
</mbean>
then I get following error on JBoss start:
16:59:26,911 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- Incompletely deployed packages ---
[EMAIL PROTECTED] {
url=file:/D:/nuxeo-5.1.0.GA/server/default/deploy/nuxeo.ear/ }
deployer: [EMAIL PROTECTED]
status: Deployment FAILED reason: No ClassLoaders found for:
org.nuxeo.ecm.core.repository.JBossRepository; - nested t
hrowable: (java.lang.ClassNotFoundException: No ClassLoaders found for:
org.nuxeo.ecm.core.repository.JBossRepository)
state: FAILED
watch:
file:/D:/nuxeo-5.1.0.GA/server/default/deploy/nuxeo.ear/META-INF/applica
tion.xml
altDD: null
lastDeployed: 1190905133123
lastModified: 1190905132109
mbeans:
jboss.j2ee:ear=nuxeo.ear,jar=jboss-seam-1.1.5.NX2.jar,name=Dispatcher,se
rvice=EJB3 state: Started
jboss.j2ee:ear=nuxeo.ear,jar=jboss-seam-1.1.5.NX2.jar,name=TransactionLi
stener,service=EJB3 state: Started
[EMAIL PROTECTED] {
url=file:/D:/nuxeo-5.1.0.GA/server/default/deploy/nuxeo.ear/datasources/
M
yRepo-ds.xml }
deployer: [EMAIL PROTECTED]
status: Deployment FAILED reason: No ClassLoaders found for:
org.nuxeo.ecm.core.repository.JBossRepository; - nested t
hrowable: (java.lang.ClassNotFoundException: No ClassLoaders found for:
org.nuxeo.ecm.core.repository.JBossRepository)
state: FAILED
watch:
file:/D:/nuxeo-5.1.0.GA/server/default/deploy/nuxeo.ear/datasources/MyRe
po-ds.xml
altDD: null
lastDeployed: 1190905164583
lastModified: 1190905164534
mbeans:
Without JBossRepository mbean it works.
Documentation needs an update on this, I think.
Thank you,
Yuri Nadestin
-----Original Message-----
From: Bogdan Stefanescu [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 27. September 2007 15:43
To: Yuri Nadestin
Cc: [email protected]
Subject: Re: [Ecm] RDBMS Configuration
Hi Yuri,
Yes, this was changed to avoid packaging and build problems.
Before this the datasource corresponding to the repository were
generated on the fly
after registering the repository extension (by sending a nxruntime event
to the jboss adapter)
and then deployed into JBoss by using JBoss specific API.
Now you need to explicitly deploy your data source into jboss.
For this you simply put a -ds.xml file in nuxeo.ear/datasources that
defines the datasource of your repository.
To create this file copy the content of the one you will find in
nuxeo-core-jca.jar
And modify the "default" name to your own name
This is the content of the file you need to copy:
------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE connection-factories PUBLIC
"-//JBoss//DTD JBOSS JCA Config 1.5//EN"
"http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
<connection-factories>
<mbean code="org.nuxeo.ecm.core.repository.JBossRepository"
name="nx:type=repository,name=default">
<constructor>
<arg type="java.lang.String" value="default"/>
</constructor>
</mbean>
<tx-connection-factory>
<jndi-name>NXRepository/default</jndi-name>
<adapter-display-name>NX Repository Adapter</adapter-display-name>
<rar-name>nuxeo.ear#nuxeo-core-jca-${project.version}.rar</rar-name>
<connection-definition>org.nuxeo.ecm.core.model.Repository</connection-d
efinition>
<xa-transaction/>
<!-- Configuration properties. -->
<config-property name="name">default</config-property>
</tx-connection-factory>
</connection-factories>
------------------
So you should change "default" to your own name in following places:
NXRepository/default
<config-property name="name">default</config-property>
And here you should be sure you have the correct name of the rar bundle:
<rar-name>nuxeo.ear#nuxeo-core-jca-${project.version}.rar</rar-name>
The first section:
<mbean code="org.nuxeo.ecm.core.repository.JBossRepository"
name="nx:type=repository,name=default">
<constructor>
<arg type="java.lang.String" value="default"/>
</constructor>
</mbean>
is optional and it is needed only if you want to be able to view some
info about your repository through JBoss jmx-console
If you want this then change "default" wioth your own name.
Regards,
Bogdan
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm