That is correct; and it is covered in the FAQ (along with some pointers on how 
to use the maven assembly plugin to create a new META_INF/services directory 
for your combined jar. 

http://docs.geotools.org/latest/userguide/faq.html#how-do-i-create-an-executable-jar-for-my-geotools-app

If you do give it a go can you report back with success / fail ? I would like 
to update the example. 

-- 
Jody Garnett


On Wednesday, 11 January 2012 at 5:41 AM, mark wrote:

> Tarik Rahman schreef, Op 9-1-2012 19:17:
> > Hi there
> > 
> > I have a project that uses geotools and it runs ok when compiling and 
> > running within my netbeans ide.
> > However when I wrap up all the jars into a single jar, ie all geotools 
> > jars are included in this, and run it, there is a problem where I 
> > create a new SimpleFeatureType a SchemaException occurs
> > 
> > The line is
> > SimpleFeatureType myFeatureType = 
> > DataUtilities.createType("LatLonLocation",
> > "location:Point:srid=4326," +
> > "SMIOBJID:Integer," +
> > "SMIOBJCOL:Integer," +
> > "SMIOBJVIS:Boolean," +
> > "SMIOBJSIZE:Integer," +
> > "SMIOBJPIC:Boolean," +
> > "SMIOBJTYPE:Integer," +
> > // label fields
> > "LBLCAPTION:String," +
> > "LBLFNTNAME:String," +
> > "LBLBOLD:Boolean," +
> > "LBLUNDLINE:Boolean," +
> > "LBLItalic:Boolean," +
> > "LBLSIZE:Integer," +
> > "LBLROT:Double," +
> > "LBLCOL:Integer," +
> > "LBLXOFFSET:Double," +
> > "LBLYOFFSET:Double," +
> > "LBLALGNHOR:Integer," +
> > "LBLALGNVER:Integer");
> > 
> > Does anyone know why this should occur? I don't understand why there 
> > should be a problem as all the geotools jars are contained in the 
> > single jar produced in the 'package-for-store' build by netbeans.
> > 
> > Thanks for any help
> > 
> > Tarik
> I guess repackaging the jar's breaks the Factory SPI mechanism that 
> geotools uses.
> What happens if you make an executable jar that references the needed 
> geotools jars on the classpath using the Class-path: option in the 
> manifest file of your jar.
> 
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create 
> new or port existing apps to sell to consumers worldwide. Explore the 
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join 
> (http://appdeveloper.intel.com/join)
> http://p.sf.net/sfu/intel-appdev
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected] 
> (mailto:[email protected])
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> 
> 


------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to