[JBoss Tools] - JPA reverse engineer & MySQL
by Eric J. Van der Velden
Eric J. Van der Velden [http://community.jboss.org/people/ericjvandervelden] created the discussion
"JPA reverse engineer & MySQL"
To view the discussion, visit: http://community.jboss.org/message/602330#602330
--------------------------------------------------------------
Hello,
When I use JPA Tools to reverse engineer tables in a MySQL database, called sample2 here, I get for table F:
Entity
@Table(name = "F", catalog= "sample2")
public class F implements java.io.Serializable {
...
But if there is a database connection (which you give when you right click on your entry in the 'Database Connections' view, for example), so that validation is on, this is not validated; I get
catalog "sample2" cannot be resolved for table "F"
But when I change "catalog" to "schema" then it is validated. So this is OK:
Entity
@Table(name = "F", schema= "sample2")
public class F implements java.io.Serializable {
...
So is reverse engineering in case of MySQL going OK by JPA Tools, or am I doing something wrong? I use the JBoss Tools 3.2 stable.
Thanks,
Eric J.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/602330#602330]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
[Beginner's Corner] - Re: Integrate JBoss 6 to AD - map groups to roles?
by Stian Lund
Stian Lund [http://community.jboss.org/people/pathduck] created the discussion
"Re: Integrate JBoss 6 to AD - map groups to roles?"
To view the discussion, visit: http://community.jboss.org/message/602464#602464
--------------------------------------------------------------
Thanks for the reply Peter :) unfortunately it does not seem to work.
I got a tip to use DEBUG on org.jboss.security but I can't find any errors in the server.log either.
Also, from what I understand, the "Roles" concept in the spec is meant as an abstraction, and the mapping of Roles to Users/Groups is up to the container, so that the Role is independent from whatever authentication method is used. So I need to a way to say that the Role "JBossAdmin" maps to a set of users/groups in the ldap?
I also tried setting my security domain in jboss-web.xml for the admin-console, but it does not seem to affect anything, I can still login with admin/admin? But I am trying to focus on jmx-console since at least there admin/admin does not work now, so at least something's changed :)
Stian
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/602464#602464]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
[Beginner's Corner] - JBoss work directory location
by mo_
mo_ [http://community.jboss.org/people/mo_] created the discussion
"JBoss work directory location"
To view the discussion, visit: http://community.jboss.org/message/602448#602448
--------------------------------------------------------------
I have JBoss 4.2.3.GA running on Solaris 10. I'm attempting to have the "work" directory created in a custom location by setting the "jboss.work.dir" system variable to the custom path, however, the work directory is still being created under the server/<server_name>/work directory:
> find .
.
./jboss.web
./jboss.web/localhost
./jboss.web/localhost/_
./jboss.web/localhost/_/tldCache.ser
./jboss.web/localhost/invoker
./jboss.web/localhost/invoker/tldCache.ser
./jboss.web/localhost/jbossws
./jboss.web/localhost/jbossws/tldCache.ser
./jboss.web/localhost/juddi
./jboss.web/localhost/juddi/tldCache.ser
./jboss.web/localhost/web-console
./jboss.web/localhost/web-console/tldCache.ser
./jboss.web/localhost/jmx-console
./jboss.web/localhost/jmx-console/tldCache.ser
./jboss.web/localhost/jmx-console/org
./jboss.web/localhost/jmx-console/org/apache
./jboss.web/localhost/jmx-console/org/apache/jsp
./jboss.web/localhost/jmx-console/org/apache/jsp/inspectMBean_jsp.java
./jboss.web/localhost/jmx-console/org/apache/jsp/inspectMBean_jsp.class
./jboss.web/localhost/jmx-console/org/apache/jsp/index_jsp.java
./jboss.web/localhost/jmx-console/org/apache/jsp/index_jsp.class
./jboss.web/localhost/jmx-console/org/apache/jsp/displayMBeans_jsp.java
./jboss.web/localhost/jmx-console/org/apache/jsp/displayMBeans_jsp.class
./jboss.web/localhost/jmx-console/org/apache/jsp/displayOpResult_jsp.java
./jboss.web/localhost/jmx-console/org/apache/jsp/displayOpResult_jsp.class
./jboss.web/localhost/jbossmq-httpil
./jboss.web/localhost/jbossmq-httpil/tldCache.ser
I dont want to use symlinks to redirect the output and would rather do this through configuration inside the container. Please advise if you require any further information.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/602448#602448]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
[JNDI and Naming] - JBoss6 - JNDI - Remoting
by Michael Müller
Michael Müller [http://community.jboss.org/people/sirwayne] created the discussion
"JBoss6 - JNDI - Remoting"
To view the discussion, visit: http://community.jboss.org/message/602445#602445
--------------------------------------------------------------
Hello community,
i have some question how i can use RMI and JNDI with SessionScopes?
I get always a error on the client side the weld context is no active: I use JBoss6.
Here my example on Serverside:
Interfaces:
{code}
@Remote
public interface ContractRemoteService{
Set<String> getContracts();
}
{code}
{code}
@Remote
public interface LoginRemoteService{
public void login(String name)
}
{code}
Impl
{code}
@Stateful
public class ContractRemoteServiceImpl implements ContractRemoteService{
@Inject
private UserBean userBean;
@Overide
public Set<String> getContracts(){
Set<String> contracts = new HashSet<String>();
contracts.add("contract1");
contracts.add("contract2");
if(userBean.getName().equals("test")){
contracts.add("contract3");
}
return contracts;
}
}
{code}
{code}
@Stateful
public class LoginRemoteServiceImpl implements LoginRemoteService{
@Inject
private UserBean user;
@Override
public void login(String name){
user.setName(name);
}
}
{code}
Bean
{code}
@Stateful
@SessionScoped
public class UserBean{
private String name;
public setName(String name){
this.name = name;
}
public String getName(){
return name;
}
}
{code}
The client side:
{code}
public class Client{
public static void main(String [] args) throws Exceptions{
Context context = new InitialContext();
LoginRemoteService loginService = (LoginRemoteService) context.lookup("LoginRemoteServiceImpl/remote");
ContractRemoteService contractService = (ContractRemoteService) context.lookup("ContractRemoteServiceImpl");
loginService.login("Mhm?");
contractSerive.getContracts();// autsch
}
}
{code}
Error Message:
WELD-001303 no active contexts for scope javax.enterprise.context.SessionScoped
How can i activate the Context?
Thanks =)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/602445#602445]
Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
[jBPM] - Error while deleting membership
by crazy aug15
crazy aug15 [http://community.jboss.org/people/crayaug15] created the discussion
"Error while deleting membership"
To view the discussion, visit: http://community.jboss.org/message/602443#602443
--------------------------------------------------------------
Hi,
In my code i need to delete the memebership. I am using below code for deleting the membership but it is thrwoing error. Please help me on this.
Code:
=====
try{
IdentitySession isession = helperBean.getIdentitySession();
User user = isession.getUserByName("test");
Group group = isession.getGroupByName("test");
Membership membership = new Membership();
membership.setGroup(group);
membership.setUser(user);
isession.deleteEntity(memship);//deleting membership
}finally{
helperBean.getJbpmContext().close();
}
Error thrown
=========
[4/28/11 12:11:44:802 IST] 00000116 SystemOut O Membership id is: 2505User name is: testGroup Name is: test
[4/28/11 12:11:44:802 IST] 00000116 SystemOut O Hibernate: select permission0_.ENTITY_ as ENTITY1_0_, permission0_.CLASS_ as CLASS2_0_, permission0_.NAME_ as NAME3_0_, permission0_.ACTION_ as ACTION4_0_ from JBPM_ID_PERMISSIONS permission0_ where permission0_.ENTITY_=?
[4/28/11 12:11:45:568 IST] 00000116 ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: Test18. Exception thrown : org.jbpm.persistence.JbpmPersistenceException: transaction commit failed
at org.jbpm.persistence.db.DbPersistenceService.endTransaction(DbPersistenceService.java:140)
at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:201)
at org.jbpm.svc.Services.close(Services.java:247)
at org.jbpm.JbpmContext.close(JbpmContext.java:131)
at com.cisco.bpm.workflow.service.impl.JBPMUserManagementServiceImpl.removeUserFromGroup(JBPMUserManagementServiceImpl.java:567)
at com.TestClass.<init>(TestClass.java:85)
at Test18.doGet(Test18.java:32)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1103)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:570)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:486)
at com.ibm.ws.webcontainer.extension.InvokerExtensionProcessor.handleRequest(InvokerExtensionProcessor.java:449)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3440)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1461)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:118)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:1037)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:644)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1818)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
Caused by: org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [org.jbpm.identity.Membership#2502]
at org.hibernate.impl.SessionImpl.forceFlush(SessionImpl.java:993)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:168)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:98)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:520)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/602443#602443]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months