[Installation, Configuration & DEPLOYMENT] - Re: TRACE level doesn't work
by jaikiran
Can you post the contents of your log4j.properties file? And also the code from where you are logging the TRACE level logs (if at all that class belongs to your application).
Also, to make sure that your log4j.properties (which you mention is in a SAR) is indeed being picked up, edit the run.bat file (assuming you are on Windows OS) under %JBOSS_HOME%/bin to pass -Dlog4j.debug as a JVM parameter:
anonymous wrote : set JAVA_OPTS=%JAVA_OPTS% -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dlog4j.debug
Log4j prints out information about the location from where it picks up the log4j.xml/log4j.properties file. Keep an watch on the console and the server.log file for this information. You might see something like:
| log4j: Trying to find [log4j.xml] using context classloader org.jboss.system.server.NoAnnotationURLClassLoader@c9ba38.
| log4j: Trying to find [log4j.xml] using org.jboss.system.server.NoAnnotationURLClassLoader@c9ba38 class loader.
| log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource().
| log4j: Trying to find [log4j.properties] using context classloader org.jboss.system.server.NoAnnotationURLClassLoader@c9ba38.
| log4j: Using URL [jar:file:/D:/JBoss-4.2.2/jboss-4.2.2.GA/bin/run.jar!/log4j.properties] for automatic log4j configuration.
| log4j: Reading configuration from URL jar:file:/D:/JBoss-4.2.2/jboss-4.2.2.GA/bin/run.jar!/log4j.properties
| log4j: Parsing for [root] with value=[DEBUG, FILE, CONSOLE].
| log4j: Level token is [DEBUG].
| log4j: Category root set to DEBUG
| log4j: Parsing appender named "FILE".
| log4j: Parsing layout options for "FILE".
| log4j: Setting property [conversionPattern] to [%d{ABSOLUTE} %-5p [%c{1}] %m%n].
| log4j: End of parsing for "FILE".
| log4j: Setting property [append] to [false].
| log4j: Setting property [file] to [D:\JBoss-4.2.2\jboss-4.2.2.GA\server\jaikiran\log/boot.log].
| log4j: setFile called: D:\JBoss-4.2.2\jboss-4.2.2.GA\server\jaikiran\log/boot.log, false
| log4j: setFile ended
| log4j: Parsed "FILE" options.
| log4j: Parsing appender named "CONSOLE".
| log4j: Parsing layout options for "CONSOLE".
| log4j: Setting property [conversionPattern] to [%d{ABSOLUTE} %-5p [%c{1}] %m%n].
| log4j: End of parsing for "CONSOLE".
| log4j: Setting property [threshold] to [INFO].
| log4j: Setting property [target] to [System.out].
| log4j: Parsed "CONSOLE" options.
| log4j: Finished configuring.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125142#4125142
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125142
18 years, 2 months
[JBoss Portal] - Re: Clear/reset render parameters or re-initialise all portl
by Antoine_h
Yeah !
that's great.
using the interceptor is nice.
just clearing the other portlets navigationnal state is not clean job (JSR is shouting : "don't do that !"... but...).
nice example of how to use the interceptors to plug a behavior around the portlets engine and commands...
thanks for reporting this solution.
about IPC, the global way of doing this is to have a communication mean between the several parts of the application.
so they can communicate with each other : the portal pieces (portlets, portal main engine),
as well as backoffice application that are behind the portlets.
you can use the HttpSession for that, but this is not really meant for this.
or you can use some messaging. This is a quite heavy solution, but the most reliable and clean architecture.
your solution is enough for this need... so the best...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125134#4125134
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125134
18 years, 2 months
[JBoss Seam] - Re: FlushModeType.MANUAL in conversation
by Lundegaard
See the posted code below to see how to validate the input.
| /**
| * @author Thomas Maerz (thomas.maerz(a)primedo.com)
| */
| @Name("userHome")
| public class UserHome extends EntityHome<User> {
|
| private static final long serialVersionUID = 1L;
|
| @In
| UserDao userDao;
|
| public void validateUsername(FacesContext context, UIComponent component, Object value) throws ValidatorException {
| User user = userDao.getByUsername((String) value);
| if (user == null || user.getId().equals(getInstance().getId())) {
| return;
| }
| throw new ValidatorException(new FacesMessage(""));
| }
| }
|
edit.html
| <s:decorate template="/templates/edit.html">
| <ui:define name="label">Username</ui:define>
| <h:inputText value="#{userHome.instance.username}" validator="#{userHome.validateUsername}" required="true"/>
| </s:decorate>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125131#4125131
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125131
18 years, 2 months
[Installation, Configuration & DEPLOYMENT] - Errors when the Jboss server starts
by rodosa
Hello!!
I have some problems when the Jboss server starts. Could someone what's wrong? Because I've looking for the solution but I don't get nothing that helps me.
This is one of the errors reported. I only put the first lines because It's too long
|
| 2008-01-31 12:51:41,399 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:
|
| --- Packages waiting for a deployer ---
| org.jboss.deployment.DeploymentInfo@477faab3 { url=file:/C:/jbpm/jbpm-jpdl-3.2.2/server/server/jbpm/deploy/jbpm-console/META-INF/MANIFEST.MF }
| deployer: null
| status: null
| state: INIT_WAITING_DEPLOYER
| watch: file:/C:/jbpm/jbpm-jpdl-3.2.2/server/server/jbpm/deploy/jbpm-console/META-INF/MANIFEST.MF
| altDD: null
| lastDeployed: 1201780300337
| lastModified: 1201780300337
| mbeans:
|
| org.jboss.deployment.DeploymentInfo@cbb725fb { url=file:/C:/jbpm/jbpm-jpdl-3.2.2/server/server/jbpm/deploy/jbpm-console/WEB-INF/access.properties }
| deployer: null
| status: null
| state: INIT_WAITING_DEPLOYER
| watch: file:/C:/jbpm/jbpm-jpdl-3.2.2/server/server/jbpm/deploy/jbpm-console/WEB-INF/access.properties
| altDD: null
| lastDeployed: 1201780300337
| lastModified: 1201780300337
| mbeans:
|
| org.jboss.deployment.DeploymentInfo@7134709e { url=file:/C:/jbpm/jbpm-jpdl-3.2.2/server/server/jbpm/deploy/jbpm-console/WEB-INF/classes/com/miApp/UserBean.class }
| deployer: null
| status: null
| state: INIT_WAITING_DEPLOYER
| watch: file:/C:/jbpm/jbpm-jpdl-3.2.2/server/server/jbpm/deploy/jbpm-console/WEB-INF/classes/com/miApp/UserBean.class
| altDD: null
| lastDeployed: 1201780300337
| lastModified: 1201780300337
| mbeans:
|
|
These are the rest of errors!!! I supposed that I've a bad configuration of web.xml & faces-config.xml files
| 2008-01-31 13:42:45,671 ERROR [STDERR] 31-ene-2008 13:42:45 com.sun.faces.config.ConfigureListener contextInitialized
| INFO: Initializing Sun's JavaServer Faces implementation (1.2_03-b09-FCS) for context 'null'
| 2008-01-31 13:42:46,203 ERROR [STDERR] 31-ene-2008 13:42:46 com.sun.faces.spi.InjectionProviderFactory createInstance
| ADVERTENCIA: JSF1033: Resource injection is DISABLED.
| 2008-01-31 13:42:46,453 ERROR [STDERR] 31-ene-2008 13:42:46 com.sun.faces.config.ConfigureListener registerELResolverAndListenerWithJsp
| GRAVE: Error Instantiating ExpressionFactory
| java.lang.ClassNotFoundException: com.sun.el.ExpressionFactoryImpl
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:169)
| at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:1606)
| at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:455)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
|
Thanks for your help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125128#4125128
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125128
18 years, 2 months
[JBoss Seam] - Re: Facelet Templates from a Database
by Lundegaard
I am using a similar code to access templates from another webapp, but the sample DatabaseResourceResolver shows you the basis:
| import java.io.ByteArrayInputStream;
| import java.io.IOException;
| import java.io.InputStream;
| import java.net.MalformedURLException;
| import java.net.URL;
| import java.net.URLConnection;
| import java.net.URLStreamHandler;
|
| import com.sun.facelets.impl.DefaultResourceResolver;
|
| /**
| * @author Thomas Maerz (thomas.maerz(a)primedo.com)
| */
| public class DatabaseResourceResolver extends DefaultResourceResolver {
|
| @Override
| public URL resolveUrl(String path) {
| URL url = super.resolveUrl(path);
| if (url != null) {
| return url;
| }
|
| try {
| return new URL("internal", null, 0, path, getHandler(path));
| } catch (MalformedURLException e) {
| }
| return null;
| }
|
| private static URLStreamHandler getHandler(final String path) {
|
| return new URLStreamHandler() {
|
| @Override
| protected URLConnection openConnection(URL url) throws IOException {
| return new URLConnection(url) {
|
| @Override
| public void connect() throws IOException {
| }
|
| @Override
| public InputStream getInputStream() throws IOException {
| // Connect to Database and return your content
| return new ByteArrayInputStream(new byte[] {});
| }
|
| };
| }
|
| };
|
| }
|
| }
|
web.xml
| <context-param>
| <param-name>facelets.RESOURCE_RESOLVER</param-name>
| <param-value>DatabaseResourceResolver</param-value>
| </context-param>
|
Facelets file
| <ui:composition
| xmlns:ui="http://java.sun.com/jsf/facelets"
| template="/cms/some/path/index.html">
|
But there are some pitfalls:
- Facelets will cache the the returned URL with the path as key
- You have to handle reloading yourself (Override getLastModified() in URLConnection)
- return valid XML
Hope that helps,
Tom
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125126#4125126
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125126
18 years, 2 months