I'm sorry to here that. I just tested running the 1.1.1 check out (svn co svn co https://scm.mmbase.org/view/openimages/tags/1.1.1/) and found some flaws in it. I guess I never came around testing Jetty for this release, or runnig the WAR on an empty database.
I've uploaded a new version http://www.openimages.eu/files/OIP-1.1.1.tar.gz
> What exactly are the steps to successfully deploy it?
> 1.I've tried importing from svn.
I can confirm that this now works:
svn co https://scm.mmbase.org/view/openimages/tags/1.1.1/
mvn clean install
mvn jetty:run
http://localhost:8080/oip
Make sure to delete any previous directory 'data', since it can include a lingering Lucene search index or hsqldb files. Running mvn and jetty also works on trunk ('svn co https://scm.mmbase.org/view/openimages/trunk' and repeat the same steps).
> 2.importing from .war
I can even confirm installing oip-1.1.1.war works in apache-tomcat-6.0.26.
- Download http://www.openimages.eu/files/OIP-1.1.1.tar.gz
- Shutdown tomcat if it is running, put the oip-1.1.1.war in tomcat's webapp directory.
- Start tomcat, wait a minute an visit http://localhost:8080/oip-1.1.1
> 3.building it in the command line with maven, launching then the .war
> with jitty and tomcat.
> The closest think i came to was this page http://ubuntuone.com/5awgZExrABYt7chKsvcbWv
That's a message the webapp has not started yet (or got stuck while trying to). If that's with the log you posted previousely http://groups.google.com/group/mmbase-discuss/browse_thread/thread/c7bc4205da464f5?hl=en It may be fixed now.
> Please give me some compact, bullet-point, step-by-step instructions
> on deploying it.
Hope this helps.
---André
--
André van Toly
web http://www.toly.nl mobile +31(0)627233562
irc irc://irc.slashnet.org/#mmbase
twitter twitter://twitter.com/#!/elfuego2
----------------------------------------------------------------~~<<>>~~
Well sure. The first link is to Viewvc and is http (not secure): http://scm.mmbase.org/view/openimages/tags/1.1.1/
The second is to the repository itself and is https (secure).
> 2. jitty gives erros http://pastebin.com/U96v8ANK
You have another application running at port 8080 (from line 73 onwards):
2012-02-14 14:45:24.229::WARN: failed SelectChann...@0.0.0.0:8080
java.net.BindException: Address already in use
Tomcat perhaps?!
> 3. I imported the .war (built by maven, in the terminal)in eclipse and
> run it with tomcat7.0.25. It failed , http://pastebin.com/K9cE2VnX. It
> did start , but with this page again http://ubuntuone.com/5awgZExrABYt7chKsvcbWv
The web application relies on mail. You need to have Java mail installed in Tomcat, from
localhost 2012-02-14 14:53:57,216 INF org.mmbase.module.Module loadInitParameters.338 - Put for mmbaseroot {basename=oi, datasource-context=java:comp/env, datasource=jdbc/MMBase, database=hsqldb_csv}
localhost 2012-02-14 14:53:57,242 ERR org.mmbase.module.Module loadModulesFromDisk.617 - During instantation of 'org.mmbase.applications.email.SendMail' for 'sendmail': javax/mail/MessagingException
java.lang.NoClassDefFoundError: javax/mail/MessagingException
Or comment these line in your context xml (oip-1.1.1.xml or something probably in your directory [tomcat]/conf/Catalina/localhost):
<!-- configuration of how to mail -->
<Environment name="mmbase/sendmail/host" type="java.lang.String" value="smtp.gmail.com"/>
<Environment name="mmbase/sendmail/user" type="java.lang.String" value="mihxiltest"/>
<Environment name="mmbase/sendmail/password" type="java.lang.String" value="mmbase"/>
---André
>
> --
> You received this message because you are subscribed to the Google Groups "mmbase-discuss" group.
> To post to this group, send email to mmbase-...@googlegroups.com.
> To unsubscribe from this group, send email to mmbase-discus...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mmbase-discuss?hl=en.
I believe that when you have a defined libraries to use in a context.xml (probably in this case in [tomcat]/conf/Catalina/localhost/oip-1.1.1.xml) you will have to include those libraries in tomcat's lib directory. See tomcat's documentation for that.
You probably need to copy the jar for HSQL (there is one in your the oip war in WEB-INF/lib/ I think).
I see you already have a jar for MySQL, maybe you can configure your webapp to run against that database?
The database can be configured with a JNDI-resource named
'jdbc/MMBase'. This can in tomcat be done with something like this in
the context xml:
<Environment name="mmbase/mmbaseroot/database"
value="mysql-transactions_with_views" type="java.lang.String" />
<Resource name="jdbc/MMBase"
auth="Container" type="javax.sql.DataSource"
maxActive="5" maxIdle="2" maxWait="10000"
username="mmbase"
password="admin2k"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/beg?autoReconnect=true&useUnicode=true&characterEncoding=utf8"
/>
I would refer to tomcat documentation to find out how exactly that
works (http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html)
. Since tomcat in this case is responsible for the jdbc connections,
it should have the JDBC driver too. It should be put in the
common.loader of tomcat.
IIRC, the example jetty:run configuration should set up everthing
automaticly for use with hsql. But there are at least 2 issues with
this:
1. it uses port 8080, which you seem to use already for something else
2. Open images uses a few newer features of MMBase, which are hardly
tested with hsql.
So although it is more complicated it is better to set up mysql anyway.
--
mihxil' http://meeuw.org
0614591299
nl_NL eo_XX en_US
Jacobjob
On 14-2-2012 20:57, Michiel Meeuwissen wrote:
> 2012/2/14 Alexandru<asa...@gmail.com>:
>> I have a hunch that i need to specify the settings for my db. Where
>> can i do that, if that's the cause.
>
>
It just has defaults for mail and a hsqldb. Rather sensible if you ask me.
> Isn't it a good idea to also have these sensible defaults pre-configured in the OI project context.xml? Also an install.txt or something like that might be handy. Now a newbie is struggling all the time and it might piss him of to use the whole project. Just some ideas.
Install can be found here:
http://scm.mmbase.org/view/openimages/trunk/INSTALL?view=markup
---Cheers, André
>
> Jacobjob
>
>
> On 14-2-2012 20:57, Michiel Meeuwissen wrote:
>> 2012/2/14 Alexandru<asa...@gmail.com>:
>>> I have a hunch that i need to specify the settings for my db. Where
>>> can i do that, if that's the cause.
>>
>>
>> I would refer to tomcat documentation to find out how exactly that
>> works (http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html)
>> . Since tomcat in this case is responsible for the jdbc connections,
>> it should have the JDBC driver too. It should be put in the
>> common.loader of tomcat.
>>
>
> --
> You received this message because you are subscribed to the Google Groups "mmbase-discuss" group.
> To post to this group, send email to mmbase-...@googlegroups.com.
> To unsubscribe from this group, send email to mmbase-discus...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mmbase-discuss?hl=en.
>
--
I think it is 'sensible' to simply require a data source to be
configured. As this is a more or less standard way of doing it.
Providing a preconfigured database would merely mean that one has to
understand how we've done that, because you have to configure it away
then.
The jetty:run target could provide a preconfigured hsql (as I think it
does). This is targeted at developers, but that is sensible too,
because OI is shipped as a site, so I'd say it hardly can be used 'as
is'.
But I do also think that there are some problems with easy deployment
or getting going. I do doubt though whether that is related to
'sensible defaults'.
Andre wrote:
> Install can be found here: http://scm.mmbase.org/view/openimages/trunk/INSTALL?view=markup
I fear that that is not quite accurate? Because it sais that the war
is preconfigured to run hsql. But since the war does not contain the
hsql driver, this is perhaps not really true, because at the very
least that supposes that you installed it in the common.loader (I
didn't test myself whether that would suffice). Of course it _could_
contain the driver, but that would be bit silly too, because this
driver you are _certainly_ not going to use for real.
I think the documentation should simply state 'configure a datesource
named jdbc/MMBase', and make documenting how to do that completely the
responsibility of the container implementation.
Michiel
Op 15 feb. 2012, om 11:47 heeft Alexandru het volgende geschreven:
> @ Jacobjob Koster, i did read the install.txt. It mislead me: there is
> no oip-1.1.xml, nor oip-1.1-1.xml on my system
> $ locate oip-1.1.1.xml //returns nothing.
INSTALL describes the installation of version 1.1. OIP-1.1.1 is the successor to OIP-1.1.
I am sorry I never got around updating INSTALL. You can replace 1.1 with 1.1.1.
> I'm trying to find the context.xml file now. This is what i have:
> $ locate context.xml
With context.xml developers often indicate the xml file that contains the Context description.
Contexts can be also found in server.xml look for <Context> ... </Context>, or in a file next to it in Tomcat's config named context.xml. It can also be included in a webapp, in it's META-INF directory etc. When a WAR is installed Tomcat normally copies it to some location inside it's own config directory like probably config/Catalina/localhost/oip-1.1.1.xml
I believe this is related to the mmbase-mmsite.jar. Maybe it helps to build mmsite yourself.
From the oip project directory, cd to the mmsite directory which is located within the oip project directory and type 'mvn clean install' to build just the mmsite project.
Hope that helps.
---Cheers, André
Great.
> BUT, in my project tree i i receive a lot of errors, and it looks like
> the majority are tag related.
> For example, in web-infblock.jspx i have this line " xmlns:c="http://
> java.sun.com/jsp/jstl/core"" and this is the error "Missing start tag
> for "c:if""
>
> How to fix this?
I don't know of any file by that name. Are you sure it is within OIP or maybe some other project in your development tool (Eclipse?) ?
>
> PS: i can't find any oim-1.1*.xml on my sysyem. I did changed
> oip-1.1.1/WebContent/META-INF/context.xml and it looks like that was
> it.
I don't recognize that directory path, but there is /META-INF/context in the root of the OIP webapp.
---André
You generated that list with Eclipse?
>
>> I don't recognize that directory path, but there is /META-INF/context in the root of the OIP webapp.
>
> Yes, i used that to solve the db problem. Switched it to mysql.
Great.
---André
>
> --
> You received this message because you are subscribed to the Google Groups "mmbase-discuss" group.
> To post to this group, send email to mmbase-...@googlegroups.com.
> To unsubscribe from this group, send email to mmbase-discus...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mmbase-discuss?hl=en.
>
--
Most of those errors are not errors at all, or can safely be ignored.
A few examples:
- Attribute name (onChange) uses wrong case character
: From tinymce, This is not our thing. This should be fixed in tinymce.
- c cannot be resolved to a variable
: This is simply incorrect. Eclipse doesn 't understand the taglib
- EL Syntax Error
: This might be correct. But it is only in a test-jsp. I suppose it
was never used in tomcat 7 or so.
- XML validations warnings.
: some of these may be solvable.
So, for the biggest part of this list I think eclipse is simply
whining, and we shouldn't and/or couldn't do much.
> Btw, a wiki page on setting-up the project with eclipse would be very
> helpful for this project.
> Take a look at opencms http://opencms-wiki.org/Developing_OpenCms_with_Eclipse
> .
> It was a pleasure reading and executing it step by step... though i
> met some difficulties there too, at the end. Just saying.
That might be a good idea, but someone has to make and maintain it.
I'd prefer to simply point to the pom.xml in the IDE (e.g. at least
Netbeans and IntelliJ are quite good at that), and then it should work
out of the box.
Well, perhaps besides the database. Jetty-run should work, but that
would probably not be picked up by an IDE, so I suppose that would
require some manual setting up. So I agree that some more
easy-to-find documentation would be welcome, but I'd find it a bit
disappointing if it wants to be a long recipe.