3

At the time of publishing i get a java.lang.NoClassDefFoundError: Could not initialize class com.tridion.storage.StorageManagerFactory error. I have not able to point out the problem.

Below is the cd_core log information

ERROR DeployPipelineExecutor - Unable to start processing deployment package with transactionId: tcm:0-27-66560 com.tridion.deployer.ProcessingException: Phase: Deployment Processing Phase failed. Could not initialize class com.tridion.storage.StorageManagerFactory at com.tridion.deployer.phases.DeployPipelineExecutor.runMainExecutePhase(DeployPipelineExecutor.java:209) [cd_deployer.jar:na] at com.tridion.deployer.phases.DeployPipelineExecutor.doExecute(DeployPipelineExecutor.java:100) [cd_deployer.jar:na] at com.tridion.deployer.phases.DeployPipelineExecutor.execute(DeployPipelineExecutor.java:64) [cd_deployer.jar:na] at com.tridion.deployer.TransactionManager.handleDeployPackage(TransactionManager.java:82) [cd_deployer.jar:na] at com.tridion.deployer.queue.QueueLocationHandler$1.run(QueueLocationHandler.java:180) [cd_deployer.jar:na] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.7.0_45] at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.7.0_45] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.7.0_45] at java.lang.Thread.run(Unknown Source) [na:1.7.0_45] Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.tridion.storage.StorageManagerFactory at com.tridion.storage.deploy.PageHandler.deploy(PageHandler.java:58) ~[cd_datalayer.jar:na] at com.tridion.deployer.DeploymentHandler.deploy(DeploymentHandler.java:90) ~[cd_datalayer.jar:na] at com.tridion.deployer.modules.PageDeploy.processPage(PageDeploy.java:145) ~[cd_deployer.jar:na] at com.tridion.deployer.modules.PageDeploy.processItem(PageDeploy.java:118) ~[cd_deployer.jar:na] at com.tridion.deployer.SectionVisitor.processSection(SectionVisitor.java:83) ~[cd_deployer.jar:na] at com.tridion.deployer.SectionVisitor.process(SectionVisitor.java:60) ~[cd_deployer.jar:na] at com.tridion.deployer.Processor.process(Processor.java:109) ~[cd_deployer.jar:na] at com.tridion.deployer.workers.ProcessorWorker.doWork(ProcessorWorker.java:77) ~[cd_deployer.jar:na] at com.tridion.deployer.phases.ProcessingPhase.execute(ProcessingPhase.java:73) ~[cd_deployer.jar:na] at com.tridion.deployer.phases.DeployPipelineExecutor.runMainExecutePhase(DeployPipelineExecutor.java:198) [cd_deployer.jar:na]

Here is the CD_Storage config file

<Configuration Version="7.1"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="schemas/cd_storage_conf.xsd">
    <Global>
        <ObjectCache Enabled="false">
            <Policy Type="LRU" Class="com.tridion.cache.LRUPolicy">
                <Param Name="MemSize" Value="16mb"/>
            </Policy>
            <Features>
                <Feature Type="DependencyTracker" Class="com.tridion.cache.DependencyTracker"/>
            </Features>
        </ObjectCache>
        <Storages>
            <StorageBindings>
                <Bundle src="preview_dao_bundle.xml"/>
            </StorageBindings>
            <Wrappers>
                <Wrapper Name="SessionWrapper">
                  <Storage Type="persistence" Id="defaultdb" dialect="MSSQL" Class="com.tridion.storage.persistence.JPADAOFactory">
                    <Pool Type="tridion" Size="10" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120" />
                    <DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
                      <Property Name="serverName" Value="SOGSESDL2013\SQLEXPRESS" />
                      <Property Name="portNumber" Value="1433" />
                      <Property Name="databaseName" Value="Broker_DB" />
                      <Property Name="user" Value="test" />
                      <Property Name="password" Value="" />
                    </DataSource>
                  </Storage>
                </Wrapper>
            </Wrappers>
            <Storage Type="persistence" Id="defaultdb" dialect="MSSQL" Class="com.tridion.storage.persistence.JPADAOFactory">
                <Pool Type="tridion" Size="10" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120" />
                <DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
                    <Property Name="serverName" Value="SOGSESDL2013\SQLEXPRESS" />
                    <Property Name="portNumber" Value="1433" />
                    <Property Name="databaseName" Value="Broker_DB" />
                    <Property Name="user" Value="test" />
                    <Property Name="password" Value="*******" />
                </DataSource>
            </Storage>
            <Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultFile" defaultFilesystem="false">
                <Root Path="C:\Projects" />
            </Storage>
            <Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultDataFile" defaultFilesystem="true" defaultStorage="true">
                <Root Path="C:\Projects\FirstApplication" />
            </Storage>
        </Storages>
    </Global>
    <ItemTypes defaultStorageId="defaultDataFile" cached="false">
        <Item typeMapping="Page" cached="false" storageId="defaultFile"/>
    </ItemTypes>
</Configuration>

