Junos Space Developer
Reply
Contributor
satish.mane@techmahindra.com
Posts: 54
Registered: ‎07-26-2011
0

Error in named queries in jboss server log

Hi,

 

I have written a sample app using Junos Space SDK. App gets successfully deployed. But when I check jboss server.log, it gives below error. Could you please point me in right direction where is the problem..

 

Code :

 

@Entity
@NamedQueries(value =
{
@NamedQuery(query = "SELECT e FROM Equipment e", name = EquipmentEntity.GET_ALL_EQUIPMETS)
}
)
@Table(name = "Equipment", uniqueConstraints = {
@UniqueConstraint(columnNames = "id") })
@ManagedObject({"vnd.techmjunosteam.samplejunosapp.Equipment"})

 

Exception:

 

ObjectName: persistence.units:ear=SampleJunosApp.ear,jar=SampleJunosAppEJB.jar,unitName=SampleJunosAppDBUnit
  State: FAILED
  Reason: javax.persistence.PersistenceException: org.hibernate.HibernateException: Errors in named queries: vnd.techmjunosteam.samplejunosapp.jpa.AllEquipments
  I Depend On:
    jboss.jca:service=DataSourceBinding,name=SampleJunosAppDS
  Depends On Me:
    jboss.j2ee:ear=SampleJunosApp.ear,jar=SampleJunosAppEJB.jar,name=SampleJunosAppEJB,service=EJB3

ObjectName: jboss.j2ee:ear=SampleJunosApp.ear,jar=SampleJunosAppEJB.jar,name=SampleJunosAppGuiNotificationMDB,service=EJB3
  State: FAILED
  Reason: javax.management.InstanceNotFoundException: jboss.mq:service=DestinationManager is not registered.

ObjectName: jboss.j2ee:ear=SampleJunosApp.ear,jar=SampleJunosAppEJB.jar,name=SampleJunosAppEJB,service=EJB3
  State: NOTYETINSTALLED
  I Depend On:
    persistence.units:ear=SampleJunosApp.ear,jar=SampleJunosAppEJB.jar,unitName=SampleJunosAppDBUnit

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss:service=RDMEventManager
  State: NOTYETINSTALLED
  Depends On Me:
    jboss:service=HASingletonController

 

 

Regards

Satish

Recognized Expert
Yesh
Posts: 456
Registered: ‎09-29-2009
0

Re: Error in named queries in jboss server log

Hi Satish,

 

Looks like your application is not really installed. Can you please go to the Junos Space console and type 

rpm -qa |grep Sample  and see if the app is installed. Can you access your App in UI?

Also, go to Web UI , Platform ->Administration -> manage Applications and see if your application is listed.

 

Thanks

Yesh

Contributor
satish.mane@techmahindra.com
Posts: 54
Registered: ‎07-26-2011
0

Re: Error in named queries in jboss server log

Yesh,

 

Yes application is deployed and one of the two tasks works. When I click on second task, it throws an exception. But before I do this, I find this error related to second tasks in server log.

Recognized Expert
Yesh
Posts: 456
Registered: ‎09-29-2009
0

Re: Error in named queries in jboss server log

HI Satish,

 

        To get it working, the name of the Entity class should also be 'Equipment'.

<<<
@NamedQueries(value =
{
@NamedQuery(query = "SELECT e FROM Equipment e", name = EquipmentEntity.GET_ALL_EQUIPMETS)
}
)

>>>

Regards

Yesh

Contributor
satish.mane@techmahindra.com
Posts: 54
Registered: ‎07-26-2011
0

Re: Error in named queries in jboss server log

Thanks Yesh. As you suggested, we maded change and problem has been resolved.

 

Now all the problems are resolved.

 

But when I deploy our own sample application, application is not shown on mainui screen. I can see application installed on Junos console using rpm -qa | grep <app name>.  It used to get deployed, but suddenly it stopped after we made changes to code.

 

I am able to deply Junos space sample hello world app. But mine does not get deployed

 

Can you please help

 

Regards

Satish

Recognized Expert
Yesh
Posts: 456
Registered: ‎09-29-2009
0

Re: Error in named queries in jboss server log

HI Satish,

 

Thanks Satish! Can you see the app in the App selector (Right hand top corner)?? Or in Platform->Administration -> manage Applications.

If yes, then I think you have not configured Module.xml properly to show the icon in Dahsboard.

 

Plase check.

 

Thanks
Yesh 

Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.