You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by ryan <ry...@sourcelabs.com> on 2008/02/15 05:40:41 UTC

classpath/resource bundle issue with RMI example

I'm trying to work with code similar to the RMI example from 
www.opensourcestrategies.com/*ofbiz*/*OFBIZ*_SOAP_*RMI*_*Tutorial*.pdf.  
When I run the code I get an exception

Caused by: java.util.MissingResourceException: Can't find bundle for 
base name cache, locale en_US

which indicates to me that it can't find the cache.properties or 
similar.  I added ${ofbiz}/framework/base/config to the classpath, both 
in the env and on the cli, and it still gives the same error. 

echo $CLASSPATH
/ofbiz-test/applications/content/dtd:/ofbiz-test/framework/workflow/dtd:/ofbiz-test/framework/widget/dtd:/ofbiz-test/framework/service/dtd:/ofbiz-test/framework/security/dtd:/ofbiz-test/framework/minilang/dtd:/ofbiz-test/framework/entity/dtd:/ofbiz-test/framework/datafile/dtd:/ofbiz-test/framework/base/dtd:/ofbiz-test/framework/base/config:/ofbiz-test/framework/base/config/:/ofbiz-test/framework/base/dtd/:/ofbiz-test/framework/base/config/:/ofbiz-test/framework/base/dtd/


Any idea of what I can do here?

regards,
-Ryan



Re: classpath/resource bundle issue with RMI example

Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks Ryan,

I put your tip in http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-Rmi

Jacques

From: "ryan" <ry...@sourcelabs.com>
> FYI, I resolved this particular problem by adding the $OFBIZ/framework/base/config dir to the jar as a <resource> in my build file 
> (maven 2 pom.xml in this case):
>
>    <resources>
>      <resource>
>        <directory>../../../framework/base/config</directory>
>      </resource>
>      <resource>
>        <directory>../../../framework/base/dtd</directory>
>      </resource>
>      <resource>
>        <directory>../../../framework/datafile/dtd</directory>
>      </resource>
>      <resource>
>        <directory>../../../framework/entity/dtd</directory>
>      </resource>
>      <resource>
>        <directory>../../../framework/entityext/dtd</directory>
>      </resource>
>      <resource>
>        <directory>../../../framework/minilang/dtd</directory>
>      </resource>
>      <resource>
>        <directory>../../../framework/security/dtd</directory>
>      </resource>
>      <resource>
>        <directory>../../../framework/service/dtd</directory>
>      </resource>
>      <resource>
>        <directory>../../../framework/widget/dtd</directory>
>      </resource>
>      <resource>
>        <directory>../../../framework/workflow/dtd</directory>
>      </resource>
>      <resource>
>        <directory>../../../framework/applications/content/dtd</directory>
>      </resource>    </resources>
>
> ryan wrote:
>> Jacques Le Roux wrote:
>>> Are you running OFBiz from Eclipse ? In such a case you might be interested by 
>>> http://docs.ofbiz.org/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Running(ordebugging)OFBizinEclipse
>> I'm not, thanks though.  Using IntelliJ but the same behaviour happens running OfBiz from the ant task or from startup.sh.
>>> BTW, did you try to use "Rewritten from Opentaps documentation (tested with OFBiz trunk rev. 620189)" in
>>> http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379&highlight=opentaps-soap-java.zip#FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo-attachment-opentaps-soap-java.zip ?
>> I did look at that nad in the end I may end up creating a soap access layer for services that need complex types.  But in the 
>> case below i'm actually hoping to get the RMI to work instead.
>> BTW - the MissingResourceException is happening on the RMI client, not in the ofbiz server instance.
>>
>> regards,
>> -Ryan
>>
>>
>>> Jacques
>>>
>>> From: "ryan" <ry...@sourcelabs.com>
>>>> I'm trying to work with code similar to the RMI example from 
>>>> www.opensourcestrategies.com/*ofbiz*/*OFBIZ*_SOAP_*RMI*_*Tutorial*.pdf.  When I run the code I get an exception
>>>>
>>>> Caused by: java.util.MissingResourceException: Can't find bundle for base name cache, locale en_US
>>>>
>>>> which indicates to me that it can't find the cache.properties or similar.  I added ${ofbiz}/framework/base/config to the 
>>>> classpath, both in the env and on the cli, and it still gives the same error.
>>>> echo $CLASSPATH
>>>> /ofbiz-test/applications/content/dtd:/ofbiz-test/framework/workflow/dtd:/ofbiz-test/framework/widget/dtd:/ofbiz-test/framework/service/dtd:/ofbiz-test/framework/security/dtd:/ofbiz-test/framework/minilang/dtd:/ofbiz-test/framework/entity/dtd:/ofbiz-test/framework/datafile/dtd:/ofbiz-test/framework/base/dtd:/ofbiz-test/framework/base/config:/ofbiz-test/framework/base/config/:/ofbiz-test/framework/base/dtd/:/ofbiz-test/framework/base/config/:/ofbiz-test/framework/base/dtd/
>>>>
>>>>
>>>> Any idea of what I can do here?
>>>>
>>>> regards,
>>>> -Ryan
>>>>
>>>>
>>>>
>>>
>>
>
> 