Please help.

  • 2
    This is likely to be something in your storage configuration. Could you add a copy of your cd_storage_conf.xml file please? – Jonathan Williams Nov 29 '14 at 13:01
  • 2
    Sounds like you're missing the database driver - sqljdbc4 or ojdbc6. – Nuno Linhares Nov 29 '14 at 13:13
  • 1
    Can you edit your question and add a little more detail, like has publishing worked before or if it is failing when you just tried to set it up? – Bart Koopman Dec 1 '14 at 9:09
  • I added the storage conf which @Tina posted as an answer, assuming it belonged in here (please edit the question to update, don't abuse an answer or comment for that) – Bart Koopman Dec 1 '14 at 13:01
  • we have installed Tridion 2013 recently and after that never able to publish any page. We are always getting this error. – Soubhik Dec 15 '14 at 12:58
4

Thank you for the whole blog chain above. I could figure out the problem in my installation-- the Storage Config File was messed up with duplicate entries and XML Tags!!

Bottom Line as most of you know-- Edit XML file always in the proper XML Editor..I edited that in the Notepad and messed it up! Now fixed with proper config entries.

3

Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.tridion.storage.StorageManagerFactory

This class is found in cd_datalayer.jar; are you sure you have this in the bin/lib folder of the deployer web application?

Update: this error can be caused by a variety of underlying causes but the most common three are:

  • A missing jar file from the bin/lib folder
  • A missing config file from the bin/config folder
  • A misconfigured config file in the bin/config folder

The easiest way to troubleshoot this problem is to compare your setup with a known working setup (from a previous setup you or one of your colleagues did) and see if you are missing any jar or config files.
Next step would be to check if all config files are valid XML and there are no validation errors in the logs. Finally check that you do not have excess configuration statements (like having extra bundles for UGC but you don't have UGC jars will generally throw this kind of exception as well; same as having jars but no config files for these like ambient framwork jars but no cd_ambient_conf).

  • cd_datalayer jar is there in /lib folder. – Soubhik Dec 15 '14 at 12:08
  • Do you have a working setup to compare with? Can you be sure you are not missing any jar files or config files? – Bjørn van Dommelen Dec 15 '14 at 12:56
  • No i don't have any working set. this is a fresh installation.I have checked all the required jar is in the /lib folder. Is it related to and config file not valid here? – Soubhik Dec 16 '14 at 8:31
2

I'm quite sure having two elements in XML with the same ID (defaultdb) makes the document invalid so as a general rule when modifying XML configuration files always as a first step ensure that the file is at least valid XML!

Also: are you using SQL Server Express? This is not officially supported by SDL Tridion which will not help you solve the problem now but it will get you into trouble when you contact SDL support...

  • i have changed the storage.xml file but the same error. is there any jar file missing here? – Soubhik Dec 3 '14 at 9:54
  • I have commented those section which has got the same db instance as you suggested but still got the same error. Aslo i only deploy my pages to the file system only. – Soubhik Dec 15 '14 at 11:04
  • This is the cd_core log for the error------------------------------------------at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.7.0_71] at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.7.0_71] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0_71] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.7.0_71] at java.lang.Thread.run(Unknown Source) [na:1.7.0_71] Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.tridion.storage.StorageManagerFactory – Soubhik Dec 15 '14 at 11:29
1

Looking at the storage config, you are using the exact same database details for the SessionWrapper as you use for the base storage. The Storage Id and Database Name for those two should be different (interesting detail is that on the Session DB you didn't supply a password).

Look at this example extract from a storage config:

<Storages>
  <StorageBindings>
    <Bundle src="preview_dao_bundle.xml"/>
  </StorageBindings>
  <Wrappers>
    <Wrapper Name="SessionWrapper">
      <Storage Type="persistence" Id="sessiondb" dialect="MSSQL" Class="com.tridion.storage.persistence.JPADAOFactory">
        <Pool Type="jdbc" Size="5" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120"/>
        <DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
          <Property Name="serverName" Value="DBSERVER"/>
          <Property Name="portNumber" Value="1433"/>
          <Property Name="databaseName" Value="Tridion_Broker_preview"/>
          <Property Name="user" Value="TridionBrokerUser_preview"/>
          <Property Name="password" Value="********"/>
        </DataSource>
      </Storage>
    </Wrapper>
  </Wrappers>
  <Storage Type="persistence" Id="defaultdb" dialect="MSSQL" Class="com.tridion.storage.persistence.JPADAOFactory">
    <Pool Type="jdbc" Size="10" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120"/>
    <DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
      <Property Name="serverName" Value="DBSERVER"/>
      <Property Name="portNumber" Value="1433"/>
      <Property Name="databaseName" Value="Tridion_Broker_staging"/>
      <Property Name="user" Value="TridionBrokerUser_staging"/>
      <Property Name="password" Value="********"/>
    </DataSource>
  </Storage>
</Storages>

The Session Preview database is a different one than the Broker database which you are publishing to. Both have the same layout, but they should be different databases.

  • I'd be surprised if this is the root cause, since a. the deployer shouldn't care about the session wrapper at all and b. all item types are published to a file system target, so the db storage definition isn't used at all. – Quirijn Dec 1 '14 at 14:16
  • @Quirijn agreed there, it seems there are also other issues. – Bart Koopman Dec 1 '14 at 14:33
  • ok, but what is the real issue here? – Soubhik Dec 16 '14 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.