[JNDI/Naming/Network] - 4.0.4 to 4.0.5 = javax.naming.NameNotFoundException
by iktuz
Hi All,
I was using jboss-4.0.4.GA and today I have installed version .5 The problem is that I am having problems to make lookups. All the code below works fine with .4 version but crashs NameNotFoundException with .5
Here is the service interface/name definition:
| //...
| public interface UserService {
| public static final String NAME = "service.user.UserService";
| //...
|
Here is my Stateless EJB3:
| //...
| @Stateless(name = UserService.NAME)
| @Remote(UserRemote.class)
| @Local(UserLocal.class)
| public class UserServiceImpl implements UserRemote, UserLocal {
| //...
|
Here is my lookup call:
| //...
| InitialContext ctx = new InitialContext(prop);
| service = ctx.lookup("service/" + UserService.NAME + "/remote");
|
Finally my application.xml:
| <application>
| <display-name>MyApplication</display-name>
| <module>
| <web>
| <web-uri>service.war</web-uri>
| <context-root>/service</context-root>
| </web>
| </module>
| <module>
| <web>
| <web-uri>MyApplication.war</web-uri>
| <context-root>/MyApplication</context-root>
| </web>
| </module>
| <module>
| <ejb>service.jar</ejb>
| </module>
| <module>
| <java>lib/Connection.jar</java>
| </module>
| <module>
| <java>lib/ojdbc14.jar</java>
| </module>
| <module>
| <java>lib/persistence.jar</java>
| </module>
|
| </application>
|
Here is the more detailed error:
| 2006-10-26 16:31:37,159 INFO [STDOUT] 26/10/06 16:31:37 ERROR [http-0.0.0.0-8080-1] org.apache.commons.logging.impl.Log4JLogger (Log4JLogger.java:119) - Servlet.service() for servlet action threw exception
| javax.naming.NameNotFoundException: service not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
| 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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
| at sun.rmi.transport.Transport$1.run(Transport.java:153)
| at java.security.AccessController.doPrivileged(Native Method)
| at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
| at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
| at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
| at java.lang.Thread.run(Thread.java:595)
| at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
| at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
| at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
| at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
|
What have I missed here? Please, help me to fix that!
Best Regards,
iktuz
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981118#3981118
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981118
19 years, 6 months
[JBoss Seam] - EL embedded in message bundles broken in 1.1?
by rdewell
Pretty smooth upgrade to 1.1 overall. Still on 4.0.4 + myfaces 1.1.4.
Running into a problem with EL embedded in messages. This worked fine in 1.0.1:
Messages in the bundle are:
| C.Icon.Yellow.BGBottom=239,223,56
| C.TransactionLifecycle.Completion.Icon.BGBottom=#{messages['C.Icon.Yellow.BGBottom']}
|
This was working on same jboss + my faces in 1.0.1, but is broken in 1.1. Not sure if this is a usage problem on my part that is now broken, or something with seam. Anyway, here's the trace when this is evaluated:
Ideas on what changed?
| 12:27:20,775 WARN [Interpolator] exception interpolating string: #{messages['C.Icon.Yellow.BGBottom']}
| javax.faces.el.ReferenceSyntaxException: Invalid expression: '${messages.'C.Icon.Yellow.BGBottom'}'
| at org.apache.myfaces.el.ELParserHelper.parseExpression(ELParserHelper.java:97)
| at org.apache.myfaces.el.ValueBindingImpl$2.newInstance(ValueBindingImpl.java:82)
| at org.apache.myfaces.shared_impl.util.BiLevelCacheMap.get(BiLevelCacheMap.java:123)
| at org.apache.myfaces.el.ValueBindingImpl.<init>(ValueBindingImpl.java:115)
| at org.apache.myfaces.application.ApplicationImpl$1.newInstance(ApplicationImpl.java:64)
| at org.apache.myfaces.shared_impl.util.BiLevelCacheMap.get(BiLevelCacheMap.java:123)
| at org.apache.myfaces.application.ApplicationImpl.createValueBinding(ApplicationImpl.java:617)
| at org.jboss.seam.actionparam.ActionParamValueBinding.setBinding(ActionParamValueBinding.java:68)
| at org.jboss.seam.actionparam.ActionParamValueBinding.<init>(ActionParamValueBinding.java:62)
| at org.jboss.seam.jsf.SeamApplication11.createValueBinding(SeamApplication11.java:109)
| at org.jboss.seam.core.Expressions$1.getFacesValueBinding(Expressions.java:66)
| at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:49)
| at org.jboss.seam.core.Interpolator.interpolateExpressions(Interpolator.java:83)
| at org.jboss.seam.core.Interpolator.interpolate(Interpolator.java:58)
| at org.jboss.seam.core.Messages$1.get(Messages.java:67)
| at org.jboss.seam.core.Messages$1.get(Messages.java:82)
|
| .....
|
| Caused by: org.apache.commons.el.parser.ParseException: Encountered "\'C.Icon.Yellow.BGBottom\'" at line 1, column 12.
| Was expecting:
| <IDENTIFIER> ...
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981117#3981117
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981117
19 years, 6 months
[Beginners Corner] - Re: EJB SecurityException on AccountBean EJB dukesbank
by eric_hootsen
I checked out the ejb-jar.xml. The method you are talking about seems to be unchecked. In addition to the rol bankCustomer I also assigned the role bankAdmin to user 200 in the roles.properties file. Still no approvement. Below the method permissions from the ejb-jar.xml file. The permissiond for the getAccountsOfCustomer method marked bold.
<assembly-descriptor>
<security-role>
<role-name>bankCustomer</role-name>
</security-role>
<security-role>
<role-name>bankAdmin</role-name>
</security-role>
<method-permission>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>java.lang.Object</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>setBeginBalanceTimeStamp</method-name>
<method-params>
<method-param>java.util.Date</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getHandle</method-name>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getPrimaryKey</method-name>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>getEJBMetaData</method-name>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>remove</method-name>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getAccountsOfCustomer</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getDetails</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>getHomeHandle</method-name>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>isIdentical</method-name>
<method-params>
<method-param>javax.ejb.EJBObject</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>addCustomerToAccount</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>javax.ejb.Handle</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>create</method-name>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getEJBHome</method-name>
</method-permission>
<method-permission>
<role-name>bankAdmin</role-name>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>setBalance</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>createAccount</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.util.Date</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>setBeginBalance</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>removeCustomerFromAccount</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>setCreditLine</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>setDescription</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>removeAccount</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>setType</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</method-permission>
<method-permission>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>java.lang.Object</method-param>
</method-params>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>isIdentical</method-name>
<method-params>
<method-param>javax.ejb.EJBObject</method-param>
</method-params>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>javax.ejb.Handle</method-param>
</method-params>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getDetails</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</method-permission>
<method-permission>
<role-name>bankAdmin</role-name>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getCustomersOfAccount</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>createCustomer</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getCustomersOfLastName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>setName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>removeCustomer</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>setAddress</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</method-permission>
<method-permission>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>getHomeHandle</method-name>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>create</method-name>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getHandle</method-name>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getPrimaryKey</method-name>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>getEJBMetaData</method-name>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>remove</method-name>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getEJBHome</method-name>
</method-permission>
<method-permission>
<ejb-name>AccountBean</ejb-name>
<method-intf>LocalHome</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>java.lang.Object</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>setBeginBalance</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>LocalHome</method-intf>
<method-name>create</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.util.Date</method-param>
<method-param>java.util.ArrayList</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>setType</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>LocalHome</method-intf>
<method-name>findByPrimaryKey</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>setDescription</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>setBalance</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>setCreditLine</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>isIdentical</method-name>
<method-params>
<method-param>javax.ejb.EJBLocalObject</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>LocalHome</method-intf>
<method-name>findByCustomerId</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>setBeginBalanceTimeStamp</method-name>
<method-params>
<method-param>java.util.Date</method-param>
</method-params>
</method-permission>
<method-permission>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>getCreditLine</method-name>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>getType</method-name>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>getDetails</method-name>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>getPrimaryKey</method-name>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>getBalance</method-name>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>remove</method-name>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>getEJBLocalHome</method-name>
</method-permission>
<method-permission>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>java.lang.Object</method-param>
</method-params>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>getHomeHandle</method-name>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>isIdentical</method-name>
<method-params>
<method-param>javax.ejb.EJBObject</method-param>
</method-params>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>create</method-name>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>javax.ejb.Handle</method-param>
</method-params>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getHandle</method-name>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getPrimaryKey</method-name>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>getEJBMetaData</method-name>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>remove</method-name>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getEJBHome</method-name>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getDetails</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</method-permission>
<method-permission>
<role-name>bankCustomer</role-name>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getTxsOfAccount</method-name>
<method-params>
<method-param>java.util.Date</method-param>
<method-param>java.util.Date</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>transferFunds</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>withdraw</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>makePayment</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>makeCharge</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>deposit</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</method-permission>
<container-transaction>
<ejb-name>AccountControllerBean</ejb-name>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<ejb-name>CustomerControllerBean</ejb-name>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<ejb-name>TxControllerBean</ejb-name>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<ejb-name>AccountBean</ejb-name>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<ejb-name>CustomerBean</ejb-name>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<ejb-name>TxBean</ejb-name>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981111#3981111
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981111
19 years, 6 months
Problem with Multiples .wars
by Eros
Hello
I have a problem with multiples wars.
My JboosPortal version is: 2.2.1RC3
My classes are shared, but my jboss-web.xml is:
<class-loading java2ClassLoadingCompliance="false">
<loader-repository>
com.sumersoft:loader=demo
<loader-repository-config>
java2ParentDelegation=false
</loader- repository-config>
</loader-repository>
</class-loading>
I see the problem when I try load one .properties that it is inside of war.
Each war it has a different file .properties, with equals name but with
different content.
In my class that load .properties this code is used:
public class CommonInformationPortal implements ServletContextListener {
private static Properties properties = null;
public static void load()
{
try{
if(properties == null)
{
properties = new Properties();
properties.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("CommonInformation.properties"));
}
}
catch(Exception e)
{
return;
}
}
public static String getProperty(String property) {
try{
return properties.getProperty(property);
}
catch(Exception e)
{
return null;
}
}
}
But always return the ClassLoader of last deployed war.
So the file .properties read is always the file of last deployed war.
I try use ServletContextListener the load of file .properties is ok, but when I get any propertie of this file is returned propertie of last deployed war.
How i can resolve this problem?
[]´s
Eros
19 years, 6 months
[JBoss Seam] - Re: No active event context
by andyd
Stan,
I'm trying to understand why the StartupServletContextListener exception is thrown in a Portal setup. With JBoss 4.0.5GA, MyFaces 1.1.4, Portal 2.4, Seam 1.1beta Facelets and Ajax4JSF we are seeing problems again. It looks to me that this is triggered by the exception below. Without the Ajax4JSF filter all works ok, even though the same exception is thrown.
That suggests to me that the Exception isn't being caught in Ajax4JSF and causing a bigger problem.
I'm wondering if it is plausable to log a warning instead of throwing the exception, so that Ajax4JSF doesn't see the problem. What do you think?
Andy.
2006-10-25 02:06:12,214 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1382988, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@15c4ee6{ url=null ,addedOrder=0}
2006-10-25 02:06:12,224 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1382988, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@13fe4e4{ url=null ,addedOrder=0}
2006-10-25 02:06:12,224 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/SeamBookingPortletWeb]] Exception starting filter ajax4jsf
java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
at org.ajax4jsf.framework.resource.InternetResourceService.init(InternetResourceService.java:58)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.init(BaseFilter.java:121)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:223)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981110#3981110
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981110
19 years, 6 months
[JBossWS] - Problems in running JBossWS 1.0.3GA samples
by rayymlai
I'm a newbie in JBossWS. Just installed JBoss 4.0.5 with JBossWS 1.0.3GA, and try to run the sample codes by "ant" but JBossWS compalins null pointer error from subproject jsr181pojo and wsaddressing due to arraycopy exception.
WSaddressing is a separate issue. It can't run JUnit test. I've added Junit jar file in the lib/endorsed but still can't get thru the tests.
Any pointer or clues how to fix the issues? I searched thru the forum and couldn't find any clues. I probably miss certain installation steps and variables. Pls help.
Thanks.
rgds, ray
SYSTEM SETUP
1. JBOSS_HOME=c:/tools/jboss (JBoss 4.0.5 GA)
2. JBossWS samples installed under C:\tools\jboss\jbossws-samples-1.0.3.GA
3. Verify latest jboss-xml-binding.jar as per JBossWS release notes/installation
4. JBossWS.sar and JBoss-client deployed as per JBossWS release notes/installation
5. ant.properties updated to reflect JBOSS_HOME location
6. PATH includes JBOSS_HOME
EXCEPTIONS
compile15:
copy-resources:
generate-sources:
[wstools] log4j:WARN No appenders could be found for logger (org.jboss.ws.too
s.WSTools).
[wstools] log4j:WARN Please initialize the log4j system properly.
[wstools] java.lang.NullPointerException
[wstools] at java.lang.System.arraycopy(Native Method)
[wstools] at org.apache.xerces.impl.xs.XSModelImpl.getAnnotations(Unknown
Source)
[wstools] at org.jboss.ws.metadata.wsdl.xmlschema.WSSchemaUtils.copyXSMod
l(WSSchemaUtils.java:737)
[wstools] at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:180)
[wstools] at org.jboss.ws.metadata.wsdl.WSDL11Reader.processTypes(WSDL11R
ader.java:227)
[wstools] at org.jboss.ws.metadata.wsdl.WSDL11Reader.processDefinition(WS
L11Reader.java:118)
[wstools] at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDL
efinitionsFactory.java:145)
[wstools] at org.jboss.ws.tools.WSDLToJava.convertWSDL2Java(WSDLToJava.ja
a:121)
[wstools] at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGener
tion(ToolsHelper.java:324)
[wstools] at org.jboss.ws.tools.WSTools.process(WSTools.java:138)
[wstools] at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
[wstools] at org.jboss.ws.tools.ant.wstools.execute(wstools.java:103)
[wstools] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j
va:275)
[wstools] at org.apache.tools.ant.Task.perform(Task.java:364)
[wstools] at org.apache.tools.ant.Target.execute(Target.java:341)
[wstools] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[wstools] at org.apache.tools.ant.Project.executeSortedTargets(Project.ja
a:1216)
[wstools] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTarge
s(SingleCheckExecutor.java:37)
[wstools] at org.apache.tools.ant.Project.executeTargets(Project.java:106
)
[wstools] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
[wstools] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j
va:275)
[wstools] at org.apache.tools.ant.Task.perform(Task.java:364)
[wstools] at org.apache.tools.ant.Target.execute(Target.java:341)
[wstools] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[wstools] at org.apache.tools.ant.Project.executeSortedTargets(Project.ja
a:1216)
[wstools] at org.apache.tools.ant.Project.executeTarget(Project.java:1185
[wstools] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D
faultExecutor.java:40)
[wstools] at org.apache.tools.ant.Project.executeTargets(Project.java:106
)
[wstools] at org.apache.tools.ant.Main.runBuild(Main.java:668)
[wstools] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[wstools] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
[wstools] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
BUILD FAILED
C:\tools\jboss\jbossws-samples-1.0.3.GA\build.xml:23: The following error occur
ed while executing this line:
C:\tools\jboss\jbossws-samples-1.0.3.GA\jsr181pojo\build.xml:28: Error running
bossws:
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981109#3981109
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981109
19 years, 6 months