Re: cannot deploy on JBoss 3

2002-05-28 Thread Claas Thiele

Am Montag, 27. Mai 2002 12:14 schrieben Sie:
.
yes html-mail is not a good idea - anyway an answer:

JBoss3RCx has introduced a new Classloader mechanism. This influenced loading 
url protocol handler classes.
So DirContextHandler of Catalina will not be loaded and the url protocol 
jndi: is not working. (in fact it is more complicated...)
Its not visible in stacktrace in your mail, but it seems to be this problem.

There should be an Malformed url exception: could not load url handler for 
protocol jndi:

NOTE: this is true for embedded Catalina only.

What i done is a hack.
it registers the missing protocol in embedded catalina.
it does some other hackisch stuff...

Appended is a patch against rc3 code of jboss3. you have to compile this 
beast - its not an easy job for normal cocoon users.

I sent this patch  to jboss too. maybe somebody reviews that and its in the 
next release. Request-ID is 561405.


Claas Thiele

-- 
Technological Strategy
VIRBUS AG 
Fon +49(0)341-979-7430 
Fax +49(0)341-979-7409 
[EMAIL PROTECTED] 
www.virbus.de

diff -rbBNU 3 /usr/local/devres/JBOSS/jboss-3.0.0RC2/src/jboss-all/catalina/build.xml jboss-all3.0.0RC2/catalina/build.xml
--- /usr/local/devres/JBOSS/jboss-3.0.0RC2/src/jboss-all/catalina/build.xml	Fri Apr 26 18:37:33 2002
+++ jboss-all3.0.0RC2/catalina/build.xml	Tue May 14 14:02:33 2002
@@ -146,6 +146,7 @@
 path id=tomcat.server.classpath
   pathelement path=${tomcat.server.root}/bin/bootstrap.jar/
   pathelement path=${tomcat.server.root}/common/lib/servlet.jar/
+  pathelement path=${tomcat.server.root}/common/lib/naming-resources.jar/
   pathelement path=${tomcat.server.root}/server/lib/catalina.jar/
   pathelement path=${tomcat.server.root}/server/lib/warp.jar/
 /path
diff -rbBNU 3 /usr/local/devres/JBOSS/jboss-3.0.0RC2/src/jboss-all/catalina/src/main/org/jboss/web/catalina/EmbeddedCatalinaServiceSX.java jboss-all3.0.0RC2/catalina/src/main/org/jboss/web/catalina/EmbeddedCatalinaServiceSX.java
--- /usr/local/devres/JBOSS/jboss-3.0.0RC2/src/jboss-all/catalina/src/main/org/jboss/web/catalina/EmbeddedCatalinaServiceSX.java	Fri Apr 26 08:31:06 2002
+++ jboss-all3.0.0RC2/catalina/src/main/org/jboss/web/catalina/EmbeddedCatalinaServiceSX.java	Tue May 14 16:51:58 2002
@@ -94,6 +94,8 @@
 */
private boolean useParentDelegation = true;
 
+   private String contextDir = null;
+
public EmbeddedCatalinaServiceSX()
{
}
@@ -146,10 +148,30 @@
   this.extendedConfig = config;
}
 
+   public String getContextDir()
+   {
+  return this.contextDir;
+   }
+   public void setContextDir(String contextDir)
+   {
+  this.contextDir = contextDir;
+   }
+
public void startService() throws Exception
{
   super.startService();
 
+  //registerurl handler for jndi protocol
+  String handlerPkgs = System.getProperty(java.protocol.handler.pkgs);
+  if (handlerPkgs != null) {
+ handlerPkgs += |org.jboss.web.catalina.net;
+  }
+  else {
+ handlerPkgs = org.jboss.web.catalina.net;
+  }
+  System.setProperty(java.protocol.handler.pkgs, handlerPkgs);
+  
+  
   // Start create the embeded catalina container but don't let it overwrite the thread class loader
   ClassLoader cl = Thread.currentThread().getContextClassLoader();
   ClassLoader parent = cl;
@@ -218,7 +240,12 @@
   }
   log.info(deploy, ctxPath=+ctxPath+, warUrl=+warUrl);
 
-  URL url = new URL(warUrl);
+  URL url = null;
+  if (contextDir != null) {
+ File cDir = new File(contextDir);
+ url = cDir.toURL();
+  } else {
+  url = new URL(warUrl);
   // Catalina needs a war in a dir so extract the nested war
   if( url.getProtocol().equals(njar) )
   {
@@ -234,6 +261,7 @@
  warStream.close();
  log.debug(Unpacked war into dir: +warDir);
  url = warDir.toURL();
+  }
   }
   createWebContext(appInfo, url, webAppParser);
   log.debug(Initialized: +appInfo);
