[JBoss Seam] - Re: selectOneMenu and commandButton conflict
by grdzeli_kaci
"petemuir" wrote : <h:selectOneMenu styleClass="font_style" value="#{foo.application}">
|
| Foo is the backing bean on which you wish to set the application property. It could be just #{application} - though I'm not sure how well this works on the whole.
ok,
1. i had entityconverter.jar into my war file
2.my project component.xml file looks like :
| <framework:entity-home name="applicationHome" entity-class="com.magticom.billing.businesslayer.entitybeans.billAdmin.Application" />
| <factory name="application" value="#{applicationHome.instance}" />
| <framework:entity-query name="applications" ejbql="select a from Application a" />
|
"applicationHome" is baking bean for login page.
"application" is name of this baking bean instance.
"applications" is is entity query.
3. my login page looks like
| <h:selectOneMenu styleClass="font_style" value="#{application}">
| <s:selectItems value="#{applications.resultList}" var="application" label="#{application.name}"/>
| <ec:convertEntity />
| </h:selectOneMenu>
|
in "h:selectOneMenu" component "#{application}" is name of the baking bean,
in "s:selectItems" component "#{applications.resultList}" is the result of entity query
the var attribute point to the factory.
ant at list this is <ec:convertEntity /> is for converting entity.
but always i got the same error
| Value is no String (class=com.magti.seam.beans.billAdmin.Application, value=com.magti.seam.beans.bil
| lAdmin.Application[applicationId=4]) and component _id17:_id26with path: {Component-Path : [Class: j
| avax.faces.component.UIViewRoot,ViewId: /login.xhtml][Class: javax.faces.component.html.HtmlForm,Id:
| _id17][Class: org.jboss.seam.ui.UIDecorate,Id: _id25][Class: javax.faces.component.html.HtmlSelectO
| neMenu,Id: _id26]} does not have a Converter
|
is another way to resolve this problem? without entity converter ?
or what i did wrong ?
oo and i put entityconverter.jar into jboss server lib folder. is it needed ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023486#4023486
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023486
19Â years, 1Â month
[JBoss jBPM] - Undeploy ProcessDefinition........
by daresan
I am trying to undeploy processdefinition from oracle database by using jbpm api. but it is throughing error. these are follows
code:
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| try {
| ProcessDefinition processDefinition = jbpmContext.getGraphSession().findLatestProcessDefinition(processDefn.getName());
| jbpmContext.getGraphSession().deleteProcessDefinition(processDefinition);
| }finally {
| jbpmContext.close();
| }
|
error:
12:48:23,799 WARN [JDBCExceptionReporter] SQL Error: 904, SQLState: 42000
| 12:48:23,799 ERROR [JDBCExceptionReporter] ORA-00904: "TEMPLATESE0_"."ID_": inva
| lid identifier
|
| 12:48:23,831 ERROR [STDERR] org.hibernate.exception.SQLGrammarException: could n
| ot initialize a collection: [org.jbpm.taskmgmt.def.Task.templateSet#1662789]
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
| ava:65)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
| er.java:43)
| at org.hibernate.loader.Loader.loadCollection(Loader.java:1926)
| at org.hibernate.loader.collection.CollectionLoader.initialize(Collectio
| nLoader.java:71)
| at org.hibernate.persister.collection.AbstractCollectionPersister.initia
| lize(AbstractCollectionPersister.java:520)
| at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onIn
| itializeCollection(DefaultInitializeCollectionEventListener.java:60)
| at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:
| 1627)
| at org.hibernate.collection.AbstractPersistentCollection.initialize(Abst
| ractPersistentCollection.java:344)
| at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPe
| rsistentCollection.java:86)
| at org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:13
| 8)
| at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.
| java:196)
| at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.
| java:188)
| at org.hibernate.engine.CascadingAction.getAllElementsIterator(Cascading
| Action.java:266)
| at org.hibernate.engine.CascadingAction.access$100(CascadingAction.java:
| 21)
| at org.hibernate.engine.CascadingAction$2.getCascadableChildrenIterator(
| CascadingAction.java:52)
| at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:2
| 88)
| at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:185)
| at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:160)
| at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:108)
| at org.hibernate.engine.Cascade.cascade(Cascade.java:248)
| at org.hibernate.engine.Cascade.cascade(Cascade.java:223)
| at org.hibernate.event.def.DefaultDeleteEventListener.cascadeBeforeDelet
| e(DefaultDeleteEventListener.java:220)
| at org.hibernate.event.def.DefaultDeleteEventListener.deleteEntity(Defau
| ltDeleteEventListener.java:169)
| at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDe
| leteEventListener.java:110)
| at org.hibernate.impl.SessionImpl.fireDelete(SessionImpl.java:764)
| at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:757)
| at org.hibernate.engine.CascadingAction$2.cascade(CascadingAction.java:4
| 7)
| at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:213)
| at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:157)
| at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:108)
| at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:2
| 90)
i have checked so many messages about this topic
e.g.
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=78471
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=82667
i have tried to delete processinstance before processdefinition
code:
jbpmContext.getGraphSession().deleteProcessInstance(pi);
but still i am not able to undeploy
if someone who has encountered this problem can u plz help me out regarding this.
thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023481#4023481
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023481
19Â years, 1Â month
[Security & JAAS/JBoss] - Can secure jmx-console but not my own web app!!!
by cgt001
Hi,
Can anybody out there show me how to secure a web app? I have successfully secured jmx-console using the DatabaseServerLoginModule but can't access a deployed web (sample web) in my JBOSS AP server.
Below are the configurations made for my sample web.
login-config.xml entries
<application-policy name = "My-web">
<login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag = "required">
<module-option name = "dsJndiName">java:/DefaultDS</module-option>
<module-option name = "principalsQuery">SELECT PASSWD FROM JMS_USERS WHERE USERID=?</module-option>
<module-option name = "rolesQuery">SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=?</module-option>
</login-module>
</application-policy>
---------------------
jboss-web.xml entries
<jboss-web>
<security-domain>java:/jass/My-web</security-domain>
<context-root>/My-web</context-root>
</jboss-web>
-----------------------
web.xml file entries
<web-app>
<security-constraint>
<web-resource-collection>
<web-resource-name>my-web</web-resource-name>
An example security config that only allows users with the
role WebAppUser to access the My-web web application
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>WebAppUser</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>My-web Realm</realm-name>
</login-config>
<security-role>
<role-name>WebAppUser</role-name>
</security-role>
</web-app>
---------------------
JBoss server log
javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: jass not bound]
at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1067)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:700)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.authenticate(JBossSecurityMgrRealm.java:488)
at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:180)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
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)
Caused by: javax.naming.NameNotFoundException: jass not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1061)
... 16 more
Thanks,
cgt001
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023475#4023475
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023475
19Â years, 1Â month