AS 7.1.0 does not seem to be processing my webservices annotations
by Vimal Kansal
Hi,
I am trying to deploy a very simple webservice :
@WebService
public class Time {
@WebMethod(operationName="timeOfDay")
public String sayHello(String name){
return "Hello "+name;
}
}
I don't see AS 7.1.0 Alpha processing the annotations and deploying the
webservice.I am using standalone-preview.xml
Thx
Vimal
13 years, 7 months
Build Errors in web module
by Heiko Braun
Since last week, i get these build error within the web module:
https://gist.github.com/1088976
I nuked my maven repo, but the error seems to re-occur.
Couldn't yet figure out what dependency breaks it.
Has anybody else seen this?
Any idea what change might have caused this problem?
Ike
13 years, 7 months
EAR Classloading documentation seems to be in contradiction.
by Vimal Kansal
Hi,
It appears that EAR classloading documentation at
https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7 is in
contradiction with what "jboss-ee.xsd describes :
AS7 Doc version
==============
<subsystem xmlns="urn:jboss:domain:ee:1.0" >
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
</subsystem>
By default this is set to true, which means that sub deployments will be
able to see other non-war sub-deployments classes by default (i.e. a war
deployment's module will have a dependency on all other ejb-jar
sub-deployments, however it will not have a module dependency on any
other war deployments).
If this is set to false then no automatic dependencies are set up, they
must be setup manually with Class-Path entries, or by setting up
explicit module dependencies. This means that WARs (and other EJB jars)
do not have access to classes defined in an EJB jar unless an explicit
dependency is defined. The Java EE specification says that portable
applications should not rely on sub deployments having access to other
sub deployments that they do not have a Class-Path entry on, so portable
applications should always use Class-Path entry's to explicitly state
their dependencies.
jboss-ee.xsd version
==================
Flag indicating whether each of the subdeployments within a .ear can
access classes belonging to
another subdeployment within the same .ear. Setting
this to false, allows the subdeployments to
see classes belonging to other subdeployments
within the .ear.
For example:
myapp.ear
|
|--- web.war
|
|--- ejb1.jar
|
|--- ejb2.jar
If the ear-subdeployments-isolated is set to false,
then the classes in web.war can access classes
belonging to ejb1.jar and ejb2.jar. Similarly,
classes from ejb1.jar can access classes from ejb2.jar
(and vice-versa).
*Note that this flag, has no effect on the isolated
classloader of the .war file(s). i.e. irrespective
of whether this flag is set to true or false, the
.war within a .ear will have a isolated classloader
and other subdeployments within that .ear will not
be able to access classes from that .war. This is
as per spec*
Thx
Vimal
13 years, 7 months
Re: [jboss-as7-dev] Strange behaviour with messaging
by Jaikiran Pai
It's a bug with ConnectionFactory binding. The JMS bindings in 7.0 and
current upstream are buggy. As a workaround, edit the standalone-preview
to change this:
<entries>
<entry name="java:/ConnectionFactory"/>
</entries>
to this:
<entries>
<entry name="ConnectionFactory"/>
</entries>
(removed java:/ since it by default gets bound to java:/ namespace).
You'll then be able to inject the ConnectionFactory as follows:
@Resource(mappedName="java:/ConnectionFactory")
All these JMS bindings need to be fixed as part of
https://issues.jboss.org/browse/AS7-1210. I'll see if I spare sometime
tonight and come up with a patch.
-Jaikiran
On Tuesday 19 July 2011 11:14 AM, Vimal Kansal wrote:
> Hi JaiKiran,
>
> With change to mapped name for queue, I think it is getting resolved
> but ConnectionFactory object is still not getting resolved :
>
> 15:39:26,477 INFO [org.jboss.as.server.controller]
> (DeploymentScanner-threads - 1) Deployment of "Hello.war" was rolled
> back with failure message {"Services with missing/unavailable
> dependencies" =>
> ["jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\".jboss.deployment.unit.\"Hello.war\".module.Hello.Hello.2
> missing [ jboss.naming.context.java.ConnectionFactory
> ]","jboss.deployment.unit.\"Hello.war\".jndiDependencyService missing
> [
> jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\"
> ]","jboss.deployment.unit.\"Hello.war\".component.\"packt.HelloServlet\".START
> missing [
> jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\"
> ]"]}
> 15:39:26,490 INFO [org.jboss.as.server.deployment] (MSC service
> thread 1-2) Stopped deployment Hello.war in 14ms
> 15:39:26,493 ERROR [org.jboss.as.deployment]
> (DeploymentScanner-threads - 2) {"Composite operation failed and was
> rolled back. Steps that failed:" => {"Operation step-2" => {"Services
> with missing/unavailable dependencies" =>
> ["jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\".jboss.deployment.unit.\"Hello.war\".module.Hello.Hello.2
> missing [ jboss.naming.context.java.ConnectionFactory
> ]","jboss.deployment.unit.\"Hello.war\".jndiDependencyService missing
> [
> jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\"
> ]","jboss.deployment.unit.\"Hello.war\".component.\"packt.HelloServlet\".START
> missing [
> jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\"
> ]"]}}}
>
>
> On 19/07/2011 3:17 PM, Jaikiran Pai wrote:
>> Comments inline.
>>
>> On Tuesday 19 July 2011 10:41 AM, Vimal Kansal wrote:
>>> Hi,
>>>
>>> I have reported this earlier also, restating here. I am having some
>>> problem with using messaging and observing some strange behaviour with
>>> how messaging objects \ :
>>>
>>> (1) Can't deploy a simple .war file.
>>> =============================
>>> I have a simple servlet, in which I have injected messaging resources
>>> like this :
>>>
>>>
>>> @Resource(mappedName = "java:/ConnectionFactory")
>>> private QueueConnectionFactory queueConnectionFactory;
>>> @Resource(mappedName = "queue/test")
>>> private Queue queue;
>>>
>>> Also, I have added the following entr to WEB-INF/META-INF/MANIFEST.MF
>>>
>>> Dependencies: org.hornetq.ra
>>>
>>> When I deploy the .war, I get the following error :
>>>
>>> 15:01:24,984 INFO [org.jboss.as.server.controller]
>>> (DeploymentScanner-threads - 2) Deployment of "Hello.war" was rolled
>>> back with failure message {"Services with missing/unavailable
>>> dependencies" =>
>>> ["jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\".jboss.deployment.unit.\"Hello.war\".module.Hello.Hello.2
>>>
>>> missing [ jboss.naming.context.java.ConnectionFactory
>>> ]","jboss.deployment.unit.\"Hello.war\".jndiDependencyService missing [
>>> jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queue\",
>>>
>>> jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\"
>>>
>>> ]","jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queue\".jboss.deployment.unit.\"Hello.war\".module.Hello.Hello.3
>>>
>>> missing [ jboss.naming.context.java.module.Hello.Hello.env/queue/test
>>> ]","jboss.deployment.unit.\"Hello.war\".component.\"packt.HelloServlet\".START
>>>
>>> missing [
>>> ...
>>>
>> See this for the JNDI errors http://community.jboss.org/thread/168979.
>> Use mappedName="java:/queue/test" for now. Also see the referenced JIRA
>> in that thread https://issues.jboss.org/browse/AS7-1210.
>>
>>
>>
>>> (2) View of messaging resources from admin console is different from
>>> command line invocation of :jndi-view command
>>> ==========================================================================================================
>>>
>>>
>>> In admin console web app, I can see testQueue, testTopic and
>>> ConnectionFactory but when I run /subsystem=naming:jndi-view command
>>> from jboss-admin , these resources are not visible in JNDI tree.
>> Ideally, both the admin console and the CLI should end up using the same
>> operation to list the jndi-view. Probably that's not happening
>> currently. Will take a look later.
>>
>> -Jaikiran
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
13 years, 7 months
Support for jboss-app.xml
by Darran Lofthouse
I am currently looking at a user reported issue regarding the handling
(or not) of the jboss-app.xml in their ear.
I am assuming it is still supported as some values are used, the latest
version in the metadata project seems still related to JBoss 5. Should
there be a new version that is created for JBoss 7 for the elements
actually supported?
Regards,
Darran Lofthouse.
13 years, 7 months
Security Realm Configuration
by Heiko Braun
I was looking at the security related admin tasks again.
Wondering how the management of security realms could be represented
within the web interface.
Ideally users should be able to declare and manage security realms from the console
and then references these realms from subsystems that need to be secured:
- JMS
- Web Services
- HTTP/Servlet
- EJB
- Remoting
- JCA
- JDBC
I would need some help to bring al the pieces of the puzzle together.
Currently the security configuration for each subsystem is spread across
different schema files and it's very hard for me to get the full picture.
It seems that there is no documentation for the security subsystem either.
- How do I declare security realms? I can only fin examples for the management layer.
- What login modules exist for the security subsystem? How are they configured?
Ike
13 years, 7 months
validate-address warning
by Alexey Loubyansky
I just noticed that if validate-address has a negative result there is a
WARN in the server's log. Do we really need that?
I just realized that CLI may cause quite a lot of those.
[Host Controller] 13:34:50,256 WARN [org.jboss.as.controller]
(pool-3-thread-6) Operation ("validate-address") failed - address:
([("subsystem" => "messaging")])
Thanks,
Alexey
13 years, 7 months
Strange behaviour with messaging
by Vimal Kansal
Hi,
I have reported this earlier also, restating here. I am having some
problem with using messaging and observing some strange behaviour with
how messaging objects \ :
(1) Can't deploy a simple .war file.
=============================
I have a simple servlet, in which I have injected messaging resources
like this :
@Resource(mappedName = "java:/ConnectionFactory")
private QueueConnectionFactory queueConnectionFactory;
@Resource(mappedName = "queue/test")
private Queue queue;
Also, I have added the following entr to WEB-INF/META-INF/MANIFEST.MF
Dependencies: org.hornetq.ra
When I deploy the .war, I get the following error :
15:01:24,984 INFO [org.jboss.as.server.controller]
(DeploymentScanner-threads - 2) Deployment of "Hello.war" was rolled
back with failure message {"Services with missing/unavailable
dependencies" =>
["jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\".jboss.deployment.unit.\"Hello.war\".module.Hello.Hello.2
missing [ jboss.naming.context.java.ConnectionFactory
]","jboss.deployment.unit.\"Hello.war\".jndiDependencyService missing [
jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queue\",
jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\"
]","jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queue\".jboss.deployment.unit.\"Hello.war\".module.Hello.Hello.3
missing [ jboss.naming.context.java.module.Hello.Hello.env/queue/test
]","jboss.deployment.unit.\"Hello.war\".component.\"packt.HelloServlet\".START
missing [
jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\",
jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queue\"
]"]}
15:01:24,996 INFO [org.jboss.as.server.deployment] (MSC service thread
1-11) Stopped deployment Hello.war in 14ms
15:01:25,000 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads
- 1) {"Composite operation failed and was rolled back. Steps that
failed:" => {"Operation step-2" => {"Services with missing/unavailable
dependencies" =>
["jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\".jboss.deployment.unit.\"Hello.war\".module.Hello.Hello.2
missing [ jboss.naming.context.java.ConnectionFactory
]","jboss.deployment.unit.\"Hello.war\".jndiDependencyService missing [
jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queue\",
jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\"
]","jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queue\".jboss.deployment.unit.\"Hello.war\".module.Hello.Hello.3
missing [ jboss.naming.context.java.module.Hello.Hello.env/queue/test
]","jboss.deployment.unit.\"Hello.war\".component.\"packt.HelloServlet\".START
missing [
jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queueConnectionFactory\",
jboss.naming.context.java.module.Hello.Hello.\"env/packt.HelloServlet/queue\"
]"]}}}
(2) View of messaging resources from admin console is different from
command line invocation of :jndi-view command
==========================================================================================================
In admin console web app, I can see testQueue, testTopic and
ConnectionFactory but when I run /subsystem=naming:jndi-view command
from jboss-admin , these resources are not visible in JNDI tree.
I am seeing this behaviour in both AS7 final standalone-preview and
AS7.10 alpha snapshot standalone-preview.xml.
Thx
Vimal
13 years, 7 months
Packaging utility classes in an .ear
by Francesco Marchioni
Dear devs,
I'm testing .ear classloading with utility classes packaged in the
Enterprise Archive.
The following case test fails, so I'm wondering if it's my misundertanding
or a bug:
application.ear
|
| Webapplication.war
| Utility.jar
|
| META-INF/MANIFEST.MF
Manifest file contains the Java EE compliant dependency to the class
Utility.jar
Class-Path: Utility.jar
However, the Webapplication fails to load the classes from Utility.jar,
which are instead correctly pickedup if I move them into the ear's lib
folder.
As side note - I've tried also stating isolated deployments to false, in
jboss-deployment-structure.xml (which should default) without success:
<jboss-deployment-structure>
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
</jboss-deployment-structure>
Any suggestion?
Thanks a lot
Francesco
13 years, 7 months