[EJB 3.0] - Mysterious Exception
by QPool.Char
Hello, searched for information but did not success...
When i deploy my EJB3 application, JBoss 4.0.5 GA + RC9 patch says:
anonymous wrote : 11:58:37,109 WARN [Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec correctly
| . PersistenceUnitInfo.getNewTempClassLoader() is null.
| 11:58:37,140 WARN [ServiceController] Problem starting service persistence.units:ear=Ejb3Test.ear,unitName=Ej
| b3PU
| javax.persistence.PersistenceException: [PersistenceUnit: Ejb3PU] class or package not found
| at org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses(Ejb3Configuration.java:1067)
and later
anonymous wrote :
| --- MBeans waiting for other MBeans ---
| ObjectName: persistence.units:ear=Ejb3Test.ear,unitName=Ejb3PU
| State: FAILED
| Reason: javax.persistence.PersistenceException: [PersistenceUnit: Ejb3PU] class or package not found
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=Ejb3DS
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: persistence.units:ear=Ejb3Test.ear,unitName=Ejb3PU
| State: FAILED
| Reason: javax.persistence.PersistenceException: [PersistenceUnit: Ejb3PU] class or package not found
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=Ejb3DS
|
But the DataSource is ok. And the source code too, as far as i can see. Worked for 2 days now on that problem. Any suggestions please?
Thx very much!!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008739#4008739
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008739
19 years, 2 months
[Security & JAAS/JBoss] - Re: HTTPS Client auth from within JBoss
by stone_42
Hello again,
I simplified my example and tried to run a scenario similar to scenario 2 from http://wiki.jboss.org/wiki/Wiki.jsp?page=SSLSetup, but with my own client implementation.
My code is SSLContext context;
| KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType());
| KeyStore truststore = KeyStore.getInstance(KeyStore
| .getDefaultType());
| char[] password = "123456".toCharArray();
| String keyStoreLocation = "META-INF/client.keystore";
| String trustStoreLocation = "META-INF/client.truststore";
| InputStream is = getClass().getResourceAsStream(keyStoreLocation);
| keystore.load(is, password);
| is = getClass().getResourceAsStream(trustStoreLocation);
| truststore.load(is, password);
| KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
| kmf.init(keystore, password);
| TrustManagerFactory tmf = TrustManagerFactory
| .getInstance("SunX509");
| tmf.init(truststore);
|
| context = SSLContext.getInstance("SSL");
| context.init(kmf.getKeyManagers(), tmf.getTrustManagers(),
| new SecureRandom());
| HttpsURLConnection.setDefaultSSLSocketFactory(context
| .getSocketFactory());
| HttpsURLConnection
| .setDefaultHostnameVerifier(new HostnameVerifier() {
| public boolean verify(String arg0, SSLSession arg1) {
| return true;
| }
| });
| URL url = new URL("https://node3058.it.de:8443");
| URLConnection uc = url.openConnection();
| uc.connect();
|
I use certificates created as described on the wiki page. I run my code once from a java standalone client and once from within an EJB running in JBoss. From the standalone client, everything runs fine, from within JBoss, I get the exception
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
| at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1476)
| at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174)
| at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:168)
| at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:847)
| at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:106)
| at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
| at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:815)
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1025)
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1038)
| at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:405)
| at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:170)
| at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:133)
| ... 84 more
| Caused by: sun.security.validator.ValidatorException: No trusted certificate found
| at sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator.java:304)
| at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:107)
| at sun.security.validator.Validator.validate(Validator.java:203)
| at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:172)
| at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:320)
| at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:840)
| ... 94 more
Can anyone tell me where the difference is between a ssl client in a standalone java application and a ssl client running in JBoss?
Regards,
Martin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008734#4008734
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008734
19 years, 2 months
[Management, JMX/JBoss] - Re: Persistence not quite working
by bossy
Aaa, but the attributes are updated through the MBean server, I just don't use a setter. What I've got is a separate method( exposed in the MBean) that does the job. It's the one called increaseCount
So my stats-config.xml look like this
<!DOCTYPE mbean PUBLIC
| "-//JBoss//DTD JBOSS XMBEAN 1.0//EN"
| "http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_0.dtd">
|
| <mbean>
| <description></description>
|
| <descriptors>
| <persistence persistPolicy="OnUpdate"
| persistPeriod="10"
| persistLocation="${jboss.server.data.dir}"
| persistName="StatsJNDIMap.ser"/>
| <currencyTimeLimit value="10"/>
| <state-action-on-update value="keep-running"/>
| <persistence-manager value="org.jboss.mx.persistence.ObjectStreamPersistenceManager" />
| </descriptors>
|
| <class>org.jboss.test.jmx.xmbean.JNDIMap</class>
|
| <constructor>
| <description>The default constructor</description>
| <name>JNDIMap</name>
| </constructor>
|
|
| <!-- Attributes -->
|
| <attribute access="read-write" getMethod="getStartDate" setMethod="setStartDate">
| <description>Start Date</description>
| <name>Start Date</name>
| <type>java.lang.String</type>
| </attribute>
|
|
| <attribute access="read-only" getMethod="getInBoxReqCount" >
| <description>Number of requests</description>
| <name>Get Message Requests</name>
| <type>java.lang.String</type>
|
| </attribute>
|
| <operation impact="ACTION" >
| <description>increase Count</description>
| <name>increaseCount</name>
| <parameter>
| <description>Property</description>
| <name>prop</name>
| <type>java.lang.String</type>
| </parameter>
| </operation>
| ... more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008733#4008733
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008733
19 years, 2 months
[Clustering/JBoss] - independent hajndi cluster
by abosch
hi!
im trying to setup two different cluster services, one with main cluster (session replication, etc) and the other one with ony HAJNDI clustering.
the goal is what documentation calls sub-partitions, a feature that is not ready yet and i think will never do for version 3.2.8.
i got several pair clustered environments and now i want to share their jndi globally to allow clients know where is every class and redirect its petitions.
i want to create a new file to copy it to existing clusters so they join new jndi partition. i've created an additional file under deploy called clusterjndi-service.xml and configured just two mbeans:
org.jboss.ha.framework.server.ClusterPartition
org.jboss.ha.jndi.HANamingService
do i need to add any other mbean to make this configuration working?
is there any documentation about this scenario?
regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008729#4008729
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008729
19 years, 2 months
[Security & JAAS/JBoss] - configure Jboss 4.0.4 to use Jaas
by aleksab
Hello,
I'm having a problem with Jaas and Jboss. read all the faqs, tutorials, examples,books i've come across. I've followed all the examples, but I can't get Jaas to talk with the Jboss AS.
According to the docs, Jaas should automatically pass the context information to the jboss as...
I have a standalone client, which authenticate the users and lookup the bean. However, when trying to call a bean method, no security meachanisms are executed. Have a @DenyAll on my ejb methods, so they should not be allowed to execute. But they do.
If a tag the bean with a SecurityDomain (haven't seen any examples using that, but thought to give it a try), i get a missing users.properties file. Howevere, i don't want to authenticate with the users.properties, but using Jaas.
So, must I configure JBoss and/or Jaas before using Jaas? I'm using the Jboss AS 4.0.4 with EJB 3.0
Please help me or redirect me somewhere else.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008727#4008727
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008727
19 years, 2 months