[EJB 3.0] - Re: help required for JBOSS 4.0.4 GA and EJB 3.0 RC9
by priyavijayan1
I got it resolved. I am pasting the code over here
package com.infosys.EJB3.application;
import com.infosys.EJB3.application.FacadeRemote;
import com.infosys.EJB3.application.FacadeBean;
import javax.naming.InitialContext;
import java.sql.Timestamp;
import java.util.Properties;
public class client
{
public static void main(String[] args)
{
try
{
Properties p = new Properties();
p.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
p.setProperty("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
p.setProperty("java.naming.provider.url","localhost:1099");
InitialContext ctx = new InitialContext(p);
System.out.println("Got initial COntext "+ctx.lookup("FacadeBean/remote"));
FacadeRemote lFacadeRemote = (FacadeRemote) ctx.lookup("FacadeBean/remote");
System.out.println("Got Facade Remote Bean");
// Added
lFacadeRemote.checkUserCredential("rama", "ramaxyz");
System.out.println("user checked");
// end
//lFacadeRemote.createDepartment("Marketing");
/*lFacadeRemote.createDepartment("Administration");
lFacadeRemote.createDepartment("Sales");*/
/*lFacadeRemote.assignEmployeeToDepartment(new Long(1),"Brijesh",31,"M");
lFacadeRemote.assignEmployeeToDepartment(new Long(1),"xxxx",31,"M");
lFacadeRemote.assignEmployeeToDepartment(new Long(2),"yyyy",31,"M");*/
System.out.println("DONE");
}
catch(Exception ex)
{
System.out.println(ex);
ex.printStackTrace();
}
}
}
------------------------------------------------------------------
The change that I have made is adding the properties instance. I have another file in my directory called jndi.properties, but I still had to put it inside my code. I am not sure why I need to do it since I already have jndi.properties.... anyways its working fine..
Thanks for the reply..
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996595#3996595
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996595
19 years, 7 months
[JBoss Portal] - JBoss Portal - Clustering - Http Session Replication
by chellva
Hi,
I am trying to test HTTP Session Replication feature of JBoss Portal Server.
When i downloaded jboss-portal-2.4.1-CR1-bundled.zip i did not find 'all' directory under server folder.
So i used JBoss AS 4.0.4 for testing the feature. When i deploy "jboss-portal.sar" in "D:\jboss-4.0.4.GA\server\all\deploy" i am getting the following exception.
14:03:53,651 INFO [ServiceConfigurator] Problem configuring service cms.pm.cache:service=TreeCache
org.jboss.deployment.DeploymentException: No Attribute found with name: CacheLoaderConfiguration
at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:318)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:460)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
at org.jboss.system.ServiceController.install(ServiceController.java:226)
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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.install(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:943)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
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)
Will it affect the JBoss portal clustering?
Thanks
Selva.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996591#3996591
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996591
19 years, 7 months
[Beginners Corner] - Re: EJB3 JDNI lookup error 'unexpected block data'
by tamri
"rknechtel" wrote : I'm having the same problems using JBoss 4.0.4GA & EJB 3.0 RC8.
|
| javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.jboss.ejb3.JBossProxy (no security manager: RMI class loader disabled)]
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at com.footlocker.client.Client.main(Unknown Source)
| Caused by: java.lang.ClassNotFoundException: org.jboss.ejb3.JBossProxy (no security manager: RMI class loader disabled)
| at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:531)
| at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:628)
| at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:294)
| at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:238)
| at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1494)
| at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1457)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
| at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
| at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:652)
|
|
| I added the jars suggested but still no go.
|
And how do you resolve this problem?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996588#3996588
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996588
19 years, 7 months
[JBoss Seam] - Re: paginating a datamodel
by ask4saif
First of all thank you for your support, its very nice of you,
The scenario on which I am working is, I want pagination which i have been able to do with the jenia's library. And i want grid facility in it, which is provided by the seam by using the @DataModel and @DataModelSelection.
Now the only problem which I see in what i did is, the memory. Now my DataModel fetches the full resultset from the db which might get up to 1 million records. In this case how can i efficiently use my DataModel to fetch only chunks of records not full list.
the pagination of google search is great I wonder how can we do that in seam using the datamodel.
any advice which you can give, I will be gratefull
thank you in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996584#3996584
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996584
19 years, 7 months
[JBoss Seam] - Re: Problme in LoggedInInterceptor..
by waheed.murad
This is my SessionBean class where i am using it what i am trying to achive is that if a user directly try to open the page by tying a URL e.g "http://localhost:8080/ereg/secretquestions.jsp" then the LoggedInIntercepter should check first that user is logged in or not if not that return to some specific page (navigation specified in the faces-config.xml )....
@Stateful
@Scope(SESSION)
@Name("SecretQuestionsAction")
@Interceptors(LoggedInInterceptor.class)
public class SecretQuestionsAction implements SecretQuestionsLocal{
@PersistenceContext(unitName="Database")
protected EntityManager em;
@In(required=false,value="SecretQuestions")
@Out(required=false,value="SecretQuestions")
private SecretQuestions secretQuestions;
@DataModel
private List allSecretQuestionsList;
@DataModelSelection(value="allSecretQuestionsList")
private SecretQuestions selectedSecretQuestion;
@In
private Context sessionContext;
@In(create=true)
FacesMessages facesMessages;
int mode=0;
String acknowledge = null;
/*--------------------------------------------------------------------*/
public String toSecretQuestionsPage(){
System.out.println("toSecretQuestionsPage method...");
return "/secretquestions.jsp";
}
public String addSecretQuestion(){
try{
if(!validateOpts()){
em.persist(secretQuestions);
secretQuestions=null;
sessionContext.remove("SecretQuestions");
getSecretQuestionsList();
acknowledge = "The Record is added successfully.";
}else{
return null;
}
}catch(Exception e){
System.out.println("Error Have accoured in\n\t SecretQuestions.java --> addSecretQuestion()? \n\t"+e.getMessage());
}
return "success";
}
/*--------------------------------------------------------------------*/
public boolean validateOpts(){
boolean isError=false;
if(secretQuestions.getSecretQuestion()==""){
facesMessages.add("secretQuestion",new FacesMessage("Please enter secret question"));
isError=true;
}
return isError;
}
/*--------------------------------------------------------------------*/
@Factory("allSecretQuestionsList")
public String getSecretQuestionsList(){
try{
setMode(0);
acknowledge = null;
allSecretQuestionsList = em.createQuery("from SecretQuestions e where e.isDeleted=0").getResultList();
}catch(Exception e){
System.out.println("Error Have accoured in\n\t SecretQuestions.java --> getSecretQuestionsList()? \n\t"+e.getMessage());
}
return null;
}
/*--------------------------------------------------------------------*/
public String deleteSecretQuestion(){
try{
SecretQuestions deleted = em.find(SecretQuestions.class, selectedSecretQuestion.getId());
if(deleted != null){
deleted.setIsDeleted(1);
}
deleted = null;
sessionContext.remove("SecretQuestions");
secretQuestions=null;
getSecretQuestionsList();
acknowledge = "The Record is deleted successfully.";
System.out.println("getting the result list complete \n\t");
}catch(Exception e){
System.out.println("Error Have accoured in\n\t SecretQuestions.java --> deleteSecretQuestion()? \n\t"+e.getMessage());
}
return null;
}
/*--------------------------------------------------------------------*/
public String updateSecretQuestion(){
try{
em.merge(secretQuestions);
setMode(0);
getSecretQuestionsList();
acknowledge = "The record is updated successfully";
}catch(org.hibernate.validator.InvalidStateException e){
System.out.println(e.getMessage());
System.out.println("error...");
InvalidValue[] val=e.getInvalidValues();
for(int i=0;i<val.length;i++){
System.out.println(val.getPropertyName());
}
}
return "successUpdate";
}
/*--------------------------------------------------------------------*/
public String showSecretQuestionDetails(){
try{
setMode(1);
acknowledge = null;
secretQuestions = em.find(SecretQuestions.class, selectedSecretQuestion.getId());
}catch(Exception e){
setMode(0);
System.out.println("Error Have accoured in\n\t SecretQuestionAction.java --> showSecretQuestionDetails()? \n\t"+e.getMessage());
}
return "/secretquestions_crud.jsp";
}
/*--------------------------------------------------------------------*/
public String loadSecretQuestion(){
System.out.println("in the getPricingOption method load");
try{
setMode(2);
acknowledge = null;
secretQuestions = em.find(SecretQuestions.class, selectedSecretQuestion.getId());
}catch(Exception e){
setMode(0);
System.out.println("Error Have accoured in\n\t SecretQuestionAction.java --> loadSecretQuestion()? \n\t"+e.getMessage());
}
return "/secretquestions_crud.jsp";
}
/*--------------------------------------------------------------------*/
public String toCreateForm(){
acknowledge = null;
resetMode();
return "/secretquestions_crud.jsp";
}
/*--------------------------------------------------------------------*/
public void resetMode(){
try{
if(secretQuestions != null){
setMode(0);
secretQuestions=null;
sessionContext.remove("SecretQuestions");
acknowledge = null;
}
}catch(Exception e){
System.out.println("Error Have accoured in\n\t SecretQuestionAction.java --> reSetMode()? \n\t"+e.getMessage());
}
}
/*--------------------------------------------------------------------*/
public int getMode() {
return mode;
}
public void setMode(int mode) {
this.mode = mode;
}
/*--------------------------------------------------------------------*/
public String getAcknowledge() {
return acknowledge;
}
public void setAcknowledge(String acknowledge) {
this.acknowledge = acknowledge;
}
/*--------------------------------------------------------------------*/
@Remove @Destroy
public void destroy(){}
/*--------------------------------------------------------------------*/
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996576#3996576
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996576
19 years, 7 months
[Installation, Configuration & Deployment] - failed to run apps after jboss deployment
by amitkanjilal
Hi All,
I have deployed my application inside jboss.let me give my folder structure for deployment,its as follows:
<jboss-home>/my_own_instance/deploy/fxtxnbean/fc@4/src /classes/nb.war(exploded one),fxtxn.jar
in the above context: src contains my source code & classes contains all class file.whenever i am deploying,after starting the server,i specify the file path in the deploy(string) of jmx-console-->MainDeployer& i invoke,both the war(exploded) & jar gets deployed.and i load my external properties through jmxconsole-->systemproperties.properties get loaded.now whenever i am running my apps using(http://myhost:8080/nb(exploded)/rl.html and specify my uid and pwd...this is showing following error:
11:04:58,147 INFO [SystemPropertiesService] Loaded system properties from: file:/D:/jboss-4.0.4/server/MOB_SERVER/deploy/FCATTxnBean/fc@4.2
11:05:38,653 ERROR [STDERR] java.lang.Exception: [JFProperties], Undefined System Property 'fcat.jvm.id'
11:05:38,653 ERROR [STDERR] at com.iflex.fcat.infra.JFProperties.loadProperties(JFProperties.java:284)
11:05:38,653 ERROR [STDERR] at com.iflex.fcat.servlet.EntryBase.doStaticInit(EntryBase.java:325)
11:05:38,653 ERROR [STDERR] at com.iflex.fcat.servlet.EntryBase.(EntryBase.java:303)
11:05:38,653 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
11:05:38,653 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
11:05:38,653 ERROR [STDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
11:05:38,653 ERROR [STDERR] at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
11:05:38,653 ERROR [STDERR] at java.lang.Class.newInstance0(Class.java:308)
11:05:38,653 ERROR [STDERR] at java.lang.Class.newInstance(Class.java:261)
11:05:38,653 ERROR [STDERR] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1055)
11:05:38,653 ERROR [STDERR] at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
11:05:38,653 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
11:05:38,653 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
11:05:38,653 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
11:05:38,653 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
11:05:38,653 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
11:05:38,653 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
11:05:38,653 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
11:05:38,653 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
11:05:38,653 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
11:05:38,653 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.
11:05:38,653 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
11:05:38,653 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
11:05:38,653 ERROR [STDERR] at java.lang.Thread.run(Thread.java:534)
11:05:38,653 ERROR [[RetailServlet]] Allocate exception for servlet RetailServlet
javax.servlet.ServletException: Servlet initialization has failed
at com.iflex.fcat.servlet.EntryBase.init(EntryBase.java:631)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:534)
the class file for the Servlet(entery servlet) it is giving error for is there inside src/classes/servlet/entryservlet.class
Plz,help me out from this....i am running out of time...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996575#3996575
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996575
19 years, 7 months
[JBoss Seam] - Re: Showing updated entity on postback
by nbhatia
Correct - the child is added fine, but the rendered page does not show the newly added child. The reason is that the Thread and Posts are fetched from the database during the Apply Request Values phase, and only later in the Invoke Application phase the new Post is inserted.
Here's the source for the rendered page - Thread.xhtml:
| <body>
| <ui:composition template="/layout/template.xhtml">
|
| <ui:define name="body">
|
| <div id="PageSubtitle">Thread</div>
|
| <h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
|
| <div id="List">
| <h2>#{threadHome.instance.title}</h2>
|
| <h:outputText value="No posts" rendered="#{empty threadHome.posts}"/>
|
| <div class="Post">
| <ui:repeat value="#{threadHome.posts}" var="post" rendered="#{not empty threadHome.posts}">
| <div class="Body">#{post.body}</div>
| </ui:repeat>
| </div>
| </div>
|
| <h:form>
| <div class="NewPost">
| <div class="Post" >
| <div class="Body">
| <h:inputTextarea id="body"
| rows="4"
| cols="20"
| required="true"
| value="#{postHome.instance.body}"/>
| </div>
| </div>
| </div>
|
| <div class="Info">
| <h:commandButton id="save"
| value="Post Reply"
| action="#{postHome.persist}"
| styleClass="Button" />
| </div>
| </h:form>
|
|
| </ui:define>
|
| </ui:composition>
| </body>
|
This is ThreadHome:
| @Name("threadHome")
| public class ThreadHome extends EntityHome<Thread> {
|
| @In(value = "#{forumHome.instance}", required = false)
| Forum forum;
|
| public void setThreadId(Long id) {
| setId(id);
| }
|
| public Long getThreadId() {
| return (Long) getId();
| }
|
| @Override
| protected Thread createInstance() {
| Thread result = new Thread();
| result.setForum(forum);
| return result;
| }
|
| public List<Post> getPosts() {
| return getInstance() == null ? null : new ArrayList<Post>(getInstance()
| .getPosts());
| }
|
| }
|
and finally here's PostHome, which contains the persist action which is called from Thread.xhtml.
| @Name("postHome")
| public class PostHome extends EntityHome<Post> {
|
| @In(value = "#{threadHome.instance}", required = false)
| Thread thread;
|
| public void setPostId(Long id) {
| setId(id);
| }
|
| public Long getPostId() {
| return (Long) getId();
| }
|
| @Override
| protected Post createInstance() {
| Post result = new Post();
| result.setThread(thread);
| return result;
| }
|
| @Override
| public String persist() {
| if (this.instance.getDateCreated() == null) {
| this.instance.setDateCreated(new java.util.Date());
| }
| return super.persist();
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996574#3996574
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996574
19 years, 7 months
[JBossWS] - Re: Collection in java -> wsdl for wstools
by guurk
Ok, I've gone through the Axis website which it appears the wstools is based on. Based on the documentation there, there is no 'proper' way to do collections, it's really up to the implementer..
>From http://ws.apache.org/axis/java/user-guide.html#HowYourJavaTypesMapToSOAPX...
anonymous wrote :
| Java Collections
| Some of the Collection classes, such as Hashtable, do have serializers, but there is no formal interoperability with other SOAP implementations, and nothing in the SOAP specifications which covers complex objects. The most reliable way to send aggregate objects is to use arrays. In particular, .NET cannot handle them, though many Java SOAP implementations can marshall and unmarshall hash tables.
|
Thus, I changed my method signature, and instead of returning Collection I changed it to return News[]. An array.
This produced much better results in the generated WSDL.
| <complexType name="News">
| - <sequence>
| <element name="author" nillable="true" type="string" />
| <element name="body" nillable="true" type="string" />
| <element name="description" nillable="true" type="string" />
| <element name="id" nillable="true" type="long" />
| <element name="title" nillable="true" type="string" />
| </sequence>
| </complexType>
| - <complexType name="News.Array">
| - <sequence>
| <element maxOccurs="unbounded" minOccurs="0" name="value" nillable="true" type="ns10:News" />
| </sequence>
| </complexType>
|
Very much in order with what I was looking for.
Bottom Line
Use arrays instead of gerisized Collections.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996569#3996569
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996569
19 years, 7 months
[JBossWS] - Collection in java -> wsdl for wstools
by guurk
JSR-181 deploying a ejb3 stateless as a web service using JBossIDE.
JBoss 4.0.5.GA
JBossIDE 2.0.0 Beta 2
JDK 1.5.0_08
On a method:
| @javax.jws.WebMethod()
| public Collection<News> getNews() {
| }
|
where News is an ejb3 entity bean (complex type):
| @Entity
| @Table( name = "news", uniqueConstraints = {})
| public class News implements java.io.Serializable {
| // Fields
| private static final long serialVersionUID = 1L;
| private Long id;
| private String title;
| private String description;
| private String body;
| private String author;
| private Set< RssItem> rssItems = new HashSet< RssItem>( 0);
| ...
| ...
| ...
|
The WSDL generated does not contain a sequence with the complex type defined:
| <complexType name="Collection">
| <sequence>
| <element name="empty" type="boolean" />
| </sequence>
| </complexType>
| <complexType name="News">
| <sequence>
| <element name="author" nillable="true" type="string" />
| <element name="body" nillable="true" type="string" />
| <element name="description" nillable="true" type="string" />
| <element name="id" nillable="true" type="long" />
| <element name="title" nillable="true" type="string" />
| </sequence>
| </complexType>
| </schema>
|
| <message name="ResonusBE_getNewsResponse">
| <part name="result" type="tns:Collection" />
| </message>
|
| <message name="ResonusBE_getNews" />
|
| <operation name="getNews">
| <input message="tns:ResonusBE_getNews" />
| <output message="tns:ResonusBE_getNewsResponse" />
| </operation>
|
|
Notice that the collection specified for Collection is collection with a boolen... not even close to the right type.
The News complex type only shows up in the WSDL if I explicitly have another method that returns News. It won't show up if it's just with in the Collection generics.
For testing purposes I tried out the XFire java->wsdl libraries... it does a nice job:
| <xsd:complexType name="ArrayOfNews">
| <xsd:sequence>
| <xsd:element maxOccurs="unbounded" minOccurs="0" name="News" nillable="true" type="tns:News" />
| </xsd:sequence>
| </xsd:complexType>
| <xsd:complexType name="News">
| <xsd:sequence>
| <xsd:element minOccurs="0" name="author" nillable="true" type="xsd:string" />
| <xsd:element minOccurs="0" name="body" nillable="true" type="xsd:string" />
| <xsd:element minOccurs="0" name="description" nillable="true" type="xsd:string" />
| <xsd:element minOccurs="0" name="id" nillable="true" type="xsd:long" />
| <xsd:element minOccurs="0" name="title" nillable="true" type="xsd:string" />
| </xsd:sequence>
| </xsd:complexType>
|
Thoughts? Am I missing something?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996567#3996567
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996567
19 years, 7 months
[JBoss Portal] - Re: WSRP
by vpnuser
Thank you for the quick reply. The exception thrown is given below.
Please help in solving the issue.
| 09:28:10,269 ERROR [ServiceObjectFactory] Cannot create service
| org.jboss.ws.metadata.wsdl.WSDLException: java.io.IOException: Server returned HTTP response code: 503 for URL: http://0.0.0.0:8080/portal-wsrp/ServiceDescriptionService?wsdl
| at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.getDocument(WSDLDefinitionsFactory.java:204)
| at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:112)
| at org.jboss.ws.metadata.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:273)
| at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:110)
| at org.jboss.ws.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:112)
| at org.jboss.ws.jaxrpc.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:181)
| at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
| at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
| at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.jboss.portal.wsrp.services.AbstractJNDIServiceFactory.getService(AbstractJNDIServiceFactory.java:121)
| at org.jboss.portal.wsrp.services.AbstractSOAPServiceFactory.getService(AbstractSOAPServiceFactory.java:84)
| at org.jboss.portal.wsrp.consumer.WSRPConsumerImpl.getService(WSRPConsumerImpl.java:484)
| at org.jboss.portal.wsrp.consumer.WSRPConsumerImpl.getServiceDescriptionService(WSRPConsumerImpl.java:460)
| at org.jboss.portal.wsrp.consumer.WSRPConsumerImpl.getServiceDescriptionAndRegisterIfNeeded(WSRPConsumerImpl.java:502)
| at org.jboss.portal.wsrp.consumer.WSRPConsumerImpl.updateCachesIfNeeded(WSRPConsumerImpl.java:369)
| at org.jboss.portal.wsrp.consumer.WSRPConsumerImpl.getPortletMap(WSRPConsumerImpl.java:276)
| at org.jboss.portal.wsrp.consumer.WSRPConsumerImpl.getPortlets(WSRPConsumerImpl.java:141)
| at org.jboss.portal.federation.impl.FederatedPortletInvokerService.getPortlets(FederatedPortletInvokerService.java:77)
| at org.jboss.portal.core.portlet.management.PortletManagerBean.getPortlets(PortletManagerBean.java:228)
| 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.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:400)
| at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:71)
| at org.jboss.portal.faces.el.DelegatingPropertyResolver.getValue(DelegatingPropertyResolver.java:118)
| at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:141)
| at com.sun.el.parser.AstValue.getValue(AstValue.java:96)
| at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
| at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
| at javax.faces.component.UIData.getValue(UIData.java:779)
| at org.apache.myfaces.component.html.ext.HtmlDataTableHack.createDataModel(HtmlDataTableHack.java:350)
| at org.apache.myfaces.component.html.ext.HtmlDataTableHack.getDataModel(HtmlDataTableHack.java:333)
| at org.apache.myfaces.component.html.ext.HtmlDataTable.getDataModel(HtmlDataTable.java:428)
| at org.apache.myfaces.component.html.ext.HtmlDataTableHack.getRowCount(HtmlDataTableHack.java:75)
| at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:124)
| at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:94)
| at org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.encodeChildren(HtmlTableRenderer.java:57)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:319)
| at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:444)
| at org.apache.myfaces.renderkit.RendererUtils.renderChildren(RendererUtils.java:427)
| at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:448)
| at org.apache.myfaces.renderkit.RendererUtils.renderChildren(RendererUtils.java:427)
| at org.apache.myfaces.renderkit.html.HtmlGroupRendererBase.encodeEnd(HtmlGroupRendererBase.java:62)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
| at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:450)
| at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:203)
| at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:85)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:540)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
| at org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:396)
| at org.apache.myfaces.portlet.MyFacesGenericPortlet.doView(MyFacesGenericPortlet.java:266)
| at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:167)
| at javax.portlet.GenericPortlet.render(GenericPortlet.java:407)
| at org.jboss.portal.portlet.container.PortletContainer.invokeRender(PortletContainer.java:521)
| at org.jboss.portal.portlet.container.PortletContainer.dispatch(PortletContainer.java:437)
| at org.jboss.portal.portlet.container.PortletContainerInvoker$1.dispatch(PortletContainerInvoker.java:143)
| at org.jboss.portal.portlet.invocation.PortletInvocation.dispatch(PortletInvocation.java:242)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:140)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jboss$portal$core$aspects$portlet$TransactionInterce
| ptor$invokeRequired$aop(TransactionInterceptor.java:105)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeRequired_N4020346540025535540.invokeNext(Transacti
| onInterceptor$invokeRequired_N4020346540025535540.java)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeRequired_N4020346540025535540.invokeNext(Transacti
| onInterceptor$invokeRequired_N4020346540025535540.java)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invokeRequired(TransactionInterceptor.java)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.core.aspects.portlet.HeaderInterceptor.invoke(HeaderInterceptor.java:49)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.portlet.aspects.portlet.ProducerCacheInterceptor.invoke(ProducerCacheInterceptor.java:50)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.portlet.aspects.portlet.ModesInterceptor.invoke(ModesInterceptor.java:59)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.bridge.BridgeInterceptor.invoke(BridgeInterceptor.java:45)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.portlet.aspects.portlet.WindowStatesInterceptor.invoke(WindowStatesInterceptor.java:55)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.portlet.aspects.portlet.PortletSessionSynchronizationInterceptor.invoke(PortletSessionSynchronizatio
| nInterceptor.java:76)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor$InvokeNextCommand.execute(ContextDispatcherInte
| rceptor.java:141)
| at sun.reflect.GeneratedMethodAccessor249.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.portal.server.servlet.CommandServlet.doGet(CommandServlet.java:104)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
| at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:539)
| at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
| at org.jboss.portal.portlet.impl.spi.AbstractRequestContext.include(AbstractRequestContext.java:193)
| at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor$1.include(ContextDispatcherInterceptor.java:69)
|
| at org.jboss.portal.server.servlet.CommandServlet.include(CommandServlet.java:84)
| at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:75)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.portlet.aspects.portlet.ContextTrackerInterceptor.invoke(ContextTrackerInterceptor.java:50)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.portlet.aspects.portlet.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:65)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.portlet.aspects.portlet.ValveInterceptor.invoke(ValveInterceptor.java:61)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:171)
| at org.jboss.portal.portlet.container.PortletContainerInvoker.invoke(PortletContainerInvoker.java:114)
| at sun.reflect.GeneratedMethodAccessor248.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy62.invoke(Unknown Source)
| at org.jboss.portal.portlet.state.producer.StatefulPortletInvoker.invoke(StatefulPortletInvoker.java:249)
| at sun.reflect.GeneratedMethodAccessor247.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy64.invoke(Unknown Source)
| at org.jboss.portal.federation.impl.FederatedPortletInvokerService.invoke(FederatedPortletInvokerService.java:139)
| at org.jboss.portal.federation.impl.FederatingPortletInvokerService.invoke(FederatingPortletInvokerService.java:155)
| at sun.reflect.GeneratedMethodAccessor246.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy66.invoke(Unknown Source)
| at org.jboss.portal.portlet.test.TestPortletInvoker$1.dispatch(TestPortletInvoker.java:63)
| at org.jboss.portal.portlet.invocation.PortletInvocation.dispatch(PortletInvocation.java:242)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:140)
| at org.jboss.portal.portlet.aspects.portlet.PortalSessionSynchronizationInterceptor.invoke(PortalSessionSynchronizationI
| nterceptor.java:85)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.portlet.aspects.portlet.ConsumerCacheInterceptor.invoke(ConsumerCacheInterceptor.java:93)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.core.model.instance.InstanceSecurityInterceptor.invoke(InstanceSecurityInterceptor.java:83)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:171)
| at org.jboss.portal.portlet.test.TestPortletInvoker.invoke(TestPortletInvoker.java:123)
| at sun.reflect.GeneratedMethodAccessor240.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy48.invoke(Unknown Source)
| at org.jboss.portal.core.impl.model.instance.InstanceImpl.invoke(InstanceImpl.java:273)
| at org.jboss.portal.core.command.RenderWindowCommand.execute(RenderWindowCommand.java:108)
| at org.jboss.portal.core.command.ControllerCommand.dispatch(ControllerCommand.java:91)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:140)
| at org.jboss.portal.core.aspects.controller.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:171)
| at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.core.aspects.controller.PageNavigationInterceptor.invoke(PageNavigationInterceptor.java:80)
| at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:79)
| at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.core.aspects.controller.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:59)
| at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:171)
| at org.jboss.portal.core.command.CommandContext.execute(CommandContext.java:102)
| at org.jboss.portal.core.command.ExecutionContext.execute(ExecutionContext.java:91)
| at org.jboss.portal.core.command.CommandContext.chain(CommandContext.java:148)
| at org.jboss.portal.core.command.MarkupCommand.renderPortletWindow(MarkupCommand.java:463)
| at org.jboss.portal.core.command.RenderPageCommand.renderFragments(RenderPageCommand.java:76)
| at org.jboss.portal.core.command.MarkupCommand.execute(MarkupCommand.java:340)
| at org.jboss.portal.core.command.ControllerCommand.dispatch(ControllerCommand.java:91)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:140)
| at org.jboss.portal.core.aspects.controller.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:171)
| at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.core.aspects.controller.PageNavigationInterceptor.invoke(PageNavigationInterceptor.java:80)
| at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:79)
| at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.core.aspects.controller.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:59)
| at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:171)
| at org.jboss.portal.core.command.CommandContext.execute(CommandContext.java:102)
| at org.jboss.portal.core.command.ExecutionContext.execute(ExecutionContext.java:91)
| at org.jboss.portal.core.command.ExecutionContext.execute(ExecutionContext.java:152)
| at org.jboss.portal.core.command.ExecutionContext.execute(ExecutionContext.java:78)
| at org.jboss.portal.core.CoreController.handle(CoreController.java:126)
| 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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.java:287)
| at $Proxy139.handle(Unknown Source)
| at org.jboss.portal.server.ServerInvocation.dispatch(ServerInvocation.java:79)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:140)
| at org.jboss.portal.server.aspects.server.NavigationInterceptor.invoke(NavigationInterceptor.java:64)
| at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTypeInterceptor.java:65)
| at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor.java:74)
| at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.java:174)
| at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.server.aspects.server.SessionInvalidatorInterceptor.invoke(SessionInvalidatorInterceptor.java:92)
| at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.core.aspects.server.TransactionInterceptor.org$jboss$portal$core$aspects$server$TransactionIntercept
| or$invoke$aop(TransactionInterceptor.java:49)
| at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterce
| ptor$invoke_N5143606530999904530.java)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:275)
| at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterce
| ptor$invoke_N5143606530999904530.java)
| at org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java)
| at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:37)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:130)
| at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:171)
| at org.jboss.portal.server.servlet.PortalServlet.process(PortalServlet.java:294)
| at org.jboss.portal.server.servlet.PortalServlet.doGet(PortalServlet.java:172)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://0.0.0.0:8080/portal-wsrp/ServiceDescript
| ionService?wsdl
| at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1152)
| at java.net.URL.openStream(URL.java:1007)
| at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.getDocument(WSDLDefinitionsFactory.java:187)
| ... 296 more
| 09:28:10,300 WARN [PortletManagerBean] Couldn't access portlet invoker. Portlets won't be listed.
| Reason:
| Problem getting service description for producer oracle
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996566#3996566
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996566
19 years, 7 months
[JBoss Seam] - Re: Seam and IceFaces problem
by jmiguel77
Hi:
I used the embedded example from the Seam 1.0.1/examples and now, at least there are no exceptions thrown in the page
But i am facing a new problem (i am really starting to dissapoint about this icefaces thing)
I have this page:
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:ice="http://www.icesoft.com/icefaces/component"
template="../template/global.xhtml">
<ui:define name="content">
<h:outputText value="#{messages['user.label.list']}" />
<ice:dataTable value="#{userList}" var="user" width="100%">
<h:column id="userIdColumn">
<f:facet name="header">Id</f:facet>
<ice:outputText value="#{user.userId}"/>
</h:column>
<h:column id="userNameColumn">
<f:facet name="header">Name</f:facet>
<ice:outputText value="#{user.userName}"/>
</h:column>
<h:column id="userRoleColumn">
<f:facet name="header">Role</f:facet>
<ice:outputText value="#{user.role.roleName}"/>
</h:column>
<h:column id="actionColumn">
<f:facet name="header">Actions</f:facet>
<s:link id="editSeamLink" value="#{messages['common.label.edit']}" action="#{securityManager.selectUser}"/>
<s:link id="deleteSeamLink" value="#{messages['common.label.delete']}" action="#{securityManager.deleteUser}"/>
</h:column>
</ice:dataTable>
</ui:define>
</ui:composition>
it is really a simple page right ??? I have tried the same page with the same components (the session beans and stuff) without icefaces and everything worked fine
But with the ice:dataTable i get no values in the id, name and role columns once the page is loaded. If i click in the edit link, i get a bean in the edit page, but when i return to the list page, that loaded bean is present in the entire list
The number of rows in the table is ok, but the data i all jammed.
What can it be ???
thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996551#3996551
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996551
19 years, 7 months
[JBoss Seam] - Re: Problems with Validator and Seam when submit form
by fabio.ita04
Cayo,
I spent some time with an error like yours. Simple validation (like that in Hibernate Validator) worked fine even after first submission (failed due to required constraints), but complex validation (using some business logic, like verify if a login field is unique) don't. The JSF code:
| <div class="entry">
| <s:decorate>
| <label>#{messages['user.login']}</label>
| <h:inputText id="login" value="#{user.login}">
| <a:support event="onblur" reRender="loginError" />
| </h:inputText>
| <a:outputPanel id="loginError">
| <s:message />
| <c:if test="#{userManager.loginInUse}">
| #{messages['user.login.in.use']}
| </c:if>
| </a:outputPanel>
| </s:decorate>
| </div>
|
where #{userManager.loginInUse} is a Session Bean method that was supposed to perform validation (verify if login is unique) at ajax rerendering.
The reason of the fails: the backing bean wasn't properly populated, probably because "required" constraints returned page before that. So, a method like user.getLogin (invoked at #{userManager.loginInUse}) returned null, even when the field was typed in the form.
So, I decided to move this validation to not be executed at ajax events. Instead, placed it in the action method that is invoked on form submission. If validation fails, add a message in FacesMessages with Fatal Severity, and return.
| FacesMessages.instance().addFromResourceBundle(
| FacesMessage.SEVERITY_FATAL, "login.already.in.use");
|
All Fatal errors are displayed as Global Errors at the top of the form:
| <span>
| <h:messages infoClass="success" fatalClass="globalErrors" errorStyle="display: none" />
| </span>
|
This way, business logic validation is executed at the very begining of action method (grant simple validation and proper population of backing bean).
Hope it helps.
Fábio.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996549#3996549
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996549
19 years, 7 months
[JBoss Seam] - Re: Jetbrains IntelliJ and seam (and maybe seam-gen)?
by atzbert
Ok,
i created some sort of plain seam project which was originally created by seam-gen and has been a little bit "enriched". You'll find an IntelliJ project file in the base directory along with 3 module files (ear/war/jar). Just open the project and do some minor adjustments:
-edit the project jdk
-adjust the testproject-ds.xml / jboss-beans.xml to match your db
-edit the {basedir}/build.properties and set the jboss home accordingly
If you want to use the seam gen tasks (which I have slightly modified and reduced to the file generators) then you should edit the {basedir}/seamgen/generator.properties file and make it matching your paths.
That should be it.
I added two ant build files, the upper one (called testproject) deploys/builds the application. Use "explode" to explode it to the jboss deploy dir and "restart" to touch the deployment descriptor in order to redeploy the app.
The other one is the "reduced to file generators" - seam gen. Pretty useful I think.
Have fun, and let me know if there are any further problems.
Tino
ps: download it here: http://pluggable.de/download/testproject.tar.gz ;P
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996544#3996544
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996544
19 years, 7 months
[JBoss Seam] - Re: Could not instantiate Seam component error
by hstang
If you provide a no-args constructor, the exception dealing with instantiation will be gone. This is the only way Seam can construct your seam components properly. Yes, as you suggested, use the @Create to initialize other important properties pertaining to the class. The annotated method is called once Seam has fully initialize the component.
As for @DataModel, this will outject the annotated property to the scope of the owning component. In your case, the conversation.
And for @DataModelSelection, this will inject the selected model object, if it's successfully look up in the contexts. You have to ensure that the conversation is long-running, just long enough though, so that @DataModelSelection object can be successfully be retrieved through the @DataModel property.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996541#3996541
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996541
19 years, 7 months
[JBoss Seam] - Seam and IceFaces problem
by jmiguel77
Hi:
I am trying to work with seam and icefaces. I have the following:
- jboss 4.0.5GA
- seam 1.1.0
- icefaces 1.5.1
this is my web.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<session-config>
<session-timeout>3</session-timeout>
</session-config>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/navigation.xml</param-value>
</context-param>
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.icesoft.faces.actionURLSuffix</param-name>
<param-value>.seam</param-value>
</context-param>
<context-param>
<param-name>com.icesoft.faces.synchronousUpdate</param-name>
<param-value>true</param-value>
</context-param>
<filter-name>Seam Exception Filter</filter-name>
<filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
<filter-mapping>
<filter-name>Seam Exception Filter</filter-name>
<url-pattern>*.seam</url-pattern>
</filter-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-name>Blocking Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>*.iface</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Blocking Servlet</servlet-name>
<url-pattern>/block/*</url-pattern>
</servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.seam</url-pattern>
</servlet-mapping>
</web-app>
this is my faces-config.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config
PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>
<locale-config>
<default-locale>es</default-locale>
<supported-locale>en</supported-locale>
</locale-config>
<view-handler>com.icesoft.faces.facelets.D2DFaceletViewHandler</view-handler>
<!-- Select one of the standard transaction models for the Seam application -->
<phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
</faces-config>
As you see, everything is just as it is supossed to be, but when i try to run a xhtml page, i get this exception:
17:45:50,770 ERROR [SeamExceptionFilter] uncaught exception handled by Seam
javax.servlet.ServletException: Cannot remove ServletRequest Parameter
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
17:45:50,771 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
java.lang.UnsupportedOperationException: Cannot remove ServletRequest Parameter
at org.apache.myfaces.context.servlet.RequestParameterMap.removeAttribute(RequestParameterMap.java:50)
at org.apache.myfaces.context.servlet.AbstractAttributeMap.remove(AbstractAttributeMap.java:121)
at com.icesoft.faces.application.D2DViewHandler.restoreView(D2DViewHandler.java:180)
at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:141)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996540#3996540
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996540
19 years, 7 months
[JBoss AOP] - How to access intercepted methods in JSF?
by ykrishnaprasad
1) If there is a return in the intercepted method(call or execution), the interceptor doesn't work.
Is there anything i am missing?
2) I have an AOP "Project1" with interceptor on a method in a class.
I do not have a problem running the Project1 by itself(unless i use a return in my intercepted method).
But if a take the Project1 jar(without jboss-aop.xml in the jar) file for
this project along with its jboss-aop.xml(2 files in total)
and drop it in JBoss deploy directory, and try to use the intercepted method of Project1 class
in JSF of "Project2", it doesn't intercept.
Am i deploying correctly?
Project1:
Calltest.java
HelloAOPInterceptor.java
jboss-aop.xml
Project2:
JSF, faces-config.xml and web.xml
(The reason for seperating the jar and jboss-aop.xml(of Project1)
is that i can reference the deploy directory project1.jar in my Project2 library
list to use its classes.If i include the jboss-aop.xml
in the jar itself, then it has to be named as project1.jar.aop(according to JBoss AOP framework doc chapter 10)
which i cannot add to my library list in Project 2.)
My mbean(faces-config.xml) in project2 looks like this:
| </managed-bean>
| <managed-bean>
| <managed-bean-name>
| callTest
| </managed-bean-name>
| <managed-bean-class>
| jbossaop.callTest
| </managed-bean-class>
| <managed-bean-scope>
| request
| </managed-bean-scope>
| </managed-bean>
|
where i declared callTest class in my jbossaop package( which i got from Project1).
My jsf(jsp) in project 2 looks like:
| <f:view>
| <h:form id="helloForm" >
| <%@ page import="jbossaop.*" %>
| <h2>Hi. My name is Duke. I'm thinking of a number from
| <h:outputText value="#{callTest.callme1}"/> to
| <h:outputText value="#{UserNumberBean.maximum}"/>.
| Can you guess it?
| </h2>
| ............
| </h:form>
| </f:view>
|
UserNumberBean is a bean within Project 2 and callTest is from the aop jar i added to the library list of Project2.
The callTest.callme1 corresponds to the getCallme1() method in callTest class.
The callTest class in Project1 looks like:
| package jbossaop;
|
| public class callTest {
| private long callme = 1;
| private long callme1 = 2;
| public callTest(){
|
| }
| public void getCallme() {
| //return (this.callme);
| }
| public void setCallme(long callme) {
| this.callme = callme;
| }
|
| public long getCallme1(){
| getCallme();
| return callme1;
| }
| }
|
The interceptor is on getCallme() method and jboss-aop.xml looks like:
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
| <aop>
| <bind pointcut="call(public void jbossaop.callTest->getCallme())">
| <interceptor class="jbossaop.HelloAOPInterceptor"/>
| </bind>
| <bind pointcut="execution(public void jbossaop.callTest->getCallme())">
| <interceptor class="jbossaop.HelloAOPInterceptor"/>
| </bind>
| </aop>
|
The interceptor class is:
| public class HelloAOPInterceptor implements Interceptor{
| public String getName(){
| return "HelloAOPInterceptor";
| }
| public Object invoke(Invocation invocation) throws Throwable{
| FileWriter writer = new FileWriter( "c:/temp/log.txt", true );
|
| if (invocation instanceof MethodCalledByMethodInvocation){
| writer.write( "Method Called By Method Invocation " + new Date() + "\n");
| } else {
| writer.write( "JSF Invocation " + new Date()+ "\n");
| }
|
| writer.close();
|
| return invocation.invokeNext();
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996538#3996538
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996538
19 years, 7 months
[JBoss Seam] - Showing updated entity on postback
by nbhatia
I have created a seam application using seam-gen. I have a page that displays a master entity and its children. The page also allows the user to add a new child. However, when I click the submit button on the page to add the new child, the finally rendered page does not show this child. The reason is that the database is queried BEFORE the child is inserted. See below:
| 17:22:47,702 INFO [STDOUT] before - RESTORE_VIEW(1)
| 17:22:47,749 INFO [STDOUT] after - RESTORE_VIEW(1)
| 17:22:47,765 INFO [STDOUT] before - APPLY_REQUEST_VALUES(2)
| 17:22:47,780 INFO [STDOUT] Hibernate: select thread0_.ID as ID161_0_, thread0_.TITLE as TITLE161_0_, thread0_.FORUM_FKas FORUM3_161_0_ from chalktalk.thread thread0_ where thread0_.ID=?
| 17:22:47,780 INFO [STDOUT] Hibernate: select posts0_.THREAD_FK as THREAD4_1_, posts0_.ID as ID1_, posts0_.ID as ID160_0_, posts0_.BODY as BODY160_0_, posts0_.THREAD_FK as THREAD4_160_0_, posts0_.DATE_CREATED as DATE3_160_0_ from chalktalk.post posts0_ where posts0_.THREAD_FK=?
| 17:22:47,812 INFO [STDOUT] after - APPLY_REQUEST_VALUES(2)
| 17:22:47,812 INFO [STDOUT] before - PROCESS_VALIDATIONS(3)
| 17:22:47,859 INFO [STDOUT] after - PROCESS_VALIDATIONS(3)
| 17:22:47,859 INFO [STDOUT] before - UPDATE_MODEL_VALUES(4)
| 17:22:47,905 INFO [STDOUT] after - UPDATE_MODEL_VALUES(4)
| 17:22:47,905 INFO [STDOUT] before - INVOKE_APPLICATION(5)
| 17:22:48,015 INFO [STDOUT] Hibernate: insert into chalktalk.post (BODY, THREAD_FK, DATE_CREATED, ID) values (?, ?, ?, ?)
| 17:22:48,046 INFO [STDOUT] after - INVOKE_APPLICATION(5)
| 17:22:48,093 INFO [STDOUT] before - RENDER_RESPONSE(6)
| 17:22:48,249 INFO [STDOUT] after - RENDER_RESPONSE(6)
|
How do I solve this issue/ I would like the newly rendered page to show the inserted child.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996537#3996537
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996537
19 years, 7 months