[JBoss-user] JBoss+EmbeddedCatalina+Apache

2002-02-08 Thread Carlos Ferrão


Hello list,

It is known that in Jboss running embedded Catalina doesn't read the
server.xml file. I have successfully configured Catalina with Apache using
mod_webapp. However, with Catalina running inside Tomcat, Apache doesn't
know how to get to the contexts in $JBOSS_HOme/deploy. How do I configure
(jboss.jcml?) to make JBoss+EmbeddedCatalina+Apache work together??

Thanks in advance,

  Carlos Ferrão.


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Why does this happen??

2001-12-06 Thread Carlos Ferrão
]
[Default]   at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:7
06)
[Default]
[Default]   at java.lang.Thread.run(Thread.java:484)
[Default]

Thanks in advance,

  Carlos Ferrão,
 Project Engineer

Critical Software SA
Instituto Pedro Nunes, Rua Pedro Nunes,
3030-199 Coimbra, Portugal
Tel: +351(239)708521 - Fax: +351(239)700905
http://www.criticalsoftware.com
___


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] LDAPloginmodule used in auth againt win2000

2001-10-17 Thread Carlos Ferrão


Hi list,
I'm having trouble with the authorization of a user using the
LDAPLoginModule to connect to windows 2000 active directory (LDAP). The
authentication is performed ok but authorization for any method fails. Has
anyone successfully used the LDAPLoginModule with win2000 AD or there is an
incompatibility of some kind??

Thanks,
Carlos Ferrao


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] RE: LDAPLoginModule config in auth.conf

2001-09-21 Thread Carlos Ferrão


Hi,
That sure is an idea, but I was hopping that somebody already knew which
attributes should be put in auth.conf as Windows 2000 Active Directory uses
a similar structure on this. Is anyone performing authentication and
authorisation against Win 2000 AD???

Thanks,
Carlos Ferrao


-Original Message-
From: Achilleus Mantzios [mailto:[EMAIL PROTECTED]]
Sent: sexta-feira, 21 de Setembro de 2001 8:13
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: LDAPLoginModule config in auth.conf


Well carlos,
since i assume  you are in the same situation as me (ldap newbie),
i would suggest:

1) in everything you do (either from jboss SecurityManager or from
ldapsearch)
watch the log of your ldap server CAREFULLY
(i use slapd -d 111)
2) Build your own LdapLogin module put it in a package, and then modify your
run.sh
Notice you can do your job with org.jboss.security.auth.spi.LdapLoginModule
quite well, but with building your own you can print debug info that will
help you a lot.
3) Perform your ldapsearches in the SAME way that LdapLogin module does.
Once you get the expected results from ldapsearch, then proceed onto
examining your code in the module.

Achilleus


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] LDAPLoginModule config in auth.conf

2001-09-20 Thread Carlos Ferrão


Hello list,
I've successfully managed to connect to Win 2000 Active Directory Server.
The only information available in Jboss site is wrong and IMHO should be
updated. The main error was the ldap://myhost.com which turns into a comment
without .

My configuration now authenticates to the server but there are two things
that don't work:
-The displayname attribute is used to perform authentication independently
of another one specified in uidAttributeID, which means that instead of
login (cferrao) i have to write my complete name (Carlos Ferrao).
- The roles are not verified. As I said in my previous mail, two groups
exist in win2000AD (Tuser and Tadmin) and they are in the same CN as Users.

I think the auth.conf parameters are not being used. Once again I've tried
many attributes (Users,Groups,userid) but the authorisation is never
verified, returning the same output. Anyone knows which attributes should go
into auth.conf in order to get this info from win 2000 AD?

Here's the output of JBoss:

[siigpstestBean] Authentication exception, principal=Carlos Ferrao
[Default] LdapLoginModule.login
[Default] Logging into LDAP server,
env={java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory,
rolesCtxDN=cn=Users,o=critical.pt, java.naming.provider.url=ldap://hall:389,
java.naming.security.principal=Carlos Ferrao,
java.naming.security.authentication=simple,
java.naming.security.credentials=}
[Default] Logged into LDAP server,
javax.naming.ldap.InitialLdapContext@20f237
[siigpstestBean] Insufficient method permissions, principal=Carlos Ferrao,
method=create, requiredRoles=[Tuser, Tadmin]

