[JBoss Seam] - Resource not found exceptions with seam using mod_jk
by todd.nash@gmail.com
I am running an application built on Seam using standard Richfaces/Facelets components. Everything works fine when you talk to JBoss directly, however as soon as we hooked up Apache using mod_jk and try to forward to a single JBoss node (not clustered yet or loadbalanced) we get errors on the home page that some of the resources cannot be found:
17:17:32,953 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
org.ajax4jsf.resource.ResourceNotFoundException: Resource not registered : org.ajax4jsf.javascript.AjaxScript.seam ...
It appears that ".seam" is being appended to the javascript resource requests (not just the ajax ones) and some of the image requests (i.e. the page source shows the images for the tabs as images/theImage.gif.seam ) . I don't have access to the server right now to give you the full error message, but it is similar to the one above.
Is there a setup issue I missed in the mod_jk setup or am I missing a context setting on the JBoss server?
Thanks for any help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111664#4111664
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111664
18 years, 4 months
[Clustering/JBoss] - Problem with mod_jk and RichFaces/Seam js not finding js and
by todd.nash@gmail.com
Not sure if this is the best place to post this, but I only have this issue when I am trying to run clustered with an Apache front end to JBoss.
I am running an application built on Seam using standard Richfaces/Facelets components. Everything works fine when you talk to JBoss directly, however as soon as we hooked up Apache using mod_jk and try to forward to a single JBoss node (not clustered yet or loadbalanced) we get errors on the home page that some of the resources cannot be found:
17:17:32,953 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
org.ajax4jsf.resource.ResourceNotFoundException: Resource not registered : org.ajax4jsf.javascript.AjaxScript.seam ...
It appears that ".seam" is being appended to the javascript resource requests (not just the ajax ones) and some of the image requests (i.e. the page source shows the images for the tabs as images/theImage.gif.seam) . I don't have access to the server right now to give you the full error message, but it is similar to the one above.
Is there a setup issue I missed in the mod_jk setup or am I missing a context setting on the JBoss server?
Thanks for any help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111661#4111661
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111661
18 years, 4 months
[JBoss Seam] - Re: Question about SEAM booking example
by jbalunas@redhat.com
Take a look at the JPA example - that runs completely outside of a J2ee env and is a version of the booking example. There are also examples there for several different application containers.
As for how to get Mysql data source setup the easiest way might be to run seam gen and tell it that you are using mysql. Set what ever values you want for the other questions but answer the ones below. Check the seam-gen instructions for more information if needed.
| .....
| [input] What kind of database are you using? [mysql] (hsql, [mysql], oracle, postgres, mssql, db2, sybase, enterprisedb, )
|
| [input] Enter the Hibernate dialect for your database [org.hibernate.dialect.MySQLDialect] [org.hibernate.dialect.MySQLDialect]
|
| [input] Enter the filesystem path to the JDBC driver jar [lib/mysql.jar] [lib/mysql.jar]
|
| [input] Enter JDBC driver class for your database [com.mysql.jdbc.Driver] [com.mysql.jdbc.Driver]
|
| [input] Enter the JDBC URL for your database [jdbc:mysql:///youdbname] [jdbc:mysql:///yourdbname]
|
| [input] Enter database username [user] [user]
|
| [input] Enter database password [password] [password]
| .......
|
Then have seam-gen create a new project.
./seam new-project
Your options are then to use that generated project as a starting point, or extract from it the important bits for the mysql config (elements of persistence.xml and components.xml).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111659#4111659
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111659
18 years, 4 months
[JBoss AOP] - Re: [i]Introduction[/i] not working in my project but workin
by elysch
Hi, thank's for responding to my message
"stale.pedersen(a)jboss.org" wrote : hi, from what i can see in the errorlog it can find the class org.andromda.samples.aop.sades.domain.SolicitudProfesorGrupoDaoImpl.
| can you think of any reason why it says that it doesnt find the class?
It's strange. I can't figure out why it can't be found. If I comment the jboss-aop.xml contents, without changing any thing else, the error disappears. I taught maybe is a classpath thing, so I changed the manifest.mf file inside the aop file to include the SolicitudProfesorGrupoDaoImpl containing jar, but nothing changed. (Is that the Class-Path manifest information for?).
What I added to my aop module pom.xml file is:
<plugin>
| <groupId>org.apache.maven.plugins</groupId>
| <artifactId>maven-jar-plugin</artifactId>
| <configuration>
| <archive>
| <index>true</index>
| <manifest>
| <addClasspath>true</addClasspath>
| </manifest>
| <!-- manifestEntries>
| <mode>development</mode>
| <url>${pom.url}</url>
| <key>value</key>
| </manifestEntries -->
| </archive>
| </configuration>
| </plugin>
Without any luck.
If I understand it correctly, my introduction, should only add some messages in the create. So, I think it shouldn't work also without the introduction, but it does work without it.
"stale.pedersen(a)jboss.org" wrote : i cant see any jboss aop related messages in your log; do you precompile the introduction, or is it done at loadtime?
I first tried to do it pre-compiling, but it didn't work either. (Or maybe I was doing some thing wrong). Now I'm trying to do it at loadtime. That way, I think, I reduce some of the risk of configuration errors (I'm very, very, new to maven2), and I have the injboss example to base on.
"stale.pedersen(a)jboss.org" wrote : hm, if you deployed the injboss example in the same appserver and it worked its possibly only a packaging issue thats causing it, but im not sure. - im rambling a bit here, but if youre still stuck try to provide some more info and ill look into it.
Well yes, I am deploying both projects to the same appserver, and I'm also still stuck with it. Some thing is getting broken with the introduction. I can't find why/what
I really appreciate your help.
I'm not sure what else to say/post. I could send the source code (about 3M), or the ear file (about 10M)... what ever you ask me to. That way you could comment and uncomment the jboss-aop.xml contents (sades-1.0-SNAPSHOT.ear\sades-aop-1.0-SNAPSHOT.aop\META-INF\jboss-aop.xml) and see with your own eyes the error messages.
(I'm using JBoss 4.2.1GA, JBoss-AOP 1.5.6, Maven-2.0.5, Windows XP Pro. I have installed jdk1.5.0_13 and jdk1.6.0_03, I'm pretty sure the 1.6 jdk is the active one).
I don't know if it helps, but here I put the beginning of the related source files. These files work perfectly with the jboss-aop.xml commented contents. The last one is the one that doesn't get found with jboss-aop.xml uncommented contents.
// license-header java merge-point
| //
| // Attention: Generated code! Do not modify by hand!
| // Generated by: SpringDao.vsl in andromda-spring-cartridge.
| //
| package org.andromda.samples.aop.sades.domain;
|
| /**
| * @see org.andromda.samples.aop.sades.domain.SolicitudProfesorGrupo
| */
| public interface SolicitudProfesorGrupoDao
| {
| ...
// license-header java merge-point
| //
| // Attention: Generated code! Do not modify by hand!
| // Generated by: SpringHibernateDaoBase.vsl in andromda-spring-cartridge.
| //
| package org.andromda.samples.aop.sades.domain;
|
| /**
| * <p>
| * Base Spring DAO Class: is able to create, update, remove, load, and find
| * objects of type <code>org.andromda.samples.aop.sades.domain.SolicitudProfesorGrupo</code>.
| * </p>
| *
| * @see org.andromda.samples.aop.sades.domain.SolicitudProfesorGrupo
| */
| public abstract class SolicitudProfesorGrupoDaoBase
| extends org.springframework.orm.hibernate3.support.HibernateDaoSupport
| implements org.andromda.samples.aop.sades.domain.SolicitudProfesorGrupoDao
| {
| ...
// license-header java merge-point
| /**
| * This is only generated once! It will never be overwritten.
| * You can (and have to!) safely modify it by hand.
| */
| package org.andromda.samples.aop.sades.domain;
|
| import org.hibernate.Criteria;
| import org.hibernate.FetchMode;
| import org.hibernate.criterion.Restrictions;
|
| /**
| * @see org.andromda.samples.aop.sades.domain.SolicitudProfesorGrupo
| */
| public class SolicitudProfesorGrupoDaoImpl
| extends org.andromda.samples.aop.sades.domain.SolicitudProfesorGrupoDaoBase
| {
|
| public String stuff; // agregado para probar AOP
|
| public SolicitudProfesorGrupoDaoImpl()
| {
| super();
| System.out.println("------ADENTRO----- CREATE ORIGINAL");
| System.out.println("------ADENTRO----- CREATE ORIGINAL");
| }
| ...
(Note that the "------ADENTRO----- CREATE ORIGINAL" messages always appear in the JBoss console)
Thank you very much in advance.
(By the way, Before I decided to go to "loadtime" waving, I posted this message: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=125000
I discovered later on, that some of the error messages I was thinking to be responsible for the problem also appeared in the JBoss console without the aspects, but didn't updated the info on the message thread. I'm don't remember now exactly which ones.)
Ely
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111655#4111655
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111655
18 years, 4 months