Re: classpath/resource bundle issue with RMI example

Posted by ryan <ry...@sourcelabs.com>.
FYI, I resolved this particular problem by adding the 
$OFBIZ/framework/base/config dir to the jar as a <resource> in my build 
file (maven 2 pom.xml in this case):

    <resources>
      <resource>
        <directory>../../../framework/base/config</directory>
      </resource>
      <resource>
        <directory>../../../framework/base/dtd</directory>
      </resource>
      <resource>
        <directory>../../../framework/datafile/dtd</directory>
      </resource>
      <resource>
        <directory>../../../framework/entity/dtd</directory>
      </resource>
      <resource>
        <directory>../../../framework/entityext/dtd</directory>
      </resource>
      <resource>
        <directory>../../../framework/minilang/dtd</directory>
      </resource>
      <resource>
        <directory>../../../framework/security/dtd</directory>
      </resource>
      <resource>
        <directory>../../../framework/service/dtd</directory>
      </resource>
      <resource>
        <directory>../../../framework/widget/dtd</directory>
      </resource>
      <resource>
        <directory>../../../framework/workflow/dtd</directory>
      </resource>
      <resource>
        <directory>../../../framework/applications/content/dtd</directory>
      </resource>    
    </resources>

ryan wrote:
> Jacques Le Roux wrote:
>> Are you running OFBiz from Eclipse ? In such a case you might be 
>> interested by 
>> http://docs.ofbiz.org/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Running(ordebugging)OFBizinEclipse 
>>
> I'm not, thanks though.  Using IntelliJ but the same behaviour happens 
> running OfBiz from the ant task or from startup.sh.
>> BTW, did you try to use "Rewritten from Opentaps documentation 
>> (tested with OFBiz trunk rev. 620189)" in
>> http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379&highlight=opentaps-soap-java.zip#FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo-attachment-opentaps-soap-java.zip 
>> ?
> I did look at that nad in the end I may end up creating a soap access 
> layer for services that need complex types.  But in the case below i'm 
> actually hoping to get the RMI to work instead.
> BTW - the MissingResourceException is happening on the RMI client, not 
> in the ofbiz server instance.
>
> regards,
> -Ryan
>
>
>> Jacques
>>
>> From: "ryan" <ry...@sourcelabs.com>
>>> I'm trying to work with code similar to the RMI example from 
>>> www.opensourcestrategies.com/*ofbiz*/*OFBIZ*_SOAP_*RMI*_*Tutorial*.pdf.  
>>> When I run the code I get an exception
>>>
>>> Caused by: java.util.MissingResourceException: Can't find bundle for 
>>> base name cache, locale en_US
>>>
>>> which indicates to me that it can't find the cache.properties or 
>>> similar.  I added ${ofbiz}/framework/base/config to the classpath, 
>>> both in the env and on the cli, and it still gives the same error.
>>> echo $CLASSPATH
>>> /ofbiz-test/applications/content/dtd:/ofbiz-test/framework/workflow/dtd:/ofbiz-test/framework/widget/dtd:/ofbiz-test/framework/service/dtd:/ofbiz-test/framework/security/dtd:/ofbiz-test/framework/minilang/dtd:/ofbiz-test/framework/entity/dtd:/ofbiz-test/framework/datafile/dtd:/ofbiz-test/framework/base/dtd:/ofbiz-test/framework/base/config:/ofbiz-test/framework/base/config/:/ofbiz-test/framework/base/dtd/:/ofbiz-test/framework/base/config/:/ofbiz-test/framework/base/dtd/ 
>>>
>>>
>>>
>>> Any idea of what I can do here?
>>>
>>> regards,
>>> -Ryan
>>>
>>>
>>>
>>
>