here's the auth.conf (it works):

libsec {
 org.jboss.security.plugins.samples.LdapLoginModule required
 java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
 //principalDNPrefix=
 uidAttributeID=Users
 roleAttributeID=Users
 //principalDNSuffix=DC=critical,DC=pt
 rolesCtxDN=CN=Users,DC=critical,DC=pt
 rolesCtxDN=cn=Users,o=critical.pt
 java.naming.provider.url=ldap://hall:389;
 java.naming.security.authentication=simple
 ;
};

Here's my info and Tadmin group in win 200 Active Directory:

Expanding base 'CN=cferrao,CN=Users,DC=critical,DC=pt'...
Result 0: (null)
Matched DNs:
Getting 1 entries:
 Dn: CN=cferrao,CN=Users,DC=critical,DC=pt
2 memberOf: CN=Tadmin,CN=Users,DC=critical,DC=pt;
CN=Tuser,CN=Users,DC=critical,DC=pt;
1 accountExpires: 0;
1 badPasswordTime: 126454878327854035;
1 badPwdCount: 0;
1 codePage: 0;
1 cn: cferrao;
1 countryCode: 0;
1 displayName: Carlos Ferrao;
1 instanceType: 4;
1 lastLogon: 126454880261197150;
1 logonCount: 285;
1 logonHours: ldp: Binary blob;
1 distinguishedName: CN=cferrao,CN=Users,DC=critical,DC=pt;
1 objectCategory:
CN=Person,CN=Schema,CN=Configuration,DC=critical,DC=pt;
4 objectClass: top; person; organizationalPerson; user;
1 objectGUID: 132af00f-0b0f-49e8-b2a9-a502056ce938;
1 objectSid: S-15-2431463-72FF6BA7-5EE08E3-486;
1 primaryGroupID: 513;
1 pwdLastSet: 126168820329684352;
1 name: cferrao;
1 sAMAccountName: cferrao;
1 sAMAccountType: 805306368;
1 userAccountControl: 512;
1 uSNChanged: 3827;
1 uSNCreated: 3827;
1 whenChanged: 5/3/2001 2:52:18 GMT Standard Time GMT Daylight
Time;
1 whenCreated: 3/14/2001 16:1:28 GMT Standard Time GMT Daylight
Time;

Expanding base 'CN=Tadmin,CN=Users,DC=critical,DC=pt'...
Result 0: (null)
Matched DNs:
Getting 1 entries:
 Dn: CN=Tadmin,CN=Users,DC=critical,DC=pt
1 member: CN=cferrao,CN=Users,DC=critical,DC=pt;
1 cn: Tadmin;
1 groupType: -2147483646;
1 instanceType: 4;
1 distinguishedName: CN=Tadmin,CN=Users,DC=critical,DC=pt;
1 objectCategory:
CN=Group,CN=Schema,CN=Configuration,DC=critical,DC=pt;
2 objectClass: top; group;
1 objectGUID: fb4d9c02-8eb8-497b-9e29-50ae33bf1eef;
1 objectSid: S-15-2431463-72FF6BA7-5EE08E3-770;
1 name: Tadmin;
1 sAMAccountName: Tadmin;
1 sAMAccountType: 268435456;
1 uSNChanged: 393036;
1 uSNCreated: 393033;
1 whenChanged: 9/19/2001 18:24:23 GMT Standard Time GMT
Daylight Time;
1 whenCreated: 9/19/2001 18:23:14 GMT Standard Time GMT
Daylight Time;


Thanks in advance,
Carlos Ferrao


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] LDAPLoginModule used with Win2000

2001-09-19 Thread Carlos Ferrão


Hello List,

