• Welcome to KonaKart Community Forum. Please login or sign up.
 

dotCMS / Konakart Plugin Integration

Started by sinoea, February 28, 2011, 10:06:08 pm

Previous topic - Next topic

sinoea

Hi there,
I have a few questions regarding the installation of the konakart
plugin with the dotcms.


This is what I have done:

1. I have installed dotcms_1.9.1.3 under C:\dotcms_1.9.1.3
2. Configured database properties in ROOT.xml
3. I have installed KonaKart-5.2.0.0
4. Created an empty database called konakart and imported the konakart_demo.sql file
5. Created an empty database called dotcms
6. Added the konakart plugin under the plugins folder (C:\dotcms_1.9.1.3\plugins\com.konkart)
7. From the root of the project (C:\dotcms_1.9.1.3) I run the "ant deploy-plugins" command to get all generated files
   moved to the WEB-INF/classes and WEB-INF/lib folder
   
   6.1 When the "ant deploy-plugins" command is run, the konakart.properties and the konakart_app.properties are
       never moved to the WEB-INF/classes folder. So I move those two files to WEB-INF/classes folder manually
       before starting the server. I also move the konakart_velocity.properties file to the WEB-INF/classes folder
       (in case it is needed).
   
   6.2 I configure the database properties in the konakart.properties file
   
---------------------------------------------------------------
       
   Now, here is the problem:   
       
1. If I start the server (C:\dotcms_1.9.1.3\bin\startup.bat)
   and leave the starter.zip (C:\dotcms_1.9.1.3\dotCMS\starter.zip)
   that came with the original DOTCMS installation then
   I will see the DOTCMS starter site, not the integrated Konkart plugin.
   
   Even if the konakart_dotcms_1.9.1.3.zip is there (C:\dotcms_1.9.1.3\dotCMS\html\plugins\com.konkart\konakart_dotcms_1.9.1.3.zip)
   and the dotmarketing-config.properties is updated with the following values:
   STARTER_DATA_LOAD=/html/plugins/com.konakart/konakart_dotcms_1.9.1.3.zip
   URLMAP_FALLTHROUGH=false
   
   
2. If I remove the original DOTCMS starter.zip and put the konakart_dotcms_1.9.1.3.zip there.
   C:\dotcms_1.9.1.3\dotCMS\konakart_dotcms_1.9.1.3.zip and then rename konakart_dotcms_1.9.1.3.zip
   to starter.zip and start the server then things work better (I get a few exceptions in the log).
   
   
   

My questions are:
1. Have I missed anything
2. Which is the right way to install a plugin?
   Should I remove the original DOTCMS starter.zip and replace it
   it with the new plugin zip and rename it to starter.zip as I have done
   in option 2 above?
   
   Or leave the original DOTCMS starter.zip there as in option 1.
   It never worked for me, but maybe I have missed something else.
   
   
   
   
Please help, it is important I get this right with a proper install!



Thanks,
Sinoe

trevor

You should follow the instructions in the installation guide within the plugin download kit. I've attached it to this post.

sinoea

Hi Trevor,
that's exactly what I've done.

They mention that I should use deploy-plugins.bat file to deploy the plugins but
it does not seem to work well, so I use the "ant deploy-plugins" command instead.


They never mention that I should remove the DOTCMS starter.zip
that comes with the original DOTCMS installation.

And when I try without removing the original starter.zip
it does not work anyway.
Even if I re-start the server with an empty database,
or re-deploy again with an empty database.

The logs show that the Konakart plugin have been installed
clearly, but the website is not shown, instead I see
the DOTCMS starter site at localhost:8080.


They only way I can get it to work is
to replace the starter.zip with the konakart.zip and
rename the konakart.zip to starter.zip.


This however gives me some exceptions, and this method
is not mentioned in the manual either.


What is the correct procedure?

If the correct procedure is as the manual says,
then it means that the original DOTCMS starter.zip
should NOT be removed.

But it does not work, what could the problem be then.



Regards,
Sinoe

trevor

QuoteThey only way I can get it to work is
to replace the starter.zip with the konakart.zip and
rename the konakart.zip to starter.zip.


I've just checked and apparently this is the correct approach. What exceptions are you getting? Are you using dotCMS 1.9.1.3?

sinoea

Hi Trevor,
yes I use dotcms1.9.1.3, when I start dotcms I get 2 exceptions, the first one is normal
(select * from inode....) and happens the first time a dotcms application
is installed with an empty database.

The other exception is the following:

