[JBoss Web Services] - RestEasy stopping a try-catch from completing ?
by Craig Horrell
Craig Horrell [http://community.jboss.org/people/crashmeister] created the discussion
"RestEasy stopping a try-catch from completing ?"
To view the discussion, visit: http://community.jboss.org/message/560317#560317
--------------------------------------------------------------
I have the following code in a RS POJO:
try {
x = this.get(MyClass).myMethod();
} catch (MyException me) {
System.out.println(me.getMessage());
}
myMethod throws a MyException, but the catch never gets …
[View More]executed. Instead I get:
org.jboss.resteasy.spi.UnhandledException: Message from MyException
...
Root CauseMessage from MyException
com.myco.MyClass.myMethod(MyClass.java:2)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:252)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:217)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:206)
org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:514)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:491)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:120)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:200)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:48)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:43)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
Any ideas on how to get reasteasy to let the catch handle the error ?
Thanks,
Craig.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/560317#560317]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
[View Less]
14 years, 4 months
[JBoss AS Documentation] - Trying to get Duke's Bank to start
by John Stoner
John Stoner [http://community.jboss.org/people/jstoner99] created the discussion
"Trying to get Duke's Bank to start"
To view the discussion, visit: http://community.jboss.org/message/560328#560328
--------------------------------------------------------------
I am working with the Getting Started JBoss tutorial, and I've run into a few problems. I've resolved some, but there seem to be a lot of them and it's taking a while to get a simple tutorial to work.
I am running JBoss 5.1.0 GA, and …
[View More]I have downloaded the j2eetutorial14 from Oracle, and I got the JBoss code from
http://www.iomule.com/JBoss/v5/jbossj2ee-src.zip http://www.iomule.com/JBoss/v5/jbossj2ee-src.zip
as indicated on
http://www.iomule.com/JBoss/ http://www.iomule.com/JBoss/
I am trying to deploy the application to the server, and seeing
Deployment "vfszip:/Users/jstoner/Documents/jboss-5.1.0.GA/server/default/deploy/JBossDukesBank.ear/" is in error due to the following reason(s): org.xml.sax.SAXException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'description'. One of '{"http://java.sun.com/xml/ns/j2ee":display-name, "http://java.sun.com/xml/ns/j2ee":icon, "http://java.sun.com/xml/ns/j2ee":module}' is expected. @ vfszip:/Users/jstoner/Documents/jboss-5.1.0.GA/server/default/deploy/JBossDukesBank.ear/META-INF/application.xml[6,18]
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
It looks like an XML problem with application.xml. This is the file that came with jbossj2ee-src.zip:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<display-name>JBossDukesBank</display-name>
<description>application description</description>
<module>
<ejb>bank-ejb.jar</ejb>
</module>
<module>
<java>app-client.jar</java>
</module>
<module>
<web>
<web-uri>web-client.war</web-uri>
<context-root>bank</context-root>
</web>
</module>
<security-role>
<role-name>BankAdmin</role-name>
</security-role>
<security-role>
<role-name>BankCustomer</role-name>
</security-role>
</application>
I've monkeyed with this file a fair amount and produced different errors on deploy. Two questions come to mind:
1. how should this be formatted?
2. Is there a more up-to-date getting started tutorial for 5.1.0 that 'just works?' This one has been kind of ridiculous to work with. Compile errors, bad classpaths, and this bad XML...
3. If the answer to 2 is 'no,' I guess I'm making one. When it works who should I give it to?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/560328#560328]
Start a new discussion in JBoss AS Documentation at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
[View Less]
14 years, 4 months
[Beginner's Corner] - [org.jboss.dependency.plugins.AttributeCallbackItem] (main) Owner callback not implemented.
by dhaval joshi
dhaval joshi [http://community.jboss.org/people/dhaval0129] created the discussion
"[org.jboss.dependency.plugins.AttributeCallbackItem] (main) Owner callback not implemented."
To view the discussion, visit: http://community.jboss.org/message/560329#560329
--------------------------------------------------------------
Hi
When I start Jboss 5.1.0, Below are first few lines of logs.
I want to know what this line means : *INFO [org.jboss.dependency.plugins.AttributeCallbackItem] (main) …
[View More]Owner callback not implemented.*
I am trying to implement Jboss Remoting which not yet completely successfull. Is this line affecting my Jboss Remoting ?
How should I fix this issue ?*
*
2010-09-02 14:51:54,690 INFO [org.jboss.web.WebService] (main) Using RMI server codebase: http://DDX88LH1:8083/ http://DDX88LH1:8083/
2010-09-02 14:51:59,612 INFO [org.jboss.wsf.stack.jbws.NativeServerConfig] (main) JBoss Web Services - Stack Native Core
2010-09-02 14:51:59,612 INFO [org.jboss.wsf.stack.jbws.NativeServerConfig] (main) 3.1.2.GA
*2010-09-02 14:52:00,112 INFO [org.jboss.dependency.plugins.AttributeCallbackItem] (main) Owner callback not implemented.*
2010-09-02 14:52:00,972 INFO [org.jboss.logbridge.LogNotificationListener] (main) Adding notification listener for logging mbean "jboss.system:service=Logging,type=Log4jService" to server org.jboss.mx.server.MBeanServerImpl@a2a38[ defaultDomain='jboss' ]
2010-09-02 14:52:09,143 INFO [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] (main) Encountered deployment AbstractVFSDeploymentContext@21782897{vfsfile:/C:/jboss-5.1.0.GA/server/default/deploy/profileservice-secured.jar/}
2010-09-02 14:52:09,143 INFO [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] (main) Encountered deployment AbstractVFSDeploymentContext@21782897{vfsfile:/C:/jboss-5.1.0.GA/server/default/deploy/profileservice-secured.jar/}
2010-09-02 14:52:09,143 INFO [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] (main) Encountered deployment AbstractVFSDeploymentContext@21782897{vfsfile:/C:/jboss-5.1.0.GA/server/default/deploy/profileservice-secured.jar/}
2010-09-02 14:52:09,143 INFO [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] (main) Encountered deployment AbstractVFSDeploymentContext@21782897{vfsfile:/C:/jboss-5.1.0.GA/server/default/deploy/profileservice-secured.jar/}
2010-09-02 14:52:11,862 INFO [org.jboss.mx.remoting.service.JMXConnectorServerService] (main) JMX Connector server: service:jmx:rmi://DDX88LH1/jndi/rmi://DDX88LH1:1090/jmxconnector
2010-09-02 14:52:11,972 INFO [org.jboss.mail.MailService] (main) Mail Service bound to java:/Mail
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/560329#560329]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
[View Less]
14 years, 4 months
[Datasource Configuration] - Exception when testing Oracle datasource connections
by Fibber McGee
fibber [http://community.jboss.org/people/fibber] created the discussion
"Exception when testing Oracle datasource connections"
To view the discussion, visit: http://community.jboss.org/message/560339#560339
--------------------------------------------------------------
For JBoss AS 6.0.0 M4, using Java 1.6.0_21 running on Solaris 10:
When I create a new Oracle datasource, the first thing I do is the "Test Connection" function (from Datasources -> datasource_name -> Control tab).…
[View More] For some reason, I'm getting a stack trace with a security exception in the server log, even though the admin console is telling me that the connection test was successful. This exception occurs no matter how simple or complicated my datasource connection is. For example:
*oracle-basic-ds.xml*
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>OracleDS</jndi-name>
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<connection-url>jdbc:oracle:thin:@10.0.0.0:1521:MYSID</connection-url>
<user-name>the_user</user-name>
<password>the_password</password>
</local-tx-datasource>
</datasources>
The admin console results show that the "Yes" radio button is selected in the Test Results section (for the item that says "Was a connection obtained"). I know the connection is working correctly because if I change the password in the *-ds.xml file, the "No" radio button is selected, along with an error being printed in the server log.
After the successful test, I see this large stack trace in the server log, telling me the users.properties and defaultUsers.properties files cannot be found:
0:38:45,020 ERROR [org.jboss.security.auth.spi.UsersRolesLoginModule] Failed to load users/passwords/role files: java.io.IOException: No properties file: users.properties or defaults: defaultUsers.properties found
at org.jboss.security.auth.spi.Util.loadProperties(Util.java:201) [:3.0.0.Beta4]
at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:186) [:3.0.0.Beta4]
at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRolesLoginModule.java:200) [:3.0.0.Beta4]
at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:127) [:3.0.0.Beta4]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:756) [:1.6.0_21]
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186) [:1.6.0_21]
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683) [:1.6.0_21]
at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_21]
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680) [:1.6.0_21]
at javax.security.auth.login.LoginContext.login(LoginContext.java:579) [:1.6.0_21]
at org.jboss.security.plugins.auth.JaasSecurityManagerBase.defaultLogin(JaasSecurityManagerBase.java:553) [:3.0.0.Beta4]
at org.jboss.security.plugins.auth.JaasSecurityManagerBase.authenticate(JaasSecurityManagerBase.java:487) [:3.0.0.Beta4]
at org.jboss.security.plugins.auth.JaasSecurityManagerBase.isValid(JaasSecurityManagerBase.java:365) [:3.0.0.Beta4]
at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:160) [:6.0.0.20100721-M4]
at org.jboss.security.integration.JBossSecuritySubjectFactory.createSubject(JBossSecuritySubjectFactory.java:90) [:6.0.0.20100721-M4]
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool.testConnection(JBossManagedConnectionPool.java:389) [:6.0.0.20100721-M4]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.Beta5]
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.Beta5]
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.Beta5]
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.Beta5]
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.Beta5]
at org.jboss.system.microcontainer.ServiceControllerContext.invoke(ServiceControllerContext.java:194) [:2.2.0.Alpha10]
at org.jboss.kernel.plugins.registry.basic.LifecycleAwareKernelBus$1.dispatch(LifecycleAwareKernelBus.java:61) [jboss-kernel.jar:2.2.0.Alpha10]
at org.jboss.kernel.plugins.registry.basic.LifecycleAwareKernelBus$1.dispatch(LifecycleAwareKernelBus.java:58) [jboss-kernel.jar:2.2.0.Alpha10]
at org.jboss.kernel.plugins.registry.basic.BasicKernelBus.execute(BasicKernelBus.java:71) [jboss-kernel.jar:2.2.0.Alpha10]
at org.jboss.kernel.plugins.registry.basic.LifecycleAwareKernelBus.invoke(LifecycleAwareKernelBus.java:57) [jboss-kernel.jar:2.2.0.Alpha10]
at org.jboss.profileservice.management.KernelBusRuntimeComponentDispatcher.invoke(KernelBusRuntimeComponentDispatcher.java:85) [:0.1.0.Alpha1]
at org.jboss.profileservice.plugins.management.util.AbstractManagedComponentRuntimeDispatcher.invoke(AbstractManagedComponentRuntimeDispatcher.java:135) [:0.1.0.Alpha1]
at org.jboss.profileservice.management.DelegatingComponentDispatcherImpl.invoke(DelegatingComponentDispatcherImpl.java:93) [:0.1.0.Alpha1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121) [jboss-aop.jar:2.2.1.Alpha3]
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) [:1.0.1.GA]
at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:99) [:6.0.0.20100721-M4]
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:898) [:6.0.0.20100721-M4]
at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106) [:6.0.0.20100721-M4]
at org.jboss.remoting.Client.invoke(Client.java:1961) [:6.0.0.20100721-M4]
at org.jboss.remoting.Client.invoke(Client.java:804) [:6.0.0.20100721-M4]
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60) [:1.0.1.GA]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]
at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74) [:1.0.1.GA]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65) [:1.0.1]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]
at org.jboss.aop.generatedproxies.AOPProxy$1.invoke(AOPProxy$1.java) [:]
at org.jboss.profileservice.management.client.ManagedOperationDelegate.invoke(ManagedOperationDelegate.java:63) [:6.0.0.20100721-M4]
at org.rhq.plugins.jbossas5.ManagedComponentComponent.invokeOperation(ManagedComponentComponent.java:218)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]
at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [:1.6.0_21]
at java.util.concurrent.FutureTask.run(FutureTask.java:138) [:1.6.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_21]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]
How can I get rid of this exception and stack trace? I've already secured the JMX Console and JMX Invoker, but it didn't have any effect.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/560339#560339]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
[View Less]
14 years, 4 months