I'm trying to perform authentication against Windows 2000 Active Directory
(which is LDAP).
In my domain I have two groups (Tuser and Tadmin) and users assigned to
them. The security definition in the deployment descriptor of my beans
comply to those. I've tested before my application with
org.jboss.security.auth.spi.UsersRolesLoginModule and everything works fine.
I have JBoss running in Linux and Win2000.

I used the LDAP configuration in auth.conf as described in
http://www.jboss.org/documentation/HTML/ch09s17.html and I'm getting the
following error:

[siigpstestBean] CONTAINER EXCEPTION:Configuration Error:
Line 31: expected 'option key', found 'null'
[siigpstestBean] java.lang.SecurityException: Configuration Error:
[siigpstestBean]Line 31: expected 'option key', found 'null'
[siigpstestBean]at
com.sun.security.auth.login.ConfigFile.getAppConfigur
ationEntry(ConfigFile.java:221)
[siigpstestBean]at
javax.security.auth.login.LoginContext.init(LoginCont
ext.java:172)
[siigpstestBean]at
javax.security.auth.login.LoginContext.init(LoginCo
ntext.java:266)
[siigpstestBean]at
javax.security.auth.login.LoginContext.init(LoginCo
ntext.java:380)
[siigpstestBean]at
org.jboss.security.plugins.JaasSecurityManager.defaul
tLogin(JaasSecurityManager.java:351)

My auth.conf is as follows:

libsec {
org.jboss.security.plugins.samples.LdapLoginModule required
java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
principalDNPrefix=uid=
uidAttributeID=userid
roleAttributeID=rolenames
principalDNSuffix=,ou=People,o=mydomain.com
rolesCtxDN=ou=Users,cn=Project1,ou=Projects,o=mydomain.com
java.naming.provider.url=ldap://hall:389/
java.naming.security.authentication=simple
};

I've tried to put users in uidAttributeID and group in roleAttributeID,
commented out several the prefix lines, tried different values for
rolesCtxDN, it's like shooting in the dark..

Can please someone enlighten me on this??? Is this the correct approach for
performing authentication and authorisation in a win 2000 server?? is it
necessary to perform something special on win 2000???

Thanks in advance,
Carlos Ferrao


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] unable to find login configuration file

2001-08-09 Thread Carlos Ferrão


Hello list,
I'm trying to use JAAS based security in JBoss and I've followed the
example in jboss site. I'm using the UsersRolesLoginModule. Everything works
ok but when I try the same example running Tomcat and JBoss separated, I get
a Unable to find login configuration file. I guess this file is auth.conf
in jboss_home/client dir but I don't know how to tell Tomcat to find it. My
tomcat is running on a different machine but I'm using it with jboss
fine(communication with ejb's). I cannot use Jboss+tomcat because it
conflicts with tomcat+cocoon(if anyone has successfully been able to use
tomcat+cocoon integrated in jboss please let me know).
Anyone knows how to make the login configuration file available to client
(standalone app or tomcat(jsp/servlets))??

Thanks in advance,
Carlos Ferrao


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] DB connections limit

2001-07-24 Thread Carlos Ferrão


Hi all,

It appears that the connections made to my postgres db are kept in idle
state for too much time. I have no limitation on the pool size. What happens
is that there are connections to the db which are't  in use (I'm using
stateless SBs) and the users keep creating more until the server gets real
slow or the limit of connections that postgres accepts is reached. After
that any attempt to use my beans (which access my db) times out. I've
changed my jdbc.xml to:

   attribute name=PoolNamelibrary/attribute
   attribute
name=DataSourceClassorg.opentools.minerva.jdbc.xa.wrapper..
   attribute name=Properties/attribute
   attribute
name=URLjdbc:postgresql://192.168.3.248:5432/library/attribute
   attribute name=GCMinIdleTime1/attribute
   attribute name=JDBCUserpostgres/attribute
   attribute name=MaxSize0/attribute
   attribute name=Passwordpostgres/attribute
   attribute name=GCEnabledtrue/attribute
   attribute name=InvalidateOnErrorfalse/attribute
   attribute name=TimestampUsedfalse/attribute
   attribute name=Blockingtrue/attribute
   attribute name=GCInterval1/attribute
   attribute name=IdleTimeout1/attribute
   attribute name=IdleTimeoutEnabledtrue/attribute
   attribute name=LoggingEnabledfalse/attribute
   attribute name=MaxIdleTimeoutPercent0.5/attribute
   attribute name=MinSize0/attribute

I'm particularly concerned with activity spikes because a lot of connections
are used in each functionality.

Thanks in advance,
Carlos Ferrao


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] RE: DB connections limit

2001-07-24 Thread Carlos Ferrão


Hi all,
With the values I supplied I'm having no problems right now, but I'll
decrease idletimeout a bit.
I think the maximum number of connections in postgres is around 25, which
isn't very much.I'll change that too as soon as I find out how to do it.
I'm closing all connections in my SBs, it is only a matter of config.
The performance tuning in JBoss online docs doesn't get into much detail
and it could be more complete with configurations that work fine.

Thanks,
Carlos Ferrao


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] HELP! cannot use any entity bean method

2001-07-23 Thread Carlos Ferrão


Hello List,

When I try to call a method in any entity bean(through a session bean) I
get the following error:

java.rmi.NoSuchObjectException: no such object in table
...
 at $Proxy3.getCategorydesc(Unknown Source)

This is happening with all my entity accessors, mutators and inserts.
Everything works fine with Inprise App Server, but JBoss is giving me
problems. I've read jaws documentation and I can't figure out what is wrong.

This is the code In my session:
try {
Context jndiContext = new InitialContext();
Object category_lookup =
jndiContext.lookup(java:comp/env/ejb/category);
categoryHome category = (categoryHome)
javax.rmi.PortableRemoteObject.narrow(category_lookup,categoryHome.class);

Ccategorypk catpk = new Ccategorypk();
category cat=null;
catpk.cat_id=id;
try {
  cat = category.findByPrimaryKey(catpk);
  returndesc = cat.getCatDesc();

} catch (javax.ejb.FinderException fe) { fe.printStackTrace();
return null; }
return returndesc;
} catch (Exception e) {throw new javax.ejb.EJBException(e); }


My jaws.xml has:
  enterprise-beans
entity
ejb-namecategory/ejb-name
table-namecategory/table-name
cmp-field
field-namecat_id/field-name
column-namecat_id/column-name
/cmp-field
cmp-field
field-namecat_name/field-name
column-namecat_name/column-name
/cmp-field
cmp-field
field-namecat_desc/field-name
column-namecat_desc/column-name
/cmp-field
/entity
  /enterprise-beans

My ejb-jar.xml has:
entity
  ejb-namecategory/ejb-name
  homeaccessprj.categoryHome/home
  remoteaccessprj.category/remote
  ejb-classaccessprj.categoryBean/ejb-class
  persistence-typeContainer/persistence-type
  prim-key-classaccessprj.Ccategorypk/prim-key-class
  reentrantFalse/reentrant
  cmp-field
field-namecat_id/field-name
  /cmp-field
  cmp-field
field-namecat_name/field-name
  /cmp-field
  cmp-field
field-namecat_desc/field-name
  /cmp-field
  ejb-ref
ejb-ref-nameejb/category/ejb-ref-name
ejb-ref-typeEntity/ejb-ref-type
homeaccessprj.categoryHome/home
remoteaccessprj.category/remote
ejb-linkcategory/ejb-link
  /ejb-ref
  resource-ref
res-ref-namejdbc/library/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref
/entity

The table is called 'category' and has fields 'cat_id', 'cat_name' and
'cat_desc'. The code of my entity is as follows:

public class categoryBean implements EntityBean {
  EntityContext entityContext;
  public int cat_id;
  public String cat_name;
  public String cat_desc;

  public Ccategorypk ejbCreate(int catid, String catname,String catdesc)
throws CreateException {
this.cat_id = catid;
this.cat_name = catname;
this.cat_desc = catdesc;
return null;
  }
  public int getCatId() {
return cat_id;
  }
  public String getCatName() {
return cat_name;
  }
  public String getCatDesc() {
return cat_desc;
  }
  public void setCatName(String str) {
this.cat_name = str;
  }
  public void setCatDesc(String str) {
this.cat_desc = str;
  }
  public void ejbPostCreate(int catid, String catname,String catdesc) throws
CreateException {
  }
  public void ejbRemove() throws RemoveException {
  }
  public void ejbActivate() {
  }
  public void ejbPassivate() {
  }
  public void ejbLoad() {
  }
  public void ejbStore() {
  }
  public void setEntityContext(EntityContext entityContext) {
this.entityContext = entityContext;
  }
  public void unsetEntityContext() {
entityContext = null;
  }
}

Yours desperate,
Carlos Ferrao


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] found the problem!

2001-07-23 Thread Carlos Ferrão



Hi all,
Please ignore my previous message. The real problem is a category not
bound error because I was looking for java:comp/env/ejb/category. I'm now
making a lookup for category which is defined in my ejb-jar.xml
How can I bound my entities to a java:comp/env/myentity namespace?? It
seems JAWS online documentation only talks about mapping of fields and
standardjaws.xml only has info about type-mapping.
I've read in Jboss docs that JBoss does not currently allow you to use the
java:comp/env namespace to call your beans from your clients. but I'm
calling my entities from session beans also deployed in JBoss, I think this
shouldn't be a problem.

Can anyone please post an example??

Many thanks,
Carlos Ferrao




___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] JBoss in win2k

2001-07-20 Thread Carlos Ferrão


Hi,
I was able to make JBoss work with jdk1.3...I just deleted jre1.2.
I'm trying to add a DB connection pool and I'm using the configuration I
have in Jboss2.2+Tomcat3.2.2 in Linux (It's working fine there):

jboss.jcml
!-- JDBC --
  mbean code=org.jboss.jdbc.JdbcProvider
name=DefaultDomain:service=JdbcProvider
 attribute name=Driversorg.postgresql.Driver/attribute
  /mbean

mbean code=org.jboss.jdbc.XADataSourceLoader
name=DefaultDomain:service=XADataSource,name=library
attribute name=PoolName/library/attribute
attribute
name=DataSourceClassorg.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp
/attribute
attribute name=Properties/attribute
attribute
name=URLjdbc:postgresql://192.168.3.248:5432/library/attribute
attribute name=GCMinIdleTime120/attribute
attribute name=JDBCUserpostgres/attribute
attribute name=MaxSize10/attribute
attribute name=Passwordpostgres/attribute
attribute name=GCEnabledfalse/attribute
attribute name=InvalidateOnErrorfalse/attribute
attribute name=TimestampUsedfalse/attribute
attribute name=Blockingtrue/attribute
attribute name=GCInterval12/attribute
attribute name=IdleTimeout180/attribute
attribute name=IdleTimeoutEnabledfalse/attribute
attribute name=LoggingEnabledfalse/attribute
attribute name=MaxIdleTimeoutPercent1.0/attribute
attribute name=MinSize0/attribute
  /mbean

The driver postgresql.jar is in jboss_home/lib/ext, but when I start jboss
it hangs up:

JBOSS_CLASSPATH=;/lib/tools.jar;run.jar;../lib/crimson.jar
jboss.home =
E:\lixo\jboss2.2.2tomcat3.2.2\JBoss-2.2.2_Tomcat-3.2.2\JBoss-2.2.2_
Tomcat-3.2.2\jboss
Using JAAS LoginConfig:
file:/E:/lixo/jboss2.2.2tomcat3.2.2/JBoss-2.2.2_Tomcat-3
.2.2/JBoss-2.2.2_Tomcat-3.2.2/jboss/conf/tomcat/auth.conf
Using configuration tomcat
[Info] Java version: 1.3.0,Sun Microsystems Inc.
[Info] Java VM: Java HotSpot(TM) Client VM 1.3.0-C,Sun Microsystems Inc.
[Info] System: Windows 2000 5.0,x86
[Shutdown] Shutdown hook added
[Service Control] Registered with server
[Service Control] Initializing 26 MBeans
[Webserver] Initializing
[Webserver] Initialized
[Naming] Initializing
[Naming] Initialized
[JNDIView] Initializing
[JNDIView] Initialized
[Transaction manager] Initializing
[Transaction manager] Initialized
[JAAS Security Manager] Initializing
[JAAS Security Manager] Initialized
[JDBC provider] Initializing
[JDBC provider] Loaded JDBC-driver:org.postgresql.Driver
[JDBC provider] Initialized
[library] Initializing
[library] Initialized
[Container factory] Initializing
[Container factory] Initialized
[EmbeddedTomcatSX] Initializing
[EmbeddedTomcatSX] Initialized
[JBossMQ] Initializing
[JBossMQ] Initialized
[DefaultJMSProvider] Initializing
[DefaultJMSProvider] Initialized
[StdJMSPool] Initializing
[StdJMSPool] Initialized
[J2EE Deployer Default] Initializing
[J2EE Deployer Default] Initialized
[Auto deploy] Initializing
[Auto deploy] Initialized
[RARDeployer] Initializing
[RARDeployer] Initialized
[ConnectionManagerFactoryLoader] Initializing
[MinervaNoTransCMFactory] Initialized
[ConnectionManagerFactoryLoader] Initializing
[MinervaSharedLocalCMFactory] Initialized
[ConnectionManagerFactoryLoader] Initializing
[MinervaXACMFactory] Initialized
[ConnectionFactoryLoader] Initializing
[BlackBoxDS] Initialized
[JMX RMI Adaptor] Initializing
[JMX RMI Adaptor] Initialized
[JMX RMI Connector] Initializing
[JMX RMI Connector] Initialized
[Mail Service] Initializing
[Mail Service] Initialized
[Hypersonic] Initializing
[Hypersonic] Initialized
[DefaultDS] Initializing
[DefaultDS] Initialized
[InstantDB] Initializing
[InstantDB] Initialized
[Service Control] Initialized 26 services
[Service Control] Starting 26 MBeans
[Webserver] Starting
[Webserver] Codebase set to http://raptor:8083/
[Webserver] Started webserver on port 8083
[Webserver] Started
[Naming] Starting
[Naming] Starting jnp server
[Naming] Started jnpPort=1099, rmiPort=0, Client SocketFactory=null, Server
Sock
etFactory=null
[Naming] Naming started on port 1099
[Naming] Started
[JNDIView] Starting
[JNDIView] Started
[Transaction manager] Starting
[Transaction manager] Started
[JAAS Security Manager] Starting
[JAAS Security Manager] JAAS.startService, cachePolicy=null
[JAAS Security Manager] JAAS.startService,
SecurityProxyFactory=org.jboss.securi
ty.SubjectSecurityProxyFactory@41d05d
[JAAS Security Manager] Started
[JDBC provider] Starting
[JDBC provider] Started
[library] Starting
[library] XA Connection pool library bound to java:/library

Did I miss something important ???

Thanks,
Carlos Ferrao


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Object not found in storage

2001-07-20 Thread Carlos Ferrão



Hi,

The way I found to circumvent the problem was to temporarily use an sql
statement to access my DB directly, instead with my entity.

The CMP mapping is in the deployment descriptor ejb-jar.xml. I only added
one jaws.xml file that tells which type-mapping should use:

jaws
  datasourcelibrary/datasource
  type-mappingPostgreSQL/type-mapping
/jaws

Inserting records in another table work fine using entities.
Do I need to add anything more??

Thanks,
Carlos Ferrao


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] static hot-deploy

2001-07-20 Thread Carlos Ferrão


Is there any way to make the deploy dir of an application under jboss
deploy dir to be the same?
Whenever I put a .war file in deploy, this file is deployed under a temp
dir.
When I put a modified war over the first one, the name of the dir where my
web app is deployed changes.

I need to know the name of that dir in order to have Apache process non-JSP
files. If the deployment dir changes, I need to be always starting/stopping
apache and changing config, otherwise my html/images
/css won't be found and my site will be messed up.

Thanks in advance,
Carlos Ferrao


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Object not found in storage

2001-07-19 Thread Carlos Ferrão


Hi all,

I'm getting the following error:

[acc_library] javax.ejb.ObjectNotFoundException: Object with primary key
accessprj.Cpublicationpk@3 not found in storage
[acc_library]   at
org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntityCommand.findByP
rimaryKey(JDBCFindEntityCommand.java:88)
[acc_library]   at
org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntityCommand.execute
(JDBCFindEntityCommand.java:59)
[acc_library]   at
org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.findEntity(
JAWSPersistenceManager.java:130)
[acc_library]   at
org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager
.java:270)
[acc_library]   at
org.jboss.ejb.EntityContainer.find(EntityContainer.java:419)
[acc_library]   at java.lang.reflect.Method.invoke(Native Method)



[acc_library]   at $Proxy24.findByPrimaryKey(Unknown Source)
[acc_library]   at
accessprj.acc_libraryBean.isPubAvailable(acc_libraryBean.java:644)

I'm trying to access a field through an entity bean.

try {
Context jndiContext = new InitialContext();
Object publication_ref = jndiContext.lookup(publication);
publicationHome publicationhome = (publicationHome)
javax.rmi.PortableRemoteObject.narrow(publication_ref,publicationHome.class)
;
pubpk.pub_id=pub_id;
try {
  pub = publicationhome.findByPrimaryKey(pubpk);
  quantity= pub.getQuantity();
} catch (javax.ejb.FinderException fe) { fe.printStackTrace();
return available; }

  }
  catch (NamingException ne) {ne.printStackTrace();}
  catch (RemoteException re) {re.printStackTrace();}

my primary key class is as follows:

public class Cpublicationpk implements Serializable {
  public int pub_id;

  public int hashCode() {
return pub_id;
  }

  public boolean equals(Object obj) {
if (obj instanceof Cpublicationpk) {
  return (pub_id == ((Cpublicationpk)obj).pub_id);
}
return false;
  }
}

This happens with every row. What is wrong?? is something missing in JAWS??
With Inprise AppServer this code works fine.

Best Regards,
Carlos Ferrao


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] JBoss 2.2 in win 2K doesn't deploy???

2001-07-19 Thread Carlos Ferrão



Hi all,
I've just downloaded JBoss 2.2 + Tomcat 3.2.2 from www.jboss.org.
I had no trouble with configuration of datasources/jdbc drivers.
The first strange thing is that it wouldn't start because I had a JDK 1.3
version instead of a 1.2 one.
I'm now using jre1.2.2.
My war and jar files won't deploy, not even jboss test jars. The same
jars/war work good in JBoss+Tomcat same version for Linux.
Here's what happens:

[Container factory]
Deploying:file:/E:/java/jboss_tomcat/jboss/tmp/deploy/Defaul
t/library_service.jar
[Verifier] Verifying
file:/E:/java/jboss_tomcat/jboss/tmp/deploy/Default/library
_service.jar/ejb1003.jar
[Container factory] Deploying employee
[Container factory] Deploying publication
[Container factory] Deploying requisition
[Container factory] Deploying category
[Container factory] Deploying pubtype
[Container factory] Deploying contact
[Container factory] Deploying magazine
[Container factory] Deploying belongs
[Container factory] Deploying acc_library
[Container factory] Deploying mng_libraryBean
[JAWS] Table 'category' already exists
[JAWS] Table 'employee' already exists
[JAWS] Table 'contact' already exists
[J2EE Deployer Default] Starting library_service.jar failed!
[Auto deploy] java.lang.NoClassDefFoundError: org/jboss/logging/Logger
[Auto deploy]   at org.jboss.proxy.Proxies$Impl.newTarget(Proxies.java:467)
[Auto deploy]   at org.jboss.proxy.Proxies.newTarget(Proxies.java:47)
[Auto deploy]   at org.jboss.proxy.Proxy.newProxyInstance(Proxy.java,
Compiled C
ode)
[Auto deploy]   at
org.jboss.ejb.plugins.jrmp12.server.JRMPContainerInvoker.init
(JRMPContainerInvoker.java:82)
[Auto deploy]   at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.init(J
RMPContainerInvoker.java, Compiled Code)
[Auto deploy]   at
org.jboss.ejb.StatelessSessionContainer.init(StatelessSession
Container.java, Compiled Code)
[Auto deploy]   at org.jboss.ejb.Application.init(Application.java, Compiled
Cod
e)
[Auto deploy]   at
org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java,
Compiled Code)
[Auto deploy]   at
org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java,
Compiled Code)
[Auto deploy]   at java.lang.reflect.Method.invoke(Native Method)
[Auto deploy]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
.java:1628)
[Auto deploy]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
.java:1523)
[Auto deploy]   at
org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeploy
er.java, Compiled Code)
[Auto deploy]   at
org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:17
8)
[Auto deploy]   at java.lang.reflect.Method.invoke(Native Method)
[Auto deploy]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
.java:1628)
[Auto deploy]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
.java:1523)
[Auto deploy]   at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:358)
[Auto deploy]   at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java,
Compiled Co
de)
[Auto deploy]   at
org.jboss.ejb.AutoDeployer.startService(AutoDeployer.java, Co
mpiled Code)
[Auto deploy]   at
org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.
java:93)
[Auto deploy]   at java.lang.reflect.Method.invoke(Native Method)
[Auto deploy]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
.java:1628)
[Auto deploy]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
.java:1523)
[Auto deploy]   at org.jboss.util.ServiceControl.start(ServiceControl.java,
Comp
iled Code)
[Auto deploy]   at java.lang.reflect.Method.invoke(Native Method)
[Auto deploy]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
.java:1628)
[Auto deploy]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
.java:1523)
[Auto deploy]   at org.jboss.Main.init(Main.java, Compiled Code)
[Auto deploy]   at org.jboss.Main$1.run(Main.java:121)
[Auto deploy]   at java.security.AccessController.doPrivileged(Native
Method)
[Auto deploy]   at org.jboss.Main.main(Main.java, Compiled Code)
[J2EE Deployer Default] Module library_service.jar is not running
[J2EE Deployer Default] Destroying application library_service.jar
[Auto deploy] Deployment
failed:file:/E:/java/jboss_tomcat/jboss/deploy/library_
service.jar
[Auto deploy] org.jboss.deployment.J2eeDeploymentException: Error while
starting
 library_service.jar: org/jboss/logging/Logger
[Auto deploy]   at
org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeploy
er.java, Compiled Code)
[Auto deploy]   at
org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:17
8)
[Auto deploy]   at java.lang.reflect.Method.invoke(Native Method)
[Auto deploy]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
.java:1628)

Anyone knows why this happens??

Thanks in advance,
Carlos Ferrao


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] entity beans name = database tables name??

2001-06-29 Thread Carlos Ferrão


Hi List,

Thank you for your help with my problem with tables. I changed the entity
bean name to auth and it is working. I didn't know that the name of entity
beans needed to be the same as my tables in my database. I was accessing my
db with the following code in my session bean:
try {
  listlogin_connection = getDBConnection(java:/comp/env/jdbc/library);
//jndi namespace for db
  listlogin_statement = listlogin_connection.prepareStatement(select
login from auth);
  listlogin_records = listlogin_statement.executeQuery();
  while(listlogin_records.next()) {
...//get values from fields

Although my session is CMP, I think this is a direct way to access my db and
it should never use the entity bean. Why is it used anyway? Do I really have
to change the name of my entity beans to the name of my database tables??

Best Regards,
Carlos Ferrao


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user