Bug#651471: tomcat7: I can no longer specify a war file as a docBase in a 'Context' element

2011-12-09 Thread Latter, Antoine
Aha! Yes, that seems to be it exactly.

Thanks, James.

Sorry for the noise, everyone. If anything it looks like the bug would be in 
'tomcat6', for accepting a busted config.

Antoine
__
This is the maintainer address of Debian's Java team
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers. 
Please use
debian-j...@lists.debian.org for discussions and questions.


Bug#651448: Unable to use tomcat6 startup failure with openjdk-7

2011-12-08 Thread Latter, Antoine
Package: tomcat6
Version: 6.0.32-7

I installed the Debian wheezy net install dated December 8th, 2011, for AMD-64, 
and selected the 'SSH Server' option during install.

I then executed the commad:

$ sudo apt-get install openjdk-7-jdk openjdk-7-jre-headless

Which appeared to complete without error.

I then executed the command

$ sudo apt-get install tomcat6

Which failed in the tomcat6 initscript:


Selecting previously unselected package tomcat6.
Unpacking tomcat6 (from .../tomcat6_6.0.32-7_all.deb) ...
Processing triggers for man-db ...
Setting up authbind (1.2.0) ...
Setting up libcommons-pool-java (1.5.6-1) ...
Setting up libcommons-dbcp-java (1.4-2) ...
Setting up libecj-java (3.5.1-3) ...
Setting up libgeronimo-jta-1.1-spec-java (1.1.1-2) ...
Setting up libservlet2.5-java (6.0.32-7) ...
Setting up libtomcat6-java (6.0.32-7) ...
Setting up tomcat6-common (6.0.32-7) ...
Setting up tomcat6 (6.0.32-7) ...

Creating config file /etc/default/tomcat6 with new version
Adding system user `tomcat6' (UID 105) ...
Adding new user `tomcat6' (UID 105) with group `tomcat6' ...
Not creating home directory `/usr/share/tomcat6'.
no JDK found - please set JAVA_HOME ... failed!
invoke-rc.d: initscript tomcat6, action start failed.


If I edit '/etc/default/tomcat6' to specify my JAVA_HOME as 
'/usr/lib/jvm/java-1.7.0-openjdk-amd64' the tomcat6 init script is able to run 
successfully.

The tomcat6 initscript checks a hard-coded list of jvm paths, and the location 
of my openjdk-7 installation is not among them.

Of interest, the tomcat7 init script checks first for 
'/usr/lib/jvm/default-java', but that wouldn't have helped since the openjdk-7 
installation doesn't create that path. So presumably this bug would also apply 
to tomcat7, but I have not tested that.

Antoine
__
This is the maintainer address of Debian's Java team
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Bug#651448: Additional information

2011-12-08 Thread Latter, Antoine
-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.1.0-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages tomcat6 depends on:
ii  adduser3.113
ii  debconf [debconf-2.0]  1.5.41
ii  tomcat6-common 6.0.32-7
ii  ucf3.0025+nmu2

Versions of packages tomcat6 recommends:
ii  authbind  1.2.0

Versions of packages tomcat6 suggests:
pn  libtcnative-1 none
pn  tomcat6-admin none
pn  tomcat6-docs  none
pn  tomcat6-examples  none
pn  tomcat6-user  none

-- Configuration Files:
/etc/logrotate.d/tomcat6 changed:
/var/log/tomcat6/catalina.out {
  copytruncate
  weekly
  rotate 52
  compress
  missingok
  create 640 tomcat6 adm
}

/etc/tomcat6/tomcat-users.xml [Errno 13] Permission denied: 
u'/etc/tomcat6/tomcat-users.xml'

-- debconf information:
  tomcat6/javaopts: -Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC
  tomcat6/groupname: tomcat6
  tomcat6/username: tomcat6
__
This is the maintainer address of Debian's Java team
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers. 
Please use
debian-j...@lists.debian.org for discussions and questions.


Bug#651471: tomcat7: I can no longer specify a war file as a docBase in a 'Context' element

2011-12-08 Thread Latter, Antoine
Package: tomcat7
Version: 7.0.23-1
Severity: normal

Dear Maintainer,

In tomcat6 (version 6.0.32-7), I was able to place the following XML file in 
/etc/tomcat6/Catalina/localhost:


Context path=/solr docBase=/usr/opt/solr/apache-solr-3.3.0.war
   debug=0 privileged=true allowLinking=true crossContext=true
  !-- make symlinks work in Tomcat --
  Resources className=org.apache.naming.resources.FileDirContext 
allowLinking=true /

  Environment name=solr/home type=java.lang.String 
value=/usr/opt/solr/home/solr override=true /
/Context


However when trying this with tomcat7 (placing the file in 
/etc/tomcat7/Catalina/localhost) I receive the error pasted in bellow.

If I manually explode the WAR file into a folder, and set that folder as my 
docBase I do not receive the error and the application behaves as expected.

I haven't tweaked anything in /etc/tomcat7 other than as described above (well, 
I did after I received the error, but not before).

I have modified /etc/defaults/tomcat7 to set JAVA_HOME to 
/usr/lib/jvm/java-7-openjdk-amd64.

I wasn't able to find anything in the upstream release-notes making reference 
to this, but I didn't spend a lot of time on it.

The upstream documentation for the Context element seems to state that a WAR 
file is allowed in this attribute:
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Common_Attributes

Needing to manually explode WAR files will complicate the automated deployment 
of web-apps.

I don't see any obviously related bugs filed against tomcat 7 in the tomcat 
project Bugzilla.

Error in /var/log/tomcat7/catalina.out:


INFO: Starting service Catalina
Dec 08, 2011 2:24:35 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
Dec 08, 2011 2:24:35 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor 
/etc/tomcat7/Catalina/localhost/host-manager.xml
Dec 08, 2011 2:24:36 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor 
/etc/tomcat7/Catalina/localhost/manager.xml
Dec 08, 2011 2:24:36 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor 
/etc/tomcat7/Catalina/localhost/solr.xml
Dec 08, 2011 2:24:36 PM org.apache.catalina.startup.SetContextPropertiesRule 
begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'debug' to '0' 
did not find a matching property.
Dec 08, 2011 2:24:36 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base 
/usr/opt/solr/apache-solr-3.3.0.war does not exist or is not a readable 
directory
at 
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)
at 
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4880)
at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5060)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at 
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
at 
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

Dec 08, 2011 2:24:36 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error in resourceStart()
Dec 08, 2011 2:24:36 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error getConfigured
Dec 08, 2011 2:24:36 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/solr] startup failed due to previous errors
Dec 08, 2011 2:24:36 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Dec 08, 2011 2:24:37 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [http-bio-8080]
Dec 08, 2011 2:24:37 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1530 ms


Info for war file:

$ stat /usr/opt/solr/apache-solr-3.3.0.war 
  File: `/usr/opt/solr/apache-solr-3.3.0.war'
  Size: 7451862 Blocks: 14560  IO Block: 4096   regular file
Device: fe00h/65024dInode: 281761  Links: 1
Access: (0644/-rw-r--r--)  Uid: (  113/ tomcat7)