• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Properties file

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I want to use .properties file in my application. Hv any body know in web logic server where i hv to put this properties file ?

Thanks in advance,

Dimple
 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can place ur properti file at DefaultWebApp and give it classpath too.
 
dimple sharma
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks for reply.

I am deploying standalone JAR file - that is a ejb application. So don't hv DefaultWebApp folder.

Do you hv any other idea ?

Dimple
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Create a jar file containing the properties file and put the jar file inside the ejb jar file.
 
Graham Thorpe
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
U can place ur property file at BEA Home and set the Classpath for that property file .
 
dimple sharma
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

thanks for reply.

I don't want to put properties file in jar file as it's need to be changed frequantly.

I put it in Weblogic Home and also set class path in startWebLogic.sh, though i am getting same error.


My code segment to get property value is as under "

public static String getKeyValue ( String key )
{
String valueString = "";
try
{
PropertyResourceBundle resBundle = ( PropertyResourceBundle ) PropertyResourceBundle.getBundle ( "iScheduler.properties" );
valueString = resBundle.getString ( key );
}
catch ( Exception ex )
{
ex.printStackTrace();
System.out.println ( " Exception ISchedulerClientResourceBundle.java in key " + key );
}
return valueString;
}


Stacktrace :


java.util.MissingResourceException: Can't find bundle for base name iScheduler.properties, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:804)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:511)
at ischeduler.support.common.ISchedulerClientResourceBundle.getKeyValue(ISchedulerClientResourceBundle.java:28)
at ischeduler.sfsb.menuaccess.MenuAccessBean.readMenuAccessFile(MenuAccessBean.java:40)
at ischeduler.sfsb.menuaccess.MenuAccessBean.ejbCreate(MenuAccessBean.java:29)
at ischeduler.sfsb.menuaccess.MenuAccess_7gkmty_Impl.ejbCreate(MenuAccess_7gkmty_Impl.java:135)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:828)
at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:880)
at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:133)
at ischeduler.sfsb.menuaccess.MenuAccess_7gkmty_HomeImpl.create(MenuAccess_7gkmty_HomeImpl.java:74)
at ischeduler.sfsb.menuaccess.MenuAccess_7gkmty_HomeImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Exception ISchedulerClientResourceBundle.java in key DataSource




Can anybody tell me where i m wrong ?

Dimple
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Remove the .proprties passed to getBundel method.

 
Grow a forest with seedballs and this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic