Re: Class cast problem in JBoss

2007-10-25 Thread kolaloka

I reply to myself. The problem is resolved, some jars went to wrong place
during deployment. No jars can get directly into .ear and
ejb3-persistence.jar, jboss-ejb3x.jar, jsf-api.jar must be excluded from
.war.
-- 
View this message in context: 
http://www.nabble.com/Class-cast-problem-in-JBoss-tf4649480.html#a13407168
Sent from the Shale - User mailing list archive at Nabble.com.



ejb3 app functions only when both .jsf and .jsp is present

2007-10-25 Thread kolaloka

Hi All,

I have the following problem: when I try to remove either of booking.jsp and
booking.jsf (having same contents) from the directory tree of app.war
(following), I get the message HTTP status 404 The requested resource
(/s_ejb3_jb421_tobbfele/pages/booking.jsp) is not available.

Thank you in advance: Balazs Bamer

JBoss 4.2.1 output:
16:23:21,101 INFO  [MyfacesConfig] No context init parameter
'org.apache.myfaces.PRETTY_HTML' found, using default value true
16:23:21,101 INFO  [MyfacesConfig] No context init parameter
'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
16:23:21,101 INFO  [MyfacesConfig] No context init parameter
'org.apache.myfaces.DETECT_JAVASCRIPT' found, using default value false
16:23:21,101 INFO  [MyfacesConfig] No context init parameter
'org.apache.myfaces.AUTO_SCROLL' found, using default value false
16:23:21,101 INFO  [MyfacesConfig] No context init parameter
'org.apache.myfaces.ADD_RESOURCE_CLASS' found, using default value
org.apache.myfaces.renderkit.html.util.DefaultAddResource
16:23:21,101 INFO  [MyfacesConfig] No context init parameter
'org.apache.myfaces.ADD_RESOURCE_CLASS' found, using default value
org.apache.myfaces.renderkit.html.util.DefaultAddResource
16:23:21,121 INFO  [MyfacesConfig] No context init parameter
'org.apache.myfaces.CHECK_EXTENSIONS_FILTER' found, using default value true


app.war (inside s_ejb3_jb421_tobbfele.ear) contents, with only the
booking.jsf:
META-INF/
META-INF/MANIFEST.MF
WEB-INF/
WEB-INF/web.xml
WEB-INF/lib/
WEB-INF/lib/com-sun-rave-designtime.jar
WEB-INF/lib/commons-beanutils.jar
WEB-INF/lib/commons-chain.jar
WEB-INF/lib/commons-codec.jar
WEB-INF/lib/commons-collections.jar
WEB-INF/lib/commons-digester.jar
WEB-INF/lib/commons-el.jar
WEB-INF/lib/commons-fileupload.jar
WEB-INF/lib/commons-lang.jar
WEB-INF/lib/commons-logging.jar
WEB-INF/lib/commons-validator.jar
WEB-INF/lib/jakarta-oro.jar
WEB-INF/lib/jsfcl-dt.jar
WEB-INF/lib/jsfcl.jar
WEB-INF/lib/jstl-api.jar
WEB-INF/lib/jstl-impl.jar
WEB-INF/lib/openide.jar
WEB-INF/lib/propertyeditors.jar
WEB-INF/lib/shale-clay.jar
WEB-INF/lib/shale-core.jar
WEB-INF/lib/shale-remoting.jar
WEB-INF/lib/shale-tiger.jar
WEB-INF/lib/shale-tiles.jar
WEB-INF/lib/shale-view-1.0.4.jar
WEB-INF/lib/tiles-core.jar
WEB-INF/lib/tomahawk-1.1.2-SNAPSHOT.jar
WEB-INF/classes/
WEB-INF/classes/com/
WEB-INF/classes/com/loxon/
WEB-INF/classes/com/loxon/shaleproba/
WEB-INF/classes/com/loxon/shaleproba/FlightServlet.class
booking_messages.properties
booking_messages_en.properties
booking_messages_es.properties
booking_messages_fr.properties
images/
pages/
theme/
index.html
pages/booking.jsf
theme/style.css
WEB-INF/faces-config.xml


index.html:
html
head
  meta http-equiv=Refresh content=0; URL=pages/booking.jsf
/head
/html


faces-config.xml:
?xml version=1.0?
!DOCTYPE faces-config PUBLIC
  -//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN
  http://java.sun.com/dtd/web-facesconfig_1_1.dtd;
faces-config
managed-bean
managed-bean-nameflightServlet/managed-bean-name

managed-bean-classcom.loxon.shaleproba.FlightServlet/managed-bean-class
managed-bean-scoperequest/managed-bean-scope
/managed-bean
/faces-config


web.xml:
?xml version=1.0?
web-app   xmlns=http://java.sun.com/xml/ns/j2ee;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
  version=2.4
