[JBoss-user] [Installation, Configuration Deployment] - Deployment Dependency Not Working

2006-02-03 Thread tomansley
Hi all,

I am trying to deploy a hibernate service that uses a datasource.  But, when 
JBoss starts the service attempts to deploy before the datasource even though I 
have a  tag that specifies the datasource.

Can anybody explain to me why it is not working?

Cheers
Tom

Hibernate MBean Service XML
---

  | server
  | mbean code=org.hibernate.jmx.HibernateService 
name=jboss.jca:service=HibernateFactory,
  | name=HibernateFactory
  | dependsjboss.jca:service=RARDeployer/depends
  | dependsjboss.jca:service=LocalTxCM,name=PostgresDS/depends
  | attribute 
name=MapResourcescom/camp/common/accounting/ApplicationAccounting.hbm.xml,
  | 
com/camp/common/action/Action.hbm.xml,
  |
com/camp/common/cabin/Cabin.hbm.xml,
  |
com/camp/common/cabin/CabinAssignment.hbm.xml,
  |
com/camp/common/cabin/CabinAssignmentCamper.hbm.xml,
  |
com/camp/common/cabin/CabinAssignmentStaff.hbm.xml,
  |
com/camp/common/camper/Camper.hbm.xml,
  |
com/camp/common/creditcard/CreditCard.hbm.xml,
  |
com/camp/common/config/global/GlobalConfigSetting.hbm.xml,
  |
com/camp/common/config/user/Principal.hbm.xml,
  |
com/camp/common/config/user/PrincipalRole.hbm.xml,
  |
com/camp/common/config/user/Role.hbm.xml,
  |
com/camp/common/config/user/UserConfigSetting.hbm.xml,
  |
com/camp/common/country/Country.hbm.xml,
  |
com/camp/common/family/Family.hbm.xml,
  |
com/camp/common/family/FamilyStatus.hbm.xml,
  |
com/camp/common/inquiry/InquiryStatus.hbm.xml,
  |
com/camp/common/inquiry/Inquiry.hbm.xml,
  |
com/camp/common/medical/CamperMedicalIncident.hbm.xml,
  |
com/camp/common/medical/MedicalCategory.hbm.xml,
  |
com/camp/common/medical/MedicalIncidentLocation.hbm.xml,
  |
com/camp/common/medical/StaffMedicalIncident.hbm.xml,
  |
com/camp/common/menu/Menu.hbm.xml,
  |
com/camp/common/menu/MenuItem.hbm.xml,
  |
com/camp/common/menu/MenuItemParam.hbm.xml,
  |
com/camp/common/registration/Registration.hbm.xml,
  |
com/camp/common/registration/RegistrationMedical.hbm.xml,
  |
com/camp/common/registration/RegistrationSession.hbm.xml,
  |
com/camp/common/payment/RegistrationPayment.hbm.xml,
  |
com/camp/common/charge/RegistrationCharge.hbm.xml,
  |
com/camp/common/report/Report.hbm.xml,
  |
com/camp/common/report/ReportGroup.hbm.xml,
  |
com/camp/common/report/ReportOrder.hbm.xml,
  |
com/camp/common/report/ReportParameter.hbm.xml,
  |
com/camp/common/school/School.hbm.xml,
  |
com/camp/common/search/Search.hbm.xml,
  |
com/camp/common/search/SearchItem.hbm.xml,
  |
com/camp/common/session/Session.hbm.xml,
  |   

[JBoss-user] [Security JAAS/JBoss] - Re: Second Call fails

2005-06-21 Thread tomansley
Did you ever get this issue fixed?  I am having the same trouble.  I have also 
installed the patch that was put out to fix the error supposedly but it still 
does not work.

Here is the patch link in case you haven?t tried it.

http://prdownloads.sourceforge.net/jboss/jbas-1875-patch.zip?download

Thanks
Tom


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3882268#3882268

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3882268


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - Re: 4.0.2 and Spring and hot deployment of SLSB

2005-05-26 Thread tomansley
These are probably all because you are using hibernate 2 and 4.0.2 upgraded to 
hibernate 3

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3879200#3879200

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3879200


---
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Beginners Corner] - Application error: BMT stateless bean transport should compl

2005-03-31 Thread tomansley
Hi all,

I am using the hibernate that comes with JBoss 4.0sp1 and am having this issue 
which seems to be an EJB error rather than a hibernate error.  

I am trying to update multiple entities of the same type in one transaction in 
one session. If the transaction only has one entity that needs updating then 
everything works fine. If I do the same process as with the one entity but do 
it multiple times it fails!!

What follows are the two mapping xml files, the stacktrace, some hibernate 
generated sql and the code between sessionFactory.openSession() and 
session.close(): 

Anybody got ideas?

Cheers
Tom

Hibernate version:
Its the version with JBoss 4.0sp1
2.1.8 I think

