Hi there.
I have some jar files with no servlet, no EJB classes, just java
classes and one xml descriptor. My central
servlet loads some file://somewhere/configuration.xml which points to
these jar files and uses own classloader (i did not write it) to load
classes in these jars.
now I do something like 'touch application.war' to force reloading of
my application. It works. I modify configuration.xml mentioned above
and changes apply as expected -- aplication was restarted and re-reads
its config.
What doesn't work is .jar access. When I modify sources and rebuild
.jar file, restart application by 'touch ...',
application fails to access .jar file with different errors.
When I just restart jboss, everything's OK...
I suppose this is something with classloader/caches/open files or similar...
Would someone experienced enlighten me ?
I'd like to know where to start looking for a problem. Can it be
solved or it is the way JVM or jBoss works?
Please help. Thank you.
Example of exceptions:
org.xml.sax.SAXParseException:
File "jar:file:///path/SimpleFormStep1.jar!/qb.xml not found
-- but it's there !
*XML fatal error at: jar:file:///path/SimpleFormStep1.jar!/qb.xml:1
*XML fatal error: The markup in the document preceding the root
element must be well-formed.
-- but I did not changed anything
-- and when i just changed three letters in string, rebuilt jar
and invoked re-deployment:
java.util.zip.ZipException: invalid literal/length code
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:139)
at org.apache.xerces.utils.ChunkyByteArray.fill(ChunkyByteArray.java:222)
at org.apache.xerces.utils.ChunkyByteArray.<init>(ChunkyByteArray.java:98)
at
org.apache.xerces.readers.DefaultReaderFactory.createReader(DefaultReaderFactory.java:153)
at
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(DefaultEntityHandler.java:491)
at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:305)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:947)
at
com.qbizm.hqbs.configuration.hqConfigParser.commonConstructor(hqConfigParser.java:383)
at com.qbizm.hqbs.configuration.hqConfigParser.<init>(hqConfigParser.java:427)
at
com.qbizm.hqbs.configuration.hqQbConfigParser.<init>(hqQbConfigParser.java:82)
at
com.qbizm.hqbs.configuration.transformers.hqJarConfigurationTransformer.transform(hqJarConfigurationTransformer.java:164)
at
com.qbizm.hqbs.configuration.transformers.hqQbTransformer.transform(hqQbTransformer.java:103)
at
com.qbizm.hqbs.configuration.hqConfigParser.parseElement(hqConfigParser.java:649)
at
com.qbizm.hqbs.configuration.hqConfigParser.parseElement(hqConfigParser.java:640)
at com.qbizm.hqbs.configuration.hqConfigParser.parse(hqConfigParser.java:586)
at
com.qbizm.hqbs.configuration.hqApplicationConfigParser.parse(hqApplicationConfigParser.java:193)
at
com.qbizm.hqbs.environment.hqEnvironment.addConfiguration(hqEnvironment.java:423)
at com.qbizm.hqbs.environment.hqEnvironment.configure(hqEnvironment.java:616)
at com.qbizm.hqbs.environment.hqEnvironment.configure(hqEnvironment.java:572)
at com.qbizm.hqbs.runtime.hqRuntime.startApplication(hqRuntime.java:309)
at
com.qbizm.hqbs.ioprocessing.connector.hqHttpServlet.init(hqHttpServlet.java:238)
at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
at org.apache.tomcat.core.Handler.init(Handler.java:215)
at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
at org.apache.tomcat.core.Handler.service(Handler.java:254)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484
---- ----
patrik.beno@{qbizm.com|inmail.sk} ICQ#98931498
-- --
Patrik Beno Qbizm technologies, Inc.
developer ... the art of internet.
------------------------------------------------------------------------
Kralovopolska 139 tel: +420 5 4124 2414
601 12 Brno, CZ http://www.qbizm.com fax: +420 5 4121 2696