[Beginner's Corner] - Re: how to change the root url of jboss
by charlesbihis
Hi Jaikiran,
Thanks for the reply, but that's not exactly what I want to do. I omitted part of my problem for clarity, but I suppose I should mention it now. I would like to change the root URL from www.example.com to www.example.com/something so that, for instance, when I visit www.example.com/something, I see the JBoss welcome page...BUT, I would still like there to be other content on www.example.com. So, a URL rewrite wouldn't work because I would still like there to be some content on the base URL, i.e. www.example.com, as opposed to re-writing the URL and sending to www.example.com/something. Does that make sense?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259267#4259267
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259267
15 years, 3 months
[EJB 3.0 Users] - Stateful session beans don't keep state !!!
by daziplqa
Hi folks,
I am new to EJB and statefull sessin beans on JBoss4.2 AS
I have the following urgent problem:
I have the following statefull session bean.
| @Stateful
| public class PlaceOrderBean implements PlaceOrder {
| private ShippingInfo shippingInfo;
| private BillingInfo billingInfo;
|
| public void setShippingInfo(ShippingInfo shippingInfo) {
| System.out.println("Call # : 1 " );
| this.shippingInfo = shippingInfo;
| }
|
| public void setBillingInfo(BillingInfo billingInfo) {
| System.out.println("Call # : 2 " );
| this.billingInfo = billingInfo;
| System.out.println(shippingInfo.getShippingInfo()); // << NullPointerException here !!!!! how come ??!!
| }
| }
|
The client :
| // this class is a JSF managed bean that is used with 2 JSPs, each one of the two calles on of the below methods
| public class OrderItemBean {
| private PlaceOrder placeOrder;
|
| public OrderItemBean() {
| try {
| logger.info("Getting PlaceOrder instance ...");
| InitialContext ctx = new InitialContext();
| placeOrder = (PlaceOrder) ctx.lookup("chapter2/" + PlaceOrderBean.class.getSimpleName() + "/local");
| }catch(NamingException ex) {
| ex.printStackTrace();
| }
| }
| // Note, the class OrderItemBean get instantiated a new instance before calling the following method
| // so, the JNDI code in the constructor above is being called to lookup the statefull bean
| public String setShippingInfo() {
| ShippingInfo shipInfo = new ShippingInfo();
| shipInfo.setShippingInfo(getShippingInfoTxt().getValue().toString());
| placeOrder.setShippingInfo(shipInfo);
|
| System.out.println("shipping Info : " + shipInfo.getShippingInfo());
|
| return SUCCESS + "_setShippingInfo";
| }
| // Note, the class OrderItemBean get instantiated a new instance before calling the following method
| // so, the JNDI code in the constructor above is being called again to lookup the statefull bean
| public String setBillingInfo() {
| BillingInfo billingInfo = new BillingInfo();
| billingInfo.setBillingInfo(getBillingInfoTxt().getValue().toString());
| placeOrder.setBillingInfo(billingInfo);
|
| setAdditionalInfo();
|
| return SUCCESS + "_setBillingInfo";
| }
|
| }
The code above get this exception
03:06:35,264 INFO [OrderItemBean] Getting PlaceOrder instance ...
| 03:06:35,274 INFO [STDOUT] Call # : 1
| 03:06:35,274 INFO [STDOUT] shipping Info : Cairo, Egypt, Elobour city
| 03:06:36,919 INFO [OrderItemBean] Getting PlaceOrder instance ...
| 03:06:36,929 INFO [STDOUT] Call # : 2
| 03:06:36,930 FATAL [application] javax.ejb.EJBException: java.lang.NullPointerException
| javax.faces.el.EvaluationException: javax.ejb.EJBException: java.lang.NullPointerException
| at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
| at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
| at javax.faces.component.UICommand.broadcast(UICommand.java:383)
| at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
| at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
| at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
|
| .............
| ..............
|
How this come, Ain't it as stateFULL session bean !!!!!!
Please Help
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259263#4259263
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259263
15 years, 3 months
[Beginner's Corner] - how to change the root url of jboss
by charlesbihis
Hi all,
I have a (seemingly) simple problem that I'm hoping has a simple solution. I've set up JBoss on my server so when I go to www.example.com, I see the beautiful default JBoss welcome page. When I deploy my applications, say, "myApp", I go to www.example.com/myApp and I see my app. Great, this is what I expected.
BUT, now I want to change the default root URL for my JBoss applications. Particularly, I want to make it such that when I go to www.example.com/jboss, I see the JBoss welcome page, and when I go to www.example.com/jboss/myApp, I see my app. In short, I want to change the root URL from www.example.com to www.example.com/something without having to change the context-roots in each project specifically. I hope I've explained that well enough. This seems like it'd be an easy thing to do, but I can't figure out how. Can anyone help?
*BTW, I'm running JBoss 5.1.0.GA on CentOS.
Thanks in advance
Charles
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259260#4259260
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259260
15 years, 3 months
[JBoss Cache Users] - Preventing JBoss Cache from recreating dummy table?
by drcallaway
In addition to the standard "jbosscache" table that contains all of the cache data (when using the JDBCCacheLoader), JBoss Cache also creates a dummy table named "jbosscache_D". This table seems to get recreated every time the cache is started. The AdjListJDBCCacheLoader class's start() method calls a method named createDummyTableIfNeeded() that, despite its name, always drops and recreates the dummy table. Unfortunately, our DBAs do not want to grant the JBoss Cache database user "create table" privileges in production. This isn't an issue with the "jbosscache" table since there is a setting in the config file indicating whether or not this table should be recreated if it already exists. However, I haven't found any such setting for "jbosscache_D".
So, can anyone tell me if there is a way to prevent JBoss Cache from creating the dummy table (we'd rather have a DBA pre-create that table using an admin user).
Thanks!
Dustin
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259257#4259257
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259257
15 years, 3 months
[Security] - IllegalStateException: Authorization Manager is null with jb
by dego64
Hi,
Here's my problem :
when I start JBoss AS 5.1 hosting a (very) simple Web application with basic authentication (as described there : http://www.jboss.org/community/wiki/SecureAWebApplicationInJBoss), an exception is thrown at :
00:42:04,935 ERROR [CoyoteAdapter] Une exception ou une erreur s'est produite dans le conteneur durant le traitement de la requÃÂïÃÂÿÃÂýte
| java.lang.IllegalStateException: Authorization Manager is null
| at org.jboss.security.plugins.javaee.WebAuthorizationHelper.hasUserDataPermission(WebAuthorizationHelper.java:185)
| at org.jboss.web.tomcat.security.JBossWebRealm.hasUserDataPermission(JBossWebRealm.java:643)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:461)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
|
Have been looking for this exception on the web for hours and got nothing...
Thank very much for any help.
Dego64
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259256#4259256
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259256
15 years, 3 months