cancel
Showing results for 
Search instead for 
Did you mean: 

alfresco database nuked

farkerhaiku
Champ in-the-making
Champ in-the-making
While I have an enterprise license, I'm using community edition in order to be on the same page as Jeff Potts in all of his guides.  I was having trouble with a web script, so I went to enable WebScript logging.  Changed the value from "off" to "warn".  Stop and restart tomcat.  alfresco does not restart. 

Eventually I figure out that that all of the database information is now gone?  \d shows that there is No alfresco user?  No alfresco table?  Has anyone encountered anything like this before?  What the heck just happened?

I'm not that concerned about restoring my dev environment ultimately - I've been saving all my web scripts in my git repo and all my data is garbage data for testing.  What I am concerned about, is the possibility of losing all my production data.

Is there anyone here who can lay my mind at ease or should I take a step back and re-evaluate Alfresco?
4 REPLIES 4

mrogers
Star Contributor
Star Contributor
There's nothing that will delete your data other than an drop of the database.

Something very strange has happened, but there's not enough detail in your posting to diagnose.

Anyway the lesson to learn for any IT system that you care about is to make sure your data is backed up.

farkerhaiku
Champ in-the-making
Champ in-the-making
The lesson I learned is, don't ask questions on forums without expecting snarky answers.  Of course I backed everything up.  I said so in my original post.

I imagine I incorrectly shut some things down yesterday.  I have no idea what would cause the installation to go so badly south after that, but I would like to see if anyone can reproduce this bug:

Clean install.
Start everything up. 
Create a site.
Shut everything down.
Enable web scripts by changing log4j.logger.org.springframework.extensions.webscripts.ScriptDebugger in /Applications/alfresco-4.2.c/tomcat/webapps/alfresco/WEB-INF/classes/log4j.properties from off to debug
as suggested here:
http://wiki.alfresco.com/wiki/3.0_Web_Scripts_Framework#Logging

Start alfresco using sudo alfresco.sh start.
Alfresco explorer does not start and the catalina.out has the following entry.

2013-02-01 09:45:30,218  ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scriptDebugger' defined in URL [jar:file:/Applications/alfresco-4.2.c/tomcat/webapps/alfresco/WEB-INF/lib/spring-webscripts-1.2.0-SNAPSHOT.jar!/org/springframework/extensions/webscripts/spring-webscripts-application-context.xml]: Invocation of init method failed; nested exception is java.awt.HeadlessException
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:963)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1600)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
Caused by: java.awt.HeadlessException
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
    at java.awt.Window.<init>(Window.java:535)
    at java.awt.Frame.<init>(Frame.java:420)
    at javax.swing.JFrame.<init>(JFrame.java:224)
    at org.mozilla.javascript.tools.debugger.SwingGui.<init>(SwingGui.java:152)
    at org.springframework.extensions.webscripts.ScriptDebugger$AlfrescoGui.<init>(ScriptDebugger.java:165)
    at org.springframework.extensions.webscripts.ScriptDebugger.activate(ScriptDebugger.java:86)
    at org.springframework.extensions.webscripts.ScriptDebugger.start(ScriptDebugger.java:67)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
    … 27 more
Feb 01, 2013 9:45:30 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scriptDebugger' defined in URL [jar:file:/Applications/alfresco-4.2.c/tomcat/webapps/alfresco/WEB-INF/lib/spring-webscripts-1.2.0-SNAPSHOT.jar!/org/springframework/extensions/webscripts/spring-webscripts-application-context.xml]: Invocation of init method failed; nested exception is java.awt.HeadlessException

andy
Champ on-the-rise
Champ on-the-rise
Hi

The only obvious explanation for missing data is it is not where you think it is (so check the config)
or it has been dropped/lost outside of Alfresco.

As to your debug issue - the initialisation has failed as there is no where to display the debugger.
Caused by: java.awt.HeadlessException
Your display is not set correctly.

Andy