You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Junia Porto <ju...@gmail.com> on 2006/08/08 02:02:46 UTC

Re: Can't find package [SOLVED]

I figured it out. The classpath in the Parameters was wrong. Here is an
example how to do it, in case someone needs to know.

Parameters parameters = new Parameters();

        File[] classpath = new File[4];
        classpath[0] = new File( "C:/xmlbeans-2.1.0/lib/xbean.jar" );
        classpath[1] = new File( "C:/xmlbeans-2.1.0/lib/jsr173_1.0_api.jar"
);
        classpath[2] = new File( "C:/xmlbeans-2.1.0/lib/tools.jar" );
        classpath[3] = new File( "C:/xmlbeans-2.1.0/lib/resolver.jar" );
        parameters.setClasspath(classpath);

        parameters.setOutputJar( new File( "test.jar" ) );

        File[] xsdFiles =  { getFile() };
        parameters.setXsdFiles( xsdFiles );

        parameters.setSrcDir( new File( SRC_DIR_PATH ) );

        parameters.setClassesDir( new File( CLASS_DIR_PATH ) );

        SchemaCompiler.compile(parameters);



2006/8/6, Junia Porto <ju...@gmail.com>:
>
> Hello everyone
>
> I'm new at xmlbeans, so I hope you can help.
>
> I'm developing a application using Struts, Tomcat and XMLBeans. I'm using
> SchemaCompiler.compile to generate the jar file for the schema on the fly.
> It does generate the .java files, but after that I get 100 errors saying
> "package org.apache.xmlbeans does not exist". In Tomcat directory, at
> WEB-INF\lib, there are all jar files that comes with XMLBeans. It seems it
> can't find the xbean.jar, but it is there, so I don't know what's wrong.
>
> Can you help me with this?
>
> Thanks a lot!
>
> Junia
>