[JBoss JIRA] Created: (JBRULES-2975) Cannot use constant from Enum declared in class any more
by Wolfgang Laun (JIRA)
Cannot use constant from Enum declared in class any more
---------------------------------------------------------
Key: JBRULES-2975
URL: https://issues.jboss.org/browse/JBRULES-2975
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler
Affects Versions: 5.2.0.M2
Reporter: Wolfgang Laun
Assignee: Mark Proctor
Priority: Critical
Note that this was running with a build made around 2011-02-10!
Given the class
public class Triangle {
public enum Type {
INCOMPLETE, UNCLASSIFIED,
EQUILATERAL, ISOSCELES, RECTANGLED, ISOSCELES_RECTANGLED, ACUTE, OBTUSE;
}
private int alpha;
private int beta;
private int gamma;
private Type type;
public Triangle( int alpha, int beta ) {
this.alpha = alpha;
this.beta = beta;
this.type = Type.UNCLASSIFIED;
}
// getters, setter,...
}
and the rule
rule equilateral
when
$t: Triangle( type == Triangle.Type.UNCLASSIFIED,
alpha == beta && == gamma )
then
modify( $t ){ setType( Triangle.Type.EQUILATERAL ) }
end
this fails with
Exception in thread "main" org.drools.RuntimeDroolsException: [Error: object is not an instance of declaring class]
[Near : {... Triangle.Type.UNCLASSIFIED ....}]
^
[Line: 1, Column: 1]
at org.drools.rule.ReturnValueRestriction.isAllowed(ReturnValueRestriction.java:258)
at org.drools.rule.VariableConstraint.isAllowed(VariableConstraint.java:103)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:134)
at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:450)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:378)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:185)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:143)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:332)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:293)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:905)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:864)
at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:251)
at rss.drools.setup.Application.insert(Application.java:141)
at ex4.Main.makeFacts(Main.java:35)
at rss.drools.setup.Application.execute(Application.java:83)
at ex4.Main.main(Main.java:40)
Caused by: [Error: object is not an instance of declaring class]
[Near : {... Triangle.Type.UNCLASSIFIED ....}]
^
[Line: 1, Column: 1]
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:427)
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:140)
at org.mvel2.ast.ASTNode.optimize(ASTNode.java:158)
at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:115)
at org.mvel2.MVELRuntime.execute(MVELRuntime.java:87)
at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:125)
at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:118)
at org.mvel2.MVEL.executeExpression(MVEL.java:954)
at org.drools.base.mvel.MVELReturnValueExpression.evaluate(MVELReturnValueExpression.java:88)
at org.drools.rule.ReturnValueRestriction.isAllowed(ReturnValueRestriction.java:247)
... 15 more
Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getBeanProperty(ReflectiveAccessorOptimizer.java:514)
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:335)
... 24 more
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month
[JBoss JIRA] (AS7-3162) RESTEasy: Unknown servet name javax.ws.rs.core.Application when javax.ws.rs.core.Application subclass is on classpath
by Pavel Janousek (Commented) (JIRA)
[ https://issues.jboss.org/browse/AS7-3162?page=com.atlassian.jira.plugin.s... ]
Pavel Janousek commented on AS7-3162:
-------------------------------------
Wait, wait, I've in mind a bit another case(s)...
Stuart refers from 2.3.2 section of JAX-RS 1.1. specs, right...
I think actual implementation in RESTEasy doesn't conform to JAX-RS specs in fully manner., I'll try to cover them after investigation and verifying.
At first: Do you agree that servlet-name *org.jboss.as.test.integration.jaxrs.deployments.ApplicatonEmptyWithoutAOP* should be added by the RESTEasy in this case:
Application impl:{code}package org.jboss.as.test.integration.jaxrs.deployments;
import java.util.HashSet;
import java.util.Set;
import javax.ws.rs.core.Application;
public class ApplicationEmptyWithoutAOP extends Application {
private Set<Class<?>> classes = new HashSet<Class<?>>();
public ApplicationEmptyWithoutAOP() {
}
@Override
public Set<Class<?>> getClasses() {
return classes;
}
}
{code} and deployment contain only{code:xml}
<?xml version=1.0 encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" metadata-complete="false">
<servlet-mapping>
<servlet-name>org.jboss.as.test.integration.jaxrs.deployments.ApplicatonEmptyWithoutAOP</servlet-name>
<url-pattern>/myjaxrs/*</url-pattern>
</servlet-mapping>
</web-app>
{code} and only packages in WAR this Application, TestCase and SimpleHelloResource... - so no AOP, nor mixing mapping etc.
This deployment fails with "Context [/jaxrsnoap_without_aop] startup failed due to previous errors: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name org.jboss.as.test.integration.jaxrs.deployments.ApplicatonEmptyWithoutAOP" too. I'm writting now only about requirements in 2.3.2 section, nothing else...
Also 2.3.2 section cases 2 and 3 don't avoid to define javax.ws.rs.Application (the same as in the case when Application subclass isn't present) at all when it isn't defined in web.xml yet - I think this request doesn't break the specs too.
What do you think about these cases?
> RESTEasy: Unknown servet name javax.ws.rs.core.Application when javax.ws.rs.core.Application subclass is on classpath
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: AS7-3162
> URL: https://issues.jboss.org/browse/AS7-3162
> Project: Application Server 7
> Issue Type: Bug
> Components: REST
> Affects Versions: 7.1.0.CR1b
> Reporter: Pavel Janousek
> Assignee: Weinan Li
> Priority: Blocker
>
> I've deployment like this:
> {code}
> @Deployment
> public static Archive<?> deploy() {
> WebArchive war = ShrinkWrap.create(WebArchive.class, "jaxrsnoap.war");
> war.addPackage(HttpRequest.class.getPackage());
> war.addClasses(ApplicationTestCase.class, ApplicationInvalid1.class);
> war.addAsWebInfResource(
> WebXml.get("<servlet-mapping>\n"
> + " <servlet-name>javax.ws.rs.core.Application</servlet-name>\n"
> + " <url-pattern>/myjaxrs/*</url-pattern>\n"
> + "</servlet-mapping>\n" + "\n"), "web.xml");
> return war;
> }
> {code}
> This deployment fails during deploying because of "Context [/jaxrsnoap] startup failed due to previous errors: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name javax.ws.rs.core.Application"
> ApplicationInvalid1 is empty subclass of javax.ws.rs.core.Application like:
> {code}
> public class ApplicationInvalid1 extends Application {
> private Set<Class<?>> classes = new HashSet<Class<?>>();
> public ApplicationInvalid1() {
> }
> @Override
> public Set<Class<?>> getClasses() {
> return classes;
> }
> }
> {code}
> There isn't any reference to this class in web.xml or somewhere else. Only class is placed on classpath. If I remove this class from deployment (= change appropriate line to "war.addClasses(ApplicationTestCase.class);", everything will be OK.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month
[JBoss JIRA] (JBRULES-3327) Weird exception thrown: java.lang.ClassCastException: org.drools.reteoo.InitialFactImpl cannot be cast to XXX...
by Miles Wen (Created) (JIRA)
Weird exception thrown: java.lang.ClassCastException: org.drools.reteoo.InitialFactImpl cannot be cast to XXX...
-----------------------------------------------------------------------------------------------------------------
Key: JBRULES-3327
URL: https://issues.jboss.org/browse/JBRULES-3327
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.3.0.Final
Environment: jdk 1.6u27, ubuntu linux 11.04
Reporter: Miles Wen
Assignee: Mark Proctor
This code throws exception at runtime, with default settings:
rule "out"
when
l1:Msg(str == 'test') and
l2:Msg(!bool) or
eval(!false)
then
end
which throws:
org.drools.RuntimeDroolsException: Unexpected exception executing action org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction@ef894ce
at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:977)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:315)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:291)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:886)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:845)
at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:255)
at com.sample.DroolsTest.main(DroolsTest.java:51)
Caused by: org.drools.RuntimeDroolsException: com.sample.Rule_outEval0Invoker@3e1b05a2 : java.lang.ClassCastException: org.drools.reteoo.InitialFactImpl cannot be cast to com.sample.Msg
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:119)
at org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:178)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:197)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:146)
at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:158)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:215)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:244)
at org.drools.reteoo.Rete.assertObject(Rete.java:107)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:284)
at org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction.execute(ReteooWorkingMemory.java:404)
at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:975)
... 6 more
Caused by: java.lang.ClassCastException: org.drools.reteoo.InitialFactImpl cannot be cast to com.sample.Msg
at com.sample.Rule_outEval0Invoker.evaluate(Unknown Source)
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
... 17 more
P.S: 'Msg' is an arbitrary pojo fact defined by user.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month
[JBoss JIRA] (AS7-3189) Infinispan caches should be accessible via jndi.
by Paul Ferraro (Created) (JIRA)
Infinispan caches should be accessible via jndi.
------------------------------------------------
Key: AS7-3189
URL: https://issues.jboss.org/browse/AS7-3189
Project: Application Server 7
Issue Type: Bug
Components: Clustering
Affects Versions: 7.1.0.CR1b, 7.0.0.CR1
Reporter: Paul Ferraro
Assignee: Paul Ferraro
Priority: Critical
Fix For: 7.1.0.Final
Since cache configurations are no longer defined when the EmbeddedCacheManagerService is started, but after, by a separate CacheConfigurationService, Cache instances need to be accessible via jndi. Otherwise an application that tries to access a cache via an injected CacheContainer (via jndi), can easily encounter a race condition, where the cache has not yet been defined.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month
[JBoss JIRA] (AS7-3162) RESTEasy: Unknown servet name javax.ws.rs.core.Application when javax.ws.rs.core.Application subclass is on classpath
by Stuart Douglas (Commented) (JIRA)
[ https://issues.jboss.org/browse/AS7-3162?page=com.atlassian.jira.plugin.s... ]
Stuart Douglas commented on AS7-3162:
-------------------------------------
This is incorrect. According to the JAX-RS spec
{code}
<servlet-name>javax.ws.rs.core.Application</servlet-name>
{code}
is the portable and correct way to do it. Using HttpServlet30Dispatcher is a non-portable resteasy specific mechanism, that is not supported in AS7.
See section 2.3.2 of the JAX-RS 1.1 spec.
> RESTEasy: Unknown servet name javax.ws.rs.core.Application when javax.ws.rs.core.Application subclass is on classpath
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: AS7-3162
> URL: https://issues.jboss.org/browse/AS7-3162
> Project: Application Server 7
> Issue Type: Bug
> Components: REST
> Affects Versions: 7.1.0.CR1b
> Reporter: Pavel Janousek
> Assignee: Weinan Li
> Priority: Blocker
>
> I've deployment like this:
> {code}
> @Deployment
> public static Archive<?> deploy() {
> WebArchive war = ShrinkWrap.create(WebArchive.class, "jaxrsnoap.war");
> war.addPackage(HttpRequest.class.getPackage());
> war.addClasses(ApplicationTestCase.class, ApplicationInvalid1.class);
> war.addAsWebInfResource(
> WebXml.get("<servlet-mapping>\n"
> + " <servlet-name>javax.ws.rs.core.Application</servlet-name>\n"
> + " <url-pattern>/myjaxrs/*</url-pattern>\n"
> + "</servlet-mapping>\n" + "\n"), "web.xml");
> return war;
> }
> {code}
> This deployment fails during deploying because of "Context [/jaxrsnoap] startup failed due to previous errors: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name javax.ws.rs.core.Application"
> ApplicationInvalid1 is empty subclass of javax.ws.rs.core.Application like:
> {code}
> public class ApplicationInvalid1 extends Application {
> private Set<Class<?>> classes = new HashSet<Class<?>>();
> public ApplicationInvalid1() {
> }
> @Override
> public Set<Class<?>> getClasses() {
> return classes;
> }
> }
> {code}
> There isn't any reference to this class in web.xml or somewhere else. Only class is placed on classpath. If I remove this class from deployment (= change appropriate line to "war.addClasses(ApplicationTestCase.class);", everything will be OK.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month
[JBoss JIRA] (AS7-3162) RESTEasy: Unknown servet name javax.ws.rs.core.Application when javax.ws.rs.core.Application subclass is on classpath
by Weinan Li (Commented) (JIRA)
[ https://issues.jboss.org/browse/AS7-3162?page=com.atlassian.jira.plugin.s... ]
Weinan Li commented on AS7-3162:
--------------------------------
I've checked the code and found too many tests are relying on assuming JAX_RS_SERVLET_NAME = 'javax.ws.rs.core.Application', and unfortunately they are hardcoded as string value instead of using parameters. So I won't touch this part, currently I'll only add the detection for conflicted usages of @Application and javax.ws.rs.core.Application.
> RESTEasy: Unknown servet name javax.ws.rs.core.Application when javax.ws.rs.core.Application subclass is on classpath
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: AS7-3162
> URL: https://issues.jboss.org/browse/AS7-3162
> Project: Application Server 7
> Issue Type: Bug
> Components: REST
> Affects Versions: 7.1.0.CR1b
> Reporter: Pavel Janousek
> Assignee: Weinan Li
> Priority: Blocker
>
> I've deployment like this:
> {code}
> @Deployment
> public static Archive<?> deploy() {
> WebArchive war = ShrinkWrap.create(WebArchive.class, "jaxrsnoap.war");
> war.addPackage(HttpRequest.class.getPackage());
> war.addClasses(ApplicationTestCase.class, ApplicationInvalid1.class);
> war.addAsWebInfResource(
> WebXml.get("<servlet-mapping>\n"
> + " <servlet-name>javax.ws.rs.core.Application</servlet-name>\n"
> + " <url-pattern>/myjaxrs/*</url-pattern>\n"
> + "</servlet-mapping>\n" + "\n"), "web.xml");
> return war;
> }
> {code}
> This deployment fails during deploying because of "Context [/jaxrsnoap] startup failed due to previous errors: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name javax.ws.rs.core.Application"
> ApplicationInvalid1 is empty subclass of javax.ws.rs.core.Application like:
> {code}
> public class ApplicationInvalid1 extends Application {
> private Set<Class<?>> classes = new HashSet<Class<?>>();
> public ApplicationInvalid1() {
> }
> @Override
> public Set<Class<?>> getClasses() {
> return classes;
> }
> }
> {code}
> There isn't any reference to this class in web.xml or somewhere else. Only class is placed on classpath. If I remove this class from deployment (= change appropriate line to "war.addClasses(ApplicationTestCase.class);", everything will be OK.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month
[JBoss JIRA] (AS7-3162) RESTEasy: Unknown servet name javax.ws.rs.core.Application when javax.ws.rs.core.Application subclass is on classpath
by Weinan Li (Commented) (JIRA)
[ https://issues.jboss.org/browse/AS7-3162?page=com.atlassian.jira.plugin.s... ]
Weinan Li commented on AS7-3162:
--------------------------------
Pavel, I believe "private static final String JAX_RS_SERVLET_NAME = "javax.ws.rs.core.Application";" has confused you about the RESTEasy usage.
Stuart, maybe we could change this one to something like String JAX_RS_SERVLET_NAME = "jaxrs_servlet" or "jaxrs_http_servlet_dispatcher"?
> RESTEasy: Unknown servet name javax.ws.rs.core.Application when javax.ws.rs.core.Application subclass is on classpath
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: AS7-3162
> URL: https://issues.jboss.org/browse/AS7-3162
> Project: Application Server 7
> Issue Type: Bug
> Components: REST
> Affects Versions: 7.1.0.CR1b
> Reporter: Pavel Janousek
> Assignee: Weinan Li
> Priority: Blocker
>
> I've deployment like this:
> {code}
> @Deployment
> public static Archive<?> deploy() {
> WebArchive war = ShrinkWrap.create(WebArchive.class, "jaxrsnoap.war");
> war.addPackage(HttpRequest.class.getPackage());
> war.addClasses(ApplicationTestCase.class, ApplicationInvalid1.class);
> war.addAsWebInfResource(
> WebXml.get("<servlet-mapping>\n"
> + " <servlet-name>javax.ws.rs.core.Application</servlet-name>\n"
> + " <url-pattern>/myjaxrs/*</url-pattern>\n"
> + "</servlet-mapping>\n" + "\n"), "web.xml");
> return war;
> }
> {code}
> This deployment fails during deploying because of "Context [/jaxrsnoap] startup failed due to previous errors: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name javax.ws.rs.core.Application"
> ApplicationInvalid1 is empty subclass of javax.ws.rs.core.Application like:
> {code}
> public class ApplicationInvalid1 extends Application {
> private Set<Class<?>> classes = new HashSet<Class<?>>();
> public ApplicationInvalid1() {
> }
> @Override
> public Set<Class<?>> getClasses() {
> return classes;
> }
> }
> {code}
> There isn't any reference to this class in web.xml or somewhere else. Only class is placed on classpath. If I remove this class from deployment (= change appropriate line to "war.addClasses(ApplicationTestCase.class);", everything will be OK.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month
[JBoss JIRA] (AS7-3162) RESTEasy: Unknown servet name javax.ws.rs.core.Application when javax.ws.rs.core.Application subclass is on classpath
by Weinan Li (Commented) (JIRA)
[ https://issues.jboss.org/browse/AS7-3162?page=com.atlassian.jira.plugin.s... ]
Weinan Li commented on AS7-3162:
--------------------------------
btw, using <servlet-name>javax.ws.rs.core.Application</servlet-name> in servlet mapping is incorrect. HttpServlet30Dispatcher should be used for servlet part if you are using web.xml to config.
> RESTEasy: Unknown servet name javax.ws.rs.core.Application when javax.ws.rs.core.Application subclass is on classpath
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: AS7-3162
> URL: https://issues.jboss.org/browse/AS7-3162
> Project: Application Server 7
> Issue Type: Bug
> Components: REST
> Affects Versions: 7.1.0.CR1b
> Reporter: Pavel Janousek
> Assignee: Weinan Li
> Priority: Blocker
>
> I've deployment like this:
> {code}
> @Deployment
> public static Archive<?> deploy() {
> WebArchive war = ShrinkWrap.create(WebArchive.class, "jaxrsnoap.war");
> war.addPackage(HttpRequest.class.getPackage());
> war.addClasses(ApplicationTestCase.class, ApplicationInvalid1.class);
> war.addAsWebInfResource(
> WebXml.get("<servlet-mapping>\n"
> + " <servlet-name>javax.ws.rs.core.Application</servlet-name>\n"
> + " <url-pattern>/myjaxrs/*</url-pattern>\n"
> + "</servlet-mapping>\n" + "\n"), "web.xml");
> return war;
> }
> {code}
> This deployment fails during deploying because of "Context [/jaxrsnoap] startup failed due to previous errors: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name javax.ws.rs.core.Application"
> ApplicationInvalid1 is empty subclass of javax.ws.rs.core.Application like:
> {code}
> public class ApplicationInvalid1 extends Application {
> private Set<Class<?>> classes = new HashSet<Class<?>>();
> public ApplicationInvalid1() {
> }
> @Override
> public Set<Class<?>> getClasses() {
> return classes;
> }
> }
> {code}
> There isn't any reference to this class in web.xml or somewhere else. Only class is placed on classpath. If I remove this class from deployment (= change appropriate line to "war.addClasses(ApplicationTestCase.class);", everything will be OK.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month