Error while deploying cruisecontrol.war in jboss 6 - jboss6.x

I tried deploying cruisecontrol.war in jboss6. But it is shown deploying error like this.:
java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "net.sf.saxon.pull.PullToStax.getNamespaceContext()Ljavax/xml/namespace/Names
paceContext;" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, net/sf/saxon/pull/PullToStax, and the class loader (instance of <bootloader>) for interface javax/xml/stream/XMLStreamReader have different Class objects for the type javax/xml/namespace/NamespaceContext used in the signature
Please help.

There seems to be a problem with classloading, please check if you have a conflict between the jar/war in the JBoss and jar in your classpath.

Related

Hazelcast user code deployment with Jcache

I have a hazelcast Member that uses Jcache. I am using CacheLoader and CacheWriter for Jcache.
On another member that is clustering, I am getting an exception that one of the Jcache CacheLoader classes can't be loaded. The cacheloader is defined as an internal private static class.
Below is what my usercode deployment config looks like on both members.
<user-code-deployment enabled="true">
<class-cache-mode>ETERNAL</class-cache-mode>
<provider-mode>LOCAL_CLASSES_ONLY</provider-mode>
</user-code-deployment>
The exception I get is:
com.hazelcast.nio.serialization.HazelcastSerializationException: java.lang.ClassNotFoundException: Failed to load class app.cache.HzAuthCacheManagerImpl$DefaultCacheLoader from other members.
at com.hazelcast.internal.serialization.impl.JavaDefaultSerializers$JavaSerializer.read(JavaDefaultSerializers.java:83)
at com.hazelcast.internal.serialization.impl.JavaDefaultSerializers$JavaSerializer.read(JavaDefaultSerializers.java:72)
Caused by: java.lang.ClassNotFoundException: Failed to load class app.cache.HzAuthCacheManagerImpl$DefaultCacheLoader from other members.
at com.hazelcast.internal.usercodedeployment.impl.ClassLocator.tryToGetClassFromRemote(ClassLocator.java:157)
at com.hazelcast.internal.usercodedeployment.impl.ClassLocator.handleClassNotFoundException(ClassLocator.java:95)
at com.hazelcast.internal.usercodedeployment.UserCodeDeploymentService.handleClassNotFoundException(UserCodeDeploymentService.java:89)
I don't get any exception on the member that has HzAuthCacheManagerImpl defined.
Is there anything wrong in my configuration or something else is needed to get usercode deployment working with JCache?

Broaleaf 5.2 ROOT.war issue with Filters

I am trying to deploy Broadleaf demo site version 5.2.0 on external tomcat 8.5.16 with MYSQL as DB and standalone external Solr server running on port 8983.
I am able to access the admin application.
When I try deploying the ROOT.war, I get error
12-Aug-2017 16:33:52.733 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.filterStart Exception starting
filter [blDeviceResolverRequestFilter]
javax.naming.NameNotFoundException: Name [blDeviceResolver] is not bound
in this Context. Unable to find [blDeviceResolver].
I tried creating a bean so that it autowires correctly in
BroadleafDeviceResolverRequestFilter as
#Bean(name="blDeviceResolver")
public DeviceResolver getDeviceResolver() {
return new LiteDeviceResolver();
}
But the error is still the same and I am unable to run the demo application.
So the issues was that class BroadleafDeviceResolverRequestFilter was using
#Resource
private DeviceResolver deviceResolver;
But #Resource annotation is generic and means different things to Tomcat and Spring (Reference: Spring Boot WAR deployed in Tomcat 7 tries to perform weird automatic #Resource lookup)
I replaced #Resource with #Autowired and added a bean to com.community.core.config.CoreConfig
#Bean(name="blDeviceResolver")
public DeviceResolver getDeviceResolver() {
return new LiteDeviceResolver();
}
and my issue was resolved.

hybris Cache is not alive error

