AnsweredAssumed Answered

1.4 to 2.1 Migration failing

Question asked by curious_george on Mar 22, 2008
Latest reply on Mar 26, 2008 by pmonks
Hi,

I am upgrading our existing Alfresco 1.4 environment to Alfresco 2.1. The system environment is JBoss 4.2.2 with JDK 1.5, Linux (Red Hat Enterprise Linux 4), and Oracle 10.2

In theory, all we need to do is place the updated alfresco.war in the deploy directory and Alfresco will perform the necessary upgrade steps automatically. Unfortunately, we receive errors during the initial startup, when Alfresco applies the update patches.

After turning up debugging, the logs show the error is coming from the InvalidNameEnding patch. From the source code (see: http://jsourcery.com/api/sourceforge/alfresco/2.0.0/org/alfresco/repo/admin/patch/impl/InvalidNameEndingPatch.source.html ), we can see Alfresco is trying to create a file "./InvalidNameEndingPatch.log". It fails to create the file, throws an Exception, and the whole transaction fails. Please see the end of this post for the stacktraces.

In which directory is Alfresco attempting to create this file? I gave my /tmp and /opt/jboss directories 777 permissions, but this did not remedy the situation.

Most importantly, how do I properly fix this issue so that the Invalid Name Ending patch and other patches get applied?

I did find another user with a similar issue (see: http://forums.alfresco.com/viewtopic.php?p=28112& ). Unfortunately his workaround does not work since I'm not directly calling Tomcat.

I did find a potential workaround - but I am not sure if it will create problems later. If I run JBoss as 'root' immediately after the upgrade, Alfresco will not throw any errors during the application of the patches.

Any help or insight is appreciated. This is a most frustrating issue!

Here are a few of the stacktraces from JBoss server.log:
A portion of the very first exception:

2008-03-22 08:29:36,715(GMT-7) INFO  [STDOUT] 08:29:36,715 INFO  [admin.patch.Pa
tchExecuter] Checking for patches to apply …
2008-03-22 08:29:36,854(GMT-7) INFO  [STDOUT] 08:29:36,852 ERROR [admin.patch.Pa
tchServiceImpl] org.alfresco.error.AlfrescoRuntimeException: Unknown Exception i
n Transaction.
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransacti
on(RetryingTransactionHelper.java:292)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransacti
on(RetryingTransactionHelper.java:155)
        at org.alfresco.repo.admin.patch.AbstractPatch$1.doWork(AbstractPatch.ja
va:355)
        at org.alfresco.repo.admin.patch.AbstractPatch$1.doWork(AbstractPatch.ja
va:340)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(Au
thenticationUtil.java:260)
        at org.alfresco.repo.admin.patch.AbstractPatch.apply(AbstractPatch.java:
358)
        at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatch(PatchServic
eImpl.java:232)
        at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatchAndDependenc
ies(PatchServiceImpl.java:186)
        at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatchAndDependenc
ies(PatchServiceImpl.java:178)
        at org.alfresco.repo.admin.patch.PatchServiceImpl.applyOutstandingPatche
s(PatchServiceImpl.java:127)
        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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
on(AopUtils.java:281)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
inpoint(ReflectiveMethodInvocation.java:187)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:154)
        at org.springframework.transaction.interceptor.TransactionInterceptor.in
voke(TransactionInterceptor.java:107)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:176)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:210)
        at $Proxy101.applyOutstandingPatches(Unknown Source)
        at org.alfresco.repo.admin.patch.PatchExecuter.applyOutstandingPatches(P
atchExecuter.java:89)
        at org.alfresco.repo.admin.patch.PatchExecuter.onBootstrap(PatchExecuter
.java:132)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLi
fecycleBean.java:62)
        at org.springframework.context.event.SimpleApplicationEventMulticaster$1
.run(SimpleApplicationEventMulticaster.java:77)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecut
or.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.m
ulticastEvent(SimpleApplicationEventMulticaster.java:75)
        at org.springframework.context.support.AbstractApplicationContext.publis
hEvent(AbstractApplicationContext.java:241)
        at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:349)
        at org.springframework.web.context.support.AbstractRefreshableWebApplica
tionContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
        at org.springframework.web.context.ContextLoader.createWebApplicationCon
text(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationConte
xt(ContextLoader.java:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitiali
zed(ContextLoaderListener.java:49)


The InvalidNamEndingPatch.log error:

Caused by: java.io.FileNotFoundException: ./InvalidNameEndingPatch.log (Permissi
on denied)
        at java.io.RandomAccessFile.open(Native Method)
        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
        at org.alfresco.repo.admin.patch.impl.InvalidNameEndingPatch$HibernateHe
lper.<init>(InvalidNameEndingPatch.java:132)
        at org.alfresco.repo.admin.patch.impl.InvalidNameEndingPatch$HibernateHe
lper.<init>(InvalidNameEndingPatch.java:123)
        at org.alfresco.repo.admin.patch.impl.InvalidNameEndingPatch.applyIntern
al(InvalidNameEndingPatch.java:108)
        at org.alfresco.repo.admin.patch.AbstractPatch$1$1.execute(AbstractPatch
.java:350)
        at org.alfresco.repo.admin.patch.AbstractPatch$1$1.execute(AbstractPatch
.java:344)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransacti
on(RetryingTransactionHelper.java:225)
        … 167 more

Outcomes