[JBoss Seam] - Re: Problem with Icefaces sample
by ellenzhao
if you are using JBoss AS, you can delete this section from the build file:
| <!-- Tomcat build -->
| <zipfileset id="example.tomcat.war.webinf"
| prefix="WEB-INF"
| dir="resources/WEB-INF" >
| <include name="faces-config.xml"/>
| <include name="navigation.xml"/>
| <include name="pages.xml"/>
| <include name="components.xml"/>
| <include name="web.xml"/>
| </zipfileset>
|
| <fileset id="example.tomcat.resources"
| dir="resources">
| <include name="seam.properties"/>
| <include name="import.sql"/>
| <include name="META-INF/persistence.xml"/>
| <include name="META-INF/ejb-jar.xml"/>
| <include name="META-INF/jboss-beans.xml"/> <!-- TODO: move out of META-INF -->
| </fileset>
|
| <!-- Overrides -->
| <property name="src.java.dir" value="src"/>
| <property name="src.test.dir" value="src"/>
| <property name="test.classpath" value="test.eejb.classpath"/>
| <property name="tomcat.conf" value="eejb.conf"/>
|
| <import file="../../build.xml"/>
|
| <path id="build.classpath">
| <path refid="example.path"/>
| <fileset refid="lib"/>
| <fileset refid="seam.jar"/>
| <fileset file="resources/WEB-INF/lib/icefaces.jar"/>
| </path>
|
Now according to the rest build code, there should be this code in the your application.xml:
| <module>
| <java>icefaces.jar</java>
| </module>
|
Have a look at your application.xml. If this module doesn't exist, paste the code above. Rebuild/deploy the app again. Does it work now?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988950#3988950
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988950
19Â years, 5Â months
[JBoss Portal] - Re: Easiest way to get the Current Users's Role?
by djmacpac
Hmm, that's the problem:
I get the UserName via
| String UserName = (String)req.getRemoteUser();
|
and i can get the Name via
| java.security.Principal principal = req.getUserPrincipal();
|
Both works fine. But when I try to create a User like this
| User user = (User)userModule.findUserByUserName(UserName);
|
I get following Error:
Caused by: java.lang.reflect.InvocationTargetException
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)
... 274 more
Caused by: java.lang.ClassCastException: org.jboss.portal.identity.db.UserImpl
at $Proxy178.findUserByUserName(Unknown Source)
at TreeBacker.check_access(TreeBacker.java:99)
at TreeBacker.get_tree_rek(TreeBacker.java:143)
at TreeBacker.getTreeData(TreeBacker.java:236)
... 279 more
And I need the "User" to find his specified Role or???
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988947#3988947
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988947
19Â years, 5Â months
[JBoss jBPM] - Re: JBPM(BPEL) conflicts (hibernate settings) with my app.
by alex.guizarï¼ jboss.com
when you deploy resources in a service archive (.sar) they are visible to all modules. in this cause your web app detects the hibernate.properties resource from jbpm-bpel.sar and tries to apply the properties there.
try renaming the hibernate configuration files. to do so, follow the steps below:
1. edit src/config/jbpm.cfg.xml:
<jbpm-configuration>
|
| <!-- jbpm context -->
| ...
| <!-- hibernate configuration resources -->
| <string name="resource.hibernate.cfg.xml" value="hibernate-bpel.cfg.xml" />
| <string name="resource.hibernate.properties" value="hibernate-bpel.properties" />
|
| <!-- configuration resources in jbpm-{version}.jar -->
| ...
| <!-- configuration resources in jbpm-bpel-{version}.jar -->
| ...
| </jbpm-configuration>
2. in directory src/resources/jbpm-bpel.sar, rename hibernate.properties to hibernate-bpel.properties
3. in directory src/config, rename hibernate.cfg.xml to hibernate-bpel.cfg.xml
4. the main build file includes hibernate.cfg.xml by exact name; change it to include all *.cfg.xml files:
<target name="build.service.404"
| description="build service archive for JBoss 4.0.4">
| <mkdir dir="${output.root}" />
| <jar destfile="${output.root}/jbpm-bpel.sar">
| <!--libraries-->
| ...
| <!--configuration-->
| <fileset dir="${src.config}">
| <include name="*.cfg.xml" />
| </fileset>
| <!--service files-->
| ...
| <!-- web module -->
| ...
| </jar>
| </target>
5. rebuild and deploy the bpel service archive.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988942#3988942
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988942
19Â years, 5Â months