Re: Confused About Realms

2003-01-03 Thread Lajos Moczar
Jeff -

You'll need to change the DTD for Cocoon's web.xml to version 2.3, thusly:

http://java.sun.com/dtd/web-app_2_3.dtd";>

Cheers,

Lajos

--
galatea.com
Cocoon training, consulting & support
Book: Cocoon Developer's Handbook (SAMS)

Jeff Sexton wrote:

I seem to solve my own problems frequently after posting to this list...

I moved the Sybase jar file from $CATALINA_HOME/lib to
$CATALINA_HOME/common/lib and it worked.  It seems that Cocoon's
connection pools can function with the jar in the root lib, but realms can
not.  Moving the jar to common/lib allows both realms and the connection
pool to work.

However now I have a new question.  I really want to password protect
cocoon URLs.  I added a  to webapps/cocoon/web.xml,
but this breaks cocoon.

Anyone know the correct way to use realms for cocoon?

On Fri, 3 Jan 2003, Jeff Sexton wrote:


Today I wanted to try a Tomcat security setup.  I created and populated
tables in a (Sybase) database and edited server.xml per examples in the
Goodwill Apress book.

I get an exception on startup, Tomcat fails to initialize.  I didn't
expect this because I am also running Cocoon with a connection pool, so I
know that it can find the Sybase JDBC jar.  I also know that the host,
socket and login are correct.

I hope someone can give me a tip on the exception.  Is the jar not found
until later in the startup process?

Here is the server.xml entry:



I also added entries to web.xml for my apps, but it doesn't seem to be
getting there?

Here is the exception from catalina.out:

Starting service Tomcat-Standalone
Apache Tomcat/4.0.4
Catalina.start: LifecycleException:  Exception opening database
connection:  java.sql.SQLException: com.sybase.jdbc2.jdbc.SybDriver
LifecycleException:  Exception opening database connection:
java.sql.SQLException: com.sybase.jdbc2.jdbc.SybDriver
   at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
   at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
   at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
   at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
   at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
   at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
   at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
   at java.lang.reflect.Method.invoke(Native Method)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
- Root Cause -
java.sql.SQLException: com.sybase.jdbc2.jdbc.SybDriver
   at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:538)
   at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:613)
   at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
   at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
   at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
   at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
   at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
   at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
   at java.lang.reflect.Method.invoke(Native Method)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)



-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




-
Please check that your question  has not already been answered in the
FAQ before posting. 

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








-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Confused About Realms

2003-01-03 Thread Jeff Sexton



On Fri, 3 Jan 2003, Jeff Sexton wrote:
> I seem to solve my own problems frequently after posting to this list...
>
> I moved the Sybase jar file from $CATALINA_HOME/lib to
> $CATALINA_HOME/common/lib and it worked.  It seems that Cocoon's
> connection pools can function with the jar in the root lib, but realms can
> not.  Moving the jar to common/lib allows both realms and the connection
> pool to work.
>
> However now I have a new question.  I really want to password protect
> cocoon URLs.  I added a  to webapps/cocoon/web.xml,
> but this breaks cocoon.
>
> Anyone know the correct way to use realms for cocoon?

I get this in catalina.out:

Starting service Tomcat-Standalone
Apache Tomcat/4.0.4
PARSE error at line 245 column 11
org.xml.sax.SAXParseException: The content of element type "web-app" must
match
"(icon?,display-name?,description?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*)".
Starting service Tomcat-Apache
Apache Tomcat/4.0.4

What causes this are these lines at the top of Cocoon's web.xml:





http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>




  
My Applications
/MyApps/*
  
  
MyRole
  



  BASIC
  My Applications


etc.


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Confused About Realms

2003-01-03 Thread Jeff Sexton

I seem to solve my own problems frequently after posting to this list...

I moved the Sybase jar file from $CATALINA_HOME/lib to
$CATALINA_HOME/common/lib and it worked.  It seems that Cocoon's
connection pools can function with the jar in the root lib, but realms can
not.  Moving the jar to common/lib allows both realms and the connection
pool to work.

However now I have a new question.  I really want to password protect
cocoon URLs.  I added a  to webapps/cocoon/web.xml,
but this breaks cocoon.

Anyone know the correct way to use realms for cocoon?

On Fri, 3 Jan 2003, Jeff Sexton wrote:
>
> Today I wanted to try a Tomcat security setup.  I created and populated
> tables in a (Sybase) database and edited server.xml per examples in the
> Goodwill Apress book.
>
> I get an exception on startup, Tomcat fails to initialize.  I didn't
> expect this because I am also running Cocoon with a connection pool, so I
> know that it can find the Sybase JDBC jar.  I also know that the host,
> socket and login are correct.
>
> I hope someone can give me a tip on the exception.  Is the jar not found
> until later in the startup process?
>
> Here is the server.xml entry:
>
>driverName="com.sybase.jdbc2.jdbc.SybDriver"
>
> connectionURL="jdbc:sybase:Tds:ods6:4100?user=username;password=mypassword"
>   userTable="users" userNameCol="user_name"
>   userCredCol="user_pass"
>   userRoleTable="user_roles" roleNameCol="role_name" />
>
> I also added entries to web.xml for my apps, but it doesn't seem to be
> getting there?
>
> Here is the exception from catalina.out:
>
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0.4
> Catalina.start: LifecycleException:  Exception opening database
> connection:  java.sql.SQLException: com.sybase.jdbc2.jdbc.SybDriver
> LifecycleException:  Exception opening database connection:
> java.sql.SQLException: com.sybase.jdbc2.jdbc.SybDriver
> at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
> at
> org.apache.catalina.core.StandardService.start(StandardService.java:388)
> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
> at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
> at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> at java.lang.reflect.Method.invoke(Native Method)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
> - Root Cause -
> java.sql.SQLException: com.sybase.jdbc2.jdbc.SybDriver
> at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:538)
> at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:613)
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
> at
> org.apache.catalina.core.StandardService.start(StandardService.java:388)
> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
> at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
> at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> at java.lang.reflect.Method.invoke(Native Method)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
>
>
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Confused About Realms

2003-01-03 Thread Jeff Sexton

Today I wanted to try a Tomcat security setup.  I created and populated
tables in a (Sybase) database and edited server.xml per examples in the
Goodwill Apress book.

I get an exception on startup, Tomcat fails to initialize.  I didn't
expect this because I am also running Cocoon with a connection pool, so I
know that it can find the Sybase JDBC jar.  I also know that the host,
socket and login are correct.

I hope someone can give me a tip on the exception.  Is the jar not found
until later in the startup process?

Here is the server.xml entry:



I also added entries to web.xml for my apps, but it doesn't seem to be
getting there?

Here is the exception from catalina.out:

Starting service Tomcat-Standalone
Apache Tomcat/4.0.4
Catalina.start: LifecycleException:  Exception opening database
connection:  java.sql.SQLException: com.sybase.jdbc2.jdbc.SybDriver
LifecycleException:  Exception opening database connection:
java.sql.SQLException: com.sybase.jdbc2.jdbc.SybDriver
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
- Root Cause -
java.sql.SQLException: com.sybase.jdbc2.jdbc.SybDriver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:538)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:613)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)



-
Please check that your question  has not already been answered in the
FAQ before posting. 

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