[Resin-interest] class loader question on linux?

2008-01-11 Thread Vic Cekvenich
I wonder if someone on the list has an idea as to what to try in this situation.
I used to in resin 2.x use the "class loader hack" config, not sure now why. I 
now have potentially a class loader issue loading native code, but ... no hints 
I get from logs.
The code bellow I am using, works great in Resin nightly on windoze in the 
container. It works great on Linux (Fedora 7) in Java outside of resin servlet.
But it fails to ... parse when inside the resin container, it just returns 
blank and no traces or logs.
One time it said: 
UnsatisfiedLinkError: Native Library already loaded in another 
classloader

But no errors anymore show up. In any case I moved needed loading jars to 
resin/lib and .so files are in LD_PATH and CLASSPATH. 

I wonder what I should try to debug? Anyone?
Even if there's a link on the resin 3.x classloader "hack" if any, or .. a link 
to educate me more on native java integration or on how to hook up remote resin 
to debug,jconsole,jmx or to slap me for a something silly.

There is some google on resin's class loader and on the error I got above once 
but not more. Again works on Windoze and on linux outside of the container

Stumped,

.V
ps: here is the class, basically a System.Load.

boolean isParsing = false;
static boolean isInitialized = false;
DomDocumentBuilder domBuilder = new DomDocumentBuilder();
private static String MInitializedJvmProperty = "MParser.Initialized";

/**
 * initialize the XPCOM embedded components with the proper
 * components base directory
 * 
 * @param componentBase

 */
private synchronized static native void initXPCOM(String componentBase) 
throws ParserInitializationException;

/**
 * Native function. parse an html function using m parser and
 * make callbacks to the java local sink ( DomDocumentBuilder for that
 * matter)
 * 
 * @param html
 *HTML to parse.
 * @throws ParserInitializationException
 */
public native void parseHtml(String html)   throws 
ParserInitializationException;

/**
 * 
 * A callback is being made from native code to this function.
 * 
 * @param domOperation
 * @param domArgument
 */
public synchronized void callback(String domOperation, String 
domArgument) 
{
// System.out.println("called back with :"+domOperation +" " + 
domArgument );
domBuilder.addInstruction(domOperation, domArgument);
}

public Document parse(String html) throws DocumentException
{

this.domBuilder.reset();
try
{
this.parseHtml(html);
}
catch (Throwable e)
{
System.err.println("Warning: could not parse html :" + 
e.getMessage());
throw new DocumentException(e);
}
return this.domBuilder.buildDocument();
}

public void dump() {
this.domBuilder.dump();
}

/**
 * Initialize the parser with a DLL to load and 
 * component base
 * 
 * @param dllToLoad
 * @param componentsBase
 * @throws ParserInitializationException
 */
public static void init(String parserLibrary, String componentsBase)
{
String initialized = System.getProperty(MnitializedJvmProperty);
System.out.println("loaded  " + initialized );
if (initialized == null) 
{
System.setProperty(MInitializedJvmProperty, "true");
}
else 
{
System.err.println("Warning : Parser detected an 
additional attempt to initialize XPCOM. operation ignored.");
return;
}
try
{
//ClassLoader sysCl = 
ClassLoader.getSystemClassLoader();

System.load(parserLibrary);
initXPCOM(componentsBase);
System.out.println("loaded");
}
catch (Exception e)
{
e.printStackTrace();
System.err.println("Warning:Could not load library 
"+parserLibrary);

}

}

/**
 * @return
 */
public Vector getDomBuilderArguments() {
return this.domBuilder.getInstructions();

}

}





  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs



Re: [Resin-interest] new snapshot available

2008-01-11 Thread Vic Cekvenich
Great, thx.

.V

- Original Message 
From: Scott Ferguson <[EMAIL PROTECTED]>
To: General Discussion for the Resin application server 

Sent: Friday, January 11, 2008 2:08:29 PM
Subject: [Resin-interest] new snapshot available


A new snapshot is available.  We've just finished week 4 of the 8- 
week release cycle for 3.1.5, so there's another 4 weeks to go.

The snapshot is still a bit unstable do to the configuration changes,  
but a number of people have been asking for it to check on some bug  
fixes.

The snapshot is also available using maven2 at http://caucho.com/m2- 
snapshot.  There's a wiki page at http://wiki.caucho.com/Maven2.

Also, the snapshot includes the struts2 integration with Resin's IoC  
injection.  The wiki page is at http://wiki.caucho.com/Struts2.

-- Scott


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





  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs


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


Re: [Resin-interest] mod_rewrite question

2008-01-11 Thread Arthur Naylor

hello !!

i've read elsewhere that this should work fine but am not able to get  
the mod_rewrite condition and rule to affect the serving of resin's  
404 instead of my default image ...


any leads would be very helpful

thanks !!


On Jan 11, 2008, at 9:10 AM, Arthur Naylor wrote:


hello !!

am trying to use apache's mod_rewrite for missing JPGs using a
default JPG ...

my .htaccess file has ...

RewriteEngine on

RewriteBase /

# missing images
RewriteCond %{REQUEST_URI} !-U
RewriteRule .*\.jpg$ /assets/default.jpg [L,PT]

but resin is still sending back its 404 ... when i request a missing
JPG from a page on the site ...

any ideas ???


___
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] new snapshot available

