[jboss-user] [Tomcat, HTTPD, Servlets JSP] - define custom context in context.xml

2007-07-16 Thread ruchi123456
Hi,
I'm using jboss 4.0.5, and I tried to define custom context in server.xml. 
,but I can not access the context, I keep on getting 404.

I wrote following in server.xml. It does not work

 

Do i need to put this in context.xml. If yes how can i do it.
Below is my dafault context.xml
!-- The contents of this file will be loaded for each web application --

   !-- Session persistence is disable by default. To enable for all web
   apps set the pathname to a non-empty value:
   

   To enable session persistence for a single web app, add a
   WEB-INF/context.xml 
   --
   

   !-- Install an InstanceListener to handle the establishment of the run-as
   role for servlet init/destroy events.
   --
   org.jboss.web.tomcat.security.RunAsListener


Regards,
Ruchika



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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4064544
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: [Microsoft][SQLServer 2000 Driver for JDBC]Database chan

2007-06-27 Thread ruchi123456
Please suggest why is the database being ignored.

Regards,
Ruchika

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4058311
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - [Microsoft][SQLServer 2000 Driver for JDBC]Database changed

2007-06-25 Thread ruchi123456
I am using SQL Server database. I am trying to connect to database name userscdb

I am using jsf and ejb3 

Everytime my application connects to sqlsever, i get below mentioned warnings
16:52:23,107 INFO  [STDOUT] value of em is [EMAIL PROTECTED]
16:52:23,148 WARN  [JDBCExceptionReporter] SQL Warning: 0, SQLState: 
16:52:23,148 WARN  [JDBCExceptionReporter] [Microsoft][SQLServer 2000 Driver 
for JDBC]Database changed to master
16:52:23,148 WARN  [JDBCExceptionReporter] SQL Warning: 5701, SQLState: 01000
16:52:23,148 WARN  [JDBCExceptionReporter] [Microsoft][SQLServer 2000 Driver 
for JDBC][SQLServer]Changed database context to 'master'.
16:52:23,148 WARN  [JDBCExceptionReporter] SQL Warning: 0, SQLState: 
16:52:23,148 WARN  [JDBCExceptionReporter] [Microsoft][SQLServer 2000 Driver 
for JDBC]Language changed to us_english
16:52:23,148 WARN  [JDBCExceptionReporter] SQL Warning: 5703, SQLState: 01000
16:52:23,148 WARN  [JDBCExceptionReporter] [Microsoft][SQLServer 2000 Driver 
for JDBC][SQLServer]Changed language setting to us_english.
16:52:23,148 WARN  [JDBCExceptionReporter] SQL Error: 208, SQLState: 42S02

Thus here my database changes to master everytime, although i want to connect 
to userscdb


Below is the configuration of my application

persistence.xml placed in META-INF directory
?xml version=1.0 encoding=UTF-8?

persistence-unit name=shoestringPU
jta-data-sourcejava:/SCMSSQLDS/jta-data-source
com.j3ltd.server.entities.Person
com.j3ltd.server.entities.Address



/persistence-unit



mssql-ds.xml

?xml version=1.0 encoding=UTF-8?

!-- = --
!--   --
!--  JBoss Server Configuration   --
!--   --
!-- = --

!-- $Id: mssql-ds.xml 23720 2004-09-15 14:37:40Z loubyansky $ --

  !-- 

==--
  !-- New ConnectionManager setup for Microsoft SQL Server 2000  driver 

--
  !-- You may download the latest Microsoft JDBC driver from *Microsoft*

--
  !-- 

http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/

MSDN-FILES/027/001/779/msdncompositedoc.xmlframe=true --
  !-- = 

--


  local-tx-datasource
jndi-nameSCMSSQLDS/jndi-name
   
connection-urljdbc:microsoft:sqlserver://dbsqlserver\\devenv:1433;DatabaseName=userscdb/connection-url
driver-classcom.microsoft.jdbc.sqlserver.SQLServerDriver/driver-class

   user-namekkism/user-name
kkism
!-- sql to call when connection is created
new-connection-sqlsome arbitrary sql/new-connection-sql
--

!-- sql to call on an existing pooled connection when it is obtained 

from pool 
check-valid-connection-sqlsome arbitrary 

sql/check-valid-connection-sql
--

  !-- corresponding type-mapping in the standardjbosscmp-jdbc.xml 

(optional) --
  
 type-mappingMS SQLSERVER2000/type-mapping
  
  /local-tx-datasource




Below is my class using entity bean
public class EntityFacadeBean implements EntityFacade{
@PersistenceContext(unitName=shoestringPU) EntityManager em ;

public Person getPerson(String email) {
  Person entity = null;
try {
Query query = em.createQuery(SELECT p FROM Person p WHERE p.email = ?1);
query.setParameter(1, email);
entity = (Person) query.getSingleResult();
}
catch (NoResultException noneFound) {
// if not found, just return null
}
return entity;
}

}

Please suggest if i am doing anything wrong.

Regards,
Ruchika

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057306
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: [Microsoft][SQLServer 2000 Driver for JDBC]Database chan

2007-06-25 Thread ruchi123456
looks like some typo errors in submitting my query.
Below is snapshot from my mssql-ds.xml file

jndi-nameSCMSSQLDS/jndi-name 
connection-urljdbc:microsoft:sqlserver://dbsqlserver\\devenv:1433;DatabaseName=userscdb/connection-url
 
driver-classcom.microsoft.jdbc.sqlserver.SQLServerDriver/driver-class 
user-namekkuser/user-name
kkuser



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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057307
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: [Microsoft][SQLServer 2000 Driver for JDBC]Database chan

