miércoles, 16 de noviembre de 2011

Caused by: javax.ejb.AccessLocalException: Client not authorized for this invocation. at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer

Caused by: javax.ejb.AccessLocalException: Client not authorized for this invocation.
at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1885)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:205)
... 74 more

Caused by: org.omg.CORBA.NO_PERMISSION: ----------BEGIN server-side stack trace----------
org.omg.CORBA.NO_PERMISSION: vmcid: 0x2000 minor code: 1806 completed: Maybe
at org.glassfish.enterprise.iiop.impl.POAProtocolMgr.mapException(POAProtocolMgr.java:340)
at com.sun.ejb.containers.BaseContainer.mapRemoteException(BaseContainer.java:2264)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2077)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1990)

javax.ejb.EJBAccessException at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)at java.lang.reflect.Constructor.newInstance(Constructor.java:513)at java.lang.Class.newInstance0(Class.java:355)




martes, 15 de noviembre de 2011

The type consultorio.Area cannot be resolved. It is indirectly referenced from required .class files

You get this problem in eclipse editor

it is caused because you are using a bad lib, you have to change it in the builtpath.

Solution: import a jar with (Entities and Interfaces) and then add it to the project, you could see this to understand what im saying. STEP 5. http://silviajqc.blogspot.com/2011/11/unable-to-load-ejb-module.html



Unable to load the EJB module. DeploymentContext does not contain any EJB.


DeploymentContext does not contain any EJB. If you use EJB component annotations to define the EJB, and an ejb or web deployment descriptor is also used, please make sure that the deployment descriptor references a Java EE 5 or higher version schema, and that the metadata-complete attribute is not set to true, so the component annotations can be processed as expected. -- it happens because you are using in the Lib Ejb ... the "Interfaces" and the "Services entity manager"... so the server show you that those entity manager it is actually defined.


This problem happens when you are defined and using in a incorrect way your EJB lib .jar

You have to be clear in that points:


1- You create an EAR file----------who is composed by (Entities, Interfaces, Services Entity Manager)
2. You have to create a .jar file with (Entities and Interfaces) WITH THIS I FIXED THE THE PROBLEM, because i had used (Entities, Interfaces, Services Entity Manager) and that was wrong,

3. Export the EAR and deploy it on the server.
4. Export the .jar to the : Server Library path: /Glassfish3/glassfish/domain/domain1/lib

5. Create a Client Application and add the .jar file exported in the 4 step in the builtpath .
6. Add other libs as Vaadin addons and vaadin.6-6-3.jar in the WEB-INF/lib path.
7. Add BonitaClient.jar that is located on the silvia/bonitaApplications2/runtime/lib/client

8. Deploy client Application in glassfish.



Other solutions i have found:
-------------

Changing web.xml to have this seemed to at least allow it to come up in Glassfish 3.1.

http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

Not obvious.

------------------

Ok, found the cause (thanks much for providing the test case!):

1. EjbSniffer was retrieved after scanning the archive: one (or more) of the
library jars packaged in the archive contains EJBs with component annotations.
So the ejb container was asked to load the module later.
2. The ejb container was not able to find the corresponding metadata because the
web.xml is 2.4 version so the meta-data processing skipped the annotation
processing (we only process annotations for Java EE 5+ schema versions).

After I changed the web.xml to reference 2.5 schema (you can do 3.0 schema as well):
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

The app deployed successfully.

Please give it a try and let me know if it works for you


El error dice que no encuentra las clases... si estan en WEB-INF/lib, lo unico que se me ocurre es que esten mas de una vez en el classpath. Comprueba no tener varias versiones de esos jar en el classpath (WEB-INF/lib, CLASSPATH de sistema, carpeta lib del tomcat...)

Algo asi deber ser.
S!


references: http://www.forosdelweb.com/f45/jars-externos-jsp-625395/

http://javarevisited.blogspot.com/2011/08/classnotfoundexception-in-java-example.html -- excellent

lunes, 14 de noviembre de 2011

javax.servlet.ServletException : java.lang.NoClassDefFoundError

Consultorio.Area or Could not initialize class com.consultorio.ppal.Cliente

it was caused because i dont have the Area class defined in the Persistence.xml file!!

Wireless and Local network configuration in Ubuntu Linux

Hello Dear Readers:

The first thing to know and remember is that the Configuration network file is in pwd: /etc/network/interfaces

so, the first step:

1. You have to access and write your lines to configure your network here: gedit /etc/network/interfaces

#auto eth0
#iface eth0 inet dhcp

auto ra0 --- reference to the step 3.2
iface ra0 inet dhcp

eth0 reference to the local network and ra0 to the wireless network, both configuration lines above are using DHCP server , who is a common way to connect by using a Modem and a Router.

For eth0 static:

iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
auto eth1


2. For activate eth0 you should uncomment the lines:

auto eth0 iface eth0 inet dhcp

and then write in the terminal console: sudo ifup ra0, sudo ifup eth0 respectively.

also you can do this to update the interfaces with the options that were introduced:
sudo /etc/init.d/networking restart



3. For activate ra0 follow the next steps

3.1 you should get the drivers depending on your network card
3.2.active the network by the last step
3.3 configurate the network with the unique features that you have

3.1.


Instalar driver DLink T/Red PCI Wireless DWA-525 en Ubuntu

Atención, abrir en una nueva ventana. ImprimirE-mail

Dlink DWA-525 en UBUNTUPara quienes se han comprado o estan pensando en comprar la tarjeta inalambrica DLink T/Red PCI Wireless DWA-525les aseguro que funciona en Ubuntu 10.04, Ubuntu 10.10 yUbuntu 11.04 a la perfección. La instalación no es muy complicada y se las detallare a continuación.

Lo primero que tenemos que saber es si Ubuntu esta detectando nuestra DLink T/Red PCI Wireless DWA-525, para hacer la exploración del hadware que Ubuntu detecta usaremos el siguiente comando en un Terminal (Aplicaciones > Accesorios > Terminal):

lspci | grep Network

Lo que hara es filtrar los componente de red, la salida del comando anterior debiera ser la siguiente

02.01.06 Network Controller Ralink 3060

Lo anterior es el chip que tiene la placa de red DLink T/Red PCI Wireless DWA-525. Ahoro todo lo que nos queda es proceder a realizar la instalación.

Abre un Terminal en el menu Aplicaciones > Accesorios > Terminal y puedes copiar y pegar los siguientes comandos

cd; wget http://www.conocetupc.cl/downloads/DWA-525.zip

El comando anterior descargar el driver DLink T/Red PCI Wireless DWA-525 para Ubuntu yGNU/Linux.

unzip DWA-525.zip

Con unzip descomprimes los archivos .zip y luego entraremos a la carpeta "driver" que es la decomprimida y compilaremos el driver con

cd driver; make

Luego que se haya compilado el driver instalamos con:

sudo make install

add this lines to sudo gedit /etc/modprobe.d/blacklist.conf

blacklist rt2800pci
blacklist rt2x00lib
blacklist rt2x00pci
blacklist rt2800lib

and then in “/etc/modules” add:

rt3562sta.kort3562sta


Luego reinicias tú Ubuntu

Here the process after unzip the driver package :

root@silvia-desktop:~/driver# ls
chips Makefile RT3060STA.dat
common os sta
include README_STA sta_ate_iwpriv_usage.txt
iwpriv_usage.txt readme.txt tools
LICENSE ralink-firmware.txt RT3060STACard.dat

root@silvia-desktop:~/driver# make
make -C tools
make[1]: se ingresa al directorio «/root/driver/tools»
gcc -g bin2h.c -o bin2h
make[1]: se sale del directorio «/root/driver/tools»
/root/driver/tools/bin2h
cp -f os/linux/Makefile.6 /root/driver/os/linux/Makefile
make -C /lib/modules/2.6.32-32-generic/build SUBDIRS=/root/driver/os/linux modules
make[1]: se ingresa al directorio «/usr/src/linux-headers-2.6.32-32-generic»
CC [M] /root/driver/os/linux/../../common/rtmp_mcu.o
LD [M] /root/driver/os/linux/rt3562sta.o
Building modules, stage 2.
MODPOST 1 modules
LD [M] /root/driver/os/linux/rt3562sta.ko
make[1]: se sale del directorio «/usr/src/linux-headers-2.6.32-32-generic»

root@silvia-desktop:~/driver# sudo make install
make -C /root/driver/os/linux -f Makefile.6 install
mkdir: no se puede crear el directorio «/etc/Wireless»: El fichero ya existe
make[1]: se ingresa al directorio «/root/driver/os/linux»
rm -rf /etc/Wireless/RT3060STA
#
#mkdir /etc/Wireless/RT3060STA
mkdir -p /etc/Wireless/RT3060STA
cp /root/driver/RT3060STA.dat /etc/Wireless/RT3060STA/.
install -d /lib/modules/2.6.32-32-generic/kernel/drivers/net/wireless/
install -m 644 -c rt3562sta.ko /lib/modules/2.6.32-32-generic/kernel/drivers/net/wireless/
/sbin/depmod -a 2.6.32-32-generic
make[1]: se sale del directorio «/root/driver/os/linux»

3.3
Go to System- preferences-network desktop menu- configuration after you have done the 3.2 step

go to Wireless config
and specify the features. SSID, wireless security key.

and set the name connection: auto ra0 it is an important step, and apply the changes.

and now you are connected to your wireless network, enjoy it! :)

----------------------------------------------------------------------------------------------------------------------
List of errors obtained during the day attempts to get it:

SET failed on device ra0 ; Network is down.
Error for wireless request "Set ESSID" (8B1A)
Error for wireless request "Set Encode (8B2A):
References



jueves, 10 de noviembre de 2011