2

I m getting this error in core Log file while running Tridion reference implementation website.Stack trace of the error is here

java.lang.ExceptionInInitializerError
        at com.tridion.meta.BinaryMetaFactory.getMetaByURL(BinaryMetaFactory.java:271)
    Caused by: java.lang.RuntimeException: Fatal error, unable to load the StorageManagerFactory
        at com.tridion.storage.StorageManagerFactory.reloadInstance(StorageManagerFactory.java:91)
        at com.tridion.storage.StorageManagerFactory.<clinit>(StorageManagerFactory.java:56)
        ... 1 more
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultdbEntityManagerFactory': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/cfg/ObjectNameNormalizer
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
        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:294)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1093)
        at com.tridion.storage.persistence.JPADAOFactory.configureBundle(JPADAOFactory.java:76)
        at com.tridion.storage.configuration.StorageFactoryConfigurationLoader.configureStorage(StorageFactoryConfigurationLoader.java:91)
        at com.tridion.storage.configuration.StorageFactoryConfigurationLoader.configureStorage(StorageFactoryConfigurationLoader.java:65)
        at com.tridion.storage.configuration.StorageFactoryConfigurationLoader.configure(StorageFactoryConfigurationLoader.java:51)
        at com.tridion.configuration.step.ConfigurationStepLoader.configure(ConfigurationStepLoader.java:47)
        at com.tridion.storage.StorageManagerFactory.configure(StorageManagerFactory.java:137)
        at com.tridion.services.BaseService.<init>(BaseService.java:113)
        at com.tridion.storage.StorageManagerFactory.<init>(StorageManagerFactory.java:104)
        at com.tridion.storage.StorageManagerFactory.reloadInstance(StorageManagerFactory.java:84)
        ... 2 more
    Caused by: java.lang.NoClassDefFoundError: org/hibernate/cfg/ObjectNameNormalizer
        at org.hibernate.ejb.Ejb3Configuration.<clinit>(Ejb3Configuration.java:150)
        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:71)
        at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:257)
        at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
        ... 18 more
    Caused by: java.lang.ClassNotFoundException: org.hibernate.cfg.ObjectNameNormalizer
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 24 more
    Caused by: java.io.EOFException: Detect premature EOF
        at sun.misc.Resource.getBytes(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        ... 31 more
       at Codemesh.JuggerNET.JavaClass.ThrowException(Exception ex)
       at Codemesh.JuggerNET.NTypeValue.Throw(Int64 inst)
       at Codemesh.JuggerNET.JavaClass.ThrowTypedException(Int64 inst)
       at Codemesh.JuggerNET.JavaMethod.CallObject(JavaProxy jpo, JavaMethodArguments args)
       at Com.Tridion.Meta.BinaryMetaFactory.GetMetaByURL(Int32 publicationId, String urlPath)
       at Tridion.ContentDelivery.Meta.BinaryMetaFactory.GetMetaByUrl(Int32 publicationId, String urlPath)
       at DD4T.Providers.SDLTridion2013.TridionBinaryProvider.GetLastPublishedDateByUrl(String url)
       at Sdl.Web.DD4T.Statics.BinaryFileManager.ProcessUrl(String urlPath, Boolean cacheSinceLastRefresh, String physicalPath)`enter code here`

here is cd_storage.config

 <?xml version="1.0" encoding="UTF-8"?>
<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>
      <!-- The Features element specifies classes that add additional functionality to the cache. -->
      <Features>
        <Feature Type="DependencyTracker" Class="com.tridion.cache.DependencyTracker" />
      </Features>
    </ObjectCache>
    <Storages>
      <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="server" />
          <Property Name="portNumber" Value="1433" />
          <Property Name="databaseName" Value="Tridion_Broker" />
          <Property Name="user" Value="TridionBrokerUser" />
          <Property Name="password" Value="password" />
        </DataSource>
      </Storage>

    </Storages>
  </Global>
  <ItemTypes defaultStorageId="defaultdb" cached="false">
  </ItemTypes>  
</Configuration>

Here is all jar files in lib folder

activation.jar
antlr.jar
aopalliance.jar
asm.jar
cd_ambient.jar
cd_broker.jar
cd_cache.jar
cd_core.jar
cd_datalayer.jar
cd_dynamic.jar
cd_linking.jar
cd_model.jar
cd_odata.jar
cd_odata_types.jar
cd_preview_ambient.jar
cd_preview_web.jar
cd_session.jar
cd_tcdl.jar
cd_wai.jar
cd_wrapper.jar
commons-beanutils.jar
commons-collections.jar
commons-configuration.jar
commons-dbcp.jar
commons-digester.jar
commons-fileupload.jar
commons-io.jar
commons-jexl.jar
commons-lang.jar
commons-pool.jar
cwd_cartridge.jar
cwd_engine.jar
cwd_taglib.jar
cwd_transformer.jar
dom4j.jar
easylicense.jar
ehcache.jar
guava.jar
hibernate-commons-annotations.jar
hibernate-core.jar
hibernate-ehcache.jar
hibernate-entitymanager.jar
hibernate-jpa-2.0-api.jar
hsqldb.jar
jackson-core-asl.jar
jackson-jaxrs.jar
jackson-mapper-asl.jar
jackson-xc.jar
javassist.jar
jaxb-api.jar
jaxb-impl.jar
jboss-logging.jar
jboss-transaction-api_1.1_spec.jar jcl-over-slf4j.jar
jdbcpool.jar
jersey-core.jar
jersey-json.jar
jersey-server.jar
jersey-servlet.jar
jettison.jar
json-smart.jar
logback-classic.jar
logback-core.jar
patricia-trie.jar
serializer.jar
slf4j-api.jar
snakeyaml.jar
spring-aop.jar
spring-asm.jar
spring-beans.jar
spring-context.jar
spring-context-support.jar
spring-core.jar
spring-expression.jar
spring-jdbc.jar
spring-orm.jar
spring-tx.jar
sqljdbc4.jar
stax-api.jar
ua-parser.jar
xalan.jar

After Debuging the application in visual studio i m getting System.ArgumentNullException: Value cannot be null error at line 32 in Global.asax.cs file

Line 30:             SiteConfiguration.StaticFileManager = (IStaticFileManager)DependencyResolver.Current.GetService(typeof(IStaticFileManager));
Line 31:             SiteConfiguration.MediaHelper = (IMediaHelper)DependencyResolver.Current.GetService(typeof(IMediaHelper));
Line 32:             SiteConfiguration.Initialize(TridionConfig.PublicationMap);
Line 33:             RegisterRoutes(RouteTable.Routes);
Line 34:             AreaRegistration.RegisterAllAreas(); 

here is dynamic_config file

<?xml version="1.0" encoding="UTF-8"?>
<Configuration Version="7.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="schemas/cd_dynamic_conf.xsd">
  <!-- The URLMappings define the relation between publication id's and domain names. It has optional attribute
            PathScanDepth which defines the deepest level what will be looked into the URI. The default value is 100.
            Values below than 1 will be considered 1.            
    -->
  <!-- <URLMappings PathScanDepth="20" > -->
  <URLMappings>
    <StaticMappings>
      <!-- The Publications element is a container for separate Publication elements. -->
      <Publications>
        <!-- The publication element allows you to specify Publication specific settings.
                 The Id indicates the id of the publication. This should be a number. -->
        <Publication Id="3">
          <!-- The Host element allows you to specify information about the site that
                        can be used to create URLs for Dynamic Links.
                        The following attributes are specified:
                           Domain    The domain of the website, for example www.tridion.com.
                           Port      The port of the website, for instance 8080.
                           Path      The path of the virtual directory of your website.
                           Protocol  The protocol used for the website. -->
          <Host Domain="localhost" Port="80" Protocol="http" Path="" />
        </Publication>
      </Publications>
    </StaticMappings>
    <StorageMapping IdentifyPublicationByProperty="publicationUrl" />
  </URLMappings>
  <!-- This node configures the renderer used by the tcdl engine. You can define here custom renderer
    of the tcdl tags.
    -->
  <TCDLEngine>
    <Properties>
    </Properties>
  </TCDLEngine>
</Configuration>
14
  • Can you share some details of your cd_storage_conf.xml, since it looks like there is an issue with the configuration of your database in there. Commented Sep 26, 2014 at 11:48
  • ClassNotFoundException usual indicates just that; one or more jar files are missing. Double check what hibernate*.jar files are in the bin/lib folder of the web app...
    – Will Price
    Commented Sep 26, 2014 at 15:05
  • i copied all jar files again which are provided in installation but still getting same error. Commented Sep 28, 2014 at 8:49
  • TridionConfig.PublicationMap is read from /bin/config/cd_dynamic_conf.xml, so for some reason this file is not found or incorrect. That would not be giving you the hibernate error though, so I suspect this is another problem
    – Will Price
    Commented Sep 30, 2014 at 12:46
  • 1
    I manually copy all jar files from my tridion 2013 sp1 installer one by one and now website is working. Commented Oct 2, 2014 at 7:35

3 Answers 3

2

Due to some jar file mismatch i got these error .Manually copy jar files from 2013 sp1 installer i resolve this problem.

1

By the looks of it I think you missed step #5 in the documentation topic Creating the Web application (requires login).

In short, you forgot to install a JDBC driver for your database in the bin\lib\ subfolder of the new Web application.

For example, when you are using a MS SQL server Content Delivery database, you should add the sqljdbc4.jar to the bin\lib\ folder (copy it from one of your Content Delivery Web applications, like the HTTP Upload or OData).

After copying the required jar(s) for your JDBC driver, you will want to recycle te Application Pool of the site and then you can try if it works.

UPDATE

The number of jars seem to match, and your cd_storage_conf.xml look sokay as well, assuming that you do have different property values in your actual one (pointing to your database server and with the correct username and password).

If all these things indeed check out to be correct, I would just delete the entire created webiste, and recreate it via the installation script, as it appears something strage is happening and figuring out what will most likely take a lot longer than to just recreate it through the installer script. Be sure to delete the website and its application pool and just let the installation script do its work again...

5
  • sqljdbc4.jar file is already there in lib folder.i m still getting this error. Commented Sep 26, 2014 at 10:50
  • Hi Bart i did the same as u said but no luck getting same error. Commented Sep 30, 2014 at 6:42
  • @AbdulQadir the java.lang.ClassNotFoundException: org.hibernate.cfg.ObjectNameNormalizer error you are getting indicates an issue connecting to the Broker database, the class mentioned should be available in the hibernate-core.jar so I'm at a loss for what is going wrong. It could be something simple you missed like not having the right username password/connection details for your Broker database in your cd_storage_conf.xml or not having published the content, or there might be an issue accessing the files in your web application (are all DLLs unblocked and accessible for example). Commented Sep 30, 2014 at 7:54
  • i checked database info by creating an odbc connection on server and it is working and content also published in database i checked there are items in ITEMS table of broker database.dlls are also unblocked and accessible.Application identity pool user has full control on application directory. Commented Sep 30, 2014 at 8:28
  • Deployer is also configured on same server and i m using same storage config file for both deployer and website.deployer is working fine i m able to publish content in database. Commented Oct 1, 2014 at 8:24
0

First do some basic validation like

  1. Your cd license is valid.

  2. Check if your website app pool has write permission to website's physical path.

If these are ok , then update your /bin/lib with one you got from your installation

Your Answer

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

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