[jboss-jira] [JBoss JIRA] Updated: (JBDEPLOY-55) Recursive deployment should be smarter
Adrian Brock (JIRA)
jira-events at lists.jboss.org
Mon Jul 28 08:28:45 EDT 2008
[ https://jira.jboss.org/jira/browse/JBDEPLOY-55?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adrian Brock updated JBDEPLOY-55:
---------------------------------
Component/s: parsing
Fix Version/s: JBDEPLOY-2.0.0.CR1
Affects Version/s: JBDEPLOY-2.0.0.Beta18
1) The error message relating to dtds is coming from xerces xml validation
(which you can turn off).
Since you don't post the full error message, it's impossible to trace any further.
2) WEB-INF is the wrong places for resources, WEB-INF/classes is the correct place.
Putting resources is WEB-INF is not portable (although JBoss does support via an option
enabled by default)
3) The -beans.xml is a reserved suffix within JBoss currently.
But I'm persuaded by your argument that we should only look for
WEB-INF/jboss-beans.xml and META-INF/jboss-beans.xml
You can do this yourself, by adding
<property name="suffix">jboss-beans.xml</property>
to "BeanDeployer" in conf/deployers.xml
but currently that break a number of JBoss configs that assume the name
can end with -beans.xml, e.g.
[ejort at warjort deployers]$ ls -lR bsh.deployer/
bsh.deployer/:
total 32
-rw-rw-r-- 1 ejort ejort 17412 Jul 28 14:06 bsh-deployer.jar
drwxrwxr-x 2 ejort ejort 4096 Jul 28 14:06 META-INF
bsh.deployer/META-INF:
total 8
-rw-rw-r-- 1 ejort ejort 730 Jul 28 14:06 bsh-deployers-beans.xml
> Recursive deployment should be smarter
> --------------------------------------
>
> Key: JBDEPLOY-55
> URL: https://jira.jboss.org/jira/browse/JBDEPLOY-55
> Project: JBoss Deployers
> Issue Type: Bug
> Components: parsing
> Affects Versions: JBDEPLOY-2.0.0.Beta18
> Environment: JBoss 5.0.0.CR1 (JDK6)
> Reporter: Darryl Miles
> Fix For: JBDEPLOY-2.0.0.CR1
>
>
> I hope I have the correct component.
> When deploying a WAR to JBoss AS 5.0.0.CR1 I have a file: /WEB-INF/spring-beans.xml (which works perfectly outside of JBoss) which has the following outer element :
> <?xml version="1.0" encoding="UTF-8" ?>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:aop="http://www.springframework.org/schema/aop"
> xmlns:context="http://www.springframework.org/schema/context"
> xmlns:jee="http://www.springframework.org/schema/jee"
> xmlns:tx="http://www.springframework.org/schema/tx"
> xmlns:flow="http://www.springframework.org/schema/webflow-config"
> xmlns:seam="http://jboss.com/products/seam/spring-seam"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
> http://www.springframework.org/schema/tx
> http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
> http://www.springframework.org/schema/aop
> http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
> http://www.springframework.org/schema/context
> http://www.springframework.org/schema/context/spring-context-2.5.xsd
> http://www.springframework.org/schema/jee
> http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
> http://www.springframework.org/schema/webflow-config
> http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd
> http://jboss.com/products/seam/spring
> http://jboss.com/products/seam/spring-seam-2.0.xsd">
> But JBoss deployer signals an error:
> vfsfile:/data/opt/jboss-5.0.0.CR1/server/default/deploy/MyApplication.war/ -> org.jboss.xb.binding.JBossXBRuntimeException: -1:-1 1:55 White spaces are required between publicId and systemId.
> at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:676)
> at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:661)
> at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:291)
> at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> I have run the debugging on
> Like it is trying to process it (as a DTD document).
> There are 4 points I'd like to make here:
> 1) Despite the name of the file (ending with "-beans.xml") the XML content of the file _CLEARLY_ and _UNAMBIGUOUSLY_ describes the format of the file content and the component/sub-system that owns the configuration. That being the namespace "http://www.springframework.org/schema/beans". Whatever JBoss deployer is picking up the "-beans.xml" file should immediately see that it doesn't own the file, nor have any prior rights to the file.
> 2) The file clearly using XSD notation (not DTD notation) so the parser should have detected this situation, not accidentally parsed it as XML XSD.
> 3) The exception does not describe the file is was working on at the time, sure it tells you what the problem is, but not where is it (which file it was processing).
> 4) I'm of the opinion that WAR files should (by default) work perfectly well inside JBoss as they do outside JBoss, so in the situation like this where JBoss is attempting to be helpful it should do its best to detect that this not what the user had intended. If JBoss specific descriptors are to be included inside other deployable units (i.e. a WAR) then either the XML file must have the correct JBoss specific schema/namespace at the top of the file, or the filename must be ear marked thru configuration or filename prefix like "jboss-" as being inspectable by the App Server (as opposed to the Servlet Container)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list