[Resin-interest] How to load jars dynamically in Resin 3.1?

2009-10-08 Thread Anders Nordby
Hi,

I have a long list of jar files I want to include without specifying
each and everyone of them in resin.conf. I tried:

- by using a autogenerated stub jar with MANIFEST.MF to load the
requested class-path. But it doesn't seem like Resin loads it, and
Java complains:

java -jar anders.jar
Failed to load Main-Class manifest attribute from
anders.jar

In anders.jar I have anders.class with public class anders and a
META-INF/MANIFEST.MF that looks like:

Manifest-Version: 1.2
Main-Class: anders
Created-By: 1.4.1_01 (Sun Microsystems Inc.)
Class-Path: /foo/jar1.jar /foo/jar2.jar /foo/jar3.jar

- by generating a resin.conf.jars with a list of jars:

  jvm-classpath/foo/jar1.jar/jvm-classpath
  jvm-classpath/foo/jar2.jar/jvm-classpath
  jvm-classpath/foo/jar3.jar/jvm-classpath

And loading it in server-default section in resin.conf:

resin:import path=${resin.home}/conf/resin.conf.jars/

Then Resin complains:

/usr/local/resin/conf/resin.conf:130: resin:import is
an unexpected tag (parent server-default starts at 90).

- the same with the import statement in one level up. Then Resin
complains like this:

/usr/local/resin/conf/resin.conf.jars:1: jvm-classpath is an
unexpected top-level tag.

- by using fileset:

/usr/local/resin/conf/resin.conf:150: fileset is an unexpected tag
(parent server-default starts at 90).
150:   fileset dir=/opt/blabla/bob/libinclude
name=*.jar/fileset

Any clues?

It seems Resin does not like me today. :-(

Regards,

-- 
Anders Nordby
Media Norge ASA, Serverdrift/IT
Postboks 1, 0051 Oslo

Epost: anders.nor...@aftenposten.no, a...@ap.no
Tlf.: +47 22864083
Fax: +47 22864074



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] How to load jars dynamically in Resin 3.1?

2009-10-08 Thread Anders Nordby
Hi,

Seems a better day today. Just use tree-loader... Sigh.

Mvh,

-- 
Anders Nordby
Media Norge ASA, Serverdrift/IT
Postboks 1, 0051 Oslo

Epost: anders.nor...@aftenposten.no, a...@ap.no
Tlf.: +47 22864083
Fax: +47 22864074

On Thu, Oct 08, 2009 at 12:33:15PM +0200, Anders Nordby wrote:
 Hi,
 
 I have a long list of jar files I want to include without specifying
 each and everyone of them in resin.conf. I tried:
 
 - by using a autogenerated stub jar with MANIFEST.MF to load the
 requested class-path. But it doesn't seem like Resin loads it, and
 Java complains:
 
 java -jar anders.jar
 Failed to load Main-Class manifest attribute from
 anders.jar
 
 In anders.jar I have anders.class with public class anders and a
 META-INF/MANIFEST.MF that looks like:
 
 Manifest-Version: 1.2
 Main-Class: anders
 Created-By: 1.4.1_01 (Sun Microsystems Inc.)
 Class-Path: /foo/jar1.jar /foo/jar2.jar /foo/jar3.jar
 
 - by generating a resin.conf.jars with a list of jars:
 
   jvm-classpath/foo/jar1.jar/jvm-classpath
   jvm-classpath/foo/jar2.jar/jvm-classpath
   jvm-classpath/foo/jar3.jar/jvm-classpath
 
 And loading it in server-default section in resin.conf:
 
 resin:import path=${resin.home}/conf/resin.conf.jars/
 
 Then Resin complains:
 
 /usr/local/resin/conf/resin.conf:130: resin:import is
 an unexpected tag (parent server-default starts at 90).
 
 - the same with the import statement in one level up. Then Resin
 complains like this:
 
 /usr/local/resin/conf/resin.conf.jars:1: jvm-classpath is an
 unexpected top-level tag.
 
 - by using fileset:
 
 /usr/local/resin/conf/resin.conf:150: fileset is an unexpected tag
 (parent server-default starts at 90).
 150:   fileset dir=/opt/blabla/bob/libinclude
 name=*.jar/fileset
 
 Any clues?
 
 It seems Resin does not like me today. :-(
 
 Regards,
 
 -- 
 Anders Nordby
 Media Norge ASA, Serverdrift/IT
 Postboks 1, 0051 Oslo
 
 Epost: anders.nor...@aftenposten.no, a...@ap.no
 Tlf.: +47 22864083
 Fax: +47 22864074
 
 
 
 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] Caucho vs. Rewrite/Alias priority