Mapping documents: There are two documents that need consideration. A 
TransportDestination has a TransportType and a TransportType has multiple 
TransportDestinations.

TransportType:




column name=id_transport_type sql-type=integer not-null=true/

tbltransporttype_id_transport_type_seq




column name=transport_type sql-type=char(64) not-null=true/



column name=session_name sql-type=char(64) not-null=true/




one-to-many class=com.camp.common.transport.TransportDestination/




AND TransportDestination




column name=id_destination sql-type=integer not-null=true/

tbltransportdestination_id_destination_seq




column name=code sql-type=char(3) not-null=true/



column name=name sql-type=char(128)/



column name=city sql-type=char(128) not-null=true/



column name=state sql-type=char(128) not-null=true/



column name=country sql-type=char(128) not-null=true/



column name=listed sql-type=boolean not-null=true/


many-to-one name=transportType 
class=com.camp.common.transport.TransportType column=fk_id_transport_type 
not-null=true/




Code between sessionFactory.openSession() and session.close():
Note: _transport_destinations = java.util.List

// Open Session
sess = sf.openSession();

// Create Transaction
Transaction t = sess.beginTransaction();

TransportDestination dest;
t = sess.beginTransaction();

//repeat as many times as there are destinations in the list
for (int i = 0; i  _transport_destinations.size(); i++) {

//get the destination
dest = (TransportDestination) _transport_destinations.get(i);

if (_operation.equals(Globals.ADD))
sess.save(dest);
else if (_operation.equals(Globals.UPDATE))
sess.update(dest);
else if (_operation.equals(Globals.DELETE))
sess.delete(dest);

}
t.commit();
sess.close();


Full stack trace of any exception that occurs:
11:58:38,480 INFO [STDOUT] Hibernate: update tblTransportDestination set 
code=?, name=?, city=?, state=?, country=?, listed=?, fk_id_transport_type=? 
where id_destination=?
11:58:38,480 INFO [STDOUT] Hibernate: update tblTransportDestination set 
code=?, name=?, city=?, state=?, country=?, listed=?, fk_id_transport_type=? 
where id_destination=?
11:58:38,480 INFO [STDOUT] Hibernate: update tblTransportDestination set 
code=?, name=?, city=?, state=?, country=?, listed=?, fk_id_transport_type=? 
where id_destination=?
11:58:38,488 INFO [transportEJB] Leaving modifyTransportDestinations
11:58:38,565 ERROR [TxInterceptorBMT] Application error: BMT stateless bean 
transport should complete transactions before returning (ejb1.1 spec, 11.6.1)
11:58:38,567 WARN [RequestProcessor] Unhandled Exception thrown: class 
java.rmi.RemoteException
11:58:38,568 ERROR [Engine] StandardWrapperValve[camp]: Servlet.service() for 
servlet camp threw exception
java.rmi.RemoteException: Application error: BMT stateless bean transport 
should complete transactions before returning (ejb1.1 spec, 11.6.1)
at 
org.jboss.ejb.plugins.AbstractTxInterceptorBMT.checkStatelessDone(AbstractTxInterceptorBMT.java:208)
at 
org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:157)
at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113)
at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:856)
at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at 

[JBoss-user] [Security JAAS/JBoss] - java.lang.SecurityException: Authentication exception, prin

2004-12-30 Thread tomansley
Hi all,

I have scoured the Internet and pounded my head against the wall for hours 
looking for answers to my questions.  I have found a bunch of stuff but nothing 
seems to be working for me.  I am beginning to think that I may be asking the 
wrong questions or totally am missing some basic principle!!

My main question is with regards to the security architecture between Tomcat 
and JBoss.  I have a struts web application which is run in the web container 
and some EJB's that run in the application container.  Nothing new there.

My question is with regards to how security works in this situation.  I am 
using JAAS and the DatabaseServerLoginModule.  How do the credentials and 
principals get passed around between the containers?  Does the JAAS security 
manager do everything for me or do I have to pass some of that information 
around when trying to get a Context in the app container from the web 
container. 

I currently have a system set up to where it will authenticate the user 
correctly, by creating a LoginContext and the first time I try to create an 
InitialContext everything works fine.  Then when the web user sends the next 
request to the web container, it fails when I try to create an InitialContext.  
Its almost as if I should be placing the Subject, which has been successfully 
authenticated into a place somewhere where the containers can get to them when 
trying to authorize.  Am I on the correct path?

I guess I am looking for an answer to my problem as much as I am looking for 
the correct way of looking at the big picture.  If there are any other sources 
that may help clarify this it would be much appreciated.

Below are the code snippets along with the error message I am getting.  It is 
the typical java.lang.SecurityException: Authentication exception, 
principal=null error.

What follows are:

login-config.xml snippet
LoginContext snippet (which works)
InitialContext snippet (which works the first time and never again)
log output from JBoss

-
login-config.xml snippet



application-policy name = Camp