Cannot add or update a child row: a foreign key constraint fails
(`dotcms`.`plugin_property`, CONSTRAINT `fk_plugin_plugin_property`
FOREIGN KEY (`plugin_id`) REFERNCES `plugin` (`id`)
- Could not syncho database state with session
- Unable to close Session: Unable to close Hibernate Session
com.dotmarketing.exception.DotHibernateException: Unable to close Hibernate Session


(The above exception comes only with the Konakart plugin, it does not happen when it is a single dotcms install without the konakart plugin)

I am not sure how important that exception is, it may or may not be normal, any ideas would be much appreciated.




The third exception comes from the Konakart plugin I believe (it seems to be a Konakart exception):

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
atcher.java:646)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
tionDispatcher.java:436)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
ispatcher.java:374)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
patcher.java:302)
        at org.apache.jsp.index_jsp._jspService(index_jsp.java:98)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at com.dotmarketing.filters.CMSFilter.doFilter(CMSFilter.java:110)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at com.dotmarketing.filters.AutoLoginFilter.doFilter(AutoLoginFilter.jav
a:60)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at com.dotmarketing.cms.urlmap.filters.URLMapFilter.doFilter(URLMapFilte
r.java:245)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at com.dotmarketing.filters.CharsetEncodingFilter.doFilter(CharsetEncodi
ngFilter.java:140)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:465)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
555)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:852)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:48
9)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NumberFormatException: For input string: "nrea"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.
java:48)
        at java.lang.Integer.parseInt(Integer.java:449)
        at org.apache.velocity.runtime.parser.node.ASTStringLiteral.unescape(AST
StringLiteral.java:237)
        at org.apache.velocity.runtime.parser.node.ASTStringLiteral.init(ASTStri
ngLiteral.java:118)
        at org.apache.velocity.runtime.parser.node.SimpleNode.init(SimpleNode.ja
va:313)
        at org.apache.velocity.runtime.parser.node.SimpleNode.init(SimpleNode.ja
va:313)
        at org.apache.velocity.runtime.parser.node.ASTSetDirective.init(ASTSetDi
rective.java:103)
        at org.apache.velocity.runtime.parser.node.SimpleNode.init(SimpleNode.ja
va:313)
        at org.apache.velocity.Template.initDocument(Template.java:204)
        at org.apache.velocity.Template.process(Template.java:125)
        ... 104 more
- ResourceManager.getResource() load exception
java.lang.RuntimeException: Exception thrown processing Template live/14b8d0ac-6
425-48fd-8814-0968842e2457_1.content
        at org.apache.velocity.Template.process(Template.java:154)
        at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource
(ResourceManagerImpl.java:446)
        at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(
ResourceManagerImpl.java:354)
        at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstan
ce.java:1420)
        at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstan
ce.java:1399)
        at org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.jav
a:401)
        at com.dotmarketing.viewtools.VelocityWebUtil.mergeTemplate(VelocityWebU
til.java:40)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.do
Invoke(UberspectImpl.java:389)
        at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.in
voke(UberspectImpl.java:378)
        at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.j
ava:270)
        at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTRefer
ence.java:262)
        at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTRefere
nce.java:342)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java
:72)
        at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfSt
atement.java:87)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java
:72)
        at org.apache.velocity.runtime.directive.VelocimacroProxy.render(Velocim
acroProxy.java:212)
        at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacr
o.java:247)
        at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirect
ive.java:175)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java
:72)
        at org.apache.velocity.runtime.directive.VelocimacroProxy.render(Velocim
acroProxy.java:212)
        at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacr
o.java:247)
        at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirect
ive.java:175)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java
:72)
        at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:366
)
        at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirect
ive.java:175)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.
java:346)
        at org.apache.velocity.Template.merge(Template.java:328)
        at org.apache.velocity.Template.merge(Template.java:235)
        at com.dotmarketing.viewtools.VelocityWebUtil.mergeTemplate(VelocityWebU
til.java:41)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.do
Invoke(UberspectImpl.java:389)
        at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.in
voke(UberspectImpl.java:378)
        at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.j
ava:270)
        at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTRefer
ence.java:262)
        at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTRefere
nce.java:342)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java
:72)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.
java:346)
        at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfSt
atement.java:106)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java
:72)
        at org.apache.velocity.runtime.directive.VelocimacroProxy.render(Velocim
acroProxy.java:212)
        at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacr
o.java:247)
        at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirect
