aspose file tools*
The moose likes JBoss/WildFly and the fly likes  Error starting static Resources with Jboss + Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark " Error starting static Resources with Jboss + Tomcat" Watch " Error starting static Resources with Jboss + Tomcat" New topic
Author

Error starting static Resources with Jboss + Tomcat

Anirban Das
Ranch Hand

Joined: Nov 22, 2003
Posts: 63
Hi,
Iam using Jboss 4.0.1Sp1 with integrated Tomcat 5.Iam trying to deploy my application outside the normal "server/default/deploy" directory of JBOSS. For the same to happen I have done a little bit of configuration to the "default" instance.

The file that I modified is "jboss-service.xml" located under "C:\Jboss4.0.1\server\default\conf"

The code snippet that I modified to is

<attribute name="URLs">
deploy/,/apps/neti/deploy/
</attribute>

I have the app directory known as "neti" located under

C:\apps\neti\deploy

Under this (C:\apps\neti\deploy) I have got all my war,ear,sar files.

However when I start up my JBOSS Server I get an error saying "2007-05-22 18:37:51,720 ERROR [tomcat.localhost./image.Context] Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Jboss4.0.1\server\default\.\apps\neti\deploy\image.war does not exist or is not a readable directory"


The following is what it shows in the log

// Start of log
2007-05-22 18:37:51,720 DEBUG [tomcat.localhost./image.Context] Starting tomcat.localhost./image.Context
2007-05-22 18:37:51,720 DEBUG [tomcat.localhost./image.Context] Configuring default Resources
2007-05-22 18:37:51,720 ERROR [tomcat.localhost./image.Context] Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Jboss4.0.1\server\default\.\apps\neti\deploy\image.war does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:138


//End of log


I would be realy greatful if someone can help me out.

Thanks for your time

Cheers

Bamby
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

"Bamby Joe",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10210
    
166

<attribute name="URLs">
deploy/,/apps/neti/deploy/
</attribute>


I guess the path is being considered relative to the server home. Why dont you specify the absolute path as follows:



[My Blog] [JavaRanch Journal]
Anirban Das
Ranch Hand

Joined: Nov 22, 2003
Posts: 63
"Bear Bibeault"

I have changed my display name as per the naming poliy by hitting the link you have suggested. Still Iam seeing no change in my display name. Please advice.
Anirban Das
Ranch Hand

Joined: Nov 22, 2003
Posts: 63
Jaikiran Pai

Thanks for your response. Based on your suggestion I did change

"jboss-service.xml" under "C:\Jboss4.0.1\server\default\conf"

to

<attribute name="URLs">
deploy/,C:/apps/neti/deploy/
</attribute>

However I got the error as

07:45:21,348 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.4.2_14-b05,Sun Microsystems Inc.
07:45:21,348 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
07:45:21,648 INFO [Server] Core system initialized
07:45:23,321 INFO [ServiceConfigurator] Problem configuring service jboss.deployment:flavor=URL,type=DeploymentScanner
org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute: name=URLs value=deploy/,C:/apps/neti/deploy/ on mbean jboss.deployment:flavor=URL,type=DeploymentScanner; - nested throwable: (java.net.MalformedURLException: unknown protocol: c)
at org.jboss.system.ServiceConfigurator.setAttribute(ServiceConfigurator.java:573)



I also tried with the option

<attribute name="URLs">
deploy/,file:/apps/neti/deploy/
</attribute>

but met with no luck.

When I tried the second option(i.e with "file:" tag) the following log is generated


7:55:27,049 INFO [ContextConfig] Missing application web.xml, using defaults only StandardEngine[jboss.web].StandardHost[localhost].StandardContext[/netiuser]
07:55:27,089 INFO [TomcatDeployer] deploy, ctxPath=/image, warUrl=file:/apps/neti/deploy/image.war/
07:55:27,149 ERROR [Context] Error starting static Resources

java.lang.IllegalArgumentException: Document base C:\Jboss4.0.1\server\default\.\apps\neti\deploy\image.war does not exist or is not a readable directory

I find out that the "Tomcat Deployer" takes the correct "ctxPath" and "warURL" but when it goes to "ContextConfig" / "Context" it throws error.

However when I look log below which got tailed the previou

07:55:27,359 INFO [EARDeployer] Init J2EE application: file:/apps/neti/deploy/net-i.ear
07:55:29,212 INFO [EjbModule] Deploying ExecutedJobEJB
07:55:30,384 INFO [EjbModule] Deploying DataChunkEJB
07:55:30,564 INFO [EjbModule] Deploying MenuEJB
07:55:30,924 INFO [EjbModule] Deploying MenuItemEJB
07:55:31,065 INFO [EjbModule] Deploying ApplicationEJB
07:55:31,075 INFO [EjbModule] Deploying TokenEJB
07:55:31,265 INFO [EjbModule] Deploying UserProfileEJB
07:55:31,325 INFO [EjbModule] Deploying UserGroupEJB
07:55:31,425 INFO [EjbModule] Deploying JobManager
07:55:31,525 INFO [EjbModule] Deploying JobResultsManager
07:55:31,535 INFO [EjbModule] Deploying MenuManager
07:55:31,575 INFO [EjbModule] Deploying NetworkElementManager
07:55:31,585 INFO [EjbModule] Deploying GroupManager
07:55:31,595 INFO [EjbModule] Deploying UserManager

I find out that the "Ear Deployer" correctly takes up the path for the of the "ear" file location.

Iam utterly confused now. Please help...

Thanks in advance.

Cheers
Anirban
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10210
    
166

I placed my sample application under C:/test. I have my JBoss installed on D:/Jboss. And here's what i added to the jboss-service.xml file:



This worked for me. The sample application got deployed. Make sure you provide the exact similar url as above (especially the 3 / )
Anirban Das
Ranch Hand

Joined: Nov 22, 2003
Posts: 63
Jaikiran Pai,

It worked !!! )))))))))))))

Tons of thanks to you..........


It was indeed the (/) which was the root of the problem.

Once again thanks to you for spending you valuable time on this issue.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10210
    
166

Glad to know it worked
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error starting static Resources with Jboss + Tomcat