Обсуждение: Headless Exception

Поиск
Список
Период
Сортировка

Headless Exception

От
Croc
Дата:
Hi All ,
I have a process working with a server 8.2  which runs without a GUI.
I am doing porting to 8.3 , on CentOS 5.0 ,
The server compiled fine, and installed + running.
USING JDBC:postgresql-8.3-604.jdbc4.jar and tried
postgresql-8.3-604.jdbc3.jar too.
When i start my process , i am getting the following Exception:
java.awt.HeadlessException
        at java.awt.GraphicsEnvironment.checkHeadless
(GraphicsEnvironment.java:159)
        at java.awt.Window.<init>(Window.java:431)
        at java.awt.Frame.<init>(Frame.java:403)
        at java.awt.Frame.<init>(Frame.java:368)
        at com.trend.iwss.jscan.runtime.BaseDialog.getActiveFrame
(BaseDialog.java:75)
        at com.trend.iwss.jscan.runtime.AllowDialog.make
(AllowDialog.java:32)
        at com.trend.iwss.jscan.runtime.PolicyRuntime.showAllowDialog
(PolicyRuntime.java:325)
        at com.trend.iwss.jscan.runtime.PolicyRuntime.stopActionInner
(PolicyRuntime.java:240)
        at com.trend.iwss.jscan.runtime.PolicyRuntime.stopAction
(PolicyRuntime.java:172)
        at com.trend.iwss.jscan.runtime.PolicyRuntime.stopAction
(PolicyRuntime.java:165)
        at com.trend.iwss.jscan.runtime.NetworkPolicyRuntime._preFilter
(NetworkPolicyRuntime.java:140)
        at com.trend.iwss.jscan.runtime.PolicyRuntime.preFilter
(PolicyRuntime.java:132)
        at com.trend.iwss.jscan.runtime.NetworkPolicyRuntime.preFilter
(NetworkPolicyRuntime.java:108)
        at org.postgresql.core.PGStream.<init>(PGStream.java:62)
        at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl
(ConnectionFactoryImpl.java:77)
        at org.postgresql.core.ConnectionFactory.openConnection
(ConnectionFactory.java:66)
        at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>
(AbstractJdbc2Connection.java:124)
        at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>
(AbstractJdbc3Connection.java:30)
        at org.postgresql.jdbc3.Jdbc3Connection.<init>
(Jdbc3Connection.java:24)
        at org.postgresql.Driver.makeConnection(Driver.java:386)
        at org.postgresql.Driver.connect(Driver.java:260)
        at java.sql.DriverManager.getConnection(DriverManager.java:
582)
        at java.sql.DriverManager.getConnection(DriverManager.java:
185)
        at
com.orbotech.loganalyser.irg.util.StorageHandler.createConnection
(StorageHandler.java:177)


The process is compiled and running with Java 1.6 , and i tried
assigning -Djava.awt.headless=true and false , and it doesn't help -
naturally since that jscan needs X.
Is there a way to bypass the X need? and use the driver with no X ?
The process is working fine with postgresql-8.2-506.jdbc3.jar - but i
am guessing it will show starnge errors in time (since the server is
8.3).

Any help would be appreciated.

Re: Headless Exception

От
Croc
Дата:
On Jun 3, 5:11 pm, Croc <yair.oha...@gmail.com> wrote:
> Hi All ,
> I have a process working with a server 8.2  which runs without a GUI.
> I am doing porting to 8.3 , on CentOS 5.0 ,
> The server compiled fine, and installed + running.
> USING JDBC:postgresql-8.3-604.jdbc4.jar and tried
> postgresql-8.3-604.jdbc3.jar too.
> When i start my process , i am getting the following Exception:
> java.awt.HeadlessException
>         at java.awt.GraphicsEnvironment.checkHeadless
> (GraphicsEnvironment.java:159)
>         at java.awt.Window.<init>(Window.java:431)
>         at java.awt.Frame.<init>(Frame.java:403)
>         at java.awt.Frame.<init>(Frame.java:368)
>         at com.trend.iwss.jscan.runtime.BaseDialog.getActiveFrame
> (BaseDialog.java:75)
>         at com.trend.iwss.jscan.runtime.AllowDialog.make
> (AllowDialog.java:32)
>         at com.trend.iwss.jscan.runtime.PolicyRuntime.showAllowDialog
> (PolicyRuntime.java:325)
>         at com.trend.iwss.jscan.runtime.PolicyRuntime.stopActionInner
> (PolicyRuntime.java:240)
>         at com.trend.iwss.jscan.runtime.PolicyRuntime.stopAction
> (PolicyRuntime.java:172)
>         at com.trend.iwss.jscan.runtime.PolicyRuntime.stopAction
> (PolicyRuntime.java:165)
>         at com.trend.iwss.jscan.runtime.NetworkPolicyRuntime._preFilter
> (NetworkPolicyRuntime.java:140)
>         at com.trend.iwss.jscan.runtime.PolicyRuntime.preFilter
> (PolicyRuntime.java:132)
>         at com.trend.iwss.jscan.runtime.NetworkPolicyRuntime.preFilter
> (NetworkPolicyRuntime.java:108)
>         at org.postgresql.core.PGStream.<init>(PGStream.java:62)
>         at
> org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl
> (ConnectionFactoryImpl.java:77)
>         at org.postgresql.core.ConnectionFactory.openConnection
> (ConnectionFactory.java:66)
>         at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>
> (AbstractJdbc2Connection.java:124)
>         at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>
> (AbstractJdbc3Connection.java:30)
>         at org.postgresql.jdbc3.Jdbc3Connection.<init>
> (Jdbc3Connection.java:24)
>         at org.postgresql.Driver.makeConnection(Driver.java:386)
>         at org.postgresql.Driver.connect(Driver.java:260)
>         at java.sql.DriverManager.getConnection(DriverManager.java:
> 582)
>         at java.sql.DriverManager.getConnection(DriverManager.java:
> 185)
>         at
> com.orbotech.loganalyser.irg.util.StorageHandler.createConnection
> (StorageHandler.java:177)
>
> The process is compiled and running with Java 1.6 , and i tried
> assigning -Djava.awt.headless=true and false , and it doesn't help -
> naturally since that jscan needs X.
> Is there a way to bypass the X need? and use the driver with no X ?
> The process is working fine with postgresql-8.2-506.jdbc3.jar - but i
> am guessing it will show starnge errors in time (since the server is
> 8.3).
>
> Any help would be appreciated.

