Subject:Java Execution Author:mark russo Date:25 Oct 2005 12:13 PM
I am using the Stylus Pro 6 enterprise edition and j2e 1.4x. When I generate java code within stylus and compile/run it, it works fine within stylus. When I go to run the code from the command line, however, it gives me numerous errors (36). Do I need to put the saxon information in the classpath with the java information or how do I make the java code work outside of stylus (as a stand alone application)? Any help would be helpful.
Subject:Java Execution Author:mark russo Date:25 Oct 2005 02:12 PM
I will post the error messages when I return home this evening. However, I guess the question I still have is do I have to put the stylus classpath (for saxon) into my environmental variable classpath for it to work outside of stylus? Thanks and will post when I return home.
Subject:Java Execution Author:mark russo Date:28 Oct 2005 02:10 PM
HERE IS THE ERROR STRING WHEN I RUN THE CODE OUTSIDE OF STYLUS.
any help would be greatly appreciated. thanks again.
mark
C:\Program Files\Stylus Studio 6 XML Enterprise Edition\sources>javac test.java
test.java:24: package com.exln.stylus.io does not exist
import com.exln.stylus.io.StylusFileFactory;
^
test.java:26: package net.sf.saxon does not exist
import net.sf.saxon.Configuration;
^
test.java:27: package net.sf.saxon.om does not exist
import net.sf.saxon.om.Item;
^
test.java:28: package net.sf.saxon.om does not exist
import net.sf.saxon.om.SequenceIterator;
^
test.java:29: package net.sf.saxon.query does not exist
import net.sf.saxon.query.DynamicQueryContext;
^
test.java:30: package net.sf.saxon.query does not exist
import net.sf.saxon.query.StaticQueryContext;
^
test.java:31: package net.sf.saxon.query does not exist
import net.sf.saxon.query.XQueryExpression;
^
test.java:32: package net.sf.saxon.value does not exist
import net.sf.saxon.value.AtomicValue;
^
test.java:33: package net.sf.saxon.value does not exist
import net.sf.saxon.value.SequenceExtent;
^
test.java:34: package net.sf.saxon.value does not exist
import net.sf.saxon.value.UntypedAtomicValue;
^
test.java:35: package net.sf.saxon.value does not exist
import net.sf.saxon.value.Value;
^
test.java:62: cannot resolve symbol
symbol : class Configuration
location: class test
Configuration m_cfg = null;
^
test.java:63: cannot resolve symbol
symbol : class StaticQueryContext
location: class test
StaticQueryContext m_sqc = null;
^
test.java:64: cannot resolve symbol
symbol : class DynamicQueryContext
location: class test
DynamicQueryContext m_dqc = null;
^
test.java:190: cannot resolve symbol
symbol : class Configuration
location: class test
public void parseParametersSaxon(Configuration cfg, String[] paramNames,
String[] paramValues, String uri, DynamicQueryContext globalDQC)
^
test.java:190: cannot resolve symbol
symbol : class DynamicQueryContext
location: class test
public void parseParametersSaxon(Configuration cfg, String[] paramNames,
String[] paramValues, String uri, DynamicQueryContext globalDQC)
^
test.java:104: cannot resolve symbol
symbol : variable StylusFileFactory
location: class test
StylusFileFactory.unlockAPI("315146-185340461");
^
test.java:166: cannot resolve symbol
symbol : class Configuration
location: class test
m_cfg = new Configuration();
^
test.java:168: cannot resolve symbol
symbol : variable StylusFileFactory
location: class test
if (m_useResolver) m_cfg.setURIResolver(StylusFileFactory.getFac
tory());
^
test.java:170: cannot resolve symbol
symbol : class StaticQueryContext
location: class test
m_sqc = new StaticQueryContext(m_cfg);
^
test.java:173: cannot resolve symbol
symbol : class DynamicQueryContext
location: class test
m_dqc = new DynamicQueryContext(m_cfg);
^
test.java:186: cannot resolve symbol
symbol : class XQueryExpression
location: class test
XQueryExpression exp = m_sqc.compileQuery(m_queryReader);
^
test.java:199: cannot resolve symbol
symbol : class Value
location: class test
Value xvalue=null;
^
test.java:201: cannot resolve symbol
symbol : class StaticQueryContext
location: class test
StaticQueryContext sqc = new StaticQueryContext(
cfg);
^
test.java:201: cannot resolve symbol
symbol : class StaticQueryContext
location: class test
StaticQueryContext sqc = new StaticQueryContext(
cfg);
^
test.java:203: cannot resolve symbol
symbol : class DynamicQueryContext
location: class test
DynamicQueryContext localDQC = new DynamicQueryC
ontext(cfg);
^
test.java:203: cannot resolve symbol
symbol : class DynamicQueryContext
location: class test
DynamicQueryContext localDQC = new DynamicQueryC
ontext(cfg);
^
test.java:206: cannot resolve symbol
symbol : class XQueryExpression
location: class test
XQueryExpression xqe = sqc.compileQuery(sr);
^
test.java:207: cannot resolve symbol
symbol : class SequenceIterator
location: class test
SequenceIterator si = xqe.iterator(localDQC).get
Another();
^
test.java:208: cannot resolve symbol
symbol : class Item
location: class test
Item item = si.next();
^
test.java:209: cannot resolve symbol
symbol : class AtomicValue
location: class test
if (item != null && si.next() == null && item in
stanceof AtomicValue) {
^
test.java:210: cannot resolve symbol
symbol : class AtomicValue
location: class test
xvalue = (AtomicValue)item;
^
test.java:212: cannot resolve symbol
symbol : class SequenceExtent
location: class test
xvalue = new SequenceExtent(xqe.iterator
(localDQC));
^
test.java:215: cannot resolve symbol
symbol : class UntypedAtomicValue
location: class test
xvalue = new UntypedAtomicValue(svalue);
^
test.java:337: cannot resolve symbol
symbol : variable StylusFileFactory
location: class test.ResolverSource
setInputStream(StylusFileFactory.createInputStream(urlSt
ring, null));
^
test.java:346: cannot resolve symbol
symbol : variable StylusFileFactory
location: class test.ResolverResult
setOutputStream(StylusFileFactory.createOutputStream(url
String, null));
Subject:Java Execution Author:mark russo Date:28 Oct 2005 03:43 PM
thanks - I figured it was something like that - however, I am unsure how to fix it.
In my stylus classpath - it looks like this -
$(classpath),C:\Program Files\Stylus Studio 6 XML Enterprise Edition\bin\CustomFileSystem.jar;C:\Program Files\Stylus Studio 6 XML Enterprise Edition\bin\saxon8.jar
is that what it is supposed to say?
secondly, should I add this to my windows classpath as well (I know you said no, earlier...).
Subject:Java Execution Author:mark russo Date:17 Nov 2005 11:40 AM
Okay, I have entered this classpath in the c:\ window.
C:\>SET CLASSPATH=C:\progra~1\stylus~1\bin\CustomFileSystem.jar; c:\Program Files\stylus~1\bin\saxon8.jar
When I javac the java code created by stylus, I still get the 36 errors that I sent earlier. It works fine from inside stylus but not on the outside. Any help (again) would be appreciated.