Never mind, i saw an old mailing list item pointing to the fact that the
trigger wasn't there, and indeed mine wasn't either. I deleted my oracle
tablespaces, recreated them, and it is working now. Sorry for the noise.
----- Original Message -----
From: "Dave Brosius" <[EMAIL PROTECTED]>
To: <[email protected]>; <[EMAIL PROTECTED]>
Sent: Monday, February 25, 2008 12:57 PM
Subject: Re: Difference between older Jackrabbits and 1.4/1.4.1?
Thanks Stefan,
I did indeed have the same schema prefix for both PersistenceManager
sections.
I changed the Versioning/PersistenceManager prefix to version_ as you
suggested, but am now getting:
[org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager]
ERROR 12:45:52,946: could not execute statement, reason: ORA-01400: cannot
insert NULL into ("JACKRABBIT"."VERSION_NAMES"."ID")
, state/code: 23000/1400
[org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager]
ERROR 12:45:52,946: failed to write bundle:
deadbeef-face-babe-cafe-babecafebabe
java.lang.IllegalStateException: Unable to insert index:
java.sql.SQLException: ORA-01400: cannot insert NULL into
("JACKRABBIT"."VERSION_NAMES"."ID")
at
org.apache.jackrabbit.core.persistence.bundle.util.NGKDbNameIndex.insertString(NGKDbNameIndex.java:71)
at
org.apache.jackrabbit.core.persistence.bundle.util.DbNameIndex.stringToIndex(DbNameIndex.java:101)
at
org.apache.jackrabbit.core.persistence.bundle.util.BundleBinding.writeBundle(BundleBinding.java:249)
at
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.storeBundle(BundleDbPersistenceManager.java:1028)
at
org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.putBundle(AbstractBundlePersistenceManager.java:703)
at
org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.store(AbstractBundlePersistenceManager.java:643)
at
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.store(BundleDbPersistenceManager.java:524)
at
org.apache.jackrabbit.core.version.VersionManagerImpl.<init>(VersionManagerImpl.java:162)
at
org.apache.jackrabbit.core.RepositoryImpl.createVersionManager(RepositoryImpl.java:400)
at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:294)
at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:557)
at
org.apache.jackrabbit.core.TransientRepository$1.getRepository(TransientRepository.java:186)
at
org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:265)
at
org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:333)
at
com.primavera.infr.srvcs.cr.ContentRepositoryServiceImpl.<init>(ContentRepositoryServiceImpl.java:112)
at
com.primavera.infr.srvcs.cr.ContentRepositoryServiceImpl.getService(ContentRepositoryServiceImpl.java:143)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.primavera.infr.DBServiceFactory.startServices(DBServiceFactory.java:29)
at com.primavera.infr.DBServiceInstaller.execute(SysServices.java:639)
at com.primavera.infr.threadpool.ThreadPool.run(ThreadPool.java:226)
at java.lang.Thread.run(Thread.java:595)
When i look in the oracle database, the tables i see are
version_binval
version_bundle
version_names
version_refs
Here is the repository.xml i am generating.
<?xml version="1.0" encoding="UTF-8"?><Repository>
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="f:/pv/xe_cr/jcr_database_1/repository"/>
</FileSystem>
<Security appName="Jackrabbit">
<AccessManager
class="org.apache.jackrabbit.core.security.SimpleAccessManager">
</AccessManager>
<LoginModule
class="org.apache.jackrabbit.core.security.SimpleLoginModule">
<param name="anonymousId" value="anonymous"/>
</LoginModule>
</Security>
<Workspaces rootPath="f:/pv/xe_cr/jcr_database_1/workspaces"
defaultWorkspace="PMCR"/>
<Workspace name="PMCR">
<FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path"
value="f:/pv/xe_cr/jcr_database_1/workspaces/PMCR"/>
</FileSystem>
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager">
<param name="driver" value="oracle.jdbc.driver.OracleDriver"/>
<param name="schema" value="oracle"/>
<param name="url" value="jdbc:oracle:thin:@127.0.0.1:1521:xe"/>
<param name="user" value="jackrabbit"/>
<param name="password" value="jackrabbit"/>
<param name="schemaObjectPrefix" value="PMCR"/>
<param name="externalBLOBs" value="false"/>
</PersistenceManager>
<SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path"
value="f:/pv/xe_cr/jcr_database_1/workspaces/PMCR/index"/>
<param name="useCompoundFile" value="true"/>
<param name="minMergeDocs" value="100"/>
<param name="volatileIdleTime" value="3"/>
<param name="maxMergeDocs" value="2147483647"/>
<param name="mergeFactor" value="10"/>
<param name="maxFieldLength" value="10000"/>
<param name="bufferSize" value="10"/>
<param name="cacheSize" value="1000"/>
<param name="forceConsistencyCheck" value="false"/>
<param name="enableConsistencyCheck" value="false"/>
<param name="autoRepair" value="true"/>
<param name="analyzer"
value="org.apache.lucene.analysis.standard.StandardAnalyzer"/>
<param name="queryClass"
value="org.apache.jackrabbit.core.query.QueryImpl"/>
<param name="respectDocumentOrder" value="true"/>
<param name="resultFetchSize" value="2147483647"/>
<param name="extractorPoolSize" value="0"/>
<param name="extractorTimeout" value="100"/>
<param name="extractorBackLogSize" value="100"/>
</SearchIndex>
</Workspace>
<Versioning rootPath="f:/pv/xe_cr/jcr_database_1/version">
<FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="f:/pv/xe_cr/jcr_database_1/version"/>
</FileSystem>
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager">
<param name="driver" value="oracle.jdbc.driver.OracleDriver"/>
<param name="schema" value="oracle"/>
<param name="url" value="jdbc:oracle:thin:@127.0.0.1:1521:xe"/>
<param name="user" value="jackrabbit"/>
<param name="password" value="jackrabbit"/>
<param name="schemaObjectPrefix" value="version_"/>
<param name="externalBLOBs" value="false"/>
</PersistenceManager>
</Versioning>
<SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path"
value="f:/pv/xe_cr/jcr_database_1/repository/index"/>
</SearchIndex>
</Repository>
----- Original Message -----
From: "Stefan Guggisberg" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, February 25, 2008 4:43 AM
Subject: Re: Difference between older Jackrabbits and 1.4/1.4.1?
hi dave
On Sat, Feb 23, 2008 at 1:40 AM, Dave Brosius <[EMAIL PROTECTED]>
wrote:
Ah, i think i figured something out. The PersistenceManager under
Workspace
and Versioning should have different URLs in Derby.
So it is working in derby when that happens. But oracle still fails.
How about in oracle, sqlserver? Can you use the same url for both
PersistenceManagers when using oracle? What would the different ones be?
you don't need separate url's for those, but since every
DatabasePersistenceManager
creates and works with its own schema objects (i.e. tables etc) you
have to specify
distinct schemaObjectPrefix values for each in the repository.xml. in
the default config
we're e.g. using
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
for the workspace persistence manager and
<param name="schemaObjectPrefix" value="version_"/>
BTW: note that the workspace configuration element in the repository.xml
is just used as a template for creating new workspaces. make sure you
adapt the created workspace.xml as well.
hope this helps!
cheers
stefan
----- Original Message -----
From: "Dave Brosius" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, February 22, 2008 4:02 PM
Subject: Re: Difference between older Jackrabbits and 1.4/1.4.1?
> Hmm, it looks likely that i am running into this already reported
issue
>
> https://issues.apache.org/jira/browse/JCR-537
>
> anyone have any ideas how to work around this issue? i'm pretty dead
in
> the water without a workaround.
>
> I guess i can just delete all the directories on disk.
>
>
> ----- Original Message -----
> From: "Dave Brosius" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Friday, February 22, 2008 3:48 PM
> Subject: Re: Difference between older Jackrabbits and 1.4/1.4.1?
>
>
>> If it helps any, the originating exception is from
>>
>> SharedItemStateManager
>> public NodeReferences getNodeReferences(NodeReferencesId id) throws
>> NoSuchItemStateException, ItemStateException {
>>
>>
>>
>> here at the end of the method
>>
>> // throw
>>
>> throw new NoSuchItemStateException(id.toString());
>>
>> }
>>
>>
>>
>>
>>
>> ----- Original Message -----
>> From: "Dave Brosius" <[EMAIL PROTECTED]>
>> To: <[email protected]>
>> Sent: Friday, February 22, 2008 2:57 PM
>> Subject: Difference between older Jackrabbits and 1.4/1.4.1?
>>
>>
>>>I have this code i use for running fitnesse tests. It ran without
>>>incident in past versions of JRabbit. I now upgraded to 1.4 and core
>>>1.4.1 and now it fails on the parent.save() method with
>>>
>>> javax.jcr.ItemNotFoundException:
3f883da8-04fa-4d5d-a0a7-d98d201b10a5
>>>
>>> Did anything change going to 1.4? In my case there are child nodes
below
>>> the nodes i am removing, is this a problem now? Do i have to remove
all
>>> children recursively, bottom - up?
>>>
>>>
>>> /** This method is only to be used by testing frameworks */
>>> public synchronized void destroy() throws ContentRepositoryException
>>> {
>>> if (!m_isEmbedded)
>>> throw new ContentRepositoryException("Not allowed to destroy a
non
>>> embedded content repository");
>>> try
>>> {
>>> Node projectsRoot = getProjectsRootNode();
>>> if (projectsRoot != null)
>>> {
>>> Node parent = projectsRoot.getParent();
>>> projectsRoot.remove();
>>> parent.save();
>>> }
>>> m_projectRootUuid = null;
>>> Node usersRoot = getUsersRootNode();
>>> if (usersRoot != null)
>>> {
>>> Node parent = usersRoot.getParent();
>>> usersRoot.remove();
>>> parent.save();
>>> }
>>> m_userRootUuid = null;
>>> m_session.save();
>>> }
>>> catch (RepositoryException re)
>>> {
>>> throw new ContentRepositoryException("Failed destroying
embedded
>>> repository", re);
>>> }
>>> }
>>
>