Re: classpath/resource bundle issue with RMI example

Posted by ryan <ry...@sourcelabs.com>.
Jacques Le Roux wrote:
> Are you running OFBiz from Eclipse ? In such a case you might be 
> interested by 
> http://docs.ofbiz.org/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Running(ordebugging)OFBizinEclipse 
>
I'm not, thanks though.  Using IntelliJ but the same behaviour happens 
running OfBiz from the ant task or from startup.sh.
> BTW, did you try to use "Rewritten from Opentaps documentation (tested 
> with OFBiz trunk rev. 620189)" in
> http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379&highlight=opentaps-soap-java.zip#FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo-attachment-opentaps-soap-java.zip 
> ?
I did look at that nad in the end I may end up creating a soap access 
layer for services that need complex types.  But in the case below i'm 
actually hoping to get the RMI to work instead. 

BTW - the MissingResourceException is happening on the RMI client, not 
in the ofbiz server instance.

regards,
-Ryan


> Jacques
>
> From: "ryan" <ry...@sourcelabs.com>
>> I'm trying to work with code similar to the RMI example from 
>> www.opensourcestrategies.com/*ofbiz*/*OFBIZ*_SOAP_*RMI*_*Tutorial*.pdf.  
>> When I run the code I get an exception
>>
>> Caused by: java.util.MissingResourceException: Can't find bundle for 
>> base name cache, locale en_US
>>
>> which indicates to me that it can't find the cache.properties or 
>> similar.  I added ${ofbiz}/framework/base/config to the classpath, 
>> both in the env and on the cli, and it still gives the same error.
>> echo $CLASSPATH
>> /ofbiz-test/applications/content/dtd:/ofbiz-test/framework/workflow/dtd:/ofbiz-test/framework/widget/dtd:/ofbiz-test/framework/service/dtd:/ofbiz-test/framework/security/dtd:/ofbiz-test/framework/minilang/dtd:/ofbiz-test/framework/entity/dtd:/ofbiz-test/framework/datafile/dtd:/ofbiz-test/framework/base/dtd:/ofbiz-test/framework/base/config:/ofbiz-test/framework/base/config/:/ofbiz-test/framework/base/dtd/:/ofbiz-test/framework/base/config/:/ofbiz-test/framework/base/dtd/ 
>>
>>
>>
>> Any idea of what I can do here?
>>
>> regards,
>> -Ryan
>>
>>
>>
>


Re: classpath/resource bundle issue with RMI example

Posted by Jacques Le Roux <ja...@les7arts.com>.
Are you running OFBiz from Eclipse ? In such a case you might be interested by 
http://docs.ofbiz.org/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Running(ordebugging)OFBizinEclipse

BTW, did you try to use "Rewritten from Opentaps documentation (tested with OFBiz trunk rev. 620189)" in
http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379&highlight=opentaps-soap-java.zip#FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo-attachment-opentaps-soap-java.zip ?

Jacques

From: "ryan" <ry...@sourcelabs.com>
> I'm trying to work with code similar to the RMI example from 
> www.opensourcestrategies.com/*ofbiz*/*OFBIZ*_SOAP_*RMI*_*Tutorial*.pdf.  When I run the code I get an exception
>
> Caused by: java.util.MissingResourceException: Can't find bundle for base name cache, locale en_US
>
> which indicates to me that it can't find the cache.properties or similar.  I added ${ofbiz}/framework/base/config to the 
> classpath, both in the env and on the cli, and it still gives the same error.
> echo $CLASSPATH
> /ofbiz-test/applications/content/dtd:/ofbiz-test/framework/workflow/dtd:/ofbiz-test/framework/widget/dtd:/ofbiz-test/framework/service/dtd:/ofbiz-test/framework/security/dtd:/ofbiz-test/framework/minilang/dtd:/ofbiz-test/framework/entity/dtd:/ofbiz-test/framework/datafile/dtd:/ofbiz-test/framework/base/dtd:/ofbiz-test/framework/base/config:/ofbiz-test/framework/base/config/:/ofbiz-test/framework/base/dtd/:/ofbiz-test/framework/base/config/:/ofbiz-test/framework/base/dtd/
>
>
> Any idea of what I can do here?
>
> regards,
> -Ryan
>
>
>