2008-08-27 Thread Anders Nordby
Hi,

I am using Apache in front of Resin with mod_cacho to give requests to
Resin. My problem is that Resin seems to answer for all requests, making
Apache ignore whatever Alias/RewriteRules I set up. This may be related
to the fact that we are having a ROOT web-app (by using context-root
/ in application.xml in a .ear file). I can not easily define all the
URLs served by Resin, as there are many (so I don't have a list of apps
to be served by Resin in the Apache config), but I do in some cases
really want to control what happens in Apache. How can I do that? I
tried changing the order of when mod_caucho is loaded relative to
mod_rewrite and mod_alias, but it did not help unfortunately.

Any ideas/hints?

PS: I'm using Resin 3.0.25 and Apache 2.2.3.

Bye,

-- 
Anders Nordby
Aftenposten AS, UNIX/nettverksavd. (IT)
Postboks 1, 0051 Oslo

Epost: [EMAIL PROTECTED], [EMAIL PROTECTED]
Tlf.: +47 22864083
Fax: +47 22864074


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Caucho vs. Rewrite/Alias priority

2008-08-27 Thread Anders Nordby
Hi,

Just a small follow-up. By using sections like this in a host block in
resin.conf, I can convince mod_caucho to let Apache respond for some
URLs instead of Resin:

web-app id='/multimedia' document-directory='/data/tmp/op/multimedia'
servlet-mapping url-pattern='/multimedia/*'
   servlet-name='plugin_ignore'/
/web-app

But why do I have to do this? I wish that Alias and RewriteRules in
Apache could override mod_caucho. Is there a better way to do this?

Anders.

On Wed, Aug 27, 2008 at 01:02:14PM +0200, Anders Nordby wrote:
 I am using Apache in front of Resin with mod_cacho to give requests to
 Resin. My problem is that Resin seems to answer for all requests, making
 Apache ignore whatever Alias/RewriteRules I set up. This may be related
 to the fact that we are having a ROOT web-app (by using context-root
 / in application.xml in a .ear file). I can not easily define all the
 URLs served by Resin, as there are many (so I don't have a list of apps
 to be served by Resin in the Apache config), but I do in some cases
 really want to control what happens in Apache. How can I do that? I
 tried changing the order of when mod_caucho is loaded relative to
 mod_rewrite and mod_alias, but it did not help unfortunately.
 
 Any ideas/hints?
 
 PS: I'm using Resin 3.0.25 and Apache 2.2.3.
 
 Bye,
 
 -- 
 Anders Nordby
 Aftenposten AS, UNIX/nettverksavd. (IT)
 Postboks 1, 0051 Oslo
 
 Epost: [EMAIL PROTECTED], [EMAIL PROTECTED]
 Tlf.: +47 22864083
 Fax: +47 22864074
 
 
 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest

-- 
Anders Nordby
Aftenposten AS, UNIX/nettverksavd. (IT)
Postboks 1, 0051 Oslo

Epost: [EMAIL PROTECTED], [EMAIL PROTECTED]
Tlf.: +47 22864083
Fax: +47 22864074


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest