Re:[JBoss-user] Feature not implemented: no details -- ??
That was the problem exactly (LONGVARCHAR). Thanks so much for your help -- I would have been a long time in finding that on my own. -- John * Date: Wed, 13 Nov 2002 14:24:25 +1100 Subject: Re: [JBoss-user] Feature not implemented: no details -- ?? From: Stephen Coy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] On Wednesday, November 13, 2002, at 12:52 PM, John Snyder wrote: Feature not implemented I think this is coming from your JDBC driver. If my memory serves me correctly, it's a MySQL JDBC driver error. Are you trying to use CLOB's or LONGVARCHAR data mappings by any chance? JBoss 3.0.4 uses java.sql.ResultSet.getCharacterStream to retrieve the results for these JDBC types, and the MySQL JDBC driver doesn't support it. If this is the case, just use a jdbc type of VARCHAR instead. Steve Coy --- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Re: ClassCastException on redeploy of .ear
Hey, thanks for sharing your solution Robert. It turned out I had the same problem, and now I am good to go. This is very strange to me, since the jndi properties never changed between deployments. This was a really frustrating bug. But, thanks to you, I've got a workaround I can certainly live with. Thanks, -- John - Original Message - From: Robert Martin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, November 07, 2002 10:25 AM Subject: RE: [JBoss-user] Re: ClassCastException on redeploy of .ear I had this exact problem, but with an ejb jar instead of an ear. I could deploy the jar exactly once and it would work fine. After that I could never redeploy it without it permanently breaking. The only way to fix the problem was to shut down the server. After reading this message, I checked my jar and found that a jndi.properties file I use for client-side access had sneaked into the file. The contents of the jndi.properties were valid, but it shouldn't have been in the jar file. After removing the jndi.properties, everything works fine. Question - is the behavior described above a bug or a feature that we were accidentally misusing? It would seem to be a fairly severe vulnerability in the server that an errant jndi.properties file in a jar file can permanently break the server. Any insight? Thanks. Robert --- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd522.html ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Feature not implemented: no details -- ??
Hi all, I am getting an exception which I do not understand, and am hoping for some help. I have a servlet (RegistrationServlet), which creates a stateful session bean (RegistrationBean), which in turn uses a CMP entity bean called PersonBean. My problem arises when the RegistrationBean tries to call a method on a local interface to the PersonBean called bePlayedByPlayer(): Context jndiContext = getInitialContext(); Object ref = jndiContext.lookup(PersonHomeLocal); PersonHomeLocal personHome = (PersonHomeLocal) PortableRemoteObject.narrow(ref,PersonHomeLocal.class); PersonLocal person = personHome.findByPrimaryKey(personPK); // Everything is fine until this next line: person.bePlayedByPlayer( username, password, email); Presently, the bePlayedByPlayer method of the Person Bean does virtually nothing: public void bePlayedByPlayer(String playerName, String password, String email) { System.out.println(In bePlayedByPlayer() method of PersonBean...); } The Person bean is a CMP bean, with abstract methods which include: public abstract String getFname(); public abstract void setFname(String fname); The exception I am getting says: Error: javax.servlet.ServletException: Internal error getting results for field member fname; CausedByException is: Feature not implemented: no details.; CausedByException is: Internal error getting results for field member fname; CausedByException is: Feature not implemented: no details.; nested exception is: javax.ejb.EJBException: Internal error getting results for field member fname; CausedByException is: Feature not implemented: no details. I don't understand why the Exception should even be making reference to field member fname, when the method called does not in any way make use of that field, or indeed, any field. Could anyone tell me what might be causing this -- I have never seen this kind of error before. Thanks for any help. The full Exception is: javax.servlet.ServletException: Internal error getting results for field member fname; CausedByException is: Feature not implemented: no details.; CausedByException is: Internal error getting results for field member fname; CausedByException is: Feature not implemented: no details.; nested exception is: javax.ejb.EJBException: Internal error getting results for field member fname; CausedByException is: Feature not implemented: no details. at com.pc.servlets.RegistrationServlet.doRequest(RegistrationServlet.java:58) at com.pc.servlets.BaseServlet.doPost(BaseServlet.java:33) at com.pc.servlets.BaseServlet.doGet(BaseServlet.java:28) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java :465) at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher. java:683) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch er.java:431) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher .java:355) at com.pc.servlets.RouterServlet.doRequest(RouterServlet.java:28) at com.pc.servlets.BaseServlet.doPost(BaseServlet.java:33) at com.pc.servlets.BaseServlet.doGet(BaseServlet.java:28) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java :465) at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:475) at
[JBoss-user] FileNotFoundException Accessing Session bean from Servlet
Hello all, Using jboss-3.0.0_tomcat-4.0.3, I am trying to access a Session bean called Registration from within a servlet, both of which are part of an application called pc, deployed as pc.ear. I can access the bean with no problem from a stand-alone client, with the following code: Context jndiContext = getInitialContext(); Object ref = jndiContext.lookup("RegistrationHomeRemote"); RegistrationHomeRemote registrationHome = (RegistrationHomeRemote) PortableRemoteObject.narrow(ref,RegistrationHomeRemote.class); RegistrationRemote registration = registrationHome.create(); registration.remove(); When I placed this code in a TestServlet, however, I initially got a ClassCastException at the third line. Some research in the forums and the manual suggested to me that I did not have everything specified correctly in my deployment descriptors. After some tinkering, I no longer get a ClassCastException. However, I do get the following Exception: javax.servlet.ServletException: Could not activate; nested exception is: java.io.FileNotFoundException: C:\Java\jboss\jboss-3.0.0_tomcat-4.0.3\server\default\db\sessions\Registration\1036311619820.ser (The system cannot find the file specified) at com.pc.servlets.TestServlet.doRequest(TestServlet.java:44) at com.pc.servlets.BaseServlet.doPost(BaseServlet.java:33) at com.pc.servlets.BaseServlet.doGet(BaseServlet.java:28) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:446) at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107) at java.lang.Thread.run(Thread.java:536) Could anyone shed any light on what's happening here? My deployment descriptors (in relevant part) are as follows: ejb.jar: session display-nameRegistration/display-name ejb-nameRegistration/ejb-name homecom.pc.ejb.session.interfaces.RegistrationHomeRemote/home remotecom.pc.ejb.session.interfaces.RegistrationRemote/remote ejb-classcom.pc.ejb.session.beans.RegistrationBean/ejb-class session-typeStateful/session-type
[JBoss-user] ClassCastException on redeploy of .ear
Hello all,Using jboss-3.0.0_tomcat-4.0.3, I am trying to access a Session bean called Registration from within a servlet, both of which are part of an application called pc, deployed as pc.ear. Here is the code Im using to do it: Context jndiContext = getInitialContext();Object ref = jndiContext.lookup("RegistrationHomeRemote");RegistrationHomeRemote registrationHome = (RegistrationHomeRemote)PortableRemoteObject.narrow(ref,RegistrationHomeRemote.class); RegistrationRemote registration = registrationHome.create(); registration.remove(); Everything works fine when I start jboss fresh and deploy the ear. However, as soon as I make a change to any file and re-deploy the ear, I get a ClassCastException at the third line. Im totally stumped why would it work on initial deployment, then stop working on re-deployment??? Any help would be most appreciated. My deployment configuration files are as follows: ejb.jar:sessiondisplay-nameRegistration/display-name ejb-nameRegistration/ejb-name homecom.pc.ejb.session.interfaces.RegistrationHomeRemote/homeremotecom.pc.ejb.session.interfaces.RegistrationRemote/remoteejb-classcom.pc.ejb.session.beans.RegistrationBean/ejb-classsession-typeStateful/session-typetransaction-typeContainer/transaction-type /sessionjboss.xml:sessionejb-nameRegistration/ejb-namejndi-nameRegistrationHomeRemote/jndi-name/sessionweb.xml:servletservlet-nameRegistrationServlet/servlet-nameservlet-classcom.pc.servlets.RegistrationServlet/servlet-class/servletejb-refejb-ref-nameRegistration/ejb-ref-nameejb-ref-typeSession/ejb-ref-typehomeRegistrationHomeRemote/homeremoteRegistrationRemote/remoteejb-linkRegistration/ejb-link/ejb-refjboss-web.xml:ejb-refejb-ref-nameRegistration/ejb-ref-namejndi-namepc/RegistrationHomeRemote/jndi-name/ejb-ref
[JBoss-user] Re: FileNotFoundException Accessing Session bean from Servlet
That makes sense -- thanks. Are there any configuration changes I have to make to deployment or service descriptors when I move from 3.0 to 3.0.4, or should what I have for 3.0 work in the upgraded version, too? If there are modifications, is there any documentation listing the needed changes? Thanks again, -- John Message: 4 Date: Sun, 3 Nov 2002 08:48:29 -0800 Subject: Re: [JBoss-user] FileNotFoundException Accessing Session bean from Servlet From: Scott M Stark [EMAIL PROTECTED] To: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] --Apple-Mail-2-52851237 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; delsp=yes; charset=ISO-8859-1; format=flowed This happens when the stateful session has been removed due to inactivity. The default timeout is 30 minutes. jboss-3.0.0 is now =20 getting to be a rather out of date version so lookup into updating to 3.0.4. --- This SF.net email is sponsored by: ApacheCon, November 18-21 in Las Vegas (supported by COMDEX), the only Apache event to be fully supported by the ASF. http://www.apachecon.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Re: ClassCastException on redeploy of .ear
) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 1027) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125 ) at java.lang.Thread.run(Thread.java:536) From: Scott M Stark [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] ClassCastException on redeploy of .ear Date: Sun, 3 Nov 2002 09:50:30 -0800 Organization: JBoss Group, LLC Reply-To: [EMAIL PROTECTED] This is a multi-part message in MIME format. --=_NextPart_000_003B_01C2831E.71BE4E30 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Bug in 3.0.0. Upgrade to 3.0.4. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message -=20 From: John Snyder=20 To: [EMAIL PROTECTED]=20 Sent: Sunday, November 03, 2002 9:31 AM Subject: [JBoss-user] ClassCastException on redeploy of .ear Hello all, Using jboss-3.0.0_tomcat-4.0.3, I am trying to access a Session bean = called Registration from within a servlet, both of which are part of an = application called pc, deployed as pc.ear. Here is the code I'm using = to do it: =20 Context jndiContext =3D getInitialContext(); Object ref =3D jndiContext.lookup(RegistrationHomeRemote); RegistrationHomeRemote registrationHome =3D (RegistrationHomeRemote) PortableRemoteObject.narrow(ref,RegistrationHomeRemote.class);=20 RegistrationRemote registration =3D registrationHome.create();=20 registration.remove(); =20 Everything works fine when I start jboss fresh and deploy the ear. = However, as soon as I make a change to any file and re-deploy the ear, I = get a ClassCastException at the third line. I'm totally stumped - why = would it work on initial deployment, then stop working on = re-deployment??? Any help would be most appreciated. =20 My deployment configuration files are as follows: =20 ejb.jar: session display-nameRegistration/display-name=20 ejb-nameRegistration/ejb-name=20 homecom.pc.ejb.session.interfaces.RegistrationHomeRemote/home remotecom.pc.ejb.session.interfaces.RegistrationRemote/remote ejb-classcom.pc.ejb.session.beans.RegistrationBean/ejb-class session-typeStateful/session-type transaction-typeContainer/transaction-type=20 /session jboss.xml: session ejb-nameRegistration/ejb-name jndi-nameRegistrationHomeRemote/jndi-name /session web.xml: servlet servlet-nameRegistrationServlet/servlet-name servlet-classcom.pc.servlets.RegistrationServlet/servlet-class /servlet ejb-ref ejb-ref-nameRegistration/ejb-ref-name ejb-ref-typeSession/ejb-ref-type homeRegistrationHomeRemote/home remoteRegistrationRemote/remote ejb-linkRegistration/ejb-link /ejb-ref jboss-web.xml: ejb-ref ejb-ref-nameRegistration/ejb-ref-name jndi-namepc/RegistrationHomeRemote/jndi-name /ejb-ref --- This SF.net email is sponsored by: ApacheCon, November 18-21 in Las Vegas (supported by COMDEX), the only Apache event to be fully supported by the ASF. http://www.apachecon.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] DatabaseServerLoginModule - failing authentication?
Hello all, I am trying to use the DatabaseServerLoginModule with jboss-3.0.0_tomcat-4.0.3, using a FORM login. All I am trying to do at this point is to secure a JSP page called Office.jsp. When I try to go to the JSP page, the login page comes up, as expected based on the web.xml configuration. When I fill in the username and password (for j_username and j_password), then click the submit button (action="j_security_check"), the JBoss console displays, "Added PC_CloudscapeDbRealm, org.jboss.security.plugins.SecurityDomainContext@a631cc to map", which I believe is telling me that JBoss is applying the PC_CloudscapeDbRealm security realm, which is what I want. My problem is twofold: First, I am not authenticated when I log in with a username/password combination that should pass authentication (the combination is in my security table). Second, if authentication fails, I should be redirected to the failed login page specified in my web.xml file, but I am not -- instead, the web browser just displays a Status 403 page, saying, "message Access to the requested resource has been denied" and "description Access to the specified resource (Access to the requested resource has been denied) has been forbidden." Can anyone please explain this behavior, and more importantly, how to fix it? The relevant configuration files are as follows (in relevant part): web.xml: !-- Security -- security-constraint web-resource-collection web-resource-nameOffice/web-resource-name url-pattern/jsp/Office.jsp/url-pattern /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- role-namePlayer/role-name /auth-constraint /security-constraint !-- The realm-name in web.xml must match with the application-policy entry in login-config.xml for JBoss' JAAS -- login-config auth-methodFORM/auth-method realm-namePC_CloudscapeDbRealm/realm-name form-login-config form-login-page/html/Login.html/form-login-page form-error-page/html/Login.html?valid=no/form-error-page /form-login-config /login-config jboss-web.xml (in WEB-INF directory of war file): jboss-web security-domainjava:/jaas/PC_CloudscapeDbRealm/security-domain /jboss-web login-config.xml: application-policy name = "CloudscapeDbRealm" authentication login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required" module-option name = "principal"pc/module-option module-option name = "userName"pc/module-option module-option name = "password"/module-option module-option name = "managedConnectionFactoryName"jboss.jca:service=LocalTxCM,name=CloudscapeDS/module-option /login-module /authentication /application-policy application-policy name = "PC_CloudscapeDbRealm" authentication login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule" flag = "required" module-option name="dsJndiName"java:/CloudscapeDS/module-option module-option name="principalsQuery"select password from app.Player where playername=?/module-option module-option name="rolesQuery"select securityRoleName, securityRoleGroupName from app.SecurityRole where principalid=?/module-option module-option name = "managedConnectionFactoryName"jboss.jca:service=LocalTxCM,name=CloudscapeDS/module-option /login-module /authentication /application-policy Any help would be greatly appreciated. Thanks a lot in advance, -- John
[JBoss-user] Re: DatabaseServerLoginModule - failing authentication?
On further testing and research, it looks like I was not failing authentication -- rather, I was authenticated, but I was not assigned the role, "Player". This explains why I was not routed to the authentication failure page. However, I am still at a loss to see why I am not being placed in the "Player" role. I am logging in with a username of "jrssnyder", the DatabaseServerLoginModule specifies a rolesQuery of "select securityRoleName, securityRoleGroupName from app.SecurityRole where principalid=?", and when I run the query, " select securityRoleName, securityRoleGroupName from app.SecurityRole where principalid='jrssnyder' " I get back: a securityRoleName of "Player" and a securityRoleGroupName of "PlayerGroup". Yet, when I create a JSP page to handle the 403 error, request.isUserInRole(''Player'') returns false. Why would this be? Please help if you can, -- Thanks a lot. *** Former post: Hello all,I am trying to use the DatabaseServerLoginModule with =jboss-3.0.0_tomcat-4.0.3, using a FORM login. All I am trying to do at =this point is to secure a JSP page called Office.jsp.When I try to go to the JSP page, the login page comes up, as expected =based on the web.xml configuration. When I fill in the username and =password (for j_username and j_password), then click the submit button =(action="3D"j_security_check")," the JBoss console displays, "Added =PC_CloudscapeDbRealm, =org.jboss.security.plugins.SecurityDomainContext@a631cc to map", which I =believe is telling me that JBoss is applying the PC_CloudscapeDbRealm =security realm, which is what I want.My problem is twofold:First, I am not authenticated when I log in with a username/password =combination that should pass authentication (the combination is in my =security table).Second, if authentication fails, I should be redirected to the failed =login page specified in my web.xml file, but I am not -- instead, the =web browser just displays a Status 403 page, saying, "message Access to =the requested resource has been denied" and "description Access to the =specified resource (Access to the requested resource has been denied) =has been forbidden."=20Can anyone please explain this behavior, and more importantly, how to =fix it? The relevant configuration files are as follows (in relevant =part):web.xml:!-- Security --security-constraint=20web-resource-collectionweb-resource-nameOffice/web-resource-nameurl-pattern/jsp/Office.jsp/url-pattern/web-resource-collection=20auth-constraint!-- Anyone with one of the listed roles may access this area --role-namePlayer/role-name/auth-constraint/security-constraint=20!-- The realm-name in web.xml must match with the =application-policy entry in=20login-config.xml for JBoss' JAAS --login-configauth-methodFORM/auth-methodrealm-namePC_CloudscapeDbRealm/realm-nameform-login-config=20form-login-page/html/Login.html/form-login-pageform-error-page/html/Login.html?valid=3Dno/form-error-page/form-login-config=20/login-configjboss-web.xml (in WEB-INF directory of war file):jboss-websecurity-domainjava:/jaas/PC_CloudscapeDbRealm/security-domain/jboss-weblogin-config.xml:application-policy name =3D "CloudscapeDbRealm"authenticationlogin-module code =3D ="org.jboss.resource.security.ConfiguredIdentityLoginModule" flag =3D ="required"module-option name =3D "principal"pc/module-optionmodule-option name =3D "userName"pc/module-optionmodule-option name =3D "password"/module-optionmodule-option name =3D ="managedConnectionFactoryName"jboss.jca:service=3DLocalTxCM,name=3DCloud=scapeDS/module-option/login-module/authentication/application-policyapplication-policy name =3D "PC_CloudscapeDbRealm"authenticationlogin-module code =3D ="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag =3D ="required"module-option name=3D"dsJndiName"java:/CloudscapeDS/module-optionmodule-option name=3D"principalsQuery"select password from app.Player =where playername=3D?/module-optionmodule-option name=3D"rolesQuery"select securityRoleName, =securityRoleGroupName from app.SecurityRole where =principalid=3D?/module-optionmodule-option name =3D ="managedConnectionFactoryName"jboss.jca:service=3DLocalTxCM,name=3DCloud=scapeDS/module-option/login-module/authentication/application-policyAny help would be greatly appreciated.Thanks a lot in advance,-- John
[JBoss-user] Re: DatabaseServerLoginModule - failing authentication?
I solved this problem. For those who are interested: 1) Apparently, the DatabaseServerLoginModule does not like underscores in the application-policy name, and/or 2) The value of the role group column must be 'Roles'. Hope somebody besides me can learn something from this.
[JBoss-user] ClassNotFoundException when working with Template
Newbie here, I am working on a Win2K system with the jboss-3.0.0_tomcat-4.0.3 package, and am trying to build a simple test case in the Template. It seems that I am getting an incomplete .jar file, which does not contain my classes, and I would greatly appreciate any explanation of what I am doing wrong. JBoss.3.0QuickStart.Draft3.pdf says: "Most likely you want to add you own package structure and that is not a problem because under "/main/client", "/main/ejb" or "/main/servlet" you can use any directory structure you like but must not add client code to another directory than "/main/client" and the same applies for EJBs and servlets." So, under the \main\ejb directory, I created com\pc\session\utility. In the utility directory, I have a class called SequenceGeneratorBean.java (code below). Additionally, under the \main\client directory I created com\pc, and in the pc directory I created a class called TestClient.java (code below). I modified the ant.properties file to reflect that I am using Cloudscape as my data source, and to specify the location of my servlet jar files, as follows: # Set the DB type mapping (Hypersonic SQL, PostgreSQL etc., see XDoclet's jboss attribute "typemapping") type.mapping=Cloudscape SQL # Set the DataSource name your are going to use (java:/DefaultDS etc., see XDoclet's jboss attribute "datasource") datasource.name=java:/CloudscapeDS # Uncomment this and adjust the path to point directly to JAR file containing the servlet classes # Attention: By uncommenting this line you start the creation of a WAR file servlet-lib.path=C:/Java/jboss/jboss-3.0.0_tomcat-4.0.3/server/all/lib/javax.servlet.jar When I ran ant, everything seemed to go OK (see ant output, below). However, in the JBoss monitor window, I got the following errors: *** 09:50:28,323 INFO [EJBDeployer] Bean : com/pc/session/utility/SequenceGenerator Section: 22.2 Warning: The Bean Provider must specify the fully-qualified name of the Java class that implements the enterprise bean's business methods in the ejb-class element. Info : Class not found: com.pc.session.utility.SequenceGeneratorBean [... ] 09:50:28,553 ERROR [EjbModule] Initialization failed java.lang.ClassNotFoundException: com.pc.session.utility.SequenceGeneratorHome at java.net.URLClassLoader$1.run(URLClassLoader.java:198) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) [I can provide additional tracing information and additional errors which follow, if it would be helpful.] *** When I ran the run-client.bat script modified to execute com.pc.TestClient, I also got "java.lang.NoClassDefFoundError: com/pc/TestClient" The only two jar files created when I ran ant were ejb-test.jar and web-client.war. When I un-jarred ejb-test.jar, I found none of the com.pc package anywhere. Obviously, I am missing something -- there must be more to coding in the template than just adding subdirectories and creating classes, but I can't seem to find any more detailed documentation. I would be very grateful for any assistance. Thanks, -- Rick SequenceGeneratorBean.java: *** package com.pc.session.utility; import java.rmi.*; import javax.ejb.*; import java.util.*; import java.sql.*; import javax.sql.*; import javax.naming.*; /** * Encapsulates the retrival of DB data * * @author John Snyder * @version $Revision: 1.1 $ * * @ejb:bean name="com/pc/session/utility/SequenceGenerator" * display-name="Generates unique Identifier for an Entity" * type="Stateless" * jndi-name="ejb/com/pc/session/utility/SequenceGenerator" * @ejb:env-entry name="DataSource_Name" * value="CloudscapeDS" * @ejb:resource_ref res-name="jdbc/CloudscapeDS" */ public class SequenceGeneratorBean implements SessionBean { // for testing String status = "unset"; public String getStatus() { return status; } // Members private SessionContext context; // Work Methods /** * Delivers the next sequence number from the given table * * @param entityTableName Name of the table for which the next primary key is needed * @param pkFieldName Name of the primary key field * * @return Next sequence number * * @throws RemoteException * * @ejb:interface-method view-type="remote" * @ejb:transaction type="Mandatory" **/ public int getNextNumber(String entityTableName, String pkFieldName) throws SQLException, NamingException { //local Connection Connection con = null; try { con = getConnection("java:/CloudscapeDS"); int nextNumber = -1; String getNextNumberSQL = "SELECT max("+pkFieldName+") FROM "+entityTableName; Statement stmt = con.createStatement(); ResultSet rs = stm
[JBoss-user] NoClassDefFoundError: org/apache/catalina/LifecycleListener
I have downloaded and unzipped the jboss-3.0.0_tomcat-4.0.3 package. When I try to start jboss with the run.bat -c default command, I get the deployment error below. This is on a Windows 2000 machine.Could anyone PLEASE explain what I can do about this -- I can't do anything with JBoss if it won't even start properly!Thanks so very much for any help,-- John===.JBoss Bootstrap Environment.JBOSS_HOME: c:\Java\jboss\jboss-3.0.0_tomcat-4.0.3\bin\\...JAVA: C:\Java\j2sdk1.4.0_02\bin\java.JAVA_OPTS: -Dprogram.name=run.bat.CLASSPATH: ;C:\Java\j2sdk1.4.0_02\lib\tools.jar;c:\Java\jboss\jboss-3.0.0_tomcat-4.0.3\bin\\run.jar.==[lots of stuff skipped ... ]19:36:36,196 INFO [MainDeployer] Successfully completed deployment of package: file:/C:/Java/jboss/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/tomcat4-service.jar19:36:36,367 ERROR [SARDeployer] create operation failed for package file:/C:/Java/jboss/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/tomcat4-service.xmlorg.jboss.deployment.DeploymentException: instantiating org.jboss.web.catalina.EmbeddedCatalinaServiceSX failed: java.lang.NoClassDefFoundError: org/apache/catalina/LifecycleListener; - nested throwable: (RuntimeErrorException: instantiating org.jboss.web.catalina.EmbeddedCatalinaServiceSX failed: java.lang.NoClassDefFoundError: org/apache/catalina/LifecycleListenerCause: java.lang.NoClassDefFoundError: org/apache/catalina/LifecycleListener)at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:178)at org.jboss.system.ServiceController.install(ServiceController.java:194)at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:324)at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)at $Proxy3.install(Unknown Source)at org.jboss.deployment.SARDeployer.create(SARDeployer.java:206)at org.jboss.deployment.MainDeployer.create(MainDeployer.java:637)at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:512)at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:324)at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)at $Proxy4.deploy(Unknown Source)at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405)at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:586)at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:465)at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:237)at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:162)at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:324)at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:894)at $Proxy0.start(Unknown Source)at org.jboss.system.ServiceController.start(ServiceController.java:340)at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:324)at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)at $Proxy3.start(Unknown Source)at org.jboss.deployment.SARDeployer.start(SARDeployer.java:243)at org.jboss.deployment.MainDeployer.start(MainDeployer.java:678)at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:513)at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:465)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j?Cava:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at
[JBoss-user] NoClassDefFoundError: org/apache/catalina/LifecycleListener
OK, I fixed this problem. Here's what it was, in case anybody else wants to know. The tomcat4-service.xmlfile, located at C:\[whatever]\jboss-3.0.0_tomcat-4.0.3\server\default\deploy,said this: ?xml version="1.0" encoding="UTF-8"? !-- Set catalina.home to the location of the Tomcat-4.x dist. The default value is that of the JBoss/Catalina bundle where the jakarta-tomcat-4.0.3-LE-jdk14 is included as jboss_dist/catalina -- !DOCTYPE server [ !ENTITY catalina.home "../catalina" ] Given the directory structure above, the location of catalina was incorrect. It is amazing to me that this error was present, since the developers of jboss presumably know the directory structure inside and out! Anyway, when I specified the correct location of catalina.home ("C:\Java\jboss\jboss-3.0.0_tomcat-4.0.3\server\default\deploy\catalina" or, alternatively I suppose, "../../../catalina"), everything else worked fine. -- John
[JBoss-user] web-client.war not deploying in template
Hello, I am trying to get set up with the template, as recommended in the documentation, and I have encountered a problem which I hope you can help with. Essentially, the web-client.war package is not deploying when I run ant on the build.xml file in the template download. Accordingly, I get a "page not found" error when I try to go to http://localhost:8080/web-client. When I run ant with jboss running, I see the following in the jboss console window (please note the last line): * 21:10:33,545 INFO [MainDeployer] Starting deployment of package: file:/C:/Java/jboss/jboss-3.0.0_tomcat-4.0.3/server/all/deploy/ejb-test.jar 21:10:33,735 INFO [EjbModule] Creating 21:10:33,755 INFO [EjbModule] Deploying test/TestBMPEntity 21:10:33,765 INFO [EjbModule] Deploying test/TestEntity 21:10:33,785 INFO [EjbModule] Deploying test/SequenceGenerator 21:10:33,795 INFO [EjbModule] Deploying test/TestSession 21:10:33,805 INFO [EjbModule] Deploying test/TestMessage 21:10:34,005 INFO [EjbModule] Created 21:10:34,005 INFO [EjbModule] Starting 21:10:34,095 INFO [test/TestEntity] Created table 'TESTENTITY' successfully. 21:10:34,095 INFO [EjbModule] Started 21:10:34,105 INFO [MainDeployer] Successfully completed deployment of package: file:/C:/Java/jboss/jboss-3.0.0_tomcat-4.0.3/server/all/deploy/ejb-test.jar 21:10:34,105 INFO [MainDeployer] Starting deployment of package: file:/C:/Java/jboss/jboss-3.0.0_tomcat-4.0.3/server/all/deploy/web-client.war 21:10:34,105 INFO [MainDeployer] Deployment of package: file:/C:/Java/jboss/jboss-3.0.0_tomcat-4.0.3/server/all/deploy/web-client.war is waiting for an appropriate deployer. *** I have started jboss with the "all" parameter, rather than the "default" parameter, because I got errors in the startup script with the default parameter.I modified the ant.properties file accordingly (see below). Here is the console output when I run ant on the build.xml file, which references ant.properties: * * ant @ C:\Java\jboss\template * Buildfile: build.xml check-environment: check-jboss: wrong-jboss: check-xdoclet: wrong-xdoclet: init: [echo] build.compiler = ${build.compiler} [echo] user.home = C:\Documents and Settings\John Snyder [echo] java.home = C:\Java\jdk1.3_1_02\jre [echo] ant.home = C:\ant\jakarta-ant-1.5\bin\\.. [echo] jboss.home = C:/Java/jboss/jboss-3.0.0_tomcat-4.0.3 [echo] xdoclet.home = C:/Java/jboss/xdoclet1.1.2 [echo] java.class.path = C:\Java\jdk1.3_1_02\lib\tools.jar;C:\ant\jakarta-ant-1.5\bin\\..\lib\xml-apis.jar;C:\ant\jakarta-ant-1.5\bin\\..\lib\xercesImpl.jar;C:\ant\jakarta-ant-1.5\bin\\..\lib\optional.jar;C:\ant\jakarta-ant-1.5\bin\\..\lib\ant.jar; xdoclet-generate: [ejbdoclet] Generating Javadoc [ejbdoclet] Javadoc execution [ejbdoclet] Loading source file C:\Java\jboss\template\src\main\ejb\test\session\SequenceGeneratorBean.java... [ejbdoclet] Loading source file C:\Java\jboss\template\src\main\ejb\test\session\TestSessionBean.java... [ejbdoclet] Loading source file C:\Java\jboss\template\src\main\ejb\test\message\TestMessageDrivenBean.java... [ejbdoclet] Loading source file C:\Java\jboss\template\src\main\ejb\test\entity\TestBMPEntityBean.java... [ejbdoclet] Loading source file C:\Java\jboss\template\src\main\ejb\test\entity\TestEntityBean.java... [ejbdoclet] Constructing Javadoc information... [ejbdoclet] Running homeInterface/ [ejbdoclet] Running remoteInterface/ [ejbdoclet] Running entitypk/ [ejbdoclet] Running dataobject/ [ejbdoclet] Running entitybmp/ [ejbdoclet] Running entitycmp/ [ejbdoclet] Running deploymentDescriptor/ [ejbdoclet] javadoc: warning - Method test.message.TestMessageDrivenBean.ejbCreate [ejbdoclet] documents that it throws javax.ejb.CreateException, [ejbdoclet] but does not declare it. [ejbdoclet] Running jboss/ [ejbdoclet] 1 warning compile: jar: compile-web: war: deploy-server: [copy] Copying 2 files to C:\Java\jboss\jboss-3.0.0_tomcat-4.0.3\server\all\deploy create-client: [echo] JBoss Home on Unix: C:/Java/jboss/jboss-3.0.0_tomcat-4.0.3 [echo] Java Home on Unix: C:/Java/jdk1.3_1_02/jre main: BUILD SUCCESSFUL Total time: 6 seconds * Do I need some special kind of deployer to avoid the "web-client.war is waiting for an appropriate deployer" problem? Any help/explanation you can give would be most appreciated. I am running on a Win2K machine, using the jboss-3.0.0_tomcat-4.0.3 package. I have no problem seeing the beans in the Agent View at http://localhost:8082after I run the build.xml file. Thanks a lot, -- John ant.properties file: ** # ATTENTION: this is an example file how to overwrite settings in this project # Please rename it to ".ant.properties" and adjust the settings to your needs # Set