UPDATE:
Downloaded source for jdbc3 for 8.3  and built it.
The jar product contains no reference to jscan packages and it works
beutifully , might you using J2EE as default JDK for all builds ?

Re: Headless Exception

От
Kris Jurka
Дата:

On Wed, 3 Jun 2009, Croc wrote:

> Downloaded source for jdbc3 for 8.3  and built it.
> The jar product contains no reference to jscan packages and it works
> beutifully , might you using J2EE as default JDK for all builds ?

No, jscan is part of some anti-virus/security product on your machine.
There's nothing we can do about that.

Kris Jurka

Re: Headless Exception

От
Croc
Дата:
On Jun 3, 11:39 pm, bo...@ejurka.com (Kris Jurka) wrote:
> On Wed, 3 Jun 2009, Croc wrote:
> > Downloaded source for jdbc3 for 8.3  and built it.
> > The jar product contains no reference to jscan packages and it works
> > beutifully , might you using J2EE as default JDK for all builds ?
>
> No, jscan is part of some anti-virus/security product on your machine.
> There's nothing we can do about that.
>
> Kris Jurka
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-j...@postgresql.org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-jdbc

Thanks for answering.
JScan is in the jdbc jar !
When i built the driver myself i don't have jscan packages!
Are you saying it shouldn't be there ?

Re: Headless Exception

От
Oliver Jowett
Дата:
Croc wrote:
> On Jun 3, 11:39 pm, bo...@ejurka.com (Kris Jurka) wrote:
>> On Wed, 3 Jun 2009, Croc wrote:
>>> Downloaded source for jdbc3 for 8.3  and built it.
>>> The jar product contains no reference to jscan packages and it works
>>> beutifully , might you using J2EE as default JDK for all builds ?
>> No, jscan is part of some anti-virus/security product on your machine.
>> There's nothing we can do about that.
>>
>> Kris Jurka
>>
>> --
>> Sent via pgsql-jdbc mailing list (pgsql-j...@postgresql.org)
>> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-jdbc
>
> Thanks for answering.
> JScan is in the jdbc jar !
> When i built the driver myself i don't have jscan packages!
> Are you saying it shouldn't be there ?

It should not be there, and in fact those classes are not there in the
jars available from jdbc.postgresql.org. Probably you have (arguably,
buggy) antivirus software that is modifying the jar when you download
it, adding those classes and breaking things!

Some googling lead me to this:
http://esupport.trendmicro.com/Pages/IWSx-3x-Some-files-and-folders-are-added-to-the-Jar-files-after-passin.aspx

(What a terrible "feature" ..)

-O

Re: Headless Exception

От
Croc
Дата:
On Jun 4, 8:54 am, oli...@opencloud.com (Oliver Jowett) wrote:
> Croc wrote:
> > On Jun 3, 11:39 pm, bo...@ejurka.com (Kris Jurka) wrote:
> >> On Wed, 3 Jun 2009, Croc wrote:
> >>> Downloaded source for jdbc3 for 8.3  and built it.
> >>> The jar product contains no reference to jscan packages and it works
> >>> beutifully , might you using J2EE as default JDK for all builds ?
> >> No, jscan is part of some anti-virus/security product on your machine.
> >> There's nothing we can do about that.
>
> >> Kris Jurka
>
> >> --
> >> Sent via pgsql-jdbc mailing list (pgsql-j...@postgresql.org)
> >> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-jdbc
>
> > Thanks for answering.
> > JScan is in the jdbc jar !
> > When i built the driver myself i don't have jscan packages!
> > Are you saying it shouldn't be there ?
>
> It should not be there, and in fact those classes are not there in the
> jars available from jdbc.postgresql.org. Probably you have (arguably,
> buggy) antivirus software that is modifying the jar when you download
> it, adding those classes and breaking things!
>
> Some googling lead me to this:http://esupport.trendmicro.com/Pages/IWSx-3x-Some-files-and-folders-a...
>
> (What a terrible "feature" ..)
>
> -O
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-j...@postgresql.org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-jdbc

Oliver and Kris,
Thanks a lot.
You were right on the money, that's the anti virus on my company proxy
which does this crime.
Oliver-You're link was very helpful in fixing it.

Thanks again.