cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Bonnett <rbonn...@mesca.com>
Subject Eclipse runnable jar file can't find cayenne resources
Date Wed, 11 Dec 2013 16:13:15 GMT
This is using 3.1B2.


>From Eclipse, I export my project as a runnable jar file. When I try to execute it from
bash, I get this exception thrown at startup:

Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: org.apache.cayenne.configuration.server.DataDomainLoadException: [v.3.1B2 Feb 05
2013 20:19:35] Configuration resource "cayenne-MongoTariffConversion.xml" is not found.
at org.apache.cayenne.configuration.server.DataDomainProvider.createAndInitDataDomain(DataDomainProvider.java:143)
at org.apache.cayenne.configuration.server.DataDomainProvider.get(DataDomainProvider.java:106)
at org.apache.cayenne.configuration.server.DataDomainProvider.get(DataDomainProvider.java:60)
at org.apache.cayenne.di.spi.CustomProvidersProvider.get(CustomProvidersProvider.java:38)
at org.apache.cayenne.di.spi.FieldInjectingProvider.get(FieldInjectingProvider.java:42)
at org.apache.cayenne.di.spi.DefaultScopeProvider.get(DefaultScopeProvider.java:49)
at org.apache.cayenne.di.spi.DefaultInjector.getInstance(DefaultInjector.java:107)
at org.apache.cayenne.di.spi.FieldInjectingProvider.injectMember(FieldInjectingProvider.java:93)
at org.apache.cayenne.di.spi.FieldInjectingProvider.injectMembers(FieldInjectingProvider.java:58)
at org.apache.cayenne.di.spi.FieldInjectingProvider.get(FieldInjectingProvider.java:43)
at org.apache.cayenne.di.spi.DefaultScopeProvider.get(DefaultScopeProvider.java:49)
at org.apache.cayenne.di.spi.DefaultInjector.getInstance(DefaultInjector.java:103)
at org.apache.cayenne.configuration.CayenneRuntime.getContext(CayenneRuntime.java:180)
at com.mesca.conversion.mongo.LTLTariffConverter.ConvertLTLTariff(LTLTariffConverter.java:29)
at com.mesca.conversion.mongo.TariffConverter.main(TariffConverter.java:37)
... 5 more


Any ideas what is going wrong here? I’ve tried various things with the build path and export
properties in my Eclipse project, all to no avail.
Thanks for any help or suggestions

Here’s the output form jar tvf on my jar file:

jar tvf TariffConverter.jar
   559 Wed Dec 11 11:01:10 EST 2013 META-INF/MANIFEST.MF
     0 Wed Dec 11 11:01:10 EST 2013 org/
     0 Wed Dec 11 11:01:10 EST 2013 org/eclipse/
     0 Wed Dec 11 11:01:10 EST 2013 org/eclipse/jdt/
     0 Wed Dec 11 11:01:10 EST 2013 org/eclipse/jdt/internal/
     0 Wed Dec 11 11:01:10 EST 2013 org/eclipse/jdt/internal/jarinjarloader/
   978 Wed Dec 11 11:01:10 EST 2013 org/eclipse/jdt/internal/jarinjarloader/JIJConstants.class
   714 Wed Dec 11 11:01:10 EST 2013 org/eclipse/jdt/internal/jarinjarloader/JarRsrcLoader$ManifestInfo.class
  4735 Wed Dec 11 11:01:10 EST 2013 org/eclipse/jdt/internal/jarinjarloader/JarRsrcLoader.class
  1505 Wed Dec 11 11:01:10 EST 2013 org/eclipse/jdt/internal/jarinjarloader/RsrcURLConnection.class
  1841 Wed Dec 11 11:01:10 EST 2013 org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandler.class
  1149 Wed Dec 11 11:01:10 EST 2013 org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandlerFactory.class