I am using hybris version 5.5.1, I have done modulegen and done all the configuration in localextention.xml, now when I started the hybris server (. ./hybrisserver.sh) and getting the below error.
ERROR [localhost-startStop-1] [DeploymentMigrationUtil] Error while migrating deployments of extension core
java.lang.IllegalStateException: The queryCacheRegion Cache is not alive (STATUS_SHUTDOWN)
at net.sf.ehcache.Cache$CacheStatus.checkAlive(Cache.java:4075)
at net.sf.ehcache.Cache.checkStatus(Cache.java:2766)
Have a look at the snippet below, this is taken from the stacktrace that you shared.
**Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [my.bookstore.cockpits.setup.CockpitSystemSetup] for bean with name 'yAcceleratorCockpitsSystemSetup' defined in org.springframework.integration.security.config.SecurityIntegrationConfigurationInitializer#4091564b; nested exception is java.lang.ClassNotFoundException: my.bookstore.cockpits.setup.CockpitSystemSetup**
at org.springframework.integration.security.config.SecurityIntegrationConfigurationInitializer.initialize(SecurityIntegrationConfigurationInitializer.java:63)
at org.springframework.integration.config.IntegrationConfigurationBeanFactoryPostProcessor.postProcessBeanFactory(IntegrationConfigurationBeanFactoryPostProcessor.java:48)
... 29 more
Caused by: java.lang.ClassNotFoundException: my.bookstore.cockpits.setup.CockpitSystemSetup
Now, please check for this bean initialization in your spring context, due to java.lang.ClassNotFoundException: my.bookstore.cockpits.setup.CockpitSystemSetup
Look for the bean initialization where the bean injection of this class is declared, and make sure that the qualified name of the class is correct.
Let me know if the issue still persists.

Why is taking too long to respond to Websphere the first time I invoke a SOAP Web Service (JAX-WS)?

I am using Websphere 8.5.5 and I've noted that my first call to a JAX-WS Web Services takes too long to respond. I get this in the LOG (trace level) and after 15 mins it works. I have EclipseLink MOXy as a JAXB provider
jaxb.properties:
javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory
javax.xml.bind.JAXBException:
Exception Description: Name collision. Two classes have the XML type with uri http://www.w3.org/2001/XMLSchema and name string.
- with linked exception:
[Exception [EclipseLink-50007] (Eclipse Persistence Services - 2.4.2.qualifier): org.eclipse.persistence.exceptions.JAXBException
Exception Description: Name collision. Two classes have the XML type with uri http://www.w3.org/2001/XMLSchema and name string.]
Well, after a lot of research I've found that it seems to be a bug of Websphere because it adds some array classes to the JAXB Context for example (byte[], int[], String[]) the problem is that when it adds String[] to the list of classes for the JAXB Context MOXy can't handle and gives that error.
The good news is that it can be solved by adding a custom property into the "Generic JVM arguments" since Websphere >= 8.5.5.2
Servers > Server Types > WebSphere application servers > server_name >
Java and Process Management > Process definition > Java Virtual
Machine >Generic JVM arguments
-Dcom.ibm.websphere.webservices.jaxwsOptimizeLevelOne=true
In the following resources it doesn't say it does that but after checking JAXBContext creation in EclipseLink you can see that it doesn't send anymore those array classes thus solving the problem.
More information on this:
https://publib.boulder.ibm.com/httpserv/cookbook/WebSphere_Application_Server-WAS_Classic-Web_Services.html
http://www-01.ibm.com/support/docview.wss?uid=swg1PI14203
Log trace to detect how much time it takes to create JAXBContext on Websphere can be activated specifying this log level:
com.ibm.ws.websvcs.JAXBContextTrace=all
[7/7/16 16:34:28:908 CDT] 00000089 JAXBContextTr 3
org.apache.axis2.jaxws.message.databinding.JAXBUtils getJAXBContext
new JAXBContext constructed, elapsed time msec: 1035

Unity 3.5 not resolving controllers

I have taken the following example code from the Unity documentation, and yet a basic controller can't be instantiated with a service implementation as a required constructor dependency.
public static void RegisterTypes(IUnityContainer container)
{
container.RegisterTypes(
AllClasses.FromLoadedAssemblies(),
WithMappings.FromMatchingInterface,
WithName.TypeName,
WithLifetime.ContainerControlled);
}
This gives the error Exception information:
Exception type: ResolutionFailedException Exception message:
Resolution of the dependency failed, type =
"[XXX].Controllers.HomeController", name = "(none)". Exception
occurred while: Calling constructor
Microsoft.Practices.Unity.InterceptionExtension.PolicyInjectionBehavior(Microsoft.Practices.Unity.InterceptionExtension.CurrentInterceptionRequest
interceptionRequest,
Microsoft.Practices.Unity.InterceptionExtension.InjectionPolicy[]
policies, Microsoft.Practices.Unity.IUnityContainer container).
Exception is: ArgumentException - Type passed must be an interface
This is an MVC5 application and i have the latest Nuget packages for Unity and the bootstrapper
in order to get this working we switched the WithName parameter to use Default as the passed value.

Resources