descriptiondebug web.xml/description
context-param
param-namejavax.faces.STATE_SAVING_METHOD/param-name
param-valueclient/param-value
description
State saving method: client or server (= default)
See JSF Specification 2.5.2
/description
/context-param
context-param
param-namejavax.faces.ALLOW_JAVASCRIPT/param-name
param-valuetrue/param-value
description
This parameter tells MyFaces if javascript code should be
allowed in the
/description
/context-param
context-param
param-namejavax.faces.DETECT_JAVASCRIPT/param-name
param-valuefalse/param-value
/context-param
context-param
param-namejavax.faces.PRETTY_HTML/param-name
param-valuetrue/param-value
description
If true, rendered HTML code will be formatted, so that it is
human readable.
i.e. additional line separators and whitespace will be written,
that do not
influence the HTML code.
Default: true
/description
/context-param
context-param
param-namejavax.faces.AUTO_SCROLL/param-name
param-valuetrue/param-value
description
If true, a javascript function will be rendered that is able to
restore the
former vertical scroll on every request. Convenient feature if
you have pages
with 

Shale-test setup managed bean

2007-10-25 Thread Chris Keefer

Hello,

I am trying to add a managed bean to the Mock Faces Context that will  
be used in my unit test. My test class extends AbstractJsfTestCase.  
My setUp method is the following:


public void setUp() throws Exception {
super.setUp();

// add managed bean
_factory = application.getExpressionFactory();
_elContext = MockFacesContext.getCurrentInstance().getELContext();
ValueExpression expression =
_factory.createValueExpression(_elContext, #{leftNav},  
LeftNav.class);
MockServletContext context = (MockServletContext) 
session.getServletContext();

context.setDocumentRoot(new File(DOC_ROOT));
expression.setValue(_elContext, new LeftNav());
}

The last line throws a MissingResourceException.

java.util.MissingResourceException: Can't find bundle for base name  
leftNav, locale en_US
  at java.util.ResourceBundle.throwMissingResourceException 
(ResourceBundle.java:836)
  at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java: 
805)

  at java.util.ResourceBundle.getBundle(ResourceBundle.java:576)
  at  
org.apache.shale.test.mock.MockApplication12.getResourceBundle 
(MockApplication12.java:261)
  at  
org.apache.shale.test.el.FacesResourceBundleELResolver.setValue 
(FacesResourceBundleELResolver.java:202)
  at javax.el.CompositeELResolver.setValue 
(CompositeELResolver.java:283)
  at org.apache.shale.test.el.MockValueExpression.setValue 
(MockValueExpression.java:248)


Im not exactly sure what resource bundle the Resolver is looking for.  
Perhaps the faces-config.xml? Is this the correct way to add a  
managed bean to the faces context?


Best,
--Chris

Shale-test setup managed bean

2007-10-25 Thread Gary VanMatre
Hello,

I am trying to add a managed bean to the Mock Faces Context that will  
be used in my unit test. My test class extends AbstractJsfTestCase.  


This sounds like a bug.  Please create a JIRA ticket [1].

[1] http://shale.apache.org/issue-tracking.html


Gary

Setup managed bean

2007-10-25 Thread Chris Keefer

Hello,

I am trying to add a managed bean to the Mock Faces Context that will  
be used in my unit test. My test class extends AbstractJsfTestCase.  
My setUp method is the following:


public void setUp() throws Exception {
super.setUp();

// add managed bean
_factory = application.getExpressionFactory();
_elContext = MockFacesContext.getCurrentInstance().getELContext();
ValueExpression expression =
_factory.createValueExpression(_elContext, #{leftNav},  
LeftNav.class);
MockServletContext context = (MockServletContext) 
session.getServletContext();

context.setDocumentRoot(new File(DOC_ROOT));
expression.setValue(_elContext, new LeftNav());
}

The last line throws a MissingResourceException.

java.util.MissingResourceException: Can't find bundle for base name  
leftNav, locale en_US
  at java.util.ResourceBundle.throwMissingResourceException 
(ResourceBundle.java:836)
  at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java: 
805)

  at java.util.ResourceBundle.getBundle(ResourceBundle.java:576)
  at  
org.apache.shale.test.mock.MockApplication12.getResourceBundle 
(MockApplication12.java:261)
  at  
org.apache.shale.test.el.FacesResourceBundleELResolver.setValue 
(FacesResourceBundleELResolver.java:202)
  at javax.el.CompositeELResolver.setValue 
(CompositeELResolver.java:283)
  at org.apache.shale.test.el.MockValueExpression.setValue 
(MockValueExpression.java:248)


Im not exactly sure what resource bundle the Resolver is looking for.  
Perhaps the faces-config.xml? Is this the correct way to add a  
managed bean to the faces context?


Best,
--Chris