ive.java:175)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.
java:346)
        at org.apache.velocity.Template.merge(Template.java:328)
        at org.apache.velocity.Template.merge(Template.java:235)
        at com.dotmarketing.viewtools.VelocityWebUtil.mergeTemplate(VelocityWebU
til.java:41)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.do
Invoke(UberspectImpl.java:389)
        at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.in
voke(UberspectImpl.java:378)
        at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.j
ava:270)
        at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTRefer
ence.java:262)
        at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTRefere
nce.java:342)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java
:72)
        at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfSt
atement.java:87)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.
java:346)
        at org.apache.velocity.Template.merge(Template.java:328)
        at org.apache.velocity.Template.merge(Template.java:235)
        at com.dotmarketing.velocity.VelocityServlet.doLiveMode(VelocityServlet.
java:538)
        at com.dotmarketing.velocity.VelocityServlet.service(VelocityServlet.jav
a:237)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
atcher.java:646)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
tionDispatcher.java:436)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
ispatcher.java:374)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
patcher.java:302)
        at org.apache.jsp.index_jsp._jspService(index_jsp.java:98)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at com.dotmarketing.filters.CMSFilter.doFilter(CMSFilter.java:110)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at com.dotmarketing.filters.AutoLoginFilter.doFilter(AutoLoginFilter.jav
a:60)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at com.dotmarketing.cms.urlmap.filters.URLMapFilter.doFilter(URLMapFilte
r.java:245)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at com.dotmarketing.filters.CharsetEncodingFilter.doFilter(CharsetEncodi
ngFilter.java:140)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:465)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
555)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:852)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:48
9)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NumberFormatException: For input string: "nrea"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.
java:48)
        at java.lang.Integer.parseInt(Integer.java:449)
        at org.apache.velocity.runtime.parser.node.ASTStringLiteral.unescape(AST
StringLiteral.java:237)
        at org.apache.velocity.runtime.parser.node.ASTStringLiteral.init(ASTStri
ngLiteral.java:118)
        at org.apache.velocity.runtime.parser.node.SimpleNode.init(SimpleNode.ja
va:313)
        at org.apache.velocity.runtime.parser.node.SimpleNode.init(SimpleNode.ja
va:313)
        at org.apache.velocity.runtime.parser.node.ASTSetDirective.init(ASTSetDi
rective.java:103)
        at org.apache.velocity.runtime.parser.node.SimpleNode.init(SimpleNode.ja
va:313)
        at org.apache.velocity.Template.initDocument(Template.java:204)
        at org.apache.velocity.Template.process(Template.java:125)
        ... 104 more
- mergeTemplate









I basically see the Konakart plugin integrated with dotcms at localhost:8080.
It looks almost identical to the one that is live at http://konakart.dotcms.com/

The only difference is that I have an empty list of products under the
"Shop Our Bestsellers" horizontal scrollbar on the home page.

Also, the automatic image slider at http://konakart.dotcms.com/ has 3 slides,
mine only has 2.
The automatic image slider is just below the navigation bar (Home, Software, Hardware, DVD Movies, Gifts).



Any help would be much appreciated.

Thanks,
Sinoe

sinoea

Just a note here, the last exception mentioned only happens when I visit the homepage
of the konakart/dotcms demo integration at localhost.

Other pages are fine, I see no exceptions on the output when I visit other pages.

Regards,
Sinoe

trevor

It looks like it's all working. We've asked the dotCMS team to comment on the exceptions.

-The reason that the bestsellers carousel is empty is because you haven't processed any orders yet.
-No idea why you should only see two images instead of three since that banner should be static. 

sinoea

Thanks,
then it is all OK then.

Regards,
Sinoe

crsbox

Hello!
I've done exactly what you put in the attached document, which is also found in the documentation plugin KonaKart. It happens the same as the previous reviewer: I can not integrate with dotCMS the KonaKart plugin.
DotCMS always appears on the screen, the only error I get was in the first time installation:
WARN - SQL Error: 1062, SQLState: 23000
ERROR - Duplicate entry-F212-'892ab105 407f-8fb4-58ec59310a5e-system 'for key' r
ole_id '
ERROR - Could not synchronize database state with session
WARN - Unknown scope 'null' - Will Be parser request scoped.


But if I restart the dotCMS no longer get this error.


Is there some other explanation for having the dotCMS without KonaKart plugin active? I've done exactly what I read in the txt attached. (I have to say that I suppose that I have to see on the screen the same as displayed on the demo web: http://konakart.dotcms.com/, is that right?)

What I'm doing wrong?

Thanks for your help.