|
From: Qin D. <qd...@cs...> - 2003-10-02 16:13:35
|
David:
I see what you did. However, what I try to achieve is different. After the
scanner picks up the file, I believe that original file is wrapped up into
babeldoc's internal document. Now all I want to do is to get that file out
from the document wrapper so that I can pass it to my validation routine.
The question I have is:
Do you have a method like this:
document.getFile("file_name") which should return java.io.File
I saw babeldoc has a method: document.getInputStream(). Does this
inputStream represent the original file?
Why when I do the following (pass the file name and file's Inputstream to
my validation routine), I got TestManager not defined error? The class is
in %babeldoc_home%/lib directory?
initialize.script=\
longlegs.core.filevalidation.TestManager.validate(document.get
("file_name"),\ document.getInputStream());\
May I give you a call? I guess I am not very good to make myself
understood in writing. I appreciated it very much.
Qin
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------
David Glick
<dglick To: "Qin Ding" <qd...@cs...>
@cox.net> cc: bab...@li...
Subject: Re: [Babeldoc-devel] Re: [Babeldoc-user]
10/02/03 10:59 Questions. Please Help
AM
Oops! I told an untruth. You CAN use imports in Javascript, as you've
done.
Remember this when you trust what I say... :-)
David
On Thursday 02 October 2003 8:50 am, David Glick wrote:
> Hi Qin,
>
> Here's a stage that I use to load values from a properties file. You
> should be able to do something similar in your case:
>
> ######
> # Get the next document ID
> ######
> get-next-doc-id.stageType=Scripting
> get-next-doc-id.nextStage=perl-post-doc
> get-next-doc-id.failOnError=true
> get-next-doc-id.language=javascript
> get-next-doc-id.script=\
> var document_id;\
> var propertiesFile = new
> java.io.File(${document.get("merchant_properties")});\
> var properties = new java.util.Properties();\
> if (propertiesFile.exists()) {properties.load(new
> java.io.FileInputStream(propertiesFile));}\
> document_id = properties.getProperty("next_document_id", "10001");\
> document_id++;\
> properties.setProperty("next_document_id", document_id);\
> properties.store(new java.io.FileOutputStream(propertiesFile),null);\
> document.put("document_id", document_id);
>
> Note that you cannot import in Javascript. This is why you have to use
the
> fully-qualified class name.
>
>
> Hope this helps,
>
> David
>
> On Thursday 02 October 2003 8:19 am, Qin Ding wrote:
> > David, Good morning:
> >
> > I checked the scripting examples. I did not see any examples that
shows
> > how I can extract the original file as type java.io.File. The closest
one
> > is md5 example, which shows how to get Inputstream out of the document.
I
> > assume this is the inputstream of the original file. So, I changed my
> > script like this:
> > initialize.script=\
> > importClass(Packages.longlegs.core.filevalidation.TestManager);\
> > TestManager.validate(document.get("file_name"),
> > document.getInputStream());\
> >
> > I deployed my file validation jar into babeldoc/lib directory, of
course.
> >
> > When I ran the pipeline, I got this error stating my TestManager is not
> > defined.
> >
> > <2003-10-02 09:57:37,517> INFO [main] : PipelineStage name:
initialize
> > <2003-10-02 09:57:37,978> ERROR [main] :
> > [DefaultPipelineStageErrorHandler.handlePipelineStageError]
PipelineStage
> > name: initialize Error: com.babeldoc.core.pipeline.PipelineException:
> > Script processing failed
> > <2003-10-02 09:57:37,978> ERROR [main] : [PipelineFeeder.process]
> > com.babeldoc.core.pipeline.PipelineException: Script processing failed
> > at
> > com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown
> > Source)
> > at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown
> > Source)
> > at
> >
com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPi
> >pe lineStage(Unknown Source)
> > at
> >
com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(U
> >nk nown Source)
> > at
com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown
> > Source)
> > at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown
> > Source) at
> > com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown
Source)
> > at
> > com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown
> > Source) at
> > com.babeldoc.core.pipeline.feeder.FeederFactory.process(Unknown Source)
> > at
> > com.babeldoc.core.pipeline.command.PipelineFeeder.process(Unknown
Source)
> > at
> > com.babeldoc.core.pipeline.command.PipelineFeeder.execute(Unknown
Source)
> > at com.babeldoc.core.BabeldocCommand.executeCommand(Unknown
Source)
> > at com.babeldoc.core.BabeldocCommand.<init>(Unknown Source)
> > at
com.babeldoc.core.pipeline.command.PipelineFeeder.<init>(Unknown
> > Source)
> > at com.babeldoc.core.pipeline.command.PipelineFeeder.main(Unknown
> > Source)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
> >:3 9) at
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
> >mp l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> > at com.babeldoc.core.Main.handleCommand(Unknown Source)
> > at com.babeldoc.core.Main.main(Unknown Source)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
> >:3 9) at
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
> >mp l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> > at com.babeldoc.init.Main.runBabeldocMain(Unknown Source)
> > at com.babeldoc.init.Main.main(Unknown Source)
> > Caused by: org.apache.bsf.BSFException: JavaScript Error: Internal
Error:
> > ReferenceError: "TestManager" is not defined.
> > at
> > org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(Unknown
> > Source)
> > at
org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown
> > Source)
> > at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
> > at org.apache.bsf.BSFManager$6.run(Unknown Source)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at org.apache.bsf.BSFManager.exec(Unknown Source)
> > ... 27 more
> >
> >
> >
-------------------------------------------------------------------------
> >-- -------------
> >
> > This is a PRIVATE message. If you are not the intended recipient,
please
> > delete without copying and kindly advise us by e-mail of the mistake in
> > delivery. NOTE: Regardless of content, this e-mail shall not operate to
> > bind CSC to any order or other contract unless pursuant to explicit
> > written agreement or government initiative expressly permitting the use
> > of e-mail for such purpose.
> >
-------------------------------------------------------------------------
> >-- -------------
--
David Glick
Transmit Consulting, Inc
619-475-4052
dg...@tr...
|
|
From: David G. <dg...@co...> - 2003-10-02 17:01:52
|
Hi Qin,
Please see my responses below:
On Thursday 02 October 2003 9:12 am, Qin Ding wrote:
> David:
> I see what you did. However, what I try to achieve is different. After the
> scanner picks up the file, I believe that original file is wrapped up into
> babeldoc's internal document. Now all I want to do is to get that file out
> from the document wrapper so that I can pass it to my validation routine.
> The question I have is:
>
> Do you have a method like this:
> document.getFile("file_name") which should return java.io.File
>
Nope. The best you can do is take document.get("file_name"), which will
return the file name as a String, and use it to instantiate your own File
class.
> I saw babeldoc has a method: document.getInputStream(). Does this
> inputStream represent the original file?
>
I haven't used this one, but I'm guessing that it represents the internal
document. If you haven't changed the original document through some type of
transformation, then it should represent the original file.
> Why when I do the following (pass the file name and file's Inputstream to
> my validation routine), I got TestManager not defined error? The class is
> in %babeldoc_home%/lib directory?
>
> initialize.script=\
> longlegs.core.filevalidation.TestManager.validate(document.get
> ("file_name"),\ document.getInputStream());\
>
Is validate() a static method? If not, you'll need to instantiate the
TestManager class first. Also, I'm not sure if simply placing the class into
the %babeldoc_home%/lib directory is sufficient. You may need to put it into
the CLASSPATH, as well. Perhaps Bruce can comment on this?
> May I give you a call? I guess I am not very good to make myself
> understood in writing. I appreciated it very much.
>
I'm happy to talk to you, however I'm leaving the office for most of the day
in a minute. You may want to consider an alternative way to get this going
for now:
1. Create a batch file that you can run from the command line, passing the
name of a file, that will run your validation routine.
2. Use the ExternalApplication stage to run your batch file. Be sure to set
the pipeInResponse attribute to true.
3. The output of the external program will placed in an attribute called
ExternalApplicationResponse. From there, you can place it into the main
document, test it, slice it, dice it, etc.
Hope this helps. If not, I'll be available later this evening or tomorrow.
David
> Qin
>
>
>
> ---------------------------------------------------------------------------
>-------------
>
> This is a PRIVATE message. If you are not the intended recipient, please
> delete without copying and kindly advise us by e-mail of the mistake in
> delivery. NOTE: Regardless of content, this e-mail shall not operate to
> bind CSC to any order or other contract unless pursuant to explicit written
> agreement or government initiative expressly permitting the use of e-mail
> for such purpose.
> ---------------------------------------------------------------------------
>-------------
>
>
>
>
>
> David Glick
> <dglick To: "Qin Ding"
> <qd...@cs...> @cox.net> cc:
> bab...@li... Subject: Re: [Babeldoc-devel] Re:
> [Babeldoc-user] 10/02/03 10:59 Questions. Please Help AM
>
>
>
>
>
>
> Oops! I told an untruth. You CAN use imports in Javascript, as you've
> done.
> Remember this when you trust what I say... :-)
>
> David
>
> On Thursday 02 October 2003 8:50 am, David Glick wrote:
> > Hi Qin,
> >
> > Here's a stage that I use to load values from a properties file. You
> > should be able to do something similar in your case:
> >
> > ######
> > # Get the next document ID
> > ######
> > get-next-doc-id.stageType=Scripting
> > get-next-doc-id.nextStage=perl-post-doc
> > get-next-doc-id.failOnError=true
> > get-next-doc-id.language=javascript
> > get-next-doc-id.script=\
> > var document_id;\
> > var propertiesFile = new
> > java.io.File(${document.get("merchant_properties")});\
> > var properties = new java.util.Properties();\
> > if (propertiesFile.exists()) {properties.load(new
> > java.io.FileInputStream(propertiesFile));}\
> > document_id = properties.getProperty("next_document_id", "10001");\
> > document_id++;\
> > properties.setProperty("next_document_id", document_id);\
> > properties.store(new java.io.FileOutputStream(propertiesFile),null);\
> > document.put("document_id", document_id);
> >
> > Note that you cannot import in Javascript. This is why you have to use
>
> the
>
> > fully-qualified class name.
> >
> >
> > Hope this helps,
> >
> > David
> >
> > On Thursday 02 October 2003 8:19 am, Qin Ding wrote:
> > > David, Good morning:
> > >
> > > I checked the scripting examples. I did not see any examples that
>
> shows
>
> > > how I can extract the original file as type java.io.File. The closest
>
> one
>
> > > is md5 example, which shows how to get Inputstream out of the document.
>
> I
>
> > > assume this is the inputstream of the original file. So, I changed my
> > > script like this:
> > > initialize.script=\
> > > importClass(Packages.longlegs.core.filevalidation.TestManager);\
> > > TestManager.validate(document.get("file_name"),
> > > document.getInputStream());\
> > >
> > > I deployed my file validation jar into babeldoc/lib directory, of
>
> course.
>
> > > When I ran the pipeline, I got this error stating my TestManager is not
> > > defined.
> > >
> > > <2003-10-02 09:57:37,517> INFO [main] : PipelineStage name:
>
> initialize
>
> > > <2003-10-02 09:57:37,978> ERROR [main] :
> > > [DefaultPipelineStageErrorHandler.handlePipelineStageError]
>
> PipelineStage
>
> > > name: initialize Error: com.babeldoc.core.pipeline.PipelineException:
> > > Script processing failed
> > > <2003-10-02 09:57:37,978> ERROR [main] : [PipelineFeeder.process]
> > > com.babeldoc.core.pipeline.PipelineException: Script processing failed
> > > at
> > > com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown
> > > Source)
> > > at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown
> > > Source)
> > > at
>
> com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPi
>
> > >pe lineStage(Unknown Source)
> > > at
>
> com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(U
>
> > >nk nown Source)
> > > at
>
> com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown
>
> > > Source)
> > > at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown
> > > Source) at
> > > com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown
>
> Source)
>
> > > at
> > > com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown
> > > Source) at
> > > com.babeldoc.core.pipeline.feeder.FeederFactory.process(Unknown Source)
> > > at
> > > com.babeldoc.core.pipeline.command.PipelineFeeder.process(Unknown
>
> Source)
>
> > > at
> > > com.babeldoc.core.pipeline.command.PipelineFeeder.execute(Unknown
>
> Source)
>
> > > at com.babeldoc.core.BabeldocCommand.executeCommand(Unknown
>
> Source)
>
> > > at com.babeldoc.core.BabeldocCommand.<init>(Unknown Source)
> > > at
>
> com.babeldoc.core.pipeline.command.PipelineFeeder.<init>(Unknown
>
> > > Source)
> > > at com.babeldoc.core.pipeline.command.PipelineFeeder.main(Unknown
> > > Source)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
>
> > >:3 9) at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
>
> > >mp l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> > > at com.babeldoc.core.Main.handleCommand(Unknown Source)
> > > at com.babeldoc.core.Main.main(Unknown Source)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
>
> > >:3 9) at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
>
> > >mp l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> > > at com.babeldoc.init.Main.runBabeldocMain(Unknown Source)
> > > at com.babeldoc.init.Main.main(Unknown Source)
> > > Caused by: org.apache.bsf.BSFException: JavaScript Error: Internal
>
> Error:
> > > ReferenceError: "TestManager" is not defined.
> > > at
> > > org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(Unknown
> > > Source)
> > > at
>
> org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown
>
> > > Source)
> > > at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
> > > at org.apache.bsf.BSFManager$6.run(Unknown Source)
> > > at java.security.AccessController.doPrivileged(Native Method)
> > > at org.apache.bsf.BSFManager.exec(Unknown Source)
> > > ... 27 more
>
> -------------------------------------------------------------------------
>
> > >-- -------------
> > >
> > > This is a PRIVATE message. If you are not the intended recipient,
>
> please
>
> > > delete without copying and kindly advise us by e-mail of the mistake in
> > > delivery. NOTE: Regardless of content, this e-mail shall not operate to
> > > bind CSC to any order or other contract unless pursuant to explicit
> > > written agreement or government initiative expressly permitting the use
> > > of e-mail for such purpose.
>
> -------------------------------------------------------------------------
>
> > >-- -------------
--
David Glick
Transmit Consulting, Inc
619-475-4052
dg...@tr...
|
|
From: Qin D. <qd...@cs...> - 2003-10-02 17:22:51
|
Thank, David. I'll talk to you tomorrow.
Yes, the validate(String fileName, InputStream is) in TestManager is static
method.
Bruce: What should I do in order for my jar visible to the scripting code.
Right now, I just drop it into %BABELDOC_HOME%/lib directory along with all
the jars that BabelDoc depends on.
David, I don't follow what you said about batch file and
externalApplication Stage. I'll try to see if there are some examples and
talk to you later. Thank you.
Qin
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------
David Glick
<dglick To: "Qin Ding" <qd...@cs...>
@cox.net> cc: bab...@li...
Subject: Re: [Babeldoc-devel] Re: [Babeldoc-user]
10/02/03 12:06 Questions. Please Help
PM
Hi Qin,
Please see my responses below:
On Thursday 02 October 2003 9:12 am, Qin Ding wrote:
> David:
> I see what you did. However, what I try to achieve is different. After
the
> scanner picks up the file, I believe that original file is wrapped up
into
> babeldoc's internal document. Now all I want to do is to get that file
out
> from the document wrapper so that I can pass it to my validation routine.
> The question I have is:
>
> Do you have a method like this:
> document.getFile("file_name") which should return java.io.File
>
Nope. The best you can do is take document.get("file_name"), which will
return the file name as a String, and use it to instantiate your own File
class.
> I saw babeldoc has a method: document.getInputStream(). Does this
> inputStream represent the original file?
>
I haven't used this one, but I'm guessing that it represents the internal
document. If you haven't changed the original document through some type
of
transformation, then it should represent the original file.
> Why when I do the following (pass the file name and file's Inputstream to
> my validation routine), I got TestManager not defined error? The class is
> in %babeldoc_home%/lib directory?
>
> initialize.script=\
> longlegs.core.filevalidation.TestManager.validate(document.get
> ("file_name"),\ document.getInputStream());\
>
Is validate() a static method? If not, you'll need to instantiate the
TestManager class first. Also, I'm not sure if simply placing the class
into
the %babeldoc_home%/lib directory is sufficient. You may need to put it
into
the CLASSPATH, as well. Perhaps Bruce can comment on this?
> May I give you a call? I guess I am not very good to make myself
> understood in writing. I appreciated it very much.
>
I'm happy to talk to you, however I'm leaving the office for most of the
day
in a minute. You may want to consider an alternative way to get this going
for now:
1. Create a batch file that you can run from the command line, passing the
name of a file, that will run your validation routine.
2. Use the ExternalApplication stage to run your batch file. Be sure to
set
the pipeInResponse attribute to true.
3. The output of the external program will placed in an attribute called
ExternalApplicationResponse. From there, you can place it into the main
document, test it, slice it, dice it, etc.
Hope this helps. If not, I'll be available later this evening or tomorrow.
David
> Qin
>
>
>
>
---------------------------------------------------------------------------
>-------------
>
> This is a PRIVATE message. If you are not the intended recipient, please
> delete without copying and kindly advise us by e-mail of the mistake in
> delivery. NOTE: Regardless of content, this e-mail shall not operate to
> bind CSC to any order or other contract unless pursuant to explicit
written
> agreement or government initiative expressly permitting the use of e-mail
> for such purpose.
>
---------------------------------------------------------------------------
>-------------
>
>
>
>
>
> David Glick
> <dglick To: "Qin Ding"
> <qd...@cs...> @cox.net> cc:
> bab...@li... Subject: Re: [Babeldoc-devel] Re:
> [Babeldoc-user] 10/02/03 10:59 Questions. Please Help AM
>
>
>
>
>
>
> Oops! I told an untruth. You CAN use imports in Javascript, as you've
> done.
> Remember this when you trust what I say... :-)
>
> David
>
> On Thursday 02 October 2003 8:50 am, David Glick wrote:
> > Hi Qin,
> >
> > Here's a stage that I use to load values from a properties file. You
> > should be able to do something similar in your case:
> >
> > ######
> > # Get the next document ID
> > ######
> > get-next-doc-id.stageType=Scripting
> > get-next-doc-id.nextStage=perl-post-doc
> > get-next-doc-id.failOnError=true
> > get-next-doc-id.language=javascript
> > get-next-doc-id.script=\
> > var document_id;\
> > var propertiesFile = new
> > java.io.File(${document.get("merchant_properties")});\
> > var properties = new java.util.Properties();\
> > if (propertiesFile.exists()) {properties.load(new
> > java.io.FileInputStream(propertiesFile));}\
> > document_id = properties.getProperty("next_document_id", "10001");\
> > document_id++;\
> > properties.setProperty("next_document_id", document_id);\
> > properties.store(new
java.io.FileOutputStream(propertiesFile),null);\
> > document.put("document_id", document_id);
> >
> > Note that you cannot import in Javascript. This is why you have to use
>
> the
>
> > fully-qualified class name.
> >
> >
> > Hope this helps,
> >
> > David
> >
> > On Thursday 02 October 2003 8:19 am, Qin Ding wrote:
> > > David, Good morning:
> > >
> > > I checked the scripting examples. I did not see any examples that
>
> shows
>
> > > how I can extract the original file as type java.io.File. The closest
>
> one
>
> > > is md5 example, which shows how to get Inputstream out of the
document.
>
> I
>
> > > assume this is the inputstream of the original file. So, I changed my
> > > script like this:
> > > initialize.script=\
> > > importClass(Packages.longlegs.core.filevalidation.TestManager);\
> > > TestManager.validate(document.get("file_name"),
> > > document.getInputStream());\
> > >
> > > I deployed my file validation jar into babeldoc/lib directory, of
>
> course.
>
> > > When I ran the pipeline, I got this error stating my TestManager is
not
> > > defined.
> > >
> > > <2003-10-02 09:57:37,517> INFO [main] : PipelineStage name:
>
> initialize
>
> > > <2003-10-02 09:57:37,978> ERROR [main] :
> > > [DefaultPipelineStageErrorHandler.handlePipelineStageError]
>
> PipelineStage
>
> > > name: initialize Error: com.babeldoc.core.pipeline.PipelineException:
> > > Script processing failed
> > > <2003-10-02 09:57:37,978> ERROR [main] : [PipelineFeeder.process]
> > > com.babeldoc.core.pipeline.PipelineException: Script processing
failed
> > > at
> > >
com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown
> > > Source)
> > > at
com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown
> > > Source)
> > > at
>
> com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPi
>
> > >pe lineStage(Unknown Source)
> > > at
>
> com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(U
>
> > >nk nown Source)
> > > at
>
> com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown
>
> > > Source)
> > > at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown
> > > Source) at
> > > com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown
>
> Source)
>
> > > at
> > > com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown
> > > Source) at
> > > com.babeldoc.core.pipeline.feeder.FeederFactory.process(Unknown
Source)
> > > at
> > > com.babeldoc.core.pipeline.command.PipelineFeeder.process(Unknown
>
> Source)
>
> > > at
> > > com.babeldoc.core.pipeline.command.PipelineFeeder.execute(Unknown
>
> Source)
>
> > > at com.babeldoc.core.BabeldocCommand.executeCommand(Unknown
>
> Source)
>
> > > at com.babeldoc.core.BabeldocCommand.<init>(Unknown Source)
> > > at
>
> com.babeldoc.core.pipeline.command.PipelineFeeder.<init>(Unknown
>
> > > Source)
> > > at
com.babeldoc.core.pipeline.command.PipelineFeeder.main(Unknown
> > > Source)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
>
> > >:3 9) at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
>
> > >mp l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> > > at com.babeldoc.core.Main.handleCommand(Unknown Source)
> > > at com.babeldoc.core.Main.main(Unknown Source)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
>
> > >:3 9) at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
>
> > >mp l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> > > at com.babeldoc.init.Main.runBabeldocMain(Unknown Source)
> > > at com.babeldoc.init.Main.main(Unknown Source)
> > > Caused by: org.apache.bsf.BSFException: JavaScript Error: Internal
>
> Error:
> > > ReferenceError: "TestManager" is not defined.
> > > at
> > >
org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(Unknown
> > > Source)
> > > at
>
> org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown
>
> > > Source)
> > > at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
> > > at org.apache.bsf.BSFManager$6.run(Unknown Source)
> > > at java.security.AccessController.doPrivileged(Native Method)
> > > at org.apache.bsf.BSFManager.exec(Unknown Source)
> > > ... 27 more
>
> -------------------------------------------------------------------------
>
> > >-- -------------
> > >
> > > This is a PRIVATE message. If you are not the intended recipient,
>
> please
>
> > > delete without copying and kindly advise us by e-mail of the mistake
in
> > > delivery. NOTE: Regardless of content, this e-mail shall not operate
to
> > > bind CSC to any order or other contract unless pursuant to explicit
> > > written agreement or government initiative expressly permitting the
use
> > > of e-mail for such purpose.
>
> -------------------------------------------------------------------------
>
> > >-- -------------
--
David Glick
Transmit Consulting, Inc
619-475-4052
dg...@tr...
|
|
From: McDonald, B. <Bru...@ba...> - 2003-10-03 04:32:23
|
Qin,
The ExternalApplicationStage is available for calling external applications or script files from a pipeline. The pipeline provides the document contents to the script/program via the STDIN stream.
For more details please look at the user guide and the source code.
Bruce.
-----Original Message-----
From: Qin Ding [mailto:qd...@cs...]
Sent: Thursday, October 02, 2003 1:21 PM
To: David Glick
Cc: bab...@li...
Subject: Re: [Babeldoc-devel] Re: [Babeldoc-user] Questions. Please Help
Thank, David. I'll talk to you tomorrow.
Yes, the validate(String fileName, InputStream is) in TestManager is static
method.
Bruce: What should I do in order for my jar visible to the scripting code.
Right now, I just drop it into %BABELDOC_HOME%/lib directory along with all
the jars that BabelDoc depends on.
David, I don't follow what you said about batch file and
externalApplication Stage. I'll try to see if there are some examples and
talk to you later. Thank you.
Qin
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------
David Glick
<dglick To: "Qin Ding" <qd...@cs...>
@cox.net> cc: bab...@li...
Subject: Re: [Babeldoc-devel] Re: [Babeldoc-user]
10/02/03 12:06 Questions. Please Help
PM
Hi Qin,
Please see my responses below:
On Thursday 02 October 2003 9:12 am, Qin Ding wrote:
> David:
> I see what you did. However, what I try to achieve is different. After
the
> scanner picks up the file, I believe that original file is wrapped up
into
> babeldoc's internal document. Now all I want to do is to get that file
out
> from the document wrapper so that I can pass it to my validation routine.
> The question I have is:
>
> Do you have a method like this:
> document.getFile("file_name") which should return java.io.File
>
Nope. The best you can do is take document.get("file_name"), which will
return the file name as a String, and use it to instantiate your own File
class.
> I saw babeldoc has a method: document.getInputStream(). Does this
> inputStream represent the original file?
>
I haven't used this one, but I'm guessing that it represents the internal
document. If you haven't changed the original document through some type
of
transformation, then it should represent the original file.
> Why when I do the following (pass the file name and file's Inputstream to
> my validation routine), I got TestManager not defined error? The class is
> in %babeldoc_home%/lib directory?
>
> initialize.script=\
> longlegs.core.filevalidation.TestManager.validate(document.get
> ("file_name"),\ document.getInputStream());\
>
Is validate() a static method? If not, you'll need to instantiate the
TestManager class first. Also, I'm not sure if simply placing the class
into
the %babeldoc_home%/lib directory is sufficient. You may need to put it
into
the CLASSPATH, as well. Perhaps Bruce can comment on this?
> May I give you a call? I guess I am not very good to make myself
> understood in writing. I appreciated it very much.
>
I'm happy to talk to you, however I'm leaving the office for most of the
day
in a minute. You may want to consider an alternative way to get this going
for now:
1. Create a batch file that you can run from the command line, passing the
name of a file, that will run your validation routine.
2. Use the ExternalApplication stage to run your batch file. Be sure to
set
the pipeInResponse attribute to true.
3. The output of the external program will placed in an attribute called
ExternalApplicationResponse. From there, you can place it into the main
document, test it, slice it, dice it, etc.
Hope this helps. If not, I'll be available later this evening or tomorrow.
David
> Qin
>
>
>
>
---------------------------------------------------------------------------
>-------------
>
> This is a PRIVATE message. If you are not the intended recipient, please
> delete without copying and kindly advise us by e-mail of the mistake in
> delivery. NOTE: Regardless of content, this e-mail shall not operate to
> bind CSC to any order or other contract unless pursuant to explicit
written
> agreement or government initiative expressly permitting the use of e-mail
> for such purpose.
>
---------------------------------------------------------------------------
>-------------
>
>
>
>
>
> David Glick
> <dglick To: "Qin Ding"
> <qd...@cs...> @cox.net> cc:
> bab...@li... Subject: Re: [Babeldoc-devel] Re:
> [Babeldoc-user] 10/02/03 10:59 Questions. Please Help AM
>
>
>
>
>
>
> Oops! I told an untruth. You CAN use imports in Javascript, as you've
> done.
> Remember this when you trust what I say... :-)
>
> David
>
> On Thursday 02 October 2003 8:50 am, David Glick wrote:
> > Hi Qin,
> >
> > Here's a stage that I use to load values from a properties file. You
> > should be able to do something similar in your case:
> >
> > ######
> > # Get the next document ID
> > ######
> > get-next-doc-id.stageType=Scripting
> > get-next-doc-id.nextStage=perl-post-doc
> > get-next-doc-id.failOnError=true
> > get-next-doc-id.language=javascript
> > get-next-doc-id.script=\
> > var document_id;\
> > var propertiesFile = new
> > java.io.File(${document.get("merchant_properties")});\
> > var properties = new java.util.Properties();\
> > if (propertiesFile.exists()) {properties.load(new
> > java.io.FileInputStream(propertiesFile));}\
> > document_id = properties.getProperty("next_document_id", "10001");\
> > document_id++;\
> > properties.setProperty("next_document_id", document_id);\
> > properties.store(new
java.io.FileOutputStream(propertiesFile),null);\
> > document.put("document_id", document_id);
> >
> > Note that you cannot import in Javascript. This is why you have to use
>
> the
>
> > fully-qualified class name.
> >
> >
> > Hope this helps,
> >
> > David
> >
> > On Thursday 02 October 2003 8:19 am, Qin Ding wrote:
> > > David, Good morning:
> > >
> > > I checked the scripting examples. I did not see any examples that
>
> shows
>
> > > how I can extract the original file as type java.io.File. The closest
>
> one
>
> > > is md5 example, which shows how to get Inputstream out of the
document.
>
> I
>
> > > assume this is the inputstream of the original file. So, I changed my
> > > script like this:
> > > initialize.script=\
> > > importClass(Packages.longlegs.core.filevalidation.TestManager);\
> > > TestManager.validate(document.get("file_name"),
> > > document.getInputStream());\
> > >
> > > I deployed my file validation jar into babeldoc/lib directory, of
>
> course.
>
> > > When I ran the pipeline, I got this error stating my TestManager is
not
> > > defined.
> > >
> > > <2003-10-02 09:57:37,517> INFO [main] : PipelineStage name:
>
> initialize
>
> > > <2003-10-02 09:57:37,978> ERROR [main] :
> > > [DefaultPipelineStageErrorHandler.handlePipelineStageError]
>
> PipelineStage
>
> > > name: initialize Error: com.babeldoc.core.pipeline.PipelineException:
> > > Script processing failed
> > > <2003-10-02 09:57:37,978> ERROR [main] : [PipelineFeeder.process]
> > > com.babeldoc.core.pipeline.PipelineException: Script processing
failed
> > > at
> > >
com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown
> > > Source)
> > > at
com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown
> > > Source)
> > > at
>
> com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPi
>
> > >pe lineStage(Unknown Source)
> > > at
>
> com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(U
>
> > >nk nown Source)
> > > at
>
> com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown
>
> > > Source)
> > > at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown
> > > Source) at
> > > com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown
>
> Source)
>
> > > at
> > > com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown
> > > Source) at
> > > com.babeldoc.core.pipeline.feeder.FeederFactory.process(Unknown
Source)
> > > at
> > > com.babeldoc.core.pipeline.command.PipelineFeeder.process(Unknown
>
> Source)
>
> > > at
> > > com.babeldoc.core.pipeline.command.PipelineFeeder.execute(Unknown
>
> Source)
>
> > > at com.babeldoc.core.BabeldocCommand.executeCommand(Unknown
>
> Source)
>
> > > at com.babeldoc.core.BabeldocCommand.<init>(Unknown Source)
> > > at
>
> com.babeldoc.core.pipeline.command.PipelineFeeder.<init>(Unknown
>
> > > Source)
> > > at
com.babeldoc.core.pipeline.command.PipelineFeeder.main(Unknown
> > > Source)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
>
> > >:3 9) at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
>
> > >mp l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> > > at com.babeldoc.core.Main.handleCommand(Unknown Source)
> > > at com.babeldoc.core.Main.main(Unknown Source)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
>
> > >:3 9) at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
>
> > >mp l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> > > at com.babeldoc.init.Main.runBabeldocMain(Unknown Source)
> > > at com.babeldoc.init.Main.main(Unknown Source)
> > > Caused by: org.apache.bsf.BSFException: JavaScript Error: Internal
>
> Error:
> > > ReferenceError: "TestManager" is not defined.
> > > at
> > >
org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(Unknown
> > > Source)
> > > at
>
> org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown
>
> > > Source)
> > > at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
> > > at org.apache.bsf.BSFManager$6.run(Unknown Source)
> > > at java.security.AccessController.doPrivileged(Native Method)
> > > at org.apache.bsf.BSFManager.exec(Unknown Source)
> > > ... 27 more
>
> -------------------------------------------------------------------------
>
> > >-- -------------
> > >
> > > This is a PRIVATE message. If you are not the intended recipient,
>
> please
>
> > > delete without copying and kindly advise us by e-mail of the mistake
in
> > > delivery. NOTE: Regardless of content, this e-mail shall not operate
to
> > > bind CSC to any order or other contract unless pursuant to explicit
> > > written agreement or government initiative expressly permitting the
use
> > > of e-mail for such purpose.
>
> -------------------------------------------------------------------------
>
> > >-- -------------
--
David Glick
Transmit Consulting, Inc
619-475-4052
dg...@tr...
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Babeldoc-devel mailing list
Bab...@li...
https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
|
|
From: Qin D. <qd...@cs...> - 2003-10-03 17:34:38
|
David and Bruce:
I put the my validation jar into c:\qin\lib foder and set CLASSPATH=c:
\qin\lib\myvalidation.jar;%CLASSPATH%. Re-ran the pipeline. Still got the
error for not finding the class. I built a small app to verify
myvalidation.jar using the same classpath. It finds the
TestManager.validation without the problem. So the problem seems at the my
script. Here is my script:
initialize.script=\
longlegs.core.filevalidation.TestManager.validate(document.get
("file_name"),\
document.getInputStream());\
1. Internally, when this script is received, how does ScriptingStage class
do to start search the external jar?
2. I don't think the external application stage will help me because our
validation jar is not an "application"; and it only takes either
java.io.File or java.io.InputStream.
3. If I can not make it work using Scripting stage, I am think just modify
the directory scanner to include the call to my validation routine after it
picks up the file there. Can I do that by extending the DirectoryScanner?
Once again, if I extend the class, where should I deploy it?
4. There are lots of directories with the numbers as their names. What are
those directories? Does the system perge them eventually?
<2003-10-03 09:59:55,637> INFO [main] : PipelineStage name: initialize
<2003-10-03 09:59:56,108> ERROR [main] :
[DefaultPipelineStageErrorHandler.handlePipelineStageError] PipelineStage
name: initialize Error: com.babeldoc.core.pipeline.PipelineException:
Script processing failed
<2003-10-03 09:59:56,108> ERROR [main] : [PipelineFeeder.process]
com.babeldoc.core.pipeline.PipelineException: Script processing failed
at
com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown
Source)
at
com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPipelineStage(Unknown
Source)
at
com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown Source)
at com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown
Source)
at
com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown Source)
at com.babeldoc.core.pipeline.feeder.FeederFactory.process(Unknown
Source)
at com.babeldoc.core.pipeline.command.PipelineFeeder.process(Unknown
Source)
at com.babeldoc.core.pipeline.command.PipelineFeeder.execute(Unknown
Source)
at com.babeldoc.core.BabeldocCommand.executeCommand(Unknown Source)
at com.babeldoc.core.BabeldocCommand.<init>(Unknown Source)
at com.babeldoc.core.pipeline.command.PipelineFeeder.<init>(Unknown
Source)
at com.babeldoc.core.pipeline.command.PipelineFeeder.main(Unknown
Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.babeldoc.core.Main.handleCommand(Unknown Source)
at com.babeldoc.core.Main.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.babeldoc.init.Main.runBabeldocMain(Unknown Source)
at com.babeldoc.init.Main.main(Unknown Source)
Caused by: org.apache.bsf.BSFException: JavaScript Error: Internal Error:
ReferenceError: "longlegs" is not defined.
at
org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(Unknown
Source)
at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown
Source)
at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
at org.apache.bsf.BSFManager$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.bsf.BSFManager.exec(Unknown Source)
... 27 more
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------
|
|
From: Bruce M. <br...@mc...> - 2003-10-04 00:53:16
|
You need to import your class into the javascript. Please read the
documentation found at the Mozilla/Rhino/JS site (use google to find the
URL).
On Friday 03 October 2003 01:33 pm, Qin Ding wrote:
> David and Bruce:
>
> I put the my validation jar into c:\qin\lib foder and set CLASSPATH=c:
> \qin\lib\myvalidation.jar;%CLASSPATH%. Re-ran the pipeline. Still got the
> error for not finding the class. I built a small app to verify
> myvalidation.jar using the same classpath. It finds the
> TestManager.validation without the problem. So the problem seems at the my
> script. Here is my script:
> initialize.script=\
> longlegs.core.filevalidation.TestManager.validate(document.get
> ("file_name"),\
> document.getInputStream());\
>
> 1. Internally, when this script is received, how does ScriptingStage class
> do to start search the external jar?
> 2. I don't think the external application stage will help me because our
> validation jar is not an "application"; and it only takes either
> java.io.File or java.io.InputStream.
> 3. If I can not make it work using Scripting stage, I am think just modify
> the directory scanner to include the call to my validation routine after it
> picks up the file there. Can I do that by extending the DirectoryScanner?
> Once again, if I extend the class, where should I deploy it?
> 4. There are lots of directories with the numbers as their names. What are
> those directories? Does the system perge them eventually?
>
> <2003-10-03 09:59:55,637> INFO [main] : PipelineStage name: initialize
> <2003-10-03 09:59:56,108> ERROR [main] :
> [DefaultPipelineStageErrorHandler.handlePipelineStageError] PipelineStage
> name: initialize Error: com.babeldoc.core.pipeline.PipelineException:
> Script processing failed
> <2003-10-03 09:59:56,108> ERROR [main] : [PipelineFeeder.process]
> com.babeldoc.core.pipeline.PipelineException: Script processing failed
> at
> com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown
> Source)
> at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown
> Source)
> at
> com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPipe
>lineStage(Unknown Source)
> at
> com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(Unk
>nown Source)
> at com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown
> Source)
> at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown Source)
> at com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown
> Source)
> at
> com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown Source)
> at com.babeldoc.core.pipeline.feeder.FeederFactory.process(Unknown
> Source)
> at com.babeldoc.core.pipeline.command.PipelineFeeder.process(Unknown
> Source)
> at com.babeldoc.core.pipeline.command.PipelineFeeder.execute(Unknown
> Source)
> at com.babeldoc.core.BabeldocCommand.executeCommand(Unknown Source)
> at com.babeldoc.core.BabeldocCommand.<init>(Unknown Source)
> at com.babeldoc.core.pipeline.command.PipelineFeeder.<init>(Unknown
> Source)
> at com.babeldoc.core.pipeline.command.PipelineFeeder.main(Unknown
> Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> at com.babeldoc.core.Main.handleCommand(Unknown Source)
> at com.babeldoc.core.Main.main(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> at com.babeldoc.init.Main.runBabeldocMain(Unknown Source)
> at com.babeldoc.init.Main.main(Unknown Source)
> Caused by: org.apache.bsf.BSFException: JavaScript Error: Internal Error:
> ReferenceError: "longlegs" is not defined.
> at
> org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(Unknown
> Source)
> at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown
> Source)
> at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
> at org.apache.bsf.BSFManager$6.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.apache.bsf.BSFManager.exec(Unknown Source)
> ... 27 more
>
>
> ---------------------------------------------------------------------------
>-------------
>
> This is a PRIVATE message. If you are not the intended recipient, please
> delete without copying and kindly advise us by e-mail of the mistake in
> delivery. NOTE: Regardless of content, this e-mail shall not operate to
> bind CSC to any order or other contract unless pursuant to explicit written
> agreement or government initiative expressly permitting the use of e-mail
> for such purpose.
> ---------------------------------------------------------------------------
>-------------
>
>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Babeldoc-devel mailing list
> Bab...@li...
> https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
|
|
From: Qin D. <qd...@cs...> - 2003-10-06 22:38:11
|
Bruce and David:
I don't need to create a lib folder of my own and then set classpath to it.
I finally found out that I just have to put my jar into %babeldoc_home%/lib
directory. The problem that babeldoc did not find my jar before is
because the way that script imports the classes. Now, I fixed the scripts
and the babeldoc finds my jar and starts validationg the file. It is very
good.
However, another problem. In my validation routine, I use Velocity to
generate a validation report. Now, for some unknown reasons, my Velocity
could not start. See the following error trace. I put my debug statement
in my validation routine. The problem is right at initializing the
VelocityEngine. I checked the Velocity documents, there are two ways to
initialize the Velocity: Singleton and non-Singleton. Singleton means only
one instance of Velocity per JVM allowed. I guess when I tried to
initialize my velocity, the scripting does not like it.
Is there a reason that the babeldoc only allows Singleton Velocity? Can we
change it to none-singleton? Where is in Babeldoc that Velocity is first
initialized? Maybe I can try to change it to none-singleton and see if it
makes any diffrerence.
Please let me know, I am pretty close to get this thing work. The only
thing that needs to fix is the initialize the velocity.
Thank you.
2003-10-06 17:07:55,668|DEBUG|filevalidation.TestManager|Enter
logErrors2003-10-06 17:07:55,668|DEBUG|filevalidation.TestManager|Enter
logErrorDetails2003-10-06 17:07:55,668|INFO
|filevalidation.TestManager|Processed Aftermarket[24 rows] in 0
second(s)2003-10-06
17:07:55,728|ERROR|pipeline.DefaultPipelineStageErrorHandler|[DefaultPipelineStageErrorHandler.handlePipelineStageError]
PipelineStage name:
initialize Error: com.babeldoc.core.pipeline.PipelineException: Script
processing failed2003-10-06
17:07:55,728|ERROR|command.PipelineFeeder|[PipelineFeeder.process]
com.babeldoc.core.pipeline.PipelineException: Script processing failed
at
com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown
Source)
at
com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPipelineStage(Unknown
Source)
at
com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown Source)
at com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown
Source)
at
com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown Source)
at com.babeldoc.core.pipeline.feeder.FeederFactory.process(Unknown
Source)
at com.babeldoc.core.pipeline.command.PipelineFeeder.process(Unknown
Source)
at com.babeldoc.core.pipeline.command.PipelineFeeder.execute(Unknown
Source)
at com.babeldoc.core.BabeldocCommand.executeCommand(Unknown Source)
at com.babeldoc.core.BabeldocCommand.<init>(Unknown Source)
at com.babeldoc.core.pipeline.command.PipelineFeeder.<init>(Unknown
Source)
at com.babeldoc.core.pipeline.command.PipelineFeeder.main(Unknown
Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.babeldoc.core.Main.handleCommand(Unknown Source)
at com.babeldoc.core.Main.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.babeldoc.init.Main.runBabeldocMain(Unknown Source)
at com.babeldoc.init.Main.main(Unknown Source)
Caused by: org.apache.bsf.BSFException: JavaScript Error:
java.lang.ExceptionInInitializerError
at
org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(Unknown
Source)
at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown
Source)
at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
at org.apache.bsf.BSFManager$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.bsf.BSFManager.exec(Unknown Source)
... 27 more
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------
Bruce McDonald
<bruce To: Qin Ding/ASD/CSC@CSC, David Glick <dg...@co...>
@mcdonald-family cc: bab...@li...
.com> Subject: Re: [Babeldoc-devel] Re: [Babeldoc-user]
Questions. Please Help
10/03/03 07:53
PM
You need to import your class into the javascript. Please read the
documentation found at the Mozilla/Rhino/JS site (use google to find the
URL).
On Friday 03 October 2003 01:33 pm, Qin Ding wrote:
> David and Bruce:
>
> I put the my validation jar into c:\qin\lib foder and set CLASSPATH=c:
> \qin\lib\myvalidation.jar;%CLASSPATH%. Re-ran the pipeline. Still got the
> error for not finding the class. I built a small app to verify
> myvalidation.jar using the same classpath. It finds the
> TestManager.validation without the problem. So the problem seems at the
my
> script. Here is my script:
> initialize.script=\
> longlegs.core.filevalidation.TestManager.validate(document.get
> ("file_name"),\
> document.getInputStream());\
>
> 1. Internally, when this script is received, how does ScriptingStage
class
> do to start search the external jar?
> 2. I don't think the external application stage will help me because our
> validation jar is not an "application"; and it only takes either
> java.io.File or java.io.InputStream.
> 3. If I can not make it work using Scripting stage, I am think just
modify
> the directory scanner to include the call to my validation routine after
it
> picks up the file there. Can I do that by extending the
DirectoryScanner?
> Once again, if I extend the class, where should I deploy it?
> 4. There are lots of directories with the numbers as their names. What
are
> those directories? Does the system perge them eventually?
>
> <2003-10-03 09:59:55,637> INFO [main] : PipelineStage name: initialize
> <2003-10-03 09:59:56,108> ERROR [main] :
> [DefaultPipelineStageErrorHandler.handlePipelineStageError] PipelineStage
> name: initialize Error: com.babeldoc.core.pipeline.PipelineException:
> Script processing failed
> <2003-10-03 09:59:56,108> ERROR [main] : [PipelineFeeder.process]
> com.babeldoc.core.pipeline.PipelineException: Script processing failed
> at
> com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown
> Source)
> at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown
> Source)
> at
>
com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPipe
>lineStage(Unknown Source)
> at
>
com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(Unk
>nown Source)
> at com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown
> Source)
> at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown
Source)
> at
com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown
> Source)
> at
> com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown
Source)
> at com.babeldoc.core.pipeline.feeder.FeederFactory.process(Unknown
> Source)
> at
com.babeldoc.core.pipeline.command.PipelineFeeder.process(Unknown
> Source)
> at
com.babeldoc.core.pipeline.command.PipelineFeeder.execute(Unknown
> Source)
> at com.babeldoc.core.BabeldocCommand.executeCommand(Unknown Source)
> at com.babeldoc.core.BabeldocCommand.<init>(Unknown Source)
> at com.babeldoc.core.pipeline.command.PipelineFeeder.<init>(Unknown
> Source)
> at com.babeldoc.core.pipeline.command.PipelineFeeder.main(Unknown
> Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> at com.babeldoc.core.Main.handleCommand(Unknown Source)
> at com.babeldoc.core.Main.main(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> at com.babeldoc.init.Main.runBabeldocMain(Unknown Source)
> at com.babeldoc.init.Main.main(Unknown Source)
> Caused by: org.apache.bsf.BSFException: JavaScript Error: Internal Error:
> ReferenceError: "longlegs" is not defined.
> at
> org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(Unknown
> Source)
> at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown
> Source)
> at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
> at org.apache.bsf.BSFManager$6.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.apache.bsf.BSFManager.exec(Unknown Source)
> ... 27 more
>
>
>
---------------------------------------------------------------------------
>-------------
>
> This is a PRIVATE message. If you are not the intended recipient, please
> delete without copying and kindly advise us by e-mail of the mistake in
> delivery. NOTE: Regardless of content, this e-mail shall not operate to
> bind CSC to any order or other contract unless pursuant to explicit
written
> agreement or government initiative expressly permitting the use of e-mail
> for such purpose.
>
---------------------------------------------------------------------------
>-------------
>
>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Babeldoc-devel mailing list
> Bab...@li...
> https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
|
|
From: David G. <dg...@co...> - 2003-10-07 04:40:25
|
Hi Qin,
Since I only know the bare minimum of Velocity, I'll let Master Bruce field
this one.
David
On Monday 06 October 2003 3:36 pm, Qin Ding wrote:
> Bruce and David:
>
> I don't need to create a lib folder of my own and then set classpath to it.
> I finally found out that I just have to put my jar into %babeldoc_home%/lib
> directory. The problem that babeldoc did not find my jar before is
> because the way that script imports the classes. Now, I fixed the scripts
> and the babeldoc finds my jar and starts validationg the file. It is very
> good.
>
> However, another problem. In my validation routine, I use Velocity to
> generate a validation report. Now, for some unknown reasons, my Velocity
> could not start. See the following error trace. I put my debug statement
> in my validation routine. The problem is right at initializing the
> VelocityEngine. I checked the Velocity documents, there are two ways to
> initialize the Velocity: Singleton and non-Singleton. Singleton means only
> one instance of Velocity per JVM allowed. I guess when I tried to
> initialize my velocity, the scripting does not like it.
>
> Is there a reason that the babeldoc only allows Singleton Velocity? Can we
> change it to none-singleton? Where is in Babeldoc that Velocity is first
> initialized? Maybe I can try to change it to none-singleton and see if it
> makes any diffrerence.
>
> Please let me know, I am pretty close to get this thing work. The only
> thing that needs to fix is the initialize the velocity.
>
> Thank you.
>
> 2003-10-06 17:07:55,668|DEBUG|filevalidation.TestManager|Enter
> logErrors2003-10-06 17:07:55,668|DEBUG|filevalidation.TestManager|Enter
> logErrorDetails2003-10-06 17:07:55,668|INFO
>
> |filevalidation.TestManager|Processed Aftermarket[24 rows] in 0
>
> second(s)2003-10-06
>
> 17:07:55,728|ERROR|pipeline.DefaultPipelineStageErrorHandler|[DefaultPipeli
>neStageErrorHandler.handlePipelineStageError] PipelineStage name:
> initialize Error: com.babeldoc.core.pipeline.PipelineException: Script
> processing failed2003-10-06
> 17:07:55,728|ERROR|command.PipelineFeeder|[PipelineFeeder.process]
> com.babeldoc.core.pipeline.PipelineException: Script processing failed
> at
> com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown
> Source)
> at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown
> Source)
> at
> com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPipe
>lineStage(Unknown Source)
> at
> com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(Unk
>nown Source)
> at com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown
> Source)
> at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown Source)
> at com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown
> Source)
> at
> com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown Source)
> at com.babeldoc.core.pipeline.feeder.FeederFactory.process(Unknown
> Source)
> at com.babeldoc.core.pipeline.command.PipelineFeeder.process(Unknown
> Source)
> at com.babeldoc.core.pipeline.command.PipelineFeeder.execute(Unknown
> Source)
> at com.babeldoc.core.BabeldocCommand.executeCommand(Unknown Source)
> at com.babeldoc.core.BabeldocCommand.<init>(Unknown Source)
> at com.babeldoc.core.pipeline.command.PipelineFeeder.<init>(Unknown
> Source)
> at com.babeldoc.core.pipeline.command.PipelineFeeder.main(Unknown
> Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> at com.babeldoc.core.Main.handleCommand(Unknown Source)
> at com.babeldoc.core.Main.main(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> at com.babeldoc.init.Main.runBabeldocMain(Unknown Source)
> at com.babeldoc.init.Main.main(Unknown Source)
> Caused by: org.apache.bsf.BSFException: JavaScript Error:
> java.lang.ExceptionInInitializerError
> at
> org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(Unknown
> Source)
> at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown
> Source)
> at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
> at org.apache.bsf.BSFManager$6.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.apache.bsf.BSFManager.exec(Unknown Source)
> ... 27 more
>
>
>
> ---------------------------------------------------------------------------
>-------------
>
> This is a PRIVATE message. If you are not the intended recipient, please
> delete without copying and kindly advise us by e-mail of the mistake in
> delivery. NOTE: Regardless of content, this e-mail shall not operate to
> bind CSC to any order or other contract unless pursuant to explicit written
> agreement or government initiative expressly permitting the use of e-mail
> for such purpose.
> ---------------------------------------------------------------------------
>-------------
>
>
>
>
>
> Bruce McDonald
> <bruce To: Qin
> Ding/ASD/CSC@CSC, David Glick <dg...@co...> @mcdonald-family cc:
> bab...@li... .com> Subject:
> Re: [Babeldoc-devel] Re: [Babeldoc-user] Questions. Please Help 10/03/03
> 07:53
> PM
>
>
>
>
>
>
> You need to import your class into the javascript. Please read the
> documentation found at the Mozilla/Rhino/JS site (use google to find the
> URL).
>
> On Friday 03 October 2003 01:33 pm, Qin Ding wrote:
> > David and Bruce:
> >
> > I put the my validation jar into c:\qin\lib foder and set CLASSPATH=c:
> > \qin\lib\myvalidation.jar;%CLASSPATH%. Re-ran the pipeline. Still got the
> > error for not finding the class. I built a small app to verify
> > myvalidation.jar using the same classpath. It finds the
> > TestManager.validation without the problem. So the problem seems at the
>
> my
>
> > script. Here is my script:
> > initialize.script=\
> > longlegs.core.filevalidation.TestManager.validate(document.get
> > ("file_name"),\
> > document.getInputStream());\
> >
> > 1. Internally, when this script is received, how does ScriptingStage
>
> class
>
> > do to start search the external jar?
> > 2. I don't think the external application stage will help me because our
> > validation jar is not an "application"; and it only takes either
> > java.io.File or java.io.InputStream.
> > 3. If I can not make it work using Scripting stage, I am think just
>
> modify
>
> > the directory scanner to include the call to my validation routine after
>
> it
>
> > picks up the file there. Can I do that by extending the
>
> DirectoryScanner?
>
> > Once again, if I extend the class, where should I deploy it?
> > 4. There are lots of directories with the numbers as their names. What
>
> are
>
> > those directories? Does the system perge them eventually?
> >
> > <2003-10-03 09:59:55,637> INFO [main] : PipelineStage name: initialize
> > <2003-10-03 09:59:56,108> ERROR [main] :
> > [DefaultPipelineStageErrorHandler.handlePipelineStageError] PipelineStage
> > name: initialize Error: com.babeldoc.core.pipeline.PipelineException:
> > Script processing failed
> > <2003-10-03 09:59:56,108> ERROR [main] : [PipelineFeeder.process]
> > com.babeldoc.core.pipeline.PipelineException: Script processing failed
> > at
> > com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown
> > Source)
> > at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown
> > Source)
> > at
>
> com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPipe
>
> >lineStage(Unknown Source)
> > at
>
> com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(Unk
>
> >nown Source)
> > at com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown
> > Source)
> > at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown
>
> Source)
>
> > at
>
> com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown
>
> > Source)
> > at
> > com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown
>
> Source)
>
> > at com.babeldoc.core.pipeline.feeder.FeederFactory.process(Unknown
> > Source)
> > at
>
> com.babeldoc.core.pipeline.command.PipelineFeeder.process(Unknown
>
> > Source)
> > at
>
> com.babeldoc.core.pipeline.command.PipelineFeeder.execute(Unknown
>
> > Source)
> > at com.babeldoc.core.BabeldocCommand.executeCommand(Unknown Source)
> > at com.babeldoc.core.BabeldocCommand.<init>(Unknown Source)
> > at com.babeldoc.core.pipeline.command.PipelineFeeder.<init>(Unknown
> > Source)
> > at com.babeldoc.core.pipeline.command.PipelineFeeder.main(Unknown
> > Source)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>
> >9) at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>
> >l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> > at com.babeldoc.core.Main.handleCommand(Unknown Source)
> > at com.babeldoc.core.Main.main(Unknown Source)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>
> >9) at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>
> >l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> > at com.babeldoc.init.Main.runBabeldocMain(Unknown Source)
> > at com.babeldoc.init.Main.main(Unknown Source)
> > Caused by: org.apache.bsf.BSFException: JavaScript Error: Internal Error:
> > ReferenceError: "longlegs" is not defined.
> > at
> > org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(Unknown
> > Source)
> > at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown
> > Source)
> > at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
> > at org.apache.bsf.BSFManager$6.run(Unknown Source)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at org.apache.bsf.BSFManager.exec(Unknown Source)
> > ... 27 more
>
> ---------------------------------------------------------------------------
>
> >-------------
> >
> > This is a PRIVATE message. If you are not the intended recipient, please
> > delete without copying and kindly advise us by e-mail of the mistake in
> > delivery. NOTE: Regardless of content, this e-mail shall not operate to
> > bind CSC to any order or other contract unless pursuant to explicit
>
> written
>
> > agreement or government initiative expressly permitting the use of e-mail
> > for such purpose.
>
> ---------------------------------------------------------------------------
>
> >-------------
> >
> >
> >
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Babeldoc-devel mailing list
> > Bab...@li...
> > https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
--
David Glick
Transmit Consulting, Inc
619-475-4052
dg...@tr...
|
|
From: McDonald, B. <Bru...@ba...> - 2003-10-07 13:16:29
|
And I will refer you to the source code and to the Velocity web site.
-----Original Message-----
From: David Glick [mailto:dg...@co...]
Sent: Tuesday, October 07, 2003 12:44 AM
To: Qin Ding; Bruce McDonald
Cc: bab...@li...
Subject: Re: [Babeldoc-devel] Re: [Babeldoc-user] Questions. Please Help
Hi Qin,
Since I only know the bare minimum of Velocity, I'll let Master Bruce field
this one.
David
On Monday 06 October 2003 3:36 pm, Qin Ding wrote:
> Bruce and David:
>
> I don't need to create a lib folder of my own and then set classpath to it.
> I finally found out that I just have to put my jar into %babeldoc_home%/lib
> directory. The problem that babeldoc did not find my jar before is
> because the way that script imports the classes. Now, I fixed the scripts
> and the babeldoc finds my jar and starts validationg the file. It is very
> good.
>
> However, another problem. In my validation routine, I use Velocity to
> generate a validation report. Now, for some unknown reasons, my Velocity
> could not start. See the following error trace. I put my debug statement
> in my validation routine. The problem is right at initializing the
> VelocityEngine. I checked the Velocity documents, there are two ways to
> initialize the Velocity: Singleton and non-Singleton. Singleton means only
> one instance of Velocity per JVM allowed. I guess when I tried to
> initialize my velocity, the scripting does not like it.
>
> Is there a reason that the babeldoc only allows Singleton Velocity? Can we
> change it to none-singleton? Where is in Babeldoc that Velocity is first
> initialized? Maybe I can try to change it to none-singleton and see if it
> makes any diffrerence.
>
> Please let me know, I am pretty close to get this thing work. The only
> thing that needs to fix is the initialize the velocity.
>
> Thank you.
>
> 2003-10-06 17:07:55,668|DEBUG|filevalidation.TestManager|Enter
> logErrors2003-10-06 17:07:55,668|DEBUG|filevalidation.TestManager|Enter
> logErrorDetails2003-10-06 17:07:55,668|INFO
>
> |filevalidation.TestManager|Processed Aftermarket[24 rows] in 0
>
> second(s)2003-10-06
>
> 17:07:55,728|ERROR|pipeline.DefaultPipelineStageErrorHandler|[DefaultPipeli
>neStageErrorHandler.handlePipelineStageError] PipelineStage name:
> initialize Error: com.babeldoc.core.pipeline.PipelineException: Script
> processing failed2003-10-06
> 17:07:55,728|ERROR|command.PipelineFeeder|[PipelineFeeder.process]
> com.babeldoc.core.pipeline.PipelineException: Script processing failed
> at
> com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown
> Source)
> at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown
> Source)
> at
> com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPipe
>lineStage(Unknown Source)
> at
> com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(Unk
>nown Source)
> at com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown
> Source)
> at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown Source)
> at com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown
> Source)
> at
> com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown Source)
> at com.babeldoc.core.pipeline.feeder.FeederFactory.process(Unknown
> Source)
> at com.babeldoc.core.pipeline.command.PipelineFeeder.process(Unknown
> Source)
> at com.babeldoc.core.pipeline.command.PipelineFeeder.execute(Unknown
> Source)
> at com.babeldoc.core.BabeldocCommand.executeCommand(Unknown Source)
> at com.babeldoc.core.BabeldocCommand.<init>(Unknown Source)
> at com.babeldoc.core.pipeline.command.PipelineFeeder.<init>(Unknown
> Source)
> at com.babeldoc.core.pipeline.command.PipelineFeeder.main(Unknown
> Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> at com.babeldoc.core.Main.handleCommand(Unknown Source)
> at com.babeldoc.core.Main.main(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> at com.babeldoc.init.Main.runBabeldocMain(Unknown Source)
> at com.babeldoc.init.Main.main(Unknown Source)
> Caused by: org.apache.bsf.BSFException: JavaScript Error:
> java.lang.ExceptionInInitializerError
> at
> org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(Unknown
> Source)
> at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown
> Source)
> at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
> at org.apache.bsf.BSFManager$6.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.apache.bsf.BSFManager.exec(Unknown Source)
> ... 27 more
>
>
>
> ---------------------------------------------------------------------------
>-------------
>
> This is a PRIVATE message. If you are not the intended recipient, please
> delete without copying and kindly advise us by e-mail of the mistake in
> delivery. NOTE: Regardless of content, this e-mail shall not operate to
> bind CSC to any order or other contract unless pursuant to explicit written
> agreement or government initiative expressly permitting the use of e-mail
> for such purpose.
> ---------------------------------------------------------------------------
>-------------
>
>
>
>
>
> Bruce McDonald
> <bruce To: Qin
> Ding/ASD/CSC@CSC, David Glick <dg...@co...> @mcdonald-family cc:
> bab...@li... .com> Subject:
> Re: [Babeldoc-devel] Re: [Babeldoc-user] Questions. Please Help 10/03/03
> 07:53
> PM
>
>
>
>
>
>
> You need to import your class into the javascript. Please read the
> documentation found at the Mozilla/Rhino/JS site (use google to find the
> URL).
>
> On Friday 03 October 2003 01:33 pm, Qin Ding wrote:
> > David and Bruce:
> >
> > I put the my validation jar into c:\qin\lib foder and set CLASSPATH=c:
> > \qin\lib\myvalidation.jar;%CLASSPATH%. Re-ran the pipeline. Still got the
> > error for not finding the class. I built a small app to verify
> > myvalidation.jar using the same classpath. It finds the
> > TestManager.validation without the problem. So the problem seems at the
>
> my
>
> > script. Here is my script:
> > initialize.script=\
> > longlegs.core.filevalidation.TestManager.validate(document.get
> > ("file_name"),\
> > document.getInputStream());\
> >
> > 1. Internally, when this script is received, how does ScriptingStage
>
> class
>
> > do to start search the external jar?
> > 2. I don't think the external application stage will help me because our
> > validation jar is not an "application"; and it only takes either
> > java.io.File or java.io.InputStream.
> > 3. If I can not make it work using Scripting stage, I am think just
>
> modify
>
> > the directory scanner to include the call to my validation routine after
>
> it
>
> > picks up the file there. Can I do that by extending the
>
> DirectoryScanner?
>
> > Once again, if I extend the class, where should I deploy it?
> > 4. There are lots of directories with the numbers as their names. What
>
> are
>
> > those directories? Does the system perge them eventually?
> >
> > <2003-10-03 09:59:55,637> INFO [main] : PipelineStage name: initialize
> > <2003-10-03 09:59:56,108> ERROR [main] :
> > [DefaultPipelineStageErrorHandler.handlePipelineStageError] PipelineStage
> > name: initialize Error: com.babeldoc.core.pipeline.PipelineException:
> > Script processing failed
> > <2003-10-03 09:59:56,108> ERROR [main] : [PipelineFeeder.process]
> > com.babeldoc.core.pipeline.PipelineException: Script processing failed
> > at
> > com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown
> > Source)
> > at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown
> > Source)
> > at
>
> com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPipe
>
> >lineStage(Unknown Source)
> > at
>
> com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(Unk
>
> >nown Source)
> > at com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown
> > Source)
> > at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown
>
> Source)
>
> > at
>
> com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown
>
> > Source)
> > at
> > com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown
>
> Source)
>
> > at com.babeldoc.core.pipeline.feeder.FeederFactory.process(Unknown
> > Source)
> > at
>
> com.babeldoc.core.pipeline.command.PipelineFeeder.process(Unknown
>
> > Source)
> > at
>
> com.babeldoc.core.pipeline.command.PipelineFeeder.execute(Unknown
>
> > Source)
> > at com.babeldoc.core.BabeldocCommand.executeCommand(Unknown Source)
> > at com.babeldoc.core.BabeldocCommand.<init>(Unknown Source)
> > at com.babeldoc.core.pipeline.command.PipelineFeeder.<init>(Unknown
> > Source)
> > at com.babeldoc.core.pipeline.command.PipelineFeeder.main(Unknown
> > Source)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>
> >9) at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>
> >l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> > at com.babeldoc.core.Main.handleCommand(Unknown Source)
> > at com.babeldoc.core.Main.main(Unknown Source)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>
> >9) at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>
> >l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> > at com.babeldoc.init.Main.runBabeldocMain(Unknown Source)
> > at com.babeldoc.init.Main.main(Unknown Source)
> > Caused by: org.apache.bsf.BSFException: JavaScript Error: Internal Error:
> > ReferenceError: "longlegs" is not defined.
> > at
> > org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(Unknown
> > Source)
> > at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown
> > Source)
> > at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
> > at org.apache.bsf.BSFManager$6.run(Unknown Source)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at org.apache.bsf.BSFManager.exec(Unknown Source)
> > ... 27 more
>
> ---------------------------------------------------------------------------
>
> >-------------
> >
> > This is a PRIVATE message. If you are not the intended recipient, please
> > delete without copying and kindly advise us by e-mail of the mistake in
> > delivery. NOTE: Regardless of content, this e-mail shall not operate to
> > bind CSC to any order or other contract unless pursuant to explicit
>
> written
>
> > agreement or government initiative expressly permitting the use of e-mail
> > for such purpose.
>
> ---------------------------------------------------------------------------
>
> >-------------
> >
> >
> >
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Babeldoc-devel mailing list
> > Bab...@li...
> > https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
--
David Glick
Transmit Consulting, Inc
619-475-4052
dg...@tr...
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Babeldoc-devel mailing list
Bab...@li...
https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
|
|
From: Qin D. <qd...@cs...> - 2003-10-07 19:39:25
|
David and Bruce:
Let me report back to you all I have done to try to solve the Velocity
issue.
I modified the my validation routine to use VelocityEngine instead of
Velocity. That way, I can start a new instance of Velocity. Now, my
velocity works, although it still has hard time to find the resource file
(vm file). Right now, I just hard coded the vm file.
I run command line, as you see it works:
C:\DADDY-~1>babeldoc process -p validation-pipeline -f c:
\daddy-longlegs\Aftermarket.dat
<2003-10-07 14:19:18,307> INFO [main] : PipelineStage name: initialize
2003-10-07 14:19:19,469|INFO |filevalidation.TestManager|Start processing
Aftermarket
2003-10-07 14:19:19,729|INFO |filevalidation.TestManager|Processed
Aftermarket[24 rows] in 0 second(s)
Please help me with the following two questions:
1. But when I use the scanner to run the same file, I got this error.
Basically, when document.get("file_name") failed. It returns null value.
I remembered that Bruce mentioned that he just fixed this problem. Can I
download the patch? Or what should I do to fix it myself for the time
being?
2. I remember I have asked this question:
What should I do with those ever-growing folders under %BABELDOC_HOME%. Is
there a way to purge them if necessary? What would happen if I manually
remove them? I just want to know how to manage the filesystem which seems
growing very fast.
These are the errors when running scanner:
2003-10-07
14:24:04,248|ERROR|filevalidation.TestManager|AD0028771065554644248:longlegs.core.filevalidation.utils.FileValidationException:
java.lang.Exception: null is null value
at
longlegs.core.filevalidation.utils.ExceptionUtil.createFileValidationException(Unknown
Source)
at longlegs.core.filevalidation.TestManager.validate(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.mozilla.javascript.NativeJavaMethod.call(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.call(Unknown Source)
at org.mozilla.javascript.gen.c1.call(Unknown Source)
at org.mozilla.javascript.gen.c1.exec(Unknown Source)
at org.mozilla.javascript.Context.evaluateReader(Unknown Source)
at org.mozilla.javascript.Context.evaluateString(Unknown Source)
at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown
Source)
at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
at org.apache.bsf.BSFManager$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.bsf.BSFManager.exec(Unknown Source)
at
com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown
Source)
at
com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPipelineStage(Unknown
Source)
at
com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown Source)
at com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown
Source)
at
com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown Source)
at
com.babeldoc.core.pipeline.feeder.AsynchronousFeeder.actuallyProcess(Unknown
Source)
at com.babeldoc.core.pipeline.feeder.AsynchronousFeeder$1.run(Unknown
Source)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source)
at java.lang.Thread.run(Thread.java:536)
Caused by: java.lang.Exception: null is null value
... 28 more
2003-10-07
14:24:04,289|ERROR|pipeline.DefaultPipelineStageErrorHandler|[DefaultPipelineStageErrorHandler.handlePipelineStageError]
PipelineStage name: initialize Error:
com.babeldoc.core.pipeline.PipelineException: Script processing
failed2003-10-07
14:24:04,299|ERROR|feeder.AsynchronousFeeder|[AsynchronousFeeder$1.run]
com.babeldoc.core.pipeline.PipelineException: Script processing failed
at
com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown
Source)
at
com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPipelineStage(Unknown
Source)
at
com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown Source)
at com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown
Source)
at
com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown Source)
at
com.babeldoc.core.pipeline.feeder.AsynchronousFeeder.actuallyProcess(Unknown
Source)
at com.babeldoc.core.pipeline.feeder.AsynchronousFeeder$1.run(Unknown
Source)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source)
at java.lang.Thread.run(Thread.java:536)
Caused by: org.apache.bsf.BSFException: JavaScript Error:
longlegs.core.filevalidation.utils.FileValidationException:
java.lang.Exception: null is null value
at
org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(Unknown
Source)
at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown
Source)
at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
at org.apache.bsf.BSFManager$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.bsf.BSFManager.exec(Unknown Source)
... 12 more
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------
|
|
From: McDonald, B. <Bru...@ba...> - 2003-10-07 22:15:53
|
1. Use the code in CVS.
2. Use the dummy journal: Create journal/config.properties - with single line: journalType=dummy
-----Original Message-----
From: Qin Ding [mailto:qd...@cs...]
Sent: Tuesday, October 07, 2003 3:38 PM
To: David Glick
Cc: bab...@li...
Subject: Re: [Babeldoc-devel] Re: [Babeldoc-user] Questions. Please Help
David and Bruce:
Let me report back to you all I have done to try to solve the Velocity
issue.
I modified the my validation routine to use VelocityEngine instead of
Velocity. That way, I can start a new instance of Velocity. Now, my
velocity works, although it still has hard time to find the resource file
(vm file). Right now, I just hard coded the vm file.
I run command line, as you see it works:
C:\DADDY-~1>babeldoc process -p validation-pipeline -f c:
\daddy-longlegs\Aftermarket.dat
<2003-10-07 14:19:18,307> INFO [main] : PipelineStage name: initialize
2003-10-07 14:19:19,469|INFO |filevalidation.TestManager|Start processing
Aftermarket
2003-10-07 14:19:19,729|INFO |filevalidation.TestManager|Processed
Aftermarket[24 rows] in 0 second(s)
Please help me with the following two questions:
1. But when I use the scanner to run the same file, I got this error.
Basically, when document.get("file_name") failed. It returns null value.
I remembered that Bruce mentioned that he just fixed this problem. Can I
download the patch? Or what should I do to fix it myself for the time
being?
2. I remember I have asked this question:
What should I do with those ever-growing folders under %BABELDOC_HOME%. Is
there a way to purge them if necessary? What would happen if I manually
remove them? I just want to know how to manage the filesystem which seems
growing very fast.
These are the errors when running scanner:
2003-10-07
14:24:04,248|ERROR|filevalidation.TestManager|AD0028771065554644248:longlegs.core.filevalidation.utils.FileValidationException:
java.lang.Exception: null is null value
at
longlegs.core.filevalidation.utils.ExceptionUtil.createFileValidationException(Unknown
Source)
at longlegs.core.filevalidation.TestManager.validate(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.mozilla.javascript.NativeJavaMethod.call(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.call(Unknown Source)
at org.mozilla.javascript.gen.c1.call(Unknown Source)
at org.mozilla.javascript.gen.c1.exec(Unknown Source)
at org.mozilla.javascript.Context.evaluateReader(Unknown Source)
at org.mozilla.javascript.Context.evaluateString(Unknown Source)
at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown
Source)
at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
at org.apache.bsf.BSFManager$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.bsf.BSFManager.exec(Unknown Source)
at
com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown
Source)
at
com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPipelineStage(Unknown
Source)
at
com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown Source)
at com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown
Source)
at
com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown Source)
at
com.babeldoc.core.pipeline.feeder.AsynchronousFeeder.actuallyProcess(Unknown
Source)
at com.babeldoc.core.pipeline.feeder.AsynchronousFeeder$1.run(Unknown
Source)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source)
at java.lang.Thread.run(Thread.java:536)
Caused by: java.lang.Exception: null is null value
... 28 more
2003-10-07
14:24:04,289|ERROR|pipeline.DefaultPipelineStageErrorHandler|[DefaultPipelineStageErrorHandler.handlePipelineStageError]
PipelineStage name: initialize Error:
com.babeldoc.core.pipeline.PipelineException: Script processing
failed2003-10-07
14:24:04,299|ERROR|feeder.AsynchronousFeeder|[AsynchronousFeeder$1.run]
com.babeldoc.core.pipeline.PipelineException: Script processing failed
at
com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown
Source)
at
com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPipelineStage(Unknown
Source)
at
com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown
Source)
at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown Source)
at com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown
Source)
at
com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown Source)
at
com.babeldoc.core.pipeline.feeder.AsynchronousFeeder.actuallyProcess(Unknown
Source)
at com.babeldoc.core.pipeline.feeder.AsynchronousFeeder$1.run(Unknown
Source)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source)
at java.lang.Thread.run(Thread.java:536)
Caused by: org.apache.bsf.BSFException: JavaScript Error:
longlegs.core.filevalidation.utils.FileValidationException:
java.lang.Exception: null is null value
at
org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(Unknown
Source)
at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown
Source)
at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
at org.apache.bsf.BSFManager$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.bsf.BSFManager.exec(Unknown Source)
... 12 more
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Babeldoc-devel mailing list
Bab...@li...
https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
|
|
From: Qin D. <qd...@cs...> - 2003-10-08 15:10:41
|
Bruce: I guess I have to wait until you release the the patch. From here, I could not connect to cvs.sourceforge.net from here within the fire wall of the company. How soon do you think the latest code in cvs can be released? Thanks. Qin ---------------------------------------------------------------------------------------- This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ---------------------------------------------------------------------------------------- "McDonald, Bruce" To: Qin Ding/ASD/CSC@CSC, David Glick <dg...@co...> <Bruce.McDonald cc: bab...@li... @bankofamerica.c Subject: RE: [Babeldoc-devel] Re: [Babeldoc-user] om> Questions. Please Help 10/07/03 03:28 PM 1. Use the code in CVS. 2. Use the dummy journal: Create journal/config.properties - with single line: journalType=dummy -----Original Message----- From: Qin Ding [mailto:qd...@cs...] Sent: Tuesday, October 07, 2003 3:38 PM To: David Glick Cc: bab...@li... Subject: Re: [Babeldoc-devel] Re: [Babeldoc-user] Questions. Please Help David and Bruce: Let me report back to you all I have done to try to solve the Velocity issue. I modified the my validation routine to use VelocityEngine instead of Velocity. That way, I can start a new instance of Velocity. Now, my velocity works, although it still has hard time to find the resource file (vm file). Right now, I just hard coded the vm file. I run command line, as you see it works: C:\DADDY-~1>babeldoc process -p validation-pipeline -f c: \daddy-longlegs\Aftermarket.dat <2003-10-07 14:19:18,307> INFO [main] : PipelineStage name: initialize 2003-10-07 14:19:19,469|INFO |filevalidation.TestManager|Start processing Aftermarket 2003-10-07 14:19:19,729|INFO |filevalidation.TestManager|Processed Aftermarket[24 rows] in 0 second(s) Please help me with the following two questions: 1. But when I use the scanner to run the same file, I got this error. Basically, when document.get("file_name") failed. It returns null value. I remembered that Bruce mentioned that he just fixed this problem. Can I download the patch? Or what should I do to fix it myself for the time being? 2. I remember I have asked this question: What should I do with those ever-growing folders under %BABELDOC_HOME%. Is there a way to purge them if necessary? What would happen if I manually remove them? I just want to know how to manage the filesystem which seems growing very fast. These are the errors when running scanner: 2003-10-07 14:24:04,248|ERROR|filevalidation.TestManager|AD0028771065554644248:longlegs.core.filevalidation.utils.FileValidationException: java.lang.Exception: null is null value at longlegs.core.filevalidation.utils.ExceptionUtil.createFileValidationException(Unknown Source) at longlegs.core.filevalidation.TestManager.validate(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.mozilla.javascript.NativeJavaMethod.call(Unknown Source) at org.mozilla.javascript.ScriptRuntime.call(Unknown Source) at org.mozilla.javascript.gen.c1.call(Unknown Source) at org.mozilla.javascript.gen.c1.exec(Unknown Source) at org.mozilla.javascript.Context.evaluateReader(Unknown Source) at org.mozilla.javascript.Context.evaluateString(Unknown Source) at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown Source) at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source) at org.apache.bsf.BSFManager$6.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at org.apache.bsf.BSFManager.exec(Unknown Source) at com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown Source) at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown Source) at com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPipelineStage(Unknown Source) at com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(Unknown Source) at com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown Source) at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown Source) at com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown Source) at com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown Source) at com.babeldoc.core.pipeline.feeder.AsynchronousFeeder.actuallyProcess(Unknown Source) at com.babeldoc.core.pipeline.feeder.AsynchronousFeeder$1.run(Unknown Source) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Thread.java:536) Caused by: java.lang.Exception: null is null value ... 28 more 2003-10-07 14:24:04,289|ERROR|pipeline.DefaultPipelineStageErrorHandler|[DefaultPipelineStageErrorHandler.handlePipelineStageError] PipelineStage name: initialize Error: com.babeldoc.core.pipeline.PipelineException: Script processing failed2003-10-07 14:24:04,299|ERROR|feeder.AsynchronousFeeder|[AsynchronousFeeder$1.run] com.babeldoc.core.pipeline.PipelineException: Script processing failed at com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown Source) at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown Source) at com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPipelineStage(Unknown Source) at com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(Unknown Source) at com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown Source) at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown Source) at com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown Source) at com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown Source) at com.babeldoc.core.pipeline.feeder.AsynchronousFeeder.actuallyProcess(Unknown Source) at com.babeldoc.core.pipeline.feeder.AsynchronousFeeder$1.run(Unknown Source) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Thread.java:536) Caused by: org.apache.bsf.BSFException: JavaScript Error: longlegs.core.filevalidation.utils.FileValidationException: java.lang.Exception: null is null value at org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(Unknown Source) at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown Source) at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source) at org.apache.bsf.BSFManager$6.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at org.apache.bsf.BSFManager.exec(Unknown Source) ... 12 more ---------------------------------------------------------------------------------------- This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ---------------------------------------------------------------------------------------- ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Babeldoc-devel mailing list Bab...@li... https://lists.sourceforge.net/lists/listinfo/babeldoc-devel |
|
From: McDonald, B. <Bru...@ba...> - 2003-10-09 06:26:57
|
There is also a web interface which will allow you to download the files as they exist in CVS from the Sourceforge webpage. They are not always up to date - it can take some time for changes to get to the CVS web. You could also access CVS from you home PC and get the code to work (like I do). Bruce. -----Original Message----- From: Qin Ding [mailto:qd...@cs...] Sent: Wednesday, October 08, 2003 11:09 AM To: McDonald, Bruce Cc: bab...@li...; David Glick Subject: RE: [Babeldoc-devel] Re: [Babeldoc-user] Questions. Please Help Bruce: I guess I have to wait until you release the the patch. From here, I could not connect to cvs.sourceforge.net from here within the fire wall of the company. How soon do you think the latest code in cvs can be released? Thanks. Qin ---------------------------------------------------------------------------------------- This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ---------------------------------------------------------------------------------------- "McDonald, Bruce" To: Qin Ding/ASD/CSC@CSC, David Glick <dg...@co...> <Bruce.McDonald cc: bab...@li... @bankofamerica.c Subject: RE: [Babeldoc-devel] Re: [Babeldoc-user] om> Questions. Please Help 10/07/03 03:28 PM 1. Use the code in CVS. 2. Use the dummy journal: Create journal/config.properties - with single line: journalType=dummy -----Original Message----- From: Qin Ding [mailto:qd...@cs...] Sent: Tuesday, October 07, 2003 3:38 PM To: David Glick Cc: bab...@li... Subject: Re: [Babeldoc-devel] Re: [Babeldoc-user] Questions. Please Help David and Bruce: Let me report back to you all I have done to try to solve the Velocity issue. I modified the my validation routine to use VelocityEngine instead of Velocity. That way, I can start a new instance of Velocity. Now, my velocity works, although it still has hard time to find the resource file (vm file). Right now, I just hard coded the vm file. I run command line, as you see it works: C:\DADDY-~1>babeldoc process -p validation-pipeline -f c: \daddy-longlegs\Aftermarket.dat <2003-10-07 14:19:18,307> INFO [main] : PipelineStage name: initialize 2003-10-07 14:19:19,469|INFO |filevalidation.TestManager|Start processing Aftermarket 2003-10-07 14:19:19,729|INFO |filevalidation.TestManager|Processed Aftermarket[24 rows] in 0 second(s) Please help me with the following two questions: 1. But when I use the scanner to run the same file, I got this error. Basically, when document.get("file_name") failed. It returns null value. I remembered that Bruce mentioned that he just fixed this problem. Can I download the patch? Or what should I do to fix it myself for the time being? 2. I remember I have asked this question: What should I do with those ever-growing folders under %BABELDOC_HOME%. Is there a way to purge them if necessary? What would happen if I manually remove them? I just want to know how to manage the filesystem which seems growing very fast. These are the errors when running scanner: 2003-10-07 14:24:04,248|ERROR|filevalidation.TestManager|AD0028771065554644248:longlegs.core.filevalidation.utils.FileValidationException: java.lang.Exception: null is null value at longlegs.core.filevalidation.utils.ExceptionUtil.createFileValidationException(Unknown Source) at longlegs.core.filevalidation.TestManager.validate(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.mozilla.javascript.NativeJavaMethod.call(Unknown Source) at org.mozilla.javascript.ScriptRuntime.call(Unknown Source) at org.mozilla.javascript.gen.c1.call(Unknown Source) at org.mozilla.javascript.gen.c1.exec(Unknown Source) at org.mozilla.javascript.Context.evaluateReader(Unknown Source) at org.mozilla.javascript.Context.evaluateString(Unknown Source) at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown Source) at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source) at org.apache.bsf.BSFManager$6.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at org.apache.bsf.BSFManager.exec(Unknown Source) at com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown Source) at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown Source) at com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPipelineStage(Unknown Source) at com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(Unknown Source) at com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown Source) at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown Source) at com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown Source) at com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown Source) at com.babeldoc.core.pipeline.feeder.AsynchronousFeeder.actuallyProcess(Unknown Source) at com.babeldoc.core.pipeline.feeder.AsynchronousFeeder$1.run(Unknown Source) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Thread.java:536) Caused by: java.lang.Exception: null is null value ... 28 more 2003-10-07 14:24:04,289|ERROR|pipeline.DefaultPipelineStageErrorHandler|[DefaultPipelineStageErrorHandler.handlePipelineStageError] PipelineStage name: initialize Error: com.babeldoc.core.pipeline.PipelineException: Script processing failed2003-10-07 14:24:04,299|ERROR|feeder.AsynchronousFeeder|[AsynchronousFeeder$1.run] com.babeldoc.core.pipeline.PipelineException: Script processing failed at com.babeldoc.core.pipeline.stage.ScriptingPipelineStage.process(Unknown Source) at com.babeldoc.core.pipeline.PipelineStage.processStage(Unknown Source) at com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.processPipelineStage(Unknown Source) at com.babeldoc.core.pipeline.processor.SyncPipelineStageProcessor.process(Unknown Source) at com.babeldoc.core.pipeline.PipelineStageFactory.process(Unknown Source) at com.babeldoc.core.pipeline.PipelineFactory.process(Unknown Source) at com.babeldoc.core.pipeline.PipelineFactoryFactory.process(Unknown Source) at com.babeldoc.core.pipeline.feeder.SynchronousFeeder.process(Unknown Source) at com.babeldoc.core.pipeline.feeder.AsynchronousFeeder.actuallyProcess(Unknown Source) at com.babeldoc.core.pipeline.feeder.AsynchronousFeeder$1.run(Unknown Source) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Thread.java:536) Caused by: org.apache.bsf.BSFException: JavaScript Error: longlegs.core.filevalidation.utils.FileValidationException: java.lang.Exception: null is null value at org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(Unknown Source) at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown Source) at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source) at org.apache.bsf.BSFManager$6.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at org.apache.bsf.BSFManager.exec(Unknown Source) ... 12 more ---------------------------------------------------------------------------------------- This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ---------------------------------------------------------------------------------------- ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Babeldoc-devel mailing list Bab...@li... https://lists.sourceforge.net/lists/listinfo/babeldoc-devel |