2007-06-25 Thread ruchi123456
Thanks jaikiran.
I  tried changing DatabaseName to databaseName.

But this does not work either. :(

Rather even if i give the name of the database which is not existing like say 
userscdbXYZ, it does not give any error or warning, as though it is simply 
ignoring the database name.

I am really stuck. Please suggest.
Regards,
Ruchika

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057543
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Getting Exception - Cannot insert explicit value for identit

2007-06-17 Thread ruchi123456
Good Morning, 
  
I am trying to use EJB 3 with jboss4.0.5. Ran into a (simple I hope problem). 
Defined a very simple class that displays a few rows from the database. I am 
using SQL 2000 and my Primary Key is an Identity column. When I try to add a 
row it attempts to insert a value into the key column as well which of course 
does not work: 
  
com.inet.tds.SQLException: [DB3]Cannot insert explicit value for identitycolumn 
in table 'Address' when IDENTITY_INSERT is set to OFF. 
  
I tried annotating the column both as: @Id and also as: 
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
but got the same error. 
  
I am using jboss4.0.5 by the way. 
  
Can someone direct me in the right direction please? 
Regards, 
Ruchika

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4055012
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Getting Exception - Cannot insert explicit value for ide

2007-06-17 Thread ruchi123456
Also with somebody'd suggestion i changed my code to the following
--
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = id, nullable = false)
private Integer cNo;
--

But now am getting errException
Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for 
JDBC][SQLServer]'last_insert_id' is not a recognized function name.

Any suggestions?

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4055015
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Getting Exception - Cannot insert explicit value for ide

2007-06-17 Thread ruchi123456
Also i am connecting to SQL sever 2000
My persistence.xml is 
?xml version=1.0 encoding=UTF-8?

persistence-unit name=shoestringPU
jta-data-sourcejava:/SCMSSQLDSS/jta-data-source
com.j3ltd.server.entities.Person
com.j3ltd.server.entities.Address



/persistence-unit


I am using SQL Server2000, but am using org.hibernate.dialect.MySQLDialect in 
persistence.xml

I am not sure if that is an issue?

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4055019
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Getting Exception - Cannot insert explicit value for ide

2007-06-17 Thread ruchi123456
I used


And my problem is resolved :)

Thanks All :)
Regards,
Ruchika

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4055026
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: How can i access ejb3.0 from backing bean in jboss 4.0.5

2007-06-01 Thread ruchi123456
Thank u Thank u so much :). It was a great help.
I used what you suggested and it worked
MyLocalIfc bean = (new InitialContext()).lookup(myEAR/MyremoteBean/remote);

replace myEAR with the name of my ear.

Thanks again.
Regards,
Ruchika 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4050573
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: javax.naming.NameNotFoundException: MyEjb3 not bound :(

2007-06-01 Thread ruchi123456
Hi Ferry,

From what i have read so far, EJB 3.0 is not yet fully supported in AS 4.0.5 
or 4.2. 
In 4.2 , we may still use it as: 
@EJB(name=java:comp/env/ejb/MyBeanLocal)
private MyBeanLocal myBean;
 
This i have got from other forms posted in here only.

But AS 5.00 Beta version should have @EJB annotation working in the web layer 
as well, though i haven't tried so far.

Mustafa , i had the same problem as yours. I am using AS 4.0.5. I used the 
following and it worked.
MyLocalIfc bean = (new InitialContext()).lookup(myEAR/MyremoteBean/remote);

Regards,
Ruchika

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4050575
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - java.lang.RuntimeException: Cannot find FacesContext

2007-05-31 Thread ruchi123456
I am new to EJB 3.0 and jboss sever. Am really stuck. Would appreciate any help.
I am using JSF + ejb3.0 + jboss 4.2
My jsf was running fine on jboss 4.0.5 GA, but in jboss 4.2 i get the below 
Exception, when i try to access jsf from ie
Cannot find FacesContext
java.lang.RuntimeException: Cannot find FacesContext
at 
javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1797)
at 
javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1614)
at 
org.apache.jsp.welcome_jsp._jspx_meth_f_005fview_005f0(welcome_jsp.java:106)
at org.apache.jsp.welcome_jsp._jspService(welcome_jsp.java:83)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

---
Below is the listener in my web.xml
 
listener-classorg.apache.myfaces.webapp.StartupServletContextListener/listener-class

---
Also i have placed myfaces library jars in web-inf/lib  folder of my application

Please suggest

Regards,
Ruchika


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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4050171
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - How can i access ejb3.0 from backing bean in jboss 4.0.5 GA

2007-05-31 Thread ruchi123456
How can i access EJB3.0 using jboss 4.0.5.
 I know @EJB annotation won't work in 4.0.5.  I am new to EJB's on the whole. 
Can someone please suggest me, how can i access ebj from web layer(backing bean 
in my case). Like how can i use JNDI lookup. 

Regards,
Ruchi

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4050259
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: javax.naming.NameNotFoundException: MyEjb3 not bound :(

2007-05-31 Thread ruchi123456
I am new to this topic, but have been looking for the same stuff. I am not sure 
but as i have read
There are a lot of questions about injection not working in AS 4.0 and 4.2. 
Most of the problems boil down to injection not working the web layer. 

jboss AS 4.0 and 4.2 are J2EE 1.4 servers with an EJB3 plugin. This means that 
injection and annotations only work within the EJB3 plugin. To get to your EJBs 
you still have to perform a JNDI lookup from your servlet / application client. 

So, i hope u are not using 4.0 or 4.2. Please correct me if i am wrong, as i am 
just learning.
Regards,

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4050270
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user