Hippo Baby Steps - ClassNotFoundException: DomainRuleExtension

153 views
Skip to first unread message

Jayakrishnan R

unread,
Oct 8, 2013, 7:40:35 AM10/8/13
to hippo-c...@googlegroups.com
Hi ,

I was trying to test an issue with HTTPS and wanted to set up an a basic app ( given in Hippo Baby steps tutorial ) instance with Tomcat 7 using the CMS and SITE applications. I used steps given in the tutorial to buid them and deployed them using the Tomcat Web UI. 

CMS application works fine. But the Site application fails in the start up. ( No deployment errors).


 java.lang.ClassNotFoundException: org.onehippo.repository.security.domain.DomainRuleExtension

ERROR - HstSiteConfigServlet       - HstSiteConfigServlet: ComponentManager initialization failed.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.hippoecm.hst.core.jcr.SessionSecurityDelegation' defined in class path resource [org/hippoecm/hst/site/container/SpringComponentManager-jcr.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: [Lorg/onehippo/repository/security/domain/DomainRuleExtension;
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:526)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    at org.hippoecm.hst.site.container.SpringComponentManager.initialize(SpringComponentManager.java:128)
    at org.hippoecm.hst.site.container.HstSiteConfigServlet.initializeComponentManager(HstSiteConfigServlet.java:330)
    at org.hippoecm.hst.site.container.HstSiteConfigServlet.init(HstSiteConfigServlet.java:270)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
    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:633)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:976)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1653)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.NoClassDefFoundError: [Lorg/onehippo/repository/security/domain/DomainRuleExtension;

marijan milicevic

unread,
Oct 8, 2013, 7:48:39 AM10/8/13
to hippo-c...@googlegroups.com

Hi Jayakrishnan,

On Tuesday, October 8, 2013 1:40:35 PM UTC+2, Jayakrishnan R wrote:
Hi ,

I was trying to test an issue with HTTPS and wanted to set up an a basic app ( given in Hippo Baby steps tutorial ) instance with Tomcat 7 using the CMS and SITE applications. I used steps given in the tutorial to buid them and deployed them using the Tomcat Web UI. 

CMS application works fine. But the Site application fails in the start up. ( No deployment errors).


 java.lang.ClassNotFoundException: org.onehippo.repository.security.domain.DomainRuleExtension


this class is located within hippo repository api jar and needs to be placed in tomcat shared directory.
Please see src/main/assembly/distribution.xml  file for deployment layout 

cheers
marijan

Jayakrishnan R

unread,
Oct 8, 2013, 8:06:07 AM10/8/13
to hippo-c...@googlegroups.com
Hi,

You are refering to hippo-repository-api-2.24.04.jar in the shared. Right ?  It's in the shared lib along with other jar.

I opened the jar file and I could not locate the class file.

Any idea ?


--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
Most Hippo developers are active here and/or follow the Stackoverflow [hippo-cms] tag.
 
The old Nabble archive can be found here: http://hippo.2275632.n2.nabble.com/Hippo-CMS-7-f2274273.html
 
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to a topic in the Google Groups "Hippo Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hippo-community/0G65RXHzSvI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hippo-communi...@googlegroups.com.
Visit this group at http://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/groups/opt_out.



--
Thanks & Regards
JK

marijan milicevic

unread,
Oct 8, 2013, 8:14:53 AM10/8/13
to hippo-c...@googlegroups.com
Hi,


On Tuesday, October 8, 2013 2:06:07 PM UTC+2, Jayakrishnan R wrote:
Hi,

You are refering to hippo-repository-api-2.24.04.jar in the shared. Right ?  It's in the shared lib along with other jar.

I opened the jar file and I could not locate the class file.


which version are you running?
if you are on 7.8.4 version, could you add following versions (just add those to the properties section of the root pom.xml):

    <hippo.cms.version>2.24.06</hippo.cms.version>
    <hippo.hst.version>2.26.07</hippo.hst.version>
    <hippo.repository.version>2.24.09</hippo.repository.version>
    <hippo.addon-channel-manager.version>2.24.06</hippo.addon-channel-manager.version>

cheers
marijan

Jayakrishnan R

unread,
Oct 8, 2013, 9:13:01 AM10/8/13
to hippo-c...@googlegroups.com
Hi ,

I think I am on 7.8.4. Because I am starting fresh using the tutorial.

I am using the below
mvn archetype:generate \
-DarchetypeRepository=http://maven.onehippo.com/maven2 \
-DarchetypeGroupId=org.onehippo.cms7 \
-DarchetypeArtifactId=hippo-archetype-website \
-DarchetypeVersion=1.07.04

When I add the four lines that you sent in the pom.xml. The Site application is not getting build properly.  I am getting an error report with surefire-reports.

Following is the exception in it
-------------------------------------------------------------------------------
Test set: org.example.components.DetailTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.578 sec <<< FAILURE!
doBeforeRender_FoundBean(org.example.components.DetailTest)  Time elapsed: 0.485 sec  <<< ERROR!
java.lang.NullPointerException
    at org.hippoecm.hst.component.support.bean.BaseHstComponent.getObjectConverter(BaseHstComponent.java:544)
    at org.hippoecm.hst.component.support.bean.BaseHstComponent.initBeansObjects(BaseHstComponent.java:529)
    at org.hippoecm.hst.component.support.bean.BaseHstComponent.init(BaseHstComponent.java:139)
    at org.example.components.DetailTest.doBeforeRender_FoundBean(DetailTest.java:72)
    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:606)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
    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:606)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)




Arent-Jan Banck

unread,
Oct 8, 2013, 1:23:22 PM10/8/13
to hippo-c...@googlegroups.com
Hi,
You mention having hippo-repository-api-2.24.04.jar in your Tomcat shared lib. This is an older version of the repository API that was part of 7.8.3. You should update your shared classes with the version of your v7.8.4 project, in this case hippo-repository-api-2.24.07.jar. Also check the other shared jars are updated. This to make sure the versions in the web applications match the shared libraries.

Regards,
- AJ


On Tuesday, October 8, 2013 1:40:35 PM UTC+2, Jayakrishnan R wrote:

Jayakrishnan R

unread,
Oct 10, 2013, 9:45:18 AM10/10/13
to hippo-c...@googlegroups.com
Hi AJ,

I was getting the old jar files from Maven.  I just used the newest archetype version. It started working fine.  Used the following script.
mvn archetype:generate \
-DarchetypeRepository=http://maven.onehippo.com/maven2 \
-DarchetypeGroupId=org.onehippo.cms7 \
-DarchetypeArtifactId=hippo-archetype-website \
-DarchetypeVersion=1.07.05


BTW, hippo-repository-api-2.24.09.jar id the file which is now getting downloaded.



--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
Most Hippo developers are active here and/or follow the Stackoverflow [hippo-cms] tag.
 
The old Nabble archive can be found here: http://hippo.2275632.n2.nabble.com/Hippo-CMS-7-f2274273.html
 
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to a topic in the Google Groups "Hippo Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hippo-community/0G65RXHzSvI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hippo-communi...@googlegroups.com.
Visit this group at http://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages