Installing Variman On Already Existing FreeBSD Tomcat

68 views
Skip to first unread message

Bobby Tamburrino

unread,
Jun 19, 2013, 3:17:09 PM6/19/13
to variman...@googlegroups.com
We are exploring running Variman on an already existing FreeBSD Tomcat installation, and the documentation is extremely limited with respect on how to effectively do this.  I am also not too familiar with Tomcat (it was set up before I got here) so I'm beating my head against the wall to do something that is apparently very simple.

I was able to extract the 3.2.3 webapp into our tomcat/webapps directory, and moved the WEB-INF directory to the variman root directory.  This allowed me to see it in the Tomcat manager, and when I click on it, it gives me the screen that tells me what the RETS login URL is.

However, when I try to run "java -jar variman-admin.jar", I get the following:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
        at org.realtors.rets.server.admin.Main.<clinit>(Main.java:228)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.realtors.rets.server.admin.Bootstrap.callMain(Bootstrap.java:47)
        at org.realtors.rets.server.admin.Bootstrap.main(Bootstrap.java:95)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        ... 7 more

Thinking this was it not being able to find log4j, I run the command from the WEB-INF/lib directory, which then gets me here:

Exception in thread "main" java.lang.ClassNotFoundException: org.realtors.rets.server.admin.Main
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at org.realtors.rets.server.admin.Bootstrap.callMain(Bootstrap.java:43)
        at org.realtors.rets.server.admin.Bootstrap.main(Bootstrap.java:95)

There is, most likely, a step I missed that is very obvious to someone even remotely familiar with using Tomcat or JAVA web apps.  If someone could point me in the right direction, that would be great.

Thanks for your time.

Mark Klein

unread,
Jun 19, 2013, 9:33:27 PM6/19/13
to variman...@googlegroups.com
On Jun 19, 2013, at 12:17 PM, Bobby Tamburrino wrote:

> I was able to extract the 3.2.3 webapp into our tomcat/webapps
> directory, and moved the WEB-INF directory to the variman root
> directory. This allowed me to see it in the Tomcat manager, and
> when I click on it, it gives me the screen that tells me what the
> RETS login URL is.
>
> However, when I try to run "java -jar variman-admin.jar", I get the
> following:

That's for the standalone Tomcat server ... you've installed Variman
into an already existing (presumably running) Tomcat environment. You
should now have /usr/local/apache-tomcat-6.0/webapps/variman in place.

> There is, most likely, a step I missed that is very obvious to
> someone even remotely familiar with using Tomcat or JAVA web apps.
> If someone could point me in the right direction, that would be great.

The configuration is nothing more than updating the varman/WEB-INF/
rets/rets-config.xml and variman/WEB-INF/rets/rets-logging.properties
files. Here's my logging first:

# Values: roll_size | roll_daily
# Default: roll_size
#
# roll_size means roll the log file every 10MB. roll_daily means roll
# every day. roll_size keeps 5 files. roll_daily keeps all files and
# required manual clean up.
variman.log.appender = roll_size

# Values: info | debug
# Default: info
#
# Setting to debug enables more logging
variman.log.level = debug

# Values: off | all
# Default: off
#
# Setting to "all" enables separate SQL logging
variman.log.sql_level = off

Change the log level from debug to info.

As for my rets-config.xml - that is more site specific.

<?xml version="1.0" encoding="UTF-8"?>
<rets-config>
<address />
<port>6103</port>
<metadata-dir>/path/to/my/variman/demo_metadata</metadata-dir>
<get-object-root>/path/to/my/variman/sample_metadata1.7.2/images</
get-object-root>
<photo-pattern>%k_%i.jpg</photo-pattern>
<object-set-pattern></object-set-pattern>
<nonce-initial-timeout>-1</nonce-initial-timeout>
<nonce-success-timeout>-1</nonce-success-timeout>
<strict-parsing>true</strict-parsing>
<database>
<type>postgresql</type>
<host>localhost</host>
<name>demo</name>
<username>variman</username>
<password>secret</password>
<max-active>100</max-active>
<max-idle>10</max-idle>
<max-wait>120000</max-wait>
<max-ps-active>100</max-ps-active>
<max-ps-idle>10</max-ps-idle>
<max-ps-wait>120000</max-ps-wait>
<show-sql>false</show-sql>
</database>
<security-constraints />
</rets-config>

That's it. Variman should be running on whatever port you've
configured it to listen on. In my case, I'm running both the
standalone and webapp versions of Variman with the standalone running
on port 6103. The tomcat version is running on port 8180. Using a
libRETS demo program, I can access it as simply as:

[mklein@dis ~/NAR/librets/trunk/build/examples/bin]$ ./login --url http://www.dis.com:8180/variman/rets/login
Logged in
Member name: Joe Schmoe
Search URL: http://www.dis.com:8180/variman/rets/search
Action:

Logged out
Billing information: 0.24
Connect time: 34
Message: Goodbye
[mklein@dis ~/NAR/librets/trunk/build/examples/bin]$





Regards,


M.

--
Mark Klein
PGP Key Available
www.dis.com

Bobby Tamburrino

unread,
Jun 20, 2013, 3:22:03 PM6/20/13
to variman...@googlegroups.com, lib...@dis.com
Thanks so much for your quick reply.  So variman-admin.jar isn't needed at all in my situation?  I was under the assumption that it was the only tool available to add users and modify metadata.

The missing step in the installation, was not having the sample metadata loaded.  I did that manually, both putting it in a directory as well as loading the sample_data.sql into our PostgreSQL database, and modified the rets-config.xml file accordingly.  I'm now able to get a login prompt on our login page, but I don't know Joe's password so I never got any further until I add another user.

Sorry for such the noob questions.  At least I'm farther now than I was yesterday!

Mark Klein

unread,
Jun 20, 2013, 3:56:40 PM6/20/13
to variman...@googlegroups.com, variman...@googlegroups.com, lib...@dis.com
On Jun 20, 2013, at 12:22 PM, Bobby Tamburrino <black...@gmail.com> wrote:

> Thanks so much for your quick reply. So variman-admin.jar isn't needed at all in my situation? I was under the assumption that it was the only tool available to add users and modify metadata.

Ooops, sorry. My mind saw what it wanted to see! If you want to use the GUI, then yes, the jar is needed (and so are a lot of other jars). To make it work, you must use the standalone Variman installation, not the webapp version.


> The missing step in the installation, was not having the sample metadata loaded. I did that manually, both putting it in a directory as well as loading the sample_data.sql into our PostgreSQL database, and modified the rets-config.xml file accordingly. I'm now able to get a login prompt on our login page, but I don't know Joe's password so I never got any further until I add another user.

Joe uses the password "Schmoe" for the sample data.

Also, the manual should help as well.

Regards,

M.
--
To quote my Bro: "Please forgive spelling and grammar mistakes, they're the fault of [his] iPhone."


Bobby Tamburrino

unread,
Jun 20, 2013, 4:07:05 PM6/20/13
to variman...@googlegroups.com, lib...@dis.com, mkl...@dis.com
Thanks a bunch.  There's still some things to figure out on my end here, but they're stuff I feel I can tackle without bugging you guys further.  I was able to login with Joe just fine and see metadata, so that's a great step forward for now.

Thanks again!
Reply all
Reply to author
Forward
0 new messages