Question around the 19th issue

0 views
Skip to first unread message

pbeltranl

unread,
May 23, 2009, 7:44:37 AM5/23/09
to take rule compiler
Hi,

I've written a comment in the 19th issue

http://code.google.com/p/take/issues/detail?id=19&can=1

But, maybe the right place is in this list...

Regards,
Pablo.

Pablo Beltran

unread,
May 23, 2009, 6:33:35 PM5/23/09
to take rule compiler
Hi again,

The problem is the System classpath configuration (readable from System.getProperty("java.class.path").

Its value is different depending of the environment: standalone or web java application. The Take compiler takes the classpath from the JVM environment and not from the J2EE app server environment (WEB-INF/...) from where the compiler is called.

Hence it's mandatory configuring the System classpath when Take runs embedded in Tomcat and you must to include in the System classpath the Take  and the 3rd party libraries which are needed to compile your Take script.

I made it and it worked.

Besst regards,
Pablo.




2009/5/23 pbeltranl <pbel...@gmail.com>

jens

unread,
May 24, 2009, 8:46:06 PM5/24/09
to take rule compiler
Hi Pablo,

In KnowledgeBaseManager there is a property to set the base class
loader. This should be useful in situations like this.

Cheers, Jens


On May 24, 10:33 am, Pablo Beltran <pbeltr...@gmail.com> wrote:
> Hi again,
>
> The problem is the System classpath configuration (readable from
> System.getProperty("java.class.path").
>
> Its value is different depending of the environment: standalone or web java
> application. The Take compiler takes the classpath from the JVM environment
> and not from the J2EE app server environment (WEB-INF/...) from where the
> compiler is called.
>
> Hence it's mandatory configuring the System classpath when Take runs
> embedded in Tomcat and you must to include in the System classpath the Take
> and the 3rd party libraries which are needed to compile your Take script.
>
> I made it and it worked.
>
> Besst regards,
> Pablo.
>
> 2009/5/23 pbeltranl <pbeltr...@gmail.com>

Pablo Beltran

unread,
Jun 8, 2009, 3:17:23 PM6/8/09
to take rule compiler
Hi,

Not much success on this.

I tried :

        URL url = new URL("file://"+kbm.getBinFolder());
        kbm.setBaseClassLoader(WebappClassLoader.newInstance(new URL[]{url}));

But TAKE can't found generated classes:

Have you an example about how to configure the classloader for a java webapp server?

Best regards,
Pablo.



2009/5/24 Pablo Beltran <pbel...@gmail.com>
Reply all
Reply to author
Forward
0 new messages