JBoss 5 SSI recursive?
by Sascha Hesse
Hello List,
does anybody know if recursive SSI includes are generally possible in
Jboss AS 5 ?
I have a main.jsp with includes header.shtml.
header.shtml includes another page headerContent.html.
If I request header.shtml directly, headerContent.html is includes as expected.
But requesting main.jsp includes only the header.shtml. The content of
headerContent.html ist missing then.
Kind regards
Sascha
13 years
[JBoss Web Services] - NullPointerException when deploying JAX-WS web-service in com.sun.xml.ws.policy.jaxws.PolicyWSDLParserExtension line 980.
by John Fitzpatrick
John Fitzpatrick [https://community.jboss.org/people/jfitzpatrick] created the discussion
"NullPointerException when deploying JAX-WS web-service in com.sun.xml.ws.policy.jaxws.PolicyWSDLParserExtension line 980."
To view the discussion, visit: https://community.jboss.org/message/647709#647709
--------------------------------------------------------------
Hi There,
I have been struggling to deploy a web-application which implements two JAX-WS endpoints, one of which uses the provider API and the other using the POJO method.
My environment:
jbossws-metro-3.3.1
Java Version: 1.6.0.20
JBoss Version: 5.1.0.GA
OS: Ubuntu 10.04 LTS Desktop
What I do:
Implement a web-application that implements two web-service endpoints, one using the JAX-WS provider API and the other using the POJO approach with relevant @WebService annotation. Example code snippets:
AddNumbersImpl.java:
@ServiceMode(value=Service.Mode.PAYLOAD)
@WebServiceProvider(portName="AddNumbersPort",
serviceName="AddNumbersService",
targetNamespace=" http://duke.example.org http://duke.example.org",
wsdlLocation="WEB-INF/wsdl/AddNumbers.wsdl")
public class AddNumbersImpl implements Provider<Source> {
.... body of class here
}
SubtractNumbersImpl.java
@WebService( serviceName = "SubtractNumbersService",
portName = "SubtractNumbersPort",
endpointInterface = "provider.server.SubtractNumbersPortType" )
public class SubtractNumbersImpl {
.... body of class here
}
I have setup web.xml with all of the relevant servlets and mappings and corresponding wsdl files.
The SubtractNumbersImpl class has a single method called subtractNumbers which throws a single exception.
When I deploy my web-application, I get the following stack trace:
12:35:16,621 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/opt/jboss/jboss-5.1.0.GA/server/web/deploy/jaxws-provider.war/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error during deploy: vfszip:/opt/jboss/jboss-5.1.0.GA/server/web/deploy/jaxws-provider.war/
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:177)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.xml.ws.WebServiceException: Failed to build METRO runtime model
at org.jboss.wsf.stack.metro.metadata.RuntimeModelDeploymentAspect.start(RuntimeModelDeploymentAspect.java:135)
at org.jboss.webservices.integration.deployers.WSDeploymentAspectDeployer.internalDeploy(WSDeploymentAspectDeployer.java:107)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
... 29 more
Caused by: java.lang.NullPointerException
at com.sun.xml.ws.policy.jaxws.PolicyWSDLParserExtension.finished(PolicyWSDLParserExtension.java:980)
at com.sun.xml.ws.wsdl.parser.DelegatingParserExtension.finished(DelegatingParserExtension.java:183)
at com.sun.xml.ws.wsdl.parser.WSDLParserExtensionFacade.finished(WSDLParserExtensionFacade.java:328)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:229)
at com.sun.xml.ws.server.EndpointFactory.getWSDLPort(EndpointFactory.java:513)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:199)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
at org.jboss.wsf.stack.metro.DeploymentDescriptorParserExt.parseAdapters(DeploymentDescriptorParserExt.java:295)
at org.jboss.wsf.stack.metro.DeploymentDescriptorParserExt.parse(DeploymentDescriptorParserExt.java:171)
at org.jboss.wsf.stack.metro.metadata.RuntimeModelDeploymentAspect.start(RuntimeModelDeploymentAspect.java:111)
... 32 more
If I modify the SubtractNumbers service so that no exception is thrown then the application deploys without any problems.
What I Expect:
The web-application should deploy without any exceptions being thrown.
Detailed Replication Steps:
Attached to this post is a zip file containing the test case I am using to replicate this error.
Detailed steps to reproduce the problem:
Pre-requisites:
JBoss 5.1.0.GA
Sun Java 6 JDK
JAX-WS RI 2.1.7
jbossws-metro-3.3.1
1. Download the attached zip file.
2. Extract to a directory somewhere.
3. Open a terminal and move into the directory where the files were extracted.
3. Set JAXWS_HOME to the JAX-WS home.
export JAXWS_HOME=/home/jfitzpatrick/Downloads/jaxws-ri-20090416-2.1.7/
4. Build the server side code.
ant build-server-wsdl
5. Create the war file.
ant create-war
6. Copy the war file to the jboss deployment directory.
cp build/war/jaxws-provider.war /opt/jboss/jboss-5.1.0.GA/server/web/deploy
7. Start JBoss.
/opt/jboss/jboss-5.1.0.GA/bin/run.sh -c web -b 0.0.0.0
8. Observe the exception described above.
If the above steps are repeated after modifying the SubtractNumbers service so that no exceptions are thrown, the application deploys without any errors.
To see this, simply comment out anything related to the fault/exception in the SubtractNumbers.wsdl file and modify SubtractNumbersImpl.java so that the exception is no longer thrown.
After doing an "ant clean" and repeating the steps above, you should observe that the exception is no longer thrown.
My questions:
Has anyone else observed this behaviour?
Am I doing something wrong in regards to the configuration of the application?
Is it possible to deploy JAX-WS with different endpoints using different programming models?
If anyone has any hints, ideas, or anything at all that may help it would be greatly appreciated.
Thank you,
John Fitzpatrick
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/647709#647709]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[JBoss Web Services] - Re: Custom exceptions with @WebFault
by John Fitzpatrick
John Fitzpatrick [https://community.jboss.org/people/jfitzpatrick] created the discussion
"Re: Custom exceptions with @WebFault"
To view the discussion, visit: https://community.jboss.org/message/647717#647717
--------------------------------------------------------------
Have you tried defining the fault in your wsdl file and then using wsimport to have the JAXB artifacts generated for you?
Example that I think should work:
wsdl:
<?xml version="1.0" encoding="UTF-8"?>
<definitions
name="SubtractNumbers"
targetNamespace=" http://duke.example.org http://duke.example.org"
xmlns:tns=" http://duke.example.org http://duke.example.org"
xmlns=" http://schemas.xmlsoap.org/wsdl/ http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd=" http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema"
xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/ http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<xsd:schema
xmlns=" http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema"
targetNamespace=" http://duke.example.org http://duke.example.org"
elementFormDefault="qualified">
<complexType name="subtractNumbersResponse">
<sequence>
<element name="return" type="xsd:int" />
</sequence>
</complexType>
<element name="subtractNumbersResponse" type="tns:subtractNumbersResponse"/>
<complexType name="subtractNumbers">
<sequence>
<element name="arg0" type="xsd:int" />
<element name="arg1" type="xsd:int" />
</sequence>
</complexType>
<element name="subtractNumbers" type="tns:subtractNumbers"/>
<element name="permissionDeniedFault">
<complexType>
<sequence>
<element name="message" type="xsd:string"/>
</sequence>
</complexType>
</element>
</xsd:schema>
</types>
<message name="subtractNumbers">
<part name="parameters" element="tns:subtractNumbers" />
</message>
<message name="subtractNumbersResponse">
<part name="result" element="tns:subtractNumbersResponse" />
</message>
<message name="permissionDeniedException">
<part name="permissionDeniedFault" element="tns:permissionDeniedFault"/>
</message>
<portType name="SubtractNumbersPortType">
<operation name="subtractNumbers">
<input message="tns:subtractNumbers" />
<output message="tns:subtractNumbersResponse" />
<fault name="permissionDeniedFault" message="tns:permissionDeniedException" />
</operation>
</portType>
<binding name="SubtractNumbersBinding" type="tns:SubtractNumbersPortType">
<soap:binding transport=" http://schemas.xmlsoap.org/soap/http http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="subtractNumbers">
<soap:operation soapAction="" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
<fault name="permissionDeniedFault">
<soap:fault use="literal" name="permissionDeniedFault" />
</fault>
</operation>
</binding>
<service name="SubtractNumbersService">
<port name="SubtractNumbersPort" binding="tns:SubtractNumbersBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL" />
</port>
</service>
</definitions>
Generated fault/exception related artificats:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"message"
})
@XmlRootElement(name = "permissionDeniedFault")
public class PermissionDeniedFault {
@XmlElement(required = true)
protected String message;
/**
* Gets the value of the message property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMessage() {
return message;
}
/**
* Sets the value of the message property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMessage(String value) {
this.message = value;
}
}
@WebFault(name = "permissionDeniedFault", targetNamespace = " http://duke.example.org http://duke.example.org")
public class PermissionDeniedException
extends Exception
{
/**
* Java type that goes as soapenv:Fault detail element.
*
*/
private PermissionDeniedFault faultInfo;
/**
*
* @param message
* @param faultInfo
*/
public PermissionDeniedException(String message, PermissionDeniedFault faultInfo) {
super(message);
this.faultInfo = faultInfo;
}
/**
*
* @param message
* @param faultInfo
* @param cause
*/
public PermissionDeniedException(String message, PermissionDeniedFault faultInfo, Throwable cause) {
super(message, cause);
this.faultInfo = faultInfo;
}
/**
*
* @return
* returns fault bean: provider.server.PermissionDeniedFault
*/
public PermissionDeniedFault getFaultInfo() {
return faultInfo;
}
}
Implementation class:
@WebService (serviceName = "SubtractNumbersService",
portName = "SubtractNumbersPort",
endpointInterface = "provider.server.SubtractNumbersPortType" )
public class SubtractNumbersImpl {
public int subtractNumbers(int arg1, int arg2) throws PermissionDeniedException {
PermissionDeniedFault permissionDeniedFault = new PermissionDeniedFault();
permissionDeniedFault.setMessage("Your custom message here explain why permission was denied.");
throw new PermissionDeniedException("Permission denied.", permissionDeniedFault);
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/647717#647717]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[JNDI and Naming] - ClassNotFoundException on Context.lookup() after login with custom Principal
by Ozan Ayyüce
Ozan Ayyüce [https://community.jboss.org/people/ozay] created the discussion
"ClassNotFoundException on Context.lookup() after login with custom Principal"
To view the discussion, visit: https://community.jboss.org/message/647666#647666
--------------------------------------------------------------
Hi,
we have a client-server-setup and are migrating to AS 6.1.0. Unfortunately, a JNDI lookup fails with a ClassNotFoundException as root cause.
Previously, we had extended SimplePrincipal to add some fields. In our client, we use the LoginContext with a custom password handler to authenticate at the AS.
handler = new CustomUserPasswordHandler(user, pwd, mandatorID);
final LoginContext loginContext = new LoginContext(LOGIN_CONFIGURATION, handler);
try
{
loginContext.login();
}
catch (final LoginException ex)
{
throw new IllegalStateException("Could not initialize clients login module: " + ex);
}
the client auth.conf specifies a custom login module:
client-login {
de.xxx.xxx.secure.CustomClientLoginModule required
;
org.jboss.security.ClientLoginModule required
password-stacking="useFirstPass"
;
};
Our custom login module creates our custom Principal:
@Override
public boolean login() throws LoginException
{
loginFailed = true;
getUserInfo();
loginPrincipal = new CustomPrincipal(mandator, customAttr, username);
sharedState.put("javax.security.auth.login.name", loginPrincipal);
sharedState.put("javax.security.auth.login.password", loginCredential);
loginFailed = false;
return true;
}
After login, any call to Context.lookup() results in a ServiceUnavailableException:
theNewsTopic = (Topic) ctx.lookup(Names.JMS_TOPIC_UPDATE_USER)
javax.naming.ServiceUnavailableException: Unexpected failure [Root exception is java.lang.ClassNotFoundException: de.xxx.xxx.secure.CustomPrincipal]
17:52:58,299 ERROR [STDERR] at org.jboss.naming.interceptors.ExceptionInterceptor.invoke(ExceptionInterceptor.java:71)
17:52:58,299 ERROR [STDERR] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:68)
17:52:58,299 ERROR [STDERR] at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
17:52:58,299 ERROR [STDERR] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)
17:52:58,299 ERROR [STDERR] at $Proxy0.lookup(Unknown Source)
17:52:58,299 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)
17:52:58,299 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)
17:52:58,299 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:392)
17:52:58,299 ERROR [STDERR] at de.xxx.xxx.client.jms.JMSConsumer.getTopic(JMSConsumer.java:143)
17:52:58,299 ERROR [STDERR] at de.xxx.xxx.client.jms.JMSConsumer.initTopic(JMSConsumer.java:193)
17:52:58,299 ERROR [STDERR] at de.xxx.xxx.client.jms.JMSConsumer.<init>(JMSConsumer.java:120)
17:52:58,299 ERROR [STDERR] at de.xxx.xxx.client.jms.UpdateConsumer.<init>(UpdateConsumer.java:97)
17:52:58,299 ERROR [STDERR] at de.xxx.xxx.client.RemoteClient$Consumer.initRemoteMessageConsumers(RemoteClient.java:266)
17:52:58,299 ERROR [STDERR] at de.xxx.xxx.client.InitThread.initUpdateFramework(InitThread.java:165)
17:52:58,299 ERROR [STDERR] at de.xxx.xxx.client.InitThread.loadData(InitThread.java:178)
17:52:58,299 ERROR [STDERR] at de.xxx.xxx.client.InitThread.run(InitThread.java:296)
17:52:58,299 ERROR [STDERR] Caused by: java.lang.ClassNotFoundException: de.xxx.xxx.secure.CustomPrincipal
17:52:58,299 ERROR [STDERR] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
17:52:58,299 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
17:52:58,299 ERROR [STDERR] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
17:52:58,299 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
17:52:58,299 ERROR [STDERR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
17:52:58,299 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
17:52:58,299 ERROR [STDERR] at java.lang.Class.forName0(Native Method)
17:52:58,299 ERROR [STDERR] at java.lang.Class.forName(Class.java:247)
17:52:58,299 ERROR [STDERR] at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:304)
17:52:58,299 ERROR [STDERR] at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1172)
17:52:58,299 ERROR [STDERR] at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:886)
17:52:58,299 ERROR [STDERR] at org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:505)
17:52:58,299 ERROR [STDERR] at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:450)
17:52:58,299 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
17:52:58,299 ERROR [STDERR] at java.lang.Class.forName0(Native Method)
17:52:58,299 ERROR [STDERR] at java.lang.Class.forName(Class.java:247)
17:52:58,299 ERROR [STDERR] at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:603)
17:52:58,299 ERROR [STDERR] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1574)
17:52:58,299 ERROR [STDERR] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
17:52:58,299 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
17:52:58,299 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
17:52:58,299 ERROR [STDERR] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
17:52:58,299 ERROR [STDERR] at org.jboss.invocation.MarshalledInvocation.readExternal(MarshalledInvocation.java:665)
17:52:58,299 ERROR [STDERR] at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1791)
17:52:58,299 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
17:52:58,299 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
17:52:58,299 ERROR [STDERR] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
17:52:58,299 ERROR [STDERR] at org.jboss.invocation.http.servlet.InvokerServlet.processRequest(InvokerServlet.java:137)
17:52:58,299 ERROR [STDERR] at org.jboss.invocation.http.servlet.InvokerServlet.doPost(InvokerServlet.java:232)
17:52:58,299 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
17:52:58,299 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
17:52:58,299 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
17:52:58,299 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
17:52:58,299 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
17:52:58,299 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
17:52:58,299 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
17:52:58,299 ERROR [STDERR] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
17:52:58,299 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
17:52:58,299 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
17:52:58,299 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)
17:52:58,299 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
17:52:58,299 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
17:52:58,299 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
17:52:58,299 ERROR [STDERR] at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
17:52:58,299 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
17:52:58,299 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
17:52:58,299 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)
17:52:58,299 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
17:52:58,299 ERROR [STDERR] at java.lang.Thread.run(Thread.java:662)
When the lookup() call is made before LoginContext.login() was run, the queried JNDI entry is returned like expected:
try
{
Topic theNewsTopic = (Topic) ClientLookup.getInitialContext().lookup(Names.JMS_TOPIC_UPDATE_USER);
String string = theNewsTopic.toString();
}
catch (NamingException e)
{
// no error happens here
LOG.error("Your log-message: ", e);
}
final LoginContext loginContext = new LoginContext(LOGIN_CONFIGURATION, handler);
loginContext.login();
try
{
Topic theNewsTopic = (Topic) ClientLookup.getInitialContext().lookup(Names.JMS_TOPIC_UPDATE_USER);
String string = theNewsTopic.toString();
}
catch (NamingException e)
{
// fails with ServiceUnavailableException: Unexpected failure [Root exception is java.lang.ClassNotFoundException de.xxx.xxx.secure.CustomPrincipal]
LOG.error("Your log-message: ", e);
}
Needless to say, CustomPrincipal is in the classpath, and is created once when the login call is made.
Any advice would be very helpful as we are out of ideas on how to narrow the error down.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/647666#647666]
Start a new discussion in JNDI and Naming at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years