2008-01-11 Thread Scott Ferguson
A new snapshot is available.  We've just finished week 4 of the 8- 
week release cycle for 3.1.5, so there's another 4 weeks to go.

The snapshot is still a bit unstable do to the configuration changes,  
but a number of people have been asking for it to check on some bug  
fixes.

The snapshot is also available using maven2 at http://caucho.com/m2- 
snapshot.  There's a wiki page at http://wiki.caucho.com/Maven2.

Also, the snapshot includes the struts2 integration with Resin's IoC  
injection.  The wiki page is at http://wiki.caucho.com/Struts2.

-- Scott


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


Re: [Resin-interest] 3.1.4 fails to compile on OSX Leopard 10.5

2008-01-11 Thread ries van Twisk

Hey,

the compilation works just fine here.

If you want to compile resin itself, then use ant to build it.

Ries

On Jan 11, 2008, at 9:23 AM, Vinny wrote:


Hello All,
After running configure for resin 3.1.4 . I get the following  
compile error running make:


$ make
(cd modules/c/src; make)
for dir in common   resin_os; do (cd $dir; make); done
gcc -c -I/usr/include -g -O2 -DPOLL -D_POSIX_PTHREAD_SEMANTICS - 
DHAS_SOCK_TIMEOUT stream.c
/var/folders/Z8/Z8028UEp2ReCWE+BYurv5TM/-Tmp-// 
cc6DnnVQ.s:unknown:FATAL:can't create output file: stream.o

make[2]: *** [stream.o] Error 1
gcc -g -O2 -DPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT  - 
D_FILE_OFFSET_BITS=64 -DRESIN_HOME=\"/usr/local/resin- 3.1.4\" -I/ 
usr/include -I/System/Library/Frameworks/JavaVM.framework/Headers - 
I../common -DCPU=\"i386\" -DOS=   -c -o jni_os.o jni_os.c
/var/folders/Z8/Z8028UEp2ReCWE+BYurv5TM/-Tmp-// 
ccBBD6NT.s:unknown:FATAL:can't create output file: jni_os.o

make[2]: *** [jni_os.o] Error 1
make[1]: *** [plugins] Error 2
make: *** [all] Error 2


--
The Street Programmer http://streetprogrammer.com  
___

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


--
Ries van Twisk
Freelance TYPO3 Developer
email: [EMAIL PROTECTED]
web:   http://www.rvantwisk.nl/
skype: callto://r.vantwisk
Phone: + 1 810-476-4193







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


[Resin-interest] LDAP and resin

2008-01-11 Thread Vinny
Do any of the 2 authentication schemes for LDAP (JndiLoginModule or
LdapAuthenticator)
support either "simple" or "anonymous" authentication?
The docs are kind of thin in that regard.

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


[Resin-interest] 3.1.4 fails to compile on OSX Leopard 10.5

2008-01-11 Thread Vinny
Hello All,
After running configure for resin 3.1.4 . I get the following compile error
running make:

$ make
(cd modules/c/src; make)
for dir in common   resin_os; do (cd $dir; make); done
gcc -c -I/usr/include -g -O2 -DPOLL -D_POSIX_PTHREAD_SEMANTICS
-DHAS_SOCK_TIMEOUT stream.c
/var/folders/Z8/Z8028UEp2ReCWE+BYurv5TM/-Tmp-//cc6DnnVQ.s:unknown:FATAL:can't
create output file: stream.o
make[2]: *** [stream.o] Error 1
gcc -g -O2 -DPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT
-D_FILE_OFFSET_BITS=64 -DRESIN_HOME=\"/usr/local/resin-3.1.4\"
-I/usr/include -I/System/Library/Frameworks/JavaVM.framework/Headers
-I../common -DCPU=\"i386\" -DOS=   -c -o jni_os.o jni_os.c
/var/folders/Z8/Z8028UEp2ReCWE+BYurv5TM/-Tmp-//ccBBD6NT.s:unknown:FATAL:can't
create output file: jni_os.o
make[2]: *** [jni_os.o] Error 1
make[1]: *** [plugins] Error 2
make: *** [all] Error 2


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


[Resin-interest] (no subject)

2008-01-11 Thread Arthur Naylor
hello !!

am trying to use apache's mod_rewrite for missing JPGs using a  
default JPG ...

my .htaccess file has ...

RewriteEngine on

RewriteBase /

# missing images
RewriteCond %{REQUEST_URI} !-U
RewriteRule .*\.jpg$ /assets/default.jpg [L,PT]

but resin is still sending back its 404 ... when i request a missing  
JPG from a page on the site ...

any ideas ??? 


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