[JBoss Web Services Development] - Call a jBossWS results in java.lang.NoClassDefFoundError: Could not initialize class $Proxy2341
by Steven Parks
Steven Parks [https://community.jboss.org/people/stdaparks] created the discussion
"Call a jBossWS results in java.lang.NoClassDefFoundError: Could not initialize class $Proxy2341"
To view the discussion, visit: https://community.jboss.org/message/717608#717608
--------------------------------------------------------------
I used wsconsume to generate a proxy class to web-service enabled beans.
In trying to test that it works, using a test-cradle JSP I get the following error:
13:52:15,039 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
[exec] java.lang.NoClassDefFoundError: Could not initialize class $Proxy2341
[exec] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[exec] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[exec] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[exec] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[exec] at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:588)
[exec] at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.createProxy(ServiceDelegateImpl.java:451)
[exec] at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPortInternal(ServiceDelegateImpl.java:304)
[exec] at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:225)
[exec] at javax.xml.ws.Service.getPort(Service.java:92)
[exec] at com.bcaa.ccprocessing.service.ws.VaultTransactionManagementWebService.getVaultTransactionManagementServicePort(VaultTransactionManagementWebService.java:56)
which results from the JSP code
[exec] 13:52:15,057 ERROR [STDERR] org.apache.jasper.JasperException: An exception occurred processing JSP page /html/portlet/insurance/find_policy.jsp at line 334
[exec] 331: //com.bcaa.ccprocessing.service.ws.VaultTransactionManagementService wsService = service.getPort(com.bcaa.ccprocessing.service.ws.VaultTransactionManagementService.class);
[exec] 332: com.bcaa.ccprocessing.service.ws.VaultTransactionManagementWebService bb = new com.bcaa.ccprocessing.service.ws.VaultTransactionManagementWebService(url, qname);
[exec] 333: System.out.println("WebService endpoint loaded..." + bb.toString());
[exec] 334: com.bcaa.ccprocessing.service.ws.VaultTransactionManagementService wsService = bb.getVaultTransactionManagementServicePort();
[exec] 335: System.out.println("WebService class loaded " + wsService.toString());
[exec] 336:
[exec] 337: com.bcaa.ccprocessing.service.ws.Creditcard creditCard = wsService.fetchVaultCardDetails(11);
jBossWS/services lists my service and the WSDL is available. The line which fails is the Service.getPort call (javax,xml.ws.Service and its implementation).
public <T> T getPort(QName portName,
Class<T> serviceEndpointInterface) {
return delegate.getPort(portName, serviceEndpointInterface);
}
What am I missing. I am stuck as I don't have a lot of information to go on.
Thanks in advance...
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/717608#717608]
Start a new discussion in JBoss Web Services Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 8 months
[EJB3 Development] - Ejb3 MBeans External Configuration ?
by Christian Leclerc
Christian Leclerc [https://community.jboss.org/people/christian.leclerc] created the discussion
"Ejb3 MBeans External Configuration ?"
To view the discussion, visit: https://community.jboss.org/message/647985#647985
--------------------------------------------------------------
Hello guy's, im kind of new here so first of all I want to thank you for the any support that you will give to me.
Here is my question now, iv'e bean searching since 2 day's on and off ..
I am an Jboss as 6 guy's and now im migrate to Jboss as 7.
I've got a MBeans that is called
something-service.xml
Here is the detail :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server PUBLIC "-//JBoss//DTD MBean Service 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-service_4_0.dtd">
<server>
<mbean code="org.jboss.naming.JNDIBindingServiceMgr" name="ca.s3s.identitygardens.config:service=identitygardens-config">
<attribute name="BindingsConfig" serialDataType="jbxb">
<jndi:bindings xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jndi="urn:jboss:jndi-binding-service:1.0"
xs:schemaLocation="urn:jboss:jndi-binding-service:1.0 resource:jndi-binding-service_1_0.xsd">
<jndi:binding name="conf/x500Properties">
<java:properties xmlns:java="urn:jboss:java-properties"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="urn:jboss:java-properties resource:java-properties_1_0.xsd">
<java:property><java:key>Item A</java:key> <java:value>value A</java:value></java:property>
<java:property><java:key>Item b</java:key><java:value>Value b</java:value></java:property>
<java:property><java:key>Item C</java:key><java:value>Value C</java:value></java:property>
</java:properties>
</jndi:binding>
</jndi:bindings>
</attribute>
<depends>jboss:service=Naming</depends>
</mbean>
</server>
And in my ejb I inject the value with :
@Resource(mappedName = "conf/x500Properties")
Everything work's great and now I wonder how to do this in JBoss AS 7
It was very great because this way I was able to make the configuration out of my ear file.
The value is put in jndi at startup and the ejb go fetch this value by injection ..
I know that I can possibly put a string in JNDI this way :
https://community.jboss.org/message/615368#615368 https://community.jboss.org/message/615368
But did I can make a complete properties file object on this way ?
Thanks for any reply.
Christian Leclerc.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/647985#647985]
Start a new discussion in EJB3 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 9 months
[JBoss AS 7 Development] - Remote EJB Client Security (Jboss7.1)
by rathm1
rathm1 [https://community.jboss.org/people/rathm1] created the discussion
"Remote EJB Client Security (Jboss7.1)"
To view the discussion, visit: https://community.jboss.org/message/720288#720288
--------------------------------------------------------------
Hello there,
I am having an issue that when I specify a username/password programatically using the InitialContext the authentication is not working but when I hardcode the username/password into the jboss-ejb-client.properties the authentication is successful.
I am using a custom security domain connecting to an ldap but that seems to be configured correctly since I can successfully authenticate to it with having the username/password in jboss-ejb-client.properties.
The working configuration is:
jboss-ejb-client.properties
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
remote.connections=default
remote.connection.default.host=localhost
remote.connection.default.port=4447
remote.connection.default.username=myUsername
remote.connection.default.password=myPassword
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
remote.connection.default.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS=JBOSS-LOCAL-USER
local.jboss.jndi.properties
java.naming.factory.url.pkgs=org.jboss.ejb.client.naming
Client Application Code:
jndiProperties.put("jboss.naming.client.ejb.context", true);
jndiProperties.put(Context.SECURITY_PRINCIPAL, username);
jndiProperties.put(Context.SECURITY_CREDENTIALS, password);
jndiProperties.put("jboss.naming.client.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", false);
Context context = new InitialContext(jndiProperties);
String lookUp = "ejb:" + appName + "/" + moduleName + "/" + beanName + "!" + interfaceClassName;
TestEJB facade = (TestEJB)context.lookup(lookUp);
boolean connectionSuccessful = facade.canConnect();
It does not matter what I set in the jndiProperties for the username and password, it will always use the username and password that were set in the jboss-ejb-client.properties.
If I remove the username and password from jboss-ejb-client.properties and leave everything else the same, the lookup is successful but when the service is called an exception thrown on the client side is:
java.lang.IllegalStateException: No EJB receiver available for handling [appName:MyAppEar, moduleName:MyAppJar,distinctname:] combination.
I have looked through many other discussion items and it seems that everyone that has gotten security working, has the username and password in the jboss-ejb-client.properties.
If anyone has any suggestions that would be great.
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/720288#720288]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 9 months