358048 Wed Dec 11 11:01:10 EST 2013 commons-configuration-1.9.jar
284220 Wed Dec 11 11:01:10 EST 2013 commons-lang-2.6.jar
421246 Wed Dec 11 11:01:10 EST 2013 velocity-1.6.3.jar
 63966 Wed Dec 11 11:01:10 EST 2013 avalon-framework-4.1.3.jar
 77977 Wed Dec 11 11:01:10 EST 2013 servlet-api-2.3.jar
     0 Wed Dec 11 10:42:44 EST 2013 com/
     0 Wed Dec 11 10:42:44 EST 2013 com/mesca/
     0 Wed Dec 11 10:42:44 EST 2013 com/mesca/conversion/
     0 Wed Dec 11 10:42:44 EST 2013 com/mesca/conversion/mongo/
  5237 Wed Dec 11 10:42:44 EST 2013 com/mesca/conversion/mongo/DoNotRateZipConverter.class
  1376 Wed Dec 11 10:42:44 EST 2013 com/mesca/conversion/mongo/ConversionUtilities.class
 17268 Wed Dec 11 10:42:44 EST 2013 com/mesca/conversion/mongo/LTLTariffConverter.class
 13772 Wed Dec 11 10:42:44 EST 2013 com/mesca/conversion/mongo/CarrierConverter.class
  4405 Wed Dec 11 10:42:44 EST 2013 com/mesca/conversion/mongo/TariffConverter.class
  2142 Wed Dec 11 10:42:44 EST 2013 com/mesca/conversion/mongo/RateModuleHelper.class
  6724 Wed Dec 11 10:42:44 EST 2013 com/mesca/conversion/mongo/ServiceRegionConverter.class
     0 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/
     0 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/
   394 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/CompanyPltCodeMatrix.class
   358 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/CompanyFuel.class
   366 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/PltCodeMatrix.class
   581 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/MongoTariffConversion.class
   386 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/CompanyCarrierFuel.class
   358 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/Accessorial.class
   370 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/CompanyPltRate.class
   342 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/Carrier.class
   386 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/CompanyAbsoluteMin.class
   386 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/CarrierAccessorial.class
   386 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/CompanyAccessorial.class
   366 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/DonotrateZips.class
   354 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/CompanyFak.class
   374 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/CompanyDiscount.class
   342 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/PltRate.class
   342 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/ETariff.class
   382 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/CarrierGtedCharge.class
   342 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/Company.class
   358 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/CarrierFuel.class
   386 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/CarrierAbsoluteMin.class
     0 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/
 10917 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_CompanyFak.class
 11323 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_Company.class
  3231 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_PltRate.class
  1798 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_DonotrateZips.class
  2400 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_CarrierGtedCharge.class
  8487 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_Carrier.class
  6342 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_PltCodeMatrix.class
  1604 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_Accessorial.class
  7534 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_CarrierAbsoluteMin.class
 10393 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_CompanyAccessorial.class
  3709 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_CompanyPltRate.class
  8274 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_CompanyDiscount.class
   367 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_MongoTariffConversion.class
  4624 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_ETariff.class
  6820 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_CompanyPltCodeMatrix.class
  7107 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_CompanyAbsoluteMin.class
  5237 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_CompanyFuel.class
  8803 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_CarrierAccessorial.class
  4037 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_CarrierFuel.class
  4285 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/conversionTariff/auto/_CompanyCarrierFuel.class
     0 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/serviceRegion/
   385 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/serviceRegion/CompanyServiceRegion.class
   564 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/serviceRegion/SvcRregionConversion.class
   385 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/serviceRegion/CarrierServiceRegion.class
     0 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/serviceRegion/auto/
  2476 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/serviceRegion/auto/_CompanyServiceRegion.class
   358 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/serviceRegion/auto/_SvcRregionConversion.class
  2361 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/serviceRegion/auto/_CarrierServiceRegion.class
     0 Tue Dec 10 15:24:00 EST 2013 main/
     0 Tue Dec 10 15:24:00 EST 2013 main/resources/
 77398 Tue Dec 10 15:24:00 EST 2013 main/resources/MongoTariffConversion.map.xml
  3357 Wed Dec 04 09:46:16 EST 2013 main/resources/SvcRregionConversion.map.xml
   606 Tue Dec 10 15:24:00 EST 2013 main/resources/cayenne-MongoTariffConversion.xml
   602 Wed Dec 04 09:46:16 EST 2013 main/resources/cayenne-SvcRegionConversion.xml
    74 Wed Jul 10 09:50:08 EDT 2013 main/resources/commons-logging.properties
   201 Tue Dec 03 07:20:24 EST 2013 main/resources/simplelog.properties
358085 Wed Dec 11 11:01:10 EST 2013 log4j-1.2.12.jar
     0 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/
  4036 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/TariffRule.class
  1923 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/ServiceRegion.class
   692 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/AbsoluteMinimumCharge.class
   708 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/GuaranteedDeliveryCharge.class
  4029 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/FAK.class
  2311 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/Accessorial.class
  1776 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/RateModule.class
  5536 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/Tariff.class
  2215 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/PalletRate.class
  1280 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/DoNotRateZip.class
   924 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/Discount.class
  1856 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/PalletTariff.class
  1584 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/LTLTariff.class
   931 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/TariffStatus.class
  2195 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/Fuel.class
  2793 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/PalletCode.class
  4989 Wed Dec 11 10:42:44 EST 2013 com/mesca/model/tariff/CarrierTariff.class
539705 Wed Dec 11 11:01:10 EST 2013 postgresql-9.1-901.jdbc4.jar
 52915 Wed Dec 11 11:01:10 EST 2013 commons-logging-1.1.jar
189285 Wed Dec 11 11:01:10 EST 2013 gson-2.2.2.jar
575389 Wed Dec 11 11:01:10 EST 2013 commons-collections-3.2.1.jar
 41123 Wed Dec 11 11:01:10 EST 2013 commons-cli-1.2.jar
 72150 Wed Dec 11 11:01:10 EST 2013 logkit-1.0.1.jar
275728 Wed Dec 11 11:01:10 EST 2013 morphia-0.105.jar
1983246 Wed Dec 11 11:01:10 EST 2013 cayenne-server-3.1B2.jar
 65261 Wed Dec 11 11:01:10 EST 2013 oro-2.0.8.jar
419054 Wed Dec 11 11:01:10 EST 2013 mongo-java-driver-2.11.3.jar


And here’s the content of my MANIFEST file from the jar:

Manifest-Version: 1.0
Rsrc-Class-Path: ./ log4j-1.2.12.jar avalon-framework-4.1.3.jar common
 s-lang-2.6.jar velocity-1.6.3.jar commons-collections-3.2.1.jar commo
 ns-logging-1.1.jar morphia-0.105.jar oro-2.0.8.jar cayenne-server-3.1
 B2.jar postgresql-9.1-901.jdbc4.jar commons-configuration-1.9.jar gso
 n-2.2.2.jar logkit-1.0.1.jar mongo-java-driver-2.11.3.jar servlet-api
 -2.3.jar commons-cli-1.2.jar
Class-Path: .
Rsrc-Main-Class: com.mesca.conversion.mongo.TariffConverter
Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message