Facing problem while deploying BaseX under JBoss
Wednesday, 23 February 2011 · 4 messages · last reply 24 Feb 2011
AJ
Ashish Jain23 Feb 2011 10:52 #
Hello,
I am facing problem while deploying BaseX under JBoss due to JBoss’s (Virtual File System) for the I/O operations. So “ClassLoader.getResource” under JBoss context returns JBoss resource and then getContent() returns “JBoss Stream” but not the java.io.InputStream, this can be fix by using getResourceAsStream which returns InputStream
Changes required in org.basex.core.Lang.java at Line No: 66
-----------------------------------------------------------
final BufferedReader br = new BufferedReader(new InputStreamReader( (InputStream) url.getContent(), Token.UTF8)); -----------------------------------------------------------
Above line needs to be replaced with below:
---------------------------------------------------------------
InputStream stream = Lang.class.getResourceAsStream(path);
final BufferedReader br = new BufferedReader(new InputStreamReader(
stream, Token.UTF8));
---------------------------------------------------------------Regards,
Ashish Jain
LW
Leonard Wörteler23 Feb 2011 13:14 #
Hi Ashish,
Quoted text · Ashish Jain · 2 lines
Am 23.02.2011 09:52, schrieb Ashish Jain: > I am facing problem while deploying BaseX under JBoss due to JBoss’s (Virtual File System) for the I/O operations. So “ClassLoader.getResource” under JBoss context returns JBoss resource and then getContent() returns “JBoss Stream” but not the java.io.InputStream, this can be fix by using getResourceAsStream which returns InputStream
thanks for reporting that bug, I pushed your fix to our GitHub repo. Do you want me to send you a prebuilt basex.jar file including the fix?
Cheers Leo
AJ
Ashish Jain24 Feb 2011 05:42 #
Hi Leo,
Thanks for considering my request. I will do svn update for the latest code so would be able to make new jar. Thanks for your help.
Regards,
Ashish Jain
Quoted text · Leonard Wörteler · 24 lines
--- On Wed, 2/23/11, Leonard Wörteler <leonard.woerteler at uni-konstanz.de> wrote: > From: Leonard Wörteler <leonard.woerteler at uni-konstanz.de> > Subject: Re: [basex-talk] Facing problem while deploying BaseX under JBoss > To: "Ashish Jain" <j.ashish at yahoo.com> > Cc: basex-talk at mailman.uni-konstanz.de > Date: Wednesday, February 23, 2011, 5:44 PM > Hi Ashish, > > Am 23.02.2011 09:52, schrieb Ashish Jain: > > I am facing problem while deploying BaseX under JBoss > due to JBoss’s (Virtual File System) for the I/O > operations. So “ClassLoader.getResource” under JBoss > context returns JBoss resource and then getContent() returns > “JBoss Stream” but not the java.io.InputStream, this can > be fix by using getResourceAsStream which returns > InputStream > > thanks for reporting that bug, I pushed your fix to our > GitHub repo. Do > you want me to send you a prebuilt basex.jar file including > the fix? > > Cheers Leo >
CG
Christian Grün24 Feb 2011 13:30 #
Dear Ashish,
note that the SVN version is not frequently updated anymore (but you'll probably have noted that by yourself). You can either free to check out the code via git, or have a look at the latest snapshot versions, found at
http://files.basex.org/releases/latest/
The file date will tell you when the files have been uploaded (note that the timezone is GMT+1).
Christian
Quoted text · Ashish Jain · 41 lines
> Hi Leo, > > Thanks for considering my request. I will do svn update for the latest code so would be able to make new jar. Thanks for your help. > > Regards, > Ashish Jain > > > --- On Wed, 2/23/11, Leonard Wörteler <leonard.woerteler at uni-konstanz.de> wrote: > >> From: Leonard Wörteler <leonard.woerteler at uni-konstanz.de> >> Subject: Re: [basex-talk] Facing problem while deploying BaseX under JBoss >> To: "Ashish Jain" <j.ashish at yahoo.com> >> Cc: basex-talk at mailman.uni-konstanz.de >> Date: Wednesday, February 23, 2011, 5:44 PM >> Hi Ashish, >> >> Am 23.02.2011 09:52, schrieb Ashish Jain: >> > I am facing problem while deploying BaseX under JBoss >> due to JBoss’s (Virtual File System) for the I/O >> operations. So “ClassLoader.getResource” under JBoss >> context returns JBoss resource and then getContent() returns >> “JBoss Stream” but not the java.io.InputStream, this can >> be fix by using getResourceAsStream which returns >> InputStream >> >> thanks for reporting that bug, I pushed your fix to our >> GitHub repo. Do >> you want me to send you a prebuilt basex.jar file including >> the fix? >> >> Cheers Leo >> > > > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
Written for BaseX 6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery