[Installation, Configuration & DEPLOYMENT] - deployment for Spring web app fails
by MikePhoenix
When I try to deploy my web app, the deployment fails.. The following appears to be the main cause of the failure. Does anybody have any idea what the problem may be? It looks like it might have something to do with Namimg/JNDI. I have also included the code that uses JNDI for rmi calls to EJBs below the error messages.
17:39:11,084 ERROR [[/BurnsideWeb]] Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
java.lang.IncompatibleClassChangeError: Class org.jnp.server.NamingServer does not implement the requested interface org.jnp.interfaces.Naming
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:774)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.sun.faces.config.WebConfiguration.processJndiEntries(WebConfiguration.java:532)
at com.sun.faces.config.WebConfiguration.(WebConfiguration.java:105)
at com.sun.faces.config.WebConfiguration.getInstance(WebConfiguration.java:158)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:144)
at org.jboss.web.jsf.integration.config.JBossJSFConfigureListener.contextInitialized(JBossJSFConfigureListener.java:71)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
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:597)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
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:597)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
at org.jboss.web.WebModule.startModule(WebModule.java:83)
/*
| * To change this template, choose Tools | Templates
| * and open the template in the editor.
| */
|
| package com.lingosys.burnside.api;
|
| import java.util.*;
|
| import org.apache.log4j.*;
|
| import com.attask.api.*;
| import com.attask.beans.api.*;
|
| /**
| * Reformats AtTask project name
| * @author mphoenix
| */
| public class NameConverter {
| // Constants
| private static final Logger LOG = LogManager.getLogger(NameConverter.class);
|
| // Fields
| /** AtTask uses its own session IDs */
| protected static String _sessionID = null;
|
| /** Provides access to the information AtTask stores in its sessions */
| protected static SessionAttributesBean _sessionAttributes;
|
| /** Implements the EJB calls */
| protected static API _api;
|
| /** AtTask uses a special int value to represent "null" */
| protected static int _intNull;
|
| public String go(String id) {
|
| try {
| // Connect to server.
| Properties props = System.getProperties();
| props.setProperty("java.naming.provider.url", "jnp://192.168.1.206:1099");
| props.setProperty("java.naming.provider.port", "8080");
| props.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
| props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming.client");
| props.setProperty("jnp.socketFactory", "org.jnp.interfaces.TimedSocketFactory");
| props.setProperty("jnp.timeout", "0");
| props.setProperty("jnp.sotimeout", "0");
| System.setProperties(props);
| APISupport.init(props);
| _api = APISupport.getAPI();
|
| // Login.
| String username = props.getProperty("test.username", "admin");
| String password = props.getProperty("test.password", "triSfm0tp");
| LOG.info("Logging in to web service");
| _sessionID = _api.login(username, password);
| _sessionAttributes = _api.getSessionAttributes(_sessionID);
| _intNull = _sessionAttributes.getIntNull();
|
| int projectID = new Integer(id).intValue();
| ProjectBean pb = _api.getProjectByProjectID(_sessionID, projectID);
| String projectName = pb.getName();
| pb.setName(id + " " + projectName);
| _api.editProject(_sessionID, pb);
|
| }
| catch (AtTaskAPIException atae) {
| LOG.error(atae.getMsg());
| LOG.error(atae.getCallStack());
| return "failure";
| }
| catch (Exception x) {
| LOG.error(x.getMessage());
| x.printStackTrace();
| return "failure";
| }
| finally {
| if (_sessionID != null) {
| try {
| LOG.info("Cleaning up");
|
| // Logout
| _api.logout(_sessionID);
| }
| catch (Exception x) {
| x.printStackTrace();
| return "failure";
| }
| }
| }
|
| LOG.info("Finished");
|
| return "success";
| }
|
|
| }
|
|
|
| /*
| * Copyright (c) 2007 AtTask, Inc.
| *
| * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
| * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
| * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
| * permit persons to whom the Software is furnished to do so, subject to the following conditions:
| *
| * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
| * Software.
| *
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
| * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
| * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
| * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| */
| package com.lingosys.attask;
|
| import com.attask.api.*;
|
| import com.attask.beans.api.NameValueBean;
|
| import javax.ejb.CreateException;
| import javax.naming.InitialContext;
| import javax.naming.NamingException;
| import javax.rmi.PortableRemoteObject;
| import java.rmi.RemoteException;
| import java.util.*;
|
| /**
| * Helper class to get API objects from the @task server
| * THIS CODE SHOULD NOT BE ALTERED
| */
| public class APISupport {
|
| private static InitialContext __iniCtx;
| private static API __api;
|
| /**
| * Default init method that will use properties files such as jndi.properties found in the CLASSPATH
| **/
| public static void init() {
| Properties props = System.getProperties();
| init(props);
| }
|
| /**
| * init method sets default system properties accepts hostname as argument
| * @param hostname String name of host AtTask is located on
| **/
| public static void init(String hostname) {
| Properties props = System.getProperties();
| props.setProperty("java.naming.provider.url", hostname + ":1099");
| // props.setProperty("java.naming.provider.port", "8080");
| props.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
| props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming.client");
| props.setProperty("jnp.socketFactory", "org.jnp.interfaces.TimedSocketFactory");
| props.setProperty("jnp.timeout", "0");
| props.setProperty("jnp.sotimeout", "0");
| init(props);
| }
|
| /**
| * init method to use if jndi.properties files would be in conflict with the Java client CLASSPATH
| * @param props Properties - system properties
| **/
| public static void init(Properties props) {
| try {
| __iniCtx = new InitialContext(props);
|
| } catch (NamingException nme) {
| nme.printStackTrace();
| }
| }
|
| //////////////////////////////////////////////////
| // Interfaces
| public static API getAPI(){
| try{
| // API. Because this is a Stateless Session Bean, we can cache the instance we are using
| if( __api != null ) return __api;
| Object obj = __iniCtx.lookup(APIHome.JNDI_NAME);
| APIHome apiHome = (APIHome) PortableRemoteObject.narrow(obj, APIHome.class);
| __api = apiHome.create();
| return __api;
| } catch (NamingException nme){
| nme.printStackTrace();
| } catch (CreateException ce){
| ce.printStackTrace();
| } catch (RemoteException re){
| re.printStackTrace();
| } catch (Throwable t){
| t.printStackTrace();
| }
|
| return null;
| }
|
| /**
| * Gets the {@link com.attask.api.PagedListAPI} class.
| */
| public static PagedListAPI getPagedListAPI(){
| try{
| // PagedList API cannot be cached as a Stateful Session Bean retains state per instance
| Object obj = __iniCtx.lookup(PagedListAPIHome.JNDI_NAME);
| PagedListAPIHome apiHome = (PagedListAPIHome) PortableRemoteObject.narrow(obj, PagedListAPIHome.class);
| return (PagedListAPI) apiHome.create();
| } catch (NamingException nme){
| nme.printStackTrace();
| } catch (CreateException ce){
| ce.printStackTrace();
| } catch (RemoteException re){
| re.printStackTrace();
| } catch (Throwable t){
| t.printStackTrace();
| }
|
| return null;
| }
|
| public static FlashAPI getFlashAPI() {
| try {
| Object obj = __iniCtx.lookup(FlashAPIHome.JNDI_NAME);
| FlashAPIHome apiHome = (FlashAPIHome) PortableRemoteObject.narrow(obj, FlashAPIHome.class);
| return apiHome.create();
| } catch (Throwable t) {
| t.printStackTrace();
| }
| return null;
| }
|
|
| /**
| * Convenient utility class for converting a Map to a NameValuePair[] used for searching
| *
| * @param map Map with String->Object or String->String[] mapping
| * @return array of {@see com.attask.beans.api.NameValueBean} objects
| */
| public static NameValueBean[] convertToNameValueBeans(Map map) {
| if (map == null || map.size() == 0) return new NameValueBean[]{};
|
| // Because the Map can have either String or String[], we need to use a List to get the all before conversion
| List list = new ArrayList();
| for (Iterator it = map.keySet().iterator(); it.hasNext();) {
| String name = (String) it.next();
| Object o = map.get(name);
| if (o == null) continue;
| if (o instanceof String[]) {
| String[] array = (String[]) o;
| for (int i = 0; i < array.length; i++) {
| list.add(getNameValueBean(name, array));
| }
| } else {
| list.add(getNameValueBean(name, o.toString()));
| }
| }
|
| // convert List back to NameValueBean[]
| NameValueBean[] ret = new NameValueBean[list.size()];
| for (int i = 0; i < list.size(); i++) {
| ret = (NameValueBean) list.get(i);
| }
|
| return ret;
| }
|
| protected static NameValueBean getNameValueBean(String name, String value) {
| NameValueBean nvb = new NameValueBean();
| nvb.setName(name);
| nvb.setValue(value);
| return nvb;
| }
|
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4234027#4234027
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4234027
16 years, 5 months
[JBoss jBPM] - Re: Fork/Join Problem
by freak182
As promised here is my jbpm.cfg.xml
| <jbpm-configuration>
|
| <!--
| This configuration is used when there is no jbpm.cfg.xml file found in the
| root of the classpath. It is a very basic configuration without persistence
| and message services. Only the authorization service installed.
| You can parse and create processes, but when you try to use one of the
| unavailable services, you'll get an exception.
| -->
|
| <jbpm-context>
| <service name="persistence">
| <factory>
| <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
| <field name="isCurrentSessionEnabled"><true/></field>
| <field name="isTransactionEnabled"><true/></field>
| </bean>
| </factory>
| </service>
| <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
| <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
| <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
| <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
| <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
| </jbpm-context>
|
| <!-- configuration property used by persistence service impl org.jbpm.persistence.db.DbPersistenceServiceFactory
| <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" />
| -->
| <!-- configuration resource files pointing to default configuration files in jbpm-{version}.jar -->
| <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
| <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
| <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
| <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
| <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
| <string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
| <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
| <string name="resource.mail.templates" value="jbpm.mail.templates.xml" />
|
| <!-- class loading -->
| <!-- <string name="jbpm.classLoader" value="jbpm" />
| <string name="jbpm.customClassLoader.className" value="com...MyClassLoaderUtil" />
| <bean name="jbpm.processClassLoader" class="org.jbpm.instantiation.DefaultProcessClassLoaderFactory" singelton="true" />-->
|
| <!-- make sure the block size matches the length in ByteArray.hbm.xml -->
| <int name="jbpm.byte.block.size" value="1024" singleton="true" />
| <bean name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
| <bean name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
| <string name="jbpm.mail.smtp.host" value="192.168.1.1" />
| <bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
| <string name="jbpm.mail.from.address" value="test(a)test.com.ph" />
|
| <bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor">
| <field name="jbpmConfiguration"><ref bean="jbpmConfiguration" /></field>
| <field name="name"><string value="JbpmJobExecutor" /></field>
| <field name="nbrOfThreads"><int value="2" /></field>
| <field name="idleInterval"><int value="5000" /></field>
| <field name="maxIdleInterval"><int value="3600000" /></field> <!-- 1 hour -->
| <field name="historyMaxSize"><int value="20" /></field>
| <field name="maxLockTime"><int value="600000" /></field> <!-- 10 minutes -->
| <field name="lockMonitorInterval"><int value="60000" /></field> <!-- 1 minute -->
| <field name="lockBufferTime"><int value="5000" /></field> <!-- 5 seconds -->
| </bean>
|
| </jbpm-configuration>
|
Thanks a lot.
Cheers.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4234024#4234024
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4234024
16 years, 5 months
[Beginners Corner] - JBoss Portal suitability
by mad_rug
Hi,
I'm currently developing a web application, I just stumbled on JBoss Portal, and I'd like to know if it can suit my needs.
I'm the only IT person in this project (so far), and I'm designing it on request of the project creator. So, I'm doing a lot of research on how to do so much stuff I never had to do myself before, since it is being developed by me from scratch (great for learning). I made the public site for it, and we were about to start discussing the private (autenticated and secured) part of the site, a commercial site which will feature multiple users, which will order custom hardware, and other special users will get their orders and execute them (this is our business, for short).
I was looking for ways of performing good authentication when a link led me to Portal project. I recognize the style from sites like iGoogle, and thought that it might provide a good support for me. It would avoid things like coding servlets to handle auth, navigation and such. The downside is that it looks like a too rich (and maybe heavy) for the relatively few number of features I'll need... things like registering calendar events, taking an order, submitting an order, handling admin business params.
With Portal, I'd create a dozen or so portlets to handle the business, I guess.
I was glad to know about other projects like JBoss Cache, which will save me a lot of future reinvention of the wheel. But then I ask if I'll do a nice move using Portal, as another more suited framework could help me for that.
I know it is a very generic question, but my knowledge of such tools and frameworks is quite short, and I may be missing something good.
Anybody know of another alternative for this case?
If I was not clear or I could provide more details, just say.
Thanks!
PS: in case it makes any difference, our environment so far is JBoss App Server 4.2 and MySQL database
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4234019#4234019
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4234019
16 years, 5 months