[JBoss JIRA] (WFLY-9643) Getting Internal server error on exception if the rest service content type is "application/xml"
by Marek Kopecký (JIRA)
[ https://issues.jboss.org/browse/WFLY-9643?page=com.atlassian.jira.plugin.... ]
Marek Kopecký updated WFLY-9643:
--------------------------------
Steps to Reproduce:
1) create a rest service
{code:java}
@RestController
@RequestMapping({"security/testController"})
public class TestController
{
@RequestMapping(value={"/applicationList"}, method={org.springframework.web.bind.annotation.RequestMethod.GET}, headers={"Accept=application/xml"} , produces=MediaType.APPLICATION_JSON_VALUE)
public TreeDataProvider getListOfApplication()
{
return new TreeDataProvider();
}
}
{code}
2) Create a Spring interceptor and throw an exception
3) create a spring exception handler to return exception as json
was:
1) create a rest service
@RestController
@RequestMapping({"security/testController"})
public class TestController
{
@RequestMapping(value={"/applicationList"}, method={org.springframework.web.bind.annotation.RequestMethod.GET}, headers={"Accept=application/xml"} , produces=MediaType.APPLICATION_JSON_VALUE)
public TreeDataProvider getListOfApplication()
{
return new TreeDataProvider();
}
}
2) Create a Spring interceptor and throw an exception
3) create a spring exception handler to return exception as json
> Getting Internal server error on exception if the rest service content type is "application/xml"
> ------------------------------------------------------------------------------------------------
>
> Key: WFLY-9643
> URL: https://issues.jboss.org/browse/WFLY-9643
> Project: WildFly
> Issue Type: Bug
> Components: REST
> Reporter: Gopal krishna
> Assignee: Alessio Soldano
>
> We are getting Internal server error if any exception is thrown from spring interceptor when rest API header is set as "application/xml". This works if the rest API header is set as "application/json".
> we didnt see this issue in jboss 7 and WAS
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months
[JBoss JIRA] (WFCORE-3484) Nonintuitive error message when for loop is used inside of if/try/batch constructs
by Jean-Francois Denise (JIRA)
[ https://issues.jboss.org/browse/WFCORE-3484?page=com.atlassian.jira.plugi... ]
Jean-Francois Denise moved WFLY-9621 to WFCORE-3484:
----------------------------------------------------
Project: WildFly Core (was: WildFly)
Key: WFCORE-3484 (was: WFLY-9621)
Component/s: CLI
(was: CLI)
Affects Version/s: 4.0.0.Alpha5
(was: 11.0.0.Final)
> Nonintuitive error message when for loop is used inside of if/try/batch constructs
> ----------------------------------------------------------------------------------
>
> Key: WFCORE-3484
> URL: https://issues.jboss.org/browse/WFCORE-3484
> Project: WildFly Core
> Issue Type: Bug
> Components: CLI
> Affects Versions: 4.0.0.Alpha5
> Reporter: Erich Duda
> Assignee: Jean-Francois Denise
>
> CLI enables to use for loop construct for looping over commands or operations. See WFCORE-3236 for details. Because of design limitations of CLI, using of for loop is not supported inside of if, try, for and batch constructs. However if you try to do that, error message is not intuitive in all cases and it is difficult to find out why the code does not work.
> Let's see on real examples.
> {code:title=Using for inside if}
> [standalone@embedded /] if (outcome != success) of /system-property=test:read-resource
> [standalone@embedded /] for propName in :read-children-names(child-type=system-property)
> [standalone@embedded /] echo $propName
> Unrecognized variable propName
> {code}
> As you can see in the example, when you write aforementioned commands into the CLI, no error is thrown until you use the variable declared in the for construct. Additionally the error message is not saying anything about that using of "for" is not allowed inside of "if".
> {code:title=Using for inside try}
> [standalone@embedded /] try
> [standalone@embedded /] for propName in :read-children-names(child-type=system-property)
> [standalone@embedded /] echo $propName
> Unrecognized variable propName
> {code}
> The same applies here as for "if" case.
> {code:title=Using for inside batch}
> [standalone@embedded /] batch
> [standalone@embedded / #] for propName in :read-children-names(child-type=system-property)
> The command is not available in the current context (e.g. required subsystems or connection to the controller might be unavailable).
> {code}
> In the batch case, the error message is better (it says that command is not available), but still it is not clear why the command is not available.
> {code:title=Using for inside for}
> [standalone@embedded /] for propName in :read-children-names(child-type=system-property)
> [standalone@embedded /] for propName in :read-children-names(child-type=system-property)
> for is not allowed while in for block
> {code}
> Using of nested for loops generates nice error message which clearly explains what is wrong. All other cases should throw similar error.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months
[JBoss JIRA] (WFLY-9646) Wsconsume is not able to generate jar file from wsdl
by Marek Kopecký (JIRA)
[ https://issues.jboss.org/browse/WFLY-9646?page=com.atlassian.jira.plugin.... ]
Marek Kopecký updated WFLY-9646:
--------------------------------
Component/s: Scripts
> Wsconsume is not able to generate jar file from wsdl
> ----------------------------------------------------
>
> Key: WFLY-9646
> URL: https://issues.jboss.org/browse/WFLY-9646
> Project: WildFly
> Issue Type: Bug
> Components: Scripts, Web Services
> Reporter: Marek Kopecký
> Assignee: Alessio Soldano
> Priority: Blocker
>
> *Description:*
> Wsconsume is able to generate jar file from wsdl on WildFly 11. On WildFly master, wsconsume doesn't create any files in "out" folder. It leads to Exception from wsdl2java tool.
> *Steps to reproduce:*
> # cd $\{JBOSS_HOME\}/bin
> # # download Echo1.wsdl, Echo1Service.wsdl and Echo1Service_schema1.xsd files, these files are attached to this jira
> # mkdir out
> # ./wsconsume.sh -j wsClientShort.jar -p org.jboss.test.script -o out Echo1Service.wsdl
> *Actual results:*
> {noformat}
> [mkopecky@dhcp-10-40-4-226 bin]$ ./wsconsume.sh -j wsClientShort.jar -p org.jboss.test.script -o out Echo1Service.wsdl
> Could not find log4j.properties or log4j.xml configuration, logging to console.
> Loading FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> wsdl2java -clientjar wsClientShort.jar -compile -exsh false -p org.jboss.test.script -d /home/mkopecky/playground/wf/wfly.08/wfly.08/bin/out/tmp3507583 -verbose -classdir /home/mkopecky/playground/wf/wfly.08/wfly.08/bin/out -allowElementReferences file:/home/mkopecky/playground/wf/wfly.08/wfly.08/bin/Echo1Service.wsdl
> wsdl2java - Apache CXF 3.1.12
> JBWS024002: Failed to invoke org.apache.cxf.tools.wsdlto.WSDLToJava
> org.apache.cxf.tools.common.ToolException: java.security.AccessControlException: access denied ("java.io.FilePermission" "/home/mkopecky/playground/wf/wfly.08/wfly.08/bin/out/tmp3507583/org/jboss/test/script/package-info.java" "read")
> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:423)
> at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:105)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
> at org.jboss.wsf.stack.cxf.tools.CXFConsumerImpl.consume(CXFConsumerImpl.java:313)
> at org.jboss.ws.tools.cmd.WSConsume.importServices(WSConsume.java:298)
> at org.jboss.ws.tools.cmd.WSConsume.mainInternal(WSConsume.java:108)
> at org.jboss.ws.tools.cmd.WSConsume.main(WSConsume.java:96)
> at org.jboss.modules.Module.run(Module.java:344)
> at org.jboss.modules.Main.main(Main.java:525)
> Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "/home/mkopecky/playground/wf/wfly.08/wfly.08/bin/out/tmp3507583/org/jboss/test/script/package-info.java" "read")
> at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
> at java.security.AccessController.checkPermission(AccessController.java:884)
> at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
> at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
> at java.io.File.isDirectory(File.java:844)
> at com.sun.tools.javac.file.RegularFileObject.<init>(RegularFileObject.java:69)
> at com.sun.tools.javac.file.RegularFileObject.<init>(RegularFileObject.java:64)
> at com.sun.tools.javac.file.JavacFileManager.getJavaFileObjectsFromFiles(JavacFileManager.java:785)
> at com.sun.tools.javac.file.JavacFileManager.getJavaFileObjectsFromStrings(JavacFileManager.java:185)
> at org.apache.cxf.common.util.Compiler.useJava6Compiler(Compiler.java:192)
> at org.apache.cxf.common.util.Compiler.compileFiles(Compiler.java:141)
> at org.apache.cxf.tools.common.ClassUtils.compile(ClassUtils.java:123)
> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:306)
> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:415)
> ... 8 more
> [mkopecky@dhcp-10-40-4-226 bin]$ ll out/
> total 0
> [mkopecky@dhcp-10-40-4-226 bin]$
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months
[JBoss JIRA] (WFLY-9646) Wsconsume is not able to generate jar file from wsdl
by Marek Kopecký (JIRA)
Marek Kopecký created WFLY-9646:
-----------------------------------
Summary: Wsconsume is not able to generate jar file from wsdl
Key: WFLY-9646
URL: https://issues.jboss.org/browse/WFLY-9646
Project: WildFly
Issue Type: Bug
Components: Web Services
Reporter: Marek Kopecký
Assignee: Alessio Soldano
Priority: Blocker
*Description:*
Wsconsume is able to generate jar file from wsdl on WildFly 11. On WildFly master, wsconsume doesn't create any files in "out" folder. It leads to Exception from wsdl2java tool.
*Steps to reproduce:*
# cd $\{JBOSS_HOME\}/bin
# # download Echo1.wsdl, Echo1Service.wsdl and Echo1Service_schema1.xsd files, these files are attached to this jira
# mkdir out
# ./wsconsume.sh -j wsClientShort.jar -p org.jboss.test.script -o out Echo1Service.wsdl
*Actual results:*
{noformat}
[mkopecky@dhcp-10-40-4-226 bin]$ ./wsconsume.sh -j wsClientShort.jar -p org.jboss.test.script -o out Echo1Service.wsdl
Could not find log4j.properties or log4j.xml configuration, logging to console.
Loading FrontEnd jaxws ...
Loading DataBinding jaxb ...
wsdl2java -clientjar wsClientShort.jar -compile -exsh false -p org.jboss.test.script -d /home/mkopecky/playground/wf/wfly.08/wfly.08/bin/out/tmp3507583 -verbose -classdir /home/mkopecky/playground/wf/wfly.08/wfly.08/bin/out -allowElementReferences file:/home/mkopecky/playground/wf/wfly.08/wfly.08/bin/Echo1Service.wsdl
wsdl2java - Apache CXF 3.1.12
JBWS024002: Failed to invoke org.apache.cxf.tools.wsdlto.WSDLToJava
org.apache.cxf.tools.common.ToolException: java.security.AccessControlException: access denied ("java.io.FilePermission" "/home/mkopecky/playground/wf/wfly.08/wfly.08/bin/out/tmp3507583/org/jboss/test/script/package-info.java" "read")
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:423)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:105)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
at org.jboss.wsf.stack.cxf.tools.CXFConsumerImpl.consume(CXFConsumerImpl.java:313)
at org.jboss.ws.tools.cmd.WSConsume.importServices(WSConsume.java:298)
at org.jboss.ws.tools.cmd.WSConsume.mainInternal(WSConsume.java:108)
at org.jboss.ws.tools.cmd.WSConsume.main(WSConsume.java:96)
at org.jboss.modules.Module.run(Module.java:344)
at org.jboss.modules.Main.main(Main.java:525)
Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "/home/mkopecky/playground/wf/wfly.08/wfly.08/bin/out/tmp3507583/org/jboss/test/script/package-info.java" "read")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.security.AccessController.checkPermission(AccessController.java:884)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
at java.io.File.isDirectory(File.java:844)
at com.sun.tools.javac.file.RegularFileObject.<init>(RegularFileObject.java:69)
at com.sun.tools.javac.file.RegularFileObject.<init>(RegularFileObject.java:64)
at com.sun.tools.javac.file.JavacFileManager.getJavaFileObjectsFromFiles(JavacFileManager.java:785)
at com.sun.tools.javac.file.JavacFileManager.getJavaFileObjectsFromStrings(JavacFileManager.java:185)
at org.apache.cxf.common.util.Compiler.useJava6Compiler(Compiler.java:192)
at org.apache.cxf.common.util.Compiler.compileFiles(Compiler.java:141)
at org.apache.cxf.tools.common.ClassUtils.compile(ClassUtils.java:123)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:306)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:415)
... 8 more
[mkopecky@dhcp-10-40-4-226 bin]$ ll out/
total 0
[mkopecky@dhcp-10-40-4-226 bin]$
{noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months
[JBoss JIRA] (WFLY-9639) Messages are stuck in a Queue that is configured on HornetQ
by Stuart Douglas (JIRA)
[ https://issues.jboss.org/browse/WFLY-9639?page=com.atlassian.jira.plugin.... ]
Stuart Douglas reassigned WFLY-9639:
------------------------------------
Component/s: JMS
(was: Application Client)
Assignee: Jeff Mesnil (was: Stuart Douglas)
> Messages are stuck in a Queue that is configured on HornetQ
> -----------------------------------------------------------
>
> Key: WFLY-9639
> URL: https://issues.jboss.org/browse/WFLY-9639
> Project: WildFly
> Issue Type: Bug
> Components: JMS
> Affects Versions: 9.x.x TBD
> Environment: RHEL 7.2, JDK 1.8_144
> Reporter: Rajendra Mallampati
> Assignee: Jeff Mesnil
>
> We use WildFly 9.0.2 for hosting our web application and it has both real time and batch processing components. One of the functions supported on the web includes uploading a file with a number of lines any where from 1 to 10K, If the file is valid (virus scan etc passed) it is parsed into that may messages and published to a queue. Each message will have two counters total number of messages that are published to the queue, and the message number.
> The consuming side is implemented using Spring DefaultMessageListenerContainer (DMLC) with a concurrency of 50 and maxConcurrency of 75. The listeners that implement MessageListener interface are integrated into DMLC. sometimes, if the producing side published 100 messages the consuming side only receiving 98 (per say) and gets stuck because two more messages should be in the Queue. Those two messages are not delivered and don't know where they are going. We tried even persistent Queues and the result is same (getting stuck).
> This is happening in production and any insight into this issue is highly appreciated.
> Here are the software details:
> App server : Wildfly 9.0.2
> HornetQ : 2.4.7
> JDK : 1_8_144
> If you need additional details I will be very glad to provide.
> Thanks
> Rajendra
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months
[JBoss JIRA] (WFCORE-3483) Deprecate PathAddress.navigate and remove, replace controller catches of NoSuchElementException with Resource.NoSuchResourceException
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFCORE-3483?page=com.atlassian.jira.plugi... ]
Brian Stansberry updated WFCORE-3483:
-------------------------------------
Summary: Deprecate PathAddress.navigate and remove, replace controller catches of NoSuchElementException with Resource.NoSuchResourceException (was: Deprecated PathAddress.navigate and remove, replace controller catches of NoSuchElementException with Resource.NoSuchResourceException)
> Deprecate PathAddress.navigate and remove, replace controller catches of NoSuchElementException with Resource.NoSuchResourceException
> -------------------------------------------------------------------------------------------------------------------------------------
>
> Key: WFCORE-3483
> URL: https://issues.jboss.org/browse/WFCORE-3483
> Project: WildFly Core
> Issue Type: Task
> Components: Domain Management
> Reporter: Brian Stansberry
> Assignee: Brian Stansberry
> Priority: Minor
>
> The management layer has some old code that uses throwing or catching of NoSuchElementException as a way to represent that a resource doesn't exist. Clean this out so we can more easily move to a cleaner set of exceptions.
> This work will consist of two aspects:
> 1) Code that's meant to catch Resource.NoSuchResourceException but instead catches its superclass NoSuchElementException will shift to catching the subclass. This will make the true intent of the code clearer.
> 2) The unused PathAddress.navigate and remove methods, which throw NoSuchElementException, will be deprecated. Using PathAddress to maneuver through a deep DMR node tree is not really how management works ever since we introduced the Resource class long long ago (hence these methods are unused.)
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months
[JBoss JIRA] (WFCORE-3483) Deprecated PathAddress.navigate and remove, replace controller catches of NoSuchElementException with Resource.NoSuchResourceException
by Brian Stansberry (JIRA)
Brian Stansberry created WFCORE-3483:
----------------------------------------
Summary: Deprecated PathAddress.navigate and remove, replace controller catches of NoSuchElementException with Resource.NoSuchResourceException
Key: WFCORE-3483
URL: https://issues.jboss.org/browse/WFCORE-3483
Project: WildFly Core
Issue Type: Task
Components: Domain Management
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Priority: Minor
The management layer has some old code that uses throwing or catching of NoSuchElementException as a way to represent that a resource doesn't exist. Clean this out so we can more easily move to a cleaner set of exceptions.
This work will consist of two aspects:
1) Code that's meant to catch Resource.NoSuchResourceException but instead catches its superclass NoSuchElementException will shift to catching the subclass. This will make the true intent of the code clearer.
2) The unused PathAddress.navigate and remove methods, which throw NoSuchElementException, will be deprecated. Using PathAddress to maneuver through a deep DMR node tree is not really how management works ever since we introduced the Resource class long long ago (hence these methods are unused.)
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months