diff -rbBNU 3 /usr/local/devres/JBOSS/jboss-3.0.0RC2/src/jboss-all/catalina/src/main/org/jboss/web/catalina/EmbeddedCatalinaServiceSXMBean.java jboss-all3.0.0RC2/catalina/src/main/org/jboss/web/catalina/EmbeddedCatalinaServiceSXMBean.java
--- /usr/local/devres/JBOSS/jboss-3.0.0RC2/src/jboss-all/catalina/src/main/org/jboss/web/catalina/EmbeddedCatalinaServiceSXMBean.java	Fri Apr 26 08:31:06 2002
+++ jboss-all3.0.0RC2/catalina/src/main/org/jboss/web/catalina/EmbeddedCatalinaServiceSXMBean.java	Tue May 14 16:49:16 2002
@@ -53,4 +53,7 @@
 rather than the servlet 2.3 load from war first model
 */
public void setJava2ClassLoadingCompliance(boolean compliance);
+
+public void setContextDir(String contextDir);
+public String getContextDir();
 }
diff -rbBNU 3 /usr/local/devres/JBOSS/jboss-3.0.0RC2/src/jboss-all/catalina/src/main/org/jboss/web/catalina/net/jndi/Handler.java 

Re: cannot deploy on JBoss 3

2002-05-28 Thread cnsxxx09

JBoss3RCx has introduced a new Classloader mechanism. This influenced loading 
url protocol handler classes.
So DirContextHandler of Catalina will not be loaded and the url protocol 
jndi: is not working. (in fact it is more complicated...)
Its not visible in stacktrace in your mail, but it seems to be this problem.

...that is the problem I get at the moment at home. But I do not get this problem at 
work...basically because I mustn't have set my environment up correctly? (Is there a 
rough JBoss3RCX/Cocoon install guide? do you still need all those files in 
catalina/common/lib ? do you need to then edit web.xml ?) Only when I get the JNDI 
error can I then worry about patching I guess.

There should be an Malformed url exception: could not load url handler for 
protocol jndi:

NOTE: this is true for embedded Catalina only.

What i done is a hack.
it registers the missing protocol in embedded catalina.
it does some other hackisch stuff...

Appended is a patch against rc3 code of jboss3. you have to compile this 
beast - its not an easy job for normal cocoon users.

I sent this patch  to jboss too. maybe somebody reviews that and its in the 
next release. Request-ID is 561405.

..when I posted on JBoss I got suggested to edit my jndi.properties file 

Thanks for the patch...I'll certainly give it a try...

C.
--


__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: cannot deploy on JBoss 3

2002-05-27 Thread John Austin

On Monday 27 May 2002 06:14 am, you wrote:
 htmldiv style='background-color:'DIVHi,/DIV
  ... snip ...

Charles, not everyone reads HTML. I use KMail and have HTML turned off

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: cannot deploy on JBoss 3

2002-05-27 Thread cnsxxx09

Sorry, 

its that mingin' Hotmail...(I can only use KMail from home) - didn't realise it 
defaulted to HTML. In fact no messages came through anyway, so maybe Hotmail is 
barred...

I sent it again from a better accountstill frustrated by 2 days of problems.

C.
--

John Austin [EMAIL PROTECTED] wrote:

On Monday 27 May 2002 06:14 am, you wrote:
 htmldiv style='background-color:'DIVHi,/DIV
  ... snip ...

Charles, not everyone reads HTML. I use KMail and have HTML turned off

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: cannot deploy on JBoss 3

2002-05-27 Thread John Austin

On Monday 27 May 2002 11:11 am, you wrote:
 Sorry,

 its that mingin' Hotmail...(I can only use KMail from home) - didn't
 realise it defaulted to HTML. In fact no messages came through
 anyway, so maybe Hotmail is barred...

 I sent it again from a better accountstill frustrated by 2 days
 of problems.

I would expect that you can only post from the address you used when 
you joined the list. Otherwise, the list server can't know you are a 
valid person.

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: cannot deploy on JBoss 3

2002-05-27 Thread Artur Bialecki


I've tried using cocoon2 with JBoss 2.4.4 and Tomcat 4.0.3 and
couldn't get it to work. When I installed Tomcat 4.0.4b2 everything
worked. I think some other people on this list also had problems
with 4.0.3.

HTML mail == BAD mojo

Artur...


