[JBoss Seam] - Re: core resource-loader for resource bundles
by asookazian
Contents of securityAudit.properties is as follows in myProject/resources folder:
| test1=Arbi
| test2=Sookazian
| test3=Britney Spears
I added following xml to my components.xml:
<core:resource-loader>
| <core:bundle-names>
| <value>securityAudit</value>
| </core:bundle-names>
| </core:resource-loader>
The following snippet is from my SFSB:
import java.util.ResourceBundle;
| import org.jboss.seam.core.ResourceLoader;
|
| ResourceLoader resourceLoader = ResourceLoader.instance();
|
| String[] bundleNames = resourceLoader.getBundleNames();
|
| ResourceBundle resourceBundle = resourceLoader.loadBundle("securityAudit");
In the debugger after the last line of code executes above, resourceBundle is null even though bundleNames[0] is "securityAudit". There is no exception in the log after entering the method so not sure what's wrong here...
Do you need to supply the path as follows?
resourceLoader.loadBundle("resources/securityAudit")
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108214#4108214
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108214
18 years, 5 months
[JBoss Portal] - Re: Data access / persistence - could you help?
by JohnnyTheHun
Thank you for answering.
I put
<trans-attribute>Required</trans-attribute>
tags into jboss-portlet.xml and into portlet.xml also
(jboss-portlet.xml is a copy of portlet.xml)
didn't help unfortunatly.
I searched hibernate forums and docs for my PropertyAccessException, but didn't find anything other then people pointing to bugs in hibernate or to things I have done.
The end of my stacktrace is:
The end of the above mentioned stacktrace is:
| Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class
| 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:585)
| at org.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:145)
| ... 213 more
|
And line 145 of the BasicPropertyAccessor.java is:
return method.invoke(target, null);
it seems that BasicPropertyAccessor is invoking a method of a different class then the object in the first argument?
I don't know if the source of my problem is:
- in my code
- in my config (xml) files
- in the hibernate config files
- in the hibernate implementation
- in the Jboss config files
- In the Jboss portal config files
Or just some random bug created by for exampla a corrupted file somewhere.
Naturally I'd think the problem is in my code, but I haven't seen anyone having the same problem, which would in case of a newbie code.
Anyone see anything relevant I can clutch onto?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108211#4108211
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108211
18 years, 5 months