[JBoss Seam] - Unable to unit tests for similar reasons.
by sidragon
I have been fighting with this problem for days now. I get the following stack trace when trying to get components:
javax.naming.NamingException: Local server is not initialized
| at org.jnp.interfaces.LocalOnlyContextFactory.getInitialContext(LocalOnlyContextFactory.java:45)
| at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
| at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
| at javax.naming.InitialContext.init(InitialContext.java:223)
| at javax.naming.InitialContext.<init>(InitialContext.java:197)
| at org.jboss.seam.util.Naming.getInitialContext(Naming.java:26)
| at org.jboss.seam.util.Naming.getInitialContext(Naming.java:37)
| at org.jboss.seam.Component.instantiate(Component.java:774)
| at org.jboss.seam.Component.newInstance(Component.java:731)
| at org.jboss.seam.Component.newInstance(Component.java:1308)
| at org.jboss.seam.Component.getInstance(Component.java:1263)
| at org.jboss.seam.Component.getInstance(Component.java:1253)
| at net.sidragon.seam.example.RegistrationTest$1.invokeApplication(RegistrationTest.java:39)
| at org.jboss.seam.mock.SeamTest$Script.run(SeamTest.java:242)
| at net.sidragon.seam.example.RegistrationTest.testPersonRegister(RegistrationTest.java:21)
I am following the examples almost precisely (aside from my own application considerations), but no matter what I cannot get around this. I get another exception as well when trying to access my data source.
javax.persistence.PersistenceException: No Persistence provider for EntityManager named seamExampleDatasource
| at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:41)
| at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:27)
| at net.sidragon.seam.example.PersonRegisterActionTest.testPersonRegisterAction(PersonRegisterActionTest.java:19)
My "applicaiton" (it is just a toy for learning Seam) works great when running live in JBoss, so I think all my configuration is correct.
Can someone provide me with a checklist of things to look into? I will also gladly provide bits of this as requested. (Dumping all of it here would be time consuming and probably of little value. Generally assume that I am doing things as specified by the Booking example.)
Any help would be greatly appreciated!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968400#3968400
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968400
19 years, 7 months
[Clustering/JBoss] - Cluster Partition Name
by adias@unimedbh.com.br
Hi,
I´m new to JBoss clustering. I would like to know what xml files should I edit in order to change partition name.
I´ve searched for all references containing the word 'DefaultPartition' in all the files of $JBOSS_HOME/server/all/deploy and changed to the new partition name (e.g. labejb) and I found references in the files below:
cluster-services.xml
schedule-manager-service.xml
deploy-hasingleton-service.xml
I had problems deploying the first file, since it shows me the following error message:
11:56:23,094 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: jboss:service=HASessionState
State: FAILED
Reason: javax.naming.NameAlreadyBoundException: /HASessionState/Default already exists in the NonSerializableFactory map
I Depend On:
jboss:service=Naming
jboss:service=labejb
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss:service=HASessionState
State: FAILED
Reason: javax.naming.NameAlreadyBoundException: /HASessionState/Default already exists in the NonSerializableFactory map
I Depend On:
jboss:service=Naming
jboss:service=labejb
Anyone can tell me what files should be edited?
Thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968398#3968398
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968398
19 years, 7 months
[JBoss Seam] - Re: How to use conversationPropagation=
by metaman
Well this sounds so incredibly much like a really annoying bug I am having right now....
Sadly, the current state of Seam CVS seems to be pretty unstable.
After pulling it from CVS, running ant with the default target, und copying the three resulting jars together with all jars from lib to a project generated with SeamGen, then ant deploy in that project... That string of events generates one of the longest stack traces, which I have seen in a while, if I attempt to run it.
(For clarity, I genereated a new-scaffold with a current SeamGen, and the copied the mentioned libraries to the lib folder, after deleting the old ones.)
If you want I can post the stack trace, but I am pretty sure, Seam CVS is just that right now: not stable.
But, if by fix, you mean the 3 changed lines in jboss-seam/src/*/Manager.java, then I am going to attempt a backport of the fix.
I really am wondering why this glaring bug was not found earlier. BTW, when is the next minor bug fixing release of Seam ? :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968395#3968395
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968395
19 years, 7 months
[JBoss Portal] - getRemoteUser null after basic authentication
by klj62
We have successfully applied a security-constraint with basic authentication to "/*" which generates the expected login popup. After entering valid information, the user is theoretically authenticated, but the request.getRemoteUser() continues returning null.
When the security constraint is applied to a specific Login.jsp page that prints getRemoteUser(), the popup appears, and the page successfully prints it. Any subsequent pages again shows getRemoteUser() as null.
How can the authenticated user be applied to all pages?
Server Configuration:
O/S: Windows XP Pro SP2
App Server: JBoss 4.0.3SP1
Portal: JBoss Portal 2.2.1-GA
Application Configuration:
[web.xml]
<security-constraint>
<web-resource-collection>
<web-resource-name>HtmlAdaptor</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>PortalUser</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>MyAuthentication</realm-name>
</login-config>
<security-role>
The role required to access restricted content
<role-name>PortalUser</role-name>
</security-role>
[login-config.xml]
<application-policy name="MyAuthentication">
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag = "required">
<module-option name="usersProperties">props/my-users.properties</module-option>
<module-option name="rolesProperties">props/my-roles.properties</module-option>
</login-module>
</application-policy>
[jboss-web.xml]
<jboss-web>
<security-domain>java:jaas/MyAuthentication</security-domain>
</jboss-web>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968392#3968392
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968392
19 years, 7 months
[JBossWS] - Re: Problem with wsdl, accessing a WebMethod in a statelessS
by elster
Firstly Doug i have to say thankya for your reply.
Nevertheless it isn't working in that way. I've changed my method from
| @WebMethod(operationName="HelloWorld")
| @WebResult(name="Hello")
| public String HelloWorld(){
| return "Hello World";
| }
|
to
| @WebMethod(operationName="HelloWorld")
| @Webresult(name="parameters")
| public String HelloWorld(){
| return "Hello World";
| }
and all what had changed was line 9 to 11 in the jboss.wsdl from hello to parameters
| <s:sequence>
| <s:element name="hello" nillable="true" type="s:string" />
| </s:sequence>
As far as i can see there are no other changes in the wsdl document. I think the @WebResult annotation has no impact on the
| <message name="CustomersSessionBean_HelloWorldResponse">
| <part name="result" element="s0:HelloWorldResponse" />
| </message>
name attribute within the part tag. to alter this entry from result to parameters would be great. Any hints how to change that would be appreciated. Thank you.
best greetings from hamburg
Dirk
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968390#3968390
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968390
19 years, 7 months