Re: NoClassDefFoundError deploying on UNIX, not Windows

2008-10-23 Thread Dallas

Oh... how stupid... too much multitasking, posted on the wrong forum :-)

However, if someone by any chance happens to end up here while looking for
answers to a similar question,
I might aswell mention that the problem was that the application had been
deployed in ascii-mode instead of binary mode...


newton.dave wrote:
> 
> I'm not sure what the Struts portion of the question is; perhaps you could
> elaborate. Have you considered asking on a JBoss forum?
> 
> Dave
> 
> --- On Thu, 10/23/08, Dallas <[EMAIL PROTECTED]> wrote:
> 
>> From: Dallas <[EMAIL PROTECTED]>
>> Subject: NoClassDefFoundError deploying on UNIX, not Windows
>> To: user@struts.apache.org
>> Date: Thursday, October 23, 2008, 7:20 AM
>> Hi all!
>> 
>> I´m having some trouble deploying one of my application on
>> a Unix machine.
>> The application uses EJB3 beans, and the server log seems
>> to indicate that
>> Jboss (4.2.2) deployer cannot
>> find my EJB3 classes. How can this be? It works perfectly
>> when deployed on
>> windows.
>> 
>> I´ve seen some issues regarding class paths, and unix
>> being case sensetive,
>> but I haven´t been able to relate these errors to this
>> one. Might be wrong
>> though... 
>> 
>> Any clues? Please see the log below:
>> 
>> 2008-10-22 06:39:48,987 INFO 
>> [org.jboss.deployment.EARDeployer] Init J2EE
>> application:
>> file:/apps/jboss-4.2.2/server/default/deploy/SupplierDatabase.ear/
>> 2008-10-22 06:39:49,070 WARN 
>> [org.jboss.system.ServiceController] Problem
>> creating service
>> jboss.j2ee:service=EJB3,module=SupplierDatabaseEJB.jar
>> java.lang.NoClassDefFoundError:
>> se/ahlens/intranet/apps/supplierdatabase/CostAndErrorsFacadeLocal
>>  at java.lang.ClassLoader.defineClass1(Native Method)
>>  at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>>  at
>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>>  at
>> java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>>  at
>> java.net.URLClassLoader.access$000(URLClassLoader.java:56)
>>  at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>>  at java.security.AccessController.doPrivileged(Native
>> Method)
>>  at
>> java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>  at
>> org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:682)
>>  at
>> org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:662)
>>  at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>  at
>> org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:200)
>>  at
>> org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
>>  at
>> org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
>>  at
>> org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:527)
>>  at
>> org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
>>  at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>  at
>> org.jboss.ejb3.Ejb3AnnotationHandler.populateBaseInfo(Ejb3AnnotationHandler.java:293)
>>  at
>> org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:138)
>>  at
>> org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:486)
>>  at
>> org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:442)
>>  at
>> org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:423)
>>  at
>> org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:384)
>>  at
>> org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:327)
>>  at
>> org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:77)
>>  at
>> org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
>>  at
>> org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
>>  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown
>> Source)
>>  at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>  at java.lang.reflect.Method.invoke(Method.java:597)
>>  at
>> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>>  at
>> org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>>  at
>> org.jboss.mx.server.Invoca

NoClassDefFoundError deploying on UNIX, not Windows

2008-10-23 Thread Dallas

Hi all!

I´m having some trouble deploying one of my application on a Unix machine.
The application uses EJB3 beans, and the server log seems to indicate that
Jboss (4.2.2) deployer cannot
find my EJB3 classes. How can this be? It works perfectly when deployed on
windows.

I´ve seen some issues regarding class paths, and unix being case sensetive,
but I haven´t been able to relate these errors to this one. Might be wrong
though... 

Any clues? Please see the log below:

2008-10-22 06:39:48,987 INFO  [org.jboss.deployment.EARDeployer] Init J2EE
application:
file:/apps/jboss-4.2.2/server/default/deploy/SupplierDatabase.ear/
2008-10-22 06:39:49,070 WARN  [org.jboss.system.ServiceController] Problem
creating service jboss.j2ee:service=EJB3,module=SupplierDatabaseEJB.jar
java.lang.NoClassDefFoundError:
se/ahlens/intranet/apps/supplierdatabase/CostAndErrorsFacadeLocal
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at
org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:682)
at
org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:662)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at
org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:200)
at
org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
at
org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:527)
at
org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.jboss.ejb3.Ejb3AnnotationHandler.populateBaseInfo(Ejb3AnnotationHandler.java:293)
at
org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:138)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:486)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:442)
at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:423)
at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:384)
at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:327)
at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:77)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.create(Unknown Source)
at org.jboss.system.ServiceController.create(ServiceController.java:330)
at org.jboss.system.ServiceController.create(ServiceController.java:273)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy33.create(Unknown Source)
at org.jboss.ejb3.EJB3Deployer.create(EJB3Deployer.java:492)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.Del

"Exception invoking method destroy" on redeploy

2008-09-05 Thread Dallas

Hello!

I´m having troble whenever I redeploy my Struts 2 application on our Jboss
server 4.2.1.
I have to stop the server, reploy the application and then restart the
server.

I always get this same stacktrace.
Anyone had the same problem? What can I do to work around this problem?
See stacktrace below.