-Original Message-
From: Charles Wishpot [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 27, 2002 6:15 AM
To: [EMAIL PROTECTED]
Subject: cannot deploy on JBoss 3


Hi,

I'm trying to drop the cocoon.war file into the deploy directory of JBoss3 RC1, which 
uses Catalina (TomCat 4.0.3).

But I get the following error (see below) - NullPointerException trying to put the 
default context.

I've tried just deploying the .war file which fails.
So I've tried the install instructions 
(http://xml.apache.org/cocoon/installing/index.html) even though JBoss 3 isn't 
mentioned, for
TomCat 4.0.3 reference but I still get the same problem.
Basically, I tried adding xerces, xalan, xml-apis, batik-libs to the 
catalina/common/lib/ directory - but no joy here, so I also
unjarred cocoon, edited WEB-INF/web.xml and added the extra-classpath param, re-jarred 
it but this made no difference.
I also tried the Catalina reference, removing crimson  jaxp, adding xml-apis to 
jboss/lib and adding it to the classpath when
starting JBoss.

I also tried adding the following to cocoon.xconf, again with no difference:
parameter name=transformer-factory 
value=org.apache.xalan.processor.TransformerFactoryImpl/

I also trawled through the mailing list archives but found nothing that worked.

Does someone have it working and can point me in the right direction? What step have I 
missed?

Many TIA...I have battled for a couple of days with this, but I am running out of 
things to try.

Charles
-=-=-=-

11:40:25,880 ERROR [Engine] StandardContext[/cocoon]: Servlet /cocoon threw load() 
exception
javax.servlet.ServletException: Servlet.init() for servlet Cocoon2 threw exception
snip, snip
11:40:25,885 ERROR [Engine] - Root Cause -
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:380)
at 
org.apache.avalon.framework.context.DefaultContext.put(DefaultContext.java:107)



Send and receive Hotmail on your mobile device: Click Here
- Please check 
that your question has not already been answered
in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail:


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: cannot deploy on JBoss 3

2002-05-27 Thread cnsxxx09

Thanks for the replies (and for not being too rude about accidentally sending HTML 
mail...)

Surely it can't be *that* difficult to get it working in JBoss3/Catalina?
Strangely enough I *did* have it working at home.so I know it can workafter 
battling with problems I ended up getting it working and after the combination of 
things I tried I ended up with the following:
   added cocoon.jar to catalina/lib/
   added xml-apis.jar to jboss/lib/
   added xml-apis.jar to JBOSS_CLASSPATH in run.sh
...maybe none of these made a difference or are needed, or maybe I did something else 
which I cannot remember.

It's possible even that something else running on the same box is conflicting (though 
I've changed most of the default port settings).

If I get it working I'll post back what needs doing

C.
--

Artur Bialecki [EMAIL PROTECTED] wrote:


I've tried using cocoon2 with JBoss 2.4.4 and Tomcat 4.0.3 and
couldn't get it to work. When I installed Tomcat 4.0.4b2 everything
worked. I think some other people on this list also had problems
with 4.0.3.

HTML mail == BAD mojo

Artur...


-Original Message-
From: Charles Wishpot [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 27, 2002 6:15 AM
To: [EMAIL PROTECTED]
Subject: cannot deploy on JBoss 3


Hi,

I'm trying to drop the cocoon.war file into the deploy directory of JBoss3 RC1, which 
uses Catalina (TomCat 4.0.3).

But I get the following error (see below) - NullPointerException trying to put the 
default context.

I've tried just deploying the .war file which fails.
So I've tried the install instructions 
(http://xml.apache.org/cocoon/installing/index.html) even though JBoss 3 isn't 
mentioned, for
TomCat 4.0.3 reference but I still get the same problem.
Basically, I tried adding xerces, xalan, xml-apis, batik-libs to the 
catalina/common/lib/ directory - but no joy here, so I also
unjarred cocoon, edited WEB-INF/web.xml and added the extra-classpath param, 
re-jarred it but this made no difference.
I also tried the Catalina reference, removing crimson  jaxp, adding xml-apis to 
jboss/lib and adding it to the classpath when
starting JBoss.

I also tried adding the following to cocoon.xconf, again with no difference:
parameter name=transformer-factory 
value=org.apache.xalan.processor.TransformerFactoryImpl/

I also trawled through the mailing list archives but found nothing that worked.

Does someone have it working and can point me in the right direction? What step have 
I missed?

Many TIA...I have battled for a couple of days with this, but I am running out of 
things to try.

Charles
-=-=-=-

11:40:25,880 ERROR [Engine] StandardContext[/cocoon]: Servlet /cocoon threw load() 
exception
javax.servlet.ServletException: Servlet.init() for servlet Cocoon2 threw exception
snip, snip
11:40:25,885 ERROR [Engine] - Root Cause -
java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:380)
        at 
org.apache.avalon.framework.context.DefaultContext.put(DefaultContext.java:107)



Send and receive Hotmail on your mobile device: Click Here
- Please check 
that your question has not already been answered
in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail:


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]