[JBoss/Spring Integration] - Re: Spring Component Auto Detection
by alesj
"khoerder" wrote :
| In my opinion, such issues should be fixed in JBoss or Spring, but not by customers using these two wide-spread frameworks! - I'd rather use another application sever than fixing these kind of things for production use, making version upgrades a potential problem.
|
Sure, I completely agree with you.
It's just that I'm not aware of all things you can do.
I definitely need to update the tests a bit.
btw: WEB-INF is really not by the spec for cl resources ;-)
"khoerder" wrote :
| Would it be possible to talk to the people developing Spring directly, so that these issues can be solved in on of the next releases (of either JBoss or Spring)?
|
There was/is a JIRA, so they know about the issue.
But as you can see, it's been Deferred, what ever that means for them ...
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213444#4213444
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4213444
17 years, 1 month
[JBoss Tools (users)] - Re: Correct Eclipse project type for SAR?
by bmelloni
I am still stumped. No matter what I try, no files get placed in archive.
I have tried:
- Created as either General and Java projects
- Included all the JARs into the libraries and OrderAndExport.
- From ProjectArchives created a New Archive of type JAR. Set it to exploded, with an extension of .sar. Used a folder in the workspace for the archive (outside of the project).
The folder structure is trivial:
/<jars here>
/META-INF/jboss-service.xml
Nothing gets placed in the archive folder, and nothing gets published to server.
Obviously I am missing a critical point that is utterly obvious to someone who's used jBoss Tools for a long time. Folder structure? Project Type? Some special non-default Eclipse setting setting? Secret handshake?
Help please? I'd really like to 'publish' my SAR projects like all other projects. Publishing SARs by copying the files to the server 'by hand' is annoying.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213441#4213441
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4213441
17 years, 1 month
[JNDI/Naming/Network] - Re: Name not Bound
by bacooper81
Thanks for the feedback. I looked up the namespaces, and my beans did not appear in them. However, I did see an entry for shadows.ear and Shadows.war. I double checked the ear file, and it definitely contains shadows.jar. So why would its beans not be bound to any namespace?
Here are some snippets from my jndi tree:
java:comp namespace of the shadows.ear/Shadows.war application:
|
| +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
| +- ORB (class: org.jacorb.orb.ORB)
| +- env (class: org.jnp.interfaces.NamingContext)
| | +- security (class: org.jnp.interfaces.NamingContext)
| | | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)
java:comp namespace of the Shadows.war application:
|
| +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
| +- ORB (class: org.jacorb.orb.ORB)
| +- env (class: org.jnp.interfaces.NamingContext)
| | +- security (class: org.jnp.interfaces.NamingContext)
| | | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)
java: Namespace
|
| +- jaas (class: javax.naming.Context)
| | +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
| | +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
| | +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
| +- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
| +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
| +- JBossCorbaNaming (class: org.omg.CosNaming.NamingContextExt)
| +- DefaultDS (class: javax.sql.DataSource)
| +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
| +- TransactionManager (class: org.jboss.tm.TxManager)
| +- JBossCorbaPOA (class: org.omg.PortableServer.POA)
| +- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
| +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
| +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
| +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
| +- JBossCorbaInterfaceRepositoryPOA (class: org.omg.PortableServer.POA)
| +- Mail (class: javax.mail.Session)
| +- JBossCorbaORB (class: org.omg.CORBA.ORB)
| +- timedCacheFactory (class: javax.naming.Context)
| Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration
| +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
| +- comp (class: javax.naming.Context)
|
|
| Global JNDI Namespace
|
| +- HASessionState (class: org.jnp.interfaces.NamingContext)
| | +- Default (class: org.jboss.ha.hasessionstate.server.HASessionStateImpl)
| +- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
| +- jmx (class: org.jnp.interfaces.NamingContext)
| | +- invoker (class: org.jnp.interfaces.NamingContext)
| | | +- RMIAdaptor (proxy: $Proxy50 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
| | +- rmi (class: org.jnp.interfaces.NamingContext)
| | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
| +- JAXR (class: org.apache.ws.scout.registry.ConnectionFactoryImpl)
| +- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
| +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
| +- UserTransactionSessionFactory (proxy: $Proxy12 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
| +- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
| +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
| +- invokers (class: org.jnp.interfaces.NamingContext)
| | +- HQWS263 (class: org.jnp.interfaces.NamingContext)
| | | +- iiop (class: org.jboss.invocation.iiop.IIOPInvoker)
| +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
| +- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
| +- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
| +- HAPartition (class: org.jnp.interfaces.NamingContext)
| | +- DefaultPartition (class: org.jboss.ha.framework.server.HAPartitionImpl)
| +- topic (class: org.jnp.interfaces.NamingContext)
| | +- testDurableTopic (class: org.jboss.mq.SpyTopic)
| | +- testTopic (class: org.jboss.mq.SpyTopic)
| | +- securedTopic (class: org.jboss.mq.SpyTopic)
| +- queue (class: org.jnp.interfaces.NamingContext)
| | +- A (class: org.jboss.mq.SpyQueue)
| | +- testQueue (class: org.jboss.mq.SpyQueue)
| | +- ex (class: org.jboss.mq.SpyQueue)
| | +- DLQ (class: org.jboss.mq.SpyQueue)
| | +- D (class: org.jboss.mq.SpyQueue)
| | +- C (class: org.jboss.mq.SpyQueue)
| | +- B (class: org.jboss.mq.SpyQueue)
| +- console (class: org.jnp.interfaces.NamingContext)
| | +- PluginManager (proxy: $Proxy51 implements interface org.jboss.console.manager.PluginManagerMBean)
| +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
| +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
| +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
| +- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair)
| +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213436#4213436
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4213436
17 years, 1 month
[JBoss/Spring Integration] - Re: Spring Component Auto Detection
by khoerder
Hi,
the issue remains with JBoss 5.0.1.GA and Spring 2.5.6. No problem with JBoss 4.x.
We have a web application and initialize the spring context with a ContextLoaderListener (referenced in web.xml). The spring-beans-config (in the classpath) uses "context:component-scan".
For a spring DispatcherServlet, an extra config-file must be provided in the /WEB-INF/ directory.
Depending on the type of deployment (exploded vs. war), the stack trace is
java.io.FileNotFoundException: URL [vfsfile:/C:/dev/jboss-5.0.1.GA/server/default/deploy/exportmanager-server.war/WEB-INF/classes/de/bafa/] cannot be resolved to absolute file path because it does not reside in the file system: vfsfile:/C:/dev/jboss-5.0.1.GA/server/default/deploy/exportmanager-server.war/WEB-INF/classes/de/bafa/
at org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:201)
at org.springframework.core.io.UrlResource.getFile(UrlResource.java:156)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.doFindPathMatchingFileResources(PathMatchingResourcePatternResolver.java:517)
at org.springframework.web.context.support.ServletContextResourcePatternResolver.doFindPathMatchingFileResources(ServletContextResourcePatternResolver.java:80)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:342)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:263)
at org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1018)
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:182)
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:201)
at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84)
...
or
2009-02-26 14:09:45,578 DEBUG [org.springframework.core.io.support.PathMatchingResourcePatternResolver] (HDScanner) Cannot search for matching files underneath URL [vfszip:/C:/dev/jboss-5.0.1.GA/server/default/deploy/exportmanager-server.war/WEB-INF/classes/de/bafa/] because it does not correspond to a directory in the file system
java.io.FileNotFoundException: URL [vfszip:/C:/dev/jboss-5.0.1.GA/server/default/deploy/exportmanager-server.war/WEB-INF/classes/de/bafa/] cannot be resolved to absolute file path because it does not reside in the file system: vfszip:/C:/dev/jboss-5.0.1.GA/server/default/deploy/exportmanager-server.war/WEB-INF/classes/de/bafa/
at org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:198)
at org.springframework.core.io.UrlResource.getFile(UrlResource.java:156)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.doFindPathMatchingFileResources(PathMatchingResourcePatternResolver.java:517)
at org.springframework.web.context.support.ServletContextResourcePatternResolver.doFindPathMatchingFileResources(ServletContextResourcePatternResolver.java:80)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:342)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:263)
at org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1019)
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:177)
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:201)
at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:85)
The fix provided in Spring 2.5.6 had no effect (see http://jira.springframework.org/browse/SPR-5120).
The code provided in http://anonsvn.jboss.org/repos/jbossas/trunk/spring-int/src/main/org/jbos... solved the problem for the spring-beans-config in the classpath, but then the config-file in /WEB-INF/ was not found anymore.
Temporary fix for our issue:
1. Overwrite the spring-class "XmlWebApplicationContext":
| protected ResourcePatternResolver getResourcePatternResolver() {
| return new VFSResourcePatternResolver(this);
| }
|
| public Resource getResource(String location) {
| Assert.notNull(location, "Location must not be null");
| if (location.startsWith(CLASSPATH_URL_PREFIX)) {
| return new ClassPathResource(location
| .substring(CLASSPATH_URL_PREFIX.length()), getClassLoader());
| } else {
| try {
| // Try to parse the location as a URL...
| URL url = new URL(location);
| VirtualFile file = VFS.getRoot(url);
| return new VFSResource(file);
| } catch (Exception ex) {
| return new ServletContextResource(getServletContext(), location);
| }
| }
| }
|
2. Check out the files from http://anonsvn.jboss.org/repos/jbossas/trunk/spring-int/src/main/org/jbos... and modify class "VFSResourcePatternResolver" in the following way:
| public VFSResourcePatternResolver(ResourceLoader resourceLoader)
| {
| super(resourceLoader);
| }
|
The point here is to use VFSResourcePatternResolver but wrap the path for the /WEB-INF/-file as a ServletContextResource.
In my opinion, such issues should be fixed in JBoss or Spring, but not by customers using these two wide-spread frameworks! - I'd rather use another application sever than fixing these kind of things for production use, making version upgrades a potential problem.
Would it be possible to talk to the people developing Spring directly, so that these issues can be solved in on of the next releases (of either JBoss or Spring)?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213429#4213429
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4213429
17 years, 1 month