5

We are getting Java.Lang.RuntimeException error in all the website pages. Following is the snippet from the cd_core log.

I have seen the license file has been commented out from storage config. Could it be a reason? Or is it the cd_linking.jar not available in the lib?

2013-12-04 01:00:35,496 ERROR ComponentLink - Error while constructing linking: Could not initialize class com.tridion.storage.StorageManagerFactory
java.lang.NoClassDefFoundError: Could not initialize class
com.tridion.storage.StorageManagerFactory
    at com.tridion.linking.ComponentLink.init(ComponentLink.java:124) ~[cd_linking.jar:na]
    at com.tridion.linking.ComponentLink.<init>(ComponentLink.java:86) [cd_linking.jar:na]
2013-12-04 01:00:35,496 ERROR ComponentLink - No LinkInfo is found in the bindings, could not retrieve ComponentLinkInfo

UPDATE 1 - As I said, the licence file is commented out.

<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="abc" /> 
  <Property Name="portNumber" Value="test123" /> 
  <Property Name="databaseName" Value="testdb" /> 
  <Property Name="user" Value="testuser" /> 
  <Property Name="password" Value="test" /> 
  </DataSource>
  </Storage>
  </Wrapper>
  </Wrappers>
- <Storages>
- <Storage Type="persistence" Id="TridionDB" 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="xyz" /> 
  <Property Name="portNumber" Value="test" /> 
  <Property Name="databaseName" Value="testdb1" /> 
  <Property Name="user" Value="testuser1" /> 
  <Property Name="password" Value="testpwd" /> 
  </DataSource>
  </Storage>
- <Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="LocalFileSystem" defaultStorage="true" LocalFileSystemsystem="false">
  <Root Path="b:/root/path" /> 
  </Storage>
- <Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="LocalFileSystemData">
  <Root Path="c:/root/path" /> 
  </Storage>
  </Storages>
  </Global>
- <ItemTypes defaultStorageId="TridionDB">
- <!-- 
    <Item typeMapping="Publication" storageId="LocalFileSystem" />
    <Item typeMapping="ComponentPresentation" itemExtension=".Asp" storageId="LocalFileSystem" />
    <Item typeMapping="BinaryMeta" storageId="LocalFileSystem" />
    <Item typeMapping="BinaryVariant" storageId="LocalFileSystem" />
    <Item typeMapping="ComponentMeta" storageId="LocalFileSystem" />
    <Item typeMapping="ComponentPresentationMeta" storageId="LocalFileSystem" />
    <Item typeMapping="ItemMeta" storageId="LocalFileSystem" />
    <Item typeMapping="ComponentPresentation" itemExtension=".Jsp" storageId="LocalFileSystem" />
    <Item typeMapping="LinkInfo" storageId="LocalFileSystem" />
    <Item typeMapping="PageMeta" storageId="LocalFileSystem" />
    <Item typeMapping="Reference" storageId="LocalFileSystem" />
    <Item typeMapping="Schema" storageId="LocalFileSystem" />
    <Item typeMapping="XSLT" storageId="LocalFileSystem" />
    <Item typeMapping="ComponentPresentation" itemExtension=".Txt" storageId="LocalFileSystem" />
    <Item typeMapping="ComponentPresentation" itemExtension=".Xml" storageId="LocalFileSystem" />
    <Item typeMapping="Page" storageId="LocalFileSystem" />
    <Item typeMapping="Binary" storageId="LocalFileSystem" />

  --> 
  </ItemTypes>
- <!-- 
 Specifies the location of the license file. 
    <License Location="cd_licenses.xml"/>
  --> 
UPDATE 2 - 
<! --DD4T-->  
<Publication  Id="42" d efaultStorageId="Tri dionDB" cached="fale">    
<Item  storageId ="defaultFile" typeMapping="Binary" cached="true"  />
12
  • are there any other warnings or errors before this in your logfile. Could you also post your storage config file. You should off course also make sure all of the necessary jar files are in your lib folder (check the install documentation) Dec 5, 2013 at 10:42
  • 1
    The error mentions lines 124 and 86 of ComponentLink.java so your cd_linking.jar is definitely found. But it could not initialize class com.tridion.storage.StorageManagerFactory so it seems you have an error in your storage cd_storage_conf.xml, could you edit your question and add your Storages and ItemTypes configuration? Dec 5, 2013 at 11:01
  • I have updated the storage config in my question.
    – user833
    Dec 5, 2013 at 11:28
  • Have you updated or changed the Java version recently? I have found that NoClassDefFoundError is usually related to java not behaving well on the system.
    – robrtc
    Dec 5, 2013 at 11:39
  • 2
    That is not valid XML that you've pasted there. Is that an exact copy from the file? If so, it's no wonder you are getting that error :) If it's just a paste error to StackExchange, could you update it with a copy directly from the file (i.e. open it in a text editor)? As an example, it has a bunch of "-" signs next to some elements and it's missing the end Configuration tag. Dec 5, 2013 at 16:44

4 Answers 4

5

I have received this error earlier when automatic update of JDK have corrupted my existing java installation.

Just go to the command line on the server and execute java -version command and verify whether the installed java is correct version and is working perfectly fine.

If after executing the java -version command you receive NoClassDefFoundError error, manually un-install and re-install java on your server.

Do this for both 32-bit as well as 64-bit installations.

1
  • 1
    we have other websites hosted on the same server as this site. Shouldn't it impact all the sites running in the same Java installation? I am asking this as the other sites are fine.
    – user833
    Dec 5, 2013 at 12:27
2

Yes, as the comment above. But i'm recommending to setup a single location for the license file and then point to it from all the places where it's needed. In your case, open up cd_link_conf.xml and add this just before the < Configuration/>:

<License Location="C:/Your/path/cd_licenses.xml"/>
2
  • If you add that line to your configs, is it safe to remove the cd_licenses.xml file from everywhere except that centralized location?
    – Matt
    Dec 17, 2013 at 20:13
  • Well, i depends, if you add this line in all your tridion config files you will rely on that centralized one!
    – Berka
    Jan 7, 2014 at 13:30
1

This could also be a simple missing JAR problem.

The error is a bit confusing, but it could be that class com.tridion.storage.StorageManagerFactory can't be found. Make sure you have JAR cd_datalayer.jar among your other JARs in the /lib folder.

You don't have to have the License node in your config, as long as there is a cd_licenses.xml file in your /classes folder (or somewhere in your classpath).

1
  • cd_datalayer.jar is present in the website. Actually the Storage configuration of the Deployer is pointing to a diff location from the website. I have asked to make the website's storage in sync with deployer. Will update further.
    – user833
    Dec 6, 2013 at 14:12
1

I had this error But in a different scenario and I figured out that my cd_license was expired.

So for once do validate your cd_license.xml.

This might fix your problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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