10:58:01,078 ERROR [BaseModelMBean] Exception invoking method destroy
java.lang.NoClassDefFoundError:
org/apache/struts2/util/ObjectFactoryDestroyable
at org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:257)
at
org.apache.struts2.dispatcher.FilterDispatcher.destroy(FilterDispatcher.java:221)
at
org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:332)
at
org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3755)
at 
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4515)
at 
org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1134)
at
org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4615)
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:297)
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:175)
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)
at org.jboss.web.WebModule.startService(WebModule.java:61)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy45.start(Unknown Source)
at 
org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at
org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
at
org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
at
org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
at
org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDep

Re: Actions, properties and validation in separate packages?

2008-07-07 Thread Dallas

Wow, you think like I think :-)

That´s exactly what I want, structure during development.
Thanks alot!


dusty wrote:
> 
> Do you really want them in separate packages or do you just want them in
> separate directories.  It seems to me that you are looking for a
> particular organization of files during development, so you can keep all
> the like files together.  Seems reasonable enough.  If that is the case
> then you can create a series of "src" directories that mirror the
> classpath but only hold particular files.  
> 
> So,
> 
> src/main/java/actions/se/intranet/apps/actions/myAction.java
> src/main/java/properties/se/intranet/apps/actions/myAction.properties
> src/main/java/validation/se/intranet/apps/actions/myAction-validation.xml
> 
> They all have the same packages and classpath, but they are organized how
> you think of them.   I thinkor you thinkor I think you think
> 
> 
> 
> Dallas wrote:
>> 
>> Hi all!
>> 
>> I´m wondering if there´s any way of configuring struts2 to allow 
>> me to keep actions, properties and validation in separate packages?
>> 
>> At the moment I have one packages, se.intranet.apps which includes
>> all my actions, properties and validations.
>> 
>> I´d rather keep them in separate packages, like
>> se.intranet.apps.actions
>> se.intranet.apps.properties
>> se.intranet.apps.validation
>> 
>> Any idea on how to do this?
>> I´ve tried reading up on localazation, but looking at 
>> http://struts.apache.org/2.0.6/docs/localization.html the documentation  
>> it doesn´t look possible...
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Actions%2C-properties-and-validation-in-separate-packages--tp18274471p18314783.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Actions, properties and validation in separate packages?

2008-07-04 Thread Dallas

Hi all!

I´m wondering if there´s any way of configuring struts2 to allow 
me to keep actions, properties and validation in separate packages?

At the moment I have one packages, se.intranet.apps which includes
all my actions, properties and validations.

I´d rather keep them in separate packages, like
se.intranet.apps.actions
se.intranet.apps.properties
se.intranet.apps.validation

Any idea on how to do this?
I´ve tried reading up on localazation, but looking at 
http://struts.apache.org/2.0.6/docs/localization.html the documentation  
it doesn´t look possible...
-- 
View this message in context: 
http://www.nabble.com/Actions%2C-properties-and-validation-in-separate-packages--tp18274471p18274471.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem extending ExceptionMappingInterceptor

2008-05-22 Thread Dallas

Hello!

Reposting here since the dev-list was not the correct one according Antonio.

I´m having some issues trying to extend the ExceptionMappingInterceptor.

The Struts 2 documentationen says that you can override the publishException
method, 
but I´m not having any luck in doing so, the method never gets called...

My interceptor:

package se.ahlens.intranet.apps;

---Imports here-

public class CustomInterceptor extends ExceptionMappingInterceptor {

@Override
protected void publishException(ActionInvocation invocation, ExceptionHolder
exceptionHolder) {
// Implement logging
super.publishException(invocation, exceptionHolder);
}

}

Struts.xml

struts>













-Actions here -




Anything wrong here?
My publishException never gets called...Dalla 
  
Posts: 1
Joined: Thu May 22, 2008 8:52 am 
Private message 
-- 
View this message in context: 
http://www.nabble.com/Problem-extending-ExceptionMappingInterceptor-tp17399582p17399582.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Indexed beans on a DynaValidatorActionForm

2005-12-21 Thread Vaughan, Dallas
Hi,
Here is my (simplified) setup:

struts-config.xml:



...












...


"order.edit" is a tiles-def that allows user editing of the order, which, when 
constructed, looks something like this:




  ...
  
  

...
  




The issue is, that if /saveLineItem is called and validation is successful, I 
can get the parameter values off of the request (which is of type 
org.apache.struts.upload.MultipartRequestWrapper), which include the lineItem 
property values.  However, if validation fails, there is no way to get these 
values off the request before they are lost, since the DynaValidatorActionForm 
doesn't support custom beans, and calling something like 
"request.getParameterValues("lineItem[0].property") returns null.  Overriding 
the "reset()" method also doesn't allow me to get the request parameters.  Why 
are the parameters getting lost?

Thanks,

Dallas Vaughan
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.1/206 - Release Date: 12/16/2005
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Indexed beans on a DynaValidatorActionForm

2005-12-20 Thread Vaughan, Dallas
Hi,
Here is my (simplified) setup:

struts-config.xml:



...












...


"order.edit" is a tiles-def that allows user editing of the order, which, when 
constructed, looks something like this:




  ...
  
  

...
  




The issue is, that if /saveLineItem is called and validation is successful, I 
can get the parameter values off of the request (which is of type 
org.apache.struts.upload.MultipartRequestWrapper), which include the lineItem 
property values.  However, if validation fails, there is no way to get these 
values off the request before they are lost, since the DynaValidatorActionForm 
doesn't support custom beans, and calling something like 
"request.getParameterValues("lineItem[0].property") returns null.  Overriding 
the "reset()" method also doesn't allow me to get the request parameters.  Why 
are the parameters getting lost?

Thanks,

Dallas Vaughan
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.1/206 - Release Date: 12/16/2005
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]