login-module 
code=org.jboss.security.auth.spi.DatabaseServerLoginModule flag=required
module-option 
name=dsJndiNamejava:/PostgresDS/module-option
module-option name=principalsQuerySELECT password 
FROM tblPrincipals where username=?/module-option
module-option name=rolesQueryselect user_role as 
Roles, 'Roles' from tblRoles where username=?/module-option
/login-module
login-module code = org.jboss.security.ClientLoginModule 
flag=required/login-module 

/application-policy

NOTE: One thing to note here is that unless it returned the string Roles for 
the second column in the rolesQuery I could not get it authenticating AT ALL.  
Very weird.  It just came back with the principalRoles=null error that is so 
common.

--
LoginContext snippet



..
char[] pass = password.toCharArray();
PassiveCallbackHandler cbh = new PassiveCallbackHandler(userName, pass);
LoginContext lc = new LoginContext(Camp, cbh);
lc.login();
Subject s = lc.getSubject();
.


NOTE: Do I need to do something with the Subject after its been authenticated?  
DO I need to put it into the Context or into the Tomcat session?  I do not do 
anything with it after actually getting it from the LoginContext.

--
InitialContext snippet


..
System.out.println(Performing CAMP/report home lookup);
try {
Context ctx = new InitialContext();
Object home = ctx.lookup(CAMP/report);
report_home pSearch = (report_home) 
  PortableRemoteObject.narrow (home, report_home.class);
return pSearch.create();
} catch (Exception e) {
  e.printStackTrace();
}

NOTE:  Do I need to be giving the InitialContext the principal and credentials 
to the context before doing a lookup?

--
Log snippet


12:31:20,717 INFO  [STDOUT] Performing CAMP/report home lookup
12:31:20,950 INFO  [STDOUT] java.rmi.AccessException: SecurityException; nested 
exception is:
java.lang.SecurityException: Authentication exception, principal=null
12:31:20,952 INFO  [STDOUT] at 
org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:369)
12:31:20,954 INFO  [STDOUT] at 
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:124)
12:31:20,955 INFO  [STDOUT] at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
12:31:20,956 INFO  [STDOUT] at 
org.jboss.ejb.SessionContainer.internalInvokeHome(SessionContainer.java:613)

--


View the original post : 

[JBoss-user] [Security JAAS/JBoss] - Re: java.lang.SecurityException: Authentication exception,

2004-12-30 Thread tomansley
Oh, and two other things.

I am using jboss-4.0.1RC2.

In the login-config.xml I MUST have 

login-module code = org.jboss.security.ClientLoginModule flag = 
required/login-module

otherwise it doesn't authenticate or authorize but gives the:

java.lang.SecurityException: Authentication exception, principal=null

error

Any help appreciated.

Cheers

Tom

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3860233#3860233

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3860233


---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security JAAS/JBoss] - Re: Urgent production issue regarding to jboss security

2004-08-09 Thread tomansley
Make sure that you haven't got any old libraries or jars lying around.  Sometimes they 
get caught in the CLASSPATH and get used instead of the new ones.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3844605#3844605

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3844605


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink  Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security JAAS/JBoss] - javax.security.auth.login.FailedLoginException: Password Inc

2004-08-08 Thread tomansley
I have an interesting problem.  I am trying to get JAAS working on my JBoss 4.0 system 
working.  I have everything set up using the 
org.jboss.security.auth.spi.DatabaseServerLoginModule that is available to use in the 
JBoss framework.  I have everything hooked in but it is giving the error message in 
the heading.

What is so interesting about it is that the password seems to change whilst inside the 
callbackHandler.  Here is my callBackHandler and here is the bit of debugging that 
comes with it.

If any more information is needed please shout at me.

Any help appreciated.

##
This is the callback handler
##
public class PassiveCallbackHandler implements CallbackHandler {

private String username;
private char[] password;

public PassiveCallbackHandler(String user, String pass) {
this.username = user;
System.out.println(Password1 = +pass);
for (int i = 0; i  pass.length(); i++) {

System.out.println(char at +i+ = +pass.charAt(i));

}
this.password = pass.toCharArray();
System.out.println(Password2 = +password);

}

#
This is the weird debugging that shows the password changing half way through
#

...

22:10:58,631 INFO  [STDOUT] Password1 = pass
22:10:58,632 INFO  [STDOUT] char at 0 = p
22:10:58,632 INFO  [STDOUT] char at 1 = a
22:10:58,632 INFO  [STDOUT] char at 2 = s
22:10:58,632 INFO  [STDOUT] char at 3 = s
22:10:58,632 INFO  [STDOUT] Password2 = [EMAIL PROTECTED]
22:10:58,659 INFO  [STDOUT] javax.security.auth.login.FailedLoginException: Password 
Incorrect/Password Required
.

What is up with Password2 changing to goobledeegook?

Cheers

Tom

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3844525#3844525

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3844525


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user